@c8y/ng1-modules 1019.23.1 → 1019.23.4

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.
@@ -242,8 +242,8 @@ msgid ""
242
242
  " inventory."
243
243
  msgstr ""
244
244
  "Eine <strong> globale Rolle </strong> enthält allgemein anwendbare Berechtigungen. \n"
245
- " Wählen Sie zum Beispiel \"Lesen\" in der Zeile \"Inventar\" aus, damit Benutzer mit dieser Rolle\n"
246
- " alle Objekte im Inventar lesen können."
245
+ " Wählen Sie zum Beispiel \"Lesen\" in der Zeile \"Stammdaten\" aus, damit Benutzer mit dieser Rolle\n"
246
+ " alle Objekte im Stammdaten lesen können."
247
247
 
248
248
  msgid "A bulk registration CSV template for NO_SEC devices with all optional fields"
249
249
  msgstr "Ein CSV-Template mit allen optionalen Feldern für die Bulk-Registrierung mehrerer NO_SEC-Geräte"
@@ -2558,7 +2558,7 @@ msgid ""
2558
2558
  " needs to have inventory write permission."
2559
2559
  msgstr ""
2560
2560
  "Änderungen, die am Start-Dashboard vorgenommen werden, sind nur für den aktuellen Benutzer sichtbar.\n"
2561
- " HINWEIS: Dieser Benutzer muss über eine Schreibberechtigung für das Inventar verfügen."
2561
+ " HINWEIS: Dieser Benutzer muss über eine Schreibberechtigung für das Stammdaten verfügen."
2562
2562
 
2563
2563
  msgid "Changes done to the home dashboard are reflected only in the current application."
2564
2564
  msgstr "Änderungen, die am Start-Dashboard vorgenommen werden, sind nur in der aktuellen Anwendung sichtbar."
@@ -3550,12 +3550,18 @@ msgstr "Das Modul \"{{moduleName}}\" konnte nicht eingerichtet werden. Die Kompi
3550
3550
  msgid "Could not deploy the application, as an application with the same name`KEEP_ORIGINAL`, context-path`KEEP_ORIGINAL` or key`KEEP_ORIGINAL` exists already."
3551
3551
  msgstr "Die Anwendung konnte nicht bereitgestellt werden, da bereits eine Anwendung mit demselben name, context-path oder key existiert."
3552
3552
 
3553
+ msgid "Could not download data for \"{{name}}\": access denied."
3554
+ msgstr "Die Daten für \"{{name}}\" konnten nicht heruntergeladen werden: Zugriff verweigert."
3555
+
3553
3556
  msgid "Could not download the file: object with ID \"{{ id }}\" is not a valid binary."
3554
3557
  msgstr "Die Datei konnte nicht heruntergeladen werden, weil das Objekt mit der ID \"{{ id }}\" keine gültige Binärdatei ist."
3555
3558
 
3556
3559
  msgid "Could not download the log file."
3557
3560
  msgstr "Logdatei konnte nicht heruntergeladen werden."
3558
3561
 
3562
+ msgid "Could not download the report. You need this global role to download reports: Measurement Read."
3563
+ msgstr "Der Bericht konnte nicht heruntergeladen werden. Sie benötigen die folgende globale Rolle, um Berichte herunterzuladen: Messwerte Lesen."
3564
+
3559
3565
  msgid "Could not enable the \"Ignore case when logging in\" feature. Duplicate usernames or aliases were detected when ignoring case sensitivity. Resolve conflicting names and try again."
3560
3566
  msgstr "Die Funktion \"Groß- und Kleinschreibung während des Einloggens ignorieren\" konnte nicht aktiviert werden. Beim Ignorieren der Groß- und Kleinschreibung wurden doppelte Benutzernamen oder Aliasnamen erkannt. Lösen Sie widersprüchliche Namen auf und versuchen Sie es erneut."
3561
3567
 
@@ -12613,7 +12619,7 @@ msgid "Select from available extension packages"
12613
12619
  msgstr "Wählen Sie eines der verfügbaren Erweiterungspakete"
12614
12620
 
12615
12621
  msgid "Select from inventory"
12616
- msgstr "Aus Inventar auswählen"
12622
+ msgstr "Aus Stammdaten auswählen"
12617
12623
 
12618
12624
  msgid "Select from predefined"
12619
12625
  msgstr "Aus Vordefinierten auswählen"
@@ -3558,12 +3558,18 @@ msgstr "El módulo \"{{moduleName}}\" no ha podido desplegarse. La compilación
3558
3558
  msgid "Could not deploy the application, as an application with the same name`KEEP_ORIGINAL`, context-path`KEEP_ORIGINAL` or key`KEEP_ORIGINAL` exists already."
3559
3559
  msgstr "La aplicación no ha podido implementarse puesto que ya existe una aplicación con el mismo name, context-path o key."
3560
3560
 
3561
+ msgid "Could not download data for \"{{name}}\": access denied."
3562
+ msgstr "No se han podido descargar datos para \"{{name}}\": acceso denegado."
3563
+
3561
3564
  msgid "Could not download the file: object with ID \"{{ id }}\" is not a valid binary."
3562
3565
  msgstr "No ha podido descargarse el archivo: El objeto con el ID \"{{ id }}\" no es un archivo binario válido."
3563
3566
 
3564
3567
  msgid "Could not download the log file."
3565
3568
  msgstr "El archivo de registro no ha podido descargarse."
3566
3569
 
3570
+ msgid "Could not download the report. You need this global role to download reports: Measurement Read."
3571
+ msgstr "No se ha podido descargar el informe. Necesita este rol global para descargar informes: Estadísticas Leer."
3572
+
3567
3573
  msgid "Could not enable the \"Ignore case when logging in\" feature. Duplicate usernames or aliases were detected when ignoring case sensitivity. Resolve conflicting names and try again."
3568
3574
  msgstr "No se ha podido activar la función \"Ignorar mayúsculas y minúsculas al iniciar sesión\". Se han detectado nombres de usuario o alias duplicados al ignorar mayúsculas y minúsculas. Resuelve los nombres conflictivos e inténtalo de nuevo."
3569
3575
 
@@ -3558,12 +3558,18 @@ msgstr "Impossible de déployer le module \"{{moduleName}}\". Échec de compilat
3558
3558
  msgid "Could not deploy the application, as an application with the same name`KEEP_ORIGINAL`, context-path`KEEP_ORIGINAL` or key`KEEP_ORIGINAL` exists already."
3559
3559
  msgstr "Impossible de déployer l'application avec les mêmes name, context-path ou la key existe déjà."
3560
3560
 
3561
+ msgid "Could not download data for \"{{name}}\": access denied."
3562
+ msgstr "Impossible de télécharger les données pour \"{{name}}\" : accès refusé."
3563
+
3561
3564
  msgid "Could not download the file: object with ID \"{{ id }}\" is not a valid binary."
3562
3565
  msgstr "Chargement du fichier impossible : l'objet avec l'ID \"{{ id }}\" n'est pas un binaire valide."
3563
3566
 
3564
3567
  msgid "Could not download the log file."
3565
3568
  msgstr "Téléchargement du fichier journal impossible."
3566
3569
 
3570
+ msgid "Could not download the report. You need this global role to download reports: Measurement Read."
3571
+ msgstr "Impossible de télécharger le rapport. Vous avez besoin de ce rôle global pour télécharger les rapports : Mesure Lire."
3572
+
3567
3573
  msgid "Could not enable the \"Ignore case when logging in\" feature. Duplicate usernames or aliases were detected when ignoring case sensitivity. Resolve conflicting names and try again."
3568
3574
  msgstr "Impossible d'activer la fonction \"Ignorer casse lors de la connexion\". Des doublons de noms d'utilisateur ou d'alias ont été détectés lorsque la sensibilité à la casse a été ignorée. Résolvez les conflits de noms et réessayez."
3569
3575
 
@@ -3532,12 +3532,21 @@ msgstr "モジュール \"{{moduleName}}\" をデプロイできませんでし
3532
3532
  msgid "Could not deploy the application, as an application with the same name`KEEP_ORIGINAL`, context-path`KEEP_ORIGINAL` or key`KEEP_ORIGINAL` exists already."
3533
3533
  msgstr "同じ name、context-path、または key を持つアプリケーションが既に存在するため、アプリケーションをデプロイできませんでした。"
3534
3534
 
3535
+ msgid "Could not download data for \"{{name}}\": access denied."
3536
+ msgstr \"{{name}}\"のデータをダウンロードできませんでした。:アクセスが拒否されました。"
3537
+
3535
3538
  msgid "Could not download the file: object with ID \"{{ id }}\" is not a valid binary."
3536
3539
  msgstr "ファイルをダウンロードできませんでした: ID \"{{ id }}\" のオブジェクトは有効なバイナリではありません。"
3537
3540
 
3538
3541
  msgid "Could not download the log file."
3539
3542
  msgstr "ログ ファイルをダウンロードできませんでした。"
3540
3543
 
3544
+ msgid "Could not download the report. You need this global role to download reports: Measurement Read."
3545
+ msgstr "レポートをダウンロードできませんでした。レポートをダウンロードするには、このグローバル・ロールが必要です:計測読み取り"
3546
+
3547
+ msgid "Could not enable the \"Ignore case when logging in\" feature. Duplicate usernames or aliases were detected when ignoring case sensitivity. Resolve conflicting names and try again."
3548
+ msgstr "[ログインの際に大文字と小文字の区別を無視] 機能を有効化できませんでした。大文字と小文字の区別を無視すると、重複するユーザー名またはエイリアスが検出されました。競合する名前を解決してから、もう一度試してください。"
3549
+
3541
3550
  msgid "Could not execute bulk operation on an empty group. Group with ID \"{{groupId}}\" has no child assets."
3542
3551
  msgstr "空のグループで一括操作を実行できませんでした。ID \"{{groupId}}\" のグループには子アセットがありません。"
3543
3552
 
@@ -3558,12 +3558,18 @@ msgstr "Kon module \"{{moduleName}}\" niet gebruiken. Compilatie mislukt in expr
3558
3558
  msgid "Could not deploy the application, as an application with the same name`KEEP_ORIGINAL`, context-path`KEEP_ORIGINAL` or key`KEEP_ORIGINAL` exists already."
3559
3559
  msgstr "De applicatie kan niet worden geïmplementeerd, omdat er al een applicatie bestaat met dezelfde name, context-path of key."
3560
3560
 
3561
+ msgid "Could not download data for \"{{name}}\": access denied."
3562
+ msgstr "Kan gegevens voor \"{{name}}\" niet downloaden: toegang geweigerd."
3563
+
3561
3564
  msgid "Could not download the file: object with ID \"{{ id }}\" is not a valid binary."
3562
3565
  msgstr "Kan het bestand niet downloaden: object met ID \"{{ id }}\" is geen geldige binary."
3563
3566
 
3564
3567
  msgid "Could not download the log file."
3565
3568
  msgstr "Kon het logbestand niet downloaden."
3566
3569
 
3570
+ msgid "Could not download the report. You need this global role to download reports: Measurement Read."
3571
+ msgstr "Kan het rapport niet downloaden. U hebt deze globale rol nodig om rapporten te downloaden: Metingen Lezen."
3572
+
3567
3573
  msgid "Could not enable the \"Ignore case when logging in\" feature. Duplicate usernames or aliases were detected when ignoring case sensitivity. Resolve conflicting names and try again."
3568
3574
  msgstr "De functie \"Hoofdletters negeren bij aanmelden\" kon niet worden ingeschakeld. Er werden dubbele gebruikersnamen of aliassen gedetecteerd bij het negeren van hoofdlettergevoeligheid. Los conflicterende namen op en probeer het opnieuw."
3569
3575
 
@@ -3578,12 +3578,18 @@ msgstr "Nie można wdrożyć modułu „{{moduleName}}”. Błąd kompilacji wys
3578
3578
  msgid "Could not deploy the application, as an application with the same name`KEEP_ORIGINAL`, context-path`KEEP_ORIGINAL` or key`KEEP_ORIGINAL` exists already."
3579
3579
  msgstr "Nie można wdrożyć aplikacji, ponieważ istnieje już aplikacja o takich samych parametrach name, context-path lub key."
3580
3580
 
3581
+ msgid "Could not download data for \"{{name}}\": access denied."
3582
+ msgstr "Nie można pobrać danych dla \"{{name}}\": odmowa dostępu."
3583
+
3581
3584
  msgid "Could not download the file: object with ID \"{{ id }}\" is not a valid binary."
3582
3585
  msgstr "Nie udało się pobrać pliku: obiekt o ID „{{ id }}” nie jest prawidłowym plikiem binarnym."
3583
3586
 
3584
3587
  msgid "Could not download the log file."
3585
3588
  msgstr "Nie można pobrać pliku dziennika."
3586
3589
 
3590
+ msgid "Could not download the report. You need this global role to download reports: Measurement Read."
3591
+ msgstr "Nie można pobrać raportu. Do pobierania raportów potrzebna jest rola globalna: Odczyt pomiarów."
3592
+
3587
3593
  msgid "Could not enable the \"Ignore case when logging in\" feature. Duplicate usernames or aliases were detected when ignoring case sensitivity. Resolve conflicting names and try again."
3588
3594
  msgstr "Nie można było włączyć funkcji \"Ignoruj wielkość liter podczas logowania\". Wykryto zduplikowane nazwy użytkowników lub aliasy podczas ignorowania wielkości liter. Rozwiąż konflikt nazw i spróbuj ponownie."
3589
3595
 
@@ -3558,12 +3558,18 @@ msgstr "Não foi possível implantar o módulo \"{{moduleName}}\". A compilaçã
3558
3558
  msgid "Could not deploy the application, as an application with the same name`KEEP_ORIGINAL`, context-path`KEEP_ORIGINAL` or key`KEEP_ORIGINAL` exists already."
3559
3559
  msgstr "Não foi possível implantar a aplicação, pois já existe uma aplicação com os mesmos name, context-path ou key."
3560
3560
 
3561
+ msgid "Could not download data for \"{{name}}\": access denied."
3562
+ msgstr "Não foi possível baixar os dados de \"{{name}}\": acesso negado."
3563
+
3561
3564
  msgid "Could not download the file: object with ID \"{{ id }}\" is not a valid binary."
3562
3565
  msgstr "Não foi possível baixar o arquivo: o objeto com a ID \"{{ id }}\" não é um binário válido."
3563
3566
 
3564
3567
  msgid "Could not download the log file."
3565
3568
  msgstr "Não foi possível baixar o arquivo de log."
3566
3569
 
3570
+ msgid "Could not download the report. You need this global role to download reports: Measurement Read."
3571
+ msgstr "Não foi possível baixar o relatório. Você precisa dessa função global para baixar relatórios: Medição Ler."
3572
+
3567
3573
  msgid "Could not enable the \"Ignore case when logging in\" feature. Duplicate usernames or aliases were detected when ignoring case sensitivity. Resolve conflicting names and try again."
3568
3574
  msgstr "Não foi possível ativar o recurso \"Ignorar maiúsculas e minúsculas ao fazer login\". Nomes de usuário ou aliases duplicados foram detectados ao ignorar a distinção entre maiúsculas e minúsculas. Resolva os nomes em conflito e tente novamente."
3569
3575
 
@@ -1 +1 @@
1
- "use strict";!function(){function e(i,e,s,l,u,c,d,p){var m=this;this.downloadReportForDevice=function(e,t,r,n){t=_.get(t,"id",t),r=_(r).map(_.partial(m.createPairFromSeries,t)).value();return new m.Downloader(e,n,r).start()},this.downloadReportForDatapoints=function(e,t,r){t=_(t).filter(function(e){return!0===e.__active}).map(m.getDpRequestParams).value();return t.length?new m.Downloader(e,r,t).start():i.reject(new Error(d("At least 1 data point must be selected")))},this.createPairFromSeries=function(e,t){return{source:e,fragmentType:t}},this.getDpRequestParams=function(e){return{source:e.__target.id,valueFragmentType:e.fragment,valueFragmentSeries:e.series}},this.generateFileName=function(e,t){if(_.isEmpty(e.source&&t)||_.isEmpty(e.valueFragmentType||e.fragmentType))throw new Error("Unable to generate a file name for given data");var r=e.valueFragmentType?[e.valueFragmentType,e.valueFragmentSeries].join("."):e.fragmentType;return[e.source,r,t].join(".")},this.Downloader=function(r,n,e){var o=this,t=_.uniqBy(e,function(e){return JSON.stringify(e)});function a(e){return{text:d("Access denied."),type:"danger",detailedData:e}}this.downloadReports=function(){var e=_(t).map(o.downloadReportForDpRequestParams).value();return i.all(e).then(o.onDownloads).catch(o.onFail)},this.start=function(){return u({templateUrl:":::PLUGIN_PATH:::/ui/views/measurementsReport.html",title:d("Generating report"),controller:["$scope","$timeout",function(n,a){n.completed=0,n.total=t.length,n.reportFileName="report.zip",n.close=function(){var e,t,r;void 0!==window.navigator.msSaveBlob?(e=n.blob,t=n.reportFileName,window.navigator.msSaveBlob(e,t)):(r=n.url,a(function(){window.URL.revokeObjectURL(r)},5e3)),n.$close()},o.scope=n,o.downloadReports()}]})},this.downloadReportForDpRequestParams=function(t,e){e=o.getFilter(t,e);return s.list(e,r).then(function(e){return o.onDownload(t,e)}).catch(function(e){o.onAsyncResult(t,e)})},this.onDownload=function(e,t){return o.scope.completed+=1,t.name=m.generateFileName(e,r.name),t},this.onAsyncResult=function(e,t){return t.async?(o.scope.completed+=1,null):i.reject(t)},this.onFail=function(e){o.scope.$dismiss(),function(r){var n=i.defer();{var e;403===r.status?r.data instanceof Blob?((e=new FileReader).addEventListener("loadend",function(e){try{var t=JSON.parse(_.get(e,"srcElement.result"));n.resolve({type:"danger",text:p.getString(t.message),detailedData:t})}catch(e){n.resolve(a(r))}}),e.readAsText(r.data)):n.resolve(a(r)):n.resolve({type:"danger",text:d("An error occurred. Please try again later."),detailedData:r})}return n.promise}(e).then(c.add)},this.onDownloads=function(e){var t=e.filter(_.identity),e=e.length-t.length;return 0<e&&(e=p.getPlural(e,"You will get a CSV/Excel file for 1 series via email.","You will get CSV/Excel files for {{$count}} series via email.",{}),c.success(e)),0===t.length?i.when():l.zipFiles(t).then(function(e){o.scope.blob=e,o.scope.url=window.URL.createObjectURL(e)})},this.getFilter=function(e,t){t=_.isArray(n)?n[t]:n;return _.merge({},t,e)}}}e.$inject=["$q","$rootScope","c8yMeasurements","c8yZip","c8yModal","c8yAlert","gettext","gettextCatalog"],angular.module("c8y.ui").service("MeasurementsReportSvc",e)}();
1
+ "use strict";function _typeof(t){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function _regeneratorRuntime(){_regeneratorRuntime=function(){return a};var u,a={},t=Object.prototype,l=t.hasOwnProperty,s=Object.defineProperty||function(t,e,r){t[e]=r.value},e="function"==typeof Symbol?Symbol:{},n=e.iterator||"@@iterator",r=e.asyncIterator||"@@asyncIterator",o=e.toStringTag||"@@toStringTag";function i(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{i({},"")}catch(u){i=function(t,e,r){return t[e]=r}}function c(t,e,r,n){var o,i,a,c,e=e&&e.prototype instanceof g?e:g,e=Object.create(e.prototype),n=new R(n||[]);return s(e,"_invoke",{value:(o=t,i=r,a=n,c=h,function(t,e){if(c===d)throw new Error("Generator is already running");if(c===y){if("throw"===t)throw e;return{value:u,done:!0}}for(a.method=t,a.arg=e;;){var r=a.delegate;if(r){r=function t(e,r){var n=r.method,o=e.iterator[n];if(o===u)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=u,t(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),v;n=f(o,e.iterator,r.arg);if("throw"===n.type)return r.method="throw",r.arg=n.arg,r.delegate=null,v;o=n.arg;return o?o.done?(r[e.resultName]=o.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=u),r.delegate=null,v):o:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,v)}(r,a);if(r){if(r===v)continue;return r}}if("next"===a.method)a.sent=a._sent=a.arg;else if("throw"===a.method){if(c===h)throw c=y,a.arg;a.dispatchException(a.arg)}else"return"===a.method&&a.abrupt("return",a.arg);c=d;r=f(o,i,a);if("normal"===r.type){if(c=a.done?y:p,r.arg===v)continue;return{value:r.arg,done:a.done}}"throw"===r.type&&(c=y,a.method="throw",a.arg=r.arg)}})}),e}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}a.wrap=c;var h="suspendedStart",p="suspendedYield",d="executing",y="completed",v={};function g(){}function m(){}function w(){}var e={},b=(i(e,n,function(){return this}),Object.getPrototypeOf),b=b&&b(b(F([]))),_=(b&&b!==t&&l.call(b,n)&&(e=b),w.prototype=g.prototype=Object.create(e));function E(t){["next","throw","return"].forEach(function(e){i(t,e,function(t){return this._invoke(e,t)})})}function x(a,c){var e;s(this,"_invoke",{value:function(r,n){function t(){return new c(function(t,e){!function e(t,r,n,o){var i,t=f(a[t],a,r);if("throw"!==t.type)return(r=(i=t.arg).value)&&"object"==_typeof(r)&&l.call(r,"__await")?c.resolve(r.__await).then(function(t){e("next",t,n,o)},function(t){e("throw",t,n,o)}):c.resolve(r).then(function(t){i.value=t,n(i)},function(t){return e("throw",t,n,o)});o(t.arg)}(r,n,t,e)})}return e=e?e.then(t,t):t()}})}function L(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function S(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function R(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(L,this),this.reset(!0)}function F(e){if(e||""===e){var r,t=e[n];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length))return r=-1,(t=function t(){for(;++r<e.length;)if(l.call(e,r))return t.value=e[r],t.done=!1,t;return t.value=u,t.done=!0,t}).next=t}throw new TypeError(_typeof(e)+" is not iterable")}return s(_,"constructor",{value:m.prototype=w,configurable:!0}),s(w,"constructor",{value:m,configurable:!0}),m.displayName=i(w,o,"GeneratorFunction"),a.isGeneratorFunction=function(t){t="function"==typeof t&&t.constructor;return!!t&&(t===m||"GeneratorFunction"===(t.displayName||t.name))},a.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,w):(t.__proto__=w,i(t,o,"GeneratorFunction")),t.prototype=Object.create(_),t},a.awrap=function(t){return{__await:t}},E(x.prototype),i(x.prototype,r,function(){return this}),a.AsyncIterator=x,a.async=function(t,e,r,n,o){void 0===o&&(o=Promise);var i=new x(c(t,e,r,n),o);return a.isGeneratorFunction(e)?i:i.next().then(function(t){return t.done?t.value:i.next()})},E(_),i(_,o,"Generator"),i(_,n,function(){return this}),i(_,"toString",function(){return"[object Generator]"}),a.keys=function(t){var e,r=Object(t),n=[];for(e in r)n.push(e);return n.reverse(),function t(){for(;n.length;){var e=n.pop();if(e in r)return t.value=e,t.done=!1,t}return t.done=!0,t}},a.values=F,R.prototype={constructor:R,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=u,this.done=!1,this.delegate=null,this.method="next",this.arg=u,this.tryEntries.forEach(S),!t)for(var e in this)"t"===e.charAt(0)&&l.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=u)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(r){if(this.done)throw r;var n=this;function t(t,e){return i.type="throw",i.arg=r,n.next=t,e&&(n.method="next",n.arg=u),!!e}for(var e=this.tryEntries.length-1;0<=e;--e){var o=this.tryEntries[e],i=o.completion;if("root"===o.tryLoc)return t("end");if(o.tryLoc<=this.prev){var a=l.call(o,"catchLoc"),c=l.call(o,"finallyLoc");if(a&&c){if(this.prev<o.catchLoc)return t(o.catchLoc,!0);if(this.prev<o.finallyLoc)return t(o.finallyLoc)}else if(a){if(this.prev<o.catchLoc)return t(o.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return t(o.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;0<=r;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&l.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var o=n;break}}var i=(o=o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc?null:o)?o.completion:{};return i.type=t,i.arg=e,o?(this.method="next",this.next=o.finallyLoc,v):this.complete(i)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),v},finish:function(t){for(var e=this.tryEntries.length-1;0<=e;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),S(r),v}},catch:function(t){for(var e=this.tryEntries.length-1;0<=e;--e){var r,n,o=this.tryEntries[e];if(o.tryLoc===t)return"throw"===(r=o.completion).type&&(n=r.arg,S(o)),n}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:F(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=u),v}},a}function asyncGeneratorStep(t,e,r,n,o,i,a){try{var c=t[i](a),u=c.value}catch(t){return void r(t)}c.done?e(u):Promise.resolve(u).then(n,o)}function _asyncToGenerator(c){return function(){var t=this,a=arguments;return new Promise(function(e,r){var n=c.apply(t,a);function o(t){asyncGeneratorStep(n,e,r,o,i,"next",t)}function i(t){asyncGeneratorStep(n,e,r,o,i,"throw",t)}o(void 0)})}}!function(){function t(c,u,l,s,f,h,p,d,o){var y=this;this.downloadReportForDevice=function(t,e,r,n){e=_.get(e,"id",e),r=_(r).map(_.partial(y.createPairFromSeries,e)).value();return new y.Downloader(t,n,r).start()},this.downloadReportForDatapoints=function(e,t,r){var n=_(t).filter(function(t){return!0===t.__active}).map(y.getDpRequestParams).value();return n.length?o.current().then(function(t){return o.hasRole(t,"ROLE_MEASUREMENT_READ")?new y.Downloader(e,r,n).start():c.reject(new Error(h("Could not download the report. You need this global role to download reports: Measurement Read.")))}):c.reject(new Error(h("At least 1 data point must be selected")))},this.createPairFromSeries=function(t,e){return{source:t,fragmentType:e}},this.getDpRequestParams=function(t){return{source:t.__target.id,valueFragmentType:t.fragment,valueFragmentSeries:t.series}},this.generateFileName=function(t,e){if(_.isEmpty(t.source&&e)||_.isEmpty(t.valueFragmentType||t.fragmentType))throw new Error("Unable to generate a file name for given data");var r=t.valueFragmentType?[t.valueFragmentType,t.valueFragmentSeries].join("."):t.fragmentType;return[t.source,r,e].join(".")},this.Downloader=function(r,n,t){var i=this,e=_.uniqBy(t,function(t){return JSON.stringify(t)});function o(){return(o=_asyncToGenerator(_regeneratorRuntime().mark(function t(r){var n,o,e;return _regeneratorRuntime().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(n=c.defer(),403!==r.status)t.next=14;else{if(r.data instanceof Blob)return t.next=5,d.detail(r.config.params.source);t.next=11}break;case 5:o=t.sent,(e=new FileReader).addEventListener("loadend",function(t){try{var e=JSON.parse(_.get(t,"srcElement.result"));n.resolve({type:"danger",text:p.getString('Could not download data for "{{name}}": access denied.',o.data),detailedData:e})}catch(t){n.resolve(a(r))}}),e.readAsText(r.data),t.next=12;break;case 11:n.resolve(a(r));case 12:t.next=15;break;case 14:n.resolve({type:"danger",text:h("An error occurred. Please try again later."),detailedData:r});case 15:return t.abrupt("return",n.promise);case 16:case"end":return t.stop()}},t)}))).apply(this,arguments)}function a(t){return{text:h("Access denied."),type:"danger",detailedData:t}}this.downloadReports=function(){var t=_(e).map(i.downloadReportForDpRequestParams).value();return c.all(t).then(i.onDownloads)},this.start=function(){return s({templateUrl:":::PLUGIN_PATH:::/ui/views/measurementsReport.html",title:h("Generating report"),controller:["$scope","$timeout",function(n,o){n.completed=0,n.total=e.length,n.reportFileName="report.zip",n.close=function(){var t,e,r;void 0!==window.navigator.msSaveBlob?(t=n.blob,e=n.reportFileName,window.navigator.msSaveBlob(t,e)):(r=n.url,o(function(){window.URL.revokeObjectURL(r)},5e3)),n.$close()},i.scope=n,i.downloadReports()}]})},this.downloadReportForDpRequestParams=function(e,t){t=i.getFilter(e,t);return u.list(t,r).then(function(t){return i.onDownload(e,t)}).catch(function(t){return i.onDownloadError(t)})},this.onDownload=function(t,e){return i.scope.completed+=1,e.name=y.generateFileName(t,r.name),e},this.onDownloadError=function(t){return t.async?(i.scope.completed+=1,c.resolve(null)):(i.displayError(t),c.resolve(void 0))},this.displayError=function(t){!function(){return o.apply(this,arguments)}(t).then(f.add)},this.onDownloads=function(t){var t=t.filter(function(t){return void 0!==t}),e=t.filter(_.identity),t=t.length-e.length;return 0<t&&(t=p.getPlural(t,"You will get a CSV/Excel file for 1 series via email.","You will get CSV/Excel files for {{$count}} series via email.",{}),f.success(t)),0===e.length?c.when():l.zipFiles(e).then(function(t){i.scope.blob=t,i.scope.url=window.URL.createObjectURL(t)})},this.getFilter=function(t,e){e=_.isArray(n)?n[e]:n;return _.merge({},e,t)}}}t.$inject=["$q","c8yMeasurements","c8yZip","c8yModal","c8yAlert","gettext","gettextCatalog","c8yInventory","c8yUser"],angular.module("c8y.ui").service("MeasurementsReportSvc",t)}();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@c8y/ng1-modules",
3
- "version": "1019.23.1",
3
+ "version": "1019.23.4",
4
4
  "license": "Apache-2.0",
5
5
  "author": "Cumulocity",
6
6
  "description": "AngularJS modules for Cumulocity IoT applications.",