Skip to content

Commit 7679481

Browse files
committed
Merge branch 'vz-uptake' into 'main'
making changes to Verrazzano to align with operator changes See merge request weblogic-cloud/weblogic-toolkit-ui!260
2 parents d40cb2b + 5dfbf2f commit 7679481

File tree

4 files changed

+652
-144
lines changed

4 files changed

+652
-144
lines changed

webui/src/js/utils/aux-image-helper.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/**
22
* @license
33
* Copyright (c) 2023, Oracle and/or its affiliates.
4-
* Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl.
4+
* Licensed under the Universal Permissive License v1.0 as shown at https://oss.oracle.com/licenses/upl.
55
*/
66
'use strict';
77

@@ -14,7 +14,7 @@ define(['models/wkt-project', 'utils/wkt-logger'],
1414
if (project.settings.wdtTargetType.value === 'wko') {
1515
return this.wkoVersion41OrHigher();
1616
} else {
17-
return this.v8oVersion162OrHigher();
17+
return this.v8oVersion161OrHigher();
1818
}
1919
}
2020
return false;
@@ -30,10 +30,10 @@ define(['models/wkt-project', 'utils/wkt-logger'],
3030
return result;
3131
};
3232

33-
this.v8oVersion162OrHigher = () => {
33+
this.v8oVersion161OrHigher = () => {
3434
let result = true;
3535
if (project.vzInstall.actualInstalledVersion.hasValue() &&
36-
window.api.utils.compareVersions(project.vzInstall.actualInstalledVersion.value, '1.6.2') < 0) {
36+
window.api.utils.compareVersions(project.vzInstall.actualInstalledVersion.value, '1.6.1') < 0) {
3737
result = false;
3838
}
3939
return result;

webui/src/js/viewModels/domain-design-view.js

Lines changed: 13 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,10 @@ function (project, accUtils, utils, ko, i18n, screenUtils, BufferingDataProvider
5959
this.project = project;
6060
this.i18n = i18n;
6161

62+
this.getWkoInstalledVersion = () => {
63+
wkoInstalledVersionChecker.startOperatorInstallVersionCheck().then();
64+
};
65+
6266
this.projectHasModel = () => {
6367
return auxImageHelper.projectHasModel();
6468
};
@@ -86,13 +90,6 @@ function (project, accUtils, utils, ko, i18n, screenUtils, BufferingDataProvider
8690
return i18n.t(`domain-design-${labelId}`, payload);
8791
};
8892

89-
this.smartLabelMapper = (labelId, payload) => {
90-
if (this.isDomainOnPV()) {
91-
return i18n.t(`domain-design-${labelId.replace(/^aux-/, 'domain-creation-')}`, payload);
92-
}
93-
return i18n.t(`domain-design-${labelId}`, payload);
94-
};
95-
9693
this.imageLabelMapper = (labelId, payload) => {
9794
if (this.isDomainOnPV()) {
9895
return i18n.t(`image-design-${labelId.replace(/^aux-/, 'domain-creation-')}`, payload);
@@ -119,10 +116,6 @@ function (project, accUtils, utils, ko, i18n, screenUtils, BufferingDataProvider
119116
return false;
120117
}, this);
121118

122-
this.getWkoInstalledVersion = () => {
123-
wkoInstalledVersionChecker.startOperatorInstallVersionCheck().then();
124-
};
125-
126119
this.mainCreateImageSwitchHelp = ko.computed(() => {
127120
if (this.project.image.useAuxImage.value || this.isDomainOnPV()) {
128121
return this.imageLabelMapper('create-image-aux-help');
@@ -210,11 +203,8 @@ function (project, accUtils, utils, ko, i18n, screenUtils, BufferingDataProvider
210203
});
211204

212205
this.creatingPvc = ko.computed(() => {
213-
if (this.usingDomainCreationImage() && this.project.k8sDomain.createPvc.observable()) {
214-
return true;
215-
}
216-
return false;
217-
});
206+
return !!(this.usingDomainCreationImage() && this.project.k8sDomain.createPvc.observable());
207+
}, this);
218208

219209
this.pvcNameHelpText = ko.computed(() => {
220210
if (this.creatingPvc()) {
@@ -271,7 +261,11 @@ function (project, accUtils, utils, ko, i18n, screenUtils, BufferingDataProvider
271261
this.auxImageConfig = ko.observable(this.computeAuxImageConfig());
272262

273263
this.getAuxImageDecision = ko.computed(() => {
274-
return this.smartLabelMapper(`aux-image-config-${this.auxImageConfig()}-label`);
264+
let imageTag = `aux-image-config-${this.auxImageConfig()}-label`;
265+
if (this.isDomainOnPV()) {
266+
imageTag = imageTag.replace(/^aux-/, 'domain-creation-');
267+
}
268+
return this.labelMapper(imageTag);
275269
});
276270

277271
this.integerConverter = new ojConverterNumber.IntlNumberConverter({
@@ -294,14 +288,14 @@ function (project, accUtils, utils, ko, i18n, screenUtils, BufferingDataProvider
294288
{ key: 'WLS', label: i18n.t('image-design-wls-domain-type-label') },
295289
{ key: 'RestrictedJRF', label: i18n.t('image-design-restricted-jrf-domain-type-label') },
296290
];
297-
});
291+
}, this);
298292

299293
this.wdtDomainTypesDP = ko.computed(() => {
300294
if (this.usingDomainCreationImage()) {
301295
return new ArrayDataProvider(this.wdtDomainTypes(), { keyAttributes: 'value' });
302296
}
303297
return new ArrayDataProvider(this.wdtDomainTypes(), { keyAttributes: 'key' });
304-
});
298+
}, this);
305299

306300
this.showRcuSwitch = ko.computed(() => {
307301
if (this.usingDomainCreationImage()) {

0 commit comments

Comments
 (0)