-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathsurvey.html
205 lines (149 loc) · 6.75 KB
/
survey.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
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<script src="js/libs/angular.min1-5.js"></script>
<script src="js/libs/ui-bootstrap-tpls-2.0.1.min.js"></script>
<script src="js/libs/moment.min.js"></script>
<script src="js/libs/angular-bootstrap-checkbox.js"></script>
<link rel="stylesheet" type="text/css" href="css/bootstrap.min.css"/>
<link rel="stylesheet" type="text/css" href="css/main.css"/>
<title>Resource survey</title>
<script>
angular.module("sampleApp",['ui.bootstrap','ui.checkbox']).config(function($locationProvider) {
// enable html5Mode for pushstate ('#'-less URLs)
$locationProvider.html5Mode(true);
$locationProvider.hashPrefix('!');
});
angular.module("sampleApp").constant("moment", moment);
</script>
<script src="js/surveyCtl.js"></script>
<script src="js/modalDialogSvc.js"></script>
</head>
<body style="padding: 8px;padding-top: 80px">
<div ng-app="sampleApp" ng-controller="surveyCtrl" class="container-fluid" ng-cloak>
<nav class="navbar navbar-default navbar-fixed-top" role="navigation">
<div class="col-md-11 col-sm-11">
<a class="navbar-brand" href="#">Resource usage survey</a>
</div>
<div class="col-md-1 col-sm-1">
<div class="navbar-text">
</div>
</div>
</nav>
<uib-tabset>
<uib-tab heading="Survey">
<div class="rounded-box-filled">
<div class="row">
<div class="col-md-3">
<input type="text" class="form-control" ng-model="input.name" placeholder="My Name"/>
</div>
<div class="col-md-3">
<input type="text" class="form-control" ng-model="input.contact" placeholder="Email (optional)"/>
</div>
<div class="col-md-3">
<checkbox ng-model="input.selectedOnly"
ng-click="selectedOnly(! input.selectedOnly)"></checkbox>
Only show selected resource types
</div>
<div class="col-md-3">
<button class="btn btn-primary pull-right" ng-click="submit()">Submit</button>
</div>
</div>
</div>
<br/>
<div class="row">
<div class="col-md=3">
<table class="table table-bordered">
<tr>
<th width="20%">Resource type</th>
<th width="15%" width="15%">Deployment type</th>
<th>Notes</th>
</tr>
<tr>
<td>
<input type="text" class="form-control" ng-model="input.filter"
ng-change="setFilter(input.filter)"
placeholder="Filter text"/>
</td>
</tr>
<tr ng-repeat = "row in lst" >
<td>
<checkbox ng-model="input.selected[row.name]"
ng-click="checked(row)"></checkbox>
{{row.name}}
</td>
<td>
<div ng-show="input.selected[row.name]">
<div class="btn-group">
<label class="btn btn-default" ng-model="input.deployType[row.name]" uib-btn-radio="'dev'">Dev / Test</label>
<label class="btn btn-default" ng-model="input.deployType[row.name]" uib-btn-radio="'prod'">Production</label>
</div>
</div>
</td>
<!--
<td>
<div ng-show="input.selected[row.name]">
<checkbox ng-model="input.devtest[row.name]"
ng-click="checked(row)"></checkbox>
</div>
</td>
<td>
<div ng-show="input.selected[row.name]">
<checkbox ng-model="input.production[row.name]"
ng-click="checked(row)"></checkbox>
</div>
</td>
-->
<td>
<div ng-show="input.selected[row.name]">
<textarea class="form-control" ng-model="input.notes[row.name]"></textarea>
</div>
</td>
</tr>
</table>
</div>
</div>
</uib-tab>
<uib-tab heading="Result so far...">
<div class="rounded-box-filled">
<div class="row">
<div class="col-md-3">
</div>
<div class="col-md-3">
</div>
<div class="col-md-3">
</div>
<div class="col-md-3">
<div class="pull-right">
<checkbox ng-model="input.showNotes"
ng-click="showNotes(! input.showNotes)"></checkbox>
Show Notes
</div>
</div>
</div>
</div>
<table class="table table-bordered">
<tr><th width="20%">Resource type</th><th>Number of Responses</th><th>Dev/Test deployments</th><th>Production deployments</th><th>Notes</th></tr>
<tr ng-repeat="res in results">
<td>{{res.type}}</td>
<td>{{res.count}}</td>
<td>{{res.dev}}</td>
<td>{{res.prod}}</td>
<td>
<div ng-show="input.showNotes" ng-repeat="note in res.notes">
{{note}}
</div>
<div ng-hide="input.showNotes">
<div ng-show="res.notes.length > 0">
({{res.notes.length}})
</div>
</div>
</td>
</tr>
</table>
</uib-tab>
</uib-tabset>
</div>
</body>
</html>