1313define ( [ 'knockout' , 'utils/observable-properties' , 'utils/common-utilities' , 'utils/validation-helper' , 'utils/wkt-logger' ] ,
1414 function ( ko , props , utils , validationHelper , wktLogger ) {
1515
16- return function ( name , wdtModel , imageDomainHomePathProperty , imageDomainTypeProperty ) {
16+ return function ( name , wdtModel , imageDefinition ) {
1717 function asLegalK8sName ( observable ) {
1818 return utils . toLegalK8sName ( observable ( ) ) ;
1919 }
2020
2121 function K8sDomainModel ( ) {
22+ const DEFAULT_AUX_IMAGE_WDT_INSTALL_HOME = imageDefinition . wdtHomePath . value + '/weblogic-deploy' ;
23+ const DEFAULT_AUX_IMAGE_WDT_MODEL_HOME = imageDefinition . modelHomePath . value ;
24+
2225 this . uid = props . createProperty ( asLegalK8sName , wdtModel . domainName ) ;
2326 this . uid . addValidator ( ...validationHelper . getK8sNameValidators ( ) ) ;
2427
2528 this . kubernetesNamespace = props . createProperty ( '${1}-ns' , this . uid . observable ) ;
2629 this . kubernetesNamespace . addValidator ( ...validationHelper . getK8sNameValidators ( ) ) ;
27- this . domainHome = imageDomainHomePathProperty ;
28- this . domainType = imageDomainTypeProperty ;
30+ this . domainHome = imageDefinition . domainHomePath ;
31+ this . domainType = imageDefinition . targetDomainType ;
2932
3033 this . domainPersistentVolumeName = props . createProperty ( 'weblogic-domain-storage-volume' ) ;
3134 this . domainPersistentVolumeMountPath = props . createProperty ( '/shared' ) ;
@@ -49,9 +52,8 @@ define(['knockout', 'utils/observable-properties', 'utils/common-utilities', 'ut
4952 // These fields are exposed to the user only when using an existing Primary Image and
5053 // not using an Auxiliary Image at all.
5154 //
52- this . imageModelHome = props . createProperty ( '/u01/wdt/models' ) ;
53- this . imageWDTInstallHome = props . createProperty ( '/u01/wdt/weblogic-deploy' ) ;
54-
55+ this . imageModelHome = props . createProperty ( imageDefinition . modelHomePath . value ) ;
56+ this . imageWDTInstallHome = props . createProperty ( imageDefinition . wdtHomePath . value ) ;
5557
5658 // Auxiliary image-related properties
5759 this . auxImageRegistryPullRequireAuthentication = props . createProperty ( false ) ;
@@ -66,8 +68,8 @@ define(['knockout', 'utils/observable-properties', 'utils/common-utilities', 'ut
6668
6769 // These fields are exposed to the user only when using an existing Auxiliary Image.
6870 //
69- this . auxImageSourceModelHome = props . createProperty ( '/auxiliary/models' ) ;
70- this . auxImageSourceWDTInstallHome = props . createProperty ( '/auxiliary/weblogic-deploy' ) ;
71+ this . auxImageSourceModelHome = props . createProperty ( DEFAULT_AUX_IMAGE_WDT_MODEL_HOME ) ;
72+ this . auxImageSourceWDTInstallHome = props . createProperty ( DEFAULT_AUX_IMAGE_WDT_INSTALL_HOME ) ;
7173
7274 this . clusterKeys = [
7375 'uid' , 'name' , 'maxServers' , 'replicas' , 'minHeap' , 'maxHeap' , 'cpuRequest' , 'cpuLimit' , 'memoryRequest' ,
0 commit comments