Skip to content

Commit c48bc52

Browse files
making changes to improve the usability of the image page (#99)
* making changes to improve the usability of the image page * Wait for aux image tag to initialize before refreshing * Listen for aux image changes for open/close project Co-authored-by: Richard Killen <richard.killen@oracle.com>
1 parent 0bacd07 commit c48bc52

File tree

7 files changed

+543
-237
lines changed

7 files changed

+543
-237
lines changed

electron/app/locales/en/webui.json

Lines changed: 24 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -231,6 +231,11 @@
231231
"image-design-create-image-help": "Whether you want to create a new primary image or use an existing image.",
232232
"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.",
233233

234+
"image-design-aux-image-settings-label": "Auxiliary Image Configuration",
235+
"image-design-aux-image-config-off-label": "Do not use an auxiliary image",
236+
"image-design-aux-image-config-use-label": "Use an existing auxiliary image",
237+
"image-design-aux-image-config-create-label": "Create a new auxiliary image",
238+
234239
"image-design-image-tag-label": "Image Tag",
235240
"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.",
236241
"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 @@
265270
"image-design-custom-base-image-inspect-label": "Inspect Custom Base Image",
266271
"image-design-custom-base-image-inspect-busy-title": "Inspecting Image...Please Wait",
267272

268-
"image-design-use-aux-image-label": "Use Auxiliary Image",
269-
"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.",
270-
"image-design-create-aux-image-label": "Create New Auxiliary Image Containing WebLogic Deploy Tooling Model",
271-
"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.",
272273
"image-design-aux-image-tag-label": "Auxiliary Image Tag",
273274
"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.",
274275
"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 @@
491492
"domain-design-pv-volume-log-home-help": "The path to use to write the WebLogic Server log files.",
492493

493494
"domain-design-image-title": "Primary Image to Use for the Domain",
495+
"domain-design-hints-goto-create-image": "Go To Create Primary Image Page",
496+
"domain-design-goto-create-image-button-label": "Go To Create Primary Image Page",
494497
"domain-design-image-tag-label": "Primary Image Tag",
495-
"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.",
498+
499+
"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.",
500+
"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.",
501+
"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.",
502+
"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.",
503+
"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.",
504+
"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.",
505+
"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.",
506+
"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.",
496507
"domain-design-image-registry-address-label": "Image Registry Address",
497508
"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.",
498509
"domain-design-image-pull-policy-label": "Primary Image Pull Policy",
@@ -511,8 +522,11 @@
511522
"domain-design-image-registry-pull-email-help": "The image registry user's email address used to create the Kubernetes image pull secret.",
512523

513524
"domain-design-aux-image-title": "Auxiliary Image to Use for the Domain",
525+
"domain-design-hints-goto-create-aux-image": "Go To Create Auxiliary Image Page",
526+
"domain-design-goto-create-aux-image-button-label": "Go To Create Auxiliary Image Page",
514527
"domain-design-aux-image-tag-label": "Auxiliary Image Tag",
515-
"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.",
528+
"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.",
529+
"domain-design-use-aux-image-tag-help": "The tag of the auxiliary image to use for the domain.",
516530
"domain-design-aux-image-registry-address-label": "Image Registry Address",
517531
"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.",
518532
"domain-design-aux-image-pull-policy-label": "Auxiliary Image Pull Policy",
@@ -949,8 +963,8 @@
949963
"wit-creator-builder-login-in-progress": "Performing {{builderName}} log in to allow pulling the base image {{imageTag}}",
950964

951965
"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.",
952-
"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.",
953-
"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.",
966+
"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.",
967+
"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.",
954968
"wit-aux-creator-aborted-error-title": "Create Auxiliary Image Aborted",
955969
"wit-aux-creator-invalid-java-home-error-prefix": "Unable to create auxiliary image due to the Java Home being invalid",
956970
"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 @@
9941008
"image-pusher-create-failed-error-message":"Unable to push image {{imageTag}}: {{error}}.",
9951009

9961010
"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.",
997-
"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.",
998-
"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.",
1011+
"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.",
1012+
"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.",
9991013
"aux-image-pusher-push-aborted-title": "Push Image Aborted",
10001014
"aux-image-pusher-push-in-progress": "Pushing auxiliary image {{imageTag}}",
10011015
"aux-image-pusher-image-builder-invalid-error-message": "The image builder executable {{fileName}} is not valid: {{error}}.",

webui/src/js/utils/screen-utils.js

Lines changed: 44 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,13 @@
55
*/
66
'use strict';
77

8-
define([],
9-
function() {
8+
define(['knockout', 'ojs/ojcorerouter'],
9+
function(ko, CoreRouter) {
1010
function ScreenUtils() {
1111
const thisUtil = this;
12+
const imageDesignViewSelectedSubview = ko.observable();
13+
let pendingImageDesignViewSubviewSelection;
14+
let mainNavigationRouter;
1215

1316
this.sliderPositions = {};
1417

@@ -100,6 +103,45 @@ define([],
100103
}
101104
}).observe(parentElement);
102105
};
106+
107+
this.createMainNavigationRouter = (routeData, routeOptions) => {
108+
mainNavigationRouter = new CoreRouter(routeData, routeOptions);
109+
};
110+
111+
this.getMainNavigationRouter = () => {
112+
return mainNavigationRouter;
113+
};
114+
115+
this.gotoMainPage = (path) => {
116+
mainNavigationRouter.go({ path: path });
117+
};
118+
119+
this.setImageDesignViewSelectedSubview = (view, honorPendingTabChange = false) => {
120+
if (honorPendingTabChange && pendingImageDesignViewSubviewSelection) {
121+
imageDesignViewSelectedSubview(pendingImageDesignViewSubviewSelection);
122+
pendingImageDesignViewSubviewSelection = undefined;
123+
} else {
124+
imageDesignViewSelectedSubview(view);
125+
}
126+
};
127+
128+
this.getImageDesignViewSelectedSubviewObservable = () => {
129+
return imageDesignViewSelectedSubview;
130+
};
131+
132+
this.setPendingImageDesignViewSubviewSelection = (view) => {
133+
pendingImageDesignViewSubviewSelection = view;
134+
};
135+
136+
this.gotoImageDesignPrimaryImageScreen = () => {
137+
this.setPendingImageDesignViewSubviewSelection('primaryImage');
138+
this.gotoMainPage('image-page');
139+
};
140+
141+
this.gotoImageDesignAuxiliaryImageScreen = () => {
142+
this.setPendingImageDesignViewSubviewSelection('auxiliaryImage');
143+
this.gotoMainPage('image-page');
144+
};
103145
}
104146

105147
return new ScreenUtils();

webui/src/js/viewModels/app-main.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,14 @@
66
'use strict';
77

88
define(['accUtils', 'knockout', 'utils/i18n', 'models/wkt-project', 'models/wkt-console', 'utils/dialog-helper',
9-
'utils/view-helper', 'ojs/ojarraydataprovider', 'ojs/ojarraytreedataprovider', 'ojs/ojcorerouter',
9+
'utils/view-helper', 'utils/screen-utils', 'ojs/ojarraydataprovider', 'ojs/ojarraytreedataprovider', 'ojs/ojcorerouter',
1010
'ojs/ojmodule-element-utils', 'ojs/ojmodulerouter-adapter', 'ojs/ojknockoutrouteradapter', 'ojs/ojurlparamadapter',
1111
'ojs/ojoffcanvas', 'ojs/ojknockouttemplateutils', 'ojs/ojresponsiveutils', 'ojs/ojresponsiveknockoututils',
12-
'utils/wkt-logger',
13-
'ojs/ojknockout', 'ojs/ojinputtext', 'ojs/ojlabel', 'ojs/ojbutton', 'ojs/ojdialog', 'ojs/ojformlayout',
14-
'ojs/ojselectsingle', 'ojs/ojvalidationgroup', 'ojs/ojcollapsible'],
15-
function(accUtils, ko, i18n, project, wktConsole, dialogHelper, viewHelper, ArrayDataProvider, ArrayTreeDataProvider,
16-
CoreRouter, ModuleElementUtils, ModuleRouterAdapter, KnockoutRouterAdapter, UrlParamAdapter, OffCanvasUtils,
17-
KnockoutTemplateUtils, ResponsiveUtils, ResponsiveKnockoutUtils, wktLogger) {
12+
'utils/wkt-logger', 'ojs/ojknockout', 'ojs/ojinputtext', 'ojs/ojlabel', 'ojs/ojbutton', 'ojs/ojdialog',
13+
'ojs/ojformlayout', 'ojs/ojselectsingle', 'ojs/ojvalidationgroup', 'ojs/ojcollapsible'],
14+
function(accUtils, ko, i18n, project, wktConsole, dialogHelper, viewHelper, screenUtils, ArrayDataProvider,
15+
ArrayTreeDataProvider, CoreRouter, ModuleElementUtils, ModuleRouterAdapter, KnockoutRouterAdapter, UrlParamAdapter,
16+
OffCanvasUtils, KnockoutTemplateUtils, ResponsiveUtils, ResponsiveKnockoutUtils, wktLogger) {
1817

1918
function AppMainModel() {
2019

@@ -81,10 +80,11 @@ function(accUtils, ko, i18n, project, wktConsole, dialogHelper, viewHelper, Arra
8180
];
8281

8382
// Router setup
84-
let router = new CoreRouter(routeData, {
83+
screenUtils.createMainNavigationRouter(routeData, {
8584
urlAdapter: new UrlParamAdapter(),
8685
history: 'skip'
8786
});
87+
const router = screenUtils.getMainNavigationRouter();
8888
router.sync();
8989

9090
this.moduleAdapter = new ModuleRouterAdapter(router);

0 commit comments

Comments
 (0)