Skip to content

Commit

Permalink
PoC for Mobile App: Check plugin ID
Browse files Browse the repository at this point in the history
Signed-off-by: Leonty Chudinov <[email protected]>
  • Loading branch information
Leonty Chudinov committed Jun 22, 2020
1 parent bc8c809 commit 62d0a15
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions webClient/src/app/app.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 62d0a15

Please sign in to comment.