-
Notifications
You must be signed in to change notification settings - Fork 9
/
overview.html
233 lines (212 loc) · 11.3 KB
/
overview.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
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
<ng-include src="'partials/header.html'"></ng-include>
<section class="page_content pure-g" id="overview" ng-init="init()">
<header class="pure-u-1">
<section class="content" >
<h1><b class="back" ng-if="filter" onclick="window.history.back()">previous</b>{{ filter || 'root' }} </h1>
<!-- Queries -->
<form class="pure-form query" ng-submit="checkAndSubmitQuery()">
<fieldset class="main_query">
<div class="pure-g">
<div class="search_icon pure-u-1-12">
<b ng-if="!query.length">search</b>
<button type="button" class="icon" ng-click="clearQuery()" ng-if="query.length > 0" mac-tooltip="Clear Query" mac-tooltip-direction="bottom">delete</button>
</div>
<div class="pure-u-11-12 pure-g">
<div class="input pure-u-15-24">
<div ng-show="queryInProgress" class="server-loading pure-u-1"><b>stop</b><b>stop</b><b>stop</b></div>
<input class="pure-input-1"type="text" id="query_form" ng-model="query" name="query" ng-focus="hideAdvancedQuery()" placeholder="Zetta Device Query" ng-show="!queryInProgress"/>
</div>
<div class="dropdown pure-u-1-24" ng-click="toggleAdvancedQuery()" mac-tooltip="Show Query Form" mac-tooltip-direction="bottom">
<button type="button" class="icon" ng-show="!isAdvancedQueryVisible">dropdown</button>
</div>
<div class="submit pure-u-1-4">
<button ng-show="!queryInProgress" class="pure-button" mac-tooltip="Submit Device Query" mac-tooltip-direction="bottom">Submit</button>
<button ng-show="queryInProgress" class="server-loading pure-button"><b>stop</b><b>stop</b><b>stop</b></button>
</div>
</div>
</div>
<div class="query_error pure-g" ng-if="queryError">
<div class="bg symbol pure-u-1-12"><b>ban</b></div>
<div class="pure-u-11-12">
<div class="bg error pure-u-2-3">
<pre>{{queryError}}</pre>
</div>
</div>
</div>
</fieldset>
</form>
<zetta-advanced-query
ng-show="isAdvancedQueryVisible"
submit="submitAdvancedQuery()"
current="queryFilters"
index="propertyNameIndex"
set-query-filters="setQueryFilters"
dismiss="hideAdvancedQuery()"/>
</section>
</header>
<div class="server-loading pure-u-1" ng-if="loading"><b>stop</b><b>stop</b><b>stop</b></div>
<div class="server-loading pure-u-1" ng-if="!hasDevices && !loading">No devices found.</div>
<!-- Pinned Group -->
<div class="pinned device-group pure-g " ng-if="pinned.length">
<h2 class="name pure-u-1">Pinned<span>:group</span></h2>
<section class="devices pure-u-1">
<div ng-repeat="characteristic in pinned" class="device row pure-g animate-size {{characteristic.type}}"
ng-class="{ open: !!characteristic.pinOpen, closed: !characteristic.pinOpen, action: !characteristic.type, stream: !!characteristic.type, disabled: (!characteristic.type && !characteristic.available) }" >
<div class="switches pure-u-1-6 pure-u-md-1-12">
<b class="mute"
ng-click="mute(characteristic)"
mac-tooltip="Mute {{characteristic.name | capitalize}}"
mac-tooltip-direction="bottom"
>eye</b>
<b class="pin"
ng-click="unpin(characteristic)"
mac-tooltip="Unpin {{characteristic.name | capitalize}}"
mac-tooltip-direction="bottom"
>pushpin</b>
</div>
<!-- Stream -->
<div class="pure-u-5-6 pure-u-md-11-12 pure-g" ng-if="characteristic.type">
<ng-include src="'partials/name.html'" class="name lone-name pure-u-1-2 pure-u-md-1-4"></ng-include>
<div class="value hide-md pure-u-1-2">{{ characteristic.current }}</div>
<div class="pure-u-1-6 hide-md"></div>
<div class="vis pure-u-1 pure-u-md-5-12">
<div class="sparkline pure-u-1" ng-if="characteristic.type === 'numerical'">
<sparkline height="16" stream="characteristic.data" id="{{ characteristic.name }}"></sparkline>
</div>
<div class="dnastrip pure-u-1" ng-if="characteristic.type === 'categorical'">
<z-dna-strip width="100" height="16" stream="characteristic"></z-dna-strip>
</div>
</div>
<div class="value before-md pure-u-md-1-3"> {{ characteristic.current }}</div>
</div>
<!-- Action -->
<div class="pure-u-5-6 pure-u-md-11-12 pure-g" ng-if="!characteristic.type">
<zetta-overview-action value="characteristic" context="'pinned'"/>
</div>
</div>
</section>
</div>
<!-- Servers -->
<div class="server device-group pure-g" ng-repeat="server in servers" ng-show="server.available && server.devices.length">
<a name="{{ server.name + server.type | idSafe }}" id="{{ server.name + server.type | idSafe }}"></a>
<h2 class="name pure-u-2-3">
<span ng-if="filter">
:devices <span class="active_query" ng-if="activeQuery">{{ activeQuery }}</span>
</span>
<span ng-if="!filter">
<a ng-click="loadServer(server)">{{ server.name }}</a> : {{ server.type }} <span class="active_query" ng-if="activeQuery"
mac-tooltip="Devices visible to {{ server.name }} are being filtered by this query"
mac-tooltip-direction="bottom" >{{ activeQuery }}</span>
</span>
</h2>
<div class="server_endpoint pure-u-1-3">
<form class="pure-form copy_group">
<input class="pure-input-1" type="text" value="{{ server.lastSearch || server.href }}" readonly select-on-click mac-tooltip="Server API URL" mac-tooltip-direction="bottom"/>
</form>
</div>
<section class="devices pure-u-1">
<section class="device pure-u-1" ng-repeat="device in server.devices" ng-show="device.available">
<div class="row main pure-g">
<div class="pure-u-1-6 pure-u-md-1-12 icon_column"><button class="icon" ng-click="toggleProperties(this)" mac-tooltip="{{ showProperties ? 'Hide Properties' : 'Show Properties' }}" mac-tooltip-direction="bottom">direct{{showProperties ? 'down':'right'}}</button></div>
<div class="name pure-u-5-6 pure-u-md-11-12">
<a ng-click="resolve(device.href)"
mac-tooltip="Details for {{ device.properties.name || device.properties.type }}"
mac-tooltip-direction="bottom"
>{{ device.properties.name || device.properties.type }}</a>
</div>
</div>
<div ng-if="showProperties">
<div class="row properties pure-g" ng-repeat="(property, value) in device.properties" ng-if="!containsKey(device.streams, property)">
<div class="pure-u-1-6 pure-u-md-1-12"></div>
<div class="pure-u-5-6 pure-u-md-11-12 pure-g">
<div class="name pure-u-1-2 pure-u-md-1-4">:{{property}}</div>
<div class="val before-md pure-u-md-5-12">
<input
type="text"
value="{{ value }}"
class="pure-u-1"
readonly
select-on-click
/>
</div>
</div>
</div>
</div>
<!-- Stream -->
<div ng-repeat="stream in device.streams" class="row stream pure-g animate-size closed {{stream.type}}" ng-show="!stream.muted" id="{{ stream.id }}" ng-class="{ open: !!stream.open, closed: !stream.open }">
<div class="switches pure-u-1-6 pure-u-md-1-12">
<div ng-class="{ pinned: stream.pinned }">
<b class="mute"
ng-click="mute(stream)"
mac-tooltip="Mute :{{stream.name | capitalize}}"
mac-tooltip-direction="bottom"
>eye</b>
<b class="pin"
ng-click="pin(stream)"
mac-tooltip="Pin :{{stream.name | capitalize}}"
mac-tooltip-direction="bottom"
>pushpin</b>
</div>
</div>
<div class="pure-u-5-6 pure-u-md-11-12 pure-g">
<ng-include src="'partials/name.html'" class="name pure-u-1-2 pure-u-md-1-4"></ng-include>
<div class="value hide-md pure-u-1-2">{{ stream.current }}</div>
<div class="pure-u-1-6 hide-md"></div>
<div class="vis pure-u-1 pure-u-md-5-12">
<div class="sparkline pure-u-1" ng-if="stream.type === 'numerical'">
<sparkline height="16" stream="stream.data" id="{{ stream.name }}"></sparkline>
</div>
<div class="dnastrip pure-u-1" ng-if="stream.type === 'categorical'">
<z-dna-strip width="100" height="16" stream="stream"></z-dna-strip>
</div>
<div class="pure-u-1 server-loading" ng-if="stream.type === null || stream.type === undefined">
<b>stop</b><b>stop</b><b>stop</b>
</div>
</div>
<div class="value before-md pure-u-md-1-3">
<span
mac-tooltip="{{ device.properties.name || device.properties.type }} : {{stream.name}}"
mac-tooltip-direction="bottom" >{{ stream.current }}</span></div>
</div>
</div>
<!-- Action -->
<div class="row action animate-size closed" ng-repeat="action in device.actions" ng-show="!action.muted" id="{{ action.id }}" ng-class="{ open: !!action.open, closed: !action.open }">
<div class="pure-g action-content">
<div class="switches pure-u-1-6 pure-u-md-1-12">
<div ng-class="{ pinned: action.pinned }">
<b class="mute"
ng-click="mute(action)"
mac-tooltip="Mute #{{action.name | capitalize}}"
mac-tooltip-direction="bottom"
>eye</b>
<b class="pin"
ng-click="pin(action)"
mac-tooltip="Pin #{{action.name | capitalize}}"
mac-tooltip-direction="bottom"
>pushpin</b>
</div>
</div>
<zetta-overview-action value="action" context="'server'" device="device.properties" class="pure-u-5-6 pure-u-md-11-12 pure-g"/>
</div>
</div>
</section>
</section>
<div class="device_count pure-u-1" ng-if="activeQuery">
<ng-pluralize
count="availableDevices(server).length"
when="{'one': '1 device matched','other': '{} devices matched'}"
mac-tooltip="Devices Matched by Active Query"
mac-tooltip-direction="bottom"
>
</ng-pluralize>
</div>
</div>
<!-- Muted Group -->
<div class="muted device-group pure-g" ng-show="muted.length">
<ng-include src="'partials/muted_characteristic.html'" class="pure-u-1"></ng-include>
</div>
</section>
<ng-include src="'partials/footer.html'"></ng-include>