@microsoft/windows-admin-center-sdk 4.52.0 → 4.87.0

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.
Files changed (97) hide show
  1. package/angular/esm2020/src/controls/master-view/master-view.component.mjs +8 -6
  2. package/angular/esm2020/src/controls/ux/sme-ux-footer/sme-ux-footer-template/sme-wizard-lite-footer-template/sme-wizard-lite-footer-template.component.mjs +56 -1
  3. package/angular/esm2020/src/service/navigation.service.mjs +3 -1
  4. package/angular/fesm2015/microsoft-windows-admin-center-sdk-angular.mjs +64 -5
  5. package/angular/fesm2015/microsoft-windows-admin-center-sdk-angular.mjs.map +1 -1
  6. package/angular/fesm2020/microsoft-windows-admin-center-sdk-angular.mjs +64 -5
  7. package/angular/fesm2020/microsoft-windows-admin-center-sdk-angular.mjs.map +1 -1
  8. package/angular/src/controls/master-view/master-view.component.d.ts +6 -2
  9. package/angular/src/controls/ux/sme-ux-footer/sme-ux-footer-template/sme-wizard-lite-footer-template/sme-wizard-lite-footer-template.component.d.ts +64 -0
  10. package/core/assets/strings/cs-CZ/strings.json +1 -1
  11. package/core/assets/strings/de-DE/strings.json +1 -1
  12. package/core/assets/strings/es-ES/strings.json +1 -1
  13. package/core/assets/strings/fr-FR/strings.json +1 -1
  14. package/core/assets/strings/hu-HU/strings.json +1 -1
  15. package/core/assets/strings/id-ID/strings.json +1 -1
  16. package/core/assets/strings/it-IT/strings.json +1 -1
  17. package/core/assets/strings/ja-JP/strings.json +1 -1
  18. package/core/assets/strings/ko-KR/strings.json +1 -1
  19. package/core/assets/strings/nl-NL/strings.json +1 -1
  20. package/core/assets/strings/pl-PL/strings.json +1 -1
  21. package/core/assets/strings/pt-BR/strings.json +1 -1
  22. package/core/assets/strings/pt-PT/strings.json +1 -1
  23. package/core/assets/strings/ru-RU/strings.json +1 -1
  24. package/core/assets/strings/strings.json +1 -1
  25. package/core/assets/strings/sv-SE/strings.json +1 -1
  26. package/core/assets/strings/tr-TR/strings.json +1 -1
  27. package/core/assets/strings/zh-CN/strings.json +1 -1
  28. package/core/assets/strings/zh-TW/strings.json +1 -1
  29. package/core/azure/azure-constants.d.ts +6 -3
  30. package/core/azure/azure-constants.d.ts.map +1 -1
  31. package/core/azure/azure-constants.js +7 -4
  32. package/core/azure/azure-constants.js.map +1 -1
  33. package/core/azure/models/azureArcStatusEnum.d.ts +4 -2
  34. package/core/azure/models/azureArcStatusEnum.d.ts.map +1 -1
  35. package/core/azure/models/azureArcStatusEnum.js +3 -1
  36. package/core/azure/models/azureArcStatusEnum.js.map +1 -1
  37. package/core/data/gateway-connection.d.ts +12 -0
  38. package/core/data/gateway-connection.d.ts.map +1 -1
  39. package/core/data/gateway-connection.js +16 -0
  40. package/core/data/gateway-connection.js.map +1 -1
  41. package/core/data/gateway-url-translator.d.ts +1 -0
  42. package/core/data/gateway-url-translator.d.ts.map +1 -1
  43. package/core/data/gateway-url-translator.js +15 -0
  44. package/core/data/gateway-url-translator.js.map +1 -1
  45. package/core/data/net.d.ts +1 -0
  46. package/core/data/net.d.ts.map +1 -1
  47. package/core/data/net.js +26 -1
  48. package/core/data/net.js.map +1 -1
  49. package/core/data/websocket-stream.d.ts.map +1 -1
  50. package/core/data/websocket-stream.js +2 -2
  51. package/core/data/websocket-stream.js.map +1 -1
  52. package/core/generated/strings.d.ts +3 -0
  53. package/core/generated/strings.d.ts.map +1 -1
  54. package/core/generated/strings.js.map +1 -1
  55. package/core/notification/notification.d.ts.map +1 -1
  56. package/core/notification/notification.js +1 -3
  57. package/core/notification/notification.js.map +1 -1
  58. package/core/shared/server-inventory/server-inventory-cache.d.ts.map +1 -1
  59. package/core/shared/server-inventory/server-inventory-cache.js +0 -1
  60. package/core/shared/server-inventory/server-inventory-cache.js.map +1 -1
  61. package/package.json +3 -3
  62. package/styles/css/main-v2.css +1 -1
  63. package/tools/wac-cli/src/angular15/configs/ui-test-automation-lagacy-config.d.ts +14 -0
  64. package/tools/wac-cli/src/angular15/configs/ui-test-automation-lagacy-config.d.ts.map +1 -0
  65. package/tools/wac-cli/src/angular15/configs/ui-test-automation-lagacy-config.js +21 -0
  66. package/tools/wac-cli/src/angular15/configs/ui-test-automation-lagacy-config.js.map +1 -0
  67. package/tools/wac-cli/src/angular15/main.d.ts +32 -2
  68. package/tools/wac-cli/src/angular15/main.d.ts.map +1 -1
  69. package/tools/wac-cli/src/angular15/main.js +66 -6
  70. package/tools/wac-cli/src/angular15/main.js.map +1 -1
  71. package/tools/wac-cli/src/angular15/test/ui-test-automation-package.json/after.json +14 -0
  72. package/tools/wac-cli/src/angular15/test/ui-test-automation-package.json/before.json +13 -0
  73. package/tools/wac-cli/src/angular15/upgrader/ui-test-automation-legacy-upgrader.d.ts +15 -0
  74. package/tools/wac-cli/src/angular15/upgrader/ui-test-automation-legacy-upgrader.d.ts.map +1 -0
  75. package/tools/wac-cli/src/angular15/upgrader/ui-test-automation-legacy-upgrader.js +48 -0
  76. package/tools/wac-cli/src/angular15/upgrader/ui-test-automation-legacy-upgrader.js.map +1 -0
  77. package/tools/wac-cli/src/angular15/utils/main-debugger.d.ts.map +1 -1
  78. package/tools/wac-cli/src/angular15/utils/main-debugger.js +3 -0
  79. package/tools/wac-cli/src/angular15/utils/main-debugger.js.map +1 -1
  80. package/tools/wac-cli/src/angular15/utils/update-shell-references.d.ts +2 -0
  81. package/tools/wac-cli/src/angular15/utils/update-shell-references.d.ts.map +1 -0
  82. package/tools/wac-cli/src/angular15/utils/update-shell-references.js +69 -0
  83. package/tools/wac-cli/src/angular15/utils/update-shell-references.js.map +1 -0
  84. package/tools/wac-cli/src/common.d.ts +6 -0
  85. package/tools/wac-cli/src/common.d.ts.map +1 -1
  86. package/tools/wac-cli/src/common.js +13 -0
  87. package/tools/wac-cli/src/common.js.map +1 -1
  88. package/tools/wac-cli/src/create/main.d.ts.map +1 -1
  89. package/tools/wac-cli/src/create/main.js +3 -51
  90. package/tools/wac-cli/src/create/main.js.map +1 -1
  91. package/tools/wac-cli/src/eslint/main.d.ts +5 -1
  92. package/tools/wac-cli/src/eslint/main.d.ts.map +1 -1
  93. package/tools/wac-cli/src/eslint/main.js +17 -2
  94. package/tools/wac-cli/src/eslint/main.js.map +1 -1
  95. package/tools/wac-cli/src/index.d.ts.map +1 -1
  96. package/tools/wac-cli/src/index.js +2 -2
  97. package/tools/wac-cli/src/index.js.map +1 -1
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../packages/core/generated/strings.ts"],"names":[],"mappings":"AACA;;;GAGG;AACH,MAAM,WAAW,OAAO;IACpB,YAAY,EAAE;QACV,IAAI,EAAE;YACF,KAAK,EAAE;gBACH,iBAAiB,EAAE;oBACf,OAAO,EAAE,MAAM,CAAC;iBACnB,CAAC;gBACF,aAAa,EAAE;oBACX,OAAO,EAAE,MAAM,CAAC;iBACnB,CAAC;gBACF,cAAc,EAAE;oBACZ,OAAO,EAAE,MAAM,CAAC;iBACnB,CAAC;gBACF,mBAAmB,EAAE;oBACjB,OAAO,EAAE,MAAM,CAAC;iBACnB,CAAC;gBACF,eAAe,EAAE;oBACb,OAAO,EAAE,MAAM,CAAC;iBACnB,CAAC;gBACF,MAAM,EAAE;oBACJ,OAAO,EAAE,MAAM,CAAC;iBACnB,CAAC;gBACF,4BAA4B,EAAE;oBAC1B,OAAO,EAAE,MAAM,CAAC;iBACnB,CAAC;gBACF,6BAA6B,EAAE;oBAC3B,OAAO,EAAE,MAAM,CAAC;iBACnB,CAAC;gBACF,oBAAoB,EAAE;oBAClB,OAAO,EAAE,MAAM,CAAC;iBACnB,CAAC;gBACF,wBAAwB,EAAE;oBACtB,OAAO,EAAE,MAAM,CAAC;iBACnB,CAAC;gBACF,sBAAsB,EAAE;oBACpB,OAAO,EAAE,MAAM,CAAC;iBACnB,CAAC;gBACF,0BAA0B,EAAE;oBACxB,OAAO,EAAE,MAAM,CAAC;iBACnB,CAAC;gBACF,iCAAiC,EAAE;oBAC/B,OAAO,EAAE,MAAM,CAAC;iBACnB,CAAC;gBACF,sCAAsC,EAAE;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CAAC;oBACF,OAAO,EAAE;wBACL,KAAK,EAAE,MAAM,CAAC;wBACd,OAAO,EAAE,MAAM,CAAC;qBACnB,CAAC;oBACF,IAAI,EAAE;wBACF,KAAK,EAAE,MAAM,CAAC;wBACd,OAAO,EAAE,MAAM,CAAC;qBACnB,CAAC;iBACL,CAAC;gBACF,QAAQ,EAAE;oBACF,OAAO,EAAE;wBACL,KAAK,EAAE,MAAM,CAAC;wBACd,OAAO,EAAE,MAAM,CAAC;qBACnB,CAAC;oBACF,IAAI,EAAE;wBACF,KAAK,EAAE,MAAM,CAAC;wBACd,OAAO,EAAE,MAAM,CAAC;qBACnB,CAAC;iBACT,CAAC;gBACF,YAAY,EAAE;oBACV,KAAK,EAAE,MAAM,CAAC;oBACd,OAAO,EAAE,MAAM,CAAC;iBACnB,CAAC;gBACF,KAAK,EAAE;oBACH,gBAAgB,EAAE,MAAM,CAAC;iBAC5B,CAAC;gBACF,IAAI,EAAE;oBACF,gBAAgB,EAAE,MAAM,CAAC;iBAC5B,CAAC;aAC7C,CAAC;YACF,cAAc,EAAE;gBACgC,2CAA2C,EAAE;oBACzC,KAAK,EAAE,MAAM,CAAC;iBACjB,CAAC;aACjD,CAAC;YACF,oBAAoB,EAAE;gBAC8B,GAAG,EAAE;oBACD,GAAG,EAAE;wBACD,QAAQ,EAAE;4BACN,YAAY,EAAE,MAAM,CAAC;yBACxB,CAAC;qBACL,CAAC;iBACL,CAAC;aACrD,CAAC;SACL,CAAC;KACL,CAAC;CACL","file":"strings.d.ts","sourcesContent":["/* eslint:disable */\n/**\n * @file Source code generated by gulp-resjson.\n * @version 1.0\n */\nexport interface Strings {\r\n MsftSmeShell: {\r\n Core: {\r\n Error: {\r\n ArgumentNullError: {\r\n message: string;\r\n };\r\n ArgumentError: {\r\n message: string;\r\n };\r\n UnknownBrowser: {\r\n message: string;\r\n };\r\n GatewayNameRequired: {\r\n message: string;\r\n };\r\n NoResponseError: {\r\n message: string;\r\n };\r\n NoCode: {\r\n message: string;\r\n };\r\n PowerShellUnableSessionClose: {\r\n message: string;\r\n };\r\n PowerShellUnableCancelCommand: {\r\n message: string;\r\n };\r\n QueryCacheFetchOrder: {\r\n message: string;\r\n };\r\n QueryCacheFetchErrorOnce: {\r\n message: string;\r\n };\r\n QueryCacheRefreshOrder: {\r\n message: string;\r\n };\r\n QueryCacheRefreshErrorOnce: {\r\n message: string;\r\n };\r\n QueryCacheRecoverNoCachedResource: {\r\n message: string;\r\n };\r\n QueryCacheRecoverMissingRecoveryOption: {\r\n message: string;\r\n };\r\n ResourceCacheUnableFind: {\r\n message: string;\r\n };\r\n LoggingUnableSubmit: {\r\n message: string;\r\n };\r\n EnvironmentNotInitialized: {\r\n message: string;\r\n };\r\n EnvironmentMissingDefault: {\r\n message: string;\r\n };\r\n NotificationRpcInitialization: {\r\n message: string;\r\n };\r\n NotificationUnsupportedState: {\r\n message: string;\r\n };\r\n NotificationEmptyMessage: {\r\n message: string;\r\n };\r\n NotificationNoWorkItemFound: {\r\n message: string;\r\n };\r\n NotificationUnexpectedReceived: {\r\n message: string;\r\n };\r\n NotificationWebsocketInitialize: {\r\n message: string;\r\n };\r\n NotificationNoIdFound: {\r\n message: string;\r\n };\r\n RpcTypeNoMatch: {\r\n message: string;\r\n };\r\n RpcNotFoundModule: {\r\n message: string;\r\n };\r\n RpcTargetWindowNotConfigured: {\r\n message: string;\r\n };\r\n RpcExpiredRetry: {\r\n message: string;\r\n };\r\n RpcExpired: {\r\n message: string;\r\n };\r\n RpcSignatureError: {\r\n message: string;\r\n };\r\n RpcUnexpectedDestination: {\r\n message: string;\r\n };\r\n RpcUnexpectedEvent: {\r\n message: string;\r\n };\r\n RpcUnexpectedSequence: {\r\n message: string;\r\n };\r\n RpcUnexpectedErrorSequence: {\r\n message: string;\r\n };\r\n RpcNotInitialized: {\r\n message: string;\r\n };\r\n RpcNotFountInbound: {\r\n message: string;\r\n };\r\n RpcTimeout: {\r\n message: string;\r\n };\r\n AddNativeErrorCode: {\r\n message: string;\r\n };\r\n RpcSubjectClosed: {\r\n message: string;\r\n };\r\n RpcNotRegisteredHandler: {\r\n message: string;\r\n };\r\n RpcFailedFindModuleManifest: {\r\n message: string;\r\n };\r\n ForwarderIdConflict: {\r\n message: string;\r\n };\r\n ForwarderIdNotFound: {\r\n message: string;\r\n };\r\n ForwarderUnknownType: {\r\n message: string;\r\n };\r\n InvalidValue: {\r\n message: string;\r\n };\r\n ServerListRetrieve: {\r\n message: string;\r\n };\r\n ServerListFailedSave: {\r\n message: string;\r\n };\r\n ConnectionStream: {\r\n message: string;\r\n };\r\n ExpectedSingleNode: {\r\n message: string;\r\n };\r\n ExpectedClusterNode: {\r\n message: string;\r\n };\r\n BatchConnection: {\r\n message: string;\r\n };\r\n BatchResponseParsing: {\r\n message: string;\r\n };\r\n BatchUnSupportedInvocation: {\r\n message: string;\r\n };\r\n GatewayUrlNotConfigured: {\r\n message: string;\r\n };\r\n GatewayUrlMalformed: {\r\n message: string;\r\n };\r\n ToolValidationResult: {\r\n message: string;\r\n };\r\n ToolValidationUnsupportedOperator: {\r\n message: string;\r\n };\r\n ToolValidationUnsupportedDataType: {\r\n message: string;\r\n };\r\n ToolValidationVersionFormat: {\r\n message: string;\r\n };\r\n ToolValidationInventoryError: {\r\n title: string;\r\n message: string;\r\n };\r\n ToolValidationGatewayInventoryError: {\r\n title: string;\r\n message: string;\r\n };\r\n PowerShellRunCommandFormat: {\r\n message: string;\r\n };\r\n PrefixFormat: {\r\n message: string;\r\n };\r\n };\r\n ErrorCode: {\r\n Code0: {\r\n message: string;\r\n };\r\n Code5: {\r\n message: string;\r\n };\r\n Code50: {\r\n message: string;\r\n };\r\n Code87: {\r\n message: string;\r\n };\r\n Code110: {\r\n message: string;\r\n };\r\n Code1323: {\r\n message: string;\r\n };\r\n Code1326: {\r\n message: string;\r\n };\r\n Code1355: {\r\n message: string;\r\n };\r\n Code2224: {\r\n message: string;\r\n };\r\n Code2691: {\r\n message: string;\r\n };\r\n Code2692: {\r\n message: string;\r\n };\r\n Code8004108: {\r\n message: string;\r\n };\r\n Translated: {\r\n message: string;\r\n };\r\n Generic: {\r\n message: string;\r\n };\r\n };\r\n ErrorFormat: {\r\n Single: {\r\n message: string;\r\n Details: {\r\n message: string;\r\n };\r\n };\r\n Multiple: {\r\n message: string;\r\n Details: {\r\n message: string;\r\n };\r\n };\r\n };\r\n Units: {\r\n MediaConversionFormat: {\r\n message: string;\r\n };\r\n MediaConversionUnknownFormat: {\r\n message: string;\r\n };\r\n MediaConversionB: {\r\n label: string;\r\n };\r\n MediaConversionKB: {\r\n label: string;\r\n };\r\n MediaConversionMB: {\r\n label: string;\r\n };\r\n MediaConversionGB: {\r\n label: string;\r\n };\r\n MediaConversionTB: {\r\n label: string;\r\n };\r\n MediaConversionPT: {\r\n label: string;\r\n };\r\n MediaConversionXB: {\r\n label: string;\r\n };\r\n MediaConversionZB: {\r\n label: string;\r\n };\r\n MediaConversionYB: {\r\n label: string;\r\n };\r\n PercentageConversionPercentFormat: {\r\n message: string;\r\n };\r\n PercentageConversionUnknownFormat: {\r\n message: string;\r\n };\r\n };\r\n Connection: {\r\n NoConnection: {\r\n label: string;\r\n message: string;\r\n };\r\n NoStatusProvider: {\r\n label: string;\r\n message: string;\r\n };\r\n ErrorState: {\r\n label: string;\r\n };\r\n FatalState: {\r\n label: string;\r\n };\r\n OnlineState: {\r\n label: string;\r\n };\r\n fqdn: {\r\n foundFormat: string;\r\n };\r\n NeedsAuthorizationState: {\r\n label: string;\r\n };\r\n UnknownState: {\r\n label: string;\r\n description: string;\r\n };\r\n WarningState: {\r\n label: string;\r\n };\r\n ErrorNodeName: {\r\n message: string;\r\n };\r\n ErrorGatewayUrl: {\r\n message: string;\r\n };\r\n ErrorService: {\r\n message: string;\r\n };\r\n ErrorWorker: {\r\n message: string;\r\n };\r\n };\r\n DirectoryList: {\r\n Upload: {\r\n Error: {\r\n FileNotFound: string;\r\n OperationBlocked: string;\r\n Unknown: string;\r\n UnknownNoMessage: string;\r\n };\r\n };\r\n };\r\n WebsocketStream: {\r\n Common: {\r\n ConnectionRetiesError: {\r\n message: string;\r\n };\r\n HandlerRegistrationError: {\r\n message: string;\r\n };\r\n CommunicationError: {\r\n message: string;\r\n };\r\n CommunicationErrorDetail: {\r\n message: string;\r\n };\r\n };\r\n CimStream: {\r\n ResetError: {\r\n message: string;\r\n };\r\n NoContentError: {\r\n message: string;\r\n };\r\n UnexpectedReceivedError: {\r\n message: string;\r\n };\r\n UnexpectedMultipleError: {\r\n message: string;\r\n };\r\n ConnectionError: {\r\n message: string;\r\n };\r\n };\r\n PowerShellStream: {\r\n ResetError: {\r\n message: string;\r\n };\r\n NoContentError: {\r\n message: string;\r\n };\r\n UnexpectedReceivedError: {\r\n message: string;\r\n };\r\n ConnectionError: {\r\n message: string;\r\n };\r\n };\r\n SshStream: {\r\n ResetError: {\r\n message: string;\r\n };\r\n NoContentError: {\r\n message: string;\r\n };\r\n UnexpectedReceivedError: {\r\n message: string;\r\n };\r\n ConnectionError: {\r\n message: string;\r\n };\r\n UpdateError: {\r\n message: string;\r\n };\r\n };\r\n };\r\n Rpc: {\r\n Version: {\r\n message: string;\r\n };\r\n MissingVersion: {\r\n message: string;\r\n };\r\n Azure: {\r\n Unexpected: {\r\n Error: {\r\n message: string;\r\n };\r\n };\r\n };\r\n };\r\n Decorators: {\r\n Deprecated: {\r\n messageFormat: string;\r\n alternateSignatureFormat: string;\r\n CssClass: {\r\n messageFormat: string;\r\n };\r\n };\r\n Obsolete: {\r\n messageFormat: string;\r\n alternateSignatureFormat: string;\r\n };\r\n };\r\n Errors: {\r\n UserProfile: {\r\n Get: {\r\n formatMessage: string;\r\n };\r\n };\r\n };\r\n ScheduleReboot: {\r\n Restart: {\r\n Inprogress: {\r\n Title: string;\r\n Message: string;\r\n };\r\n Success: {\r\n Title: string;\r\n Message: string;\r\n };\r\n Fail: {\r\n Title: string;\r\n Message: string;\r\n };\r\n };\r\n Schedule: {\r\n Success: {\r\n Title: string;\r\n Message: string;\r\n };\r\n Fail: {\r\n Title: string;\r\n Message: string;\r\n };\r\n };\r\n Confirmation: {\r\n Title: string;\r\n Message: string;\r\n };\r\n Error: {\r\n NoRestartOptions: string;\r\n };\r\n Info: {\r\n CancellingReboot: string;\r\n };\r\n };\r\n CredSSPManager: {\r\n TryGatewayLocalPowerShellConfigNotConfirmed: {\r\n error: string;\r\n };\r\n };\r\n TranslateGatewayUrls: {\r\n Url: {\r\n Not: {\r\n expected: {\r\n ErrorMessage: string;\r\n };\r\n };\r\n };\r\n };\r\n };\r\n };\r\n};\r\n"]}
1
+ {"version":3,"sources":["../../../packages/core/generated/strings.ts"],"names":[],"mappings":"AACA;;;GAGG;AACH,MAAM,WAAW,OAAO;IACpB,YAAY,EAAE;QACV,IAAI,EAAE;YACF,KAAK,EAAE;gBACH,iBAAiB,EAAE;oBACf,OAAO,EAAE,MAAM,CAAC;iBACnB,CAAC;gBACF,aAAa,EAAE;oBACX,OAAO,EAAE,MAAM,CAAC;iBACnB,CAAC;gBACF,cAAc,EAAE;oBACZ,OAAO,EAAE,MAAM,CAAC;iBACnB,CAAC;gBACF,mBAAmB,EAAE;oBACjB,OAAO,EAAE,MAAM,CAAC;iBACnB,CAAC;gBACF,eAAe,EAAE;oBACb,OAAO,EAAE,MAAM,CAAC;iBACnB,CAAC;gBACF,MAAM,EAAE;oBACJ,OAAO,EAAE,MAAM,CAAC;iBACnB,CAAC;gBACF,4BAA4B,EAAE;oBAC1B,OAAO,EAAE,MAAM,CAAC;iBACnB,CAAC;gBACF,6BAA6B,EAAE;oBAC3B,OAAO,EAAE,MAAM,CAAC;iBACnB,CAAC;gBACF,oBAAoB,EAAE;oBAClB,OAAO,EAAE,MAAM,CAAC;iBACnB,CAAC;gBACF,wBAAwB,EAAE;oBACtB,OAAO,EAAE,MAAM,CAAC;iBACnB,CAAC;gBACF,sBAAsB,EAAE;oBACpB,OAAO,EAAE,MAAM,CAAC;iBACnB,CAAC;gBACF,0BAA0B,EAAE;oBACxB,OAAO,EAAE,M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MAAM,CAAC;qBACzB,CAAC;iBACL,CAAC;aACzC,CAAC;YACF,cAAc,EAAE;gBAC4B,OAAO,EAAE;oBACL,UAAU,EAAE;wBACR,KAAK,EAAE,MAAM,CAAC;wBACd,OAAO,EAAE,MAAM,CAAC;qBACnB,CAAC;oBACF,OAAO,EAAE;wBACL,KAAK,EAAE,MAAM,CAAC;wBACd,OAAO,EAAE,MAAM,CAAC;qBACnB,CAAC;oBACF,IAAI,EAAE;wBACF,KAAK,EAAE,MAAM,CAAC;wBACd,OAAO,EAAE,MAAM,CAAC;qBACnB,CAAC;iBACL,CAAC;gBACF,QAAQ,EAAE;oBACF,OAAO,EAAE;wBACL,KAAK,EAAE,MAAM,CAAC;wBACd,OAAO,EAAE,MAAM,CAAC;qBACnB,CAAC;oBACF,IAAI,EAAE;wBACF,KAAK,EAAE,MAAM,CAAC;wBACd,OAAO,EAAE,MAAM,CAAC;qBACnB,CAAC;iBACT,CAAC;gBACF,YAAY,EAAE;oBACV,KAAK,EAAE,MAAM,CAAC;oBACd,OAAO,EAAE,MAAM,CAAC;iBACnB,CAAC;gBACF,KAAK,EAAE;oBACH,gBAAgB,EAAE,MAAM,CAAC;iBAC5B,CAAC;gBACF,IAAI,EAAE;oBACF,gBAAgB,EAAE,MAAM,CAAC;iBAC5B,CAAC;aAC7C,CAAC;YACF,cAAc,EAAE;gBACgC,2CAA2C,EAAE;oBACzC,KAAK,EAAE,MAAM,CAAC;iBACjB,CAAC;aACjD,CAAC;YACF,oBAAoB,EAAE;gBAC8B,GAAG,EAAE;oBACD,GAAG,EAAE;wBACD,QAAQ,EAAE;4BACN,YAAY,EAAE,MAAM,CAAC;yBACxB,CAAC;qBACL,CAAC;iBACL,CAAC;aACrD,CAAC;SACL,CAAC;KACL,CAAC;CACL","file":"strings.d.ts","sourcesContent":["/* eslint:disable */\n/**\n * @file Source code generated by gulp-resjson.\n * @version 1.0\n */\nexport interface Strings {\r\n MsftSmeShell: {\r\n Core: {\r\n Error: {\r\n ArgumentNullError: {\r\n message: string;\r\n };\r\n ArgumentError: {\r\n message: string;\r\n };\r\n UnknownBrowser: {\r\n message: string;\r\n };\r\n GatewayNameRequired: {\r\n message: string;\r\n };\r\n NoResponseError: {\r\n message: string;\r\n };\r\n NoCode: {\r\n message: string;\r\n };\r\n PowerShellUnableSessionClose: {\r\n message: string;\r\n };\r\n PowerShellUnableCancelCommand: {\r\n message: string;\r\n };\r\n QueryCacheFetchOrder: {\r\n message: string;\r\n };\r\n QueryCacheFetchErrorOnce: {\r\n message: string;\r\n };\r\n QueryCacheRefreshOrder: {\r\n message: string;\r\n };\r\n QueryCacheRefreshErrorOnce: {\r\n message: string;\r\n };\r\n QueryCacheRecoverNoCachedResource: {\r\n message: string;\r\n };\r\n QueryCacheRecoverMissingRecoveryOption: {\r\n message: string;\r\n };\r\n ResourceCacheUnableFind: {\r\n message: string;\r\n };\r\n LoggingUnableSubmit: {\r\n message: string;\r\n };\r\n EnvironmentNotInitialized: {\r\n message: string;\r\n };\r\n EnvironmentMissingDefault: {\r\n message: string;\r\n };\r\n NotificationRpcInitialization: {\r\n message: string;\r\n };\r\n NotificationUnsupportedState: {\r\n message: string;\r\n };\r\n NotificationEmptyMessage: {\r\n message: string;\r\n };\r\n NotificationNoWorkItemFound: {\r\n message: string;\r\n };\r\n NotificationUnexpectedReceived: {\r\n message: string;\r\n };\r\n NotificationWebsocketInitialize: {\r\n message: string;\r\n };\r\n NotificationNoIdFound: {\r\n message: string;\r\n };\r\n RpcTypeNoMatch: {\r\n message: string;\r\n };\r\n RpcNotFoundModule: {\r\n message: string;\r\n };\r\n RpcTargetWindowNotConfigured: {\r\n message: string;\r\n };\r\n RpcExpiredRetry: {\r\n message: string;\r\n };\r\n RpcExpired: {\r\n message: string;\r\n };\r\n RpcSignatureError: {\r\n message: string;\r\n };\r\n RpcUnexpectedDestination: {\r\n message: string;\r\n };\r\n RpcUnexpectedEvent: {\r\n message: string;\r\n };\r\n RpcUnexpectedSequence: {\r\n message: string;\r\n };\r\n RpcUnexpectedErrorSequence: {\r\n message: string;\r\n };\r\n RpcNotInitialized: {\r\n message: string;\r\n };\r\n RpcNotFountInbound: {\r\n message: string;\r\n };\r\n RpcTimeout: {\r\n message: string;\r\n };\r\n AddNativeErrorCode: {\r\n message: string;\r\n };\r\n RpcSubjectClosed: {\r\n message: string;\r\n };\r\n RpcNotRegisteredHandler: {\r\n message: string;\r\n };\r\n RpcFailedFindModuleManifest: {\r\n message: string;\r\n };\r\n ForwarderIdConflict: {\r\n message: string;\r\n };\r\n ForwarderIdNotFound: {\r\n message: string;\r\n };\r\n ForwarderUnknownType: {\r\n message: string;\r\n };\r\n InvalidValue: {\r\n message: string;\r\n };\r\n ServerListRetrieve: {\r\n message: string;\r\n };\r\n ServerListFailedSave: {\r\n message: string;\r\n };\r\n ConnectionStream: {\r\n message: string;\r\n };\r\n ExpectedSingleNode: {\r\n message: string;\r\n };\r\n ExpectedClusterNode: {\r\n message: string;\r\n };\r\n BatchConnection: {\r\n message: string;\r\n };\r\n BatchResponseParsing: {\r\n message: string;\r\n };\r\n BatchUnSupportedInvocation: {\r\n message: string;\r\n };\r\n GatewayUrlNotConfigured: {\r\n message: string;\r\n };\r\n GatewayUrlMalformed: {\r\n message: string;\r\n };\r\n ToolValidationResult: {\r\n message: string;\r\n };\r\n ToolValidationUnsupportedOperator: {\r\n message: string;\r\n };\r\n ToolValidationUnsupportedDataType: {\r\n message: string;\r\n };\r\n ToolValidationVersionFormat: {\r\n message: string;\r\n };\r\n ToolValidationInventoryError: {\r\n title: string;\r\n message: string;\r\n };\r\n ToolValidationGatewayInventoryError: {\r\n title: string;\r\n message: string;\r\n };\r\n PowerShellRunCommandFormat: {\r\n message: string;\r\n };\r\n PrefixFormat: {\r\n message: string;\r\n };\r\n Details: {\r\n text: string;\r\n };\r\n };\r\n ErrorCode: {\r\n Code0: {\r\n message: string;\r\n };\r\n Code5: {\r\n message: string;\r\n };\r\n Code50: {\r\n message: string;\r\n };\r\n Code87: {\r\n message: string;\r\n };\r\n Code110: {\r\n message: string;\r\n };\r\n Code1323: {\r\n message: string;\r\n };\r\n Code1326: {\r\n message: string;\r\n };\r\n Code1355: {\r\n message: string;\r\n };\r\n Code2224: {\r\n message: string;\r\n };\r\n Code2691: {\r\n message: string;\r\n };\r\n Code2692: {\r\n message: string;\r\n };\r\n Code8004108: {\r\n message: string;\r\n };\r\n Translated: {\r\n message: string;\r\n };\r\n Generic: {\r\n message: string;\r\n };\r\n };\r\n ErrorFormat: {\r\n Single: {\r\n message: string;\r\n Details: {\r\n message: string;\r\n };\r\n };\r\n Multiple: {\r\n message: string;\r\n Details: {\r\n message: string;\r\n };\r\n };\r\n };\r\n Units: {\r\n MediaConversionFormat: {\r\n message: string;\r\n };\r\n MediaConversionUnknownFormat: {\r\n message: string;\r\n };\r\n MediaConversionB: {\r\n label: string;\r\n };\r\n MediaConversionKB: {\r\n label: string;\r\n };\r\n MediaConversionMB: {\r\n label: string;\r\n };\r\n MediaConversionGB: {\r\n label: string;\r\n };\r\n MediaConversionTB: {\r\n label: string;\r\n };\r\n MediaConversionPT: {\r\n label: string;\r\n };\r\n MediaConversionXB: {\r\n label: string;\r\n };\r\n MediaConversionZB: {\r\n label: string;\r\n };\r\n MediaConversionYB: {\r\n label: string;\r\n };\r\n PercentageConversionPercentFormat: {\r\n message: string;\r\n };\r\n PercentageConversionUnknownFormat: {\r\n message: string;\r\n };\r\n };\r\n Connection: {\r\n NoConnection: {\r\n label: string;\r\n message: string;\r\n };\r\n NoStatusProvider: {\r\n label: string;\r\n message: string;\r\n };\r\n ErrorState: {\r\n label: string;\r\n };\r\n FatalState: {\r\n label: string;\r\n };\r\n OnlineState: {\r\n label: string;\r\n };\r\n fqdn: {\r\n foundFormat: string;\r\n };\r\n NeedsAuthorizationState: {\r\n label: string;\r\n };\r\n UnknownState: {\r\n label: string;\r\n description: string;\r\n };\r\n WarningState: {\r\n label: string;\r\n };\r\n ErrorNodeName: {\r\n message: string;\r\n };\r\n ErrorGatewayUrl: {\r\n message: string;\r\n };\r\n ErrorService: {\r\n message: string;\r\n };\r\n ErrorWorker: {\r\n message: string;\r\n };\r\n };\r\n DirectoryList: {\r\n Upload: {\r\n Error: {\r\n FileNotFound: string;\r\n OperationBlocked: string;\r\n Unknown: string;\r\n UnknownNoMessage: string;\r\n };\r\n };\r\n };\r\n WebsocketStream: {\r\n Common: {\r\n ConnectionRetiesError: {\r\n message: string;\r\n };\r\n HandlerRegistrationError: {\r\n message: string;\r\n };\r\n CommunicationError: {\r\n message: string;\r\n };\r\n CommunicationErrorDetail: {\r\n message: string;\r\n };\r\n };\r\n CimStream: {\r\n ResetError: {\r\n message: string;\r\n };\r\n NoContentError: {\r\n message: string;\r\n };\r\n UnexpectedReceivedError: {\r\n message: string;\r\n };\r\n UnexpectedMultipleError: {\r\n message: string;\r\n };\r\n ConnectionError: {\r\n message: string;\r\n };\r\n };\r\n PowerShellStream: {\r\n ResetError: {\r\n message: string;\r\n };\r\n NoContentError: {\r\n message: string;\r\n };\r\n UnexpectedReceivedError: {\r\n message: string;\r\n };\r\n ConnectionError: {\r\n message: string;\r\n };\r\n };\r\n SshStream: {\r\n ResetError: {\r\n message: string;\r\n };\r\n NoContentError: {\r\n message: string;\r\n };\r\n UnexpectedReceivedError: {\r\n message: string;\r\n };\r\n ConnectionError: {\r\n message: string;\r\n };\r\n UpdateError: {\r\n message: string;\r\n };\r\n };\r\n };\r\n Rpc: {\r\n Version: {\r\n message: string;\r\n };\r\n MissingVersion: {\r\n message: string;\r\n };\r\n Azure: {\r\n Unexpected: {\r\n Error: {\r\n message: string;\r\n };\r\n };\r\n };\r\n };\r\n Decorators: {\r\n Deprecated: {\r\n messageFormat: string;\r\n alternateSignatureFormat: string;\r\n CssClass: {\r\n messageFormat: string;\r\n };\r\n };\r\n Obsolete: {\r\n messageFormat: string;\r\n alternateSignatureFormat: string;\r\n };\r\n };\r\n Errors: {\r\n UserProfile: {\r\n Get: {\r\n formatMessage: string;\r\n };\r\n };\r\n };\r\n ScheduleReboot: {\r\n Restart: {\r\n Inprogress: {\r\n Title: string;\r\n Message: string;\r\n };\r\n Success: {\r\n Title: string;\r\n Message: string;\r\n };\r\n Fail: {\r\n Title: string;\r\n Message: string;\r\n };\r\n };\r\n Schedule: {\r\n Success: {\r\n Title: string;\r\n Message: string;\r\n };\r\n Fail: {\r\n Title: string;\r\n Message: string;\r\n };\r\n };\r\n Confirmation: {\r\n Title: string;\r\n Message: string;\r\n };\r\n Error: {\r\n NoRestartOptions: string;\r\n };\r\n Info: {\r\n CancellingReboot: string;\r\n };\r\n };\r\n CredSSPManager: {\r\n TryGatewayLocalPowerShellConfigNotConfirmed: {\r\n error: string;\r\n };\r\n };\r\n TranslateGatewayUrls: {\r\n Url: {\r\n Not: {\r\n expected: {\r\n ErrorMessage: string;\r\n };\r\n };\r\n };\r\n };\r\n };\r\n };\r\n};\r\n"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../packages/core/generated/strings.ts"],"names":[],"mappings":"AA4fC,CAAC","file":"strings.js","sourcesContent":["/* eslint:disable */\n/**\n * @file Source code generated by gulp-resjson.\n * @version 1.0\n */\nexport interface Strings {\r\n MsftSmeShell: {\r\n Core: {\r\n Error: {\r\n ArgumentNullError: {\r\n message: string;\r\n };\r\n ArgumentError: {\r\n message: string;\r\n };\r\n UnknownBrowser: {\r\n message: string;\r\n };\r\n GatewayNameRequired: {\r\n message: string;\r\n };\r\n NoResponseError: {\r\n message: string;\r\n };\r\n NoCode: {\r\n message: string;\r\n };\r\n PowerShellUnableSessionClose: {\r\n message: string;\r\n };\r\n PowerShellUnableCancelCommand: {\r\n message: string;\r\n };\r\n QueryCacheFetchOrder: {\r\n message: string;\r\n };\r\n QueryCacheFetchErrorOnce: {\r\n message: string;\r\n };\r\n QueryCacheRefreshOrder: {\r\n message: string;\r\n };\r\n QueryCacheRefreshErrorOnce: {\r\n message: string;\r\n };\r\n QueryCacheRecoverNoCachedResource: {\r\n message: string;\r\n };\r\n QueryCacheRecoverMissingRecoveryOption: {\r\n message: string;\r\n };\r\n ResourceCacheUnableFind: {\r\n message: string;\r\n };\r\n LoggingUnableSubmit: {\r\n message: string;\r\n };\r\n EnvironmentNotInitialized: {\r\n message: string;\r\n };\r\n EnvironmentMissingDefault: {\r\n message: string;\r\n };\r\n NotificationRpcInitialization: {\r\n message: string;\r\n };\r\n NotificationUnsupportedState: {\r\n message: string;\r\n };\r\n NotificationEmptyMessage: {\r\n message: string;\r\n };\r\n NotificationNoWorkItemFound: {\r\n message: string;\r\n };\r\n NotificationUnexpectedReceived: {\r\n message: string;\r\n };\r\n NotificationWebsocketInitialize: {\r\n message: string;\r\n };\r\n NotificationNoIdFound: {\r\n message: string;\r\n };\r\n RpcTypeNoMatch: {\r\n message: string;\r\n };\r\n RpcNotFoundModule: {\r\n message: string;\r\n };\r\n RpcTargetWindowNotConfigured: {\r\n message: string;\r\n };\r\n RpcExpiredRetry: {\r\n message: string;\r\n };\r\n RpcExpired: {\r\n message: string;\r\n };\r\n RpcSignatureError: {\r\n message: string;\r\n };\r\n RpcUnexpectedDestination: {\r\n message: string;\r\n };\r\n RpcUnexpectedEvent: {\r\n message: string;\r\n };\r\n RpcUnexpectedSequence: {\r\n message: string;\r\n };\r\n RpcUnexpectedErrorSequence: {\r\n message: string;\r\n };\r\n RpcNotInitialized: {\r\n message: string;\r\n };\r\n RpcNotFountInbound: {\r\n message: string;\r\n };\r\n RpcTimeout: {\r\n message: string;\r\n };\r\n AddNativeErrorCode: {\r\n message: string;\r\n };\r\n RpcSubjectClosed: {\r\n message: string;\r\n };\r\n RpcNotRegisteredHandler: {\r\n message: string;\r\n };\r\n RpcFailedFindModuleManifest: {\r\n message: string;\r\n };\r\n ForwarderIdConflict: {\r\n message: string;\r\n };\r\n ForwarderIdNotFound: {\r\n message: string;\r\n };\r\n ForwarderUnknownType: {\r\n message: string;\r\n };\r\n InvalidValue: {\r\n message: string;\r\n };\r\n ServerListRetrieve: {\r\n message: string;\r\n };\r\n ServerListFailedSave: {\r\n message: string;\r\n };\r\n ConnectionStream: {\r\n message: string;\r\n };\r\n ExpectedSingleNode: {\r\n message: string;\r\n };\r\n ExpectedClusterNode: {\r\n message: string;\r\n };\r\n BatchConnection: {\r\n message: string;\r\n };\r\n BatchResponseParsing: {\r\n message: string;\r\n };\r\n BatchUnSupportedInvocation: {\r\n message: string;\r\n };\r\n GatewayUrlNotConfigured: {\r\n message: string;\r\n };\r\n GatewayUrlMalformed: {\r\n message: string;\r\n };\r\n ToolValidationResult: {\r\n message: string;\r\n };\r\n ToolValidationUnsupportedOperator: {\r\n message: string;\r\n };\r\n ToolValidationUnsupportedDataType: {\r\n message: string;\r\n };\r\n ToolValidationVersionFormat: {\r\n message: string;\r\n };\r\n ToolValidationInventoryError: {\r\n title: string;\r\n message: string;\r\n };\r\n ToolValidationGatewayInventoryError: {\r\n title: string;\r\n message: string;\r\n };\r\n PowerShellRunCommandFormat: {\r\n message: string;\r\n };\r\n PrefixFormat: {\r\n message: string;\r\n };\r\n };\r\n ErrorCode: {\r\n Code0: {\r\n message: string;\r\n };\r\n Code5: {\r\n message: string;\r\n };\r\n Code50: {\r\n message: string;\r\n };\r\n Code87: {\r\n message: string;\r\n };\r\n Code110: {\r\n message: string;\r\n };\r\n Code1323: {\r\n message: string;\r\n };\r\n Code1326: {\r\n message: string;\r\n };\r\n Code1355: {\r\n message: string;\r\n };\r\n Code2224: {\r\n message: string;\r\n };\r\n Code2691: {\r\n message: string;\r\n };\r\n Code2692: {\r\n message: string;\r\n };\r\n Code8004108: {\r\n message: string;\r\n };\r\n Translated: {\r\n message: string;\r\n };\r\n Generic: {\r\n message: string;\r\n };\r\n };\r\n ErrorFormat: {\r\n Single: {\r\n message: string;\r\n Details: {\r\n message: string;\r\n };\r\n };\r\n Multiple: {\r\n message: string;\r\n Details: {\r\n message: string;\r\n };\r\n };\r\n };\r\n Units: {\r\n MediaConversionFormat: {\r\n message: string;\r\n };\r\n MediaConversionUnknownFormat: {\r\n message: string;\r\n };\r\n MediaConversionB: {\r\n label: string;\r\n };\r\n MediaConversionKB: {\r\n label: string;\r\n };\r\n MediaConversionMB: {\r\n label: string;\r\n };\r\n MediaConversionGB: {\r\n label: string;\r\n };\r\n MediaConversionTB: {\r\n label: string;\r\n };\r\n MediaConversionPT: {\r\n label: string;\r\n };\r\n MediaConversionXB: {\r\n label: string;\r\n };\r\n MediaConversionZB: {\r\n label: string;\r\n };\r\n MediaConversionYB: {\r\n label: string;\r\n };\r\n PercentageConversionPercentFormat: {\r\n message: string;\r\n };\r\n PercentageConversionUnknownFormat: {\r\n message: string;\r\n };\r\n };\r\n Connection: {\r\n NoConnection: {\r\n label: string;\r\n message: string;\r\n };\r\n NoStatusProvider: {\r\n label: string;\r\n message: string;\r\n };\r\n ErrorState: {\r\n label: string;\r\n };\r\n FatalState: {\r\n label: string;\r\n };\r\n OnlineState: {\r\n label: string;\r\n };\r\n fqdn: {\r\n foundFormat: string;\r\n };\r\n NeedsAuthorizationState: {\r\n label: string;\r\n };\r\n UnknownState: {\r\n label: string;\r\n description: string;\r\n };\r\n WarningState: {\r\n label: string;\r\n };\r\n ErrorNodeName: {\r\n message: string;\r\n };\r\n ErrorGatewayUrl: {\r\n message: string;\r\n };\r\n ErrorService: {\r\n message: string;\r\n };\r\n ErrorWorker: {\r\n message: string;\r\n };\r\n };\r\n DirectoryList: {\r\n Upload: {\r\n Error: {\r\n FileNotFound: string;\r\n OperationBlocked: string;\r\n Unknown: string;\r\n UnknownNoMessage: string;\r\n };\r\n };\r\n };\r\n WebsocketStream: {\r\n Common: {\r\n ConnectionRetiesError: {\r\n message: string;\r\n };\r\n HandlerRegistrationError: {\r\n message: string;\r\n };\r\n CommunicationError: {\r\n message: string;\r\n };\r\n CommunicationErrorDetail: {\r\n message: string;\r\n };\r\n };\r\n CimStream: {\r\n ResetError: {\r\n message: string;\r\n };\r\n NoContentError: {\r\n message: string;\r\n };\r\n UnexpectedReceivedError: {\r\n message: string;\r\n };\r\n UnexpectedMultipleError: {\r\n message: string;\r\n };\r\n ConnectionError: {\r\n message: string;\r\n };\r\n };\r\n PowerShellStream: {\r\n ResetError: {\r\n message: string;\r\n };\r\n NoContentError: {\r\n message: string;\r\n };\r\n UnexpectedReceivedError: {\r\n message: string;\r\n };\r\n ConnectionError: {\r\n message: string;\r\n };\r\n };\r\n SshStream: {\r\n ResetError: {\r\n message: string;\r\n };\r\n NoContentError: {\r\n message: string;\r\n };\r\n UnexpectedReceivedError: {\r\n message: string;\r\n };\r\n ConnectionError: {\r\n message: string;\r\n };\r\n UpdateError: {\r\n message: string;\r\n };\r\n };\r\n };\r\n Rpc: {\r\n Version: {\r\n message: string;\r\n };\r\n MissingVersion: {\r\n message: string;\r\n };\r\n Azure: {\r\n Unexpected: {\r\n Error: {\r\n message: string;\r\n };\r\n };\r\n };\r\n };\r\n Decorators: {\r\n Deprecated: {\r\n messageFormat: string;\r\n alternateSignatureFormat: string;\r\n CssClass: {\r\n messageFormat: string;\r\n };\r\n };\r\n Obsolete: {\r\n messageFormat: string;\r\n alternateSignatureFormat: string;\r\n };\r\n };\r\n Errors: {\r\n UserProfile: {\r\n Get: {\r\n formatMessage: string;\r\n };\r\n };\r\n };\r\n ScheduleReboot: {\r\n Restart: {\r\n Inprogress: {\r\n Title: string;\r\n Message: string;\r\n };\r\n Success: {\r\n Title: string;\r\n Message: string;\r\n };\r\n Fail: {\r\n Title: string;\r\n Message: string;\r\n };\r\n };\r\n Schedule: {\r\n Success: {\r\n Title: string;\r\n Message: string;\r\n };\r\n Fail: {\r\n Title: string;\r\n Message: string;\r\n };\r\n };\r\n Confirmation: {\r\n Title: string;\r\n Message: string;\r\n };\r\n Error: {\r\n NoRestartOptions: string;\r\n };\r\n Info: {\r\n CancellingReboot: string;\r\n };\r\n };\r\n CredSSPManager: {\r\n TryGatewayLocalPowerShellConfigNotConfirmed: {\r\n error: string;\r\n };\r\n };\r\n TranslateGatewayUrls: {\r\n Url: {\r\n Not: {\r\n expected: {\r\n ErrorMessage: string;\r\n };\r\n };\r\n };\r\n };\r\n };\r\n };\r\n};\r\n"]}
1
+ {"version":3,"sources":["../../../packages/core/generated/strings.ts"],"names":[],"mappings":"AA+fC,CAAC","file":"strings.js","sourcesContent":["/* eslint:disable */\n/**\n * @file Source code generated by gulp-resjson.\n * @version 1.0\n */\nexport interface Strings {\r\n MsftSmeShell: {\r\n Core: {\r\n Error: {\r\n ArgumentNullError: {\r\n message: string;\r\n };\r\n ArgumentError: {\r\n message: string;\r\n };\r\n UnknownBrowser: {\r\n message: string;\r\n };\r\n GatewayNameRequired: {\r\n message: string;\r\n };\r\n NoResponseError: {\r\n message: string;\r\n };\r\n NoCode: {\r\n message: string;\r\n };\r\n PowerShellUnableSessionClose: {\r\n message: string;\r\n };\r\n PowerShellUnableCancelCommand: {\r\n message: string;\r\n };\r\n QueryCacheFetchOrder: {\r\n message: string;\r\n };\r\n QueryCacheFetchErrorOnce: {\r\n message: string;\r\n };\r\n QueryCacheRefreshOrder: {\r\n message: string;\r\n };\r\n QueryCacheRefreshErrorOnce: {\r\n message: string;\r\n };\r\n QueryCacheRecoverNoCachedResource: {\r\n message: string;\r\n };\r\n QueryCacheRecoverMissingRecoveryOption: {\r\n message: string;\r\n };\r\n ResourceCacheUnableFind: {\r\n message: string;\r\n };\r\n LoggingUnableSubmit: {\r\n message: string;\r\n };\r\n EnvironmentNotInitialized: {\r\n message: string;\r\n };\r\n EnvironmentMissingDefault: {\r\n message: string;\r\n };\r\n NotificationRpcInitialization: {\r\n message: string;\r\n };\r\n NotificationUnsupportedState: {\r\n message: string;\r\n };\r\n NotificationEmptyMessage: {\r\n message: string;\r\n };\r\n NotificationNoWorkItemFound: {\r\n message: string;\r\n };\r\n NotificationUnexpectedReceived: {\r\n message: string;\r\n };\r\n NotificationWebsocketInitialize: {\r\n message: string;\r\n };\r\n NotificationNoIdFound: {\r\n message: string;\r\n };\r\n RpcTypeNoMatch: {\r\n message: string;\r\n };\r\n RpcNotFoundModule: {\r\n message: string;\r\n };\r\n RpcTargetWindowNotConfigured: {\r\n message: string;\r\n };\r\n RpcExpiredRetry: {\r\n message: string;\r\n };\r\n RpcExpired: {\r\n message: string;\r\n };\r\n RpcSignatureError: {\r\n message: string;\r\n };\r\n RpcUnexpectedDestination: {\r\n message: string;\r\n };\r\n RpcUnexpectedEvent: {\r\n message: string;\r\n };\r\n RpcUnexpectedSequence: {\r\n message: string;\r\n };\r\n RpcUnexpectedErrorSequence: {\r\n message: string;\r\n };\r\n RpcNotInitialized: {\r\n message: string;\r\n };\r\n RpcNotFountInbound: {\r\n message: string;\r\n };\r\n RpcTimeout: {\r\n message: string;\r\n };\r\n AddNativeErrorCode: {\r\n message: string;\r\n };\r\n RpcSubjectClosed: {\r\n message: string;\r\n };\r\n RpcNotRegisteredHandler: {\r\n message: string;\r\n };\r\n RpcFailedFindModuleManifest: {\r\n message: string;\r\n };\r\n ForwarderIdConflict: {\r\n message: string;\r\n };\r\n ForwarderIdNotFound: {\r\n message: string;\r\n };\r\n ForwarderUnknownType: {\r\n message: string;\r\n };\r\n InvalidValue: {\r\n message: string;\r\n };\r\n ServerListRetrieve: {\r\n message: string;\r\n };\r\n ServerListFailedSave: {\r\n message: string;\r\n };\r\n ConnectionStream: {\r\n message: string;\r\n };\r\n ExpectedSingleNode: {\r\n message: string;\r\n };\r\n ExpectedClusterNode: {\r\n message: string;\r\n };\r\n BatchConnection: {\r\n message: string;\r\n };\r\n BatchResponseParsing: {\r\n message: string;\r\n };\r\n BatchUnSupportedInvocation: {\r\n message: string;\r\n };\r\n GatewayUrlNotConfigured: {\r\n message: string;\r\n };\r\n GatewayUrlMalformed: {\r\n message: string;\r\n };\r\n ToolValidationResult: {\r\n message: string;\r\n };\r\n ToolValidationUnsupportedOperator: {\r\n message: string;\r\n };\r\n ToolValidationUnsupportedDataType: {\r\n message: string;\r\n };\r\n ToolValidationVersionFormat: {\r\n message: string;\r\n };\r\n ToolValidationInventoryError: {\r\n title: string;\r\n message: string;\r\n };\r\n ToolValidationGatewayInventoryError: {\r\n title: string;\r\n message: string;\r\n };\r\n PowerShellRunCommandFormat: {\r\n message: string;\r\n };\r\n PrefixFormat: {\r\n message: string;\r\n };\r\n Details: {\r\n text: string;\r\n };\r\n };\r\n ErrorCode: {\r\n Code0: {\r\n message: string;\r\n };\r\n Code5: {\r\n message: string;\r\n };\r\n Code50: {\r\n message: string;\r\n };\r\n Code87: {\r\n message: string;\r\n };\r\n Code110: {\r\n message: string;\r\n };\r\n Code1323: {\r\n message: string;\r\n };\r\n Code1326: {\r\n message: string;\r\n };\r\n Code1355: {\r\n message: string;\r\n };\r\n Code2224: {\r\n message: string;\r\n };\r\n Code2691: {\r\n message: string;\r\n };\r\n Code2692: {\r\n message: string;\r\n };\r\n Code8004108: {\r\n message: string;\r\n };\r\n Translated: {\r\n message: string;\r\n };\r\n Generic: {\r\n message: string;\r\n };\r\n };\r\n ErrorFormat: {\r\n Single: {\r\n message: string;\r\n Details: {\r\n message: string;\r\n };\r\n };\r\n Multiple: {\r\n message: string;\r\n Details: {\r\n message: string;\r\n };\r\n };\r\n };\r\n Units: {\r\n MediaConversionFormat: {\r\n message: string;\r\n };\r\n MediaConversionUnknownFormat: {\r\n message: string;\r\n };\r\n MediaConversionB: {\r\n label: string;\r\n };\r\n MediaConversionKB: {\r\n label: string;\r\n };\r\n MediaConversionMB: {\r\n label: string;\r\n };\r\n MediaConversionGB: {\r\n label: string;\r\n };\r\n MediaConversionTB: {\r\n label: string;\r\n };\r\n MediaConversionPT: {\r\n label: string;\r\n };\r\n MediaConversionXB: {\r\n label: string;\r\n };\r\n MediaConversionZB: {\r\n label: string;\r\n };\r\n MediaConversionYB: {\r\n label: string;\r\n };\r\n PercentageConversionPercentFormat: {\r\n message: string;\r\n };\r\n PercentageConversionUnknownFormat: {\r\n message: string;\r\n };\r\n };\r\n Connection: {\r\n NoConnection: {\r\n label: string;\r\n message: string;\r\n };\r\n NoStatusProvider: {\r\n label: string;\r\n message: string;\r\n };\r\n ErrorState: {\r\n label: string;\r\n };\r\n FatalState: {\r\n label: string;\r\n };\r\n OnlineState: {\r\n label: string;\r\n };\r\n fqdn: {\r\n foundFormat: string;\r\n };\r\n NeedsAuthorizationState: {\r\n label: string;\r\n };\r\n UnknownState: {\r\n label: string;\r\n description: string;\r\n };\r\n WarningState: {\r\n label: string;\r\n };\r\n ErrorNodeName: {\r\n message: string;\r\n };\r\n ErrorGatewayUrl: {\r\n message: string;\r\n };\r\n ErrorService: {\r\n message: string;\r\n };\r\n ErrorWorker: {\r\n message: string;\r\n };\r\n };\r\n DirectoryList: {\r\n Upload: {\r\n Error: {\r\n FileNotFound: string;\r\n OperationBlocked: string;\r\n Unknown: string;\r\n UnknownNoMessage: string;\r\n };\r\n };\r\n };\r\n WebsocketStream: {\r\n Common: {\r\n ConnectionRetiesError: {\r\n message: string;\r\n };\r\n HandlerRegistrationError: {\r\n message: string;\r\n };\r\n CommunicationError: {\r\n message: string;\r\n };\r\n CommunicationErrorDetail: {\r\n message: string;\r\n };\r\n };\r\n CimStream: {\r\n ResetError: {\r\n message: string;\r\n };\r\n NoContentError: {\r\n message: string;\r\n };\r\n UnexpectedReceivedError: {\r\n message: string;\r\n };\r\n UnexpectedMultipleError: {\r\n message: string;\r\n };\r\n ConnectionError: {\r\n message: string;\r\n };\r\n };\r\n PowerShellStream: {\r\n ResetError: {\r\n message: string;\r\n };\r\n NoContentError: {\r\n message: string;\r\n };\r\n UnexpectedReceivedError: {\r\n message: string;\r\n };\r\n ConnectionError: {\r\n message: string;\r\n };\r\n };\r\n SshStream: {\r\n ResetError: {\r\n message: string;\r\n };\r\n NoContentError: {\r\n message: string;\r\n };\r\n UnexpectedReceivedError: {\r\n message: string;\r\n };\r\n ConnectionError: {\r\n message: string;\r\n };\r\n UpdateError: {\r\n message: string;\r\n };\r\n };\r\n };\r\n Rpc: {\r\n Version: {\r\n message: string;\r\n };\r\n MissingVersion: {\r\n message: string;\r\n };\r\n Azure: {\r\n Unexpected: {\r\n Error: {\r\n message: string;\r\n };\r\n };\r\n };\r\n };\r\n Decorators: {\r\n Deprecated: {\r\n messageFormat: string;\r\n alternateSignatureFormat: string;\r\n CssClass: {\r\n messageFormat: string;\r\n };\r\n };\r\n Obsolete: {\r\n messageFormat: string;\r\n alternateSignatureFormat: string;\r\n };\r\n };\r\n Errors: {\r\n UserProfile: {\r\n Get: {\r\n formatMessage: string;\r\n };\r\n };\r\n };\r\n ScheduleReboot: {\r\n Restart: {\r\n Inprogress: {\r\n Title: string;\r\n Message: string;\r\n };\r\n Success: {\r\n Title: string;\r\n Message: string;\r\n };\r\n Fail: {\r\n Title: string;\r\n Message: string;\r\n };\r\n };\r\n Schedule: {\r\n Success: {\r\n Title: string;\r\n Message: string;\r\n };\r\n Fail: {\r\n Title: string;\r\n Message: string;\r\n };\r\n };\r\n Confirmation: {\r\n Title: string;\r\n Message: string;\r\n };\r\n Error: {\r\n NoRestartOptions: string;\r\n };\r\n Info: {\r\n CancellingReboot: string;\r\n };\r\n };\r\n CredSSPManager: {\r\n TryGatewayLocalPowerShellConfigNotConfirmed: {\r\n error: string;\r\n };\r\n };\r\n TranslateGatewayUrls: {\r\n Url: {\r\n Not: {\r\n expected: {\r\n ErrorMessage: string;\r\n };\r\n };\r\n };\r\n };\r\n };\r\n };\r\n};\r\n"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../packages/core/notification/notification.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,eAAe,EAAE,MAAM,4CAA4C,CAAC;AAC7E,OAAO,EAAE,WAAW,EAAE,MAAM,sCAAsC,CAAC;AACnE,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAChE,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AACvD,OAAO,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAC7D,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,EAA0B,yBAAyB,EAAE,MAAM,2BAA2B,CAAC;AAC9F,OAAO,EAAE,aA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BAAqB;IAmB7B,OAAO,CAAC,sBAAsB;IAI9B,OAAO,CAAC,UAAU;IAoBlB,OAAO,CAAC,aAAa;IAMrB,OAAO,CAAC,cAAc;IAiBtB,OAAO,CAAC,iBAAiB;CAgC5B","file":"notification.d.ts","sourcesContent":["import { Globalization } from '../data/globalization';\r\nimport { Logging } from '../diagnostics/logging';\r\nimport { Strings } from '../generated/strings';\r\nimport { EnvironmentModule } from '../manifest/environment-modules';\r\nimport { RpcNotification } from '../rpc/notification/rpc-notification-model';\r\nimport { RpcWorkItem } from '../rpc/work-item/rpc-work-item-model';\r\nimport { NotificationLinkType } from './notification-link-type';\r\nimport { IFrameService } from './notification-manager';\r\nimport { NotificationMessage } from './notification-message';\r\nimport { NotificationState } from './notification-state';\r\nimport { PowerShellNotification, PowerShellWorkItemMessage } from './powershell-notification';\r\nimport { SocketMessage } from './socket-signalr';\r\nimport { RecoveredWorkItem } from './work-item-request';\r\n\r\n/**\r\n * Notification changed event type.\r\n */\r\nexport enum NotificationChangeEvent {\r\n Initialized,\r\n InitializationFailed,\r\n Add,\r\n Remove,\r\n Change\r\n}\r\n\r\n/**\r\n * Notification changed event packet.\r\n */\r\nexport interface NotificationEvent {\r\n changeEvent: NotificationChangeEvent;\r\n notification?: Notification;\r\n}\r\n\r\n/**\r\n * Internal notification object converted from ClientNotification object.\r\n * Contains data to track notifications.\r\n */\r\nexport class Notification {\r\n private strings: Strings = MsftSme.getStrings<Strings>();\r\n\r\n /**\r\n * Work item passed from RPC or client on shell.\r\n */\r\n private workItem: RpcWorkItem;\r\n\r\n /**\r\n * The type ID of work item.\r\n */\r\n public typeId: string;\r\n\r\n /**\r\n * The node name.\r\n */\r\n public nodeName: string;\r\n\r\n /**\r\n * The module name.\r\n */\r\n public moduleName: string;\r\n\r\n /**\r\n * The entry point name within the module\r\n */\r\n public entryPointName: string;\r\n\r\n /**\r\n * The module display name.\r\n */\r\n public moduleDisplayName: string;\r\n\r\n /**\r\n * Object included last response.\r\n */\r\n public object: any;\r\n\r\n /**\r\n * The state of notification.\r\n */\r\n public state: NotificationState;\r\n\r\n /**\r\n * The title of work item to display user. (localized)\r\n */\r\n public title: string;\r\n\r\n /**\r\n * @depracated\r\n * The description of work item to display user. (localized)\r\n */\r\n public description: string;\r\n\r\n /**\r\n * The message. (localized)\r\n */\r\n public message: string;\r\n\r\n /**\r\n * Possible solution message to address error. (localized)\r\n */\r\n public solutionMessage: string;\r\n\r\n /**\r\n * True if the notification was created from recover, updates from messages should be taken\r\n */\r\n public isFromRecover = false;\r\n\r\n /**\r\n * True if the notification is disabled and should not be shown to the user\r\n */\r\n public isDisabled = false;\r\n\r\n /**\r\n * The start timestamp as a formatted globalized string\r\n */\r\n public startTimestamp: string;\r\n\r\n /**\r\n * The last changed timestamp as a formatted globalized string\r\n */\r\n public changedTimestamp: string;\r\n\r\n /**\r\n * The last changed timestamp as a number\r\n */\r\n public changedTimestampValue: number;\r\n\r\n /**\r\n * The end timestamp as a formatted globalized string\r\n */\r\n public endTimestamp: string;\r\n\r\n /**\r\n * The progress percent.\r\n */\r\n public progressPercent: number;\r\n\r\n /**\r\n * The success link to navigate to the object view. (optional)\r\n * At default, it brings to the home page of the module.\r\n */\r\n public link: string;\r\n\r\n /**\r\n * the notification link type of the link\r\n */\r\n public linkType: NotificationLinkType;\r\n\r\n /**\r\n * True if we should show the link in the notification's alert\r\n * We will show the link if there is a custom link or it is a long running request\r\n */\r\n public showLinkInAlert = false;\r\n\r\n /**\r\n * Marked it's no longer display to include list of notifications.\r\n */\r\n public dismissed = false;\r\n\r\n /**\r\n * The parent URI window.location.pathname.\r\n */\r\n public locationPathname: string;\r\n\r\n /**\r\n * The parent URI window.location.search\r\n */\r\n public locationSearch: string;\r\n\r\n /**\r\n *\r\n * Tracks if the notification has been read.\r\n */\r\n public isUnread = true;\r\n\r\n /**\r\n * Create notification from WorkItem.\r\n *\r\n * @param id the notification ID.\r\n * @param workItem the RPC work item.\r\n * @param state the initial state.\r\n * @param object the object from query result.\r\n * @return notification the notification object.\r\n */\r\n public static createFromWorkItem(\r\n id: string, workItem: RpcWorkItem, state: NotificationState, iFrameService: IFrameService, object?: any): Notification {\r\n const notification = new Notification(id);\r\n notification.workItem = workItem;\r\n\r\n notification.state = state;\r\n notification.object = object;\r\n notification.initializeFromWorkItem(workItem, iFrameService);\r\n return notification;\r\n }\r\n\r\n /**\r\n * Create notification from recovered work item.\r\n *\r\n * @param recoveredWorkItem the recovered work item.\r\n * @return notification the notification object.\r\n */\r\n public static createFromRecover(recoveredWorkItem: RecoveredWorkItem, iFrameService: IFrameService): Notification {\r\n const notification = new Notification(recoveredWorkItem.id);\r\n notification.workItem = recoveredWorkItem.metadata;\r\n notification.isFromRecover = true;\r\n\r\n if (recoveredWorkItem.failed) {\r\n notification.state = NotificationState.Error;\r\n notification.object = { errorType: 'WorkItemRecover', message: recoveredWorkItem.errorMessage };\r\n } else {\r\n notification.state = NotificationState.InProgress;\r\n notification.object = {};\r\n }\r\n\r\n notification.initializeFromWorkItem(recoveredWorkItem.metadata, iFrameService);\r\n return notification;\r\n }\r\n\r\n /**\r\n * Create notification from instant request.\r\n *\r\n * @param client the RPC notification request.\r\n * @return notification the notification object.\r\n */\r\n public static createFromClient(client: RpcNotification, iFrameService: IFrameService): Notification {\r\n const notification = new Notification(client.id);\r\n notification.locationPathname = window.location.pathname;\r\n notification.locationSearch = window.location.search;\r\n notification.initializeFromInstant(client, iFrameService);\r\n return notification;\r\n }\r\n\r\n /**\r\n * Initializes a new instance of the Notification class.\r\n *\r\n * @param id the notification ID.\r\n */\r\n constructor(public id: string) { }\r\n\r\n /**\r\n * Update a notification by work item from RPC.\r\n * @param id the notification id.\r\n * @param workItem the work item.\r\n * @param state the state of the notification.\r\n * @param object the object from query result.\r\n */\r\n public updateFromWorkItem(id: string, workItem: RpcWorkItem, state: NotificationState, object?: any) {\r\n let changed = false;\r\n\r\n if (this.updateState(state)) {\r\n changed = true;\r\n const now = Date.now();\r\n this.changedTimestampValue = now;\r\n this.changedTimestamp = this.endTimestamp = this.getGlobalizedTimestamp(now);\r\n }\r\n\r\n if (this.object !== object) {\r\n changed = true;\r\n this.object = object;\r\n }\r\n\r\n this.updateMessageAndLinkAndTitle(workItem);\r\n return !this.isDisabled && changed;\r\n }\r\n\r\n /**\r\n * Update the notification by socket message from the gateway.\r\n *\r\n * @param item the socket message.\r\n * @return boolean the changed status.\r\n */\r\n public updateFromMessage(item: SocketMessage<PowerShellWorkItemMessage>): boolean {\r\n let changed = false;\r\n const now = Date.now();\r\n if (PowerShellNotification.hasError(item)) {\r\n Logging.logDebug('Notification', '{0}/Error/{1}'.format(this.id, JSON.stringify(item.message.errors)));\r\n if (this.updateState(NotificationState.Error)) {\r\n this.changedTimestampValue = now;\r\n this.changedTimestamp = this.endTimestamp = this.getGlobalizedTimestamp(now);\r\n }\r\n\r\n this.object = item.message.errors && MsftSme.first(item.message.errors);\r\n changed = true;\r\n this.updateMessageAndLinkAndTitle(this.workItem);\r\n return !this.isDisabled;\r\n }\r\n\r\n if (PowerShellNotification.hasException(item)) {\r\n Logging.logDebug('Notification', '{0}/Exception/{1}'.format(this.id, item.message.exception));\r\n if (this.updateState(NotificationState.Error)) {\r\n this.changedTimestampValue = now;\r\n this.changedTimestamp = this.endTimestamp = this.getGlobalizedTimestamp(now);\r\n }\r\n\r\n this.object = { message: item.message.exception };\r\n changed = true;\r\n this.updateMessageAndLinkAndTitle(this.workItem);\r\n return !this.isDisabled;\r\n }\r\n\r\n if (PowerShellNotification.hasProgress(item)) {\r\n Logging.logDebug('Notification', '{0}/Progress/{1}'.format(this.id, JSON.stringify(item.message.progress)));\r\n if (this.updateState(NotificationState.InProgress)) {\r\n this.changedTimestampValue = now;\r\n this.changedTimestamp = this.getGlobalizedTimestamp(now);\r\n }\r\n\r\n this.object = item.message.progress && MsftSme.last(item.message.progress);\r\n if (this.object && this.object.hasOwnProperty('percentComplete')) {\r\n this.progressPercent = this.object && this.object.percentComplete;\r\n }\r\n\r\n if ((this.progressPercent == null || this.progressPercent < 0)\r\n && this.workItem.progressMessage && this.workItem.progressMessage.indexOf('{{percent}}') >= 0) {\r\n return false;\r\n }\r\n\r\n changed = true;\r\n }\r\n\r\n if (PowerShellNotification.hasData(item)) {\r\n Logging.logDebug('Notification', '{0}/Data/{1}'.format(this.id, JSON.stringify(item.message.results)));\r\n this.object = item.message.results && MsftSme.last(item.message.results);\r\n changed = true;\r\n }\r\n\r\n if (PowerShellNotification.hasCompleted(item)) {\r\n Logging.logDebug('Notification', '{0}/Completed'.format(this.id));\r\n if (this.updateState(NotificationState.Success)) {\r\n this.changedTimestampValue = now;\r\n this.changedTimestamp = this.endTimestamp = this.getGlobalizedTimestamp(now);\r\n }\r\n\r\n changed = true;\r\n }\r\n\r\n this.updateMessageAndLinkAndTitle(this.workItem);\r\n return !this.isDisabled && changed;\r\n }\r\n\r\n /**\r\n * Update the notification by socket message from the gateway.\r\n *\r\n * @param state the state of notification.\r\n * @param item the socket message.\r\n * @return boolean the changed status.\r\n */\r\n public updateFromNotificationMessage(state: NotificationState, item: NotificationMessage): boolean {\r\n const now = Date.now();\r\n this.title = item.title;\r\n this.message = item.message;\r\n this.state = state;\r\n this.changedTimestampValue = now;\r\n if (state === NotificationState.InProgress) {\r\n this.changedTimestamp = this.getGlobalizedTimestamp(now);\r\n } else {\r\n this.changedTimestamp = this.endTimestamp = this.getGlobalizedTimestamp(now);\r\n }\r\n\r\n return true;\r\n }\r\n\r\n /**\r\n * Update the notification by instant notification message from the client.\r\n *\r\n * @param client the instant notification object.\r\n * @param boolean the changed status.\r\n */\r\n public updateFromClient(client: RpcNotification): boolean {\r\n let changed = false;\r\n const title = client.title;\r\n if (this.title !== title) {\r\n changed = true;\r\n this.title = title;\r\n }\r\n\r\n if (this.updateState(client.state)) {\r\n const now = Date.now();\r\n this.changedTimestampValue = now;\r\n this.changedTimestamp = this.getGlobalizedTimestamp(now);\r\n changed = true;\r\n if (this.state !== NotificationState.InProgress) {\r\n this.endTimestamp = this.changedTimestamp;\r\n }\r\n }\r\n\r\n const link = this.formatLink(client.link, client.linkType);\r\n if (this.link !== link) {\r\n changed = true;\r\n this.link = link;\r\n this.linkType = client.linkType;\r\n }\r\n\r\n if (this.message !== client.message) {\r\n changed = true;\r\n this.message = client.message;\r\n }\r\n\r\n if (this.solutionMessage !== client.solutionMessage) {\r\n changed = true;\r\n this.solutionMessage = client.solutionMessage;\r\n }\r\n\r\n return changed;\r\n }\r\n\r\n /**\r\n * Gets the module display name.\r\n */\r\n private getModuleDisplayName(iFrameService: IFrameService, sourceName: string, sourceSubName: string): string {\r\n const activeIFrame = iFrameService ? iFrameService.getActiveToolIFrameData() : null;\r\n if (activeIFrame && activeIFrame.entryPoint) {\r\n const entryPoint = activeIFrame.entryPoint;\r\n this.entryPointName = entryPoint.name;\r\n\r\n if (entryPoint.parentModule) {\r\n this.moduleName = entryPoint.parentModule.name;\r\n }\r\n } else {\r\n // fallback see if we can get any info from RPC\r\n this.moduleName = sourceName;\r\n if (sourceSubName) {\r\n this.entryPointName = MsftSme.first(sourceSubName.split('#'));\r\n }\r\n }\r\n\r\n const environment = MsftSme.self().Environment;\r\n\r\n // if moduleName === environment.name then the source is Shell. Return null to use generic module name\r\n if (this.moduleName && this.moduleName !== environment.name) {\r\n const module: EnvironmentModule = MsftSme.find(\r\n <EnvironmentModule[]>environment.modules,\r\n value => value.name === this.moduleName);\r\n if (module) {\r\n if (this.entryPointName) {\r\n const entryPoint = MsftSme.find(module.entryPoints, ep => ep.name === this.entryPointName);\r\n if (entryPoint) {\r\n return entryPoint.displayName;\r\n }\r\n }\r\n\r\n return module.displayName;\r\n }\r\n\r\n return this.moduleName;\r\n }\r\n\r\n return null;\r\n }\r\n\r\n /**\r\n * Update the state.\r\n *\r\n * @param state the new state.\r\n * @return boolean the changed state.\r\n */\r\n private updateState(state: NotificationState): boolean {\r\n if (this.state !== state) {\r\n this.state = state;\r\n return true;\r\n }\r\n\r\n return false;\r\n }\r\n\r\n private initializeFromWorkItem(item: RpcWorkItem, iFrameService: IFrameService): void {\r\n this.nodeName = item.nodeName;\r\n this.moduleDisplayName = this.getModuleDisplayName(iFrameService, item.sourceName, item.sourceSubName);\r\n this.startTimestamp = this.getGlobalizedTimestamp(item.timestamp);\r\n this.changedTimestamp = this.getGlobalizedTimestamp(item.timestamp);\r\n this.changedTimestampValue = item.timestamp;\r\n this.typeId = item.typeId;\r\n this.updateMessageAndLinkAndTitle(item);\r\n }\r\n\r\n private updateMessageAndLinkAndTitle(item: RpcWorkItem): void {\r\n let template: string;\r\n this.isDisabled = !this.isFromRecover && item.disableAllNotifications;\r\n switch (this.state) {\r\n case NotificationState.Started:\r\n this.title = item.inProgressTitle;\r\n template = item.startedMessage;\r\n this.link = this.formatLink(null);\r\n break;\r\n case NotificationState.Error:\r\n this.title = item.errorTitle;\r\n this.isDisabled = !this.isFromRecover && item.disableErrorNotification;\r\n this.endTimestamp = this.getGlobalizedTimestamp(item.timestamp);\r\n template = item.errorMessage;\r\n this.link = this.formatLink(item.errorLink, item.errorLinkType);\r\n this.linkType = item.errorLinkType;\r\n this.showLinkInAlert = true;\r\n this.moduleDisplayName = item.errorLinkText || this.moduleDisplayName;\r\n break;\r\n case NotificationState.InProgress:\r\n this.title = item.inProgressTitle;\r\n template = item.progressMessage;\r\n this.link = this.formatLink(null);\r\n break;\r\n case NotificationState.Success:\r\n this.title = item.successTitle;\r\n this.endTimestamp = this.getGlobalizedTimestamp(item.timestamp);\r\n template = item.successMessage;\r\n this.link = this.formatLink(item.successLink, item.successLinkType);\r\n this.linkType = item.successLinkType;\r\n this.moduleDisplayName = item.successLinkText || this.moduleDisplayName;\r\n this.showLinkInAlert = true;\r\n break;\r\n default:\r\n const message = MsftSme.getStrings<Strings>().MsftSmeShell.Core.Error.NotificationUnsupportedState.message;\r\n throw new Error(message);\r\n }\r\n\r\n this.message = this.formatMessage(template);\r\n }\r\n\r\n private initializeFromInstant(client: RpcNotification, iFrameService: IFrameService): void {\r\n this.nodeName = client.nodeName;\r\n this.moduleDisplayName = client.linkText ?\r\n client.linkText\r\n : this.getModuleDisplayName(iFrameService, client.sourceName, client.sourceSubName);\r\n this.startTimestamp = this.getGlobalizedTimestamp(client.timestamp);\r\n this.changedTimestamp = this.getGlobalizedTimestamp(client.timestamp);\r\n this.changedTimestampValue = client.timestamp;\r\n this.title = client.title;\r\n this.state = client.state;\r\n this.link = this.formatLink(client.link, client.linkType);\r\n this.linkType = client.linkType;\r\n this.message = client.message;\r\n this.solutionMessage = client.solutionMessage;\r\n if (this.state !== NotificationState.Started && this.state !== NotificationState.InProgress) {\r\n this.endTimestamp = this.getGlobalizedTimestamp(client.timestamp);\r\n }\r\n }\r\n\r\n private getGlobalizedTimestamp(timestamp: number): string {\r\n return Globalization.timeOnly(new Date(timestamp));\r\n }\r\n\r\n private formatLink(link: string, linkType?: NotificationLinkType): string {\r\n // href example: \"http://localhost:4400/apps/msft.sme.server-manager!servers/tools/msft.sme.module-seed!main?connection=sme-full1.redmond.corp.microsoft.com\"\r\n if (linkType === NotificationLinkType.Absolute) {\r\n return link;\r\n }\r\n\r\n // null linkType behaves like NotificationLinkType.RelativeToTool\r\n const pathname = linkType === NotificationLinkType.RelativeToRoot ?\r\n '/'\r\n : this.locationPathname || this.workItem && this.workItem.locationPathname;\r\n\r\n if (link && pathname) {\r\n this.showLinkInAlert = true;\r\n return MsftSme.trimEnd(pathname, '/') + '/' + MsftSme.trimStart(link, '/');\r\n }\r\n\r\n this.showLinkInAlert = false;\r\n return pathname;\r\n }\r\n\r\n private formatMessage(template: string): string {\r\n const parameters = this.findParameters(template);\r\n const message = this.replaceParameters(template, parameters);\r\n return message;\r\n }\r\n\r\n private findParameters(template: string): string[] {\r\n const results: string[] = [];\r\n if (!template) {\r\n return results;\r\n }\r\n\r\n const segments = template.split('{{');\r\n for (const seg of segments) {\r\n const index = seg.indexOf('}}');\r\n if (index > 0) {\r\n results.push(seg.substring(0, index));\r\n }\r\n }\r\n\r\n return results;\r\n }\r\n\r\n private replaceParameters(message: string, parameters: string[]): string {\r\n for (const param of parameters) {\r\n if (param === 'percent') {\r\n if (typeof this.progressPercent === 'number') {\r\n message = message.replaceAll('{{percent}}', '' + this.progressPercent);\r\n }\r\n } else if (param === 'objectName') {\r\n if (this.workItem && this.workItem.objectName) {\r\n message = message.replaceAll('{{objectName}}', this.workItem.objectName);\r\n }\r\n } else {\r\n if (this.object) {\r\n const segments = param.split('.');\r\n let target = this.object;\r\n for (const seg of segments) {\r\n if (target[seg]) {\r\n target = target[seg];\r\n } else {\r\n target = null;\r\n break;\r\n }\r\n }\r\n\r\n if (target) {\r\n message = message.replaceAll('{{' + param + '}}', '' + target);\r\n }\r\n }\r\n }\r\n }\r\n\r\n return message;\r\n }\r\n}\r\n"]}
1
+ {"version":3,"sources":["../../../packages/core/notification/notification.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,eAAe,EAAE,MAAM,4CAA4C,CAAC;AAC7E,OAAO,EAAE,WAAW,EAAE,MAAM,sCAAsC,CAAC;AACnE,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAChE,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AACvD,OAAO,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAC7D,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,EAA0B,yBAAyB,EAAE,MAAM,2BAA2B,CAAC;AAC9F,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAExD;;GAEG;AACH,oBAAY,uBAAuB;IAC/B,WAAW,IAAA;IACX,oBAAoB,IAAA;IACpB,GAAG,IAAA;IACH,MAAM,IAAA;IACN,MAAM,IAAA;CACT;AAED;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAC9B,WAAW,EAAE,uBAAuB,CAAC;IACrC,YAAY,CAAC,EAAE,YAAY,CAAC;CAC/B;AAED;;;GAGG;AAC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Q,EAAE,WAAW,EAAE,KAAK,EAAE,iBAAiB,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,CAAC,EAAE,GAAG,GAAG,YAAY;IAU1H;;;;;OAKG;WACW,iBAAiB,CAAC,iBAAiB,EAAE,iBAAiB,EAAE,aAAa,EAAE,aAAa,GAAG,YAAY;IAiBjH;;;;;OAKG;WACW,gBAAgB,CAAC,MAAM,EAAE,eAAe,EAAE,aAAa,EAAE,aAAa,GAAG,YAAY;IAQnG;;;;OAIG;gBACgB,EAAE,EAAE,MAAM;IAE7B;;;;;;OAMG;IACI,kBAAkB,CAAC,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE,WAAW,EAAE,KAAK,EAAE,iBAAiB,EAAE,MAAM,CAAC,EAAE,GAAG;IAmBnG;;;;;OAKG;IACI,iBAAiB,CAAC,IAAI,EAAE,aAAa,CAAC,yBAAyB,CAAC,GAAG,OAAO;IAmEjF;;;;;;OAMG;IACI,6BAA6B,CAAC,KAAK,EAAE,iBAAiB,EAAE,IAAI,EAAE,mBAAmB,GAAG,OAAO;IAelG;;;;;OAKG;IACI,gBAAgB,CAAC,MAAM,EAAE,eAAe,GAAG,OAAO;IAsCzD;;OAEG;IACH,OAAO,CAAC,oBAAoB;IAyC5B;;;;;OAKG;IACH,OAAO,CAAC,WAAW;IASnB,OAAO,CAAC,sBAAsB;IAU9B,OAAO,CAAC,4BAA4B;IAyCpC,OAAO,CAAC,qBAAqB;IAmB7B,OAAO,CAAC,sBAAsB;IAI9B,OAAO,CAAC,UAAU;IAoBlB,OAAO,CAAC,aAAa;IAMrB,OAAO,CAAC,cAAc;IAiBtB,OAAO,CAAC,iBAAiB;CAgC5B","file":"notification.d.ts","sourcesContent":["import { Globalization } from '../data/globalization';\r\nimport { Logging } from '../diagnostics/logging';\r\nimport { Strings } from '../generated/strings';\r\nimport { EnvironmentModule } from '../manifest/environment-modules';\r\nimport { RpcNotification } from '../rpc/notification/rpc-notification-model';\r\nimport { RpcWorkItem } from '../rpc/work-item/rpc-work-item-model';\r\nimport { NotificationLinkType } from './notification-link-type';\r\nimport { IFrameService } from './notification-manager';\r\nimport { NotificationMessage } from './notification-message';\r\nimport { NotificationState } from './notification-state';\r\nimport { PowerShellNotification, PowerShellWorkItemMessage } from './powershell-notification';\r\nimport { SocketMessage } from './socket-signalr';\r\nimport { RecoveredWorkItem } from './work-item-request';\r\n\r\n/**\r\n * Notification changed event type.\r\n */\r\nexport enum NotificationChangeEvent {\r\n Initialized,\r\n InitializationFailed,\r\n Add,\r\n Remove,\r\n Change\r\n}\r\n\r\n/**\r\n * Notification changed event packet.\r\n */\r\nexport interface NotificationEvent {\r\n changeEvent: NotificationChangeEvent;\r\n notification?: Notification;\r\n}\r\n\r\n/**\r\n * Internal notification object converted from ClientNotification object.\r\n * Contains data to track notifications.\r\n */\r\nexport class Notification {\r\n private strings: Strings = MsftSme.getStrings<Strings>();\r\n\r\n /**\r\n * Work item passed from RPC or client on shell.\r\n */\r\n private workItem: RpcWorkItem;\r\n\r\n /**\r\n * The type ID of work item.\r\n */\r\n public typeId: string;\r\n\r\n /**\r\n * The node name.\r\n */\r\n public nodeName: string;\r\n\r\n /**\r\n * The module name.\r\n */\r\n public moduleName: string;\r\n\r\n /**\r\n * The entry point name within the module\r\n */\r\n public entryPointName: string;\r\n\r\n /**\r\n * The module display name.\r\n */\r\n public moduleDisplayName: string;\r\n\r\n /**\r\n * Object included last response.\r\n */\r\n public object: any;\r\n\r\n /**\r\n * The state of notification.\r\n */\r\n public state: NotificationState;\r\n\r\n /**\r\n * The title of work item to display user. (localized)\r\n */\r\n public title: string;\r\n\r\n /**\r\n * @depracated\r\n * The description of work item to display user. (localized)\r\n */\r\n public description: string;\r\n\r\n /**\r\n * The message. (localized)\r\n */\r\n public message: string;\r\n\r\n /**\r\n * Possible solution message to address error. (localized)\r\n */\r\n public solutionMessage: string;\r\n\r\n /**\r\n * True if the notification was created from recover, updates from messages should be taken\r\n */\r\n public isFromRecover = false;\r\n\r\n /**\r\n * True if the notification is disabled and should not be shown to the user\r\n */\r\n public isDisabled = false;\r\n\r\n /**\r\n * The start timestamp as a formatted globalized string\r\n */\r\n public startTimestamp: string;\r\n\r\n /**\r\n * The last changed timestamp as a formatted globalized string\r\n */\r\n public changedTimestamp: string;\r\n\r\n /**\r\n * The last changed timestamp as a number\r\n */\r\n public changedTimestampValue: number;\r\n\r\n /**\r\n * The end timestamp as a formatted globalized string\r\n */\r\n public endTimestamp: string;\r\n\r\n /**\r\n * The progress percent.\r\n */\r\n public progressPercent: number;\r\n\r\n /**\r\n * The success link to navigate to the object view. (optional)\r\n * At default, it brings to the home page of the module.\r\n */\r\n public link: string;\r\n\r\n /**\r\n * the notification link type of the link\r\n */\r\n public linkType: NotificationLinkType;\r\n\r\n /**\r\n * True if we should show the link in the notification's alert\r\n * We will show the link if there is a custom link or it is a long running request\r\n */\r\n public showLinkInAlert = false;\r\n\r\n /**\r\n * Marked it's no longer display to include list of notifications.\r\n */\r\n public dismissed = false;\r\n\r\n /**\r\n * The parent URI window.location.pathname.\r\n */\r\n public locationPathname: string;\r\n\r\n /**\r\n * The parent URI window.location.search\r\n */\r\n public locationSearch: string;\r\n\r\n /**\r\n *\r\n * Tracks if the notification has been read.\r\n */\r\n public isUnread = true;\r\n\r\n /**\r\n * Create notification from WorkItem.\r\n *\r\n * @param id the notification ID.\r\n * @param workItem the RPC work item.\r\n * @param state the initial state.\r\n * @param object the object from query result.\r\n * @return notification the notification object.\r\n */\r\n public static createFromWorkItem(\r\n id: string, workItem: RpcWorkItem, state: NotificationState, iFrameService: IFrameService, object?: any): Notification {\r\n const notification = new Notification(id);\r\n notification.workItem = workItem;\r\n\r\n notification.state = state;\r\n notification.object = object;\r\n notification.initializeFromWorkItem(workItem, iFrameService);\r\n return notification;\r\n }\r\n\r\n /**\r\n * Create notification from recovered work item.\r\n *\r\n * @param recoveredWorkItem the recovered work item.\r\n * @return notification the notification object.\r\n */\r\n public static createFromRecover(recoveredWorkItem: RecoveredWorkItem, iFrameService: IFrameService): Notification {\r\n const notification = new Notification(recoveredWorkItem.id);\r\n notification.workItem = recoveredWorkItem.metadata;\r\n notification.isFromRecover = true;\r\n\r\n if (recoveredWorkItem.failed) {\r\n notification.state = NotificationState.Error;\r\n notification.object = { errorType: 'WorkItemRecover', message: recoveredWorkItem.errorMessage };\r\n } else {\r\n notification.state = NotificationState.InProgress;\r\n notification.object = {};\r\n }\r\n\r\n notification.initializeFromWorkItem(recoveredWorkItem.metadata, iFrameService);\r\n return notification;\r\n }\r\n\r\n /**\r\n * Create notification from instant request.\r\n *\r\n * @param client the RPC notification request.\r\n * @return notification the notification object.\r\n */\r\n public static createFromClient(client: RpcNotification, iFrameService: IFrameService): Notification {\r\n const notification = new Notification(client.id);\r\n notification.locationPathname = window.location.pathname;\r\n notification.locationSearch = window.location.search;\r\n notification.initializeFromInstant(client, iFrameService);\r\n return notification;\r\n }\r\n\r\n /**\r\n * Initializes a new instance of the Notification class.\r\n *\r\n * @param id the notification ID.\r\n */\r\n constructor(public id: string) { }\r\n\r\n /**\r\n * Update a notification by work item from RPC.\r\n * @param id the notification id.\r\n * @param workItem the work item.\r\n * @param state the state of the notification.\r\n * @param object the object from query result.\r\n */\r\n public updateFromWorkItem(id: string, workItem: RpcWorkItem, state: NotificationState, object?: any) {\r\n let changed = false;\r\n\r\n if (this.updateState(state)) {\r\n changed = true;\r\n const now = Date.now();\r\n this.changedTimestampValue = now;\r\n this.changedTimestamp = this.endTimestamp = this.getGlobalizedTimestamp(now);\r\n }\r\n\r\n if (this.object !== object) {\r\n changed = true;\r\n this.object = object;\r\n }\r\n\r\n this.updateMessageAndLinkAndTitle(workItem);\r\n return !this.isDisabled && changed;\r\n }\r\n\r\n /**\r\n * Update the notification by socket message from the gateway.\r\n *\r\n * @param item the socket message.\r\n * @return boolean the changed status.\r\n */\r\n public updateFromMessage(item: SocketMessage<PowerShellWorkItemMessage>): boolean {\r\n let changed = false;\r\n const now = Date.now();\r\n if (PowerShellNotification.hasError(item)) {\r\n Logging.logDebug('Notification', '{0}/Error/{1}'.format(this.id, JSON.stringify(item.message.errors)));\r\n if (this.updateState(NotificationState.Error)) {\r\n this.changedTimestampValue = now;\r\n this.changedTimestamp = this.endTimestamp = this.getGlobalizedTimestamp(now);\r\n }\r\n\r\n this.object = item.message.errors && MsftSme.first(item.message.errors);\r\n changed = true;\r\n this.updateMessageAndLinkAndTitle(this.workItem);\r\n return !this.isDisabled;\r\n }\r\n\r\n if (PowerShellNotification.hasException(item)) {\r\n Logging.logDebug('Notification', '{0}/Exception/{1}'.format(this.id, item.message.exception));\r\n if (this.updateState(NotificationState.Error)) {\r\n this.changedTimestampValue = now;\r\n this.changedTimestamp = this.endTimestamp = this.getGlobalizedTimestamp(now);\r\n }\r\n\r\n this.object = { message: item.message.exception };\r\n changed = true;\r\n this.updateMessageAndLinkAndTitle(this.workItem);\r\n return !this.isDisabled;\r\n }\r\n\r\n if (PowerShellNotification.hasProgress(item)) {\r\n Logging.logDebug('Notification', '{0}/Progress/{1}'.format(this.id, JSON.stringify(item.message.progress)));\r\n if (this.updateState(NotificationState.InProgress)) {\r\n this.changedTimestampValue = now;\r\n this.changedTimestamp = this.getGlobalizedTimestamp(now);\r\n }\r\n\r\n this.object = item.message.progress && MsftSme.last(item.message.progress);\r\n this.progressPercent = this.object?.percentComplete ?? this.object?.percent;\r\n\r\n if ((this.progressPercent == null || this.progressPercent < 0)\r\n && this.workItem.progressMessage && this.workItem.progressMessage.indexOf('{{percent}}') >= 0) {\r\n return false;\r\n }\r\n\r\n changed = true;\r\n }\r\n\r\n if (PowerShellNotification.hasData(item)) {\r\n Logging.logDebug('Notification', '{0}/Data/{1}'.format(this.id, JSON.stringify(item.message.results)));\r\n this.object = item.message.results && MsftSme.last(item.message.results);\r\n changed = true;\r\n }\r\n\r\n if (PowerShellNotification.hasCompleted(item)) {\r\n Logging.logDebug('Notification', '{0}/Completed'.format(this.id));\r\n if (this.updateState(NotificationState.Success)) {\r\n this.changedTimestampValue = now;\r\n this.changedTimestamp = this.endTimestamp = this.getGlobalizedTimestamp(now);\r\n }\r\n\r\n changed = true;\r\n }\r\n\r\n this.updateMessageAndLinkAndTitle(this.workItem);\r\n return !this.isDisabled && changed;\r\n }\r\n\r\n /**\r\n * Update the notification by socket message from the gateway.\r\n *\r\n * @param state the state of notification.\r\n * @param item the socket message.\r\n * @return boolean the changed status.\r\n */\r\n public updateFromNotificationMessage(state: NotificationState, item: NotificationMessage): boolean {\r\n const now = Date.now();\r\n this.title = item.title;\r\n this.message = item.message;\r\n this.state = state;\r\n this.changedTimestampValue = now;\r\n if (state === NotificationState.InProgress) {\r\n this.changedTimestamp = this.getGlobalizedTimestamp(now);\r\n } else {\r\n this.changedTimestamp = this.endTimestamp = this.getGlobalizedTimestamp(now);\r\n }\r\n\r\n return true;\r\n }\r\n\r\n /**\r\n * Update the notification by instant notification message from the client.\r\n *\r\n * @param client the instant notification object.\r\n * @param boolean the changed status.\r\n */\r\n public updateFromClient(client: RpcNotification): boolean {\r\n let changed = false;\r\n const title = client.title;\r\n if (this.title !== title) {\r\n changed = true;\r\n this.title = title;\r\n }\r\n\r\n if (this.updateState(client.state)) {\r\n const now = Date.now();\r\n this.changedTimestampValue = now;\r\n this.changedTimestamp = this.getGlobalizedTimestamp(now);\r\n changed = true;\r\n if (this.state !== NotificationState.InProgress) {\r\n this.endTimestamp = this.changedTimestamp;\r\n }\r\n }\r\n\r\n const link = this.formatLink(client.link, client.linkType);\r\n if (this.link !== link) {\r\n changed = true;\r\n this.link = link;\r\n this.linkType = client.linkType;\r\n }\r\n\r\n if (this.message !== client.message) {\r\n changed = true;\r\n this.message = client.message;\r\n }\r\n\r\n if (this.solutionMessage !== client.solutionMessage) {\r\n changed = true;\r\n this.solutionMessage = client.solutionMessage;\r\n }\r\n\r\n return changed;\r\n }\r\n\r\n /**\r\n * Gets the module display name.\r\n */\r\n private getModuleDisplayName(iFrameService: IFrameService, sourceName: string, sourceSubName: string): string {\r\n const activeIFrame = iFrameService ? iFrameService.getActiveToolIFrameData() : null;\r\n if (activeIFrame && activeIFrame.entryPoint) {\r\n const entryPoint = activeIFrame.entryPoint;\r\n this.entryPointName = entryPoint.name;\r\n\r\n if (entryPoint.parentModule) {\r\n this.moduleName = entryPoint.parentModule.name;\r\n }\r\n } else {\r\n // fallback see if we can get any info from RPC\r\n this.moduleName = sourceName;\r\n if (sourceSubName) {\r\n this.entryPointName = MsftSme.first(sourceSubName.split('#'));\r\n }\r\n }\r\n\r\n const environment = MsftSme.self().Environment;\r\n\r\n // if moduleName === environment.name then the source is Shell. Return null to use generic module name\r\n if (this.moduleName && this.moduleName !== environment.name) {\r\n const module: EnvironmentModule = MsftSme.find(\r\n <EnvironmentModule[]>environment.modules,\r\n value => value.name === this.moduleName);\r\n if (module) {\r\n if (this.entryPointName) {\r\n const entryPoint = MsftSme.find(module.entryPoints, ep => ep.name === this.entryPointName);\r\n if (entryPoint) {\r\n return entryPoint.displayName;\r\n }\r\n }\r\n\r\n return module.displayName;\r\n }\r\n\r\n return this.moduleName;\r\n }\r\n\r\n return null;\r\n }\r\n\r\n /**\r\n * Update the state.\r\n *\r\n * @param state the new state.\r\n * @return boolean the changed state.\r\n */\r\n private updateState(state: NotificationState): boolean {\r\n if (this.state !== state) {\r\n this.state = state;\r\n return true;\r\n }\r\n\r\n return false;\r\n }\r\n\r\n private initializeFromWorkItem(item: RpcWorkItem, iFrameService: IFrameService): void {\r\n this.nodeName = item.nodeName;\r\n this.moduleDisplayName = this.getModuleDisplayName(iFrameService, item.sourceName, item.sourceSubName);\r\n this.startTimestamp = this.getGlobalizedTimestamp(item.timestamp);\r\n this.changedTimestamp = this.getGlobalizedTimestamp(item.timestamp);\r\n this.changedTimestampValue = item.timestamp;\r\n this.typeId = item.typeId;\r\n this.updateMessageAndLinkAndTitle(item);\r\n }\r\n\r\n private updateMessageAndLinkAndTitle(item: RpcWorkItem): void {\r\n let template: string;\r\n this.isDisabled = !this.isFromRecover && item.disableAllNotifications;\r\n switch (this.state) {\r\n case NotificationState.Started:\r\n this.title = item.inProgressTitle;\r\n template = item.startedMessage;\r\n this.link = this.formatLink(null);\r\n break;\r\n case NotificationState.Error:\r\n this.title = item.errorTitle;\r\n this.isDisabled = !this.isFromRecover && item.disableErrorNotification;\r\n this.endTimestamp = this.getGlobalizedTimestamp(item.timestamp);\r\n template = item.errorMessage;\r\n this.link = this.formatLink(item.errorLink, item.errorLinkType);\r\n this.linkType = item.errorLinkType;\r\n this.showLinkInAlert = true;\r\n this.moduleDisplayName = item.errorLinkText || this.moduleDisplayName;\r\n break;\r\n case NotificationState.InProgress:\r\n this.title = item.inProgressTitle;\r\n template = item.progressMessage;\r\n this.link = this.formatLink(null);\r\n break;\r\n case NotificationState.Success:\r\n this.title = item.successTitle;\r\n this.endTimestamp = this.getGlobalizedTimestamp(item.timestamp);\r\n template = item.successMessage;\r\n this.link = this.formatLink(item.successLink, item.successLinkType);\r\n this.linkType = item.successLinkType;\r\n this.moduleDisplayName = item.successLinkText || this.moduleDisplayName;\r\n this.showLinkInAlert = true;\r\n break;\r\n default:\r\n const message = MsftSme.getStrings<Strings>().MsftSmeShell.Core.Error.NotificationUnsupportedState.message;\r\n throw new Error(message);\r\n }\r\n\r\n this.message = this.formatMessage(template);\r\n }\r\n\r\n private initializeFromInstant(client: RpcNotification, iFrameService: IFrameService): void {\r\n this.nodeName = client.nodeName;\r\n this.moduleDisplayName = client.linkText ?\r\n client.linkText\r\n : this.getModuleDisplayName(iFrameService, client.sourceName, client.sourceSubName);\r\n this.startTimestamp = this.getGlobalizedTimestamp(client.timestamp);\r\n this.changedTimestamp = this.getGlobalizedTimestamp(client.timestamp);\r\n this.changedTimestampValue = client.timestamp;\r\n this.title = client.title;\r\n this.state = client.state;\r\n this.link = this.formatLink(client.link, client.linkType);\r\n this.linkType = client.linkType;\r\n this.message = client.message;\r\n this.solutionMessage = client.solutionMessage;\r\n if (this.state !== NotificationState.Started && this.state !== NotificationState.InProgress) {\r\n this.endTimestamp = this.getGlobalizedTimestamp(client.timestamp);\r\n }\r\n }\r\n\r\n private getGlobalizedTimestamp(timestamp: number): string {\r\n return Globalization.timeOnly(new Date(timestamp));\r\n }\r\n\r\n private formatLink(link: string, linkType?: NotificationLinkType): string {\r\n // href example: \"http://localhost:4400/apps/msft.sme.server-manager!servers/tools/msft.sme.module-seed!main?connection=sme-full1.redmond.corp.microsoft.com\"\r\n if (linkType === NotificationLinkType.Absolute) {\r\n return link;\r\n }\r\n\r\n // null linkType behaves like NotificationLinkType.RelativeToTool\r\n const pathname = linkType === NotificationLinkType.RelativeToRoot ?\r\n '/'\r\n : this.locationPathname || this.workItem && this.workItem.locationPathname;\r\n\r\n if (link && pathname) {\r\n this.showLinkInAlert = true;\r\n return MsftSme.trimEnd(pathname, '/') + '/' + MsftSme.trimStart(link, '/');\r\n }\r\n\r\n this.showLinkInAlert = false;\r\n return pathname;\r\n }\r\n\r\n private formatMessage(template: string): string {\r\n const parameters = this.findParameters(template);\r\n const message = this.replaceParameters(template, parameters);\r\n return message;\r\n }\r\n\r\n private findParameters(template: string): string[] {\r\n const results: string[] = [];\r\n if (!template) {\r\n return results;\r\n }\r\n\r\n const segments = template.split('{{');\r\n for (const seg of segments) {\r\n const index = seg.indexOf('}}');\r\n if (index > 0) {\r\n results.push(seg.substring(0, index));\r\n }\r\n }\r\n\r\n return results;\r\n }\r\n\r\n private replaceParameters(message: string, parameters: string[]): string {\r\n for (const param of parameters) {\r\n if (param === 'percent') {\r\n if (typeof this.progressPercent === 'number') {\r\n message = message.replaceAll('{{percent}}', '' + this.progressPercent);\r\n }\r\n } else if (param === 'objectName') {\r\n if (this.workItem && this.workItem.objectName) {\r\n message = message.replaceAll('{{objectName}}', this.workItem.objectName);\r\n }\r\n } else {\r\n if (this.object) {\r\n const segments = param.split('.');\r\n let target = this.object;\r\n for (const seg of segments) {\r\n if (target[seg]) {\r\n target = target[seg];\r\n } else {\r\n target = null;\r\n break;\r\n }\r\n }\r\n\r\n if (target) {\r\n message = message.replaceAll('{{' + param + '}}', '' + target);\r\n }\r\n }\r\n }\r\n }\r\n\r\n return message;\r\n }\r\n}\r\n"]}
@@ -248,9 +248,7 @@ export class Notification {
248
248
  this.changedTimestamp = this.getGlobalizedTimestamp(now);
249
249
  }
250
250
  this.object = item.message.progress && MsftSme.last(item.message.progress);
251
- if (this.object && this.object.hasOwnProperty('percentComplete')) {
252
- this.progressPercent = this.object && this.object.percentComplete;
253
- }
251
+ this.progressPercent = this.object?.percentComplete ?? this.object?.percent;
254
252
  if ((this.progressPercent == null || this.progressPercent < 0)
255
253
  && this.workItem.progressMessage && this.workItem.progressMessage.indexOf('{{percent}}') >= 0) {
256
254
  return false;
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../packages/core/notification/notification.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACtD,OAAO,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AAKjD,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAGhE,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,EAAE,sBAAsB,EAA6B,MAAM,2BAA2B,CAAC;AAI9F;;GAEG;AACH,MAAM,CAAN,IAAY,uBAMX;AAND,WAAY,uBAAuB;IAC/B,mFAAW,CAAA;IACX,qGAAoB,CAAA;IACpB,mEAAG,CAAA;IACH,yEAAM,CAAA;IACN,yEAAM,CAAA;AACV,CAAC,EANW,uBAAuB,KAAvB,uBAAuB,QAMlC;AAUD;;;GAGG;AACH,MAAM,OAAO,YAAY;IAuMF;IAtMX,OAAO,GAAY,OAAO,CAAC,UAAU,EAAW,CAAC;IAEzD;;OAEG;IACK,QAAQ,CAAc;IAE9B;;OAEG;IACI,MAAM,CAAS;IAEtB;;OAEG;IACI,QAAQ,CAAS;IAExB;;OAEG;IACI,UAAU,CAAS;IAE1B;;OAEG;IACI,cAAc,CAAS;IAE9B;;OAEG;IACI,iBAAiB,CAAS;IAE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ClE;iBACJ;aACJ;SACJ;QAED,OAAO,OAAO,CAAC;IACnB,CAAC;CACJ","file":"notification.js","sourcesContent":["import { Globalization } from '../data/globalization';\r\nimport { Logging } from '../diagnostics/logging';\r\nimport { Strings } from '../generated/strings';\r\nimport { EnvironmentModule } from '../manifest/environment-modules';\r\nimport { RpcNotification } from '../rpc/notification/rpc-notification-model';\r\nimport { RpcWorkItem } from '../rpc/work-item/rpc-work-item-model';\r\nimport { NotificationLinkType } from './notification-link-type';\r\nimport { IFrameService } from './notification-manager';\r\nimport { NotificationMessage } from './notification-message';\r\nimport { NotificationState } from './notification-state';\r\nimport { PowerShellNotification, PowerShellWorkItemMessage } from './powershell-notification';\r\nimport { SocketMessage } from './socket-signalr';\r\nimport { RecoveredWorkItem } from './work-item-request';\r\n\r\n/**\r\n * Notification changed event type.\r\n */\r\nexport enum NotificationChangeEvent {\r\n Initialized,\r\n InitializationFailed,\r\n Add,\r\n Remove,\r\n Change\r\n}\r\n\r\n/**\r\n * Notification changed event packet.\r\n */\r\nexport interface NotificationEvent {\r\n changeEvent: NotificationChangeEvent;\r\n notification?: Notification;\r\n}\r\n\r\n/**\r\n * Internal notification object converted from ClientNotification object.\r\n * Contains data to track notifications.\r\n */\r\nexport class Notification {\r\n private strings: Strings = MsftSme.getStrings<Strings>();\r\n\r\n /**\r\n * Work item passed from RPC or client on shell.\r\n */\r\n private workItem: RpcWorkItem;\r\n\r\n /**\r\n * The type ID of work item.\r\n */\r\n public typeId: string;\r\n\r\n /**\r\n * The node name.\r\n */\r\n public nodeName: string;\r\n\r\n /**\r\n * The module name.\r\n */\r\n public moduleName: string;\r\n\r\n /**\r\n * The entry point name within the module\r\n */\r\n public entryPointName: string;\r\n\r\n /**\r\n * The module display name.\r\n */\r\n public moduleDisplayName: string;\r\n\r\n /**\r\n * Object included last response.\r\n */\r\n public object: any;\r\n\r\n /**\r\n * The state of notification.\r\n */\r\n public state: NotificationState;\r\n\r\n /**\r\n * The title of work item to display user. (localized)\r\n */\r\n public title: string;\r\n\r\n /**\r\n * @depracated\r\n * The description of work item to display user. (localized)\r\n */\r\n public description: string;\r\n\r\n /**\r\n * The message. (localized)\r\n */\r\n public message: string;\r\n\r\n /**\r\n * Possible solution message to address error. (localized)\r\n */\r\n public solutionMessage: string;\r\n\r\n /**\r\n * True if the notification was created from recover, updates from messages should be taken\r\n */\r\n public isFromRecover = false;\r\n\r\n /**\r\n * True if the notification is disabled and should not be shown to the user\r\n */\r\n public isDisabled = false;\r\n\r\n /**\r\n * The start timestamp as a formatted globalized string\r\n */\r\n public startTimestamp: string;\r\n\r\n /**\r\n * The last changed timestamp as a formatted globalized string\r\n */\r\n public changedTimestamp: string;\r\n\r\n /**\r\n * The last changed timestamp as a number\r\n */\r\n public changedTimestampValue: number;\r\n\r\n /**\r\n * The end timestamp as a formatted globalized string\r\n */\r\n public endTimestamp: string;\r\n\r\n /**\r\n * The progress percent.\r\n */\r\n public progressPercent: number;\r\n\r\n /**\r\n * The success link to navigate to the object view. (optional)\r\n * At default, it brings to the home page of the module.\r\n */\r\n public link: string;\r\n\r\n /**\r\n * the notification link type of the link\r\n */\r\n public linkType: NotificationLinkType;\r\n\r\n /**\r\n * True if we should show the link in the notification's alert\r\n * We will show the link if there is a custom link or it is a long running request\r\n */\r\n public showLinkInAlert = false;\r\n\r\n /**\r\n * Marked it's no longer display to include list of notifications.\r\n */\r\n public dismissed = false;\r\n\r\n /**\r\n * The parent URI window.location.pathname.\r\n */\r\n public locationPathname: string;\r\n\r\n /**\r\n * The parent URI window.location.search\r\n */\r\n public locationSearch: string;\r\n\r\n /**\r\n *\r\n * Tracks if the notification has been read.\r\n */\r\n public isUnread = true;\r\n\r\n /**\r\n * Create notification from WorkItem.\r\n *\r\n * @param id the notification ID.\r\n * @param workItem the RPC work item.\r\n * @param state the initial state.\r\n * @param object the object from query result.\r\n * @return notification the notification object.\r\n */\r\n public static createFromWorkItem(\r\n id: string, workItem: RpcWorkItem, state: NotificationState, iFrameService: IFrameService, object?: any): Notification {\r\n const notification = new Notification(id);\r\n notification.workItem = workItem;\r\n\r\n notification.state = state;\r\n notification.object = object;\r\n notification.initializeFromWorkItem(workItem, iFrameService);\r\n return notification;\r\n }\r\n\r\n /**\r\n * Create notification from recovered work item.\r\n *\r\n * @param recoveredWorkItem the recovered work item.\r\n * @return notification the notification object.\r\n */\r\n public static createFromRecover(recoveredWorkItem: RecoveredWorkItem, iFrameService: IFrameService): Notification {\r\n const notification = new Notification(recoveredWorkItem.id);\r\n notification.workItem = recoveredWorkItem.metadata;\r\n notification.isFromRecover = true;\r\n\r\n if (recoveredWorkItem.failed) {\r\n notification.state = NotificationState.Error;\r\n notification.object = { errorType: 'WorkItemRecover', message: recoveredWorkItem.errorMessage };\r\n } else {\r\n notification.state = NotificationState.InProgress;\r\n notification.object = {};\r\n }\r\n\r\n notification.initializeFromWorkItem(recoveredWorkItem.metadata, iFrameService);\r\n return notification;\r\n }\r\n\r\n /**\r\n * Create notification from instant request.\r\n *\r\n * @param client the RPC notification request.\r\n * @return notification the notification object.\r\n */\r\n public static createFromClient(client: RpcNotification, iFrameService: IFrameService): Notification {\r\n const notification = new Notification(client.id);\r\n notification.locationPathname = window.location.pathname;\r\n notification.locationSearch = window.location.search;\r\n notification.initializeFromInstant(client, iFrameService);\r\n return notification;\r\n }\r\n\r\n /**\r\n * Initializes a new instance of the Notification class.\r\n *\r\n * @param id the notification ID.\r\n */\r\n constructor(public id: string) { }\r\n\r\n /**\r\n * Update a notification by work item from RPC.\r\n * @param id the notification id.\r\n * @param workItem the work item.\r\n * @param state the state of the notification.\r\n * @param object the object from query result.\r\n */\r\n public updateFromWorkItem(id: string, workItem: RpcWorkItem, state: NotificationState, object?: any) {\r\n let changed = false;\r\n\r\n if (this.updateState(state)) {\r\n changed = true;\r\n const now = Date.now();\r\n this.changedTimestampValue = now;\r\n this.changedTimestamp = this.endTimestamp = this.getGlobalizedTimestamp(now);\r\n }\r\n\r\n if (this.object !== object) {\r\n changed = true;\r\n this.object = object;\r\n }\r\n\r\n this.updateMessageAndLinkAndTitle(workItem);\r\n return !this.isDisabled && changed;\r\n }\r\n\r\n /**\r\n * Update the notification by socket message from the gateway.\r\n *\r\n * @param item the socket message.\r\n * @return boolean the changed status.\r\n */\r\n public updateFromMessage(item: SocketMessage<PowerShellWorkItemMessage>): boolean {\r\n let changed = false;\r\n const now = Date.now();\r\n if (PowerShellNotification.hasError(item)) {\r\n Logging.logDebug('Notification', '{0}/Error/{1}'.format(this.id, JSON.stringify(item.message.errors)));\r\n if (this.updateState(NotificationState.Error)) {\r\n this.changedTimestampValue = now;\r\n this.changedTimestamp = this.endTimestamp = this.getGlobalizedTimestamp(now);\r\n }\r\n\r\n this.object = item.message.errors && MsftSme.first(item.message.errors);\r\n changed = true;\r\n this.updateMessageAndLinkAndTitle(this.workItem);\r\n return !this.isDisabled;\r\n }\r\n\r\n if (PowerShellNotification.hasException(item)) {\r\n Logging.logDebug('Notification', '{0}/Exception/{1}'.format(this.id, item.message.exception));\r\n if (this.updateState(NotificationState.Error)) {\r\n this.changedTimestampValue = now;\r\n this.changedTimestamp = this.endTimestamp = this.getGlobalizedTimestamp(now);\r\n }\r\n\r\n this.object = { message: item.message.exception };\r\n changed = true;\r\n this.updateMessageAndLinkAndTitle(this.workItem);\r\n return !this.isDisabled;\r\n }\r\n\r\n if (PowerShellNotification.hasProgress(item)) {\r\n Logging.logDebug('Notification', '{0}/Progress/{1}'.format(this.id, JSON.stringify(item.message.progress)));\r\n if (this.updateState(NotificationState.InProgress)) {\r\n this.changedTimestampValue = now;\r\n this.changedTimestamp = this.getGlobalizedTimestamp(now);\r\n }\r\n\r\n this.object = item.message.progress && MsftSme.last(item.message.progress);\r\n if (this.object && this.object.hasOwnProperty('percentComplete')) {\r\n this.progressPercent = this.object && this.object.percentComplete;\r\n }\r\n\r\n if ((this.progressPercent == null || this.progressPercent < 0)\r\n && this.workItem.progressMessage && this.workItem.progressMessage.indexOf('{{percent}}') >= 0) {\r\n return false;\r\n }\r\n\r\n changed = true;\r\n }\r\n\r\n if (PowerShellNotification.hasData(item)) {\r\n Logging.logDebug('Notification', '{0}/Data/{1}'.format(this.id, JSON.stringify(item.message.results)));\r\n this.object = item.message.results && MsftSme.last(item.message.results);\r\n changed = true;\r\n }\r\n\r\n if (PowerShellNotification.hasCompleted(item)) {\r\n Logging.logDebug('Notification', '{0}/Completed'.format(this.id));\r\n if (this.updateState(NotificationState.Success)) {\r\n this.changedTimestampValue = now;\r\n this.changedTimestamp = this.endTimestamp = this.getGlobalizedTimestamp(now);\r\n }\r\n\r\n changed = true;\r\n }\r\n\r\n this.updateMessageAndLinkAndTitle(this.workItem);\r\n return !this.isDisabled && changed;\r\n }\r\n\r\n /**\r\n * Update the notification by socket message from the gateway.\r\n *\r\n * @param state the state of notification.\r\n * @param item the socket message.\r\n * @return boolean the changed status.\r\n */\r\n public updateFromNotificationMessage(state: NotificationState, item: NotificationMessage): boolean {\r\n const now = Date.now();\r\n this.title = item.title;\r\n this.message = item.message;\r\n this.state = state;\r\n this.changedTimestampValue = now;\r\n if (state === NotificationState.InProgress) {\r\n this.changedTimestamp = this.getGlobalizedTimestamp(now);\r\n } else {\r\n this.changedTimestamp = this.endTimestamp = this.getGlobalizedTimestamp(now);\r\n }\r\n\r\n return true;\r\n }\r\n\r\n /**\r\n * Update the notification by instant notification message from the client.\r\n *\r\n * @param client the instant notification object.\r\n * @param boolean the changed status.\r\n */\r\n public updateFromClient(client: RpcNotification): boolean {\r\n let changed = false;\r\n const title = client.title;\r\n if (this.title !== title) {\r\n changed = true;\r\n this.title = title;\r\n }\r\n\r\n if (this.updateState(client.state)) {\r\n const now = Date.now();\r\n this.changedTimestampValue = now;\r\n this.changedTimestamp = this.getGlobalizedTimestamp(now);\r\n changed = true;\r\n if (this.state !== NotificationState.InProgress) {\r\n this.endTimestamp = this.changedTimestamp;\r\n }\r\n }\r\n\r\n const link = this.formatLink(client.link, client.linkType);\r\n if (this.link !== link) {\r\n changed = true;\r\n this.link = link;\r\n this.linkType = client.linkType;\r\n }\r\n\r\n if (this.message !== client.message) {\r\n changed = true;\r\n this.message = client.message;\r\n }\r\n\r\n if (this.solutionMessage !== client.solutionMessage) {\r\n changed = true;\r\n this.solutionMessage = client.solutionMessage;\r\n }\r\n\r\n return changed;\r\n }\r\n\r\n /**\r\n * Gets the module display name.\r\n */\r\n private getModuleDisplayName(iFrameService: IFrameService, sourceName: string, sourceSubName: string): string {\r\n const activeIFrame = iFrameService ? iFrameService.getActiveToolIFrameData() : null;\r\n if (activeIFrame && activeIFrame.entryPoint) {\r\n const entryPoint = activeIFrame.entryPoint;\r\n this.entryPointName = entryPoint.name;\r\n\r\n if (entryPoint.parentModule) {\r\n this.moduleName = entryPoint.parentModule.name;\r\n }\r\n } else {\r\n // fallback see if we can get any info from RPC\r\n this.moduleName = sourceName;\r\n if (sourceSubName) {\r\n this.entryPointName = MsftSme.first(sourceSubName.split('#'));\r\n }\r\n }\r\n\r\n const environment = MsftSme.self().Environment;\r\n\r\n // if moduleName === environment.name then the source is Shell. Return null to use generic module name\r\n if (this.moduleName && this.moduleName !== environment.name) {\r\n const module: EnvironmentModule = MsftSme.find(\r\n <EnvironmentModule[]>environment.modules,\r\n value => value.name === this.moduleName);\r\n if (module) {\r\n if (this.entryPointName) {\r\n const entryPoint = MsftSme.find(module.entryPoints, ep => ep.name === this.entryPointName);\r\n if (entryPoint) {\r\n return entryPoint.displayName;\r\n }\r\n }\r\n\r\n return module.displayName;\r\n }\r\n\r\n return this.moduleName;\r\n }\r\n\r\n return null;\r\n }\r\n\r\n /**\r\n * Update the state.\r\n *\r\n * @param state the new state.\r\n * @return boolean the changed state.\r\n */\r\n private updateState(state: NotificationState): boolean {\r\n if (this.state !== state) {\r\n this.state = state;\r\n return true;\r\n }\r\n\r\n return false;\r\n }\r\n\r\n private initializeFromWorkItem(item: RpcWorkItem, iFrameService: IFrameService): void {\r\n this.nodeName = item.nodeName;\r\n this.moduleDisplayName = this.getModuleDisplayName(iFrameService, item.sourceName, item.sourceSubName);\r\n this.startTimestamp = this.getGlobalizedTimestamp(item.timestamp);\r\n this.changedTimestamp = this.getGlobalizedTimestamp(item.timestamp);\r\n this.changedTimestampValue = item.timestamp;\r\n this.typeId = item.typeId;\r\n this.updateMessageAndLinkAndTitle(item);\r\n }\r\n\r\n private updateMessageAndLinkAndTitle(item: RpcWorkItem): void {\r\n let template: string;\r\n this.isDisabled = !this.isFromRecover && item.disableAllNotifications;\r\n switch (this.state) {\r\n case NotificationState.Started:\r\n this.title = item.inProgressTitle;\r\n template = item.startedMessage;\r\n this.link = this.formatLink(null);\r\n break;\r\n case NotificationState.Error:\r\n this.title = item.errorTitle;\r\n this.isDisabled = !this.isFromRecover && item.disableErrorNotification;\r\n this.endTimestamp = this.getGlobalizedTimestamp(item.timestamp);\r\n template = item.errorMessage;\r\n this.link = this.formatLink(item.errorLink, item.errorLinkType);\r\n this.linkType = item.errorLinkType;\r\n this.showLinkInAlert = true;\r\n this.moduleDisplayName = item.errorLinkText || this.moduleDisplayName;\r\n break;\r\n case NotificationState.InProgress:\r\n this.title = item.inProgressTitle;\r\n template = item.progressMessage;\r\n this.link = this.formatLink(null);\r\n break;\r\n case NotificationState.Success:\r\n this.title = item.successTitle;\r\n this.endTimestamp = this.getGlobalizedTimestamp(item.timestamp);\r\n template = item.successMessage;\r\n this.link = this.formatLink(item.successLink, item.successLinkType);\r\n this.linkType = item.successLinkType;\r\n this.moduleDisplayName = item.successLinkText || this.moduleDisplayName;\r\n this.showLinkInAlert = true;\r\n break;\r\n default:\r\n const message = MsftSme.getStrings<Strings>().MsftSmeShell.Core.Error.NotificationUnsupportedState.message;\r\n throw new Error(message);\r\n }\r\n\r\n this.message = this.formatMessage(template);\r\n }\r\n\r\n private initializeFromInstant(client: RpcNotification, iFrameService: IFrameService): void {\r\n this.nodeName = client.nodeName;\r\n this.moduleDisplayName = client.linkText ?\r\n client.linkText\r\n : this.getModuleDisplayName(iFrameService, client.sourceName, client.sourceSubName);\r\n this.startTimestamp = this.getGlobalizedTimestamp(client.timestamp);\r\n this.changedTimestamp = this.getGlobalizedTimestamp(client.timestamp);\r\n this.changedTimestampValue = client.timestamp;\r\n this.title = client.title;\r\n this.state = client.state;\r\n this.link = this.formatLink(client.link, client.linkType);\r\n this.linkType = client.linkType;\r\n this.message = client.message;\r\n this.solutionMessage = client.solutionMessage;\r\n if (this.state !== NotificationState.Started && this.state !== NotificationState.InProgress) {\r\n this.endTimestamp = this.getGlobalizedTimestamp(client.timestamp);\r\n }\r\n }\r\n\r\n private getGlobalizedTimestamp(timestamp: number): string {\r\n return Globalization.timeOnly(new Date(timestamp));\r\n }\r\n\r\n private formatLink(link: string, linkType?: NotificationLinkType): string {\r\n // href example: \"http://localhost:4400/apps/msft.sme.server-manager!servers/tools/msft.sme.module-seed!main?connection=sme-full1.redmond.corp.microsoft.com\"\r\n if (linkType === NotificationLinkType.Absolute) {\r\n return link;\r\n }\r\n\r\n // null linkType behaves like NotificationLinkType.RelativeToTool\r\n const pathname = linkType === NotificationLinkType.RelativeToRoot ?\r\n '/'\r\n : this.locationPathname || this.workItem && this.workItem.locationPathname;\r\n\r\n if (link && pathname) {\r\n this.showLinkInAlert = true;\r\n return MsftSme.trimEnd(pathname, '/') + '/' + MsftSme.trimStart(link, '/');\r\n }\r\n\r\n this.showLinkInAlert = false;\r\n return pathname;\r\n }\r\n\r\n private formatMessage(template: string): string {\r\n const parameters = this.findParameters(template);\r\n const message = this.replaceParameters(template, parameters);\r\n return message;\r\n }\r\n\r\n private findParameters(template: string): string[] {\r\n const results: string[] = [];\r\n if (!template) {\r\n return results;\r\n }\r\n\r\n const segments = template.split('{{');\r\n for (const seg of segments) {\r\n const index = seg.indexOf('}}');\r\n if (index > 0) {\r\n results.push(seg.substring(0, index));\r\n }\r\n }\r\n\r\n return results;\r\n }\r\n\r\n private replaceParameters(message: string, parameters: string[]): string {\r\n for (const param of parameters) {\r\n if (param === 'percent') {\r\n if (typeof this.progressPercent === 'number') {\r\n message = message.replaceAll('{{percent}}', '' + this.progressPercent);\r\n }\r\n } else if (param === 'objectName') {\r\n if (this.workItem && this.workItem.objectName) {\r\n message = message.replaceAll('{{objectName}}', this.workItem.objectName);\r\n }\r\n } else {\r\n if (this.object) {\r\n const segments = param.split('.');\r\n let target = this.object;\r\n for (const seg of segments) {\r\n if (target[seg]) {\r\n target = target[seg];\r\n } else {\r\n target = null;\r\n break;\r\n }\r\n }\r\n\r\n if (target) {\r\n message = message.replaceAll('{{' + param + '}}', '' + target);\r\n }\r\n }\r\n }\r\n }\r\n\r\n return message;\r\n }\r\n}\r\n"]}
1
+ {"version":3,"sources":["../../../packages/core/notification/notification.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACtD,OAAO,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AAKjD,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAGhE,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,EAAE,sBAAsB,EAA6B,MAAM,2BAA2B,CAAC;AAI9F;;GAEG;AACH,MAAM,CAAN,IAAY,uBAMX;AAND,WAAY,uBAAuB;IAC/B,mFAAW,CAAA;IACX,qGAAoB,CAAA;IACpB,mEAAG,CAAA;IACH,yEAAM,CAAA;IACN,yEAAM,CAAA;AACV,CAAC,EANW,uBAAuB,KAAvB,uBAAuB,QAMlC;AAUD;;;GAGG;AACH,MAAM,OAAO,YAAY;IAuMF;IAtMX,OAAO,GAAY,OAAO,CAAC,UAAU,EAAW,CAAC;IAEzD;;OAEG;IACK,QAAQ,CAAc;IAE9B;;OAEG;IACI,MAAM,CAAS;IAEtB;;OAEG;IACI,QAAQ,CAAS;IAExB;;OAEG;IACI,UAAU,CAAS;IAE1B;;OAEG;IACI,cAAc,CAAS;IAE9B;;OAEG;IACI,iBAAiB,CAAS;IAEjC;;OAEG;IACI,MAAM,CAAM;IAEnB;;OAEG;IACI,KAAK,CAAoB;IA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,CAAC,CAAC;aACzC;SACJ;QAED,OAAO,OAAO,CAAC;IACnB,CAAC;IAEO,iBAAiB,CAAC,OAAe,EAAE,UAAoB;QAC3D,KAAK,MAAM,KAAK,IAAI,UAAU,EAAE;YAC5B,IAAI,KAAK,KAAK,SAAS,EAAE;gBACrB,IAAI,OAAO,IAAI,CAAC,eAAe,KAAK,QAAQ,EAAE;oBAC1C,OAAO,GAAG,OAAO,CAAC,UAAU,CAAC,aAAa,EAAE,EAAE,GAAG,IAAI,CAAC,eAAe,CAAC,CAAC;iBAC1E;aACJ;iBAAM,IAAI,KAAK,KAAK,YAAY,EAAE;gBAC/B,IAAI,IAAI,CAAC,QAAQ,IAAI,IAAI,CAAC,QAAQ,CAAC,UAAU,EAAE;oBAC3C,OAAO,GAAG,OAAO,CAAC,UAAU,CAAC,gBAAgB,EAAE,IAAI,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC;iBAC5E;aACJ;iBAAM;gBACH,IAAI,IAAI,CAAC,MAAM,EAAE;oBACb,MAAM,QAAQ,GAAG,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;oBAClC,IAAI,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC;oBACzB,KAAK,MAAM,GAAG,IAAI,QAAQ,EAAE;wBACxB,IAAI,MAAM,CAAC,GAAG,CAAC,EAAE;4BACb,MAAM,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC;yBACxB;6BAAM;4BACH,MAAM,GAAG,IAAI,CAAC;4BACd,MAAM;yBACT;qBACJ;oBAED,IAAI,MAAM,EAAE;wBACR,OAAO,GAAG,OAAO,CAAC,UAAU,CAAC,IAAI,GAAG,KAAK,GAAG,IAAI,EAAE,EAAE,GAAG,MAAM,CAAC,CAAC;qBAClE;iBACJ;aACJ;SACJ;QAED,OAAO,OAAO,CAAC;IACnB,CAAC;CACJ","file":"notification.js","sourcesContent":["import { Globalization } from '../data/globalization';\r\nimport { Logging } from '../diagnostics/logging';\r\nimport { Strings } from '../generated/strings';\r\nimport { EnvironmentModule } from '../manifest/environment-modules';\r\nimport { RpcNotification } from '../rpc/notification/rpc-notification-model';\r\nimport { RpcWorkItem } from '../rpc/work-item/rpc-work-item-model';\r\nimport { NotificationLinkType } from './notification-link-type';\r\nimport { IFrameService } from './notification-manager';\r\nimport { NotificationMessage } from './notification-message';\r\nimport { NotificationState } from './notification-state';\r\nimport { PowerShellNotification, PowerShellWorkItemMessage } from './powershell-notification';\r\nimport { SocketMessage } from './socket-signalr';\r\nimport { RecoveredWorkItem } from './work-item-request';\r\n\r\n/**\r\n * Notification changed event type.\r\n */\r\nexport enum NotificationChangeEvent {\r\n Initialized,\r\n InitializationFailed,\r\n Add,\r\n Remove,\r\n Change\r\n}\r\n\r\n/**\r\n * Notification changed event packet.\r\n */\r\nexport interface NotificationEvent {\r\n changeEvent: NotificationChangeEvent;\r\n notification?: Notification;\r\n}\r\n\r\n/**\r\n * Internal notification object converted from ClientNotification object.\r\n * Contains data to track notifications.\r\n */\r\nexport class Notification {\r\n private strings: Strings = MsftSme.getStrings<Strings>();\r\n\r\n /**\r\n * Work item passed from RPC or client on shell.\r\n */\r\n private workItem: RpcWorkItem;\r\n\r\n /**\r\n * The type ID of work item.\r\n */\r\n public typeId: string;\r\n\r\n /**\r\n * The node name.\r\n */\r\n public nodeName: string;\r\n\r\n /**\r\n * The module name.\r\n */\r\n public moduleName: string;\r\n\r\n /**\r\n * The entry point name within the module\r\n */\r\n public entryPointName: string;\r\n\r\n /**\r\n * The module display name.\r\n */\r\n public moduleDisplayName: string;\r\n\r\n /**\r\n * Object included last response.\r\n */\r\n public object: any;\r\n\r\n /**\r\n * The state of notification.\r\n */\r\n public state: NotificationState;\r\n\r\n /**\r\n * The title of work item to display user. (localized)\r\n */\r\n public title: string;\r\n\r\n /**\r\n * @depracated\r\n * The description of work item to display user. (localized)\r\n */\r\n public description: string;\r\n\r\n /**\r\n * The message. (localized)\r\n */\r\n public message: string;\r\n\r\n /**\r\n * Possible solution message to address error. (localized)\r\n */\r\n public solutionMessage: string;\r\n\r\n /**\r\n * True if the notification was created from recover, updates from messages should be taken\r\n */\r\n public isFromRecover = false;\r\n\r\n /**\r\n * True if the notification is disabled and should not be shown to the user\r\n */\r\n public isDisabled = false;\r\n\r\n /**\r\n * The start timestamp as a formatted globalized string\r\n */\r\n public startTimestamp: string;\r\n\r\n /**\r\n * The last changed timestamp as a formatted globalized string\r\n */\r\n public changedTimestamp: string;\r\n\r\n /**\r\n * The last changed timestamp as a number\r\n */\r\n public changedTimestampValue: number;\r\n\r\n /**\r\n * The end timestamp as a formatted globalized string\r\n */\r\n public endTimestamp: string;\r\n\r\n /**\r\n * The progress percent.\r\n */\r\n public progressPercent: number;\r\n\r\n /**\r\n * The success link to navigate to the object view. (optional)\r\n * At default, it brings to the home page of the module.\r\n */\r\n public link: string;\r\n\r\n /**\r\n * the notification link type of the link\r\n */\r\n public linkType: NotificationLinkType;\r\n\r\n /**\r\n * True if we should show the link in the notification's alert\r\n * We will show the link if there is a custom link or it is a long running request\r\n */\r\n public showLinkInAlert = false;\r\n\r\n /**\r\n * Marked it's no longer display to include list of notifications.\r\n */\r\n public dismissed = false;\r\n\r\n /**\r\n * The parent URI window.location.pathname.\r\n */\r\n public locationPathname: string;\r\n\r\n /**\r\n * The parent URI window.location.search\r\n */\r\n public locationSearch: string;\r\n\r\n /**\r\n *\r\n * Tracks if the notification has been read.\r\n */\r\n public isUnread = true;\r\n\r\n /**\r\n * Create notification from WorkItem.\r\n *\r\n * @param id the notification ID.\r\n * @param workItem the RPC work item.\r\n * @param state the initial state.\r\n * @param object the object from query result.\r\n * @return notification the notification object.\r\n */\r\n public static createFromWorkItem(\r\n id: string, workItem: RpcWorkItem, state: NotificationState, iFrameService: IFrameService, object?: any): Notification {\r\n const notification = new Notification(id);\r\n notification.workItem = workItem;\r\n\r\n notification.state = state;\r\n notification.object = object;\r\n notification.initializeFromWorkItem(workItem, iFrameService);\r\n return notification;\r\n }\r\n\r\n /**\r\n * Create notification from recovered work item.\r\n *\r\n * @param recoveredWorkItem the recovered work item.\r\n * @return notification the notification object.\r\n */\r\n public static createFromRecover(recoveredWorkItem: RecoveredWorkItem, iFrameService: IFrameService): Notification {\r\n const notification = new Notification(recoveredWorkItem.id);\r\n notification.workItem = recoveredWorkItem.metadata;\r\n notification.isFromRecover = true;\r\n\r\n if (recoveredWorkItem.failed) {\r\n notification.state = NotificationState.Error;\r\n notification.object = { errorType: 'WorkItemRecover', message: recoveredWorkItem.errorMessage };\r\n } else {\r\n notification.state = NotificationState.InProgress;\r\n notification.object = {};\r\n }\r\n\r\n notification.initializeFromWorkItem(recoveredWorkItem.metadata, iFrameService);\r\n return notification;\r\n }\r\n\r\n /**\r\n * Create notification from instant request.\r\n *\r\n * @param client the RPC notification request.\r\n * @return notification the notification object.\r\n */\r\n public static createFromClient(client: RpcNotification, iFrameService: IFrameService): Notification {\r\n const notification = new Notification(client.id);\r\n notification.locationPathname = window.location.pathname;\r\n notification.locationSearch = window.location.search;\r\n notification.initializeFromInstant(client, iFrameService);\r\n return notification;\r\n }\r\n\r\n /**\r\n * Initializes a new instance of the Notification class.\r\n *\r\n * @param id the notification ID.\r\n */\r\n constructor(public id: string) { }\r\n\r\n /**\r\n * Update a notification by work item from RPC.\r\n * @param id the notification id.\r\n * @param workItem the work item.\r\n * @param state the state of the notification.\r\n * @param object the object from query result.\r\n */\r\n public updateFromWorkItem(id: string, workItem: RpcWorkItem, state: NotificationState, object?: any) {\r\n let changed = false;\r\n\r\n if (this.updateState(state)) {\r\n changed = true;\r\n const now = Date.now();\r\n this.changedTimestampValue = now;\r\n this.changedTimestamp = this.endTimestamp = this.getGlobalizedTimestamp(now);\r\n }\r\n\r\n if (this.object !== object) {\r\n changed = true;\r\n this.object = object;\r\n }\r\n\r\n this.updateMessageAndLinkAndTitle(workItem);\r\n return !this.isDisabled && changed;\r\n }\r\n\r\n /**\r\n * Update the notification by socket message from the gateway.\r\n *\r\n * @param item the socket message.\r\n * @return boolean the changed status.\r\n */\r\n public updateFromMessage(item: SocketMessage<PowerShellWorkItemMessage>): boolean {\r\n let changed = false;\r\n const now = Date.now();\r\n if (PowerShellNotification.hasError(item)) {\r\n Logging.logDebug('Notification', '{0}/Error/{1}'.format(this.id, JSON.stringify(item.message.errors)));\r\n if (this.updateState(NotificationState.Error)) {\r\n this.changedTimestampValue = now;\r\n this.changedTimestamp = this.endTimestamp = this.getGlobalizedTimestamp(now);\r\n }\r\n\r\n this.object = item.message.errors && MsftSme.first(item.message.errors);\r\n changed = true;\r\n this.updateMessageAndLinkAndTitle(this.workItem);\r\n return !this.isDisabled;\r\n }\r\n\r\n if (PowerShellNotification.hasException(item)) {\r\n Logging.logDebug('Notification', '{0}/Exception/{1}'.format(this.id, item.message.exception));\r\n if (this.updateState(NotificationState.Error)) {\r\n this.changedTimestampValue = now;\r\n this.changedTimestamp = this.endTimestamp = this.getGlobalizedTimestamp(now);\r\n }\r\n\r\n this.object = { message: item.message.exception };\r\n changed = true;\r\n this.updateMessageAndLinkAndTitle(this.workItem);\r\n return !this.isDisabled;\r\n }\r\n\r\n if (PowerShellNotification.hasProgress(item)) {\r\n Logging.logDebug('Notification', '{0}/Progress/{1}'.format(this.id, JSON.stringify(item.message.progress)));\r\n if (this.updateState(NotificationState.InProgress)) {\r\n this.changedTimestampValue = now;\r\n this.changedTimestamp = this.getGlobalizedTimestamp(now);\r\n }\r\n\r\n this.object = item.message.progress && MsftSme.last(item.message.progress);\r\n this.progressPercent = this.object?.percentComplete ?? this.object?.percent;\r\n\r\n if ((this.progressPercent == null || this.progressPercent < 0)\r\n && this.workItem.progressMessage && this.workItem.progressMessage.indexOf('{{percent}}') >= 0) {\r\n return false;\r\n }\r\n\r\n changed = true;\r\n }\r\n\r\n if (PowerShellNotification.hasData(item)) {\r\n Logging.logDebug('Notification', '{0}/Data/{1}'.format(this.id, JSON.stringify(item.message.results)));\r\n this.object = item.message.results && MsftSme.last(item.message.results);\r\n changed = true;\r\n }\r\n\r\n if (PowerShellNotification.hasCompleted(item)) {\r\n Logging.logDebug('Notification', '{0}/Completed'.format(this.id));\r\n if (this.updateState(NotificationState.Success)) {\r\n this.changedTimestampValue = now;\r\n this.changedTimestamp = this.endTimestamp = this.getGlobalizedTimestamp(now);\r\n }\r\n\r\n changed = true;\r\n }\r\n\r\n this.updateMessageAndLinkAndTitle(this.workItem);\r\n return !this.isDisabled && changed;\r\n }\r\n\r\n /**\r\n * Update the notification by socket message from the gateway.\r\n *\r\n * @param state the state of notification.\r\n * @param item the socket message.\r\n * @return boolean the changed status.\r\n */\r\n public updateFromNotificationMessage(state: NotificationState, item: NotificationMessage): boolean {\r\n const now = Date.now();\r\n this.title = item.title;\r\n this.message = item.message;\r\n this.state = state;\r\n this.changedTimestampValue = now;\r\n if (state === NotificationState.InProgress) {\r\n this.changedTimestamp = this.getGlobalizedTimestamp(now);\r\n } else {\r\n this.changedTimestamp = this.endTimestamp = this.getGlobalizedTimestamp(now);\r\n }\r\n\r\n return true;\r\n }\r\n\r\n /**\r\n * Update the notification by instant notification message from the client.\r\n *\r\n * @param client the instant notification object.\r\n * @param boolean the changed status.\r\n */\r\n public updateFromClient(client: RpcNotification): boolean {\r\n let changed = false;\r\n const title = client.title;\r\n if (this.title !== title) {\r\n changed = true;\r\n this.title = title;\r\n }\r\n\r\n if (this.updateState(client.state)) {\r\n const now = Date.now();\r\n this.changedTimestampValue = now;\r\n this.changedTimestamp = this.getGlobalizedTimestamp(now);\r\n changed = true;\r\n if (this.state !== NotificationState.InProgress) {\r\n this.endTimestamp = this.changedTimestamp;\r\n }\r\n }\r\n\r\n const link = this.formatLink(client.link, client.linkType);\r\n if (this.link !== link) {\r\n changed = true;\r\n this.link = link;\r\n this.linkType = client.linkType;\r\n }\r\n\r\n if (this.message !== client.message) {\r\n changed = true;\r\n this.message = client.message;\r\n }\r\n\r\n if (this.solutionMessage !== client.solutionMessage) {\r\n changed = true;\r\n this.solutionMessage = client.solutionMessage;\r\n }\r\n\r\n return changed;\r\n }\r\n\r\n /**\r\n * Gets the module display name.\r\n */\r\n private getModuleDisplayName(iFrameService: IFrameService, sourceName: string, sourceSubName: string): string {\r\n const activeIFrame = iFrameService ? iFrameService.getActiveToolIFrameData() : null;\r\n if (activeIFrame && activeIFrame.entryPoint) {\r\n const entryPoint = activeIFrame.entryPoint;\r\n this.entryPointName = entryPoint.name;\r\n\r\n if (entryPoint.parentModule) {\r\n this.moduleName = entryPoint.parentModule.name;\r\n }\r\n } else {\r\n // fallback see if we can get any info from RPC\r\n this.moduleName = sourceName;\r\n if (sourceSubName) {\r\n this.entryPointName = MsftSme.first(sourceSubName.split('#'));\r\n }\r\n }\r\n\r\n const environment = MsftSme.self().Environment;\r\n\r\n // if moduleName === environment.name then the source is Shell. Return null to use generic module name\r\n if (this.moduleName && this.moduleName !== environment.name) {\r\n const module: EnvironmentModule = MsftSme.find(\r\n <EnvironmentModule[]>environment.modules,\r\n value => value.name === this.moduleName);\r\n if (module) {\r\n if (this.entryPointName) {\r\n const entryPoint = MsftSme.find(module.entryPoints, ep => ep.name === this.entryPointName);\r\n if (entryPoint) {\r\n return entryPoint.displayName;\r\n }\r\n }\r\n\r\n return module.displayName;\r\n }\r\n\r\n return this.moduleName;\r\n }\r\n\r\n return null;\r\n }\r\n\r\n /**\r\n * Update the state.\r\n *\r\n * @param state the new state.\r\n * @return boolean the changed state.\r\n */\r\n private updateState(state: NotificationState): boolean {\r\n if (this.state !== state) {\r\n this.state = state;\r\n return true;\r\n }\r\n\r\n return false;\r\n }\r\n\r\n private initializeFromWorkItem(item: RpcWorkItem, iFrameService: IFrameService): void {\r\n this.nodeName = item.nodeName;\r\n this.moduleDisplayName = this.getModuleDisplayName(iFrameService, item.sourceName, item.sourceSubName);\r\n this.startTimestamp = this.getGlobalizedTimestamp(item.timestamp);\r\n this.changedTimestamp = this.getGlobalizedTimestamp(item.timestamp);\r\n this.changedTimestampValue = item.timestamp;\r\n this.typeId = item.typeId;\r\n this.updateMessageAndLinkAndTitle(item);\r\n }\r\n\r\n private updateMessageAndLinkAndTitle(item: RpcWorkItem): void {\r\n let template: string;\r\n this.isDisabled = !this.isFromRecover && item.disableAllNotifications;\r\n switch (this.state) {\r\n case NotificationState.Started:\r\n this.title = item.inProgressTitle;\r\n template = item.startedMessage;\r\n this.link = this.formatLink(null);\r\n break;\r\n case NotificationState.Error:\r\n this.title = item.errorTitle;\r\n this.isDisabled = !this.isFromRecover && item.disableErrorNotification;\r\n this.endTimestamp = this.getGlobalizedTimestamp(item.timestamp);\r\n template = item.errorMessage;\r\n this.link = this.formatLink(item.errorLink, item.errorLinkType);\r\n this.linkType = item.errorLinkType;\r\n this.showLinkInAlert = true;\r\n this.moduleDisplayName = item.errorLinkText || this.moduleDisplayName;\r\n break;\r\n case NotificationState.InProgress:\r\n this.title = item.inProgressTitle;\r\n template = item.progressMessage;\r\n this.link = this.formatLink(null);\r\n break;\r\n case NotificationState.Success:\r\n this.title = item.successTitle;\r\n this.endTimestamp = this.getGlobalizedTimestamp(item.timestamp);\r\n template = item.successMessage;\r\n this.link = this.formatLink(item.successLink, item.successLinkType);\r\n this.linkType = item.successLinkType;\r\n this.moduleDisplayName = item.successLinkText || this.moduleDisplayName;\r\n this.showLinkInAlert = true;\r\n break;\r\n default:\r\n const message = MsftSme.getStrings<Strings>().MsftSmeShell.Core.Error.NotificationUnsupportedState.message;\r\n throw new Error(message);\r\n }\r\n\r\n this.message = this.formatMessage(template);\r\n }\r\n\r\n private initializeFromInstant(client: RpcNotification, iFrameService: IFrameService): void {\r\n this.nodeName = client.nodeName;\r\n this.moduleDisplayName = client.linkText ?\r\n client.linkText\r\n : this.getModuleDisplayName(iFrameService, client.sourceName, client.sourceSubName);\r\n this.startTimestamp = this.getGlobalizedTimestamp(client.timestamp);\r\n this.changedTimestamp = this.getGlobalizedTimestamp(client.timestamp);\r\n this.changedTimestampValue = client.timestamp;\r\n this.title = client.title;\r\n this.state = client.state;\r\n this.link = this.formatLink(client.link, client.linkType);\r\n this.linkType = client.linkType;\r\n this.message = client.message;\r\n this.solutionMessage = client.solutionMessage;\r\n if (this.state !== NotificationState.Started && this.state !== NotificationState.InProgress) {\r\n this.endTimestamp = this.getGlobalizedTimestamp(client.timestamp);\r\n }\r\n }\r\n\r\n private getGlobalizedTimestamp(timestamp: number): string {\r\n return Globalization.timeOnly(new Date(timestamp));\r\n }\r\n\r\n private formatLink(link: string, linkType?: NotificationLinkType): string {\r\n // href example: \"http://localhost:4400/apps/msft.sme.server-manager!servers/tools/msft.sme.module-seed!main?connection=sme-full1.redmond.corp.microsoft.com\"\r\n if (linkType === NotificationLinkType.Absolute) {\r\n return link;\r\n }\r\n\r\n // null linkType behaves like NotificationLinkType.RelativeToTool\r\n const pathname = linkType === NotificationLinkType.RelativeToRoot ?\r\n '/'\r\n : this.locationPathname || this.workItem && this.workItem.locationPathname;\r\n\r\n if (link && pathname) {\r\n this.showLinkInAlert = true;\r\n return MsftSme.trimEnd(pathname, '/') + '/' + MsftSme.trimStart(link, '/');\r\n }\r\n\r\n this.showLinkInAlert = false;\r\n return pathname;\r\n }\r\n\r\n private formatMessage(template: string): string {\r\n const parameters = this.findParameters(template);\r\n const message = this.replaceParameters(template, parameters);\r\n return message;\r\n }\r\n\r\n private findParameters(template: string): string[] {\r\n const results: string[] = [];\r\n if (!template) {\r\n return results;\r\n }\r\n\r\n const segments = template.split('{{');\r\n for (const seg of segments) {\r\n const index = seg.indexOf('}}');\r\n if (index > 0) {\r\n results.push(seg.substring(0, index));\r\n }\r\n }\r\n\r\n return results;\r\n }\r\n\r\n private replaceParameters(message: string, parameters: string[]): string {\r\n for (const param of parameters) {\r\n if (param === 'percent') {\r\n if (typeof this.progressPercent === 'number') {\r\n message = message.replaceAll('{{percent}}', '' + this.progressPercent);\r\n }\r\n } else if (param === 'objectName') {\r\n if (this.workItem && this.workItem.objectName) {\r\n message = message.replaceAll('{{objectName}}', this.workItem.objectName);\r\n }\r\n } else {\r\n if (this.object) {\r\n const segments = param.split('.');\r\n let target = this.object;\r\n for (const seg of segments) {\r\n if (target[seg]) {\r\n target = target[seg];\r\n } else {\r\n target = null;\r\n break;\r\n }\r\n }\r\n\r\n if (target) {\r\n message = message.replaceAll('{{' + param + '}}', '' + target);\r\n }\r\n }\r\n }\r\n }\r\n\r\n return message;\r\n }\r\n}\r\n"]}