@c8y/ng1-modules 1023.14.128 → 1023.14.131
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.
- package/core/locales/de.po +6 -0
- package/core/locales/es.po +6 -0
- package/core/locales/fr.po +6 -0
- package/core/locales/ja_JP.po +6 -0
- package/core/locales/ko.po +6 -0
- package/core/locales/nl.po +6 -0
- package/core/locales/pl.po +6 -0
- package/core/locales/pt_BR.po +6 -0
- package/core/locales/zh_CN.po +6 -0
- package/core/locales/zh_TW.po +6 -0
- package/core/ui/directives/map2.js +1 -1
- package/core/ui/leaflet/leaflet-directive.decorator.js +1 -1
- package/package.json +1 -1
- package/scada/index.js +1 -1
- package/scada/widget.controller.js +1 -1
package/core/locales/de.po
CHANGED
|
@@ -12704,6 +12704,9 @@ msgstr "Eigenschaftsbibliothek"
|
|
|
12704
12704
|
msgid "Property"
|
|
12705
12705
|
msgstr "Eigenschaft"
|
|
12706
12706
|
|
|
12707
|
+
msgid "Property configured for a different asset. Reconfigure to match current asset."
|
|
12708
|
+
msgstr "Die Eigenschaft wurde für ein anderes Asset konfiguriert. Bitte passen Sie die Konfiguration an das aktuelle Asset an."
|
|
12709
|
+
|
|
12707
12710
|
msgid "Property deleted."
|
|
12708
12711
|
msgstr "Eigenschaft gelöscht."
|
|
12709
12712
|
|
|
@@ -15294,6 +15297,9 @@ msgstr "Zeige folgende Checkboxen"
|
|
|
15294
15297
|
msgid "Show cleared alarms"
|
|
15295
15298
|
msgstr "Aufgehobene Alarme anzeigen"
|
|
15296
15299
|
|
|
15300
|
+
msgid "Show controls directly in the widget view for easier access."
|
|
15301
|
+
msgstr "Zeige die Steuerungen direkt in der Widget-Ansicht an, um den Zugriff zu vereinfachen."
|
|
15302
|
+
|
|
15297
15303
|
msgid "Show data point"
|
|
15298
15304
|
msgstr "Datenpunkt anzeigen"
|
|
15299
15305
|
|
package/core/locales/es.po
CHANGED
|
@@ -12672,6 +12672,9 @@ msgstr "Biblioteca de propiedades"
|
|
|
12672
12672
|
msgid "Property"
|
|
12673
12673
|
msgstr "Propiedad"
|
|
12674
12674
|
|
|
12675
|
+
msgid "Property configured for a different asset. Reconfigure to match current asset."
|
|
12676
|
+
msgstr "La propiedad está configurada para un activo diferente. Reconfigúrala para que coincida con el activo actual."
|
|
12677
|
+
|
|
12675
12678
|
msgid "Property deleted."
|
|
12676
12679
|
msgstr "Propiedad eliminada."
|
|
12677
12680
|
|
|
@@ -15263,6 +15266,9 @@ msgstr "Mostrar las casillas de verificación que son"
|
|
|
15263
15266
|
msgid "Show cleared alarms"
|
|
15264
15267
|
msgstr "Mostrar alarmas eliminadas"
|
|
15265
15268
|
|
|
15269
|
+
msgid "Show controls directly in the widget view for easier access."
|
|
15270
|
+
msgstr "Mostrar los controles directamente en la vista del Widget para facilitar el acceso."
|
|
15271
|
+
|
|
15266
15272
|
msgid "Show data point"
|
|
15267
15273
|
msgstr "Mostrar punto de datos"
|
|
15268
15274
|
|
package/core/locales/fr.po
CHANGED
|
@@ -12705,6 +12705,9 @@ msgstr "Bibliothèque de propriétés"
|
|
|
12705
12705
|
msgid "Property"
|
|
12706
12706
|
msgstr "Propriété"
|
|
12707
12707
|
|
|
12708
|
+
msgid "Property configured for a different asset. Reconfigure to match current asset."
|
|
12709
|
+
msgstr "Propriété configurée pour un autre actif. Veuillez la reconfigurer pour qu'elle corresponde à l'actif actuel."
|
|
12710
|
+
|
|
12708
12711
|
msgid "Property deleted."
|
|
12709
12712
|
msgstr "Propriété supprimée."
|
|
12710
12713
|
|
|
@@ -15296,6 +15299,9 @@ msgstr "Afficher cases à cocher qui sont"
|
|
|
15296
15299
|
msgid "Show cleared alarms"
|
|
15297
15300
|
msgstr "Afficher les alarmes effacées"
|
|
15298
15301
|
|
|
15302
|
+
msgid "Show controls directly in the widget view for easier access."
|
|
15303
|
+
msgstr "Afficher les commandes directement dans la vue du Widget pour faciliter l'accès."
|
|
15304
|
+
|
|
15299
15305
|
msgid "Show data point"
|
|
15300
15306
|
msgstr "Afficher le point de données"
|
|
15301
15307
|
|
package/core/locales/ja_JP.po
CHANGED
|
@@ -12599,6 +12599,9 @@ msgstr "プロパティ ライブラリ"
|
|
|
12599
12599
|
msgid "Property"
|
|
12600
12600
|
msgstr "プロパティ"
|
|
12601
12601
|
|
|
12602
|
+
msgid "Property configured for a different asset. Reconfigure to match current asset."
|
|
12603
|
+
msgstr ""
|
|
12604
|
+
|
|
12602
12605
|
msgid "Property deleted."
|
|
12603
12606
|
msgstr "プロパティが削除されました。"
|
|
12604
12607
|
|
|
@@ -15189,6 +15192,9 @@ msgstr "次のチェックボックスを表示"
|
|
|
15189
15192
|
msgid "Show cleared alarms"
|
|
15190
15193
|
msgstr "クリアされたアラームを表示"
|
|
15191
15194
|
|
|
15195
|
+
msgid "Show controls directly in the widget view for easier access."
|
|
15196
|
+
msgstr ""
|
|
15197
|
+
|
|
15192
15198
|
msgid "Show data point"
|
|
15193
15199
|
msgstr "データ ポイントを表示する"
|
|
15194
15200
|
|
package/core/locales/ko.po
CHANGED
|
@@ -12675,6 +12675,9 @@ msgstr "속성 라이브러리"
|
|
|
12675
12675
|
msgid "Property"
|
|
12676
12676
|
msgstr "속성"
|
|
12677
12677
|
|
|
12678
|
+
msgid "Property configured for a different asset. Reconfigure to match current asset."
|
|
12679
|
+
msgstr "이 속성은 다른 자산에 대해 설정된 것입니다. 현재 자산에 맞게 재설정하십시오."
|
|
12680
|
+
|
|
12678
12681
|
msgid "Property deleted."
|
|
12679
12682
|
msgstr "속성이 삭제되었습니다."
|
|
12680
12683
|
|
|
@@ -15266,6 +15269,9 @@ msgstr "다음 확인란 표시"
|
|
|
15266
15269
|
msgid "Show cleared alarms"
|
|
15267
15270
|
msgstr "해제된 알람 표시"
|
|
15268
15271
|
|
|
15272
|
+
msgid "Show controls directly in the widget view for easier access."
|
|
15273
|
+
msgstr "위젯 뷰에 제어를 직접 표시하여 더 쉽게 접근할 수 있도록 합니다."
|
|
15274
|
+
|
|
15269
15275
|
msgid "Show data point"
|
|
15270
15276
|
msgstr "데이터 요소 표시"
|
|
15271
15277
|
|
package/core/locales/nl.po
CHANGED
|
@@ -12702,6 +12702,9 @@ msgstr "Eigenschappenbibliotheek"
|
|
|
12702
12702
|
msgid "Property"
|
|
12703
12703
|
msgstr "Eigenschap"
|
|
12704
12704
|
|
|
12705
|
+
msgid "Property configured for a different asset. Reconfigure to match current asset."
|
|
12706
|
+
msgstr "Dit object heeft een andere eigenschap dan het huidige bedrijfsmiddel. Pas de configuratie aan zodat deze overeenkomt met het actuele bedrijfsmiddel."
|
|
12707
|
+
|
|
12705
12708
|
msgid "Property deleted."
|
|
12706
12709
|
msgstr "Eigenschap verwijderd."
|
|
12707
12710
|
|
|
@@ -15293,6 +15296,9 @@ msgstr "Selectievakjes weergeven die zijn"
|
|
|
15293
15296
|
msgid "Show cleared alarms"
|
|
15294
15297
|
msgstr "Gewiste alarmen tonen"
|
|
15295
15298
|
|
|
15299
|
+
msgid "Show controls directly in the widget view for easier access."
|
|
15300
|
+
msgstr "Weergeef de besturingen direct in de Widget-weergave, zodat ze gemakkelijker toegankelijk zijn."
|
|
15301
|
+
|
|
15296
15302
|
msgid "Show data point"
|
|
15297
15303
|
msgstr "Gegevenspunt weergeven"
|
|
15298
15304
|
|
package/core/locales/pl.po
CHANGED
|
@@ -12746,6 +12746,9 @@ msgstr "Biblioteka właściwości"
|
|
|
12746
12746
|
msgid "Property"
|
|
12747
12747
|
msgstr "Właściwość"
|
|
12748
12748
|
|
|
12749
|
+
msgid "Property configured for a different asset. Reconfigure to match current asset."
|
|
12750
|
+
msgstr "Właściwość skonfigurowana dla innego zasobu. Należy ją ponownie skonfigurować tak, aby odpowiadała bieżącemu zasobowi."
|
|
12751
|
+
|
|
12749
12752
|
msgid "Property deleted."
|
|
12750
12753
|
msgstr "Usunięto właściwość."
|
|
12751
12754
|
|
|
@@ -15337,6 +15340,9 @@ msgstr "Pokaż pola wyboru, które są"
|
|
|
15337
15340
|
msgid "Show cleared alarms"
|
|
15338
15341
|
msgstr "Pokaż wyczyszczone alarmy"
|
|
15339
15342
|
|
|
15343
|
+
msgid "Show controls directly in the widget view for easier access."
|
|
15344
|
+
msgstr "Pokaż elementy sterujące bezpośrednio w widoku widżetu, aby ułatwić dostęp."
|
|
15345
|
+
|
|
15340
15346
|
msgid "Show data point"
|
|
15341
15347
|
msgstr "Pokaż punkt danych"
|
|
15342
15348
|
|
package/core/locales/pt_BR.po
CHANGED
|
@@ -12699,6 +12699,9 @@ msgstr "Biblioteca de propriedades"
|
|
|
12699
12699
|
msgid "Property"
|
|
12700
12700
|
msgstr "Propriedade"
|
|
12701
12701
|
|
|
12702
|
+
msgid "Property configured for a different asset. Reconfigure to match current asset."
|
|
12703
|
+
msgstr "A propriedade está configurada para um ativo diferente. Reconfigure-a para corresponder ao ativo atual."
|
|
12704
|
+
|
|
12702
12705
|
msgid "Property deleted."
|
|
12703
12706
|
msgstr "Propriedade excluída."
|
|
12704
12707
|
|
|
@@ -15290,6 +15293,9 @@ msgstr "Mostrar caixas de verificação que estão"
|
|
|
15290
15293
|
msgid "Show cleared alarms"
|
|
15291
15294
|
msgstr "Mostrar alarmes apagados"
|
|
15292
15295
|
|
|
15296
|
+
msgid "Show controls directly in the widget view for easier access."
|
|
15297
|
+
msgstr "Mostrar os controles diretamente na visualização do Widget para facilitar o acesso."
|
|
15298
|
+
|
|
15293
15299
|
msgid "Show data point"
|
|
15294
15300
|
msgstr "Mostrar ponto de dados"
|
|
15295
15301
|
|
package/core/locales/zh_CN.po
CHANGED
|
@@ -12681,6 +12681,9 @@ msgstr "属性库"
|
|
|
12681
12681
|
msgid "Property"
|
|
12682
12682
|
msgstr "属性"
|
|
12683
12683
|
|
|
12684
|
+
msgid "Property configured for a different asset. Reconfigure to match current asset."
|
|
12685
|
+
msgstr "该属性配置的资产不正确。请重新配置以匹配当前资产。"
|
|
12686
|
+
|
|
12684
12687
|
msgid "Property deleted."
|
|
12685
12688
|
msgstr "已删除属性。"
|
|
12686
12689
|
|
|
@@ -15272,6 +15275,9 @@ msgstr "显示符合以下条件的复选框:"
|
|
|
15272
15275
|
msgid "Show cleared alarms"
|
|
15273
15276
|
msgstr "显示清除的警报"
|
|
15274
15277
|
|
|
15278
|
+
msgid "Show controls directly in the widget view for easier access."
|
|
15279
|
+
msgstr "在小小组件视图中直接显示控制,以便于操作。"
|
|
15280
|
+
|
|
15275
15281
|
msgid "Show data point"
|
|
15276
15282
|
msgstr "显示数据点"
|
|
15277
15283
|
|
package/core/locales/zh_TW.po
CHANGED
|
@@ -12688,6 +12688,9 @@ msgstr "属性库"
|
|
|
12688
12688
|
msgid "Property"
|
|
12689
12689
|
msgstr "属性"
|
|
12690
12690
|
|
|
12691
|
+
msgid "Property configured for a different asset. Reconfigure to match current asset."
|
|
12692
|
+
msgstr "此属性已针对其他资产进行设置。请重新设置以符合当前资产。"
|
|
12693
|
+
|
|
12691
12694
|
msgid "Property deleted."
|
|
12692
12695
|
msgstr "已删除属性。"
|
|
12693
12696
|
|
|
@@ -15279,6 +15282,9 @@ msgstr "顯示符合以下条件的复选框:"
|
|
|
15279
15282
|
msgid "Show cleared alarms"
|
|
15280
15283
|
msgstr "顯示清除的警报"
|
|
15281
15284
|
|
|
15285
|
+
msgid "Show controls directly in the widget view for easier access."
|
|
15286
|
+
msgstr "將控制項直接顯示在小组件視圖中,以便於存取。"
|
|
15287
|
+
|
|
15282
15288
|
msgid "Show data point"
|
|
15283
15289
|
msgstr "顯示資料點"
|
|
15284
15290
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function ownKeys(t,e){var n,r=Object.keys(t);return Object.getOwnPropertySymbols&&(n=Object.getOwnPropertySymbols(t),e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)),r}function _objectSpread(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?ownKeys(Object(n),!0).forEach(function(e){_defineProperty(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):ownKeys(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function _defineProperty(e,t,n){return(t=_toPropertyKey(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _toPropertyKey(e){e=_toPrimitive(e,"string");return"symbol"==_typeof(e)?e:e+""}function _toPrimitive(e,t){if("object"!=_typeof(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);n=n.call(e,t||"default");if("object"!=_typeof(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}function _typeof(e){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}(()=>{function e(E,D,T,e,t,n,M,$,A,r,R,U,a,B,I,z,x,F,K){return o.$inject=["$scope","$element"],{restrict:"EA",templateUrl:":::PLUGIN_PATH:::/ui/views/map2.html",scope:{multipleDevices:"&",realtime:"&",cssClass:"@",deviceId:"&",config:"&",markerTemplate:"&",controlButtons:"&",noDataFetch:"&",map:"=?",c8yLegend:"&"},link:function(e){e.$on("dashboard-change",function(){e.map&&e.map.leafletMap&&e.map.leafletMap.invalidateSize()})},controller:o};function o(i,e){var n,t={padding:[50,50]},c=[],s=!1,l=z("The map widget displays up to {{count}} devices."),r={mapCustomBaseLayers:A.getPluginService("mapCustomBaseLayers"),ecbPositionSelector:A.getPluginService("ecbPositionSelector"),mapMarkerClusterer:A.getPluginService("mapMarkerClusterer")},u=(i.map=this,e.addClass(i.cssClass),L.map(e.find(".c8y-map-internal").get(0),{attributionControl:!1}).fitBounds(L.latLngBounds(L.latLng(14,-130.3),L.latLng(53.9,112.3)))),e=(i.map.leafletMap=u,L.Browser.mobile&&(e=z("Use two fingers to move the map."),u.dragging.disable(),u._container.setAttribute("data-touch-warning-content",x.getString(e)),u._container.addEventListener("touchstart",f),u._container.addEventListener("touchmove",f),u._container.addEventListener("touchend",f),u._container.addEventListener("touchcancel",f),u._container.addEventListener("click",f)),i.map.event=i.$new(!0),i.map.markers=c,L.tileLayer("//{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",{noWrap:!0})),a=(e.addTo(u),r.mapMarkerClusterer&&r.mapMarkerClusterer.applyClustering({mapInternalScope:i}),i.map.tracker=new R.Tracker(i),i.tracker=i.map.tracker,i.tracker.onPaths(function(e,t){n&&u.removeLayer(n);(n=e).addTo(u),t&&y(n.getBounds())}),i.$on("$destroy",function(){i.cleanRealtime&&i.cleanRealtime(),s=!0,L.Browser.mobile&&(u._container.removeEventListener("touchstart",f),u._container.removeEventListener("touchmove",f),u._container.removeEventListener("touchend",f),u._container.removeEventListener("touchcancel",f),u._container.removeEventListener("click",f))}),L.Control.extend({options:{position:"topright"},onAdd:function(){var e=L.DomUtil.create("div");return angular.element(e).html('\n <c8y-realtime-switch\n ng-if="!realtime()"\n get-state="state()"\n on-start="startRt()"\n on-stop="stopRt()"\n ></c8y-realtime-switch>\n <c8y-refresh-btn></c8y-refresh-btn>\n '),D(e)(i),e}})),o=L.Control.extend({options:{position:"bottomright"},onAdd:function(){var e=L.DomUtil.create("div");return angular.element(e).html("<div c8y-map-legend></div>"),D(e)(i),e}}),e=L.control.layers({OSM:e}),p=i.map.layersControl=e,d=u,e=I.getBaseLayers(i.map),m=I.getOverlays(i.map),g=E.reject();function f(e){for(var t=["leaflet-control-minimap","leaflet-interactive","leaflet-popup-content","leaflet-popup-content-wrapper","leaflet-popup-close-button","leaflet-control-zoom-in","leaflet-control-zoom-out"],n=!1,r=0;r<t.length;r++)L.DomUtil.hasClass(e.target,t[r])&&(n=!0);n?L.DomUtil.hasClass(e.target,"leaflet-interactive")&&"touchmove"===e.type&&1===e.touches.length?(L.DomUtil.addClass(u._container,"touch-warning"),u.dragging.disable()):L.DomUtil.removeClass(u._container,"touch-warning"):"touchmove"!==e.type&&"touchstart"!==e.type?L.DomUtil.removeClass(u._container,"touch-warning"):1===e.touches.length?(L.DomUtil.addClass(u._container,"touch-warning"),u.dragging.disable()):(u.dragging.enable(),L.DomUtil.removeClass(u._container,"touch-warning"))}function v(){var e=i.deviceId(),e=e?(e=>e=_.isArray(e)?h(e):e&&i.multipleDevices()?h((e=>({__or:[{__and:[{__or:[{id:e},{__bygroupid:e}]},{__has:"".concat(U.c8y_Position,".lat")},{__has:"".concat(U.c8y_Position,".lng")}]}]}))(e)):e?h([e]):h())(e):h();return e.then(function(e){i.tracker.getActiveDeviceIds().length||y(e.getBounds())})}function y(e){e&&e.isValid()&&u.fitBounds(e,t)}function h(t){function a(e){var n,r;return e.then(function(e){var t=e.statistics;return n=e.paging.next,r=t.pageSize,e}).then(function(e){return _(e).filter(function(e){var t=U.getLocationFragment(e);return!(!t||180<Math.abs(t.lng)||90<Math.abs(t.lat))||(console.warn("Device ".concat(e.name," has an invalid position!")),!1)}).reduce(function(e,t){return e[t.id]=t,e},{})}).then(function(e){return o=((e,t,n)=>{var e=_objectSpread({},e),r=Object.keys(e).length;return e=r+Object.keys(t).length<=n?_objectSpread(_objectSpread({},e),t):(C()||F.info(x.getString(l,{count:n})),t=Object.entries(t).filter(function(e,t){return void 0!==e&&t+r<n}).reduce(function(e,t){return e[t[0]]=t[1],e},{}),_objectSpread(_objectSpread({},e),t))})(o,e,r),Object.keys(o).length<r&&n&&!s&&a(n()),Object.keys(o).length>=r&&n&&!C()&&F.info(x.getString(l,{count:r})),o}).then(function(e){i.devices=[],_.forEach(c,function(e){u.removeLayer(e)}),c.length=0,i.devices=e,_.forEach(e,function(e){var t=b(e),n=U.getLocationFragment(e),r=L.marker(L.latLng(n.lat,n.lng),{icon:t});r.on("click",function(){r.isPopupOpen()&&r.getPopup()||P(e,r)}),r.id=e.id,c.push(r)});e=new L.featureGroup(c);return e.addTo(u),e}).then(function(e){return i.map.event.$broadcast("refresh",t),e}).then(function(e){i.tracker.getActiveDeviceIds().length||y(e.getBounds())})}var e,n,o={};return i.noDataFetch()?E.reject():(delete i.filterIds,r.ecbPositionSelector?e=r.ecbPositionSelector.getPositionedDevicesByEvents():(e=t&&"object"===_typeof(t)&&!_.isArray(t)?M.listQuery(t,{pageSize:O()}):t&&t.length?(n=_.uniq(t),function t(e){var n=O();var r=_.take(e,n);var a=_.drop(e,n);return M.list({ids:r.join(","),pageSize:n}).then(function(e){return a.length&&(e.paging.next=function(){return t(a)}),e})}(i.filterIds=n)):(n={__or:[{__and:[{__has:"".concat(U.c8y_Position,".lat")},{__has:"".concat(U.c8y_Position,".lng")}]}]},M.listQuery(n,{pageSize:O()})),S()),a(e))}function b(e){var t=e.c8y_ActiveAlarmsStatus||{},e=_.find(["critical","major","minor","warning"],function(e){return t[e]})||"normal";return L.divIcon({className:"".concat(e,"-marker-icon"),iconSize:[25,41],iconAnchor:[12.5,41]})}function P(e,a){var n;n=e,e={fragmentType:"c8y_Position",dateFrom:"1970-01-01",dateTo:moment().add(1,"days").format("YYYY-MM-DD"),pageSize:1,source:n.id},B.list(e).then(function(e){var e=e.length?e[0].time:void 0,t=n;return i.markerTemplate()||(i.markerTemplate=k),e=T("absoluteDate")(e),t='\n <div\n c8y-map-marker\n i-mo="devices['.concat(t.id,']"\n i-template="markerTemplate()"\n i-tracker="tracker"\n last-updated="\'').concat(e,"'\"\n ></div>\n "),e=angular.element(t),D(e)(i),e.get(0)}).then(function(e){var t=a,n=t.getPopup(),r=n||L.popup({minWidth:120});return t.bindPopup(r,{offset:L.point(0,-20)}),r.setContent(e),n||t.openPopup(),r})}function k(){return"<div ng-include=\"'".concat(K,"'\"></div>")}function S(){var e=i.realtimeChannel,t="/managedobjects/*",n=i.filterIds,r=i.deviceId();if((n=r&&!n?[r]:n)&&(t="/managedobjects/".concat(n.join(","))),e){if(e===t)return;i.cleanRealtime()}e=t,i.realtimeChannel=e,$.addListener.bind($,i.$id,e)("UPDATE",function(e,t){var n,r=U.getLocationFragment(t);r&&((n=_.find(c,{id:t.id}))&&(n.setLatLng(L.latLng(r.lat,r.lng)),n.setIcon(b(t)),r=n.getPopup())&&r._isOpen&&P(t,n),i.devices&&i.devices[t.id]&&(i.devices[t.id]=t),i.map.event.$broadcast("realtime",t))}),i.cleanRealtime=function(){$.removeSubscriber(i.$id,e)},i.map.state=function(){return $.getStatus(i.$id,e)},i.map.startRt=function(){i.noDataFetch()||($.start(i.$id,e),i.tracker.state)||i.tracker.start()},i.map.stopRt=function(){$.stop(i.$id,e),i.tracker.state&&i.tracker.stop()},_.assign(i,{state:i.map.state,startRt:i.map.startRt,stopRt:i.map.stopRt}),i.realtime()&&!j()&&i.startRt()}function w(e){return _.get(window,"C8Y_APP.".concat(e))}function j(){return w("mapWidgetRealtimeDisabled")}function O(){var e=w("mapWidgetPageSize");return e&&!_.isNaN(e)?e:100}function C(){return w("mapWidgetHideMaxDeviceOnMapHint")}r.mapCustomBaseLayers&&(g=r.mapCustomBaseLayers.create({google:!0,here:!0,bing:!0,googleSatellite:!0,hereSatellite:!0,bingSatellite:!0})),E.any(_.values(e).concat(g,_.values(m))).then(function(e){_.isEmpty(e)||p.addTo(d)}),_.forEach(e,function(e,t){e.then(function(e){p.addBaseLayer(e,t)})}),g.then(function(e){_.forEach(e,function(e){p.addBaseLayer(e.layer,e.name)})}),I.getUserOverlayPreferences().then(function(n){_.forEach(m,function(e,t){e.then(function(e){p.addOverlay(e,t),n[t]&&d.addLayer(e)})})}),u.on("overlayadd",function(e){I.setUserOverlayPreference(e,!0)}),u.on("overlayremove",function(e){I.setUserOverlayPreference(e,!1)}),i.controlButtons()&&u.addControl(new a),i.c8yLegend()&&u.addControl(new o),i.paging={refresh:!0},i.refresh=v,S(),i.$watch("deviceId()",v),i.$watch("noDataFetch()",function(e){e?i.stopRt():j()||i.startRt()})}}function t(n){return{restrict:"EA",scope:{iMo:"&",iTemplate:"&",iTracker:"&",lastUpdated:"="},link:function(t,e){_.assign(t,{mo:t.iMo(),tracker:_.defaults(t.iTracker(),{__gps:!1,__gsm:!1}),onTrackingChange:function(e){t.tracker.__gps||t.tracker.__gsm?t.tracker.activate(e,{gps:t.tracker.__gps,gsm:t.tracker.__gsm}):t.tracker.deactivate(e)}}),t.showTrackingOptions=!1,e.html(t.iTemplate()),n(e.contents())(t)}}}t.$inject=["$compile"],e.$inject=["$q","$compile","$filter","$http","$timeout","$injector","c8yInventory","c8yRealtime","c8yBase","c8yGroups","c8yTracker","c8yGeo","c8yApplication","c8yEvents","c8yMapConfig","gettext","gettextCatalog","c8yAlert","MARKER_TEMPLATE"],angular.module("c8y.ui").constant("MARKER_TEMPLATE",":::PLUGIN_PATH:::/ui/views/map2-markerTemplate.html").directive("c8yMapInternal",e).directive("c8yMapMarker",t).directive("c8yMapLegend",function(){return{restrict:"EA",templateUrl:":::PLUGIN_PATH:::/ui/views/map2-legend.html"}})})();
|
|
1
|
+
function ownKeys(t,e){var n,r=Object.keys(t);return Object.getOwnPropertySymbols&&(n=Object.getOwnPropertySymbols(t),e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)),r}function _objectSpread(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?ownKeys(Object(n),!0).forEach(function(e){_defineProperty(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):ownKeys(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function _defineProperty(e,t,n){return(t=_toPropertyKey(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _toPropertyKey(e){e=_toPrimitive(e,"string");return"symbol"==_typeof(e)?e:e+""}function _toPrimitive(e,t){if("object"!=_typeof(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);n=n.call(e,t||"default");if("object"!=_typeof(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}function _typeof(e){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}(()=>{function e(E,D,T,e,t,n,M,$,A,r,R,U,a,B,I,z,x,F,K){return o.$inject=["$scope","$element"],{restrict:"EA",templateUrl:":::PLUGIN_PATH:::/ui/views/map2.html",scope:{multipleDevices:"&",realtime:"&",cssClass:"@",deviceId:"&",config:"&",markerTemplate:"&",controlButtons:"&",noDataFetch:"&",map:"=?",c8yLegend:"&"},link:function(e){e.$on("dashboard-change",function(){e.map&&e.map.leafletMap&&e.map.leafletMap.invalidateSize()})},controller:o};function o(i,e){var n,t={padding:[50,50]},c=[],s=!1,l=z("The map widget displays up to {{count}} devices."),r={mapCustomBaseLayers:A.getPluginService("mapCustomBaseLayers"),ecbPositionSelector:A.getPluginService("ecbPositionSelector"),mapMarkerClusterer:A.getPluginService("mapMarkerClusterer")},u=(i.map=this,e.addClass(i.cssClass),L.map(e.find(".c8y-map-internal").get(0),{attributionControl:!1}).fitBounds(L.latLngBounds(L.latLng(14,-130.3),L.latLng(53.9,112.3)))),e=(i.map.leafletMap=u,L.Browser.mobile&&(e=z("Use two fingers to move the map."),u.dragging.disable(),u._container.setAttribute("data-touch-warning-content",x.getString(e)),u._container.addEventListener("touchstart",f),u._container.addEventListener("touchmove",f),u._container.addEventListener("touchend",f),u._container.addEventListener("touchcancel",f),u._container.addEventListener("click",f)),i.map.event=i.$new(!0),i.map.markers=c,L.tileLayer("//{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",{noWrap:!0,referrerPolicy:"strict-origin-when-cross-origin"})),a=(e.addTo(u),r.mapMarkerClusterer&&r.mapMarkerClusterer.applyClustering({mapInternalScope:i}),i.map.tracker=new R.Tracker(i),i.tracker=i.map.tracker,i.tracker.onPaths(function(e,t){n&&u.removeLayer(n);(n=e).addTo(u),t&&y(n.getBounds())}),i.$on("$destroy",function(){i.cleanRealtime&&i.cleanRealtime(),s=!0,L.Browser.mobile&&(u._container.removeEventListener("touchstart",f),u._container.removeEventListener("touchmove",f),u._container.removeEventListener("touchend",f),u._container.removeEventListener("touchcancel",f),u._container.removeEventListener("click",f))}),L.Control.extend({options:{position:"topright"},onAdd:function(){var e=L.DomUtil.create("div");return angular.element(e).html('\n <c8y-realtime-switch\n ng-if="!realtime()"\n get-state="state()"\n on-start="startRt()"\n on-stop="stopRt()"\n ></c8y-realtime-switch>\n <c8y-refresh-btn></c8y-refresh-btn>\n '),D(e)(i),e}})),o=L.Control.extend({options:{position:"bottomright"},onAdd:function(){var e=L.DomUtil.create("div");return angular.element(e).html("<div c8y-map-legend></div>"),D(e)(i),e}}),e=L.control.layers({OSM:e}),p=i.map.layersControl=e,d=u,e=I.getBaseLayers(i.map),m=I.getOverlays(i.map),g=E.reject();function f(e){for(var t=["leaflet-control-minimap","leaflet-interactive","leaflet-popup-content","leaflet-popup-content-wrapper","leaflet-popup-close-button","leaflet-control-zoom-in","leaflet-control-zoom-out"],n=!1,r=0;r<t.length;r++)L.DomUtil.hasClass(e.target,t[r])&&(n=!0);n?L.DomUtil.hasClass(e.target,"leaflet-interactive")&&"touchmove"===e.type&&1===e.touches.length?(L.DomUtil.addClass(u._container,"touch-warning"),u.dragging.disable()):L.DomUtil.removeClass(u._container,"touch-warning"):"touchmove"!==e.type&&"touchstart"!==e.type?L.DomUtil.removeClass(u._container,"touch-warning"):1===e.touches.length?(L.DomUtil.addClass(u._container,"touch-warning"),u.dragging.disable()):(u.dragging.enable(),L.DomUtil.removeClass(u._container,"touch-warning"))}function v(){var e=i.deviceId(),e=e?(e=>e=_.isArray(e)?h(e):e&&i.multipleDevices()?h((e=>({__or:[{__and:[{__or:[{id:e},{__bygroupid:e}]},{__has:"".concat(U.c8y_Position,".lat")},{__has:"".concat(U.c8y_Position,".lng")}]}]}))(e)):e?h([e]):h())(e):h();return e.then(function(e){i.tracker.getActiveDeviceIds().length||y(e.getBounds())})}function y(e){e&&e.isValid()&&u.fitBounds(e,t)}function h(t){function a(e){var n,r;return e.then(function(e){var t=e.statistics;return n=e.paging.next,r=t.pageSize,e}).then(function(e){return _(e).filter(function(e){var t=U.getLocationFragment(e);return!(!t||180<Math.abs(t.lng)||90<Math.abs(t.lat))||(console.warn("Device ".concat(e.name," has an invalid position!")),!1)}).reduce(function(e,t){return e[t.id]=t,e},{})}).then(function(e){return o=((e,t,n)=>{var e=_objectSpread({},e),r=Object.keys(e).length;return e=r+Object.keys(t).length<=n?_objectSpread(_objectSpread({},e),t):(C()||F.info(x.getString(l,{count:n})),t=Object.entries(t).filter(function(e,t){return void 0!==e&&t+r<n}).reduce(function(e,t){return e[t[0]]=t[1],e},{}),_objectSpread(_objectSpread({},e),t))})(o,e,r),Object.keys(o).length<r&&n&&!s&&a(n()),Object.keys(o).length>=r&&n&&!C()&&F.info(x.getString(l,{count:r})),o}).then(function(e){i.devices=[],_.forEach(c,function(e){u.removeLayer(e)}),c.length=0,i.devices=e,_.forEach(e,function(e){var t=b(e),n=U.getLocationFragment(e),r=L.marker(L.latLng(n.lat,n.lng),{icon:t});r.on("click",function(){r.isPopupOpen()&&r.getPopup()||P(e,r)}),r.id=e.id,c.push(r)});e=new L.featureGroup(c);return e.addTo(u),e}).then(function(e){return i.map.event.$broadcast("refresh",t),e}).then(function(e){i.tracker.getActiveDeviceIds().length||y(e.getBounds())})}var e,n,o={};return i.noDataFetch()?E.reject():(delete i.filterIds,r.ecbPositionSelector?e=r.ecbPositionSelector.getPositionedDevicesByEvents():(e=t&&"object"===_typeof(t)&&!_.isArray(t)?M.listQuery(t,{pageSize:O()}):t&&t.length?(n=_.uniq(t),function t(e){var n=O();var r=_.take(e,n);var a=_.drop(e,n);return M.list({ids:r.join(","),pageSize:n}).then(function(e){return a.length&&(e.paging.next=function(){return t(a)}),e})}(i.filterIds=n)):(n={__or:[{__and:[{__has:"".concat(U.c8y_Position,".lat")},{__has:"".concat(U.c8y_Position,".lng")}]}]},M.listQuery(n,{pageSize:O()})),w()),a(e))}function b(e){var t=e.c8y_ActiveAlarmsStatus||{},e=_.find(["critical","major","minor","warning"],function(e){return t[e]})||"normal";return L.divIcon({className:"".concat(e,"-marker-icon"),iconSize:[25,41],iconAnchor:[12.5,41]})}function P(e,a){var n;n=e,e={fragmentType:"c8y_Position",dateFrom:"1970-01-01",dateTo:moment().add(1,"days").format("YYYY-MM-DD"),pageSize:1,source:n.id},B.list(e).then(function(e){var e=e.length?e[0].time:void 0,t=n;return i.markerTemplate()||(i.markerTemplate=k),e=T("absoluteDate")(e),t='\n <div\n c8y-map-marker\n i-mo="devices['.concat(t.id,']"\n i-template="markerTemplate()"\n i-tracker="tracker"\n last-updated="\'').concat(e,"'\"\n ></div>\n "),e=angular.element(t),D(e)(i),e.get(0)}).then(function(e){var t=a,n=t.getPopup(),r=n||L.popup({minWidth:120});return t.bindPopup(r,{offset:L.point(0,-20)}),r.setContent(e),n||t.openPopup(),r})}function k(){return"<div ng-include=\"'".concat(K,"'\"></div>")}function w(){var e=i.realtimeChannel,t="/managedobjects/*",n=i.filterIds,r=i.deviceId();if((n=r&&!n?[r]:n)&&(t="/managedobjects/".concat(n.join(","))),e){if(e===t)return;i.cleanRealtime()}e=t,i.realtimeChannel=e,$.addListener.bind($,i.$id,e)("UPDATE",function(e,t){var n,r=U.getLocationFragment(t);r&&((n=_.find(c,{id:t.id}))&&(n.setLatLng(L.latLng(r.lat,r.lng)),n.setIcon(b(t)),r=n.getPopup())&&r._isOpen&&P(t,n),i.devices&&i.devices[t.id]&&(i.devices[t.id]=t),i.map.event.$broadcast("realtime",t))}),i.cleanRealtime=function(){$.removeSubscriber(i.$id,e)},i.map.state=function(){return $.getStatus(i.$id,e)},i.map.startRt=function(){i.noDataFetch()||($.start(i.$id,e),i.tracker.state)||i.tracker.start()},i.map.stopRt=function(){$.stop(i.$id,e),i.tracker.state&&i.tracker.stop()},_.assign(i,{state:i.map.state,startRt:i.map.startRt,stopRt:i.map.stopRt}),i.realtime()&&!j()&&i.startRt()}function S(e){return _.get(window,"C8Y_APP.".concat(e))}function j(){return S("mapWidgetRealtimeDisabled")}function O(){var e=S("mapWidgetPageSize");return e&&!_.isNaN(e)?e:100}function C(){return S("mapWidgetHideMaxDeviceOnMapHint")}r.mapCustomBaseLayers&&(g=r.mapCustomBaseLayers.create({google:!0,here:!0,bing:!0,googleSatellite:!0,hereSatellite:!0,bingSatellite:!0})),E.any(_.values(e).concat(g,_.values(m))).then(function(e){_.isEmpty(e)||p.addTo(d)}),_.forEach(e,function(e,t){e.then(function(e){p.addBaseLayer(e,t)})}),g.then(function(e){_.forEach(e,function(e){p.addBaseLayer(e.layer,e.name)})}),I.getUserOverlayPreferences().then(function(n){_.forEach(m,function(e,t){e.then(function(e){p.addOverlay(e,t),n[t]&&d.addLayer(e)})})}),u.on("overlayadd",function(e){I.setUserOverlayPreference(e,!0)}),u.on("overlayremove",function(e){I.setUserOverlayPreference(e,!1)}),i.controlButtons()&&u.addControl(new a),i.c8yLegend()&&u.addControl(new o),i.paging={refresh:!0},i.refresh=v,w(),i.$watch("deviceId()",v),i.$watch("noDataFetch()",function(e){e?i.stopRt():j()||i.startRt()})}}function t(n){return{restrict:"EA",scope:{iMo:"&",iTemplate:"&",iTracker:"&",lastUpdated:"="},link:function(t,e){_.assign(t,{mo:t.iMo(),tracker:_.defaults(t.iTracker(),{__gps:!1,__gsm:!1}),onTrackingChange:function(e){t.tracker.__gps||t.tracker.__gsm?t.tracker.activate(e,{gps:t.tracker.__gps,gsm:t.tracker.__gsm}):t.tracker.deactivate(e)}}),t.showTrackingOptions=!1,e.html(t.iTemplate()),n(e.contents())(t)}}}t.$inject=["$compile"],e.$inject=["$q","$compile","$filter","$http","$timeout","$injector","c8yInventory","c8yRealtime","c8yBase","c8yGroups","c8yTracker","c8yGeo","c8yApplication","c8yEvents","c8yMapConfig","gettext","gettextCatalog","c8yAlert","MARKER_TEMPLATE"],angular.module("c8y.ui").constant("MARKER_TEMPLATE",":::PLUGIN_PATH:::/ui/views/map2-markerTemplate.html").directive("c8yMapInternal",e).directive("c8yMapMarker",t).directive("c8yMapLegend",function(){return{restrict:"EA",templateUrl:":::PLUGIN_PATH:::/ui/views/map2-legend.html"}})})();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(()=>{function e(e){var
|
|
1
|
+
(()=>{function e(e){var t=angular.bind(e,e.setDefaults);return e.setDefaults=function(e,r){e=_.isObjectLike(e)?e:{};return e.tileLayer||(e.tileLayer="//{s}.tile.openstreetmap.org/{z}/{x}/{y}.png"),e.referrerPolicy||(e.referrerPolicy="strict-origin-when-cross-origin"),t(e,r)},e}e.$inject=["$delegate"],angular.module("c8y.ui").decorator("leafletMapDefaults",e)})();
|
package/package.json
CHANGED
package/scada/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(()=>{function e(e,t){e.add({name:"SCADA",description:t("Display a configurable SVG."),templateUrl:":::PLUGIN_PATH:::/views/component.html",configTemplateUrl:":::PLUGIN_PATH:::/views/componentConfig.html",previewImage:":::PLUGIN_PATH:::/img/scada-widget-pr.png",transformConfigWithContext:["config","context","dashboard",function(e,t,
|
|
1
|
+
function _typeof(e){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}(()=>{function e(e,t){function c(n){n&&"object"===_typeof(n)&&(Array.isArray(n)?n.forEach(c):Object.keys(n).forEach(function(e){var t,o;"__target"===e&&n[e]&&"object"===_typeof(n[e])?(o=(t=n[e]).id,n[e]={id:o,name:t.name,c8y_IsDevice:t.c8y_IsDevice}):c(n[e])}))}e.add({name:"SCADA",description:t("Display a configurable SVG."),templateUrl:":::PLUGIN_PATH:::/views/component.html",configTemplateUrl:":::PLUGIN_PATH:::/views/componentConfig.html",previewImage:":::PLUGIN_PATH:::/img/scada-widget-pr.png",transformConfigWithContext:["config","context","dashboard",function(e,t,o){return o.deviceType&&e.deviceIds&&(e.deviceIds=_.mapValues(e.deviceIds,_.constant(t.id)),c(e)),e}],options:{groupsSelectable:!0}})}e.$inject=["c8yComponentsProvider","gettext"],angular.module("c8y.parts.scadaWidget",[]).config(e)})();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(()=>{function i(e,n,t,c,d,a,o){var r=this;function l(n){return _.find(r.devices,function(i){return n===i.id})}this.init=function(){e.child.config.deviceIds||(e.child.config.deviceIds={},_.forOwn(e.child.config.mapping,function(i,n){e.child.config.deviceIds[n]=e.child.config.device.id}));var i=_(e.child.config.deviceIds).values().uniq().map(function(i){return d.detailRealtime(i,e,function(i){i.name=t("truncate")(i.name)})}).value();n.all(i).then(function(i){r.devices=i,r.updateComputedProperties(e.child.config.deviceIds,e.child.config.mapping)}),c.detail(e.child.config.binaryId).then(function(i){r.svgFile=i.data,c.downloadAsDataUri(r.svgFile).then(c.decodeDataUri).then(function(i){return new File([i],r.svgFile.name,{type:r.svgFile.type})}).then(function(i){return o.sanitizeFileByLevel(i,e.child.config.sanitization)}).then(function(i){return c.readDataUri(i)}).then(c.decodeDataUri).then(function(i){r.svgFile.data=i})})},this.updateComputedProperties=function(i,e){i&&e&&_.forOwn(i,function(i,n){n=[e[n]];n.length&&a.attach(l(i),n)})},e.$
|
|
1
|
+
(()=>{function i(e,n,t,c,d,a,o){var i=this,r=this;function l(n){return _.find(r.devices,function(i){return n===i.id})}this.init=function(){e.child.config.deviceIds||(e.child.config.deviceIds={},_.forOwn(e.child.config.mapping,function(i,n){e.child.config.deviceIds[n]=e.child.config.device.id}));var i=_(e.child.config.deviceIds).values().uniq().map(function(i){return d.detailRealtime(i,e,function(i){i.name=t("truncate")(i.name)})}).value();n.all(i).then(function(i){r.devices=i,r.updateComputedProperties(e.child.config.deviceIds,e.child.config.mapping)}),c.detail(e.child.config.binaryId).then(function(i){r.svgFile=i.data,c.downloadAsDataUri(r.svgFile).then(c.decodeDataUri).then(function(i){return new File([i],r.svgFile.name,{type:r.svgFile.type})}).then(function(i){return o.sanitizeFileByLevel(i,e.child.config.sanitization)}).then(function(i){return c.readDataUri(i)}).then(c.decodeDataUri).then(function(i){r.svgFile.data=i})})},this.updateComputedProperties=function(i,e){i&&e&&_.forOwn(i,function(i,n){n=[e[n]];n.length&&a.attach(l(i),n)})},e.$watchGroup(["child.config.binaryId","child.config.sanitization","child.config.deviceIds"],function(){return i.init()}),e.$on("$destroy",function(){var i=_.uniq(_.values(e.child.config.deviceIds));_.forEach(i,function(i){a.detach(l(i))})})}i.$inject=["$scope","$q","$filter","c8yBinary","c8yDevices","c8yComputedProperties","c8ySanitizeHtml"],angular.module("c8y.parts.scadaWidget").controller("ScadaWidgetCtrl",i)})();
|