@c8y/ng1-modules 1023.65.2 → 1023.66.3
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/map.js +1 -1
- package/core/ui/views/map.html +1 -1
- package/map/controllers/geofenceEdit.js +1 -1
- package/package.json +1 -1
- package/smartRules/directives/smartRuleParamInputGeofence.js +1 -1
- package/smartRules/views/paramInputGeofence.html +1 -1
package/core/locales/de.po
CHANGED
|
@@ -9619,6 +9619,9 @@ msgstr "Maximale Anzahl Zeilen"
|
|
|
9619
9619
|
msgid "Last measurement"
|
|
9620
9620
|
msgstr "Letzter Messwert"
|
|
9621
9621
|
|
|
9622
|
+
msgid "Last measurement in selected time range"
|
|
9623
|
+
msgstr "Letzter Messwert im ausgewählten Zeitraum"
|
|
9624
|
+
|
|
9622
9625
|
msgid "Last message"
|
|
9623
9626
|
msgstr "Letzte Nachricht"
|
|
9624
9627
|
|
|
@@ -11115,6 +11118,9 @@ msgstr "Keine benutzerdefinierten Eigenschaften anzuzeigen."
|
|
|
11115
11118
|
msgid "No data aggregation"
|
|
11116
11119
|
msgstr "Keine Datenaggregation"
|
|
11117
11120
|
|
|
11121
|
+
msgid "No data available for the selected time period."
|
|
11122
|
+
msgstr "Für den ausgewählten Zeitraum liegen keine Daten vor."
|
|
11123
|
+
|
|
11118
11124
|
msgid "No data available."
|
|
11119
11125
|
msgstr "Keine Daten verfügbar."
|
|
11120
11126
|
|
package/core/locales/es.po
CHANGED
|
@@ -9616,6 +9616,9 @@ msgstr "Últimas líneas para mostrar"
|
|
|
9616
9616
|
msgid "Last measurement"
|
|
9617
9617
|
msgstr "Última medición"
|
|
9618
9618
|
|
|
9619
|
+
msgid "Last measurement in selected time range"
|
|
9620
|
+
msgstr "Última medida en el intervalo de tiempo seleccionado"
|
|
9621
|
+
|
|
9619
9622
|
msgid "Last message"
|
|
9620
9623
|
msgstr "Ultimo mensaje"
|
|
9621
9624
|
|
|
@@ -11113,6 +11116,9 @@ msgstr "No hay propiedades personalizadas para mostrar."
|
|
|
11113
11116
|
msgid "No data aggregation"
|
|
11114
11117
|
msgstr "Sin agregación de datos"
|
|
11115
11118
|
|
|
11119
|
+
msgid "No data available for the selected time period."
|
|
11120
|
+
msgstr "No hay datos disponibles para el periodo seleccionado."
|
|
11121
|
+
|
|
11116
11122
|
msgid "No data available."
|
|
11117
11123
|
msgstr "No hay datos disponibles."
|
|
11118
11124
|
|
package/core/locales/fr.po
CHANGED
|
@@ -9632,6 +9632,9 @@ msgstr "Dernières lignes à afficher"
|
|
|
9632
9632
|
msgid "Last measurement"
|
|
9633
9633
|
msgstr "Dernière mesure"
|
|
9634
9634
|
|
|
9635
|
+
msgid "Last measurement in selected time range"
|
|
9636
|
+
msgstr "Dernière mesure dans la période sélectionnée"
|
|
9637
|
+
|
|
9635
9638
|
msgid "Last message"
|
|
9636
9639
|
msgstr "Dernier message"
|
|
9637
9640
|
|
|
@@ -11129,6 +11132,9 @@ msgstr "Aucune propriété personnalisée à afficher."
|
|
|
11129
11132
|
msgid "No data aggregation"
|
|
11130
11133
|
msgstr "Aucune agrégation de données"
|
|
11131
11134
|
|
|
11135
|
+
msgid "No data available for the selected time period."
|
|
11136
|
+
msgstr "Aucune donnée n'est disponible pour la période sélectionnée."
|
|
11137
|
+
|
|
11132
11138
|
msgid "No data available."
|
|
11133
11139
|
msgstr "Aucune donnée disponible."
|
|
11134
11140
|
|
package/core/locales/ja_JP.po
CHANGED
|
@@ -9514,6 +9514,9 @@ msgstr "表示する最終行"
|
|
|
9514
9514
|
msgid "Last measurement"
|
|
9515
9515
|
msgstr "最終計測"
|
|
9516
9516
|
|
|
9517
|
+
msgid "Last measurement in selected time range"
|
|
9518
|
+
msgstr ""
|
|
9519
|
+
|
|
9517
9520
|
msgid "Last message"
|
|
9518
9521
|
msgstr "最新のメッセージ"
|
|
9519
9522
|
|
|
@@ -11009,6 +11012,9 @@ msgstr "表示できるカスタム プロパティはありません。"
|
|
|
11009
11012
|
msgid "No data aggregation"
|
|
11010
11013
|
msgstr "データ集計なし"
|
|
11011
11014
|
|
|
11015
|
+
msgid "No data available for the selected time period."
|
|
11016
|
+
msgstr ""
|
|
11017
|
+
|
|
11012
11018
|
msgid "No data available."
|
|
11013
11019
|
msgstr "使用可能なデータはありません。"
|
|
11014
11020
|
|
package/core/locales/ko.po
CHANGED
|
@@ -9605,6 +9605,9 @@ msgstr "표시할 마지막 라인"
|
|
|
9605
9605
|
msgid "Last measurement"
|
|
9606
9606
|
msgstr "마지막 측정"
|
|
9607
9607
|
|
|
9608
|
+
msgid "Last measurement in selected time range"
|
|
9609
|
+
msgstr "선택한 기간 내의 마지막 측정값"
|
|
9610
|
+
|
|
9608
9611
|
msgid "Last message"
|
|
9609
9612
|
msgstr "마지막 메시지"
|
|
9610
9613
|
|
|
@@ -11100,6 +11103,9 @@ msgstr "표시할 사용자 지정 속성이 없습니다."
|
|
|
11100
11103
|
msgid "No data aggregation"
|
|
11101
11104
|
msgstr "데이터 집계 없음"
|
|
11102
11105
|
|
|
11106
|
+
msgid "No data available for the selected time period."
|
|
11107
|
+
msgstr "선택한 기간에 대한 데이터가 없습니다."
|
|
11108
|
+
|
|
11103
11109
|
msgid "No data available."
|
|
11104
11110
|
msgstr "사용 가능한 데이터가 없습니다."
|
|
11105
11111
|
|
package/core/locales/nl.po
CHANGED
|
@@ -9631,6 +9631,9 @@ msgstr "Laatste weer te geven regels"
|
|
|
9631
9631
|
msgid "Last measurement"
|
|
9632
9632
|
msgstr "Laatste meting"
|
|
9633
9633
|
|
|
9634
|
+
msgid "Last measurement in selected time range"
|
|
9635
|
+
msgstr "Laatste meting in het geselecteerde tijdsbestek"
|
|
9636
|
+
|
|
9634
9637
|
msgid "Last message"
|
|
9635
9638
|
msgstr "Laatst bericht"
|
|
9636
9639
|
|
|
@@ -11128,6 +11131,9 @@ msgstr "Geen aangepaste eigenschappen om weer te geven."
|
|
|
11128
11131
|
msgid "No data aggregation"
|
|
11129
11132
|
msgstr "Geen aggregatie van gegevens"
|
|
11130
11133
|
|
|
11134
|
+
msgid "No data available for the selected time period."
|
|
11135
|
+
msgstr "Er zijn geen gegevens beschikbaar voor de geselecteerde periode."
|
|
11136
|
+
|
|
11131
11137
|
msgid "No data available."
|
|
11132
11138
|
msgstr "Geen gegevens beschikbaar."
|
|
11133
11139
|
|
package/core/locales/pl.po
CHANGED
|
@@ -9677,6 +9677,9 @@ msgstr "Ostatnie wiersze do wyświetlenia"
|
|
|
9677
9677
|
msgid "Last measurement"
|
|
9678
9678
|
msgstr "Ostatni pomiar"
|
|
9679
9679
|
|
|
9680
|
+
msgid "Last measurement in selected time range"
|
|
9681
|
+
msgstr "Ostatni pomiar w wybranym przedziale czasowym"
|
|
9682
|
+
|
|
9680
9683
|
msgid "Last message"
|
|
9681
9684
|
msgstr "Ostatni komunikat"
|
|
9682
9685
|
|
|
@@ -11178,6 +11181,9 @@ msgstr "Brak niestandardowych właściwości do wyświetlenia."
|
|
|
11178
11181
|
msgid "No data aggregation"
|
|
11179
11182
|
msgstr "Brak agregacji danych"
|
|
11180
11183
|
|
|
11184
|
+
msgid "No data available for the selected time period."
|
|
11185
|
+
msgstr "Brak danych dla wybranego okresu."
|
|
11186
|
+
|
|
11181
11187
|
msgid "No data available."
|
|
11182
11188
|
msgstr "Brak dostępnych danych."
|
|
11183
11189
|
|
package/core/locales/pt_BR.po
CHANGED
|
@@ -9632,6 +9632,9 @@ msgstr "Últimas linhas para exibir"
|
|
|
9632
9632
|
msgid "Last measurement"
|
|
9633
9633
|
msgstr "Última medição"
|
|
9634
9634
|
|
|
9635
|
+
msgid "Last measurement in selected time range"
|
|
9636
|
+
msgstr "Última medição no intervalo de tempo selecionado"
|
|
9637
|
+
|
|
9635
9638
|
msgid "Last message"
|
|
9636
9639
|
msgstr "Última mensagem"
|
|
9637
9640
|
|
|
@@ -11129,6 +11132,9 @@ msgstr "Não há propriedades personalizadas a serem exibidas."
|
|
|
11129
11132
|
msgid "No data aggregation"
|
|
11130
11133
|
msgstr "Sem agregação de dados"
|
|
11131
11134
|
|
|
11135
|
+
msgid "No data available for the selected time period."
|
|
11136
|
+
msgstr "Não há dados disponíveis para o período selecionado."
|
|
11137
|
+
|
|
11132
11138
|
msgid "No data available."
|
|
11133
11139
|
msgstr "Nenhum dado disponível."
|
|
11134
11140
|
|
package/core/locales/zh_CN.po
CHANGED
|
@@ -9612,6 +9612,9 @@ msgstr "要显示的最后几行"
|
|
|
9612
9612
|
msgid "Last measurement"
|
|
9613
9613
|
msgstr "最后的测量"
|
|
9614
9614
|
|
|
9615
|
+
msgid "Last measurement in selected time range"
|
|
9616
|
+
msgstr "选择时间范围内的最后一次测量"
|
|
9617
|
+
|
|
9615
9618
|
msgid "Last message"
|
|
9616
9619
|
msgstr "最后一条消息"
|
|
9617
9620
|
|
|
@@ -11107,6 +11110,9 @@ msgstr "不显示自定义属性。"
|
|
|
11107
11110
|
msgid "No data aggregation"
|
|
11108
11111
|
msgstr "无数据汇总"
|
|
11109
11112
|
|
|
11113
|
+
msgid "No data available for the selected time period."
|
|
11114
|
+
msgstr "所选择时间段内无可用数据。"
|
|
11115
|
+
|
|
11110
11116
|
msgid "No data available."
|
|
11111
11117
|
msgstr "没有数据。"
|
|
11112
11118
|
|
package/core/locales/zh_TW.po
CHANGED
|
@@ -9608,6 +9608,9 @@ msgstr "要显示的最后几行"
|
|
|
9608
9608
|
msgid "Last measurement"
|
|
9609
9609
|
msgstr "最后的测量"
|
|
9610
9610
|
|
|
9611
|
+
msgid "Last measurement in selected time range"
|
|
9612
|
+
msgstr "所选择时间区间内的最后一次测量"
|
|
9613
|
+
|
|
9611
9614
|
msgid "Last message"
|
|
9612
9615
|
msgstr "最后一条消息"
|
|
9613
9616
|
|
|
@@ -11103,6 +11106,9 @@ msgstr "沒有自訂屬性要顯示。"
|
|
|
11103
11106
|
msgid "No data aggregation"
|
|
11104
11107
|
msgstr "無資料聚合"
|
|
11105
11108
|
|
|
11109
|
+
msgid "No data available for the selected time period."
|
|
11110
|
+
msgstr "所选时间范围内无可用数据。"
|
|
11111
|
+
|
|
11106
11112
|
msgid "No data available."
|
|
11107
11113
|
msgstr "没有数据。"
|
|
11108
11114
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function _slicedToArray(e,t){return _arrayWithHoles(e)||_iterableToArrayLimit(e,t)||_unsupportedIterableToArray(e,t)||_nonIterableRest()}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _unsupportedIterableToArray(e,t){var n;if(e)return"string"==typeof e?_arrayLikeToArray(e,t):"Map"===(n="Object"===(n={}.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:n)||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?_arrayLikeToArray(e,t):void 0}function _arrayLikeToArray(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=Array(t);n<t;n++)i[n]=e[n];return i}function _iterableToArrayLimit(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var i,r,a,o,l=[],c=!0,s=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(i=a.call(n)).done)&&(l.push(i.value),l.length!==t);c=!0);}catch(e){s=!0,r=e}finally{try{if(!c&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(s)throw r}}return l}}function _arrayWithHoles(e){if(Array.isArray(e))return e}(()=>{function e(v,A,w,T,I,N,$){return{link:function(n){var o=[],i="c8y_Position",r=g,a=b,l=[];function e(){l.length=0,o.length=0,n.deviceId?c(n.deviceId):d()}function c(e){A.detail(e).then(I.getResData).then(t)}function t(e){l.push(e),n.multipleDevices?(e=n.deviceId,v.all([A.childDevices(e),A.childAssets(e)]).then(_.flattenDeep).then(s)):d(u(l))}function s(e){d(u(_.union(l,e)))}function u(e){return _.map(_.filter(e,function(e){return!N.isGroup(e)}),"id")}function d(e){var t={},e=e&&e.length?(t.ids=e.join(","),A.list(t)):A.list({fragmentType:i});e.then(f).then(g)}function f(e){return n.withPosition=_.filter(e,p),_.filter(_.map(n.withPosition,b),_.identity)}function m(){n.realtimeAnimation=!1}function h(e,t){w.addListener(n.$id,n.realtimeChannel,e,t)}function y(e,t){p(t)&&(a(t),r())}function p(e){return e[i]}function g(e){e&&e.length&&_.forEach(e,function(e){o.push(e)}),n.withPosition.length&&T.getMap("c8y-map-".concat(n.$id)).then(function(e){e.fitBounds(o,{padding:[50,50]})})}function b(e){var t,n=p(e),i=_.cloneDeep(n||{}),r=null,a=_.find(o,{id:e.id});return a?(n.lat=Number(n.lat),a.lat=n.lat,n.lng=Number(n.lng),a.lng=n.lng):(n.lat=Number(n.lat),i.lat=n.lat,n.lng=Number(n.lng),i.lng=n.lng,n&&_.isNumber(n.lat)&&_.isNumber(n.lng)&&!_.isNaN(_.toNumber(n.lat))&&!_.isNaN(_.toNumber(n.lng))&&(i.id=e.id,i.message='\n <a\n class="btn btn-link"\n style="width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;"\n href="#/device/'.concat((a=e).id,'"\n title="').concat(a.name,'"\n >\n ').concat(a.name,"\n </a>\n "),i.icon={className:"".concat((t=e.c8y_ActiveAlarmsStatus||{},_.find(["critical","major","minor","warning"],function(e){return t[e]})||"normal"),"-marker-icon"),iconSize:[25,41],iconAnchor:[12,41],type:"div"},r=i)),r}n.$watch("deviceId",function(e,t){e&&e!==t&&(l=[],o.length=0,c(e))}),n.markers=o,n.mapDefault={scrollWheelZoom:!1},n.cssToHide=function(){return n.withPosition&&n.withPosition.length?{}:{visibility:"hidden"}},n.paging={refresh:!0},n.realtime||(n.refresh=e),v.all([$.listByUser(),T.getMap("c8y-map-".concat(n.$id))]).then(function(e){var e=_slicedToArray(e,2),t=e[0],e=e[1];_.some(t,{contextPath:"openseamap"})&&(t=L.tileLayer("/apps/openseamap/{z}/{x}/{y}.png"),L.control.layers({},{openseamap:t}).addTo(e))}),n.realtimeChannel="/managedobjects/*",h("".concat(n.$id,"-subscribed"),m),h("UPDATE",y),n.realtime&&(n.$on("$destroy",function(){w.stop(n.$id,n.realtimeChannel)}),w.start(n.$id,n.realtimeChannel)),e()},restrict:"E",scope:{deviceId:"=?",multipleDevices:"=",cssClass:"@",width:"=?",height:"=?",config:"=",realtime:"="},templateUrl:":::PLUGIN_PATH:::/ui/views/map.html"}}e.$inject=["$q","c8yInventory","c8yRealtime","leafletData","c8yBase","c8yGroups","c8yApplication"],angular.module("c8y.ui").directive("c8yMap",e)})();
|
|
1
|
+
function _slicedToArray(e,t){return _arrayWithHoles(e)||_iterableToArrayLimit(e,t)||_unsupportedIterableToArray(e,t)||_nonIterableRest()}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _unsupportedIterableToArray(e,t){var n;if(e)return"string"==typeof e?_arrayLikeToArray(e,t):"Map"===(n="Object"===(n={}.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:n)||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?_arrayLikeToArray(e,t):void 0}function _arrayLikeToArray(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=Array(t);n<t;n++)i[n]=e[n];return i}function _iterableToArrayLimit(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var i,r,a,o,l=[],c=!0,s=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(i=a.call(n)).done)&&(l.push(i.value),l.length!==t);c=!0);}catch(e){s=!0,r=e}finally{try{if(!c&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(s)throw r}}return l}}function _arrayWithHoles(e){if(Array.isArray(e))return e}(()=>{function e(v,A,w,T,I,N,$){return{link:function(n){var o=[],i="c8y_Position",r=g,a=b,l=[];function e(){l.length=0,o.length=0,n.deviceId?c(n.deviceId):d()}function c(e){A.detail(e).then(I.getResData).then(t)}function t(e){l.push(e),n.multipleDevices?(e=n.deviceId,v.all([A.childDevices(e),A.childAssets(e)]).then(_.flattenDeep).then(s)):d(u(l))}function s(e){d(u(_.union(l,e)))}function u(e){return _.map(_.filter(e,function(e){return!N.isGroup(e)}),"id")}function d(e){var t={},e=e&&e.length?(t.ids=e.join(","),A.list(t)):A.list({fragmentType:i});e.then(f).then(g)}function f(e){return n.withPosition=_.filter(e,p),_.filter(_.map(n.withPosition,b),_.identity)}function m(){n.realtimeAnimation=!1}function h(e,t){w.addListener(n.$id,n.realtimeChannel,e,t)}function y(e,t){p(t)&&(a(t),r())}function p(e){return e[i]}function g(e){e&&e.length&&_.forEach(e,function(e){o.push(e)}),n.withPosition.length&&T.getMap("c8y-map-".concat(n.$id)).then(function(e){e.fitBounds(o,{padding:[50,50]})})}function b(e){var t,n=p(e),i=_.cloneDeep(n||{}),r=null,a=_.find(o,{id:e.id});return a?(n.lat=Number(n.lat),a.lat=n.lat,n.lng=Number(n.lng),a.lng=n.lng):(n.lat=Number(n.lat),i.lat=n.lat,n.lng=Number(n.lng),i.lng=n.lng,n&&_.isNumber(n.lat)&&_.isNumber(n.lng)&&!_.isNaN(_.toNumber(n.lat))&&!_.isNaN(_.toNumber(n.lng))&&(i.id=e.id,i.message='\n <a\n class="btn btn-link"\n style="width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;"\n href="#/device/'.concat((a=e).id,'"\n title="').concat(a.name,'"\n >\n ').concat(a.name,"\n </a>\n "),i.icon={className:"".concat((t=e.c8y_ActiveAlarmsStatus||{},_.find(["critical","major","minor","warning"],function(e){return t[e]})||"normal"),"-marker-icon"),iconSize:[25,41],iconAnchor:[12,41],type:"div"},r=i)),r}n.$watch("deviceId",function(e,t){e&&e!==t&&(l=[],o.length=0,c(e))}),n.markers=o,n.mapDefault={scrollWheelZoom:!1,tileLayerOptions:{referrerPolicy:"strict-origin-when-cross-origin"}},n.cssToHide=function(){return n.withPosition&&n.withPosition.length?{}:{visibility:"hidden"}},n.paging={refresh:!0},n.realtime||(n.refresh=e),v.all([$.listByUser(),T.getMap("c8y-map-".concat(n.$id))]).then(function(e){var e=_slicedToArray(e,2),t=e[0],e=e[1];_.some(t,{contextPath:"openseamap"})&&(t=L.tileLayer("/apps/openseamap/{z}/{x}/{y}.png"),L.control.layers({},{openseamap:t}).addTo(e))}),n.realtimeChannel="/managedobjects/*",h("".concat(n.$id,"-subscribed"),m),h("UPDATE",y),n.realtime&&(n.$on("$destroy",function(){w.stop(n.$id,n.realtimeChannel)}),w.start(n.$id,n.realtimeChannel)),e()},restrict:"E",scope:{deviceId:"=?",multipleDevices:"=",cssClass:"@",width:"=?",height:"=?",config:"=",realtime:"="},templateUrl:":::PLUGIN_PATH:::/ui/views/map.html"}}e.$inject=["$q","c8yInventory","c8yRealtime","leafletData","c8yBase","c8yGroups","c8yApplication"],angular.module("c8y.ui").directive("c8yMap",e)})();
|
package/core/ui/views/map.html
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(()=>{function e(e,n,l,
|
|
1
|
+
(()=>{function e(e,n,t,l,a,o,r){var c,g=new l.Bounds,i=[],s={type:"polygon",stroke:!0,weight:1,color:"#2e3974",fillColor:"#2e3974",latlngs:[]},d={center:{},events:{},defaults:{tileLayerOptions:{referrerPolicy:"strict-origin-when-cross-origin"},doubleClickZoom:!1},bounds:g.get(),markers:i,paths:{geofencePath:s}};function f(e){e&&(d.center=_.assign(d.center,{lat:Number(e.lat),lng:Number(e.lng),zoom:17}))}function u(){0<s.latlngs.length&&(g.reset(),_.forEach(s.latlngs,function(e){g.add(e)}),d.bounds=g.get())}function h(){s.latlngs.length=0,i.length=0}function m(e,n){switch(e.name){case"leafletDirectiveMarker.dragstart":c={lat:n.model.lat,lng:n.model.lng,draggable:!0};break;case"leafletDirectiveMarker.dragend":s.latlngs[_.findIndex(s.latlngs,c)]={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(r("Address could not be found.")),null)}).then(f)},e.centerMap=u,e.clearGeofence=h,e.chooseGeofence=function(){var e;n.close((e=s.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),s.latlngs.push(n),1===s.latlngs.length&&(d.paths={geofencePath:s})}),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]},i.push(e),s.latlngs.push(e)}),0<s.latlngs.length?d.paths={geofencePath:s}:d.paths={},t(u,0)}e.$inject=["$scope","$uibModalInstance","$timeout","c8yGeo","geofenceLatLngs","c8yAlert","gettext"],angular.module("c8y.cockpit.map").controller("GeofenceEditCtrl",e)})();
|
package/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
angular.module("c8y.smartRules").directive("smartRuleParamInputGeofence",function(){return{require:"smartRuleParamInput",scope:{rule:"=",param:"="},restrict:"E",templateUrl:":::PLUGIN_PATH:::/views/paramInputGeofence.html",controller:["$scope","c8yGeo","geofenceSvc",function(t,e,
|
|
1
|
+
angular.module("c8y.smartRules").directive("smartRuleParamInputGeofence",function(){return{require:"smartRuleParamInput",scope:{rule:"=",param:"="},restrict:"E",templateUrl:":::PLUGIN_PATH:::/views/paramInputGeofence.html",controller:["$scope","c8yGeo","geofenceSvc",function(t,e,o){var n={type:"polygon",stroke:!0,weight:1,color:"#2e3974",fillColor:"#2e3974",latlngs:[]},r=new e.Bounds,l={center:{},bounds:r.get(),paths:{geofence:n},defaults:{zoomControl:!1,scrollWheelZoom:!1,tileLayerOptions:{referrerPolicy:"strict-origin-when-cross-origin"}}};function a(e){t.rule.config[t.param.property]=e,n.latlngs.length=0,_.forEach(e,function(e){n.latlngs.push(e),r.add(e)}),l.bounds=r.get(),0<n.latlngs.length?l.paths={geofence:n}:l.paths={}}t.map=l,t.editGeofence=function(){o.showEditUI(n.latlngs).then(function(e){a(e)})},a(t.rule.config[t.param.property])}]}});
|