From 62d0a151a846de65dfc3919a276d22adc5adceaf Mon Sep 17 00:00:00 2001 From: Leonty Chudinov Date: Mon, 22 Jun 2020 12:05:47 +0500 Subject: [PATCH] PoC for Mobile App: Check plugin ID Signed-off-by: Leonty Chudinov --- webClient/src/app/app.component.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/webClient/src/app/app.component.ts b/webClient/src/app/app.component.ts index d9946bf..356bb34 100644 --- a/webClient/src/app/app.component.ts +++ b/webClient/src/app/app.component.ts @@ -200,6 +200,16 @@ export class AppComponent { Once you know that the App you want is present, you can execute Actions on it by using the Dispatcher. */ let dispatcher = ZoweZLUX.dispatcher; + let pluginManager = ZoweZLUX.pluginManager; + if (this.targetAppId) { + const plugin = pluginManager.getPlugin(this.targetAppId); + if (!plugin) { + this.popupManager.reportError( + ZluxErrorSeverity.WARNING, + this.translation.translate('invalid_plugin_identifier'), + `${this.translation.translate('no_plugin_found_for_identifier')} ${this.targetAppId}`, popupOptions); + } + } let type = dispatcher.constants.ActionType[this.actionType]; let mode = dispatcher.constants.ActionTargetMode[this.targetMode]; if (type != undefined && mode != undefined) {