diff --git a/electron/app/locales/en/webui.json b/electron/app/locales/en/webui.json index f824907b4..53a9c1f82 100644 --- a/electron/app/locales/en/webui.json +++ b/electron/app/locales/en/webui.json @@ -231,6 +231,11 @@ "image-design-create-image-help": "Whether you want to create a new primary image or use an existing image.", "image-design-create-image-aux-help": "Whether you want to create a new primary image or use an existing image, such as one of the standard images in the Oracle Container Registry.", + "image-design-aux-image-settings-label": "Auxiliary Image Configuration", + "image-design-aux-image-config-off-label": "Do not use an auxiliary image", + "image-design-aux-image-config-use-label": "Use an existing auxiliary image", + "image-design-aux-image-config-create-label": "Create a new auxiliary image", + "image-design-image-tag-label": "Image Tag", "image-design-image-tag-mii-create-help": "The tag to use to identify the new image containing the Oracle Fusion Middleware installation and WebLogic Deploy Tooling model to use to create and run the domain.", "image-design-image-tag-mii-create-with-aux-help": "The tag to use to identify the new image containing the Oracle Fusion Middleware installation to use to run the domain.", @@ -265,10 +270,6 @@ "image-design-custom-base-image-inspect-label": "Inspect Custom Base Image", "image-design-custom-base-image-inspect-busy-title": "Inspecting Image...Please Wait", - "image-design-use-aux-image-label": "Use Auxiliary Image", - "image-design-use-aux-image-help": "Split the Fusion Middleware software and the WebLogic Deploy Tooling software and model into two separate images that will be combined at runtime.", - "image-design-create-aux-image-label": "Create New Auxiliary Image Containing WebLogic Deploy Tooling Model", - "image-design-create-aux-image-help": "Whether you want to create a new auxiliary image for the WebLogic Deploy Tooling software and model or use an existing image.", "image-design-aux-image-tag-label": "Auxiliary Image Tag", "image-design-aux-image-tag-create-help": "The tag to use to identify the new image containing the WebLogic Deploy Tooling installation and model to use to create the domain.", "image-design-aux-image-tag-use-help": "The tag to use to identify the existing image containing the WebLogic Deploy Tooling installation and model to use to create the domain.", @@ -491,8 +492,18 @@ "domain-design-pv-volume-log-home-help": "The path to use to write the WebLogic Server log files.", "domain-design-image-title": "Primary Image to Use for the Domain", + "domain-design-hints-goto-create-image": "Go To Create Primary Image Page", + "domain-design-goto-create-image-button-label": "Go To Create Primary Image Page", "domain-design-image-tag-label": "Primary Image Tag", - "domain-design-image-tag-help": "The tag of the primary image to use for the domain. This field is set by the Image Tag field on the Primary Image tab of the Image page so go there to change its value, if needed.", + + "domain-design-image-tag-mii-create-help": "The tag to use to identify the new image containing the Oracle Fusion Middleware installation and WebLogic Deploy Tooling model to use to create and run the domain. This field is set by the Image Tag field on the Primary Image tab of the Image page so go there to change its value, if needed.", + "domain-design-image-tag-mii-create-with-aux-help": "The tag to use to identify the new image containing the Oracle Fusion Middleware installation to use to run the domain. This field is set by the Image Tag field on the Primary Image tab of the Image page so go there to change its value, if needed.", + "domain-design-image-tag-mii-use-help": "The tag to use to identify the existing image containing the Oracle Fusion Middleware installation and WebLogic Deploy Tooling model to use to create and run the domain.", + "domain-design-image-tag-mii-use-with-aux-help": "The tag to use to identify the existing image containing the Oracle Fusion Middleware installation to use to run the domain.", + "domain-design-image-tag-dii-create-help": "The tag to use to identify the new image containing the Oracle Fusion Middleware installation and domain to use. This field is set by the Image Tag field on the Primary Image tab of the Image page so go there to change its value, if needed.", + "domain-design-image-tag-dii-use-help": "The tag to use to identify the existing image containing the Oracle Fusion Middleware installation and domain to use.", + "domain-design-image-tag-pv-create-help": "The tag to use to identify the new image containing the Oracle Fusion Middleware installation to use to run the domain that already exists on the external Kubernetes persistent volume. This field is set by the Image Tag field on the Primary Image tab of the Image page so go there to change its value, if needed.", + "domain-design-image-tag-pv-use-help": "The tag to use to identify the existing image containing the Oracle Fusion Middleware installation to use to run the domain that already exists on the external Kubernetes persistent volume.", "domain-design-image-registry-address-label": "Image Registry Address", "domain-design-image-registry-address-help": "The image registry hostname and port to use to log in to the registry, if required. This field's value is parsed from the Primary Image Tag field and an empty value assumes Docker Hub is the registry being used.", "domain-design-image-pull-policy-label": "Primary Image Pull Policy", @@ -511,8 +522,11 @@ "domain-design-image-registry-pull-email-help": "The image registry user's email address used to create the Kubernetes image pull secret.", "domain-design-aux-image-title": "Auxiliary Image to Use for the Domain", + "domain-design-hints-goto-create-aux-image": "Go To Create Auxiliary Image Page", + "domain-design-goto-create-aux-image-button-label": "Go To Create Auxiliary Image Page", "domain-design-aux-image-tag-label": "Auxiliary Image Tag", - "domain-design-aux-image-tag-help": "The tag of the auxiliary image to use for the domain. This field is set by the Image Tag field on the Auxiliary Image tab of the Image page so go there to change its value, if needed.", + "domain-design-create-aux-image-tag-help": "The tag of the auxiliary image to use for the domain. This field is set by the Image Tag field on the Auxiliary Image tab of the Image page so go there to change its value, if needed.", + "domain-design-use-aux-image-tag-help": "The tag of the auxiliary image to use for the domain.", "domain-design-aux-image-registry-address-label": "Image Registry Address", "domain-design-aux-image-registry-address-help": "The image registry hostname and port to use to log in to the registry, if required. This field's value is parsed from the Auxiliary Image Tag field and an empty value assumes Docker Hub is the registry being used.", "domain-design-aux-image-pull-policy-label": "Auxiliary Image Pull Policy", @@ -949,8 +963,8 @@ "wit-creator-builder-login-in-progress": "Performing {{builderName}} log in to allow pulling the base image {{imageTag}}", "wit-aux-creator-image-not-mii-message": "The Target Domain Location type on the Project Settings page is not using Model-in-Image so there is no auxiliary image to create.", - "wit-aux-creator-image-not-use-message": "The Use Auxiliary Image option on the Primary Image tab of the Image page is turned off so there is no auxiliary image to create.", - "wit-aux-creator-image-not-create-message": "The Create New Auxiliary Image option on the Auxiliary Image tab of the Image page is off so there is no auxiliary image to create.", + "wit-aux-creator-image-not-use-message": "The Do not use an auxiliary image option on the Primary Image tab of the Image page is selected so there is no auxiliary image to create.", + "wit-aux-creator-image-not-create-message": "The Use an existing auxiliary image option on the Auxiliary Image tab of the Image page is selected so there is no auxiliary image to create.", "wit-aux-creator-aborted-error-title": "Create Auxiliary Image Aborted", "wit-aux-creator-invalid-java-home-error-prefix": "Unable to create auxiliary image due to the Java Home being invalid", "wit-aux-creator-invalid-wdt-installer-file-message": "Unable to create auxiliary image due to invalid WebLogic Deploy Tooling Installer file", @@ -994,8 +1008,8 @@ "image-pusher-create-failed-error-message":"Unable to push image {{imageTag}}: {{error}}.", "aux-image-pusher-image-not-mii-message": "The Target Domain Location type on the Project Settings page is not using Model-in-Image so there is no image to push.", - "aux-image-pusher-image-not-use-message": "The Use Auxiliary Image option on the Primary Image tab of the Image page is turned off so there is no image to push.", - "aux-image-pusher-image-not-create-message": "The Create New Primary Image option on the Auxiliary Image tab of the Image page is off so there is no image to push.", + "aux-image-pusher-image-not-use-message": "The Do not use an auxiliary image option on the Primary Image tab of the Image page is selected so there is no image to push.", + "aux-image-pusher-image-not-create-message": "The Use an existing auxiliary image option on the Primary Image tab of the Image page is selected so there is no image to push.", "aux-image-pusher-push-aborted-title": "Push Image Aborted", "aux-image-pusher-push-in-progress": "Pushing auxiliary image {{imageTag}}", "aux-image-pusher-image-builder-invalid-error-message": "The image builder executable {{fileName}} is not valid: {{error}}.", diff --git a/webui/src/js/utils/screen-utils.js b/webui/src/js/utils/screen-utils.js index ddd58b30d..32bcf28b2 100644 --- a/webui/src/js/utils/screen-utils.js +++ b/webui/src/js/utils/screen-utils.js @@ -5,10 +5,13 @@ */ 'use strict'; -define([], - function() { +define(['knockout', 'ojs/ojcorerouter'], + function(ko, CoreRouter) { function ScreenUtils() { const thisUtil = this; + const imageDesignViewSelectedSubview = ko.observable(); + let pendingImageDesignViewSubviewSelection; + let mainNavigationRouter; this.sliderPositions = {}; @@ -100,6 +103,45 @@ define([], } }).observe(parentElement); }; + + this.createMainNavigationRouter = (routeData, routeOptions) => { + mainNavigationRouter = new CoreRouter(routeData, routeOptions); + }; + + this.getMainNavigationRouter = () => { + return mainNavigationRouter; + }; + + this.gotoMainPage = (path) => { + mainNavigationRouter.go({ path: path }); + }; + + this.setImageDesignViewSelectedSubview = (view, honorPendingTabChange = false) => { + if (honorPendingTabChange && pendingImageDesignViewSubviewSelection) { + imageDesignViewSelectedSubview(pendingImageDesignViewSubviewSelection); + pendingImageDesignViewSubviewSelection = undefined; + } else { + imageDesignViewSelectedSubview(view); + } + }; + + this.getImageDesignViewSelectedSubviewObservable = () => { + return imageDesignViewSelectedSubview; + }; + + this.setPendingImageDesignViewSubviewSelection = (view) => { + pendingImageDesignViewSubviewSelection = view; + }; + + this.gotoImageDesignPrimaryImageScreen = () => { + this.setPendingImageDesignViewSubviewSelection('primaryImage'); + this.gotoMainPage('image-page'); + }; + + this.gotoImageDesignAuxiliaryImageScreen = () => { + this.setPendingImageDesignViewSubviewSelection('auxiliaryImage'); + this.gotoMainPage('image-page'); + }; } return new ScreenUtils(); diff --git a/webui/src/js/viewModels/app-main.js b/webui/src/js/viewModels/app-main.js index 2ffb94aef..f5e077cc4 100644 --- a/webui/src/js/viewModels/app-main.js +++ b/webui/src/js/viewModels/app-main.js @@ -6,15 +6,14 @@ 'use strict'; define(['accUtils', 'knockout', 'utils/i18n', 'models/wkt-project', 'models/wkt-console', 'utils/dialog-helper', - 'utils/view-helper', 'ojs/ojarraydataprovider', 'ojs/ojarraytreedataprovider', 'ojs/ojcorerouter', + 'utils/view-helper', 'utils/screen-utils', 'ojs/ojarraydataprovider', 'ojs/ojarraytreedataprovider', 'ojs/ojcorerouter', 'ojs/ojmodule-element-utils', 'ojs/ojmodulerouter-adapter', 'ojs/ojknockoutrouteradapter', 'ojs/ojurlparamadapter', 'ojs/ojoffcanvas', 'ojs/ojknockouttemplateutils', 'ojs/ojresponsiveutils', 'ojs/ojresponsiveknockoututils', - 'utils/wkt-logger', - 'ojs/ojknockout', 'ojs/ojinputtext', 'ojs/ojlabel', 'ojs/ojbutton', 'ojs/ojdialog', 'ojs/ojformlayout', - 'ojs/ojselectsingle', 'ojs/ojvalidationgroup', 'ojs/ojcollapsible'], -function(accUtils, ko, i18n, project, wktConsole, dialogHelper, viewHelper, ArrayDataProvider, ArrayTreeDataProvider, - CoreRouter, ModuleElementUtils, ModuleRouterAdapter, KnockoutRouterAdapter, UrlParamAdapter, OffCanvasUtils, - KnockoutTemplateUtils, ResponsiveUtils, ResponsiveKnockoutUtils, wktLogger) { + 'utils/wkt-logger', 'ojs/ojknockout', 'ojs/ojinputtext', 'ojs/ojlabel', 'ojs/ojbutton', 'ojs/ojdialog', + 'ojs/ojformlayout', 'ojs/ojselectsingle', 'ojs/ojvalidationgroup', 'ojs/ojcollapsible'], +function(accUtils, ko, i18n, project, wktConsole, dialogHelper, viewHelper, screenUtils, ArrayDataProvider, + ArrayTreeDataProvider, CoreRouter, ModuleElementUtils, ModuleRouterAdapter, KnockoutRouterAdapter, UrlParamAdapter, + OffCanvasUtils, KnockoutTemplateUtils, ResponsiveUtils, ResponsiveKnockoutUtils, wktLogger) { function AppMainModel() { @@ -81,10 +80,11 @@ function(accUtils, ko, i18n, project, wktConsole, dialogHelper, viewHelper, Arra ]; // Router setup - let router = new CoreRouter(routeData, { + screenUtils.createMainNavigationRouter(routeData, { urlAdapter: new UrlParamAdapter(), history: 'skip' }); + const router = screenUtils.getMainNavigationRouter(); router.sync(); this.moduleAdapter = new ModuleRouterAdapter(router); diff --git a/webui/src/js/viewModels/domain-design-view.js b/webui/src/js/viewModels/domain-design-view.js index a6ca6a665..c457f3491 100644 --- a/webui/src/js/viewModels/domain-design-view.js +++ b/webui/src/js/viewModels/domain-design-view.js @@ -3,16 +3,56 @@ * Copyright (c) 2021, 2022, Oracle and/or its affiliates. * Licensed under The Universal Permissive License (UPL), Version 1.0 as shown at https://oss.oracle.com/licenses/upl/ */ -define(['models/wkt-project', 'accUtils', 'utils/common-utilities', 'knockout', 'utils/i18n', +define(['models/wkt-project', 'accUtils', 'utils/common-utilities', 'knockout', 'utils/i18n', 'utils/screen-utils', 'ojs/ojbufferingdataprovider', 'ojs/ojarraydataprovider', 'ojs/ojconverter-number', 'utils/dialog-helper', - 'utils/view-helper', 'utils/wkt-logger', 'ojs/ojmessaging', 'ojs/ojinputtext', 'ojs/ojlabel', 'ojs/ojbutton', 'ojs/ojformlayout', - 'ojs/ojcollapsible', 'ojs/ojselectsingle', 'ojs/ojlistview', 'ojs/ojtable', 'ojs/ojswitch', 'ojs/ojinputnumber'], -function (project, accUtils, utils, ko, i18n, BufferingDataProvider, - ArrayDataProvider, ojConverterNumber, dialogHelper, viewHelper) { + 'utils/view-helper', 'utils/wkt-logger', 'ojs/ojmessaging', 'ojs/ojinputtext', 'ojs/ojlabel', 'ojs/ojbutton', + 'ojs/ojformlayout', 'ojs/ojcollapsible', 'ojs/ojselectsingle', 'ojs/ojlistview', 'ojs/ojtable', 'ojs/ojswitch', + 'ojs/ojinputnumber', 'ojs/ojradioset'], +function (project, accUtils, utils, ko, i18n, screenUtils, BufferingDataProvider, ArrayDataProvider, + ojConverterNumber, dialogHelper, viewHelper) { function DomainDesignViewModel() { - this.connected = async () => { + let subscriptions = []; + + this.connected = () => { accUtils.announce('Domain Design View page loaded.', 'assertive'); + + subscriptions.push(this.auxImageConfig.subscribe((newValue) => { + this.applyAuxImageConfig(newValue); + })); + + subscriptions.push(project.image.createPrimaryImage.observable.subscribe(() => { + document.getElementById('create-image-switch').refresh(); + const primaryImageTag = document.getElementById('primary-image-tag'); + if (primaryImageTag) { + primaryImageTag.refresh(); + } + })); + + subscriptions.push(project.image.useAuxImage.observable.subscribe(() => { + this.auxImageConfig(this.computeAuxImageConfig()); + // change the primary image tag's help text based on the value of the switch? + const primaryImageTag = document.getElementById('primary-image-tag'); + if (primaryImageTag) { + primaryImageTag.refresh(); + } + })); + + subscriptions.push(project.image.createAuxImage.observable.subscribe(() => { + this.auxImageConfig(this.computeAuxImageConfig()); + const auxImageTag = document.getElementById('aux-image-tag'); + if (auxImageTag) { + viewHelper.componentReady(auxImageTag).then(() => { + auxImageTag.refresh(); + }); + } + })); + }; + + this.disconnected = () => { + subscriptions.forEach((subscription) => { + subscription.dispose(); + }); }; this.labelMapper = (labelId, payload) => { @@ -22,9 +62,135 @@ function (project, accUtils, utils, ko, i18n, BufferingDataProvider, return i18n.t(`domain-design-${labelId}`, payload); }; + this.imageLabelMapper = (labelId, payload) => { + return i18n.t(`image-design-${labelId}`, payload); + }; + this.project = project; this.i18n = i18n; + this.mainCreateImageSwitchHelp = ko.computed(() => { + if (this.project.image.useAuxImage.value) { + return this.imageLabelMapper('create-image-aux-help'); + } else { + return this.imageLabelMapper('create-image-help'); + } + }, this); + + this.mainImageTagHelpMII = () => { + let key = 'image-tag-mii-use-help'; + if (this.project.image.createPrimaryImage.value) { + key = 'image-tag-mii-create-help'; + if (this.project.image.useAuxImage.value) { + key = 'image-tag-mii-create-with-aux-help'; + } + } else if (this.project.image.useAuxImage.value) { + key = 'image-tag-mii-use-with-aux-help'; + } + return key; + }; + + this.mainImageTagHelpDII = () => { + let key = 'image-tag-dii-use-help'; + if (this.project.image.createPrimaryImage.value) { + key = 'image-tag-dii-create-help'; + } + return key; + }; + + this.mainImageTagHelpPV = () => { + let key = 'image-tag-pv-use-help'; + if (this.project.image.createPrimaryImage.value) { + key = 'image-tag-pv-create-help'; + } + return key; + }; + + this.mainImageTagHelp = ko.computed(() => { + let key = 'use-image-tag-help'; + + switch (this.project.settings.targetDomainLocation.value) { + case 'mii': + key = this.mainImageTagHelpMII(); + break; + + case 'dii': + key = this.mainImageTagHelpDII(); + break; + + case 'pv': + key = this.mainImageTagHelpPV(); + break; + } + return this.labelMapper(key); + }, this); + + this.isPrimaryImageTagReadOnly = ko.computed(() => { + return this.project.image.createPrimaryImage.observable(); + }, this); + + this.isAuxImageTagReadOnly = ko.computed(() => { + return this.project.image.createAuxImage.observable(); + }, this); + + this.auxImageTagHelp = ko.computed(() => { + let key = 'use-aux-image-tag-help'; + if (this.project.image.createAuxImage.observable()) { + key = 'create-aux-image-tag-help'; + } + return this.labelMapper(key); + }); + + this.targetDomainLocationIsMII = () => { + return this.project.settings.targetDomainLocation.value === 'mii'; + }; + + this.gotoCreateImage = () => { + screenUtils.gotoImageDesignPrimaryImageScreen(); + }; + + this.gotoCreateAuxImage = () => { + screenUtils.gotoImageDesignAuxiliaryImageScreen(); + }; + + this.auxImageConfigData = [ + { id: 'offOption', value: 'off', label: this.imageLabelMapper('aux-image-config-off-label')}, + { id: 'useOption', value: 'use', label: this.imageLabelMapper('aux-image-config-use-label')}, + { id: 'createOption', value: 'create', label: this.imageLabelMapper('aux-image-config-create-label')} + ]; + + this.applyAuxImageConfig = (newValue) => { + switch (newValue) { + case 'off': + project.image.useAuxImage.observable(false); + break; + + case 'use': + project.image.useAuxImage.observable(true); + project.image.createAuxImage.observable(false); + break; + + case 'create': + project.image.useAuxImage.observable(true); + project.image.createAuxImage.observable(true); + break; + } + }; + + this.computeAuxImageConfig = () => { + let value = 'off'; + if (this.project.image.useAuxImage.value) { + value = 'use'; + if (this.project.image.createAuxImage.value) { + value = 'create'; + } + } + return value; + }; + + this.auxImageConfigDP = new ArrayDataProvider(this.auxImageConfigData, { keyAttributes: 'id' }); + this.auxImageConfig = ko.observable(this.computeAuxImageConfig()); + this.integerConverter = new ojConverterNumber.IntlNumberConverter({ style: 'decimal', roundingMode: 'HALF_DOWN', diff --git a/webui/src/js/viewModels/image-design-view-impl.js b/webui/src/js/viewModels/image-design-view-impl.js index 5150f0d0c..a2e787415 100644 --- a/webui/src/js/viewModels/image-design-view-impl.js +++ b/webui/src/js/viewModels/image-design-view-impl.js @@ -3,27 +3,44 @@ * Copyright (c) 2021, Oracle and/or its affiliates. * Licensed under The Universal Permissive License (UPL), Version 1.0 as shown at https://oss.oracle.com/licenses/upl/ */ -define(['utils/wkt-logger'], - function (wktLogger) { +define(['utils/wkt-logger', 'utils/screen-utils'], + function (wktLogger, screenUtils) { function ImageDesignViewModel(i18n, project, accUtils, ko, dialogHelper, ArrayDataProvider, wktImageInspector) { let subscriptions = []; - this.connected = async () => { + this.connected = () => { accUtils.announce('Image Design View page loaded.', 'assertive'); + subscriptions.push(this.auxImageConfig.subscribe((newValue) => { + this.applyAuxImageConfig(newValue); + document.getElementById('designtabs').refresh(); + })); + subscriptions.push(project.image.createPrimaryImage.observable.subscribe(() => { document.getElementById('create-image-switch').refresh(); - document.getElementById('primary-image-tag').refresh(); + const primaryImageTag = document.getElementById('primary-image-tag'); + if (primaryImageTag) { + primaryImageTag.refresh(); + } })); subscriptions.push(project.image.useAuxImage.observable.subscribe(() => { + this.auxImageConfig(this.computeAuxImageConfig()); document.getElementById('designtabs').refresh(); - document.getElementById('primary-image-tag').refresh(); + // change the primary image tag's help text based on the value of the switch? + const primaryImageTag = document.getElementById('primary-image-tag'); + if (primaryImageTag) { + primaryImageTag.refresh(); + } })); subscriptions.push(project.image.createAuxImage.observable.subscribe(() => { - document.getElementById('aux-image-tag').refresh(); + this.auxImageConfig(this.computeAuxImageConfig()); + const auxImageTag = document.getElementById('aux-image-tag'); + if (auxImageTag) { + auxImageTag.refresh(); + } })); }; @@ -59,7 +76,7 @@ define(['utils/wkt-logger'], }; this.disableAuxImage = ko.computed(() => { - return !(this.targetDomainLocationIsMII() && this.project.image.useAuxImage.value); + return !(this.targetDomainLocationIsMII() && this.project.image.useAuxImage.value && this.project.image.createAuxImage.value); }, this); this.mainCreateImageSwitchHelp = ko.computed(() => { @@ -118,31 +135,61 @@ define(['utils/wkt-logger'], return this.labelMapper(key); }, this); - this.auxImageTagHelp = ko.computed(() => { - if (this.project.image.createAuxImage.value) { - return this.labelMapper('aux-image-tag-create-help'); - } else { - return this.labelMapper('aux-image-tag-use-help'); + this.auxImageConfigData = [ + { id: 'offOption', value: 'off', label: this.labelMapper('aux-image-config-off-label')}, + { id: 'useOption', value: 'use', label: this.labelMapper('aux-image-config-use-label')}, + { id: 'createOption', value: 'create', label: this.labelMapper('aux-image-config-create-label')} + ]; + + this.applyAuxImageConfig = (newValue) => { + switch (newValue) { + case 'off': + project.image.useAuxImage.observable(false); + break; + + case 'use': + project.image.useAuxImage.observable(true); + project.image.createAuxImage.observable(false); + break; + + case 'create': + project.image.useAuxImage.observable(true); + project.image.createAuxImage.observable(true); + break; } - }, this); + }; + + this.computeAuxImageConfig = () => { + let value = 'off'; + if (this.project.image.useAuxImage.value) { + value = 'use'; + if (this.project.image.createAuxImage.value) { + value = 'create'; + } + } + return value; + }; + + this.auxImageConfigDP = new ArrayDataProvider(this.auxImageConfigData, { keyAttributes: 'id' }); + this.auxImageConfig = ko.observable(this.computeAuxImageConfig()); this.subviews = [ - {id: 'fmwImage', name: this.labelMapper('image-tab')}, - {id: 'auxImage', name: this.labelMapper('aux-image-tab'), disabled: this.disableAuxImage} + {id: 'primaryImage', name: this.labelMapper('image-tab')}, + {id: 'auxiliaryImage', name: this.labelMapper('aux-image-tab'), disabled: this.disableAuxImage} ]; this.subviewsDP = new ArrayDataProvider(this.subviews, {keyAttributes: 'id'}); - this.selectedSubview = ko.observable('fmwImage'); + screenUtils.setImageDesignViewSelectedSubview('primaryImage', true); + this.selectedSubview = screenUtils.getImageDesignViewSelectedSubviewObservable(); this.selectedSubviewValueChangedHandler = (event) => { - wktLogger.debug('selectedSubviewValueChangedHandler() called for %s', event.detail.value); - this.selectedSubview(event.detail.value); + screenUtils.setImageDesignViewSelectedSubview(event.detail.value); }; this.mainImagePageTitle = ko.computed(() => { - if (this.disableAuxImage()) { - return this.labelMapper('title'); - } else { + if (this.targetDomainLocationIsMII() && this.project.image.useAuxImage.value || this.targetDomainLocationIsPV()) { return this.labelMapper('fmw-title'); + } else { + return this.labelMapper('title'); } }, this); diff --git a/webui/src/js/views/domain-design-view.html b/webui/src/js/views/domain-design-view.html index 14da349db..c177f0fb0 100644 --- a/webui/src/js/views/domain-design-view.html +++ b/webui/src/js/views/domain-design-view.html @@ -96,11 +96,30 @@
- + + + + + + + + + + + + + readonly="[[isPrimaryImageTagReadOnly]]" + help.instruction="[[mainImageTagHelp]]"> + + + + + +
+ + + + + + + + + + - + readonly="[[isAuxImageTagReadOnly]]" + help.instruction="[[auxImageTagHelp]]"> -
+
@@ -28,27 +28,31 @@
- - + + - - - - - - + + + + + + + + + @@ -361,22 +365,15 @@
+
- - - - - + help.instruction="[[labelMapper('aux-image-tag-create-help')]]"> - - - - + + + + +
- - + + value="{{project.image.auxImageRegistryPushUser.observable}}" + help.instruction="[[labelMapper('aux-image-registry-push-username-help')]]"> - - + + value="{{project.image.auxImageRegistryPushPassword.observable}}" + help.instruction="[[labelMapper('aux-image-registry-push-password-help')]]">
+
+ +
+
+ + + +
+ + + + + + +
+
- + - +
- - + + value="{{project.image.auxDefaultBaseImagePullUsername.observable}}" + help.instruction="[[labelMapper('aux-default-base-image-pull-username-help')]]"> - - + + value="{{project.image.auxDefaultBaseImagePullPassword.observable}}" + help.instruction="[[labelMapper('aux-default-base-image-pull-password-help')]]">
-
- -
-
+ - +
- - - - - - -
- - - - -
- + - + +
+ + + + + + + + + + + + + + + +
+ + +
+
+
+ + + + + +
-
+
- + - - - - - - - - - - - -
- - -
-
-
- - - - - - -
- -
-
- - - - - - - - - - - - - - + + + + + + + + + + - - - -
- - - - - - - - - - - - - - -
-
-
-
-
+ + + +
+ + + + + + + + + + + + + + +
+
+
+