Project

General

Profile

« Previous | Next » 

Revision 52049

made a few changes in usagestats-report-results

View differences:

modules/uoa-repository-dashboard-gui/trunk/app/pages/metrics/metrics-usagestats-report-results.component.html
35 35
                              repoResponse.Report.Report.Customer.ReportItems.length > 0">{{ repoResponse.Report.Report.Customer.ReportItems[0].ItemPlatform }}</span>
36 36
                </h3>
37 37
                <table class="uk-table uk-align-left">
38
                  <tr class="uk-padding-remove">
39
                    <td class="uk-align-right">Period covered</td>
38
                  <tr>
39
                    <th>Period covered</th>
40 40
                    <td>{{ coveredPeriod }}</td>
41 41
                  </tr>
42 42
                  <tr>
43
                    <td class="uk-align-right">Filters</td>
43
                    <th>Filters</th>
44 44
                    <td>
45
                      <span *ngFor="let filter of repoResponse.ReportDefinition.Filters.Filter">
46
                        {{ filter.Name }}: {{ filter.Value }};
45
                      <span *ngFor="let filter of repoResponse.ReportDefinition.Filters.Filter; let i = index">
46
                        <br *ngIf="i>0">
47
                        {{ filter.Name }}: {{ filter.Value }}
47 48
                      </span>
48 49
                    </td>
49 50
                  </tr>
50 51
                  <tr>
51
                    <td class="uk-align-right">Date run</td>
52
                    <th>Date run</th>
52 53
                    <td>{{ repoResponse.Report.Report['@Created'] | date: "MM/dd/yyyy" }}</td>
53 54
                  </tr>
54 55
                  <tr>
55
                    <td class="uk-align-right">Number of results</td>
56
                    <th>Number of results</th>
56 57
                    <td>{{ repoResponse.ReportDefinition.Filters.ReportAttribute[1].Value }}</td>
57 58
                  </tr>
58 59
                </table>
59 60

  
60
                <table>
61
                <table class="uk-table uk-table-expand">
61 62
                  <thead>
62
                    <tr>
63
                      <th>ItemUrl</th>
64
                      <th>Title</th>
65
                      <th>Publisher</th>
66
                      <th>Item Type</th>
67
                      <th colspan="2">{{ coveredPeriod }}</th>
68
                    </tr>
63
                  <tr>
64
                    <th>ItemUrl</th>
65
                    <th>Title</th>
66
                    <th>Publisher</th>
67
                    <th>Item Type</th>
68
                    <th colspan="2">Apr 2018</th>
69
                  </tr>
69 70
                  </thead>
70 71
                  <tbody>
71
                    <tr *ngFor="let item of repoResponse.Report.Report.Customer.ReportItems">
72
                      <td>{{ item.ItemIdentifier[1].Value }}</td>
73
                      <td>{{ item.ItemName }}</td>
74
                      <td>{{ item.ItemPublisher }}</td>
75
                      <td>{{ item.ItemDataType }}</td>
76
                      <td>{{ item.ItemPerformance[0].Instance[0].Count }}</td>
77
                      <td>{{ item.ItemPerformance[0].Instance[1].Count }}</td>
78
                    </tr>
72
                  <tr *ngFor="let item of repoResponse.Report.Report.Customer.ReportItems">
73
                    <td>{{ transformItem(item.ItemIdentifier[1].Value) }}</td>
74
                    <td>{{ item.ItemName }}</td>
75
                    <td>{{ item.ItemPublisher }}</td>
76
                    <td>{{ item.ItemDataType }}</td>
77
                    <td>{{ item.ItemPerformance[0].Instance[0].Count }}</td>
78
                    <td>{{ item.ItemPerformance[0].Instance[1].Count }}</td>
79
                  </tr>
79 80
                  </tbody>
80 81
                </table>
81 82
              </div>
modules/uoa-repository-dashboard-gui/trunk/app/pages/metrics/metrics-usagestats-report-results.component.ts
72 72
    );
73 73

  
74 74
  }
75

  
76
  transformItem(url: string) {
77
    const temp = url.split(';');
78
    let output = '';
79
    for (let u of temp) {
80
      if (output.length === 0) {
81
        output = output + '\n';
82
      }
83
      output = output + u.replace(/\\/g,'');
84
    }
85
    return output;
86
  }
87

  
75 88
}
modules/uoa-repository-dashboard-gui/trunk/app/pages/metrics/metrics-usagestats.component.html
113 113
                      Item Identifier:
114 114
                    </div>
115 115
                    <div class="uk-width-2-3">
116
                      {{ repo.piwikInfo.openaireId }}
116
                      <input name="ItemIdentifier" placeholder="e.g. openaire:od_________::fb90de6f20d79783d05749d8f60417d5"
117
                             type="text" (blur)="updateItemIdentifier($event)">
117 118
                    </div>
118 119
                  </div>
119 120

  
modules/uoa-repository-dashboard-gui/trunk/app/pages/metrics/metrics-usagestats.component.ts
87 87
    this.itemDataType = event.target.value;
88 88
  }
89 89

  
90
  updateItemIdentifier(event: any) {
91
    this.itemIdentifier = event.target.value;
92
  }
93

  
90 94
  updateGranularity(event: any) {
91 95
    this.granularity = event.target.value;
92 96
  }
......
105 109
          endDate: this.endDate,
106 110
          repoId: this.shownRepoId,
107 111
          itemDataType: this.itemDataType,
112
          itemIdentifier: this.itemIdentifier,
108 113
          granularity: this.granularity,
109 114
          pretty: this.pretty
110 115
        }

Also available in: Unified diff