Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New Desktop ID #614

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion bootstrap/src/assets/i18n/log/messages_en.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
"ZWED5041I":"ectxt=",
"ZWED5042I":"dispatcher.invokeAction on context %s",
"ZWED5043I":"RESERVED: MVD standalone container requested with pluginId %s",
"ZWED5324I":"RESERVED: The requested Desktop version (%s) is in maintenance mode. To use the newest Desktop version instead, remove the query parameter 'use-v2-desktop'.",
1000TurquoisePogs marked this conversation as resolved.
Show resolved Hide resolved

"ZWED5000W":"RESERVED: Desktop attempted to change instanceId for iframe instance=%s, message=%s",
"ZWED5001W":"pluginWSUri not implemented yet!",
Expand Down Expand Up @@ -99,4 +100,4 @@
"ZWED5041E":"RESERVED: Plugin type is not present",
"ZWED5042E":"RESERVED: Plugin type is not a string",
"ZWED5043E":"RESERVED: %s is not a valid semantic version"
}
}
17 changes: 11 additions & 6 deletions bootstrap/src/bootstrap/bootstrap-manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
import { Plugin } from 'zlux-base/plugin-manager/plugin'
import { PluginManager } from 'zlux-base/plugin-manager/plugin-manager'
import { ZoweZLUXResources } from './rocket-mvd-resources'
import { DSMResources } from './dsm-resources'

export class BootstrapManager {
private static bootstrapPerformed = false;
Expand All @@ -22,11 +21,7 @@ export class BootstrapManager {
const uriBroker = window['GIZA_ENVIRONMENT'];
console.log("ZWED5004I - bootstrapGlobalResources standaloneContainerRequested flag value: ", standaloneContainerRequested);
console.log("ZWED5005I - bootstrapGlobalResources GIZA_ENVIRONMENT value: ", uriBroker);
if (standaloneContainerRequested && uriBroker && uriBroker.toUpperCase() === 'DSM') {
window.ZoweZLUX = DSMResources;
} else {
window.ZoweZLUX = ZoweZLUXResources;
}
window.ZoweZLUX = ZoweZLUXResources;
}

private static bootstrapDesktopPlugin(desktop: ZLUX.Plugin, injectionCallback: (plugin: ZLUX.Plugin) => Promise<void>) {
Expand Down Expand Up @@ -61,8 +56,18 @@ export class BootstrapManager {
console.log(`ZWED5007I - ${desktops.length} desktops available`);
console.log('ZWED5008I - desktops: ', desktops);

const searchParams = new URLSearchParams(window.location.search);
const v2Desktop = desktops.filter((desktop)=> { desktop.getIdentifier() == "org.zowe.zlux.ng2desktop" });
const v3Desktop = desktops.filter((desktop)=> { desktop.getIdentifier() == "org.zowe.zlux.ivydesktop" });
const useV2Desktop = v2Desktop.length == 1 && searchParams.has("use-v2-desktop") && (searchParams.get("use-v2-desktop") == 'true');

if (desktops.length == 0) {
console.error("ZWED5012E - No desktops available to bootstrap.");
} else if (useV2Desktop) {
console.warn("ZWED5324I - The requested Desktop version (V2) is in maintenance mode. To use the newest Desktop version instead, remove the query parameter 'use-v2-desktop'.");
BootstrapManager.bootstrapDesktopPlugin(v2Desktop[0], injectionCallback);
} else if (v3Desktop.length == 1) {
BootstrapManager.bootstrapDesktopPlugin(v3Desktop[0], injectionCallback);
} else {
BootstrapManager.bootstrapDesktopPlugin(desktops[0], injectionCallback);
}
Expand Down
60 changes: 0 additions & 60 deletions bootstrap/src/bootstrap/dsm-resources.ts

This file was deleted.

1 change: 0 additions & 1 deletion bootstrap/src/bootstrap/rocket-mvd-resources.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ import { Logger } from '../../../../zlux-shared/src/logging/logger'
import { Registry } from 'zlux-base/registry/registry'
import { ZoweNotificationManager } from 'zlux-base/notification-manager/notification-manager'
import { SimpleGlobalization } from '../i18n/simple-globalization'
// import { VirtualDesktopAdapter } from '../abstract-virtual-desktop/virtual-desktop-adapter'

// This is the core logger
let logger = new Logger();
Expand Down
187 changes: 0 additions & 187 deletions bootstrap/src/uri/dsm-uri.ts

This file was deleted.

2 changes: 1 addition & 1 deletion virtual-desktop/pluginDefinition.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"identifier": "org.zowe.zlux.ng2desktop",
"identifier": "org.zowe.zlux.ivydesktop",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is a lot of places we now need to change this:
zlux-app-manager\virtual-desktop\src\app\shared\logger.ts
zlux-app-manager\virtual-desktop\src\app\start-url-manager\start-url-manager.service.ts
zlux-app-manager\virtual-desktop\src\app\window-manager\mvd-window-manager\personalization-panel\personalization-panel.component.ts possibly?
probably others

so do a text search & see if it makes sense to change there too

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

logger & start-url-manager = done
others = no, they seem to have different ids. "org.zowe.zlux.ng2desktop.settings" is not "org.zowe.zlux.ng2desktop". Changing it could have consequences like breaking saved settings.
That may be desirable at some point in the future but I don't see the case for it now.

"apiVersion": "2.0.0",
"pluginVersion": "0.0.0-zlux.version.replacement",
"pluginType": "desktop",
Expand Down
2 changes: 1 addition & 1 deletion virtual-desktop/src/app/shared/logger.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
Copyright Contributors to the Zowe Project.
*/

const baseLoggerIdentifier = 'org.zowe.zlux.ng2desktop' //the one hardcoded place
const baseLoggerIdentifier = 'org.zowe.zlux.ivydesktop' //the one hardcoded place
export var BaseLogger: any = ZoweZLUX.logger.makeComponentLogger(baseLoggerIdentifier);

let lang = ZoweZLUX.globalization.getLanguage();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ export class StartURLManager implements MVDHosting.LoginActionInterface {
const argumentFormatter = { data: { op: 'deref', source: 'event', path: ['data'] } };
const type = dispatcher.constants.ActionType.Launch;
const mode = dispatcher.constants.ActionTargetMode.PluginCreate;
const testAction = dispatcher.makeAction(actionId, actionTitle, mode, type, 'org.zowe.zlux.ng2desktop', argumentFormatter);
const testAction = dispatcher.makeAction(actionId, actionTitle, mode, type, 'org.zowe.zlux.ivydesktop', argumentFormatter);
dispatcher.registerAction(testAction);
}

Expand Down
Loading