Skip to content

Commit 3b5cd58

Browse files
committed
Merge branch 'cluster-order' into 'main'
reordering the generated domain resource file to put clusters before the domain See merge request weblogic-cloud/weblogic-toolkit-ui!276
2 parents 09f6910 + c8d0adf commit 3b5cd58

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

electron/app/locales/en/webui.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1498,6 +1498,7 @@
14981498
"k8s-domain-deployer-deploy-failed-error-message":"Unable to deploy WebLogic domain {{domainName}} to Kubernetes namespace {{domainNamespace}}: {{error}}.",
14991499
"k8s-domain-deployer-deploy-catch-all-error-message": "WebLogic domain deployment to Kubernetes failed with an unexpected error: {{error}}",
15001500
"k8s-domain-script-generator-invalid-target-domain-location": "Unknown value for target domain location {{targetDomainLocation}}",
1501+
"k8s-domain-script-generator-clusters-first-comment": "Create the cluster resources before the domain resource that references them.",
15011502

15021503
"k8s-domain-undeployer-aborted-error-title": "Undeploying WebLogic Domain from Kubernetes Aborted",
15031504
"k8s-domain-undeployer-remove-namespace-prompt-title": "Undeploy WebLogic Domain from Kubernetes Scope",

webui/src/js/utils/k8s-domain-v9-resource-generator.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -260,11 +260,15 @@ function(project, K8sDomainConfigMapGenerator, jsYaml, i18n, auxImageHelper) {
260260

261261
let result;
262262
if (generateYaml) {
263-
result = jsYaml.dump(domainResource, {}).split('\n');
263+
result = [];
264264
for (const clusterResource of clusterResources) {
265-
result.push('', '---', '');
265+
if (result.length === 0) {
266+
result.push(`# ${i18n.t('k8s-domain-script-generator-clusters-first-comment')}`, '#');
267+
}
266268
result.push(...jsYaml.dump(clusterResource, {}).split('\n'));
269+
result.push('---', '');
267270
}
271+
result.push(...jsYaml.dump(domainResource, {}).split('\n'));
268272
} else {
269273
result = { domainResource };
270274

0 commit comments

Comments
 (0)