mirror of
				https://github.com/apache/cloudstack.git
				synced 2025-10-26 08:42:29 +01:00 
			
		
		
		
	Merge remote-tracking branch 'origin/4.17'
This commit is contained in:
		
						commit
						e1c7a447cc
					
				| @ -147,7 +147,7 @@ public class EncryptionSecretKeyChanger { | |||||||
|                     { |                     { | ||||||
|                         bwriter.write(newMSKey); |                         bwriter.write(newMSKey); | ||||||
|                     } catch (IOException e) { |                     } catch (IOException e) { | ||||||
|                         System.out.println("Failed to write new secret to file. Please update the file manually"); |                         System.out.println(String.format("Please update the file %s manually. Failed to write new secret to file with error %s", keyFile, e.getMessage())); | ||||||
|                     } |                     } | ||||||
|                 } |                 } | ||||||
|             } |             } | ||||||
|  | |||||||
| @ -397,7 +397,11 @@ for example: | |||||||
| 
 | 
 | ||||||
|         def saveMgmtServerSecretKey(): |         def saveMgmtServerSecretKey(): | ||||||
|             if self.encryptiontype == 'file': |             if self.encryptiontype == 'file': | ||||||
|                 open(self.encryptionKeyFile, 'w').write(self.mgmtsecretkey) |                 try: | ||||||
|  |                     open(self.encryptionKeyFile, 'w').write(self.mgmtsecretkey) | ||||||
|  |                 except IOError as e: | ||||||
|  |                     msg = "Failed to save management server secret key file %s due to %s, also please check the default umask"%(self.encryptionKeyFile, e.strerror) | ||||||
|  |                     self.errorAndExit(msg) | ||||||
| 
 | 
 | ||||||
|         def formatEncryptResult(value): |         def formatEncryptResult(value): | ||||||
|             return 'ENC(%s)'%value |             return 'ENC(%s)'%value | ||||||
|  | |||||||
| @ -43,6 +43,10 @@ export default { | |||||||
|       } |       } | ||||||
|     }, |     }, | ||||||
|     getDimensions () { |     getDimensions () { | ||||||
|  |       const num = Number(this.size) | ||||||
|  |       if (Number.isInteger(num) && num > 0) { | ||||||
|  |         return num | ||||||
|  |       } | ||||||
|       switch (this.size) { |       switch (this.size) { | ||||||
|         case '4x': |         case '4x': | ||||||
|           return 56 |           return 56 | ||||||
|  | |||||||
| @ -26,7 +26,8 @@ export const i18n = createI18n({ | |||||||
|   fallbackLocale: 'en', |   fallbackLocale: 'en', | ||||||
|   silentTranslationWarn: true, |   silentTranslationWarn: true, | ||||||
|   messages: messages, |   messages: messages, | ||||||
|   silentFallbackWarn: true |   silentFallbackWarn: true, | ||||||
|  |   warnHtmlInMessage: 'off' | ||||||
| }) | }) | ||||||
| 
 | 
 | ||||||
| export function loadLanguageAsync (lang) { | export function loadLanguageAsync (lang) { | ||||||
|  | |||||||
| @ -45,12 +45,11 @@ | |||||||
|                                 <a-card-grid style="width:200px;" :title="zoneItem.name" :hoverable="false"> |                                 <a-card-grid style="width:200px;" :title="zoneItem.name" :hoverable="false"> | ||||||
|                                   <a-radio :value="zoneItem.id"> |                                   <a-radio :value="zoneItem.id"> | ||||||
|                                     <div> |                                     <div> | ||||||
|                                       <img |                                       <resource-icon | ||||||
|                                         v-if="zoneItem && zoneItem.icon && zoneItem.icon.base64image" |                                         v-if="zoneItem && zoneItem.icon && zoneItem.icon.base64image" | ||||||
|                                         :src="getImg(zoneItem.icon.base64image)" |                                         :image="zoneItem.icon.base64image" | ||||||
|                                         style="marginTop: -30px; marginLeft: 60px" |                                         size="36" | ||||||
|                                         width="36px" |                                         style="marginTop: -30px; marginLeft: 60px" /> | ||||||
|                                         height="36px" /> |  | ||||||
|                                       <global-outlined v-else :style="{fontSize: '36px', marginLeft: '60px', marginTop: '-40px'}"/> |                                       <global-outlined v-else :style="{fontSize: '36px', marginLeft: '60px', marginTop: '-40px'}"/> | ||||||
|                                     </div> |                                     </div> | ||||||
|                                   </a-radio> |                                   </a-radio> | ||||||
| @ -1487,9 +1486,6 @@ export default { | |||||||
|         'maxmemory' in serviceOffering.serviceofferingdetails && 'maxcpunumber' in serviceOffering.serviceofferingdetails && |         'maxmemory' in serviceOffering.serviceofferingdetails && 'maxcpunumber' in serviceOffering.serviceofferingdetails && | ||||||
|         'minmemory' in serviceOffering.serviceofferingdetails |         'minmemory' in serviceOffering.serviceofferingdetails | ||||||
|     }, |     }, | ||||||
|     getImg (image) { |  | ||||||
|       return 'data:image/png;charset=utf-8;base64, ' + image |  | ||||||
|     }, |  | ||||||
|     updateOverrideRootDiskShowParam (val) { |     updateOverrideRootDiskShowParam (val) { | ||||||
|       if (val) { |       if (val) { | ||||||
|         this.showRootDiskSizeChanger = false |         this.showRootDiskSizeChanger = false | ||||||
|  | |||||||
| @ -269,10 +269,12 @@ export default { | |||||||
|       this.addCluster() |       this.addCluster() | ||||||
|     }, |     }, | ||||||
|     addCluster () { |     addCluster () { | ||||||
|  |       let clustername = this.clustername | ||||||
|  | 
 | ||||||
|       if (this.hypervisor === 'VMware') { |       if (this.hypervisor === 'VMware') { | ||||||
|         const clusternameVal = this.clustername |         const clusternameVal = this.clustername | ||||||
|         this.url = `http://${this.host}/${this.dataCenter}/${clusternameVal}` |         this.url = `http://${this.host}/${this.dataCenter}/${clusternameVal}` | ||||||
|         this.clustername = `${this.host}/${this.dataCenter}/${clusternameVal}` |         clustername = `${this.host}/${this.dataCenter}/${clusternameVal}` | ||||||
|       } |       } | ||||||
|       this.loading = true |       this.loading = true | ||||||
|       this.parentToggleLoading() |       this.parentToggleLoading() | ||||||
| @ -281,7 +283,7 @@ export default { | |||||||
|         hypervisor: this.hypervisor, |         hypervisor: this.hypervisor, | ||||||
|         clustertype: this.clustertype, |         clustertype: this.clustertype, | ||||||
|         podId: this.podId, |         podId: this.podId, | ||||||
|         clustername: this.clustername, |         clustername: clustername, | ||||||
|         url: this.url |         url: this.url | ||||||
|       } |       } | ||||||
|       if (this.ovm3pool) { |       if (this.ovm3pool) { | ||||||
|  | |||||||
| @ -137,14 +137,14 @@ export default { | |||||||
|       return this.prefillContent?.hypervisor || null |       return this.prefillContent?.hypervisor || null | ||||||
|     }, |     }, | ||||||
|     localstorageenabled () { |     localstorageenabled () { | ||||||
|       return this.prefillContent?.localstorageenabled?.value || false |       return this.prefillContent?.localstorageenabled || false | ||||||
|     }, |     }, | ||||||
|     localstorageenabledforsystemvm () { |     localstorageenabledforsystemvm () { | ||||||
|       return this.prefillContent?.localstorageenabledforsystemvm?.value || false |       return this.prefillContent?.localstorageenabledforsystemvm || false | ||||||
|     }, |     }, | ||||||
|     steps () { |     steps () { | ||||||
|       const steps = [] |       const steps = [] | ||||||
|       const hypervisor = this.prefillContent.hypervisor ? this.prefillContent.hypervisor.value : null |       const hypervisor = this.prefillContent.hypervisor ? this.prefillContent.hypervisor : null | ||||||
|       steps.push({ |       steps.push({ | ||||||
|         title: 'label.cluster', |         title: 'label.cluster', | ||||||
|         fromKey: 'clusterResource', |         fromKey: 'clusterResource', | ||||||
|  | |||||||
| @ -143,7 +143,7 @@ | |||||||
|       </a-button> |       </a-button> | ||||||
|     </div> |     </div> | ||||||
|     <a-modal |     <a-modal | ||||||
|       :visible="showError" |       v-model:visible="showError" | ||||||
|       :title="`${$t('label.error')}!`" |       :title="`${$t('label.error')}!`" | ||||||
|       :maskClosable="false" |       :maskClosable="false" | ||||||
|       :closable="true" |       :closable="true" | ||||||
| @ -151,7 +151,7 @@ | |||||||
|       @cancel="() => { showError = false }" |       @cancel="() => { showError = false }" | ||||||
|       centered |       centered | ||||||
|     > |     > | ||||||
|       <div v-ctrl-enter="showError = false"> |       <div v-ctrl-enter="() => showError = false"> | ||||||
|         <span>{{ $t('message.required.traffic.type') }}</span> |         <span>{{ $t('message.required.traffic.type') }}</span> | ||||||
|         <div :span="24" class="action-button"> |         <div :span="24" class="action-button"> | ||||||
|           <a-button @click="showError = false">{{ $t('label.cancel') }}</a-button> |           <a-button @click="showError = false">{{ $t('label.cancel') }}</a-button> | ||||||
| @ -161,7 +161,7 @@ | |||||||
|     </a-modal> |     </a-modal> | ||||||
|     <a-modal |     <a-modal | ||||||
|       :title="$t('label.edit.traffic.type')" |       :title="$t('label.edit.traffic.type')" | ||||||
|       :visible="showEditTraffic" |       v-model:visible="showEditTraffic" | ||||||
|       :closable="true" |       :closable="true" | ||||||
|       :maskClosable="false" |       :maskClosable="false" | ||||||
|       centered |       centered | ||||||
| @ -323,7 +323,7 @@ export default { | |||||||
|       return traffics |       return traffics | ||||||
|     }, |     }, | ||||||
|     hypervisor () { |     hypervisor () { | ||||||
|       return this.prefillContent.hypervisor?.value || null |       return this.prefillContent.hypervisor || null | ||||||
|     } |     } | ||||||
|   }, |   }, | ||||||
|   created () { |   created () { | ||||||
| @ -414,14 +414,22 @@ export default { | |||||||
|       const shouldHaveLabels = this.physicalNetworks.length > 1 |       const shouldHaveLabels = this.physicalNetworks.length > 1 | ||||||
|       let isValid = true |       let isValid = true | ||||||
|       this.requiredTrafficTypes.forEach(type => { |       this.requiredTrafficTypes.forEach(type => { | ||||||
|  |         if (!isValid) return false | ||||||
|         let foundType = false |         let foundType = false | ||||||
|         this.physicalNetworks.forEach(net => { |         this.physicalNetworks.forEach(net => { | ||||||
|           net.traffics.forEach(traffic => { |           net.traffics.forEach(traffic => { | ||||||
|  |             if (!isValid) return false | ||||||
|             if (traffic.type === type) { |             if (traffic.type === type) { | ||||||
|               foundType = true |               foundType = true | ||||||
|             } |             } | ||||||
|             if (shouldHaveLabels && (!traffic.label || traffic.label.length === 0)) { |             if (this.hypervisor !== 'VMware') { | ||||||
|               isValid = false |               if (shouldHaveLabels && (!traffic.label || traffic.label.length === 0)) { | ||||||
|  |                 isValid = false | ||||||
|  |               } | ||||||
|  |             } else { | ||||||
|  |               if (shouldHaveLabels && (!traffic.vSwitchName || traffic.vSwitchName.length === 0)) { | ||||||
|  |                 isValid = false | ||||||
|  |               } | ||||||
|             } |             } | ||||||
|           }) |           }) | ||||||
|         }) |         }) | ||||||
| @ -477,12 +485,12 @@ export default { | |||||||
|       const fields = {} |       const fields = {} | ||||||
|       if (this.hypervisor === 'VMware') { |       if (this.hypervisor === 'VMware') { | ||||||
|         delete this.trafficInEdit.traffic.label |         delete this.trafficInEdit.traffic.label | ||||||
|         fields.vSwitchName = null |         fields.vSwitchName = this.trafficInEdit?.traffic?.vSwitchName || null | ||||||
|         fields.vlanId = null |         fields.vlanId = this.trafficInEdit?.traffic?.vlanId || null | ||||||
|         if (traffic.type === 'guest') { |         if (traffic.type === 'guest') { | ||||||
|           fields.vSwitchName = this.trafficInEdit?.traffic?.vSwitchName || 'vSwitch0' |           fields.vSwitchName = this.trafficInEdit?.traffic?.vSwitchName || 'vSwitch0' | ||||||
|         } |         } | ||||||
|         fields.vSwitchType = 'vmwaresvs' |         fields.vSwitchType = this.trafficInEdit?.traffic?.vSwitchType || 'vmwaresvs' | ||||||
|       } else { |       } else { | ||||||
|         delete this.trafficInEdit.traffic.vSwitchName |         delete this.trafficInEdit.traffic.vSwitchName | ||||||
|         delete this.trafficInEdit.traffic.vlanId |         delete this.trafficInEdit.traffic.vlanId | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user