@c8y/ng1-modules 1019.0.7 → 1019.2.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- "use strict";!function(){function e(e){var n=e("date"),u=e("json");return function(e,t,r,a){return(e instanceof Date&&!Number.isNaN(e)||!Number.isNaN(Date.parse(e)))&&!Number.parseFloat(e)?n(e,r,a):(r=u,a=e,t?r(a):a)}}e.$inject=["$filter"],angular.module("c8y.ui").filter("checkForDate",e)}();
1
+ "use strict";!function(){function e(e){var n=e("date"),u=e("json");return function(e,r,t,a){return(e instanceof Date&&!Number.isNaN(e)||!Number.isNaN(Date.parse(e)))&&Number.isNaN(Number.parseFloat(e))?n(e,t,a):(t=u,a=e,r?t(a):a)}}e.$inject=["$filter"],angular.module("c8y.ui").filter("checkForDate",e)}();
@@ -116,7 +116,7 @@
116
116
  aria-label="{{ 'Help' | translate }}"
117
117
  type="button"
118
118
  uib-popover="{{
119
- 'You cannot change the email of other users, and of your own (if it\'s managed through your authorization server).'
119
+ 'You cannot change the stored email addresses of other users, as well as your own (if it\'s managed through your authorization server).'
120
120
  | translate
121
121
  }}"
122
122
  popover-trigger="'focus'"
@@ -139,9 +139,10 @@
139
139
  ng-required="true"
140
140
  />
141
141
  <div
142
- class="c8y-messages"
143
- ng-show="invalid('email')"
144
- data-cy="c8y-messages--invalid-email">
142
+ class="c8y-messages"
143
+ ng-show="invalid('email')"
144
+ data-cy="c8y-messages--invalid-email"
145
+ >
145
146
  <small class="form-control-feedback-message">
146
147
  {{ getErrorFeedback('email') | translate }}
147
148
  </small>
@@ -0,0 +1 @@
1
+ "use strict";!function(){function e(t,n,e,a,i,o,l,c,d){var r,s,u="c8y_Position",g="com_nsn_startups_vendme_fragments_GPSCoordinates",f={},m={icon:{type:"div",className:"normal-marker-icon",iconSize:[25,41],iconAnchor:[12.5,41]},focus:!0,draggable:!0};function v(e){d.getMap("locationId").then(function(e){setTimeout(function(){e.invalidateSize(!0)},500)}),r=e,t.location=A(e)||{};var n,e=t.location;b(t.location),s=_.clone(e),(n=e).lat&&n.lng&&$(e)}function b(e){var n=_.get(e,"lat"),t=_.get(e,"lng"),a=_.get(e,"alt");_.set(e,"lat",_.toNumber(n)),_.set(e,"lng",_.toNumber(t)),_.isUndefined(a)||_.set(e,"alt",_.toNumber(a))}function h(e){e&&($(e={lat:Number(e.lat),lng:Number(e.lng),zoom:17}),C(e),D(e))}function p(){var e;i.detailCached(((e=_.get(t,"child.config.device"))&&(m.draggable=!1),_.get(e,"id",n.deviceId))).then(function(e){return _.cloneDeep(e.data)}).then(v)}function $(e){_.assign(m,{lat:parseFloat(e.lat),lng:parseFloat(e.lng)}),D(f.main=m)}function C(e){_.assign(t.location,{lat:parseFloat(e.lat),lng:(e=parseFloat(e.lng),(e%=360)<-180?360+e:180<e?e-360:e)})}function y(e){return i.isVendme(e)?g:u}function A(e){return e[y(e)]}function D(e){e=e||m;_.assign(t.center,e)}_.assign(t,{settings:{},markers:f,mapDefaults:{scrollWheelZoom:!1},centerMap:D,center:{lat:0,lng:0,zoom:11},pattern:{latitude:/^[-+]?([1-8]?\d(\.\d+)?|90(\.0+)?)$/,longitude:/^[-+]?(180(\.0+)?|((1[0-7]\d)|([1-9]?\d))(\.\d+)?)$/,altitude:/^[-+]?(0|([1-9]\d*))(\.\d+)?$/},events:{markers:{enable:["dragend"]}},gotoAddress:function(e){a.geoCode(e).then(function(e){e=_.get(e,"data[0]");return e?(e.lng=e.lon,e):(l.warning(c("Address could not be found.")),null)}).then(h)},cancel:function(){t.noeditable=!t.noeditable,_.isEqual(t.location,s)||(t.location=_.clone(s))},save:function(){t.noeditable=!t.noeditable;var e={id:r.id},n=_.clone(A(r));delete n.address,e[y(r)]=n,b(e[y(r)]),i.save(e).then(function(){l.success(c("Location saved."))}).then(p)},realtimeChannel:"/managedobjects/".concat(void 0!==n.deviceId?n.deviceId:"*"),invalid:angular.bind(e,e.invalid,t),id:t.$id}),t.$on("leafletDirectiveMarker.locationId.dragend",function(e,n){C(n.model)}),t.$watch("child.config.device",p),o.addListener(t.$id,t.realtimeChannel,"".concat(t.$id,"-subscribed"),function(){p()}),o.addListener(t.$id,t.realtimeChannel,"CREATE",function(e,n){v(n)}),o.addListener(t.$id,t.realtimeChannel,"UPDATE",function(e,n){v(n)}),p()}e.$inject=["$scope","$routeParams","c8yBase","c8yGeo","c8yDevices","c8yRealtime","c8yAlert","gettext","leafletData"],angular.module("c8y.parts.location").controller("locationCtrl",e)}();
@@ -16,6 +16,7 @@
16
16
  title="{{ 'Request log file' | translate }}"
17
17
  aria-haspopup="true"
18
18
  type="button"
19
+ data-cy="logViewer--request-log-file"
19
20
  uib-dropdown-toggle
20
21
  >
21
22
  <i c8y-icon="file-text"></i>
@@ -24,6 +25,7 @@
24
25
  </button>
25
26
  <ul
26
27
  class="dropdown-menu dropdown-menu-right dropdown-menu-action-bar"
28
+ data-cy="logViewer--dropdown-menu-action-bar"
27
29
  uib-dropdown-menu
28
30
  >
29
31
  <li class="dropdown-form">
@@ -63,6 +65,7 @@
63
65
  required
64
66
  ng-init="vm.logtypeSelect = $select"
65
67
  ng-model="vm.filters.logFile"
68
+ data-cy="logViewer--filters-log-type"
66
69
  >
67
70
  <ui-select-match
68
71
  title="{{ $select.selected.name }}"
@@ -86,6 +89,7 @@
86
89
  <input
87
90
  class="form-control"
88
91
  placeholder="{{ 'Filter by text' | translate }}"
92
+ data-cy="logViewer--search-text"
89
93
  ng-model="vm.filters.searchText"
90
94
  ng-trim="false"
91
95
  />
@@ -99,6 +103,7 @@
99
103
  type="number"
100
104
  required
101
105
  ng-model="vm.filters.maximumLines"
106
+ data-cy="logViewer--maximum-lines"
102
107
  />
103
108
  </div>
104
109
  <button
@@ -107,6 +112,7 @@
107
112
  type="button"
108
113
  ng-disabled="logRequestForm.$invalid"
109
114
  ng-click="requestLogfile(vm.filters); isOpen = !isOpen"
115
+ data-cy="logViewer--request-log-file-button"
110
116
  c8yProductExperience
111
117
  [actionName]="PRODUCT_EXPERIENCE.EVENT"
112
118
  [actionData]="{
@@ -214,6 +220,7 @@
214
220
  ng-if="!hasLogFile(op) && isPending(op)"
215
221
  popover-trigger="'mouseenter focus'"
216
222
  ng-click="cancel(op)"
223
+ data-cy="logViewer--cancel-operation"
217
224
  c8yProductExperience
218
225
  [actionName]="PRODUCT_EXPERIENCE.EVENT"
219
226
  [actionData]="{
@@ -239,6 +246,7 @@
239
246
  ng-class="{ active: op === selectedLog }"
240
247
  title="{{ 'Expand' | translate }}"
241
248
  type="button"
249
+ data-cy="logViewer--Expand-button"
242
250
  ng-click="op===selectedLog ? selectLogfile({}) :selectLogfile(op);"
243
251
  ng-if="hasLogFile(op)"
244
252
  >
@@ -256,22 +264,24 @@
256
264
  >
257
265
  <button
258
266
  class="dropdown-toggle c8y-dropdown btn-link"
259
- data-cy="index--dropdown-toggle--Action"
260
267
  title="{{ 'Actions' | translate }}"
261
268
  aria-haspopup="true"
262
269
  type="button"
270
+ data-cy="index--dropdown-toggle--Action"
263
271
  uib-dropdown-toggle
264
272
  >
265
273
  <i c8y-icon="ellipsis-v"></i>
266
274
  </button>
267
275
  <ul
268
276
  class="dropdown-menu dropdown-menu-right"
277
+ data-cy="index--dropdown-menu-right"
269
278
  uib-dropdown-menu
270
279
  >
271
280
  <li>
272
281
  <button
273
282
  title="{{ 'Delete log' | translate }}"
274
283
  type="button"
284
+ data-cy="index--Delete-log-button"
275
285
  ng-click="remove(op)"
276
286
  >
277
287
  <i c8y-icon="delete"></i>
@@ -283,6 +293,7 @@
283
293
  title="{{ 'Download log' | translate }}"
284
294
  href
285
295
  ng-click="download(op)"
296
+ data-cy="index--Download-log-button"
286
297
  c8yProductExperience
287
298
  [actionName]="PRODUCT_EXPERIENCE.EVENT"
288
299
  [actionData]="{
@@ -334,11 +345,14 @@
334
345
  <dl
335
346
  class="dl-inline small text-muted m-b-0"
336
347
  ng-show="selectedLog.c8y_LogfileRequest.dateTo"
348
+ data-cy="logViewer--LogfileRequest.dateTo"
337
349
  >
338
350
  <dt translate>Date to</dt>
339
- <dd ng-bind="selectedLog.c8y_LogfileRequest.dateTo | absoluteDate"></dd>
351
+ <dd
352
+ ng-bind="selectedLog.c8y_LogfileRequest.dateTo | absoluteDate"
353
+ data-cy="logViewer--LogfileRequest.dateFrom"
354
+ ></dd>
340
355
  </dl>
341
-
342
356
  <dl
343
357
  class="dl-inline small text-muted m-b-0"
344
358
  ng-show="selectedLog.c8y_LogfileRequest.logFile"
@@ -1 +1 @@
1
- "use strict";!function(){function e(e,n,t,l,a,o,c){var r,g=new l.Bounds,s=[],i={type:"polygon",stroke:!0,weight:1,color:"#2e3974",fillColor:"#2e3974",latlngs:[]},d={center:{},events:{},defaults:{doubleClickZoom:!1},bounds:g.get(),markers:s,paths:{geofencePath:i}};function u(e){e=e&&e.latLng;e&&(d.center=_.assign(d.center,{lat:Number(e.lat),lng:Number(e.lng),zoom:17}))}function f(){0<i.latlngs.length&&(g.reset(),_.forEach(i.latlngs,function(e){g.add(e)}),d.bounds=g.get())}function h(){i.latlngs.length=0,s.length=0}function m(e,n){switch(e.name){case"leafletDirectiveMarker.dragstart":r={lat:n.model.lat,lng:n.model.lng,draggable:!0};break;case"leafletDirectiveMarker.dragend":i.latlngs[_.findIndex(i.latlngs,r)]={lat:n.model.lat,lng:n.model.lng,draggable:!0}}}e.gotoAddress=function(e){l.geoCode(e).then(function(e){e=_.get(e,"data.results[0].locations[0]");return e||o.warning(c("Address could not be found.")),e||null}).then(u)},e.centerMap=f,e.clearGeofence=h,e.chooseGeofence=function(){var e;n.close((e=i.latlngs,_.map(e,function(e){return{lat:e.lat,lng:e.lng}})))},e.cancel=n.dismiss,e.map=d,e.$on("leafletDirectiveMap.click",function(e,n){n={lat:n.leafletEvent.latlng.lat,lng:n.leafletEvent.latlng.lng,draggable:!0,icon:{type:"div",className:"normal-marker-icon",iconSize:[25,41],iconAnchor:[12.5,41]}},d.markers.push(n),i.latlngs.push(n),1===i.latlngs.length&&(d.paths={geofencePath:i})}),e.$on("leafletDirectiveMarker.dragend",m),e.$on("leafletDirectiveMarker.dragstart",m),h(),_.forEach(a,function(e){e.draggable=!0,e.icon={type:"div",className:"normal-marker-icon",iconSize:[25,41],iconAnchor:[12.5,41]},s.push(e),i.latlngs.push(e)}),0<i.latlngs.length?d.paths={geofencePath:i}:d.paths={},t(f,0)}e.$inject=["$scope","$uibModalInstance","$timeout","c8yGeo","geofenceLatLngs","c8yAlert","gettext"],angular.module("c8y.cockpit.map").controller("GeofenceEditCtrl",e)}();
1
+ "use strict";!function(){function e(e,n,t,l,a,o,c){var r,g=new l.Bounds,s=[],i={type:"polygon",stroke:!0,weight:1,color:"#2e3974",fillColor:"#2e3974",latlngs:[]},d={center:{},events:{},defaults:{doubleClickZoom:!1},bounds:g.get(),markers:s,paths:{geofencePath:i}};function u(e){e&&(d.center=_.assign(d.center,{lat:Number(e.lat),lng:Number(e.lng),zoom:17}))}function f(){0<i.latlngs.length&&(g.reset(),_.forEach(i.latlngs,function(e){g.add(e)}),d.bounds=g.get())}function h(){i.latlngs.length=0,s.length=0}function m(e,n){switch(e.name){case"leafletDirectiveMarker.dragstart":r={lat:n.model.lat,lng:n.model.lng,draggable:!0};break;case"leafletDirectiveMarker.dragend":i.latlngs[_.findIndex(i.latlngs,r)]={lat:n.model.lat,lng:n.model.lng,draggable:!0}}}e.gotoAddress=function(e){l.geoCode(e).then(function(e){e=_.get(e,"data[0]");return e?(e.lng=e.lon,e):(o.warning(c("Address could not be found.")),null)}).then(u)},e.centerMap=f,e.clearGeofence=h,e.chooseGeofence=function(){var e;n.close((e=i.latlngs,_.map(e,function(e){return{lat:e.lat,lng:e.lng}})))},e.cancel=n.dismiss,e.map=d,e.$on("leafletDirectiveMap.click",function(e,n){n={lat:n.leafletEvent.latlng.lat,lng:n.leafletEvent.latlng.lng,draggable:!0,icon:{type:"div",className:"normal-marker-icon",iconSize:[25,41],iconAnchor:[12.5,41]}},d.markers.push(n),i.latlngs.push(n),1===i.latlngs.length&&(d.paths={geofencePath:i})}),e.$on("leafletDirectiveMarker.dragend",m),e.$on("leafletDirectiveMarker.dragstart",m),h(),_.forEach(a,function(e){e.draggable=!0,e.icon={type:"div",className:"normal-marker-icon",iconSize:[25,41],iconAnchor:[12.5,41]},s.push(e),i.latlngs.push(e)}),0<i.latlngs.length?d.paths={geofencePath:i}:d.paths={},t(f,0)}e.$inject=["$scope","$uibModalInstance","$timeout","c8yGeo","geofenceLatLngs","c8yAlert","gettext"],angular.module("c8y.cockpit.map").controller("GeofenceEditCtrl",e)}();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@c8y/ng1-modules",
3
- "version": "1019.0.7",
3
+ "version": "1019.2.8",
4
4
  "license": "Apache-2.0",
5
5
  "author": "Cumulocity",
6
6
  "description": "AngularJS modules for Cumulocity IoT applications.",
@@ -1 +1 @@
1
- "use strict";!function(){function n(n,e,o,c,t,s,r,u){var i=[],a={loading:!0};function l(){a.loading=!1}function f(n){return _.filter(n,function(n){return!n.hideFromList})}function h(n){var t,e=_.keys(s);return 0===e.length?n:_.filter(n,function(n){return!!(n.contexts&&(t=_.keys(n.contexts),0<_.intersection(e,t).length))})}function m(n){return _.filter(n,function(n){return!r||r(n)})}function d(n){n.forEach(function(n){i.push(n)})}function g(){1===i.length&&i[0]._active&&v(i[0])}function v(n){var t,r,i;return t=n._active?c.createInstanceWithUI(n,(i={},n=(r=n).contexts&&_.intersection(_.keys(s),_.keys(r.contexts))||[],_.forEach(n,function(n){var e={obj:s[n]},c={rule:i};_.forEach(r.contexts[n],function(n,t){t=o("obj.".concat(t)),n=o("rule.".concat(n)),t=t(e);n.assign(c,t)})}),_.assign(i,u))).then(e.close):t}n.ruleTemplates=i,n.cancel=function(){e.dismiss()},n.createInstance=v,n.loading=a,t.list().then(f).then(h).then(m).then(d).then(g).finally(l)}n.$inject=["$scope","$uibModalInstance","$parse","smartRulesSvc","smartRuleTemplatesSvc","context","ruleTemplatesFilterFn","ruleInitialObj"],angular.module("c8y.smartRules").controller("SmartRuleAddCtrl",n)}();
1
+ "use strict";!function(){function n(n,e,o,c,t,u,r,s){var i=[],l={loading:!0};function a(){l.loading=!1}function f(n){return _.filter(n,function(n){return!n.hideFromList})}function h(n){var t,e=_.keys(u);return 0===e.length?n:_.filter(n,function(n){return!!(n.contexts&&(t=_.keys(n.contexts),0<_.intersection(e,t).length))})}function m(n){return _.filter(n,function(n){return!r||r(n)})}function d(n){n.forEach(function(n){i.push(n)})}function g(){1===i.length&&i[0]._active&&v(i[0])}function v(n){var t,r,i;return t=n._active?c.createInstanceWithUI(n,(i={},n=(r=n).contexts&&_.intersection(_.keys(u),_.keys(r.contexts))||[],_.forEach(n,function(n){var e={obj:u[n]},c={rule:i};_.forEach(r.contexts[n],function(n,t){t=o("obj.".concat(t)),n=o("rule.".concat(n)),t=t(e);null!=t&&n.assign(c,t)})}),_.assign(i,s))).then(e.close):t}n.ruleTemplates=i,n.cancel=function(){e.dismiss()},n.createInstance=v,n.loading=l,t.list().then(f).then(h).then(m).then(d).then(g).finally(a)}n.$inject=["$scope","$uibModalInstance","$parse","smartRulesSvc","smartRuleTemplatesSvc","context","ruleTemplatesFilterFn","ruleInitialObj"],angular.module("c8y.smartRules").controller("SmartRuleAddCtrl",n)}();
@@ -1 +0,0 @@
1
- "use strict";!function(){function e(o,a,r,s,u,d,g){var t=o.$watch("device",function(e){e&&e.id&&(e=e,o.geofence=e.c8y_Geofence&&e.c8y_Geofence.active,o.motion=e.c8y_MotionTracking&&e.c8y_MotionTracking.active||!1,o.radius=e.c8y_Geofence&&e.c8y_Geofence.radius||100,t())});_.assign(o,{supports:function(e){return s.supportsOperation(o.device,e)},updateConfig:function(){var e,t=[],n=o.device,c=n.id,i=n.c8y_Position;o.geofence&&!i?(e=g("Device current position not defined"),o.$emit("message",{text:e,type:"error"})):(s.supportsOperation(n,"c8y_Geofence")&&t.push(function(e,t,n,c){c=g(c?"Activate geofence":"Deactivate geofence");return r.create({deviceId:e,description:c,c8y_Geofence:{lat:t&&t.lat,lng:t&&t.lng,radius:n,active:!0}})}(c,i,o.radius,o.geofence)),s.supportsOperation(n,"c8y_MotionTracking")&&t.push(function(e,t){var n=g(t?"Activate motion tracking":"Deactivate motion tracking");return r.create({deviceId:e,description:n,c8y_MotionTracking:{active:!!t}})}(c,o.motion)),t.length?a.all(t).then(function(){o.$emit("message",{text:g("Operations created"),type:"success"})}):_.isUndefined(o.radius)||(_.assign(n,{c8y_Radius:{value:o.radius}},{c8y_CopyPosition:_.cloneDeep(n.c8y_Position)}),u.save(n).then(function(){d.success(g("Changes saved."))})))}})}e.$inject=["$scope","$q","c8yDeviceControl","c8yDevices","c8yInventory","c8yAlert","gettext"],angular.module("c8y.parts.tracking").controller("trackingConfigCtrl",e)}();
@@ -1 +0,0 @@
1
- "use strict";!function(){function e(e,t,r,a,n,o,c,i,m,l){var d=this,s=(d.deviceId=t.deviceId,{gps:!0,gsm:!0}),t=[{txt:o("Last hour"),time:"hour"},{txt:o("Last day"),time:"day"},{txt:o("Last week"),time:"week"},{txt:o("Last month"),time:"month"},{txt:o("Custom"),time:"custom"}];function k(){return d.map&&d.map.tracker&&d.map.tracker.loadMore&&d.map.tracker.loadMore[d.deviceId]}d.markers={},d.noMarkers=!0,d.checkDateTo=function(){var e=moment(d.dateFrom);d.dateTo&&0<=e.diff(moment(d.dateTo),"days")&&(d.dateTo=e.clone().add("day",1).toDate())},d.toggle=function(e,t){var a;d.markers["p".concat(e)]?(d.map.leafletMap.removeLayer(d.markers["p".concat(e)]),delete d.markers["p".concat(e)]):(a=n.getLocationFragment(t))&&(d.markers["p".concat(e)]=L.marker(L.latLng(a.lat,a.lng)).bindPopup(r("date")(t.time,"medium")).addTo(d.map.leafletMap)),d.noMarkers=!Object.keys(d.markers).length},d.hideAll=function(){_.forEach(d.markers,function(e){d.map.leafletMap.removeLayer(e)}),d.markers={},d.noMarkers=!0},d.events=function(){var e=d.map&&d.map.tracker.events[d.deviceId];return _.filter(e,{type:"c8y_LocationUpdate"})},d.hasLoadMore=k,d.loadMore=function(){var e=k();return e&&e()},d.markerTemplate=c.tracking.markerTemplate||null,d.realtime=c.tracking.realtime||!1,d.legend=c.tracking.legend||!1,d.eventText=c.tracking.eventText||!1,d.timeIntervals=t,d.onTrackingOptionChange=function(){d.hideAll(),s={gps:"all"===d.trackingOption||"gps"===d.trackingOption,gsm:"all"===d.trackingOption||"gsm"===d.trackingOption},d.map.tracker.activate(d.deviceId,s)},d.showTrackingOptions=!1,m.detail(d.deviceId).then(a.getResData).then(l.gsmTrackingAvailable).then(function(e){d.showTrackingOptions=e}),d.trackingOption="all",e.$on("search",function(){d.hideAll();var e=d.dateFrom,t=d.dateTo;d.map.tracker.changeInterval({dateFrom:e&&moment(e).format(a.dateFullFormat),dateTo:t&&moment(t).format(a.dateFullFormat)}).then(function(){d.map.tracker.activate(d.deviceId,s)})})}e.$inject=["$scope","$routeParams","$filter","c8yBase","c8yGeo","gettext","c8yConfig","c8yApplication","c8yDevices","c8yCombain"],angular.module("c8y.parts.tracking").controller("trackingCtrl",e)}();
@@ -1,19 +0,0 @@
1
- {
2
- "name": "AssetTrack",
3
- "ngModules": [
4
- "c8y.parts.tracking"
5
- ],
6
- "category": "Verticals",
7
- "icon": "home",
8
- "color": "#F03F0F",
9
- "description": "View the historic locations of a device, browser its trace for a given time period. This plugin contributes a new view to the device details.",
10
- "js": [
11
- "index.js",
12
- "controllers/tracking.js",
13
- "controllers/config.js"
14
- ],
15
- "folderName": "tracking",
16
- "appsInclude": [
17
- "devicemanagement"
18
- ]
19
- }
@@ -1 +0,0 @@
1
- "use strict";!function(){function e(e,i){e.when("/device/:deviceId",{name:i("Tracking"),templateUrl:":::PLUGIN_PATH:::/views/index.html",icon:"crosshairs",showIf:["$routeParams","c8yDevices",function(e,i){e=e.deviceId;return i.detailCached(e).then(function(e){e=e.data;return e&&e.c8y_Position})}]})}e.$inject=["c8yViewsProvider","gettext"],angular.module("c8y.parts.tracking",[]).config(e)}();
@@ -1,102 +0,0 @@
1
- <div ng-controller="trackingCtrl as ctrl">
2
- <c8y-ui-action-bar-set>
3
- <c8y-realtime-switch
4
- get-state="ctrl.map.state()"
5
- on-start="ctrl.map.startRt()"
6
- on-stop="ctrl.map.stopRt()"
7
- ></c8y-realtime-switch>
8
-
9
- <li class="navbar-form">
10
- <form class="form-inline">
11
- <div class="c8y-select-wrapper" ng-if="ctrl.showTrackingOptions">
12
- <select
13
- class="form-control"
14
- ng-model="ctrl.trackingOption"
15
- ng-change="ctrl.onTrackingOptionChange()"
16
- >
17
- <option value="all" translate>Show all data</option>
18
- <option value="gps" translate>Show GPS data only</option>
19
- <option value="gsm" translate>Show GSM data only</option>
20
- </select>
21
- <span></span>
22
- </div>
23
- <c8y-time-interval date-from="ctrl.dateFrom" date-to="ctrl.dateTo"></c8y-time-interval>
24
- </form>
25
- </li>
26
- </c8y-ui-action-bar-set>
27
-
28
- <div class="card content-fullpage card--grid grid__col--8-4--md">
29
- <div
30
- class="p-relative"
31
- style="min-height: 30vh"
32
- c8y-map-internal
33
- map="ctrl.map"
34
- marker-template="ctrl.markerTemplate"
35
- c8y-legend="ctrl.legend"
36
- device-id="ctrl.deviceId"
37
- realtime="ctrl.realtime"
38
- ></div>
39
- <div class="d-flex d-col bg-inherit content-fullpage">
40
- <div class="card-header separator">
41
- <div class="card-title" translate>Tracking events</div>
42
- </div>
43
- <div class="inner-scroll">
44
- <div class="card-block" ng-show="ctrl.events().length == 0">
45
- <div class="c8y-empty-state text-left">
46
- <div class="h1 c8y-icon c8y-icon-location c8y-icon-duocolor"></div>
47
- <p>{{ 'No tracking events found' | translate }}</p>
48
- </div>
49
- </div>
50
-
51
- <div class="card-block p-t-0 p-b-0">
52
- <div class="list-group">
53
- <div
54
- class="list-group-item d-flex p-l-0 p-r-0"
55
- ng-repeat="event in ctrl.events()"
56
- ng-class="{ 'text-info': !!ctrl.markers['p' + $index] }"
57
- ng-click="ctrl.toggle($index, event)"
58
- >
59
- <div class="list-item-icon">
60
- <i c8y-icon="c8y-location"></i>
61
- </div>
62
- <div class="list-item-body">
63
- <div class="d-flex">
64
- <span class="m-r-8">
65
- {{ event.time | date: 'mediumDate' }}
66
- </span>
67
- <span class="m-l-auto">
68
- {{ event.time | date: 'mediumTime' }}
69
- </span>
70
- </div>
71
-
72
- <span ng-if="ctrl.eventText">{{ event.text }}</span>
73
- </div>
74
- </div>
75
- </div>
76
- </div>
77
- </div>
78
- <div>
79
- <button
80
- type="button"
81
- title="{{ 'Load more' | translate }}"
82
- class="btn btn-link fit-w sticky-bottom separator-top"
83
- ng-click="ctrl.loadMore()"
84
- ng-if="ctrl.hasLoadMore()"
85
- >
86
- {{ 'Load more' | translate }}
87
- </button>
88
- </div>
89
- <div class="card-footer separator" ng-show="ctrl.events().length">
90
- <button
91
- title="{{ 'Deselect all markers' | translate }}"
92
- type="button"
93
- class="btn btn-default"
94
- ng-disabled="ctrl.noMarkers"
95
- ng-click="ctrl.hideAll()"
96
- >
97
- {{ 'Deselect all markers' | translate }}
98
- </button>
99
- </div>
100
- </div>
101
- </div>
102
- </div>