Skip to content

Commit c435311

Browse files
committed
Merge branch 'qa-bug-fixes' into 'main'
domain on pv related fixes See merge request weblogic-cloud/weblogic-toolkit-ui!256
2 parents f23c854 + 7f3957d commit c435311

File tree

8 files changed

+46
-18
lines changed

8 files changed

+46
-18
lines changed

electron/app/js/kubectlUtils.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1143,7 +1143,7 @@ function isNotFoundError(err) {
11431143
}
11441144

11451145
function _getOperatorVersionFromLogs(operatorLogs, results) {
1146-
const versionRegex = /^Oracle WebLogic Kubernetes Operator, version:\s*(\d+\.\d+\.\d+),.*$/;
1146+
const versionRegex = /^Oracle WebLogic Kubernetes Operator, version:\s*(\d+\.\d+\.\d+).*$/;
11471147
if (Array.isArray(operatorLogs) && operatorLogs.length > 0) {
11481148
for (const logEntry of operatorLogs) {
11491149
const parsedEntry = _parseLogEntryAsJson(logEntry);

electron/app/locales/en/webui.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -618,6 +618,13 @@
618618
"domain-design-image-registry-pull-email-label": "Image Registry Pull Email Address",
619619
"domain-design-image-registry-pull-email-help": "The image registry user's email address used to create the Kubernetes image pull secret.",
620620

621+
"domain-design-aux-image-config-off-label": "Do not use an auxiliary image",
622+
"domain-design-aux-image-config-use-label": "Use an existing auxiliary image created outside of this project",
623+
"domain-design-aux-image-config-create-label": "Use newly created auxiliary image created by this project",
624+
"domain-design-domain-creation-image-config-off-label": "Do not use a domain creation image",
625+
"domain-design-domain-creation-image-config-use-label": "Use an existing domain creation image created outside of this project",
626+
"domain-design-domain-creation-image-config-create-label": "Use newly created domain creation image created by this project",
627+
621628
"domain-design-aux-image-title": "Auxiliary Image to Use for the Domain",
622629
"domain-design-hints-goto-create-aux-image": "Go To Create Auxiliary Image Page",
623630
"domain-design-goto-create-aux-image-button-label": "Go To Create Auxiliary Image Page",

tools/wdt-config/targets/vz-pv/target.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
"validation_method" : "lax",
99
"results_output_method" : "json",
1010
"exclude_domain_bin_contents": true,
11+
"credentials_method" : "secrets",
1112
"wls_credentials_name" : "__weblogic-credentials__",
1213
"additional_output" : "vz-application.yaml",
1314
"use_persistent_volume" : true

tools/wdt-config/targets/wko-pv/target.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
"validation_method" : "wktui",
99
"results_output_method" : "json",
1010
"exclude_domain_bin_contents": true,
11+
"credentials_method" : "secrets",
1112
"wls_credentials_name" : "__weblogic-credentials__",
1213
"additional_output" : "wko-domain.yaml",
1314
"use_persistent_volume" : true

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

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,13 @@ function (project, accUtils, utils, ko, i18n, screenUtils, BufferingDataProvider
7878
return i18n.t(`domain-design-${labelId}`, payload);
7979
};
8080

81+
this.smartLabelMapper = (labelId, payload) => {
82+
if (this.isDomainOnPV()) {
83+
return i18n.t(`domain-design-${labelId.replace(/^aux-/, 'domain-creation-')}`, payload);
84+
}
85+
return i18n.t(`domain-design-${labelId}`, payload);
86+
};
87+
8188
this.imageLabelMapper = (labelId, payload) => {
8289
if (this.isDomainOnPV()) {
8390
return i18n.t(`image-design-${labelId.replace(/^aux-/, 'domain-creation-')}`, payload);
@@ -225,9 +232,9 @@ function (project, accUtils, utils, ko, i18n, screenUtils, BufferingDataProvider
225232
};
226233

227234
this.auxImageConfigData = [
228-
{ id: 'offOption', value: 'off', label: this.imageLabelMapper('aux-image-config-off-label')},
229-
{ id: 'useOption', value: 'use', label: this.imageLabelMapper('aux-image-config-use-label')},
230-
{ id: 'createOption', value: 'create', label: this.imageLabelMapper('aux-image-config-create-label')}
235+
{ id: 'offOption', value: 'off', label: this.smartLabelMapper('aux-image-config-off-label')},
236+
{ id: 'useOption', value: 'use', label: this.smartLabelMapper('aux-image-config-use-label')},
237+
{ id: 'createOption', value: 'create', label: this.smartLabelMapper('aux-image-config-create-label')}
231238
];
232239

233240
this.applyAuxImageConfig = (newValue) => {

webui/src/js/viewModels/domain-page.js

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,12 @@
55
*/
66
define(['accUtils', 'knockout', 'ojs/ojcorerouter', 'ojs/ojmodulerouter-adapter', 'ojs/ojarraydataprovider',
77
'utils/k8s-domain-deployer', 'utils/k8s-domain-status-checker', 'utils/k8s-domain-undeployer', 'utils/i18n',
8-
'utils/wdt-preparer', 'ojs/ojarraytreedataprovider', 'models/wkt-project', 'ojs/ojtreeview'],
8+
'utils/wdt-preparer', 'utils/aux-image-helper', 'models/wkt-project', 'ojs/ojarraytreedataprovider', 'ojs/ojtreeview'
9+
],
910
function(accUtils, ko, CoreRouter, ModuleRouterAdapter, ArrayDataProvider, k8sDomainDeployer,
10-
k8sDomainStatusChecker, k8sDomainUndeployer, i18n, wdtPreparer) {
11+
k8sDomainStatusChecker, k8sDomainUndeployer, i18n, wdtPreparer, auxImageHelper, project) {
1112
function DomainViewModel(args) {
13+
this.project = project;
1214

1315
this.connected = () => {
1416
accUtils.announce('WebLogic Domain page loaded.', 'assertive');
@@ -26,6 +28,13 @@ function(accUtils, ko, CoreRouter, ModuleRouterAdapter, ArrayDataProvider, k8sDo
2628
this.disableGetDomainStatus = ko.observable(false);
2729
this.disableUndeployDomain = ko.observable(false);
2830

31+
this.showPrepareModel = ko.computed(() => {
32+
if (this.project.settings.targetDomainLocation.observable() === 'pv') {
33+
return auxImageHelper.supportsDomainCreationImages() && this.project.image.useAuxImage.observable();
34+
}
35+
return true;
36+
});
37+
2938
this.prepareModel = () => {
3039
wdtPreparer.startPrepareModel().then();
3140
};

webui/src/js/viewModels/project-settings-page.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@
77

88
define(['accUtils', 'knockout', 'utils/i18n', 'models/wkt-project', 'ojs/ojarraydataprovider',
99
'ojs/ojbufferingdataprovider', 'utils/common-utilities', 'utils/dialog-helper', 'utils/view-helper',
10-
'utils/wkt-logger', 'utils/url-catalog', 'ojs/ojinputtext', 'ojs/ojlabel', 'ojs/ojbutton', 'ojs/ojformlayout',
11-
'ojs/ojradioset', 'ojs/ojswitch', 'ojs/ojselectsingle', 'ojs/ojtable' ],
10+
'utils/aux-image-helper', 'utils/wkt-logger', 'utils/url-catalog', 'ojs/ojinputtext', 'ojs/ojlabel', 'ojs/ojbutton',
11+
'ojs/ojformlayout', 'ojs/ojradioset', 'ojs/ojswitch', 'ojs/ojselectsingle', 'ojs/ojtable' ],
1212
function(accUtils, ko, i18n, project, ArrayDataProvider,
13-
BufferingDataProvider, utils, dialogHelper, viewHelper) {
13+
BufferingDataProvider, utils, dialogHelper, viewHelper, auxImageHelper) {
1414

1515
function ProjectSettingsViewModel() {
1616

@@ -185,7 +185,8 @@ function(accUtils, ko, i18n, project, ArrayDataProvider,
185185
}, this);
186186

187187
this.requiresOracleHome = () => {
188-
return this.project.settings.targetDomainLocation.value !== 'pv';
188+
return this.project.settings.targetDomainLocation.value !== 'pv' ||
189+
auxImageHelper.supportsDomainCreationImages();
189190
};
190191

191192
this.chooseJavaHome = () => {

webui/src/js/views/domain-page.html

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,16 @@
1515
</li>
1616
</template>
1717
</oj-tab-bar>
18-
<oj-button id="prepareModelButton"
19-
chroming="callToAction"
20-
on-oj-action="[[prepareModel]]"
21-
:title="[[anyLabelMapper('model-page-hints-prepareModel')]]">
22-
<span>
23-
<oj-bind-text value="[[anyLabelMapper('model-page-button-prepareModel')]]"></oj-bind-text>
24-
</span>
25-
</oj-button>
18+
<oj-bind-if test="[[showPrepareModel]]">
19+
<oj-button id="prepareModelButton"
20+
chroming="callToAction"
21+
on-oj-action="[[prepareModel]]"
22+
:title="[[anyLabelMapper('model-page-hints-prepareModel')]]">
23+
<span>
24+
<oj-bind-text value="[[anyLabelMapper('model-page-button-prepareModel')]]"></oj-bind-text>
25+
</span>
26+
</oj-button>
27+
</oj-bind-if>
2628
<oj-button id="deployDomainButton"
2729
disabled="[[disableDeployDomain]]"
2830
chroming="callToAction"

0 commit comments

Comments
 (0)