forked from EMC-UI/emc-stash-widget
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
126 lines (109 loc) · 5.55 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
<html>
<head>
<link rel="stylesheet" href="css/main.css">
<link rel="stylesheet" href="css/font-awesome.min.css">
<script src="bower_components/angular/angular.min.js"></script>
<script src="bower_components/angular-messages/angular-messages.min.js"></script>
<script src="bower_components/underscore/underscore.js"></script>
<script src="js/app.js"></script>
</head>
<body ng-controller="mainCtrl" ng-app="app">
<div id="left">
<div data-ng-repeat="mode in widgetMode track by mode.id">
<label>
<input
name="widgetMode"
type="radio"
ng-value="{{mode.id}}"
ng-model="$parent.widgetModeActive" />
{{mode.name}}
</label>
</div>
<select name="prevDays" required
ng-options="option.name for option in prevDays.availableOptions track by option.days"
ng-model="prevDays.selectedOption"
ng-change="loadCounts(prevDays.selectedOption.days)"></select>
<span ng-repeat="item in views track by $index" class="circle" ng-class="{active: view == item.id}" ng-click="setView(item.id)">
<span style="vertical-align:-2.5em;"><b>{{ item.name }}</b></span>
</span>
</div>
<div id="right">
<!-- <select name="prevDays" required
ng-model="prevDays"
ng-change="loadCounts()">
<option value="1"> Last 24 Hours</option>
<option value="7" selected> Last 7 Days</option>
</select> -->
<div ng-controller="UserStatsCtrl" ng-if="view == 0">
<h1>Users with Most Commits</h1>
<div ng-repeat="item in userStats track by $index" class="entry">
<div class="top">
<span ng-if="$index<5">
<span class="proj-pic" style="background-image:url(assets/img/proj-{{$index}}.png)"></span>
</span>
<h3>
<em>{{item._id}}</em> <span>has</span>
<em>{{item.count}}</em> <span>commits with</span>
<em>{{item.projects.length}}</em>
<span>projects [
<span ng-repeat="proj in item.projects track by $index">
{{ proj.project }}
<span ng-show="$index < item.projects.length-1">, </span>
</span> ]
</span>
</h3>
<div class="container">
<div class="bar" style="width: {{item.commitPercent}}%"></div>
</div>
</div>
</div>
</div>
<div ng-controller="ProjectStatsCtrl" ng-if="view == 1">
<h1>Projects with Most Commits</h1>
<div ng-repeat="item in projectStats track by $index" class="entry">
<div class="top">
<span ng-if="$index<5">
<span class="proj-pic" style="background-image:url(img/proj-{{$index}}.png)"></span>
</span>
<h3>
<em>{{item._id}}</em> <span>has</span>
<em>{{item.count}}</em> <span>commits with</span>
<em>{{item.users.length}}</em>
<span>contributors [
{{ item.users[0].user }}
<span ng-if="item.users.length > 1">, {{ item.users[1].user }} </span>
<span ng-if="item.users.length > 2">, {{ item.users[2].user }} </span> ]
</span>
</h3>
<div class="container">
<div class="bar" style="width: {{item.commitPercent}}%"></div>
</div>
</div>
</div>
</div>
<div ng-controller="RepoStatsCtrl" ng-if="view == 2">
<h1>Repos with Most Commits</h1>
<div ng-repeat="item in repoStats track by $index" class="entry">
<div class="top">
<span ng-if="$index<5">
<span class="proj-pic" style="background-image:url(img/proj-{{$index}}.png)"></span>
</span>
<h3>
<em>{{item._id}}</em> <span>has</span>
<em>{{item.count}}</em> <span>commits with</span>
<em>{{item.users.length}}</em>
<span>contributors [
{{ item.users[0].user }}
<span ng-if="item.users.length > 1">, {{ item.users[1].user }} </span>
<span ng-if="item.users.length > 2">, {{ item.users[2].user }} </span> ]
</span>
</h3>
<div class="container">
<div class="bar" style="width: {{item.commitPercent}}%"></div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>