-
Notifications
You must be signed in to change notification settings - Fork 21
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
Exclude wrong version of angular plugins by checking entrypoint content #104
Exclude wrong version of angular plugins by checking entrypoint content #104
Conversation
Signed-off-by: 1000TurquoisePogs <[email protected]>
Signed-off-by: 1000TurquoisePogs <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks alright, but may need to change from:
zowe/zlux-app-manager#614 (review)
zowe/zlux-app-server#316 (review)
const searchParams = new URLSearchParams(window.location.search); | ||
const useV2Desktop = searchParams.has("use-v2-desktop") && (searchParams.get("use-v2-desktop") == '1'); | ||
let validPlugins = allPlugins.filter((plugin) => { | ||
if (plugin.type != 'application') { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should be plugin?.type if parsePluginDefinitions(result) method returns an array that has undefined values
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
preferably with an error log in case plugin response text could not be parsed (may be done already upstream in PluginManager)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if you dont have a plugin type, you'll fail startup.
Signed-off-by: 1000TurquoisePogs <[email protected]>
Signed-off-by: 1000TurquoisePogs <[email protected]>
Signed-off-by: 1000TurquoisePogs <[email protected]>
Implement lookup from PR 308 of zlux-app-server
According to zowe/zlux-app-server#308 you can state what the location of your primary JS file is for loading.
Angular in particular uses this, and we need it to determine whether an installed plugin is appropriate for the desktop that is being loaded (which is detected by query parameters like ?use-v2-desktop=1)
This should be tested by having an angular plugin which does not use the new features of PR 308, having another which does, and testing with/without "?use-v2-desktop=1" in the URL of the desktop.
You should see that depending upon whether a plugin has or does not have v2 or v3 angular content, it will be permitted or omitted from visibility in the desktop.