Skip to content

Commit

Permalink
Zowe Suite v1.18.0
Browse files Browse the repository at this point in the history
  • Loading branch information
zowe-robot committed Dec 8, 2020
2 parents edf326b + 2b213ea commit 8ef7f5f
Show file tree
Hide file tree
Showing 33 changed files with 931 additions and 243 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

All notable changes to the Zlux App Manager will be documented in this file.

## `1.18.0`

- Enhanced standalone/single app mode such that Desktop actions (Notifications, right click context menu, etc.) are now available

## `1.16.0`

- Added the relevant chmod/chown arguments to the Zowe URI Broker to enable the changing of ownership & permissions of USS files & folders
Expand Down
1 change: 1 addition & 0 deletions bootstrap/src/assets/i18n/log/messages_en.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
"ZWED5040I":"Found some wrappers %s",
"ZWED5041I":"ectxt=",
"ZWED5042I":"dispatcher.invokeAction on context %s",
"ZWED5043I":"RESERVED: MVD standalone container requested with pluginId %s",

"ZWED5000W":"RESERVED: Desktop attempted to change instanceId for iframe instance=%s, message=%s",
"ZWED5001W":"pluginWSUri not implemented yet!",
Expand Down
15 changes: 6 additions & 9 deletions bootstrap/src/bootstrap/bootstrap-manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,14 @@ import { PluginManager } from 'zlux-base/plugin-manager/plugin-manager'
import { ZoweZLUXResources } from './rocket-mvd-resources'
import { DSMResources } from './dsm-resources'


declare var window: { ZoweZLUX: typeof ZoweZLUXResources };

export class BootstrapManager {
private static bootstrapPerformed = false;

private static bootstrapGlobalResources(simpleContainerRequested: boolean) {
const uriBroker = (window as any)['GIZA_ENVIRONMENT'];
console.log("ZWED5004I - bootstrapGlobalResources simpleContainerRequested flag value: ", simpleContainerRequested);
private static bootstrapGlobalResources(standaloneContainerRequested: boolean) {
const uriBroker = window['GIZA_ENVIRONMENT'];
console.log("ZWED5004I - bootstrapGlobalResources standaloneContainerRequested flag value: ", standaloneContainerRequested);
console.log("ZWED5005I - bootstrapGlobalResources GIZA_ENVIRONMENT value: ", uriBroker);
if (simpleContainerRequested && uriBroker.toUpperCase() === 'DSM') {
if (standaloneContainerRequested && uriBroker && uriBroker.toUpperCase() === 'DSM') {
window.ZoweZLUX = DSMResources;
} else {
window.ZoweZLUX = ZoweZLUXResources;
Expand Down Expand Up @@ -56,9 +53,9 @@ export class BootstrapManager {
}

static bootstrapDesktop(injectionCallback: (plugin: ZLUX.Plugin) => Promise<void>) {
const simpleContainerRequested = (window as any)['GIZA_SIMPLE_CONTAINER_REQUESTED'];
const standaloneContainerRequested = window['GIZA_SIMPLE_CONTAINER_REQUESTED'] || false;

BootstrapManager.bootstrapGlobalResources(simpleContainerRequested);
BootstrapManager.bootstrapGlobalResources(standaloneContainerRequested);

PluginManager.loadPlugins(ZLUX.PluginType.Desktop).then(desktops => {
console.log(`ZWED5007I - ${desktops.length} desktops available`);
Expand Down
2 changes: 0 additions & 2 deletions bootstrap/src/bootstrap/dsm-resources.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@ import { ZoweNotificationManager } from 'zlux-base/notification-manager/notifica
import { SimpleGlobalization } from '../i18n/simple-globalization'
// import { VirtualDesktopAdapter } from '../abstract-virtual-desktop/virtual-desktop-adapter'

declare var window: { ZoweZLUX: typeof DSMResources };
window; /* Suppress TS error */
let logger = new Logger();
logger.addDestination(logger.makeDefaultDestination(true,true,true));

Expand Down
7 changes: 2 additions & 5 deletions bootstrap/src/bootstrap/rocket-mvd-resources.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,7 @@ import { ZoweNotificationManager } from 'zlux-base/notification-manager/notifica
import { SimpleGlobalization } from '../i18n/simple-globalization'
// import { VirtualDesktopAdapter } from '../abstract-virtual-desktop/virtual-desktop-adapter'

declare var window: { ZoweZLUX: typeof ZoweZLUXResources,
COM_RS_COMMON_LOGGER: Logger};
window; /* Suppress TS error */

// This is ithe core logger
// This is the core logger
let logger = new Logger();
logger.addDestination(logger.makeDefaultDestination(true,true,true,true,true));
window.COM_RS_COMMON_LOGGER = logger;
Expand All @@ -44,6 +40,7 @@ fetch('/ZLUX/plugins/org.zowe.zlux.bootstrap/web/assets/i18n/log/messages_en.jso

PluginManager.logger = bootstrapLogger;

// TODO: Possible duplicate in index.d.ts in zlux-platform ???
export class ZoweZLUXResources {
static pluginManager = PluginManager
static uriBroker:ZLUX.UriBroker = new MvdUri();
Expand Down
62 changes: 40 additions & 22 deletions bootstrap/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,38 +12,56 @@
import { BootstrapManager } from './bootstrap/bootstrap-manager'
export { BootstrapManager } from './bootstrap/bootstrap-manager'

// FIXME: Code duplication with single-app window manager.
// Should be fixed by introducing of routing (MVD-1535)
function parseQuery() {
const queryString: string = location.search.substr(1);
const queryObject: { [id: string]: string } = {};
queryString.split('&').forEach(function(part) {
const pair = part.split('=').map(x => decodeURIComponent(x));
queryObject[pair[0]] = pair[1];
});
return queryObject;
}
const query = parseQuery();
if (typeof query.pluginId === 'string') {
console.log(`ZWED5003I - Simple container requested with pluginId ${query.pluginId}`);
(window as any)['GIZA_SIMPLE_CONTAINER_REQUESTED'] = true;
(window as any)['GIZA_PLUGIN_TO_BE_LOADED'] = query.pluginId;
(window as any)['ZOWE_SWM_SHOW_LOGIN'] = query.showLogin;
(window as any)['GIZA_ENVIRONMENT'] = 'MVD';
}
processApp2AppArgs();

try {
const simpleContainerRequested = (window as any)['GIZA_SIMPLE_CONTAINER_REQUESTED'];
const uriBroker = (window as any)['GIZA_ENVIRONMENT'];
const simpleContainerRequested = window['GIZA_SIMPLE_CONTAINER_REQUESTED'];
const uriBroker = window['GIZA_ENVIRONMENT'];

if (!simpleContainerRequested || uriBroker.toUpperCase() === 'MVD') {
if (!simpleContainerRequested || (uriBroker && uriBroker.toUpperCase() === 'MVD')) {
BootstrapManager.bootstrapDesktopAndInject();
}
} catch (error) {
console.error("ZWED5007E - Unable to bootstrap desktop!!");
console.error(error);
}

/* Minor code duplication of StartURLManager, but Typescript gives compile problems we can't easily ignore when we import it */
function processApp2AppArgs(url?: string): void {
const queryString = url || location.search.substr(1);
let pluginId, windowManager: any;

queryString.split('&').forEach(part => {
const [key, value] = part.split('=').map(v => decodeURIComponent(v));
switch (key) {
case "pluginId":
window['GIZA_PLUGIN_TO_BE_LOADED'] = value;
window['GIZA_SIMPLE_CONTAINER_REQUESTED'] = true;
window['GIZA_ENVIRONMENT'] = 'MVD';
pluginId = value;
break;
case "showLogin":
if (value == "true") {
window['ZOWE_SWM_SHOW_LOGIN'] = true;
} else {
window['ZOWE_SWM_SHOW_LOGIN'] = false;
}
break;
case "windowManager":
windowManager = value;
break;
}
});

if (window['GIZA_SIMPLE_CONTAINER_REQUESTED']) {
if (windowManager && windowManager.toUpperCase() === 'MVD') {
console.log(`ZWED5043I - MVD standalone container requested with pluginId ${pluginId}`);
} else {
console.log(`ZWED5003I - Simple container requested with pluginId ${pluginId}`);
}
}
}


/*
This program and the accompanying materials are
Expand Down
Loading

0 comments on commit 8ef7f5f

Please sign in to comment.