@c8y/ng1-modules 1019.21.1 → 1019.23.1

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.
@@ -3556,6 +3556,9 @@ msgstr "Die Datei konnte nicht heruntergeladen werden, weil das Objekt mit der I
3556
3556
  msgid "Could not download the log file."
3557
3557
  msgstr "Logdatei konnte nicht heruntergeladen werden."
3558
3558
 
3559
+ 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
+ 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
+
3559
3562
  msgid "Could not execute bulk operation on an empty group. Group with ID \"{{groupId}}\" has no child assets."
3560
3563
  msgstr "Bulk-Operationen können nicht für leere Gruppen ausgeführt werden. Die Gruppe mit der ID \"{{groupId}}\" hat keine Kind-Assets."
3561
3564
 
@@ -7603,6 +7606,9 @@ msgstr "Wenn diese Option ausgewählt ist, werden leere Werte bei allen nachfolg
7603
7606
  msgid "If selected, it will process the result of the request using response templates."
7604
7607
  msgstr "Wenn diese Option ausgewählt ist, wird das Ergebnis der Anfrage mithilfe von Antwort-Templates verarbeitet."
7605
7608
 
7609
+ msgid "If selected, the letter case of the username does not matter during login."
7610
+ msgstr "Wenn diese Option ausgewählt ist, istdie Groß- und Kleinschreibung des Benutzernamens während des Einloggens nicht relevant."
7611
+
7606
7612
  msgid "If selected, then every request needs to use the same \"User-Agent\" header as the first request which initiated the session."
7607
7613
  msgstr "Wird diese Option gewählt, muss jede Anfrage denselben \"User-Agent\"-Header wie die erste Anfrage, die die Sitzung eingeleitet hat, verwenden."
7608
7614
 
@@ -7612,6 +7618,9 @@ msgstr "Wenn der Filter gesetzt ist, wird die Firmware nur für Geräte dieses T
7612
7618
  msgid "If the filter is set, the software will show up for installation only for devices of that type. If no filter is set, it will be available for all devices."
7613
7619
  msgstr "Wenn der Filter gesetzt ist, wird die Software nur für Geräte dieses Typs zur Installation angezeigt. Wenn kein Filter gesetzt ist, ist sie für alle Geräte verfügbar."
7614
7620
 
7621
+ msgid "Ignore case when logging in"
7622
+ msgstr "Groß- und Kleinschreibung während des Einloggens ignorieren"
7623
+
7615
7624
  msgid "Ignore empty values"
7616
7625
  msgstr "Leere Werte ignorieren"
7617
7626
 
@@ -10311,6 +10320,9 @@ msgstr "Online"
10311
10320
  msgid "Online`type of checking`"
10312
10321
  msgstr "Online"
10313
10322
 
10323
+ msgid "Only a tenant administrator can configure the \"Ignore case when logging in\" option."
10324
+ msgstr "Nur ein Administrator des Mandanten kann die Option \"Groß- und Kleinschreibung während des Einloggens ignorieren\" konfigurieren."
10325
+
10314
10326
  msgid "Only active contracts with free slots are displayed."
10315
10327
  msgstr "Es werden nur aktive Verträge mit freien Slots angezeigt."
10316
10328
 
@@ -14808,6 +14820,9 @@ msgstr ""
14808
14820
  "\n"
14809
14821
  "Durch diesen Prozess bleibt die neue Hardware mit der Information des Vorgängers verknüpft."
14810
14822
 
14823
+ msgid "The feature \"Ignore case when logging in\" is not available."
14824
+ msgstr "Die Funktion \"Groß- und Kleinschreibung während des Einloggens ignorieren\" ist nicht verfügbar."
14825
+
14811
14826
  msgid "The file is empty."
14812
14827
  msgstr "Die Datei ist leer."
14813
14828
 
@@ -3564,6 +3564,9 @@ msgstr "No ha podido descargarse el archivo: El objeto con el ID \"{{ id }}\" no
3564
3564
  msgid "Could not download the log file."
3565
3565
  msgstr "El archivo de registro no ha podido descargarse."
3566
3566
 
3567
+ 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
+ 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
+
3567
3570
  msgid "Could not execute bulk operation on an empty group. Group with ID \"{{groupId}}\" has no child assets."
3568
3571
  msgstr "No se puede ejecutar la operación en masa en un grupo vacío. El grupo con el ID \"{{groupId}}\" no tiene activos secundarios."
3569
3572
 
@@ -7629,6 +7632,9 @@ msgstr "Si se selecciona, los valores vacíos se ignorarán en todos los recurso
7629
7632
  msgid "If selected, it will process the result of the request using response templates."
7630
7633
  msgstr "Si se ha seleccionado, procesará el resultado de la solicitud utilizando las plantillas de respuesta."
7631
7634
 
7635
+ msgid "If selected, the letter case of the username does not matter during login."
7636
+ msgstr "Si se selecciona esta opción, el nombre de usuario no tendrá importancia durante el inicio de sesión."
7637
+
7632
7638
  msgid "If selected, then every request needs to use the same \"User-Agent\" header as the first request which initiated the session."
7633
7639
  msgstr "Si se selecciona, todas las solicitudes deberán usar el mismo encabezado \"User-Agent\" que la primera solicitud que inició la sesión."
7634
7640
 
@@ -7638,6 +7644,9 @@ msgstr "Si se configura un filtro, sólo los dispositivos de este tipo podrán i
7638
7644
  msgid "If the filter is set, the software will show up for installation only for devices of that type. If no filter is set, it will be available for all devices."
7639
7645
  msgstr "Si se configura un filtro, sólo los dispositivos de este tipo podrán instalar el software. Si no se configura ningún filtro, estará disponible para todos los dispositivos."
7640
7646
 
7647
+ msgid "Ignore case when logging in"
7648
+ msgstr "Ignorar mayúsculas y minúsculas al iniciar sesión"
7649
+
7641
7650
  msgid "Ignore empty values"
7642
7651
  msgstr "Ignorar valores vacíos"
7643
7652
 
@@ -10339,6 +10348,9 @@ msgstr "En línea"
10339
10348
  msgid "Online`type of checking`"
10340
10349
  msgstr "Online"
10341
10350
 
10351
+ msgid "Only a tenant administrator can configure the \"Ignore case when logging in\" option."
10352
+ msgstr "Sólo un administrador de tenant puede configurar la opción \"Ignorar mayúsculas y minúsculas al iniciar sesión\"."
10353
+
10342
10354
  msgid "Only active contracts with free slots are displayed."
10343
10355
  msgstr "Sólo se muestran contratos activos con ranuras libres."
10344
10356
 
@@ -14837,6 +14849,9 @@ msgstr ""
14837
14849
  "\n"
14838
14850
  "Con este procedimiento el nuevo hardware sigue enlazado a la información creada por su predecesor."
14839
14851
 
14852
+ msgid "The feature \"Ignore case when logging in\" is not available."
14853
+ msgstr "La función \"Ignorar mayúsculas y minúsculas al iniciar sesión\" no está disponible."
14854
+
14840
14855
  msgid "The file is empty."
14841
14856
  msgstr "El archivo está vacío."
14842
14857
 
@@ -3564,6 +3564,9 @@ msgstr "Chargement du fichier impossible : l'objet avec l'ID \"{{ id }}\" n'est
3564
3564
  msgid "Could not download the log file."
3565
3565
  msgstr "Téléchargement du fichier journal impossible."
3566
3566
 
3567
+ 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
+ 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
+
3567
3570
  msgid "Could not execute bulk operation on an empty group. Group with ID \"{{groupId}}\" has no child assets."
3568
3571
  msgstr "Impossible d'exécuter l'opération en masse sur un groupe vide. Le groupe avec l'ID \"{{groupId}}\" n'a pas d'actif enfant."
3569
3572
 
@@ -7629,6 +7632,9 @@ msgstr "Si cette option est sélectionnée, les valeurs vides de toutes les ress
7629
7632
  msgid "If selected, it will process the result of the request using response templates."
7630
7633
  msgstr "Si cette option est sélectionnée, le résultat de la requête sera traité avec des modèles de réponse."
7631
7634
 
7635
+ msgid "If selected, the letter case of the username does not matter during login."
7636
+ msgstr "Si cette option est sélectionnée, la casse du nom d'utilisateur n'a pas d'importance lors de la connexion."
7637
+
7632
7638
  msgid "If selected, then every request needs to use the same \"User-Agent\" header as the first request which initiated the session."
7633
7639
  msgstr "Si cette option est sélectionnée, toutes les demandes doivent utiliser le même en-tête \"User-Agent\" comme première demande qui a initié la session."
7634
7640
 
@@ -7638,6 +7644,9 @@ msgstr "Si le filtre est activé, le microprogramme s'affiche uniquement lors de
7638
7644
  msgid "If the filter is set, the software will show up for installation only for devices of that type. If no filter is set, it will be available for all devices."
7639
7645
  msgstr "Si le filtre est activé, le logiciel s'affiche uniquement lors de l'installation des appareils de même type. Si aucun filtre n'est activé, le logiciel est disponible pour tous les appareils."
7640
7646
 
7647
+ msgid "Ignore case when logging in"
7648
+ msgstr "Ignorer la casse lors de la connexion"
7649
+
7641
7650
  msgid "Ignore empty values"
7642
7651
  msgstr "Ignorer les valeurs vides"
7643
7652
 
@@ -10339,6 +10348,9 @@ msgstr "En ligne"
10339
10348
  msgid "Online`type of checking`"
10340
10349
  msgstr "En ligne"
10341
10350
 
10351
+ msgid "Only a tenant administrator can configure the \"Ignore case when logging in\" option."
10352
+ msgstr "Seul un administrateur gérant peut configurer l'option \"Ignorer casse lors de la connexion\"."
10353
+
10342
10354
  msgid "Only active contracts with free slots are displayed."
10343
10355
  msgstr "Seuls les contrats actifs avec des emplacements libres sont affichés."
10344
10356
 
@@ -14837,6 +14849,9 @@ msgstr ""
14837
14849
  "\n"
14838
14850
  "Avec cette prodécure, le nouveau matériel est toujours relié aux informations créées par son prédécesseur."
14839
14851
 
14852
+ msgid "The feature \"Ignore case when logging in\" is not available."
14853
+ msgstr "La fonction \"Ignorer la casse lors de la connexion\" n'est pas disponible."
14854
+
14840
14855
  msgid "The file is empty."
14841
14856
  msgstr "Ce fichier est vide."
14842
14857
 
@@ -3564,6 +3564,9 @@ msgstr "Kan het bestand niet downloaden: object met ID \"{{ id }}\" is geen geld
3564
3564
  msgid "Could not download the log file."
3565
3565
  msgstr "Kon het logbestand niet downloaden."
3566
3566
 
3567
+ 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
+ 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
+
3567
3570
  msgid "Could not execute bulk operation on an empty group. Group with ID \"{{groupId}}\" has no child assets."
3568
3571
  msgstr "Kon bulkbewerking niet uitvoeren voor een lege groep. Groep met ID \"{{groupId}}\" heeft geen onderliggende assets."
3569
3572
 
@@ -7628,6 +7631,9 @@ msgstr "Als dit is ingeschakeld, worden lege waarden genegeerd voor alle onderst
7628
7631
  msgid "If selected, it will process the result of the request using response templates."
7629
7632
  msgstr "Indien geselecteerd, zal het resultaat van het verzoek met behulp van antwoordsjablonen worden verwerkt."
7630
7633
 
7634
+ msgid "If selected, the letter case of the username does not matter during login."
7635
+ msgstr "Indien geselecteerd, maakt het bij aanmelden niet uit of de gebruikersnaam hoofdletters bevat."
7636
+
7631
7637
  msgid "If selected, then every request needs to use the same \"User-Agent\" header as the first request which initiated the session."
7632
7638
  msgstr "Als dit is geselecteerd, moet elke aanvraag dezelfde \"User-Agent\"-kopregel gebruiken als de eerste aanvraag die de sessie heeft geïnitieerd."
7633
7639
 
@@ -7637,6 +7643,9 @@ msgstr "Als de filter is ingesteld, zal de firmware alleen verschijnen voor inst
7637
7643
  msgid "If the filter is set, the software will show up for installation only for devices of that type. If no filter is set, it will be available for all devices."
7638
7644
  msgstr "Als de filter is ingesteld, zal de software alleen verschijnen voor installatie bij apparaten van dat type. Als geen filter is ingesteld, zal hij voor all apparaten beschikbaar zijn."
7639
7645
 
7646
+ msgid "Ignore case when logging in"
7647
+ msgstr "Hoofdletters negeren bij aanmelden"
7648
+
7640
7649
  msgid "Ignore empty values"
7641
7650
  msgstr "Lege waarden negeren"
7642
7651
 
@@ -10338,6 +10347,9 @@ msgstr "Online"
10338
10347
  msgid "Online`type of checking`"
10339
10348
  msgstr "Online"
10340
10349
 
10350
+ msgid "Only a tenant administrator can configure the \"Ignore case when logging in\" option."
10351
+ msgstr "Alleen een tenant administrator kan de optie \"Hoofdletters negeren bij aanmelden\" configureren."
10352
+
10341
10353
  msgid "Only active contracts with free slots are displayed."
10342
10354
  msgstr "Er worden actieve contracten met vrije slots weergegeven."
10343
10355
 
@@ -14836,6 +14848,9 @@ msgstr ""
14836
14848
  "\n"
14837
14849
  "Bij deze procedure is de nieuwe hardware nog gekoppeld aan de informatie die door zijn voorganger werd gemaakt."
14838
14850
 
14851
+ msgid "The feature \"Ignore case when logging in\" is not available."
14852
+ msgstr "De functie \"Hoofdletters negeren bij aanmelden\" is niet beschikbaar."
14853
+
14839
14854
  msgid "The file is empty."
14840
14855
  msgstr "Het bestand is leeg."
14841
14856
 
@@ -3584,6 +3584,9 @@ msgstr "Nie udało się pobrać pliku: obiekt o ID „{{ id }}” nie jest prawi
3584
3584
  msgid "Could not download the log file."
3585
3585
  msgstr "Nie można pobrać pliku dziennika."
3586
3586
 
3587
+ 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
+ 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
+
3587
3590
  msgid "Could not execute bulk operation on an empty group. Group with ID \"{{groupId}}\" has no child assets."
3588
3591
  msgstr "Nie można wykonać operacji zbiorczej na pustej grupie. Grupa o identyfikatorze „{{groupId}}” nie ma zasobów podrzędnych."
3589
3592
 
@@ -7649,6 +7652,9 @@ msgstr "W przypadku zaznaczenia tej opcji puste wartości będą ignorowane we w
7649
7652
  msgid "If selected, it will process the result of the request using response templates."
7650
7653
  msgstr "W przypadku zaznaczenia tej opcji wynik żądania będzie przetwarzany przy użyciu szablonów odpowiedzi."
7651
7654
 
7655
+ msgid "If selected, the letter case of the username does not matter during login."
7656
+ msgstr "W przypadku zaznaczenia tej opcji wielkość liter nazwy użytkownika nie ma znaczenia podczas logowania."
7657
+
7652
7658
  msgid "If selected, then every request needs to use the same \"User-Agent\" header as the first request which initiated the session."
7653
7659
  msgstr "W przypadku zaznaczenia tej opcji każde żądanie musi używać tego samego nagłówka „User-Agent” co pierwsze żądanie, które zainicjowało sesję."
7654
7660
 
@@ -7658,6 +7664,9 @@ msgstr "W przypadku ustawienia filtru oprogramowanie sprzętowe będzie wyświet
7658
7664
  msgid "If the filter is set, the software will show up for installation only for devices of that type. If no filter is set, it will be available for all devices."
7659
7665
  msgstr "W przypadku ustawienia filtru oprogramowanie będzie wyświetlane na potrzeby instalacji jedynie dla urządzeń tego typu. Jeśli nie zostanie ustawiony żaden filtr, będzie dostępne dla wszystkich urządzeń."
7660
7666
 
7667
+ msgid "Ignore case when logging in"
7668
+ msgstr "Ignoruj wielkość liter podczas logowania"
7669
+
7661
7670
  msgid "Ignore empty values"
7662
7671
  msgstr "Ignoruj puste wartości"
7663
7672
 
@@ -10362,6 +10371,9 @@ msgstr "Online"
10362
10371
  msgid "Online`type of checking`"
10363
10372
  msgstr "Online"
10364
10373
 
10374
+ msgid "Only a tenant administrator can configure the \"Ignore case when logging in\" option."
10375
+ msgstr "Tylko administrator tenanta może skonfigurować opcję \"Ignoruj wielkość liter podczas logowania\"."
10376
+
10365
10377
  msgid "Only active contracts with free slots are displayed."
10366
10378
  msgstr "Wyświetlane są tylko aktywne kontrakty z wolnymi miejscami."
10367
10379
 
@@ -14862,6 +14874,9 @@ msgstr ""
14862
14874
  "\n"
14863
14875
  "Dzięki tej procedurze nowy sprzęt będzie powiązany z danymi wytworzonymi przez sprzęt poprzedni."
14864
14876
 
14877
+ msgid "The feature \"Ignore case when logging in\" is not available."
14878
+ msgstr "Funkcja \"Ignoruj wielkość liter podczas logowania\" jest niedostępna."
14879
+
14865
14880
  msgid "The file is empty."
14866
14881
  msgstr "Plik jest pusty."
14867
14882
 
@@ -3564,6 +3564,9 @@ msgstr "Não foi possível baixar o arquivo: o objeto com a ID \"{{ id }}\" não
3564
3564
  msgid "Could not download the log file."
3565
3565
  msgstr "Não foi possível baixar o arquivo de log."
3566
3566
 
3567
+ 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
+ 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
+
3567
3570
  msgid "Could not execute bulk operation on an empty group. Group with ID \"{{groupId}}\" has no child assets."
3568
3571
  msgstr "Não é possível executar a operação em massa em um grupo vazio. O grupo com a ID \"{{groupId}}\" não tem ativos secundários."
3569
3572
 
@@ -7628,6 +7631,9 @@ msgstr "Se selecionado, ignorará valores vazios em todos os recursos abaixo."
7628
7631
  msgid "If selected, it will process the result of the request using response templates."
7629
7632
  msgstr "Se selecionado, processará o resultado da solicitação usando templates de resposta."
7630
7633
 
7634
+ msgid "If selected, the letter case of the username does not matter during login."
7635
+ msgstr "Se selecionada, as letras maiúsculas e minúsculas do nome de usuário não importam durante o login."
7636
+
7631
7637
  msgid "If selected, then every request needs to use the same \"User-Agent\" header as the first request which initiated the session."
7632
7638
  msgstr "Se selecionado, então cada solicitação precisa usar o mesmo cabeçalho\"User-Agent\" como a primeira solicitação que iniciou a sessão."
7633
7639
 
@@ -7637,6 +7643,9 @@ msgstr "Se o filtro estiver configurado, o firmware aparecerá para instalação
7637
7643
  msgid "If the filter is set, the software will show up for installation only for devices of that type. If no filter is set, it will be available for all devices."
7638
7644
  msgstr "Se o filtro estiver configurado, o software aparecerá para instalação apenas para dispositivos desse tipo. Se nenhum filtro estiver configurado, ele estará disponível para todos os dispositivos."
7639
7645
 
7646
+ msgid "Ignore case when logging in"
7647
+ msgstr "Ignorar maiúsculas e minúsculas ao fazer login"
7648
+
7640
7649
  msgid "Ignore empty values"
7641
7650
  msgstr "Ignorar valores vazios"
7642
7651
 
@@ -10338,6 +10347,9 @@ msgstr "Online"
10338
10347
  msgid "Online`type of checking`"
10339
10348
  msgstr "Online"
10340
10349
 
10350
+ msgid "Only a tenant administrator can configure the \"Ignore case when logging in\" option."
10351
+ msgstr "Somente um administrador de tenant pode configurar a opção \"Ignorar maiúsculas e minúsculas ao fazer login\"."
10352
+
10341
10353
  msgid "Only active contracts with free slots are displayed."
10342
10354
  msgstr "Somente são exibidos contratos com slots livres."
10343
10355
 
@@ -14836,6 +14848,9 @@ msgstr ""
14836
14848
  "\n"
14837
14849
  "Com este procedimento, o novo hardware pode continuar vinculado à informação que foi criada pelo seu antecessor."
14838
14850
 
14851
+ msgid "The feature \"Ignore case when logging in\" is not available."
14852
+ msgstr "O recurso \"Ignorar maiúsculas e minúsculas ao fazer login\" não está disponível."
14853
+
14839
14854
  msgid "The file is empty."
14840
14855
  msgstr "O arquivo está vazio."
14841
14856
 
@@ -1 +1 @@
1
- "use strict";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 ownKeys(t,e){var r,n=Object.keys(t);return Object.getOwnPropertySymbols&&(r=Object.getOwnPropertySymbols(t),e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)),n}function _objectSpread(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?ownKeys(Object(r),!0).forEach(function(e){_defineProperty(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):ownKeys(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}function _defineProperty(e,t,r){return(t=_toPropertyKey(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _toPropertyKey(e){e=_toPrimitive(e,"string");return"symbol"==_typeof(e)?e:String(e)}function _toPrimitive(e,t){if("object"!=_typeof(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0===r)return("string"===t?String:Number)(e);r=r.call(e,t||"default");if("object"!=_typeof(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}function _toConsumableArray(e){return _arrayWithoutHoles(e)||_iterableToArray(e)||_unsupportedIterableToArray(e)||_nonIterableSpread()}function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _unsupportedIterableToArray(e,t){var r;if(e)return"string"==typeof e?_arrayLikeToArray(e,t):"Map"===(r="Object"===(r=Object.prototype.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:r)||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?_arrayLikeToArray(e,t):void 0}function _iterableToArray(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function _arrayWithoutHoles(e){if(Array.isArray(e))return _arrayLikeToArray(e)}function _arrayLikeToArray(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}!function(){function e(o,u,e,r,t,n,i){var c;o.placeholder=i("Device's name or value of any device's property"),o.isDeviceSelected=o.isDeviceSelected||function(){return!(!_.isUndefined(P())||!o.selectRequired)},o.selectRoot=o.selectRoot||function(){b(c)},o.isSelectedRoot=o.isSelectedRoot||P,o.select=o.select||b,o.clickSelect=function(e){o.select(e,o),o.form&&(o.form.$setDirty(),o.form.$setValidity("deviceSelected",!0))},o.isSelected=o.isSelected||D,o.isSelectedById=o.isSelectedById||S,o.isSelectionEmpty=o.isSelectionEmpty||function(){return!o.selectedChildDevice},o.search=s,o.searchData={},o.propagateToggle={},o.icon=function(){return o.loading?"circle-o-notch":"search"},o.checkEnter=function(e){e.keyCode===j&&s(o.searchData.text)},o.getRootName=function(e){return e||i("Root Device")},o.emptySelectionAvailable=_.result(o,"emptySelectionAvailable")||!1,o.emptySelectionIcon=_.result(o,"emptySelectionIcon")||"",o.emptySelectionLabel=_.result(o,"emptySelectionLabel")||i("None"),o.readOnlyInfoText=_.result(o,"readOnlyInfo")||i("Selection change is disabled."),o.getScope=function(){return o},o.$watch("parent",a),o.$watch("selectedChildDevice",m),o.$on("selectDevice",O);function a(e,t){!e||t&&e.id&&e.id===t||(_.isObjectLike(e)?u.when(e):n.detail(e).then(r.getResData)).then(function(e){return h(e),o.parentDevice=e,o.top&&(c=e,o.root=c,o.selectedChildDevice||!e.isDevice&&!o.groupsSelectable||(o.selectedChildDevice=e)),e}).then(f).then(v).then(l)}function l(e,t){e=(o.children||[]).concat(e);o.children=_.uniqBy(e,"id"),o.truncated=!_.isUndefined(t)&&t}function s(e){o.propagateToggle.value=!1,_.remove(o.children,function(e){return!S(e)}),o.loading=!0,d({text:o.searchData.lastText=e}).then(p).finally(function(){o.loading=!1})}function d(e){function c(e){a++;var n,t=e.statistics.pageSize,r=e.paging.next,i=e.length>=t,o=(n=function(e){return _(e).map(_.property("childDevices.references")).flatten().map(_.property("managedObject.id")).uniq().value()}(o=e),_.filter(o,function(e){return e&&(S(e)||e.c8y_IsDevice||y(e)||(r=n,function(e){return _.get(e,"deviceParents.references.length")}(t=e)&&!_.includes(r,t.id)))&&!("c8y_OpcuaNode"===e.type);var t,r})),o=(l=[].concat(_toConsumableArray(l),_toConsumableArray(o))).length>t,r=r&&i;return l.length>=t||10<=a||!r?(i=o||r,u.resolve({mos:_.take(l,t),truncated:i})):e.paging.next().then(c)}var a=0,l=[];return n.list(_objectSpread(_objectSpread({},e),{},{withParents:!0})).then(c)}function p(e){var t=e.mos,r=e.truncated;return u.resolve(t).then(v).then(function(e){return l(e,r)})}function y(e){return!!e.c8y_IsDeviceGroup}function f(e){return t[y(e)?"childAssets":"childDevices"](e)}function h(e){var t=!y(e),r=t?"childDevices":"childAssets";e.isDevice=t,e.__children=e[r]&&e[r].references||[]}function v(e){return _.map(e,function(e){return h(e),S(e)&&b(e),o.parent&&(e.openChildren=!1,Array.isArray(o.parent.idPath)?(e.idPath=_.cloneDeep(o.parent.idPath),e.idPath.push(o.parent.id)):e.idPath=[o.parent.id]),e})}function m(e){var t;e&&e.id&&(o.$parent.propagateToggle?o.propagateToggle=o.$parent.propagateToggle:o.propagateToggle={value:!0},t=e.idPath?e.idPath[0]:e.id,!o.deviceSelectorForm.$dirty&&o.selectedChildDeviceId&&o.selectedChildDeviceId!==e.id&&o.deviceSelectorForm.$setDirty(),o.idPath=e.idPath,o.selectedChildDeviceId=e.id,o.children||!o.top||o.parent||d({ids:t}).then(p))}function b(e,t){var r=["id","type","name"],n=t?[g(r,e)]:[];(t||o).$emit("selectDevice",n,r,e)}function g(e,r){return _.reduce(e,function(e,t){return e[t]=_.get(r,[t]),e},{})}function S(e){return e&&o.selectedChildDevice&&o.selectedChildDevice.id===e.id}function D(e){return S(e)}function P(){return D(c)||o.selectedChildDevice&&(c&&c.id)===o.selectedChildDevice.id}function O(e,t,r,n){var i,r=o.top?_.reduce(r,function(e,t){return e[t]="_root",e},{}):g(r,o.parentDevice);t.push(r),o.top&&(i=t.reverse(),r=_.reduce(i[0],function(e,t,r){return e["path_".concat(r)]=_.map(i,r).join("/"),e},{}),e.stopPropagation(),o.selectedChildDevice=n,o.contextPaths=r,o.onSelect({selDevice:n,contextPaths:r}))}_.assign(this,{$onInit:function(){void 0!==o.selectedChildDevice&&e(function(){o.form.$setValidity("deviceSelected",!0)},500)}});var j=13}e.$inject=["$scope","$q","$timeout","c8yBase","c8yDevices","c8yInventory","gettext"],angular.module("c8y.deviceSelector").controller("DeviceSelectorComboCtrl",e)}();
1
+ "use strict";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 ownKeys(t,e){var r,n=Object.keys(t);return Object.getOwnPropertySymbols&&(r=Object.getOwnPropertySymbols(t),e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)),n}function _objectSpread(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?ownKeys(Object(r),!0).forEach(function(e){_defineProperty(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):ownKeys(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}function _defineProperty(e,t,r){return(t=_toPropertyKey(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _toPropertyKey(e){e=_toPrimitive(e,"string");return"symbol"==_typeof(e)?e:String(e)}function _toPrimitive(e,t){if("object"!=_typeof(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0===r)return("string"===t?String:Number)(e);r=r.call(e,t||"default");if("object"!=_typeof(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}function _toConsumableArray(e){return _arrayWithoutHoles(e)||_iterableToArray(e)||_unsupportedIterableToArray(e)||_nonIterableSpread()}function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _unsupportedIterableToArray(e,t){var r;if(e)return"string"==typeof e?_arrayLikeToArray(e,t):"Map"===(r="Object"===(r=Object.prototype.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:r)||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?_arrayLikeToArray(e,t):void 0}function _iterableToArray(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function _arrayWithoutHoles(e){if(Array.isArray(e))return _arrayLikeToArray(e)}function _arrayLikeToArray(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}!function(){function e(s,u,e,r,t,n,i){var o;s.placeholder=i("Device's name or value of any device's property"),s.isDeviceSelected=s.isDeviceSelected||function(){return!(!_.isUndefined(O())||!s.selectRequired)},s.selectRoot=s.selectRoot||function(){b(o)},s.isSelectedRoot=s.isSelectedRoot||O,s.select=s.select||b,s.clickSelect=function(e){s.select(e,s),s.form&&(s.form.$setDirty(),s.form.$setValidity("deviceSelected",!0))},s.isSelected=s.isSelected||D,s.isSelectedById=s.isSelectedById||S,s.isSelectionEmpty=s.isSelectionEmpty||function(){return!s.selectedChildDevice},s.search=l,s.searchData={},s.propagateToggle={},s.icon=function(){return s.loading?"circle-o-notch":"search"},s.checkEnter=function(e){e.keyCode===A&&l(s.searchData.text)},s.getRootName=function(e){return e||i("Root Device")},s.emptySelectionAvailable=_.result(s,"emptySelectionAvailable")||!1,s.emptySelectionIcon=_.result(s,"emptySelectionIcon")||"",s.emptySelectionLabel=_.result(s,"emptySelectionLabel")||i("None"),s.readOnlyInfoText=_.result(s,"readOnlyInfo")||i("Selection change is disabled."),s.getScope=function(){return s},s.$watch("parent",c),s.$watch("selectedChildDevice",m),s.$on("selectDevice",P);function c(e,t){!e||t&&e.id&&e.id===t||(_.isObjectLike(e)?u.when(e):n.detail(e).then(r.getResData)).then(function(e){return h(e),s.parentDevice=e,s.top&&(o=e,s.root=o,s.selectedChildDevice||!e.isDevice&&!s.groupsSelectable||(s.selectedChildDevice=e)),e}).then(y).then(v).then(a)}function a(e,t){e=(s.children||[]).concat(e);s.children=_.uniqBy(e,"id"),s.truncated=!_.isUndefined(t)&&t}function l(e){s.propagateToggle.value=!1,_.remove(s.children,function(e){return!S(e)}),s.loading=!0,s.searchData.lastText=e,d({text:e}).then(f).finally(function(){s.loading=!1})}function d(e){!s.searchOnlyChildAssetsOf||void 0!==e.ids||void 0!==e.text&&""!==e.text||(e.ids=s.searchOnlyChildAssetsOf.id);function c(e){a++;var t=e.statistics.pageSize,r=e.paging.next,n=e.length>=t;i=function(e){return _(e).map(_.property("childDevices.references")).flatten().map(_.property("managedObject.id")).uniq().value()}(o=e);var i,o=function(e){var r=[];{var n;s.searchOnlyChildAssetsOf?(n=s.searchOnlyChildAssetsOf.id,_.forEach(e,function(t){t.id===n&&r.push(t),t&&t.assetParents&&t.assetParents.references&&t.assetParents.references.forEach(function(e){e.managedObject.id===n&&r.push(t)})})):r=e}return r}(_.filter(o,function(e){return e&&(S(e)||e.c8y_IsDevice||p(e)||(r=i,function(e){return _.get(e,"deviceParents.references.length")}(t=e)&&!_.includes(r,t.id)))&&!("c8y_OpcuaNode"===e.type);var t,r})),o=(l=[].concat(_toConsumableArray(l),_toConsumableArray(o))).length>t,r=r&&n;return l.length>=t||10<=a||!r?(n=o||r,u.resolve({mos:_.take(l,t),truncated:n})):e.paging.next().then(c)}var a=0,l=[];return n.list(_objectSpread(_objectSpread({},e),{},{withParents:!0})).then(c)}function f(e){var t=e.mos,r=e.truncated;return u.resolve(t).then(v).then(function(e){return a(e,r)})}function p(e){return!!e.c8y_IsDeviceGroup}function y(e){return t[p(e)?"childAssets":"childDevices"](e)}function h(e){var t=!p(e),r=t?"childDevices":"childAssets";e.isDevice=t,e.__children=e[r]&&e[r].references||[]}function v(e){return _.map(e,function(e){return h(e),S(e)&&b(e),s.parent&&(e.openChildren=!1,Array.isArray(s.parent.idPath)?(e.idPath=_.cloneDeep(s.parent.idPath),e.idPath.push(s.parent.id)):e.idPath=[s.parent.id]),e})}function m(e){var t;e&&e.id&&(s.$parent.propagateToggle?s.propagateToggle=s.$parent.propagateToggle:s.propagateToggle={value:!0},t=e.idPath?e.idPath[0]:e.id,!s.deviceSelectorForm.$dirty&&s.selectedChildDeviceId&&s.selectedChildDeviceId!==e.id&&s.deviceSelectorForm.$setDirty(),s.idPath=e.idPath,s.selectedChildDeviceId=e.id,s.children||!s.top||s.parent||d({ids:t}).then(f))}function b(e,t){var r=["id","type","name"],n=t?[g(r,e)]:[];(t||s).$emit("selectDevice",n,r,e)}function g(e,r){return _.reduce(e,function(e,t){return e[t]=_.get(r,[t]),e},{})}function S(e){return e&&s.selectedChildDevice&&s.selectedChildDevice.id===e.id}function D(e){return S(e)}function O(){return D(o)||s.selectedChildDevice&&(o&&o.id)===s.selectedChildDevice.id}function P(e,t,r,n){var i,r=s.top?_.reduce(r,function(e,t){return e[t]="_root",e},{}):g(r,s.parentDevice);t.push(r),s.top&&(i=t.reverse(),r=_.reduce(i[0],function(e,t,r){return e["path_".concat(r)]=_.map(i,r).join("/"),e},{}),e.stopPropagation(),s.selectedChildDevice=n,s.contextPaths=r,s.onSelect({selDevice:n,contextPaths:r}))}_.assign(this,{$onInit:function(){void 0!==s.selectedChildDevice&&e(function(){s.form.$setValidity("deviceSelected",!0)},500)}});var A=13}e.$inject=["$scope","$q","$timeout","c8yBase","c8yDevices","c8yInventory","gettext"],angular.module("c8y.deviceSelector").controller("DeviceSelectorComboCtrl",e)}();
@@ -1 +1 @@
1
- "use strict";angular.module("c8y.deviceSelector").directive("c8yDeviceSelectorComboDevices",function(){return{restrict:"A",link:function(e,i){e.__el=i;var t=e.depth||0;function l(){e.child.openChildren=e.idPath&&!!e.idPath[t]&&e.idPath[t]===e.child.id&&e.selectedChildDevice.id!==e.child.id,e.child.openChildren&&e.toggleChildren(e,e.child)}e.$evalAsync(function(){return e.propagateToggle.value&&l()})}}}).directive("c8yDeviceSelectorCombo",["$compile",function(t){return{restrict:"EA",scope:{parent:"=?",selectedChildDevice:"=?",selectedChildDeviceId:"=?",contextPaths:"=?",onSelect:"&",groupsSelectable:"=?",selectRequired:"=?",idPath:"=?",emptySelectionAvailable:"&?",emptySelectionIcon:"&?",emptySelectionLabel:"&?",readOnly:"<",readOnlyInfo:"&?"},templateUrl:":::PLUGIN_PATH:::/views/deviceSelectorCombo.html",controller:"DeviceSelectorComboCtrl",require:"?^form",link:{post:function(o,c,e,i){var n=t('<div ng-include="\':::PLUGIN_PATH:::/views/deviceSelectorCombo.html\'" ng-controller="DeviceSelectorComboCtrl"></div>');o.top=!0,o.form=i,o.form&&o.selectedChildDevice&&!o.selectedChildDevice.id&&o.form.$setValidity("deviceSelected",!1),o.toggleChildren=function(e,i,t){return o._toggleChildren($(e.target),i,t)},o._toggleChildren=function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:c,i=1<arguments.length&&void 0!==arguments[1]?arguments[1]:o,t=2<arguments.length?arguments[2]:void 0,l=e.hasClass("deviceRow")?e:e.parents(".deviceRow").first();t.openChildren=!t.openChildren,t.openChildren?(e=i.$new(),(t.childrenNewScope=e).openChildren=!1,e.propagateToggle=i.propagateToggle,e.parent=t,e.depth=_.isNumber(i.depth)?i.depth+1:1,e.children=[],e.top=!1,n(e,function(e){l.append(e)})):(l.children().last().remove(),t.childrenNewScope.$destroy(),delete t.childrenNewScope)}}}}}]);
1
+ "use strict";angular.module("c8y.deviceSelector").directive("c8yDeviceSelectorComboDevices",function(){return{restrict:"A",link:function(e,i){e.__el=i;var t=e.depth||0;function l(){e.child.openChildren=e.idPath&&!!e.idPath[t]&&e.idPath[t]===e.child.id&&e.selectedChildDevice.id!==e.child.id,e.child.openChildren&&e.toggleChildren(e,e.child)}e.$evalAsync(function(){return e.propagateToggle.value&&l()})}}}).directive("c8yDeviceSelectorCombo",["$compile",function(t){return{restrict:"EA",scope:{parent:"=?",selectedChildDevice:"=?",selectedChildDeviceId:"=?",contextPaths:"=?",onSelect:"&",groupsSelectable:"=?",selectRequired:"=?",idPath:"=?",emptySelectionAvailable:"&?",emptySelectionIcon:"&?",emptySelectionLabel:"&?",readOnly:"<",readOnlyInfo:"&?",searchOnlyChildAssetsOf:"=?"},templateUrl:":::PLUGIN_PATH:::/views/deviceSelectorCombo.html",controller:"DeviceSelectorComboCtrl",require:"?^form",link:{post:function(o,c,e,i){var n=t('<div ng-include="\':::PLUGIN_PATH:::/views/deviceSelectorCombo.html\'" ng-controller="DeviceSelectorComboCtrl"></div>');o.top=!0,o.form=i,o.form&&o.selectedChildDevice&&!o.selectedChildDevice.id&&o.form.$setValidity("deviceSelected",!1),o.toggleChildren=function(e,i,t){return o._toggleChildren($(e.target),i,t)},o._toggleChildren=function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:c,i=1<arguments.length&&void 0!==arguments[1]?arguments[1]:o,t=2<arguments.length?arguments[2]:void 0,l=e.hasClass("deviceRow")?e:e.parents(".deviceRow").first();t.openChildren=!t.openChildren,t.openChildren?(e=i.$new(),(t.childrenNewScope=e).openChildren=!1,e.propagateToggle=i.propagateToggle,e.parent=t,e.depth=_.isNumber(i.depth)?i.depth+1:1,e.children=[],e.top=!1,n(e,function(e){l.append(e)})):(l.children().last().remove(),t.childrenNewScope.$destroy(),delete t.childrenNewScope)}}}}}]);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@c8y/ng1-modules",
3
- "version": "1019.21.1",
3
+ "version": "1019.23.1",
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 e(o,e,t,i,n,l){var s=this;function r(e){s.role=e,c();e=e.roles;e=(e||{}).references||[],s.selectedPermissions=_.map(e,"role.id")}function c(){i.listGlobalPermissions().then(a)}function a(e){s.permissions=e}function u(){s.globalRoleDetailForm.$setDirty()}function f(e){return s.saving=!0,e.finally(function(){s.saving=!1}),e}_.assign(s,{$onInit:function(){(function(){var e=s.id,n=s.duplicateId;("new"===e?function(e){var n=i.newGlobalRole(e);return n.then(function(){e&&l(u)}),n}(n):function(e){return t.global.detail(e).then(o.getResData)}(e)).then(r)})(),c()},STRINGS:i.STRINGS,helpLink:n.getUserGuideLink(i.STRINGS.LINKS.ROLES_INVENTORY),onSaveName:function(e){return f(i.saveGlobalRoleName(s.role,e))},cancel:i.list,save:function(){return f(i.saveGlobalRole(s.role,s.selectedPermissions))},hasAppPermissions:function(){var o=/^ROLE_APPLICATION/;return _.some(s.selectedPermissions,function(e,n){return e&&o.test(n)})},onSelectedRolesChange:function(e){s.selectedPermissions=e,u()}})}e.$inject=["c8yBase","c8yPermissions","c8yRoles","c8yRolesUi","c8yDocs","$timeout"],angular.module("c8y.roles").component("c8yRoleDetailGlobal",{templateUrl:":::PLUGIN_PATH:::/detail/roleDetailGlobal.html",bindings:{id:"<",duplicateId:"<"},controllerAs:"vm",controller:e})}();
1
+ "use strict";!function(){function e(t,e,o,i,n,l){var s=this;function r(e){s.role=e,a();e=e.roles;e=(e||{}).references||[],s.selectedPermissions=_.map(e,"role.id")}function a(){i.listGlobalPermissions().then(c)}function c(e){s.permissions=e}function u(){s.globalRoleDetailForm.$setDirty()}function f(e){return s.saving=!0,e.finally(function(){s.saving=!1}),e}_.assign(s,{$onInit:function(){(function(){var e=s.id,n=s.duplicateId;("new"===e?function(e){var n=i.newGlobalRole(e);return n.then(function(){e&&l(u)}),n}(n):function(e){return o.global.detail(e).then(t.getResData)}(e)).then(r)})(),a()},STRINGS:i.STRINGS,helpLink:n.getUserGuideLink(i.STRINGS.LINKS.ROLES_INVENTORY),onSaveName:function(e){return f(i.saveGlobalRoleName(s.role,e))},cancel:i.list,save:function(){return f(i.saveGlobalRole(s.role,s.selectedPermissions))},hasAppPermissions:function(){var t=/^ROLE_APPLICATION/;return _.some(s.selectedPermissions,function(e,n){return e&&t.test(n)})},onSelectedRolesChange:function(e){s.selectedPermissions=e,u()}})}e.$inject=["c8yBase","c8yPermissions","c8yRoles","c8yRolesUi","c8yDocs","$timeout"],angular.module("c8y.roles").component("c8yRoleDetailGlobal",{templateUrl:":::PLUGIN_PATH:::/detail/roleDetailGlobal.html",bindings:{id:"<",duplicateId:"<",tabName:"<"},controllerAs:"vm",controller:e})}();
@@ -2,13 +2,10 @@
2
2
 
3
3
  <c8y-breadcrumbs-set>
4
4
  <c8y-breadcrumbs-item
5
- icon="connected-people"
6
5
  path="#roles/global_roles"
7
- label="{{ 'Global roles' | translate }}"
6
+ label="{{ vm.tabName }}"
8
7
  ></c8y-breadcrumbs-item>
9
8
  <c8y-breadcrumbs-item
10
- icon="c8y-users"
11
- path="#roles"
12
9
  label="{{ 'Roles' | translate }}"
13
10
  ></c8y-breadcrumbs-item>
14
11
  <c8y-breadcrumbs-item
@@ -1 +1 @@
1
- "use strict";!function(){function n(t,e,o,i,n){var r=this;function a(n){return r.saving=!0,n.finally(function(){r.saving=!1}),n}function l(n){return"SUPPORT"===n.name&&!r.isTopTenant}_.assign(r,{$onInit:function(){!function(){var n=r.id,e=r.duplicateId;("new"===n?i.newInventoryRole(e):o.detail(n).then(t.getResData)).then(function(n){r.role=n})}()},$onChanges:function(n){n.isTopTenant&&(r.permissionScopes=function(){var n=e.SCOPES.values();return _.reject(n,l)}())},STRINGS:i.STRINGS,helpLink:n.getUserGuideLink(i.STRINGS.LINKS.ROLES_INVENTORY),onSaveName:function(n){return a(i.saveInventoryRoleName(r.role,n))},cancel:i.list,save:function(){return a(i.saveInventoryRole(r.role))}})}n.$inject=["c8yBase","c8yPermissions","c8yRoles","c8yRolesUi","c8yDocs"],angular.module("c8y.roles").component("c8yRoleDetailInventory",{templateUrl:":::PLUGIN_PATH:::/detail/roleDetailInventory.html",bindings:{id:"<",duplicateId:"<",isTopTenant:"<"},controllerAs:"vm",controller:n})}();
1
+ "use strict";!function(){function n(t,e,o,i,n){var a=this;function r(n){return a.saving=!0,n.finally(function(){a.saving=!1}),n}function l(n){return"SUPPORT"===n.name&&!a.isTopTenant}_.assign(a,{$onInit:function(){!function(){var n=a.id,e=a.duplicateId;("new"===n?i.newInventoryRole(e):o.detail(n).then(t.getResData)).then(function(n){a.role=n})}()},$onChanges:function(n){n.isTopTenant&&(a.permissionScopes=function(){var n=e.SCOPES.values();return _.reject(n,l)}())},STRINGS:i.STRINGS,helpLink:n.getUserGuideLink(i.STRINGS.LINKS.ROLES_INVENTORY),onSaveName:function(n){return r(i.saveInventoryRoleName(a.role,n))},cancel:i.list,save:function(){return r(i.saveInventoryRole(a.role))}})}n.$inject=["c8yBase","c8yPermissions","c8yRoles","c8yRolesUi","c8yDocs"],angular.module("c8y.roles").component("c8yRoleDetailInventory",{templateUrl:":::PLUGIN_PATH:::/detail/roleDetailInventory.html",bindings:{id:"<",duplicateId:"<",isTopTenant:"<",tabName:"<"},controllerAs:"vm",controller:n})}();
@@ -2,14 +2,15 @@
2
2
 
3
3
  <c8y-breadcrumbs-set>
4
4
  <c8y-breadcrumbs-item
5
- path="#roles"
5
+ path="#roles/inventory_roles"
6
+ label="{{ vm.tabName }}"
7
+ ></c8y-breadcrumbs-item>
8
+ <c8y-breadcrumbs-item
6
9
  label="{{ 'Roles' | translate }}"
7
- icon="c8y-users"
8
10
  ></c8y-breadcrumbs-item>
9
11
  <c8y-breadcrumbs-item
10
- path="#roles/inventory_roles"
11
- label="{{ 'Inventory roles' | translate }}"
12
- icon="insurance-agent"
12
+ icon="c8y-accounts"
13
+ label="{{ 'Accounts' | translate }}"
13
14
  ></c8y-breadcrumbs-item>
14
15
  </c8y-breadcrumbs-set>
15
16
 
@@ -1 +1 @@
1
- "use strict";!function(){function e(n,o){var t=this;_.assign(t,{remove:function(e){o.removeAfterConfirmation(e).then(function(){t.onRemove({role:e})})},duplicate:o.duplicate,edit:o.edit,isUndeletable:o.isUndeletable,$onInit:function(){o.canCreate().then(function(e){t.canCreate=e})}}),n.loadNext=function(){t.onLoadNext()},n.$watch("vm.roles.paging",function(e){t.roles&&(t.roles=t.roles.sort(function(e,n){return e.name.localeCompare(n.name,void 0,{numeric:!0})})),n.paging=e,_.forEach(t.roles,function(e){e.name=e.name&&_.trim(e.name),e.description=e.description&&_.trim(e.description)})})}e.$inject=["$scope","c8yRolesUi"],angular.module("c8y.roles").component("c8yRolesList",{templateUrl:":::PLUGIN_PATH:::/list/rolesList.html",bindings:{roles:"<",addRole:"&",onRemove:"&",helpText:"<",onLoadNext:"&"},controllerAs:"vm",controller:e})}();
1
+ "use strict";!function(){function e(n,o){var t=this;_.assign(t,{remove:function(e){o.removeAfterConfirmation(e).then(function(){t.onRemove({role:e})})},duplicate:o.duplicate,edit:o.edit,isUndeletable:o.isUndeletable,$onInit:function(){o.canCreate().then(function(e){t.canCreate=e})}}),n.loadNext=function(){t.onLoadNext()},n.$watch("vm.roles.paging",function(e){t.roles&&(t.roles=t.roles.sort(function(e,n){return e.name.localeCompare(n.name,void 0,{numeric:!0})})),n.paging=e,_.forEach(t.roles,function(e){e.name=e.name&&_.trim(e.name),e.description=e.description&&_.trim(e.description)})})}e.$inject=["$scope","c8yRolesUi"],angular.module("c8y.roles").component("c8yRolesList",{templateUrl:":::PLUGIN_PATH:::/list/rolesList.html",bindings:{tabName:"<",roles:"<",addRole:"&",onRemove:"&",helpText:"<",onLoadNext:"&"},controllerAs:"vm",controller:e})}();
@@ -1,7 +1,8 @@
1
1
  <c8y-breadcrumbs-set>
2
2
  <c8y-breadcrumbs-item
3
- icon="c8y-accounts"
4
- path="#roles"
3
+ label= "{{ vm.tabName }}"
4
+ ></c8y-breadcrumbs-item>
5
+ <c8y-breadcrumbs-item
5
6
  label="{{ 'Roles' | translate }}"
6
7
  ></c8y-breadcrumbs-item>
7
8
  <c8y-breadcrumbs-item
@@ -1 +1 @@
1
- "use strict";!function(){function e(g,e,n){d.$inject=["$rootScope","$location","$q","gettextCatalog","c8yBase","c8yTitle","c8yModal","c8yAlert","c8yRoles","c8yPermissions","c8yRolesUiStrings"],c.$inject=["$routeParams","c8yTenant"];var y="roles",b="roles/inventory_roles",R="".concat(y,"/global/:roleId"),w="".concat(y,"/inventory/:roleId"),t="c8y-users",o={priority:1e3,icon:"connected-people",template:'<c8y-roles-list roles="vm.globalRoles" help-text="vm.globalHelpText" on-remove="vm.onRemove(role, vm.globalRoles)" add-role="vm.add(\'global\')" on-load-next="vm.loadNext(\'global\')"></c8y-roles-list>',name:g("Global roles"),controller:"c8yRolesOverviewCtrl",controllerAs:"vm"},r={icon:"insurance-agent",template:'<c8y-roles-list roles="vm.inventoryRoles" help-text="vm.inventoryHelpText" on-remove="vm.onRemove(role, vm.inventoryRoles)" add-role="vm.add(\'inventory\')" on-load-next="vm.loadNext(\'inventory\')"></c8y-roles-list>',name:g("Inventory roles"),controller:"c8yRolesOverviewCtrl",controllerAs:"vm"},a={template:'<c8y-role-detail-global id="vm.params.roleId" duplicate-id="vm.params.duplicate"></c8y-role-global-global>'},l={template:'<c8y-role-detail-inventory id="vm.params.roleId" duplicate-id="vm.params.duplicate" is-top-tenant="vm.isTopTenant"></c8y-role-detail-inventory>'},i={controllerAs:"vm",controller:c};function c(e,n){var t=this;_.assign(t,{isTopTenant:!1,params:e}),n.isCurrentUserTopTenant().then(function(e){t.isTopTenant=e})}var T=["READ","ADMIN","CREATE","UPDATE"],E="ROLE_USER_MANAGEMENT_ADMIN",s=["ROLE_USER_MANAGEMENT_READ",E];function u(){e.when("/".concat(y),o),e.when("/".concat(y),r),e.when("/".concat(R),_.assign(a,i)),e.when("/".concat(w),_.assign(l,i))}function d(r,t,a,l,o,e,i,c,s,n,u){return{ROUTE_LIST:y,STRINGS:u,listGlobalPermissions:function(){return n.listGlobal().then(function(e){return _.filter(e,function(e){return _.includes(T,e.access)})})},list:d,setListTitle:function(){e.changeTitle({title:g("Roles")})},add:m,edit:function(e){var n=s.isGlobal(e)?R:w;return function(e,n){e=o.getId(e),n=n.replace(/:\w+/,e);return t.search("duplicate",null),t.path(n)}(e,n)},duplicate:function(e){m(s.isGlobal(e)?"global":"inventory",e.id)},removeAfterConfirmation:function(e){var n={title:g("Delete role"),body:l.getString('You are about to delete role "{{name}}". Do you want to proceed?',e),labels:{ok:g("Delete")},status:"danger"},n=i(n),t=_.partial(s.remove,e),o=_.partial(s.global.remove,e),e=s.isGlobal(e)?o:t;return n.then(e).then(function(){return c.success(g("Role deleted."))}).catch(function(e){var n=_.get(e,"status");return n&&(422===n?c.warning(g("Role cannot be deleted because it is assigned to users.")):(n=e,n=_.get(n,"data",n),r.$emit("alert",{type:"danger",text:$("<div/>").text(l.getString(n.message)).html(),detailedData:n}))),a.reject(e)})},canCreate:function(){return n.hasAnyRole([E])},newInventoryRole:function(e){var n=a.when({name:l.getString("New inventory role"),permissions:[]});e&&(n=s.detail(e).then(function(e){var e=e.data,n={};return n.name="".concat(e.name," 2"),n.permissions=_.map(e.permissions,function(e){return _.omit(e,["id"])}),n}));return n},saveInventoryRole:function(e){var n=a.when();e.id||(n=v(e,e.name).catch(h(e.name)));return n.then(_.partial(s.save,e)).then(function(){return c.success(g("Inventory role saved."))}).then(d)},saveInventoryRoleName:function(n,t){return v(n,t).then(function(){var e;return n.id?e=s.update({id:n.id,name:t}).then(function(e){return n.name=t,e}):n.name=t,e},h(t))},newGlobalRole:function(e){var n=a.when({name:l.getString("New global role")});e&&(n=s.global.detail(e).then(function(e){e=_.pick(e.data,["name","roles","applications"]);return e.name+=" 2",e}));return n},saveGlobalRole:function(n,t){return(n.id?function(){var e=r.$new(!0);return e.role=n,i({templateUrl:":::PLUGIN_PATH:::/detail/roleGlobalSaveConfirm.html",title:g("Confirm saving changes?"),scope:e})}():a.when()).then(function(){var e=a.when();return(e=n.id?e:f(n,n.name).catch(h(n.name))).then(_.partial(s.global.save,n))}).then(function(e){return s.global.updateRoles(e,t)}).then(function(){return c.success(g("Global role saved."))}).then(d)},saveGlobalRoleName:function(n,t){return f(n,t).then(function(){var e=a.when();return n.id?e=s.global.update({id:n.id,name:t}).then(function(e){return n.name=t,e}):n.name=t,e},h(t))},isUndeletable:function(e){return s.isGlobal(e)&&("admins"===_.lowerCase(e.name)||"devices"===_.lowerCase(e.name)||n.hasRole(e,"ROLE_NO_DELETE"))}};function d(){var e=new RegExp("\\/roles\\/inventory\\/(\\w+)"),e=t.path().match(e),e="/".concat(e?b:y);t.path(e),t.search("duplicate",null)}function m(e,n){e=("global"===e?R:w).replace(/:\w+/,"new");t.path(e),n&&t.search("duplicate",n)}function v(n,t){return s.list().then(function(e){return p(e,n,t)})}function p(e,n,t){e=_.filter(e,function(e){return e.id!==n.id});return _.some(e,{name:t})&&a.reject({duplicate:!0})}function h(n){return function(e){return _.get(e,"duplicate")&&c.danger(l.getString('There is already a role with the name "{{name}}"',{name:n})),a.reject()}}function f(n,t){return s.global.list().then(function(e){return p(e,n,t)})}}return{$get:d,init:function(){u(),n.addNavigation({name:g("Roles"),parent:g("Accounts"),routerLinkExact:!1,priority:4900,path:y,icon:t,showIfPermissions:{anyRole:s}})},hookViews:u}}e.$inject=["gettext","c8yViewsProvider","c8yNavigatorProvider"],angular.module("c8y.roles").provider("c8yRolesUi",e)}();
1
+ "use strict";!function(){function e(g,e,n){v.$inject=["$rootScope","$location","$q","gettextCatalog","c8yBase","c8yTitle","c8yModal","c8yAlert","c8yRoles","c8yPermissions","c8yRolesUiStrings"],u.$inject=["$routeParams","c8yTenant"];var y="roles",b="roles/inventory_roles",R="".concat(y,"/global/:roleId"),w="".concat(y,"/inventory/:roleId"),t="c8y-users",o=g("Global roles"),a={priority:1e3,icon:"connected-people",template:"<c8y-roles-list tab-name=\"'".concat(o,'\' | translate" roles="vm.globalRoles" help-text="vm.globalHelpText" on-remove="vm.onRemove(role, vm.globalRoles)" add-role="vm.add(\'global\')" on-load-next="vm.loadNext(\'global\')"></c8y-roles-list>'),name:o,controller:"c8yRolesOverviewCtrl",controllerAs:"vm"},r=g("Inventory roles"),l={icon:"insurance-agent",template:"<c8y-roles-list tab-name=\"'".concat(r,'\' | translate" roles="vm.inventoryRoles" help-text="vm.inventoryHelpText" on-remove="vm.onRemove(role, vm.inventoryRoles)" add-role="vm.add(\'inventory\')" on-load-next="vm.loadNext(\'inventory\')"></c8y-roles-list>'),name:r,controller:"c8yRolesOverviewCtrl",controllerAs:"vm"},i={template:"<c8y-role-detail-global tab-name=\"'".concat(o,'\' | translate" id="vm.params.roleId" duplicate-id="vm.params.duplicate"></c8y-role-global-global>')},c={template:"<c8y-role-detail-inventory tab-name=\"'".concat(r,'\' | translate" id="vm.params.roleId" duplicate-id="vm.params.duplicate" is-top-tenant="vm.isTopTenant"></c8y-role-detail-inventory>')},s={controllerAs:"vm",controller:u};function u(e,n){var t=this;_.assign(t,{isTopTenant:!1,params:e}),n.isCurrentUserTopTenant().then(function(e){t.isTopTenant=e})}var T=["READ","ADMIN","CREATE","UPDATE"],E="ROLE_USER_MANAGEMENT_ADMIN",m=["ROLE_USER_MANAGEMENT_READ",E];function d(){e.when("/".concat(y),a),e.when("/".concat(y),l),e.when("/".concat(R),_.assign(i,s)),e.when("/".concat(w),_.assign(c,s))}function v(a,t,r,l,o,e,i,c,s,n,u){return{ROUTE_LIST:y,STRINGS:u,listGlobalPermissions:function(){return n.listGlobal().then(function(e){return _.filter(e,function(e){return _.includes(T,e.access)})})},list:m,setListTitle:function(){e.changeTitle({title:g("Roles")})},add:d,edit:function(e){var n=s.isGlobal(e)?R:w;return function(e,n){e=o.getId(e),n=n.replace(/:\w+/,e);return t.search("duplicate",null),t.path(n)}(e,n)},duplicate:function(e){d(s.isGlobal(e)?"global":"inventory",e.id)},removeAfterConfirmation:function(e){var n={title:g("Delete role"),body:l.getString('You are about to delete role "{{name}}". Do you want to proceed?',e),labels:{ok:g("Delete")},status:"danger"},n=i(n),t=_.partial(s.remove,e),o=_.partial(s.global.remove,e),e=s.isGlobal(e)?o:t;return n.then(e).then(function(){return c.success(g("Role deleted."))}).catch(function(e){var n=_.get(e,"status");return n&&(422===n?c.warning(g("Role cannot be deleted because it is assigned to users.")):(n=e,n=_.get(n,"data",n),a.$emit("alert",{type:"danger",text:$("<div/>").text(l.getString(n.message)).html(),detailedData:n}))),r.reject(e)})},canCreate:function(){return n.hasAnyRole([E])},newInventoryRole:function(e){var n=r.when({name:l.getString("New inventory role"),permissions:[]});e&&(n=s.detail(e).then(function(e){var e=e.data,n={};return n.name="".concat(e.name," 2"),n.permissions=_.map(e.permissions,function(e){return _.omit(e,["id"])}),n}));return n},saveInventoryRole:function(e){var n=r.when();e.id||(n=v(e,e.name).catch(h(e.name)));return n.then(_.partial(s.save,e)).then(function(){return c.success(g("Inventory role saved."))}).then(m)},saveInventoryRoleName:function(n,t){return v(n,t).then(function(){var e;return n.id?e=s.update({id:n.id,name:t}).then(function(e){return n.name=t,e}):n.name=t,e},h(t))},newGlobalRole:function(e){var n=r.when({name:l.getString("New global role")});e&&(n=s.global.detail(e).then(function(e){e=_.pick(e.data,["name","roles","applications"]);return e.name+=" 2",e}));return n},saveGlobalRole:function(n,t){return(n.id?function(){var e=a.$new(!0);return e.role=n,i({templateUrl:":::PLUGIN_PATH:::/detail/roleGlobalSaveConfirm.html",title:g("Confirm saving changes?"),scope:e})}():r.when()).then(function(){var e=r.when();return(e=n.id?e:f(n,n.name).catch(h(n.name))).then(_.partial(s.global.save,n))}).then(function(e){return s.global.updateRoles(e,t)}).then(function(){return c.success(g("Global role saved."))}).then(m)},saveGlobalRoleName:function(n,t){return f(n,t).then(function(){var e=r.when();return n.id?e=s.global.update({id:n.id,name:t}).then(function(e){return n.name=t,e}):n.name=t,e},h(t))},isUndeletable:function(e){return s.isGlobal(e)&&("admins"===_.lowerCase(e.name)||"devices"===_.lowerCase(e.name)||n.hasRole(e,"ROLE_NO_DELETE"))}};function m(){var e=new RegExp("\\/roles\\/inventory\\/(\\w+)"),e=t.path().match(e),e="/".concat(e?b:y);t.path(e),t.search("duplicate",null)}function d(e,n){e=("global"===e?R:w).replace(/:\w+/,"new");t.path(e),n&&t.search("duplicate",n)}function v(n,t){return s.list().then(function(e){return p(e,n,t)})}function p(e,n,t){e=_.filter(e,function(e){return e.id!==n.id});return _.some(e,{name:t})&&r.reject({duplicate:!0})}function h(n){return function(e){return _.get(e,"duplicate")&&c.danger(l.getString('There is already a role with the name "{{name}}"',{name:n})),r.reject()}}function f(n,t){return s.global.list().then(function(e){return p(e,n,t)})}}return{$get:v,init:function(){d(),n.addNavigation({name:g("Roles"),parent:g("Accounts"),routerLinkExact:!1,priority:4900,path:y,icon:t,showIfPermissions:{anyRole:m}})},hookViews:d}}e.$inject=["gettext","c8yViewsProvider","c8yNavigatorProvider"],angular.module("c8y.roles").provider("c8yRolesUi",e)}();
@@ -1 +1 @@
1
- "use strict";!function(){function e(t,e,n,s,i,a,l,r,u,o,c,d,m){var g=_.isEmpty(c)?null:c,h="smartRuleForm",y={parent:null,mo:null,withChildren:{assets:!0,devices:!1}},p={inProgres:!1};function v(e){o=e,t.ruleTemplate=o,t.rule.name||(t.rule.name=m.getString(t.ruleTemplate.description))}function C(e){t.enabledSources=_.sortBy(e,"name")}function S(e){t.disabledSources=_.sortBy(e,"name")}function f(){return R(),n.reject()}function b(){p.inProgress=!0}function R(){p.inProgress=!1}t.hasChildAssets=angular.bind(i,i.hasChildAssets),t.getChildAssetsCount=angular.bind(i,i.getChildAssetsCount),t.ruleTemplate=o,t.rule=c,t.save=function(){o.noTarget&&(y.withChildren={assets:!1,devices:!1}),n.when().then(b).then(angular.bind(r,r.save,c,o,y)).then(e.close,f).then(_.partial(_.unary(l.success),m.getString('Smart rule "{{name}}" saved.',{name:c.name}))).then(R)},t.savingStatus=p,t.cancel=e.dismiss,t.invalid=angular.bind(s,s.invalid,t,h);var T,A=t.$watch(h,function(e){g&&e.$setDirty(),e&&A()});c&&c.id||(c=_.assign(r.getEmpty(),c||{})),t.rule=c,h=r.getRuleModalTitle(t.rule),t.title=h,o?v(o):u.getTemplateForRule(c).then(v),t.initialActivationCfg=y,h=_.get(c,"c8y_Context",d?{id:d}:a.getContext()),i.detail(h.id).then(s.getResData).then(function(e){y.mo=e}),c&&c.id&&(_.isEmpty(c.enabledSources)||(T=c.enabledSources.join(","),i.list({ids:T}).then(C)),_.isEmpty(c.disabledSources)||(T=c.disabledSources.join(","),i.list({ids:T}).then(S)))}e.$inject=["$scope","$uibModalInstance","$q","c8yBase","c8yInventory","c8yUiUtil","c8yAlert","smartRulesSvc","smartRuleTemplatesSvc","ruleTemplate","rule","contextMoId","gettextCatalog"],angular.module("c8y.smartRules").controller("SmartRuleEditCtrl",e)}();
1
+ "use strict";!function(){function e(t,e,n,s,i,l,a,r,u,o,c,d,m){var g=_.isEmpty(c)?null:c,h="smartRuleForm",y={parent:null,mo:null,withChildren:{assets:!0,devices:!1}},p={inProgres:!1};function v(e){o=e,t.ruleTemplate=o,t.rule.name||(t.rule.name=m.getString(t.ruleTemplate.description))}function C(e){t.enabledSources=_.sortBy(e,"name")}function f(e){t.disabledSources=_.sortBy(e,"name")}function S(){return R(),n.reject()}function b(){p.inProgress=!0}function R(){p.inProgress=!1}t.hasChildAssets=angular.bind(i,i.hasChildAssets),t.getChildAssetsCount=angular.bind(i,i.getChildAssetsCount),t.ruleTemplate=o,t.rule=c,t.save=function(){o.noTarget&&(y.withChildren={assets:!1,devices:!1}),n.when().then(b).then(angular.bind(r,r.save,c,o,y)).then(e.close,S).then(_.partial(_.unary(a.success),m.getString('Smart rule "{{name}}" saved.',{name:c.name}))).then(R)},t.savingStatus=p,t.cancel=e.dismiss,t.invalid=angular.bind(s,s.invalid,t,h);var T,A=t.$watch(h,function(e){g&&e.$setDirty(),e&&A()});c&&c.id||(c=_.assign(r.getEmpty(),c||{})),t.rule=c,h=r.getRuleModalTitle(t.rule),t.title=h,o?v(o):u.getTemplateForRule(c).then(v),t.initialActivationCfg=y,h=_.get(c,"c8y_Context",d?{id:d}:l.getContext()),i.detail(h.id).then(s.getResData).then(function(e){y.mo=e,y.searchOnlyChildAssetsOf=_.cloneDeep(e)}),c&&c.id&&(_.isEmpty(c.enabledSources)||(T=c.enabledSources.join(","),i.list({ids:T}).then(C)),_.isEmpty(c.disabledSources)||(T=c.disabledSources.join(","),i.list({ids:T}).then(f)))}e.$inject=["$scope","$uibModalInstance","$q","c8yBase","c8yInventory","c8yUiUtil","c8yAlert","smartRulesSvc","smartRuleTemplatesSvc","ruleTemplate","rule","contextMoId","gettextCatalog"],angular.module("c8y.smartRules").controller("SmartRuleEditCtrl",e)}();
@@ -1 +1 @@
1
- "use strict";!function(){function e(i,u,o,r,n,a,c,l,t,d,s){var f=o.url("service/smartrule"),h="".concat(f,"/smartrules"),p=["id","self","cepModuleId","lastUpdated","creationTime"],m=["type","cepModuleId","creationTime","lastUpdated"];return{permissionsCfgs:{create:[{anyRole:["ROLE_INVENTORY_ADMIN","ROLE_INVENTORY_CREATE","ROLE_MANAGED_OBJECT_ADMIN","ROLE_MANAGED_OBJECT_CREATE"]},{anyRole:["ROLE_CEP_MANAGEMENT_ADMIN","ROLE_SMARTRULE_ADMIN"]}]},getEmpty:function(e){var e=e||n.getContext(),t={type:"c8y_SmartRule",name:"",enabled:!0,config:{}};e.context&&e.id&&(t.c8y_Context=e,t.type="c8y_PrivateSmartRule");return t},list:function(){return u.get(h).then(o.getResData).then(_.property("rules")).then(v)},listByContext:function(e){return u.get(g({moId:e})).then(o.getResData).then(_.property("rules")).then(v)},detail:function(e){e=S({id:e});return u.get(e).then(o.getResData)},save:function(e,t,n){e=e.id?y(e):function(e,t,n){var r=S(e,!0);return function(e,t,n){return e.ruleTemplateName=t.name,function(e,t){var n=i.when(e);e.c8y_Context||t.mo?(e.enabledSources=[],e.disabledSources=void 0,n=b(e,t.mo,t.withChildren)):(e.enabledSources=void 0,e.disabledSources=[]);return n}(e,n)}(e,t,n).then(_.partial(u.post,r)).then(o.getResData)}(e,t,n);return e},remove:function(e){e=S(e,!0);return u.delete(e)},hasSource:function(e,t){t=t&&t.id||t;if(!t)return!1;if(e.disabledSources)return!A(e.disabledSources,t);if(e.enabledSources)return A(e.enabledSources,t);return!0},activate:function(e,t,n){return b(e,t,n).then(y)},deactivate:function(e,t,n){return R(e,t,n).then(y)},updateSources:function(e,t,r,u){return function(e,t,n){return t.reduce(function(e,t){return e.then(function(e){return b(e,t,n)})},i.resolve(e))}(e,t,u).then(function(e){return n=u,r.reduce(function(e,t){return e.then(function(e){return R(e,t,n)})},i.resolve(e));var n}).then(y)},addNewWithUI:D,addNewForInputAlarmAndOutputUserWithUI:function(e,t){return D({inputAlarm:e,outputUser:t})},addNewForInputDataPointWithUI:function(e){return D({inputDataPoint:e})},addNewForOutputOperationWithUI:function(e){return D({outputOperation:{template:function(e){return o.cleanFields(e,["id","self","status","deviceId","creationTime","failureReason"])}(e)}})},createInstanceWithUI:N,createInstanceWithUIByName:function(e,t){return l.getTemplateByName(e).then(function(e){return N(e,t)})},editWithUI:function(e,t){return T(e,void 0,t)},cloneWithUI:function(e,t){return c.current().then(_.partial(U,e)).then(function(e){return T(e,void 0,t)})},getRuleModalTitle:E};function v(e){return i.all(_.map(e,function(t){return l.getTemplateForRule(t).then(function(e){return _.isUndefined(e)?null:t})})).then(_.flatten).then(_.filter)}function S(e,t){var n=_.get(e,"c8y_Context.id"),t=t&&n?g({moId:n}):h;return e.id&&(t+="/".concat(e.id)),t}function g(e){return"".concat(f,"/managedObjects/").concat(e.moId,"/smartrules")}function y(e){var t=S(e,!0),e=o.cleanFields(e,m);return u.put(t,e)}function b(n,e,t){return I(e,t).then(function(e){return _.forEach(e,function(t){_.isArray(n.enabledSources)&&!A(n.enabledSources,t)&&n.enabledSources.push(t),_.isArray(n.disabledSources)&&A(n.disabledSources,t)&&_.remove(n.disabledSources,function(e){return _.toString(e)===_.toString(t)})}),n})}function R(n,e,t){return I(e,t).then(function(e){return _.forEach(e,function(t){_.isArray(n.enabledSources)&&A(n.enabledSources,t)&&_.remove(n.enabledSources,function(e){return _.toString(e)===_.toString(t)}),_.isArray(n.disabledSources)&&!A(n.disabledSources,t)&&n.disabledSources.push(t)}),n})}function I(e,t){var e=e&&e.id||e,n=[];return e&&(n.push(i.when(e)),n.push(function(e,t){var n=[];!0!==t&&!0!==t.assets||n.push(r.childAssets(e));!0!==t&&!0!==t.devices||n.push(r.childDevices(e));return i.all(n).then(_.flattenDeep).then(_.partialRight(_.map,"id"))}(e,t))),i.all(n).then(_.flattenDeep)}function A(e,t){var n=t.id||t;return _.some(e,function(e){return _.toString(e)===_.toString(n)})}function E(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},e=e.id?"c8y_SmartRule"===e.type?t("Edit global smart rule"):t("Edit local smart rule"):"/rules"===s.path()?t("Add global smart rule"):t("Add local smart rule");return e}function D(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},t=1<arguments.length?arguments[1]:void 0,n=2<arguments.length?arguments[2]:void 0;return a({title:E(),templateUrl:":::PLUGIN_PATH:::/views/add.html",controller:"SmartRuleAddCtrl",ariaLabelledBy:"modal-title",ariaDescribedBy:"modal-body",size:"lg",keyboard:!1,resolve:{context:function(){return _.cloneDeep(e)},ruleInitialObj:function(){return _.cloneDeep(n)},ruleTemplatesFilterFn:function(){return t}}})}function N(e,t){return T(t,e)}function U(e,t){e=_.cloneDeep(e);return(e=o.cleanFields(e,p)).name=d.getString("Duplicate of {{name}}",e),t&&(e.owner=t.id),e}function T(e,t,n){return a({templateUrl:":::PLUGIN_PATH:::/views/edit.html",controller:"SmartRuleEditCtrl",size:"sm",keyboard:!1,resolve:{ruleTemplate:function(){return _.cloneDeep(t)},rule:function(){return _.cloneDeep(e)},contextMoId:function(){return _.cloneDeep(n)}}})}}e.$inject=["$q","$http","c8yBase","c8yInventory","c8yUiUtil","c8yModal","c8yUser","smartRuleTemplatesSvc","gettext","gettextCatalog","$location"],angular.module("c8y.smartRules").factory("smartRulesSvc",e)}();
1
+ "use strict";!function(){function e(o,u,i,r,n,a,c,l,t,d,s){var f=i.url("service/smartrule"),h="".concat(f,"/smartrules"),p=["id","self","cepModuleId","lastUpdated","creationTime"],m=["type","cepModuleId","creationTime","lastUpdated"];return{permissionsCfgs:{create:[{anyRole:["ROLE_INVENTORY_ADMIN","ROLE_INVENTORY_CREATE","ROLE_MANAGED_OBJECT_ADMIN","ROLE_MANAGED_OBJECT_CREATE"]},{anyRole:["ROLE_CEP_MANAGEMENT_ADMIN","ROLE_SMARTRULE_ADMIN"]}]},getEmpty:function(e){var e=e||n.getContext(),t={type:"c8y_SmartRule",name:"",enabled:!0,config:{}};e.context&&e.id&&(t.c8y_Context=e,t.type="c8y_PrivateSmartRule");return t},list:function(){return u.get(h).then(i.getResData).then(_.property("rules")).then(v)},listByContext:function(e){return u.get(S({moId:e})).then(i.getResData).then(_.property("rules")).then(v)},detail:function(e){e=y({id:e});return u.get(e).then(i.getResData)},save:function(e,t,n){e=e.id?g(e):function(e,t,n){var r=y(e,!0);return function(e,t,n){return e.ruleTemplateName=t.name,C(e),function(e,t){var n=o.when(e);e.c8y_Context||t.mo?(e.enabledSources=[],e.disabledSources=void 0,n=b(e,t.mo,t.withChildren)):(e.enabledSources=void 0,e.disabledSources=[]);return n}(e,n)}(e,t,n).then(_.partial(u.post,r)).then(i.getResData)}(e,t,n);return e},remove:function(e){e=y(e,!0);return u.delete(e)},hasSource:function(e,t){t=t&&t.id||t;if(!t)return!1;if(e.disabledSources)return!A(e.disabledSources,t);if(e.enabledSources)return A(e.enabledSources,t);return!0},activate:function(e,t,n){return b(e,t,n).then(g)},deactivate:function(e,t,n){return R(e,t,n).then(g)},updateSources:function(e,t,r,u){return function(e,t,n){return t.reduce(function(e,t){return e.then(function(e){return b(e,t,n)})},o.resolve(e))}(e,t,u).then(function(e){return n=u,r.reduce(function(e,t){return e.then(function(e){return R(e,t,n)})},o.resolve(e));var n}).then(g)},addNewWithUI:D,addNewForInputAlarmAndOutputUserWithUI:function(e,t){return D({inputAlarm:e,outputUser:t})},addNewForInputDataPointWithUI:function(e){return D({inputDataPoint:e})},addNewForOutputOperationWithUI:function(e){return D({outputOperation:{template:function(e){return i.cleanFields(e,["id","self","status","deviceId","creationTime","failureReason"])}(e)}})},createInstanceWithUI:N,createInstanceWithUIByName:function(e,t){return l.getTemplateByName(e).then(function(e){return N(e,t)})},editWithUI:function(e,t){return T(e,void 0,t)},cloneWithUI:function(e,t){return c.current().then(_.partial(U,e)).then(function(e){return T(e,void 0,t)})},getRuleModalTitle:E};function v(e){return o.all(_.map(e,function(t){return l.getTemplateForRule(t).then(function(e){return _.isUndefined(e)?null:t})})).then(_.flatten).then(_.filter)}function y(e,t){var n=_.get(e,"c8y_Context.id"),t=t&&n?S({moId:n}):h;return e.id&&(t+="/".concat(e.id)),t}function S(e){return"".concat(f,"/managedObjects/").concat(e.moId,"/smartrules")}function g(e){C(e);var t=y(e,!0),e=i.cleanFields(e,m);return u.put(t,e)}function b(n,e,t){return I(e,t).then(function(e){return _.forEach(e,function(t){_.isArray(n.enabledSources)&&!A(n.enabledSources,t)&&n.enabledSources.push(t),_.isArray(n.disabledSources)&&A(n.disabledSources,t)&&_.remove(n.disabledSources,function(e){return _.toString(e)===_.toString(t)})}),n})}function R(n,e,t){return I(e,t).then(function(e){return _.forEach(e,function(t){_.isArray(n.enabledSources)&&A(n.enabledSources,t)&&_.remove(n.enabledSources,function(e){return _.toString(e)===_.toString(t)}),_.isArray(n.disabledSources)&&!A(n.disabledSources,t)&&n.disabledSources.push(t)}),n})}function I(e,t){var e=e&&e.id||e,n=[];return e&&(n.push(o.when(e)),n.push(function(e,t){var n=[];!0!==t&&!0!==t.assets||n.push(r.childAssets(e));!0!==t&&!0!==t.devices||n.push(r.childDevices(e));return o.all(n).then(_.flattenDeep).then(_.partialRight(_.map,"id"))}(e,t))),o.all(n).then(_.flattenDeep)}function A(e,t){var n=t.id||t;return _.some(e,function(e){return _.toString(e)===_.toString(n)})}function E(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},e=e.id?"c8y_SmartRule"===e.type?t("Edit global smart rule"):t("Edit local smart rule"):"/rules"===s.path()?t("Add global smart rule"):t("Add local smart rule");return e}function D(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},t=1<arguments.length?arguments[1]:void 0,n=2<arguments.length?arguments[2]:void 0;return a({title:E(),templateUrl:":::PLUGIN_PATH:::/views/add.html",controller:"SmartRuleAddCtrl",ariaLabelledBy:"modal-title",ariaDescribedBy:"modal-body",size:"lg",keyboard:!1,resolve:{context:function(){return _.cloneDeep(e)},ruleInitialObj:function(){return _.cloneDeep(n)},ruleTemplatesFilterFn:function(){return t}}})}function N(e,t){return T(t,e)}function U(e,t){e=_.cloneDeep(e);return(e=i.cleanFields(e,p)).name=d.getString("Duplicate of {{name}}",e),t&&(e.owner=t.id),e}function T(e,t,n){return a({templateUrl:":::PLUGIN_PATH:::/views/edit.html",controller:"SmartRuleEditCtrl",size:"sm",keyboard:!1,resolve:{ruleTemplate:function(){return _.cloneDeep(t)},rule:function(){return _.cloneDeep(e)},contextMoId:function(){return _.cloneDeep(n)}}})}function C(e){e.c8y_Context&&e.c8y_Context.contextData&&delete e.c8y_Context.contextData}}e.$inject=["$q","$http","c8yBase","c8yInventory","c8yUiUtil","c8yModal","c8yUser","smartRuleTemplatesSvc","gettext","gettextCatalog","$location"],angular.module("c8y.smartRules").factory("smartRulesSvc",e)}();
@@ -145,6 +145,7 @@
145
145
  parent="initialActivationCfg.parent"
146
146
  selected-child-device="initialActivationCfg.mo"
147
147
  groups-selectable="true"
148
+ search-only-child-assets-of="initialActivationCfg.searchOnlyChildAssetsOf"
148
149
  ></c8y-device-selector-combo>
149
150
  </div>
150
151
  <div class="checkbox" ng-show="hasChildAssets(initialActivationCfg.mo)">
@@ -1 +1 @@
1
- "use strict";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 ownKeys(t,e){var r,n=Object.keys(t);return Object.getOwnPropertySymbols&&(r=Object.getOwnPropertySymbols(t),e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)),n}function _objectSpread(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?ownKeys(Object(r),!0).forEach(function(e){_defineProperty(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):ownKeys(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}function _defineProperty(e,t,r){return(t=_toPropertyKey(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _toPropertyKey(e){e=_toPrimitive(e,"string");return"symbol"==_typeof(e)?e:String(e)}function _toPrimitive(e,t){if("object"!=_typeof(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0===r)return("string"===t?String:Number)(e);r=r.call(e,t||"default");if("object"!=_typeof(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}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 r;if(e)return"string"==typeof e?_arrayLikeToArray(e,t):"Map"===(r="Object"===(r=Object.prototype.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:r)||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?_arrayLikeToArray(e,t):void 0}function _arrayLikeToArray(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function _iterableToArrayLimit(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,s,l=[],a=!0,c=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;a=!1}else for(;!(a=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);a=!0);}catch(e){c=!0,o=e}finally{try{if(!a&&null!=r.return&&(s=r.return(),Object(s)!==s))return}finally{if(c)throw o}}return l}}function _arrayWithHoles(e){if(Array.isArray(e))return e}!function(){function e(e,t,r,n,o,i,s,l){var a=this;function c(){t.listInventoryRoles(a.userId).then(r.getResData).then(function(e){a.assignedRoles=_.keyBy(e.inventoryAssignments,"managedObject")}),t.detail(a.userId).then(r.getResData).then(function(e){a.user=e,a.user.owner?t.listInventoryRoles(a.user.owner).then(r.getResData).then(function(e){a.ownerAssignedRoles=_.keyBy(e.inventoryAssignments,"managedObject"),_.isEmpty(a.ownerAssignedRoles)&&(a.displayNoOwnerRolesAlert=!0),a.failedToFetchOwnerInventoryRoles=!1}).catch(function(){a.failedToFetchOwnerInventoryRoles=!0}):a.failedToFetchOwnerInventoryRoles=!1})}function u(){c(),s.success(l.getPlural(y(),"Inventory role updated","Inventory roles updated",{}))}function y(){return _.filter(a.assignedRoles,"isModified").length}function f(e){var t="replace"===e.process,e=e.roles,r=_.map(a.assignedRoles);return n.copyUserRoles(e,r,a.userId,t).then(c).then(o.successUserRolesCopy)}_.assign(a,{$onChange:function(e){e.user&&c()},onChangeRoles:function(e){var t=e.roles,e=e.managedObjectId;a.assignedRoles[e]=a.assignedRoles[e]||{},_.assign(a.assignedRoles[e],{managedObject:e,roles:t,isModified:!0}),a.assignedRoles=_objectSpread({},a.assignedRoles)},onSaveInventoryRoles:function(){n.onSaveInventoryRoles(a.userId,a.assignedRoles).then(u)},copyRoles:function(){o.copyFromUserDialog(a.userId).then(f)},loadAssignedRoles:c,isUnchanged:function(){return 0===y()},pageSize:20,scrollToTop:function(){var e=_slicedToArray(angular.element(document.querySelector("#inventory-roles-container")),1)[0];e&&e.scrollTo(0,0)},helpLink:i.getUserGuideLink(_.get(o.STRINGS,"LINKS.ROLES_INVENTORY")),stopEventPropagation:function(e){e.stopPropagation()},displayNoOwnerRolesAlert:!1,failedToFetchOwnerInventoryRoles:null}),c()}e.$inject=["$q","c8yUser","c8yBase","c8yUserInventoryRoles","c8yUserRolesUi","c8yDocs","c8yAlert","gettextCatalog"],angular.module("c8y.userRoles").component("c8yUserInventoryRolesTab",{templateUrl:":::PLUGIN_PATH:::/inventoryRolesTab/inventoryRolesTab.html",controllerAs:"vm",controller:e,bindings:{userId:"<"}})}();
1
+ "use strict";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 ownKeys(t,e){var r,n=Object.keys(t);return Object.getOwnPropertySymbols&&(r=Object.getOwnPropertySymbols(t),e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)),n}function _objectSpread(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?ownKeys(Object(r),!0).forEach(function(e){_defineProperty(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):ownKeys(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}function _defineProperty(e,t,r){return(t=_toPropertyKey(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _toPropertyKey(e){e=_toPrimitive(e,"string");return"symbol"==_typeof(e)?e:String(e)}function _toPrimitive(e,t){if("object"!=_typeof(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0===r)return("string"===t?String:Number)(e);r=r.call(e,t||"default");if("object"!=_typeof(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}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 r;if(e)return"string"==typeof e?_arrayLikeToArray(e,t):"Map"===(r="Object"===(r=Object.prototype.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:r)||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?_arrayLikeToArray(e,t):void 0}function _arrayLikeToArray(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function _iterableToArrayLimit(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,s,a=[],l=!0,c=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=i.call(r)).done)&&(a.push(n.value),a.length!==t);l=!0);}catch(e){c=!0,o=e}finally{try{if(!l&&null!=r.return&&(s=r.return(),Object(s)!==s))return}finally{if(c)throw o}}return a}}function _arrayWithHoles(e){if(Array.isArray(e))return e}!function(){function e(e,t,r,n,o,i,s,a,l,c){var u=this,y=c("You cannot edit inventory roles for user with external origin, since it is managed via your authorization server.");function f(){t.listInventoryRoles(u.userId).then(r.getResData).then(function(e){u.assignedRoles=_.keyBy(e.inventoryAssignments,"managedObject")}),t.detail(u.userId).then(r.getResData).then(function(e){u.user=e,u.user.owner?t.listInventoryRoles(u.user.owner).then(r.getResData).then(function(e){u.ownerAssignedRoles=_.keyBy(e.inventoryAssignments,"managedObject"),_.isEmpty(u.ownerAssignedRoles)&&(u.displayNoOwnerRolesAlert=!0),u.failedToFetchOwnerInventoryRoles=!1}).catch(function(){u.failedToFetchOwnerInventoryRoles=!0}):u.failedToFetchOwnerInventoryRoles=!1})}function d(){f(),a.success(l.getPlural(p(),"Inventory role updated","Inventory roles updated",{}))}function p(){return _.filter(u.assignedRoles,"isModified").length}function g(e){var t="replace"===e.process,e=e.roles,r=_.map(u.assignedRoles);return n.copyUserRoles(e,r,u.userId,t).then(f).then(o.successUserRolesCopy)}_.assign(u,{$onInit:function(){t.detail(u.userId).then(r.getResData).then(function(e){return t.hasExternalOrigin(e)?s.isSsoClearingUserRolesOnEveryLogin().then(function(e){return u.disableEditForExternalUsers=e,u.disableEditForExternalUsers&&a.warning(y),u.disableEditForExternalUsers}):u.disableEditForExternalUsers=!1})},$onChange:function(e){e.user&&f()},onChangeRoles:function(e){var t=e.roles,e=e.managedObjectId;u.assignedRoles[e]=u.assignedRoles[e]||{},_.assign(u.assignedRoles[e],{managedObject:e,roles:t,isModified:!0}),u.assignedRoles=_objectSpread({},u.assignedRoles)},onSaveInventoryRoles:function(){n.onSaveInventoryRoles(u.userId,u.assignedRoles).then(d)},copyRoles:function(){o.copyFromUserDialog(u.userId).then(g)},loadAssignedRoles:f,isUnchanged:function(){return 0===p()},pageSize:20,scrollToTop:function(){var e=_slicedToArray(angular.element(document.querySelector("#inventory-roles-container")),1)[0];e&&e.scrollTo(0,0)},helpLink:i.getUserGuideLink(_.get(o.STRINGS,"LINKS.ROLES_INVENTORY")),stopEventPropagation:function(e){e.stopPropagation()},displayNoOwnerRolesAlert:!1,failedToFetchOwnerInventoryRoles:null,disableEditForExternalUsers:!1}),f()}e.$inject=["$q","c8yUser","c8yBase","c8yUserInventoryRoles","c8yUserRolesUi","c8yDocs","c8yLoginOptions","c8yAlert","gettextCatalog","gettext"],angular.module("c8y.userRoles").component("c8yUserInventoryRolesTab",{templateUrl:":::PLUGIN_PATH:::/inventoryRolesTab/inventoryRolesTab.html",controllerAs:"vm",controller:e,bindings:{userId:"<"}})}();
@@ -85,6 +85,7 @@
85
85
  title="{{ 'Copy inventory roles from another user' | translate }}"
86
86
  type="button"
87
87
  ng-click="vm.copyRoles()"
88
+ ng-disabled="vm.disableEditForExternalUsers"
88
89
  >
89
90
  <i c8y-icon="clipboard"></i>
90
91
  {{ 'Copy inventory roles from another user' | translate }}
@@ -164,7 +165,7 @@
164
165
  class="btn btn-primary"
165
166
  title="{{ 'Save' | translate }}"
166
167
  type="submit"
167
- ng-disabled="vm.isUnchanged()"
168
+ ng-disabled="vm.disableEditForExternalUsers || vm.isUnchanged()"
168
169
  ng-click="vm.onSaveInventoryRoles()"
169
170
  >
170
171
  {{ 'Save' | translate }}