mirror of
				https://github.com/apache/cloudstack.git
				synced 2025-11-04 00:02:37 +01:00 
			
		
		
		
	Merge branch '4.20' of https://github.com/apache/cloudstack
This commit is contained in:
		
						commit
						576b97ba22
					
				@ -776,7 +776,8 @@ public class StorPoolPrimaryDataStoreDriver implements PrimaryDataStoreDriver {
 | 
			
		||||
 | 
			
		||||
                        if (answer != null && answer.getResult()) {
 | 
			
		||||
                            // successfully downloaded template to primary storage
 | 
			
		||||
                            answer = createVolumeSnapshot(cmd, size, conn, volName, dstTO);
 | 
			
		||||
                            TemplateObjectTO templ = (TemplateObjectTO) ((CopyCmdAnswer) answer).getNewData();
 | 
			
		||||
                            answer = createVolumeSnapshot(cmd, size, conn, volName, templ);
 | 
			
		||||
                        } else {
 | 
			
		||||
                            err = answer != null ? answer.getDetails() : "Unknown error while downloading template. Null answer returned.";
 | 
			
		||||
                        }
 | 
			
		||||
@ -983,7 +984,6 @@ public class StorPoolPrimaryDataStoreDriver implements PrimaryDataStoreDriver {
 | 
			
		||||
        } else {
 | 
			
		||||
            dstTO.setPath(StorPoolUtil.devPath(
 | 
			
		||||
                    StorPoolUtil.getSnapshotNameFromResponse(resp, false, StorPoolUtil.GLOBAL_ID)));
 | 
			
		||||
            dstTO.setSize(size);
 | 
			
		||||
            answer = new CopyCmdAnswer(dstTO);
 | 
			
		||||
        }
 | 
			
		||||
        return answer;
 | 
			
		||||
 | 
			
		||||
@ -2930,6 +2930,7 @@
 | 
			
		||||
"message.confirm.remove.vmware.datacenter": "Please confirm you want to remove VMware datacenter.",
 | 
			
		||||
"message.confirm.remove.vpc.offering": "Are you sure you want to remove this VPC offering?",
 | 
			
		||||
"message.confirm.replace.acl.new.one": "Do you want to replace the ACL with a new one?",
 | 
			
		||||
"message.confirm.reset.configuration.value": "Are you sure you want reset configuration - %x?",
 | 
			
		||||
"message.confirm.reset.network.permissions": "Are you sure you want to reset this Network permissions?",
 | 
			
		||||
"message.confirm.scale.up.router.vm": "Do you really want to scale up the router Instance?",
 | 
			
		||||
"message.confirm.scale.up.system.vm": "Do you really want to scale up the system VM?",
 | 
			
		||||
 | 
			
		||||
@ -543,7 +543,7 @@
 | 
			
		||||
          iconTwoToneColor="#52c41a" />
 | 
			
		||||
        <tooltip-button
 | 
			
		||||
          :tooltip="$t('label.reset.config.value')"
 | 
			
		||||
          @onClick="resetConfig(record)"
 | 
			
		||||
          @onClick="$resetConfigurationValueConfirm(item, resetConfig)"
 | 
			
		||||
          v-if="editableValueKey !== record.key"
 | 
			
		||||
          icon="reload-outlined"
 | 
			
		||||
          :disabled="!('updateConfiguration' in $store.getters.apis)" />
 | 
			
		||||
 | 
			
		||||
@ -35,7 +35,8 @@ import {
 | 
			
		||||
  resourceTypePlugin,
 | 
			
		||||
  fileSizeUtilPlugin,
 | 
			
		||||
  genericUtilPlugin,
 | 
			
		||||
  localesPlugin
 | 
			
		||||
  localesPlugin,
 | 
			
		||||
  dialogUtilPlugin
 | 
			
		||||
} from './utils/plugins'
 | 
			
		||||
import { VueAxios } from './utils/request'
 | 
			
		||||
import directives from './utils/directives'
 | 
			
		||||
@ -51,6 +52,7 @@ vueApp.use(resourceTypePlugin)
 | 
			
		||||
vueApp.use(fileSizeUtilPlugin)
 | 
			
		||||
vueApp.use(localesPlugin)
 | 
			
		||||
vueApp.use(genericUtilPlugin)
 | 
			
		||||
vueApp.use(dialogUtilPlugin)
 | 
			
		||||
vueApp.use(extensions)
 | 
			
		||||
vueApp.use(directives)
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -18,7 +18,7 @@
 | 
			
		||||
import _ from 'lodash'
 | 
			
		||||
import { i18n } from '@/locales'
 | 
			
		||||
import { api } from '@/api'
 | 
			
		||||
import { message, notification } from 'ant-design-vue'
 | 
			
		||||
import { message, notification, Modal } from 'ant-design-vue'
 | 
			
		||||
import eventBus from '@/config/eventBus'
 | 
			
		||||
import store from '@/store'
 | 
			
		||||
import { sourceToken } from '@/utils/request'
 | 
			
		||||
@ -523,3 +523,18 @@ export function createPathBasedOnVmType (vmtype, virtualmachineid) {
 | 
			
		||||
 | 
			
		||||
  return path + virtualmachineid
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
export const dialogUtilPlugin = {
 | 
			
		||||
  install (app) {
 | 
			
		||||
    app.config.globalProperties.$resetConfigurationValueConfirm = function (configRecord, callback) {
 | 
			
		||||
      Modal.confirm({
 | 
			
		||||
        title: i18n.global.t('label.reset.config.value'),
 | 
			
		||||
        content: `${i18n.global.t('message.confirm.reset.configuration.value').replace('%x', configRecord.name)}`,
 | 
			
		||||
        okText: i18n.global.t('label.yes'),
 | 
			
		||||
        cancelText: i18n.global.t('label.no'),
 | 
			
		||||
        okType: 'primary',
 | 
			
		||||
        onOk: () => callback(configRecord)
 | 
			
		||||
      })
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@ -184,7 +184,7 @@
 | 
			
		||||
          :disabled="valueLoading" />
 | 
			
		||||
        <tooltip-button
 | 
			
		||||
          :tooltip="$t('label.reset.config.value')"
 | 
			
		||||
          @onClick="resetConfigurationValue(configrecord)"
 | 
			
		||||
          @onClick="$resetConfigurationValueConfirm(configrecord, resetConfigurationValue)"
 | 
			
		||||
          v-if="editableValueKey === null"
 | 
			
		||||
          icon="reload-outlined"
 | 
			
		||||
          :disabled="(!('resetConfiguration' in $store.getters.apis) || configDisabled || valueLoading)" />
 | 
			
		||||
 | 
			
		||||
@ -31,7 +31,8 @@ import {
 | 
			
		||||
  showIconPlugin,
 | 
			
		||||
  resourceTypePlugin,
 | 
			
		||||
  fileSizeUtilPlugin,
 | 
			
		||||
  genericUtilPlugin
 | 
			
		||||
  genericUtilPlugin,
 | 
			
		||||
  dialogUtilPlugin
 | 
			
		||||
} from '@/utils/plugins'
 | 
			
		||||
 | 
			
		||||
function createMockRouter (newRoutes = []) {
 | 
			
		||||
@ -88,6 +89,7 @@ function createFactory (component, options) {
 | 
			
		||||
        resourceTypePlugin,
 | 
			
		||||
        fileSizeUtilPlugin,
 | 
			
		||||
        genericUtilPlugin,
 | 
			
		||||
        dialogUtilPlugin,
 | 
			
		||||
        StoragePlugin
 | 
			
		||||
      ],
 | 
			
		||||
      mocks
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user