~larry-e-works/uci-engine/amqp-to-kombu

« back to all changes in this revision

Viewing changes to nf-stats-service/web_static/graphs/bootspeed.html

  • Committer: Larry Works
  • Date: 2014-09-30 18:08:31 UTC
  • mfrom: (762.1.55 uci-engine)
  • Revision ID: larry.works@canonical.com-20140930180831-cpztlnifhc47ah69
Massive merge from trunk, no conflicts.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
<script type="text/javascript">
2
 
 
3
 
function isolator(key) {
4
 
    return function(item) {
5
 
        return { date_entered: scope.dateParser(item.date_entered),
6
 
            timespan: Math.max(item.data[key], 0) }
7
 
    }
8
 
}
9
 
 
10
 
scope.massageGraphData = function(blob) {
11
 
    scope.rawData = blob;
12
 
    scope.graphData = [
13
 
    {
14
 
        key: 'Kernel',
15
 
        values: blob.data.map(isolator('kernel'))
16
 
    },
17
 
    {
18
 
        key: 'Plumbing',
19
 
        values: blob.data.map(isolator('plumbing'))
20
 
    },
21
 
    {
22
 
        key: 'XOrg',
23
 
        values: blob.data.map(isolator('xorg'))
24
 
    },
25
 
    {
26
 
        key: 'Desktop',
27
 
        values: blob.data.map(isolator('desktop'))
28
 
//    },
29
 
//    {
30
 
//        key: 'Total Boot',
31
 
//        values: blob.data.map(isolator('boot'))
32
 
    }
33
 
    ];
34
 
}
35
 
</script>
36
 
 
37
 
<nvd3-stacked-area-chart
38
 
        data="graphData"
39
 
        id="bootspeed_graph"
40
 
        height="400"
41
 
        margin="{left:100,top:10,bottom:40,right:100}"
42
 
        x="accessor('date_entered')"
43
 
        y="accessor('timespan')"
44
 
        useInteractiveGuideLine="true"
45
 
        tooltips="true"
46
 
        showXAxis="true"
47
 
        xAxisTickFormat="dateFormatter()"
48
 
        xAxisStaggerLabels="true"
49
 
        showYAxis="true"
50
 
        yAxisTickFormat="numberFormatter(',.2f', 's')"
51
 
        yAxisTickPadding="10"
52
 
        showLegend="true"
53
 
        showValues="true">
54
 
    <svg></svg>
55
 
</nvd3-stacked-area-chart>
56
 
 
57
 
<table>
 
1
<div ng-controller="bootspeedCtrl">
 
2
  <nvd3 options="options" data="graphData" api="api"></nvd3>
 
3
 
 
4
  <table>
58
5
    <tr ng-repeat="series in graphData | reverse">
59
 
        <td><b>{{series.key}}:</b></td>
60
 
        <td ng-repeat="item in series.values">{{numberFormatter(',.2f', 's')(item.timespan)}}</td>
 
6
      <td><b>{{series.key}}:</b></td>
 
7
      <td ng-repeat="item in series.values">{{numberFormatter(',.2f', 's')(item.timespan)}}</td>
61
8
    </tr>
62
9
    <tr>
63
 
        <td><b>Date Entered:</b></td>
64
 
        <td ng-repeat="item in graphData[0].values">{{dateFormatter(ISO_ISH)(item.date_entered)}}</td>
 
10
      <td><b>Date Entered:</b></td>
 
11
      <td ng-repeat="item in graphData[0].values">{{dateFormatter(ISO_ISH)(item.date_entered)}}</td>
65
12
    </tr>
66
 
</table>
 
13
  </table>
 
14
</div>