@@ -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' ]
0 commit comments