Skip to content

Commit 581cd88

Browse files
committed
Merge branch 'wktui-575' into 'develop-2.0'
Customizing list/dict dialog box text See merge request weblogic-cloud/weblogic-toolkit-ui!434
2 parents 2bf2d1f + 3ad3ba2 commit 581cd88

18 files changed

+613
-96
lines changed

electron/app/locales/en/modeledit.json

Lines changed: 251 additions & 58 deletions
Large diffs are not rendered by default.

webui/src/js/utils/modelEdit/instance-helper.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ function (MessageHelper, AliasHelper, MetaHelper,
1818
this.getNewInstanceName = (modelPath, model) => {
1919
let typeName = MessageHelper.getFolderTypeLabel(modelPath);
2020
if (typeName) {
21-
typeName = typeName.replace(/ /g, '');
21+
typeName = typeName.replace(/ /g, '').replace(/-/g, '');
2222
} else {
2323
typeName = modelPath[modelPath.length - 1];
2424
}

webui/src/js/utils/modelEdit/meta-handlers.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -419,6 +419,10 @@ define(['knockout', 'utils/wkt-logger', 'utils/modelEdit/model-edit-helper'],
419419
return this._disableFieldsUsingBooleanAttribute(attributeMap, 'Enabled');
420420
};
421421

422+
this.serverNetworkAccessPointEnabledFields = attributeMap => {
423+
return this._disableFieldsUsingBooleanAttribute(attributeMap, 'Enabled', true);
424+
};
425+
422426
this.serverNetworkAccessPointOutboundFields = attributeMap => {
423427
return this._disableFieldsUsingBooleanAttribute(attributeMap, 'OutboundEnabled');
424428
};

webui/src/js/utils/modelEdit/meta-options.js

Lines changed: 175 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,19 @@ define(['knockout', 'utils/modelEdit/model-edit-helper'],
9797
return options;
9898
};
9999

100+
this.getPersistentStoreOptions = () => {
101+
const options = [];
102+
const persistentFileStoreNames = getInstanceNames(['resources', 'FileStore']);
103+
persistentFileStoreNames.forEach(persistentFileStoreName => {
104+
options.push({ value: persistentFileStoreName, label: persistentFileStoreName });
105+
});
106+
const persistentJdbcStoreNames = getInstanceNames(['resources', 'JDBCStore']);
107+
persistentJdbcStoreNames.forEach(persistentJdbcStoreName => {
108+
options.push({ value: persistentJdbcStoreName });
109+
});
110+
return options;
111+
};
112+
100113
this.getDataSourceOptions = () => {
101114
const options = [];
102115
const dataSourceNames = getInstanceNames(['resources', 'JDBCSystemResource']);
@@ -106,6 +119,20 @@ define(['knockout', 'utils/modelEdit/model-edit-helper'],
106119
return options;
107120
};
108121

122+
this.getServerOptions = () => {
123+
const adminServerName = getAdminServerName();
124+
const options = [
125+
{ value: adminServerName, label: adminServerName },
126+
];
127+
const serverNames = getInstanceNames(['topology', 'Server']);
128+
serverNames.forEach(serverName => {
129+
if (serverName !== adminServerName) {
130+
options.push({ value: serverName, label: serverName });
131+
}
132+
});
133+
return options;
134+
};
135+
109136
this.getClusterOptions = () => {
110137
const options = [];
111138
const clusterNames = getInstanceNames(['topology', 'Cluster']);
@@ -129,6 +156,18 @@ define(['knockout', 'utils/modelEdit/model-edit-helper'],
129156
return options;
130157
};
131158

159+
this.getManagedServerOptions = () => {
160+
const adminServerName = getAdminServerName();
161+
const options = [];
162+
const serverNames = getInstanceNames(['topology', 'Server']);
163+
serverNames.forEach(serverName => {
164+
if (serverName !== adminServerName) {
165+
options.push({ value: serverName, label: serverName });
166+
}
167+
});
168+
return options;
169+
};
170+
132171
// return an observableArray that changes with cluster selection.
133172
// add any subscriptions to the list to be cleaned up by caller.
134173
this.getServersInClusterOptions = (attribute, attributeMap, subscriptions) => {
@@ -260,6 +299,142 @@ define(['knockout', 'utils/modelEdit/model-edit-helper'],
260299
return getJmsSystemResourceTypeOptions(attribute, 'SAFRemoteContext');
261300
};
262301

302+
this.getOdlHandlerOptions = (attribute) => {
303+
const modelPath = attribute.path;
304+
// [ 'resources', 'ODLConfiguration', <odl-config-name> ]
305+
const odlConfigurationPath = modelPath.slice(0, 3);
306+
const odlHandlerNames = getInstanceNames([...odlConfigurationPath, 'Handler']);
307+
const options = [];
308+
odlHandlerNames.forEach(handlerName => {
309+
options.push({ value: handlerName, label: handlerName });
310+
});
311+
return options;
312+
};
313+
314+
this.getCapacityOptions = () => {
315+
const options = [];
316+
const capacityConstraintNames = getInstanceNames(['resources', 'SelfTuning', 'Capacity']);
317+
capacityConstraintNames.forEach(constraintName => {
318+
options.push({ value: constraintName, label: constraintName });
319+
});
320+
return options;
321+
};
322+
323+
this.getContextRequestClassOptions = () => {
324+
const options = [];
325+
const contextRequestClassNames = getInstanceNames(['resources', 'SelfTuning', 'ContextRequestClass']);
326+
contextRequestClassNames.forEach(contextRequestClassName => {
327+
options.push({ value: contextRequestClassName, label: contextRequestClassName });
328+
});
329+
return options;
330+
};
331+
332+
this.getFairShareRequestClassOptions = () => {
333+
const options = [];
334+
const fairShareRequestClassNames = getInstanceNames(['resources', 'SelfTuning', 'FairShareRequestClass']);
335+
fairShareRequestClassNames.forEach(className => {
336+
options.push({ value: className, label: className });
337+
});
338+
return options;
339+
};
340+
341+
this.getMaxThreadsConstraintOptions = () => {
342+
const options = [];
343+
const maxThreadsConstraintNames = getInstanceNames(['resources', 'SelfTuning', 'MaxThreadsConstraint']);
344+
maxThreadsConstraintNames.forEach(constraintName => {
345+
options.push({ value: constraintName, label: constraintName });
346+
});
347+
return options;
348+
};
349+
350+
this.getMinThreadsConstraintOptions = () => {
351+
const options = [];
352+
const minThreadsConstraintNames = getInstanceNames(['resources', 'SelfTuning', 'MinThreadsConstraint']);
353+
minThreadsConstraintNames.forEach(constraintName => {
354+
options.push({ value: constraintName, label: constraintName });
355+
});
356+
return options;
357+
};
358+
359+
this.getResponseTimeRequestClassOptions = () => {
360+
const options = [];
361+
const responseTimeRequestClassNames = getInstanceNames(['resources', 'SelfTuning', 'ResponseTimeRequestClass']);
362+
responseTimeRequestClassNames.forEach(responseTimeRequestClassName => {
363+
options.push({ value: responseTimeRequestClassName, label: responseTimeRequestClassName });
364+
});
365+
return options;
366+
};
367+
368+
this.getFairShareOrResponseTimeRequestClassOptions = () => {
369+
const options = [];
370+
const fairShareRequestClassNames = getInstanceNames(['resources', 'SelfTuning', 'FairShareRequestClass']);
371+
fairShareRequestClassNames.forEach(className => {
372+
options.push({ value: className, label: className });
373+
});
374+
const responseTimeRequestClassNames = getInstanceNames(['resources', 'SelfTuning', 'ResponseTimeRequestClass']);
375+
responseTimeRequestClassNames.forEach(className => {
376+
options.push({ value: className, label: className });
377+
});
378+
return options;
379+
};
380+
381+
this.wldfSystemResourceWatchNotificationActionOptions = (attribute) => {
382+
const modelPath = attribute.path;
383+
const wldfWatchNotificationPath = [ ...modelPath.slice(0, 4), 'WatchNotification'];
384+
console.log(`wldfWatchNotificationPath: ${JSON.stringify(wldfWatchNotificationPath)}`);
385+
const heapDumpActionNames = getInstanceNames([...wldfWatchNotificationPath, 'HeapDumpAction']);
386+
const imageNotificationNames = getInstanceNames([...wldfWatchNotificationPath, 'ImageNotification']);
387+
const jmsNotificationNames = getInstanceNames([...wldfWatchNotificationPath, 'JMSNotification']);
388+
const jmxNotificationNames = getInstanceNames([...wldfWatchNotificationPath, 'JMXNotification']);
389+
const logActionNames = getInstanceNames([...wldfWatchNotificationPath, 'LogAction']);
390+
const restNotificationNames = getInstanceNames([...wldfWatchNotificationPath, 'RestNotification']);
391+
const scaleDownActionNames = getInstanceNames([...wldfWatchNotificationPath, 'ScaleDownAction']);
392+
const scaleUpActionNames = getInstanceNames([...wldfWatchNotificationPath, 'ScaleUpAction']);
393+
const scriptActionNames = getInstanceNames([...wldfWatchNotificationPath, 'ScriptAction']);
394+
const smtpNotificationNames = getInstanceNames([...wldfWatchNotificationPath, 'SMTPNotification']);
395+
const snmpNotificationNames = getInstanceNames([...wldfWatchNotificationPath, 'SNMPNotification']);
396+
const threadDumpActionNames = getInstanceNames([...wldfWatchNotificationPath, 'ThreadDumpAction']);
397+
398+
const options = [];
399+
heapDumpActionNames.forEach(actionName => {
400+
options.push({ value: actionName, label: actionName });
401+
});
402+
imageNotificationNames.forEach(imageNotificationName => {
403+
options.push({ value: imageNotificationName, label: imageNotificationName });
404+
});
405+
jmsNotificationNames.forEach(jmsNotificationName => {
406+
options.push({ value: jmsNotificationName, label: jmsNotificationName });
407+
});
408+
jmxNotificationNames.forEach(jmxNotificationName => {
409+
options.push({ value: jmxNotificationName, label: jmxNotificationName });
410+
});
411+
logActionNames.forEach(logActionName => {
412+
options.push({ value: logActionName, label: logActionName });
413+
});
414+
restNotificationNames.forEach(restNotificationName => {
415+
options.push({ value: restNotificationName, label: restNotificationName });
416+
});
417+
scaleDownActionNames.forEach(scaleDownActionName => {
418+
options.push({ value: scaleDownActionName, label: scaleDownActionName });
419+
});
420+
scaleUpActionNames.forEach(scaleUpActionName => {
421+
options.push({ value: scaleUpActionName, label: scaleUpActionName });
422+
});
423+
scriptActionNames.forEach(scriptActionName => {
424+
options.push({ value: scriptActionName, label: scriptActionName });
425+
});
426+
smtpNotificationNames.forEach(smtpNotificationName => {
427+
options.push({ value: smtpNotificationName, label: smtpNotificationName });
428+
});
429+
snmpNotificationNames.forEach(snmpNotificationName => {
430+
options.push({ value: snmpNotificationName, label: snmpNotificationName });
431+
});
432+
threadDumpActionNames.forEach(threadDumpActionName => {
433+
options.push({ value: threadDumpActionName, label: threadDumpActionName });
434+
});
435+
return options;
436+
};
437+
263438
function getJmsSystemResourceTypeOptions(attribute, typeName) {
264439
const modelPath = attribute.path;
265440
// [ 'resources', 'JMSSystemResource', <module-name>, 'JmsResource' ]

webui/src/js/utils/modelEdit/metadata/Application.json

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,16 @@
55
"Target": {}
66
},
77
"attributeDetails": {
8+
"ModuleType": {
9+
"editorType": "combo",
10+
"optionsMatch": "lower",
11+
"options": [
12+
{ "value": "ear", "label": "EAR" },
13+
{ "value": "jar", "label": "JAR" },
14+
{ "value": "war", "label": "WAR" },
15+
{ "value": "rar", "label": "RAR" }
16+
]
17+
},
818
"PlanStagingMode": {
919
"options": [
1020
{ "value": "stage", "labelKey": "staging-stage-label" },
@@ -38,13 +48,12 @@
3848
"attributes": [
3949
"SourcePath",
4050
"ModuleType",
41-
"DeploymentPrincipalName",
42-
"SecurityDDModel",
43-
"StagingMode",
44-
"PlanStagingMode",
4551
"PlanDir",
4652
"PlanPath",
47-
"InstallDir",
53+
"StagingMode",
54+
"PlanStagingMode",
55+
"DeploymentPrincipalName",
56+
"SecurityDDModel",
4857
"DeploymentOrder",
4958
"Notes",
5059
"Target"
@@ -61,6 +70,7 @@
6170
"CacheInAppDirectory",
6271
"ParallelDeployModules",
6372
"MultiVersionApp",
73+
"InstallDir",
6474
"CompatibilityName"
6575
]
6676
},

webui/src/js/utils/modelEdit/metadata/DomainInfo.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,13 @@
77
{ "value": "prod", "labelKey": "options-prod-mode-label" },
88
{ "value": "secure", "labelKey": "options-secure-mode-label" }
99
]
10+
},
11+
"UseSampleDatabase": {
12+
"optionsMatch": "lower",
13+
"options": [
14+
{ "value": "true", "labelKey": "options-true-label" },
15+
{ "value": "false", "labelKey": "options-false-label" }
16+
]
1017
}
1118
},
1219
"sections": [

webui/src/js/utils/modelEdit/metadata/ForeignJNDIProvider.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"ForeignJNDIProvider": {
33
"summaryAttributes": {
4-
"ProviderURL": {},
4+
"ProviderUrl": {},
55
"Target": {}
66
},
77
"sections": [

webui/src/js/utils/modelEdit/metadata/Library.json

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,16 @@
55
"Target": {}
66
},
77
"attributeDetails": {
8+
"ModuleType": {
9+
"editorType": "combo",
10+
"optionsMatch": "lower",
11+
"options": [
12+
{ "value": "ear", "label": "EAR" },
13+
{ "value": "jar", "label": "JAR" },
14+
{ "value": "war", "label": "WAR" },
15+
{ "value": "rar", "label": "RAR" }
16+
]
17+
},
818
"PlanStagingMode": {
919
"options": [
1020
{ "value": "stage", "labelKey": "staging-stage-label" },
@@ -38,12 +48,11 @@
3848
"attributes": [
3949
"SourcePath",
4050
"ModuleType",
41-
"SecurityDDModel",
42-
"StagingMode",
43-
"PlanStagingMode",
4451
"PlanDir",
4552
"PlanPath",
46-
"InstallDir",
53+
"StagingMode",
54+
"PlanStagingMode",
55+
"SecurityDDModel",
4756
"DeploymentPrincipalName",
4857
"ValidateDDSecurityData",
4958
"DeploymentOrder",
@@ -62,6 +71,7 @@
6271
"CacheInAppDirectory",
6372
"ParallelDeployModules",
6473
"MultiVersionApp",
74+
"InstallDir",
6575
"CompatibilityName"
6676
]
6777
},

webui/src/js/utils/modelEdit/metadata/ODLConfiguration.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,12 @@
33
"summaryAttributes": {
44
"Servers": {}
55
},
6+
"attributeDetails": {
7+
"Servers": {
8+
"editorType": "comboMulti",
9+
"optionsMethod": "getServerOptions"
10+
}
11+
},
612
"sections": [
713
{
814
"type": "tab",
@@ -39,5 +45,11 @@
3945
}
4046
},
4147
"ODLConfiguration/Logger": {
48+
"attributeDetails": {
49+
"Handlers": {
50+
"editorType": "comboMulti",
51+
"optionsMethod": "getOdlHandlerOptions"
52+
}
53+
}
4254
}
4355
}

webui/src/js/utils/modelEdit/metadata/PathService.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@
44
"PersistentStore": {},
55
"Target": {}
66
},
7+
"attributeDetails": {
8+
"PersistentStore": {
9+
"editorType": "combo",
10+
"optionsMethod": "getPersistentStoreOptions"
11+
}
12+
},
713
"sections": [
814
{
915
"type": "attributes",

0 commit comments

Comments
 (0)