mirror of
				https://github.com/apache/cloudstack.git
				synced 2025-10-26 08:42:29 +01:00 
			
		
		
		
	view: fix role-base checks on components to disable (#317)
Fixes #310 Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com> Co-authored-by: Rohit Yadav <rohit.yadav@shapeblue.com>
This commit is contained in:
		
							parent
							
								
									6e68c7142a
								
							
						
					
					
						commit
						11dfaf4ad2
					
				| @ -39,7 +39,7 @@ | |||||||
|     <div> |     <div> | ||||||
|       <strong>{{ $t('label.dedicated') }}</strong> |       <strong>{{ $t('label.dedicated') }}</strong> | ||||||
|       <div>No</div> |       <div>No</div> | ||||||
|       <a-button type="primary" style="margin-top: 10px; margin-bottom: 10px;" @click="modalActive = true"> |       <a-button type="primary" style="margin-top: 10px; margin-bottom: 10px;" @click="modalActive = true" :disabled="!dedicateButtonAvailable"> | ||||||
|         {{ dedicatedButtonLabel }} |         {{ dedicatedButtonLabel }} | ||||||
|       </a-button> |       </a-button> | ||||||
|     </div> |     </div> | ||||||
| @ -70,6 +70,7 @@ export default { | |||||||
|   data () { |   data () { | ||||||
|     return { |     return { | ||||||
|       modalActive: false, |       modalActive: false, | ||||||
|  |       dedicateButtonAvailable: true, | ||||||
|       dedicatedButtonLabel: 'Dedicate', |       dedicatedButtonLabel: 'Dedicate', | ||||||
|       releaseButtonLabel: 'Release', |       releaseButtonLabel: 'Release', | ||||||
|       dedicatedModalLabel: 'Dedicate', |       dedicatedModalLabel: 'Dedicate', | ||||||
| @ -86,27 +87,32 @@ export default { | |||||||
|   }, |   }, | ||||||
|   methods: { |   methods: { | ||||||
|     fetchData () { |     fetchData () { | ||||||
|  |       this.dedicateButtonAvailable = true | ||||||
|       if (this.$route.meta.name === 'zone') { |       if (this.$route.meta.name === 'zone') { | ||||||
|         this.fetchDedicatedZones() |         this.fetchDedicatedZones() | ||||||
|         this.releaseButtonLabel = this.$t('label.release.dedicated.zone') |         this.releaseButtonLabel = this.$t('label.release.dedicated.zone') | ||||||
|  |         this.dedicateButtonAvailable = ('dedicateZone' in this.$store.getters.apis) | ||||||
|         this.dedicatedButtonLabel = this.$t('label.dedicate.zone') |         this.dedicatedButtonLabel = this.$t('label.dedicate.zone') | ||||||
|         this.dedicatedModalLabel = this.$t('label.dedicate.zone') |         this.dedicatedModalLabel = this.$t('label.dedicate.zone') | ||||||
|       } |       } | ||||||
|       if (this.$route.meta.name === 'pod') { |       if (this.$route.meta.name === 'pod') { | ||||||
|         this.fetchDedicatedPods() |         this.fetchDedicatedPods() | ||||||
|         this.releaseButtonLabel = this.$t('label.release.dedicated.pod') |         this.releaseButtonLabel = this.$t('label.release.dedicated.pod') | ||||||
|  |         this.dedicateButtonAvailable = ('dedicatePod' in this.$store.getters.apis) | ||||||
|         this.dedicatedButtonLabel = this.$t('label.dedicate.pod') |         this.dedicatedButtonLabel = this.$t('label.dedicate.pod') | ||||||
|         this.dedicatedModalLabel = this.$t('label.dedicate.pod') |         this.dedicatedModalLabel = this.$t('label.dedicate.pod') | ||||||
|       } |       } | ||||||
|       if (this.$route.meta.name === 'cluster') { |       if (this.$route.meta.name === 'cluster') { | ||||||
|         this.fetchDedicatedClusters() |         this.fetchDedicatedClusters() | ||||||
|         this.releaseButtonLabel = this.$t('label.release.dedicated.cluster') |         this.releaseButtonLabel = this.$t('label.release.dedicated.cluster') | ||||||
|  |         this.dedicateButtonAvailable = ('dedicateCluster' in this.$store.getters.apis) | ||||||
|         this.dedicatedButtonLabel = this.$t('label.dedicate.cluster') |         this.dedicatedButtonLabel = this.$t('label.dedicate.cluster') | ||||||
|         this.dedicatedModalLabel = this.$t('label.dedicate.cluster') |         this.dedicatedModalLabel = this.$t('label.dedicate.cluster') | ||||||
|       } |       } | ||||||
|       if (this.$route.meta.name === 'host') { |       if (this.$route.meta.name === 'host') { | ||||||
|         this.fetchDedicatedHosts() |         this.fetchDedicatedHosts() | ||||||
|         this.releaseButtonLabel = this.$t('label.release.dedicated.host') |         this.releaseButtonLabel = this.$t('label.release.dedicated.host') | ||||||
|  |         this.dedicateButtonAvailable = ('dedicateHost' in this.$store.getters.apis) | ||||||
|         this.dedicatedButtonLabel = this.$t('label.dedicate.host') |         this.dedicatedButtonLabel = this.$t('label.dedicate.host') | ||||||
|         this.dedicatedModalLabel = this.$t('label.dedicate.host') |         this.dedicatedModalLabel = this.$t('label.dedicate.host') | ||||||
|       } |       } | ||||||
|  | |||||||
| @ -23,7 +23,14 @@ | |||||||
|       :message="$t('message.action.settings.warning.vm.running')" /> |       :message="$t('message.action.settings.warning.vm.running')" /> | ||||||
|     <div v-else> |     <div v-else> | ||||||
|       <div v-show="!showAddDetail"> |       <div v-show="!showAddDetail"> | ||||||
|         <a-button type="dashed" style="width: 100%" icon="plus" @click="showAddDetail = true">{{ $t('label.add.setting') }}</a-button> |         <a-button | ||||||
|  |           type="dashed" | ||||||
|  |           style="width: 100%" | ||||||
|  |           icon="plus" | ||||||
|  |           :disabled="!('updateTemplate' in $store.getters.apis && 'updateVirtualMachine' in $store.getters.apis)" | ||||||
|  |           @click="showAddDetail = true"> | ||||||
|  |           {{ $t('label.add.setting') }} | ||||||
|  |         </a-button> | ||||||
|       </div> |       </div> | ||||||
|       <div v-show="showAddDetail"> |       <div v-show="showAddDetail"> | ||||||
|         <a-auto-complete |         <a-auto-complete | ||||||
| @ -62,16 +69,20 @@ | |||||||
|             <span v-else>{{ item.value }}</span> |             <span v-else>{{ item.value }}</span> | ||||||
|           </span> |           </span> | ||||||
|         </a-list-item-meta> |         </a-list-item-meta> | ||||||
|         <div slot="actions" v-if="!disableSettings"> |         <div slot="actions" v-if="!disableSettings && 'updateTemplate' in $store.getters.apis && 'updateVirtualMachine' in $store.getters.apis"> | ||||||
|           <a-button shape="circle" size="default" @click="updateDetail(index)" v-if="item.edit"> |           <a-button shape="circle" size="default" @click="updateDetail(index)" v-if="item.edit"> | ||||||
|             <a-icon type="check-circle" theme="twoTone" twoToneColor="#52c41a" /> |             <a-icon type="check-circle" theme="twoTone" twoToneColor="#52c41a" /> | ||||||
|           </a-button> |           </a-button> | ||||||
|           <a-button shape="circle" size="default" @click="hideEditDetail(index)" v-if="item.edit"> |           <a-button shape="circle" size="default" @click="hideEditDetail(index)" v-if="item.edit"> | ||||||
|             <a-icon type="close-circle" theme="twoTone" twoToneColor="#f5222d" /> |             <a-icon type="close-circle" theme="twoTone" twoToneColor="#f5222d" /> | ||||||
|           </a-button> |           </a-button> | ||||||
|           <a-button shape="circle" @click="showEditDetail(index)" v-if="!item.edit" icon="edit" /> |           <a-button | ||||||
|  |             shape="circle" | ||||||
|  |             icon="edit" | ||||||
|  |             v-if="!item.edit" | ||||||
|  |             @click="showEditDetail(index)" /> | ||||||
|         </div> |         </div> | ||||||
|         <div slot="actions" v-if="!disableSettings"> |         <div slot="actions" v-if="!disableSettings && 'updateTemplate' in $store.getters.apis && 'updateVirtualMachine' in $store.getters.apis"> | ||||||
|           <a-popconfirm |           <a-popconfirm | ||||||
|             title="Delete setting?" |             title="Delete setting?" | ||||||
|             @confirm="deleteDetail(index)" |             @confirm="deleteDetail(index)" | ||||||
|  | |||||||
| @ -532,7 +532,7 @@ | |||||||
|         <div class="title">{{ $t('label.tags') }}</div> |         <div class="title">{{ $t('label.tags') }}</div> | ||||||
|         <div> |         <div> | ||||||
|           <template v-for="(tag, index) in tags"> |           <template v-for="(tag, index) in tags"> | ||||||
|             <a-tag :key="index" :closable="true" :afterClose="() => handleDeleteTag(tag)"> |             <a-tag :key="index" :closable="'deleteTags' in $store.getters.apis" :afterClose="() => handleDeleteTag(tag)"> | ||||||
|               {{ tag.key }} = {{ tag.value }} |               {{ tag.key }} = {{ tag.value }} | ||||||
|             </a-tag> |             </a-tag> | ||||||
|           </template> |           </template> | ||||||
| @ -544,9 +544,9 @@ | |||||||
|               @blur="handleInputConfirm" |               @blur="handleInputConfirm" | ||||||
|               @keyup.enter="handleInputConfirm" |               @keyup.enter="handleInputConfirm" | ||||||
|               compact> |               compact> | ||||||
|               <a-input ref="input" :value="inputKey" @change="handleKeyChange" style="width: 100px; text-align: center" placeholder="Key" /> |               <a-input ref="input" :value="inputKey" @change="handleKeyChange" style="width: 30%; text-align: center" placeholder="Key" /> | ||||||
|               <a-input style=" width: 30px; border-left: 0; pointer-events: none; backgroundColor: #fff" placeholder="=" disabled /> |               <a-input style=" width: 30px; border-left: 0; pointer-events: none; backgroundColor: #fff" placeholder="=" disabled /> | ||||||
|               <a-input :value="inputValue" @change="handleValueChange" style="width: 100px; text-align: center; border-left: 0" placeholder="Value" /> |               <a-input :value="inputValue" @change="handleValueChange" style="width: 30%; text-align: center; border-left: 0" placeholder="Value" /> | ||||||
|               <a-button shape="circle" size="small" @click="handleInputConfirm"> |               <a-button shape="circle" size="small" @click="handleInputConfirm"> | ||||||
|                 <a-icon type="check"/> |                 <a-icon type="check"/> | ||||||
|               </a-button> |               </a-button> | ||||||
| @ -555,7 +555,7 @@ | |||||||
|               </a-button> |               </a-button> | ||||||
|             </a-input-group> |             </a-input-group> | ||||||
|           </div> |           </div> | ||||||
|           <a-tag v-else @click="showInput" style="background: #fff; borderStyle: dashed;"> |           <a-tag @click="showInput" style="background: #fff; borderStyle: dashed;" v-else-if="'createTags' in $store.getters.apis"> | ||||||
|             <a-icon type="plus" /> New Tag |             <a-icon type="plus" /> New Tag | ||||||
|           </a-tag> |           </a-tag> | ||||||
|         </div> |         </div> | ||||||
|  | |||||||
| @ -193,6 +193,7 @@ | |||||||
|       <a-input |       <a-input | ||||||
|         v-if="editableValueKey === record.key" |         v-if="editableValueKey === record.key" | ||||||
|         :defaultValue="record.value" |         :defaultValue="record.value" | ||||||
|  |         :disabled="!('updateConfiguration' in $store.getters.apis)" | ||||||
|         v-model="editableValue" |         v-model="editableValue" | ||||||
|         @keydown.esc="editableValueKey = null" |         @keydown.esc="editableValueKey = null" | ||||||
|         @pressEnter="saveValue(record)"> |         @pressEnter="saveValue(record)"> | ||||||
| @ -204,11 +205,13 @@ | |||||||
|     <template slot="actions" slot-scope="text, record"> |     <template slot="actions" slot-scope="text, record"> | ||||||
|       <a-button |       <a-button | ||||||
|         shape="circle" |         shape="circle" | ||||||
|  |         :disabled="!('updateConfiguration' in $store.getters.apis)" | ||||||
|         v-if="editableValueKey !== record.key" |         v-if="editableValueKey !== record.key" | ||||||
|         icon="edit" |         icon="edit" | ||||||
|         @click="editValue(record)" /> |         @click="editValue(record)" /> | ||||||
|       <a-button |       <a-button | ||||||
|         shape="circle" |         shape="circle" | ||||||
|  |         :disabled="!('updateConfiguration' in $store.getters.apis)" | ||||||
|         @click="saveValue(record)" |         @click="saveValue(record)" | ||||||
|         v-if="editableValueKey === record.key" > |         v-if="editableValueKey === record.key" > | ||||||
|         <a-icon type="check-circle" theme="twoTone" twoToneColor="#52c41a" /> |         <a-icon type="check-circle" theme="twoTone" twoToneColor="#52c41a" /> | ||||||
|  | |||||||
| @ -29,6 +29,7 @@ | |||||||
|         :v-bind="item.resourcetypename" |         :v-bind="item.resourcetypename" | ||||||
|         :label="$t('label.max' + item.resourcetypename.replace('_', ''))"> |         :label="$t('label.max' + item.resourcetypename.replace('_', ''))"> | ||||||
|         <a-input-number |         <a-input-number | ||||||
|  |           :disabled="!('updateResourceLimit' in $store.getters.apis)" | ||||||
|           style="width: 100%;" |           style="width: 100%;" | ||||||
|           v-decorator="[item.resourcetype, { |           v-decorator="[item.resourcetype, { | ||||||
|             initialValue: item.max |             initialValue: item.max | ||||||
| @ -37,6 +38,7 @@ | |||||||
|       </a-form-item> |       </a-form-item> | ||||||
|       <div class="card-footer"> |       <div class="card-footer"> | ||||||
|         <a-button |         <a-button | ||||||
|  |           :disabled="!('updateResourceLimit' in $store.getters.apis)" | ||||||
|           v-if="!($route.meta.name === 'domain' && resource.level === 0)" |           v-if="!($route.meta.name === 'domain' && resource.level === 0)" | ||||||
|           :loading="formLoading" |           :loading="formLoading" | ||||||
|           type="primary" |           type="primary" | ||||||
|  | |||||||
| @ -23,6 +23,7 @@ | |||||||
|       <div slot="actions" class="action"> |       <div slot="actions" class="action"> | ||||||
|         <a-button |         <a-button | ||||||
|           shape="circle" |           shape="circle" | ||||||
|  |           :disabled="!('updateConfiguration' in $store.getters.apis)" | ||||||
|           v-if="editableValueKey !== index" |           v-if="editableValueKey !== index" | ||||||
|           icon="edit" |           icon="edit" | ||||||
|           @click="setEditableSetting(item, index)" /> |           @click="setEditableSetting(item, index)" /> | ||||||
|  | |||||||
| @ -57,7 +57,7 @@ export default { | |||||||
|           component: () => import('@/views/image/RegisterOrUploadTemplate.vue') |           component: () => import('@/views/image/RegisterOrUploadTemplate.vue') | ||||||
|         }, |         }, | ||||||
|         { |         { | ||||||
|           api: 'getUploadParamsForTemplate', |           api: 'registerTemplate', | ||||||
|           icon: 'cloud-upload', |           icon: 'cloud-upload', | ||||||
|           label: 'label.upload.template.from.local', |           label: 'label.upload.template.from.local', | ||||||
|           listView: true, |           listView: true, | ||||||
| @ -132,7 +132,7 @@ export default { | |||||||
|           component: () => import('@/views/image/RegisterOrUploadIso.vue') |           component: () => import('@/views/image/RegisterOrUploadIso.vue') | ||||||
|         }, |         }, | ||||||
|         { |         { | ||||||
|           api: 'getUploadParamsForIso', |           api: 'registerIso', | ||||||
|           icon: 'cloud-upload', |           icon: 'cloud-upload', | ||||||
|           label: 'label.upload.iso.from.local', |           label: 'label.upload.iso.from.local', | ||||||
|           listView: true, |           listView: true, | ||||||
|  | |||||||
| @ -43,7 +43,7 @@ export default { | |||||||
|           component: () => import('@/views/storage/CreateVolume.vue') |           component: () => import('@/views/storage/CreateVolume.vue') | ||||||
|         }, |         }, | ||||||
|         { |         { | ||||||
|           api: 'getUploadParamsForVolume', |           api: 'createVolume', | ||||||
|           icon: 'cloud-upload', |           icon: 'cloud-upload', | ||||||
|           label: 'label.upload.volume.from.local', |           label: 'label.upload.volume.from.local', | ||||||
|           listView: true, |           listView: true, | ||||||
|  | |||||||
| @ -89,7 +89,11 @@ | |||||||
|       </a-collapse-panel> |       </a-collapse-panel> | ||||||
| 
 | 
 | ||||||
|       <a-collapse-panel :header="'Network Adapter(s): ' + (vm && vm.nic ? vm.nic.length : 0)" key="3" > |       <a-collapse-panel :header="'Network Adapter(s): ' + (vm && vm.nic ? vm.nic.length : 0)" key="3" > | ||||||
|         <a-button type="primary" @click="showAddModal" :loading="loadingNic"> |         <a-button | ||||||
|  |           type="primary" | ||||||
|  |           @click="showAddModal" | ||||||
|  |           :loading="loadingNic" | ||||||
|  |           :disabled="!('addNicToVirtualMachine' in $store.getters.apis)"> | ||||||
|           <a-icon type="plus"></a-icon> {{ $t('label.network.addvm') }} |           <a-icon type="plus"></a-icon> {{ $t('label.network.addvm') }} | ||||||
|         </a-button> |         </a-button> | ||||||
|         <a-divider class="divider-small" /> |         <a-divider class="divider-small" /> | ||||||
| @ -119,6 +123,7 @@ | |||||||
|                       v-if="!item.isdefault" |                       v-if="!item.isdefault" | ||||||
|                     > |                     > | ||||||
|                       <a-button |                       <a-button | ||||||
|  |                         :disabled="!('updateDefaultNicForVirtualMachine' in $store.getters.apis)" | ||||||
|                         icon="check-square" |                         icon="check-square" | ||||||
|                         shape="circle" /> |                         shape="circle" /> | ||||||
|                     </a-popconfirm> |                     </a-popconfirm> | ||||||
| @ -129,6 +134,7 @@ | |||||||
|                       <a-button |                       <a-button | ||||||
|                         icon="swap" |                         icon="swap" | ||||||
|                         shape="circle" |                         shape="circle" | ||||||
|  |                         :disabled="!('updateVmNicIp' in $store.getters.apis)" | ||||||
|                         @click="editIpAddressNic = item.id; showUpdateIpModal = true" /> |                         @click="editIpAddressNic = item.id; showUpdateIpModal = true" /> | ||||||
|                     </a-tooltip> |                     </a-tooltip> | ||||||
|                     <a-tooltip placement="bottom" v-if="item.type !== 'L2'"> |                     <a-tooltip placement="bottom" v-if="item.type !== 'L2'"> | ||||||
| @ -138,6 +144,7 @@ | |||||||
|                       <a-button |                       <a-button | ||||||
|                         icon="environment" |                         icon="environment" | ||||||
|                         shape="circle" |                         shape="circle" | ||||||
|  |                         :disabled="(!('addIpToNic' in $store.getters.apis) && !('addIpToNic' in $store.getters.apis))" | ||||||
|                         @click="fetchSecondaryIPs(item.id)" /> |                         @click="fetchSecondaryIPs(item.id)" /> | ||||||
|                     </a-tooltip> |                     </a-tooltip> | ||||||
|                     <a-popconfirm |                     <a-popconfirm | ||||||
| @ -148,6 +155,7 @@ | |||||||
|                       v-if="!item.isdefault" |                       v-if="!item.isdefault" | ||||||
|                     > |                     > | ||||||
|                       <a-button |                       <a-button | ||||||
|  |                         :disabled="!('removeNicFromVirtualMachine' in $store.getters.apis)" | ||||||
|                         type="danger" |                         type="danger" | ||||||
|                         icon="delete" |                         icon="delete" | ||||||
|                         shape="circle" /> |                         shape="circle" /> | ||||||
|  | |||||||
| @ -52,6 +52,7 @@ | |||||||
|               Save new Rule |               Save new Rule | ||||||
|             </template> |             </template> | ||||||
|             <a-button |             <a-button | ||||||
|  |               :disabled="!('createRolePermission' in $store.getters.apis)" | ||||||
|               icon="plus" |               icon="plus" | ||||||
|               type="primary" |               type="primary" | ||||||
|               shape="circle" |               shape="circle" | ||||||
| @ -94,6 +95,7 @@ | |||||||
|             </div> |             </div> | ||||||
|             <div class="rules-table__col rules-table__col--actions"> |             <div class="rules-table__col rules-table__col--actions"> | ||||||
|               <rule-delete |               <rule-delete | ||||||
|  |                 :disabled="!('deleteRolePermission' in $store.getters.apis)" | ||||||
|                 :record="record" |                 :record="record" | ||||||
|                 @delete="onRuleDelete(record.id)" /> |                 @delete="onRuleDelete(record.id)" /> | ||||||
|             </div> |             </div> | ||||||
|  | |||||||
| @ -40,6 +40,7 @@ | |||||||
|                 {{ $t('label.delete.sslcertificate') }} |                 {{ $t('label.delete.sslcertificate') }} | ||||||
|               </template> |               </template> | ||||||
|               <a-button |               <a-button | ||||||
|  |                 :disabled="!('deleteSslCert' in $store.getters.apis)" | ||||||
|                 type="danger" |                 type="danger" | ||||||
|                 shape="circle" |                 shape="circle" | ||||||
|                 icon="delete" |                 icon="delete" | ||||||
|  | |||||||
| @ -191,7 +191,7 @@ export default { | |||||||
|       selectedZone: '', |       selectedZone: '', | ||||||
|       uploadParams: null, |       uploadParams: null, | ||||||
|       uploadPercentage: 0, |       uploadPercentage: 0, | ||||||
|       currentForm: this.action.currentAction.api === 'registerIso' ? 'Create' : 'Upload' |       currentForm: this.action.currentAction.icon === 'plus' ? 'Create' : 'Upload' | ||||||
|     } |     } | ||||||
|   }, |   }, | ||||||
|   beforeCreate () { |   beforeCreate () { | ||||||
|  | |||||||
| @ -403,7 +403,7 @@ export default { | |||||||
|       allowed: false, |       allowed: false, | ||||||
|       allowDirectDownload: false, |       allowDirectDownload: false, | ||||||
|       uploadParams: null, |       uploadParams: null, | ||||||
|       currentForm: this.action.currentAction.api === 'registerTemplate' ? 'Create' : 'Upload' |       currentForm: this.action.currentAction.icon === 'plus' ? 'Create' : 'Upload' | ||||||
|     } |     } | ||||||
|   }, |   }, | ||||||
|   beforeCreate () { |   beforeCreate () { | ||||||
|  | |||||||
| @ -17,7 +17,12 @@ | |||||||
| 
 | 
 | ||||||
| <template> | <template> | ||||||
|   <a-spin :spinning="fetchLoading"> |   <a-spin :spinning="fetchLoading"> | ||||||
|     <a-button type="dashed" icon="plus" style="width: 100%" @click="handleOpenModal">{{ $t('label.dedicate.vlan.vni.range') }}</a-button> |     <a-button | ||||||
|  |       :disabled="!('dedicateGuestVlanRange' in $store.getters.apis)" | ||||||
|  |       type="dashed" | ||||||
|  |       icon="plus" | ||||||
|  |       style="width: 100%" | ||||||
|  |       @click="handleOpenModal">{{ $t('label.dedicate.vlan.vni.range') }}</a-button> | ||||||
|     <a-table |     <a-table | ||||||
|       size="small" |       size="small" | ||||||
|       style="overflow-y: auto; margin-top: 20px;" |       style="overflow-y: auto; margin-top: 20px;" | ||||||
| @ -34,7 +39,7 @@ | |||||||
|           cancelText="No" |           cancelText="No" | ||||||
|           placement="top" |           placement="top" | ||||||
|         > |         > | ||||||
|           <a-button icon="delete" type="danger" shape="circle"></a-button> |           <a-button :disabled="!('releaseDedicatedGuestVlanRange' in $store.getters.apis)" icon="delete" type="danger" shape="circle"></a-button> | ||||||
|         </a-popconfirm> |         </a-popconfirm> | ||||||
|       </template> |       </template> | ||||||
|     </a-table> |     </a-table> | ||||||
|  | |||||||
| @ -18,6 +18,7 @@ | |||||||
| <template> | <template> | ||||||
|   <a-spin :spinning="componentLoading"> |   <a-spin :spinning="componentLoading"> | ||||||
|     <a-button |     <a-button | ||||||
|  |       :disabled="!('createManagementNetworkIpRange' in $store.getters.apis)" | ||||||
|       type="dashed" |       type="dashed" | ||||||
|       icon="plus" |       icon="plus" | ||||||
|       style="margin-bottom: 20px; width: 100%" |       style="margin-bottom: 20px; width: 100%" | ||||||
| @ -41,6 +42,7 @@ | |||||||
|           <a-popover placement="bottom"> |           <a-popover placement="bottom"> | ||||||
|             <template slot="content">{{ $t('label.remove.ip.range') }}</template> |             <template slot="content">{{ $t('label.remove.ip.range') }}</template> | ||||||
|             <a-button |             <a-button | ||||||
|  |               :disabled="!('deleteManagementNetworkIpRange' in $store.getters.apis)" | ||||||
|               icon="delete" |               icon="delete" | ||||||
|               shape="circle" |               shape="circle" | ||||||
|               type="danger" |               type="danger" | ||||||
|  | |||||||
| @ -18,6 +18,7 @@ | |||||||
| <template> | <template> | ||||||
|   <a-spin :spinning="componentLoading"> |   <a-spin :spinning="componentLoading"> | ||||||
|     <a-button |     <a-button | ||||||
|  |       :disabled="!('createStorageNetworkIpRange' in $store.getters.apis)" | ||||||
|       type="dashed" |       type="dashed" | ||||||
|       icon="plus" |       icon="plus" | ||||||
|       style="margin-bottom: 20px; width: 100%" |       style="margin-bottom: 20px; width: 100%" | ||||||
| @ -40,6 +41,7 @@ | |||||||
|         <a-popover placement="bottom"> |         <a-popover placement="bottom"> | ||||||
|           <template slot="content">{{ $t('label.remove.ip.range') }}</template> |           <template slot="content">{{ $t('label.remove.ip.range') }}</template> | ||||||
|           <a-button |           <a-button | ||||||
|  |             :disabled="!('deleteStorageNetworkIpRange' in $store.getters.apis)" | ||||||
|             icon="delete" |             icon="delete" | ||||||
|             shape="circle" |             shape="circle" | ||||||
|             type="danger" |             type="danger" | ||||||
|  | |||||||
| @ -18,7 +18,12 @@ | |||||||
| <template> | <template> | ||||||
|   <a-spin :spinning="fetchLoading"> |   <a-spin :spinning="fetchLoading"> | ||||||
|     <div style="width: 100%; display: flex"> |     <div style="width: 100%; display: flex"> | ||||||
|       <a-button type="dashed" icon="plus" style="width: 100%; margin-right: 10px" @click="openAddRuleModal"> |       <a-button | ||||||
|  |         type="dashed" | ||||||
|  |         icon="plus" | ||||||
|  |         style="width: 100%; margin-right: 10px" | ||||||
|  |         :disabled="!('createNetworkACL' in $store.getters.apis)" | ||||||
|  |         @click="openAddRuleModal"> | ||||||
|         {{ $t('label.add') }} {{ $t('label.aclid') }} |         {{ $t('label.add') }} {{ $t('label.aclid') }} | ||||||
|       </a-button> |       </a-button> | ||||||
| 
 | 
 | ||||||
| @ -84,7 +89,7 @@ | |||||||
|             <div class="list__actions"> |             <div class="list__actions"> | ||||||
|               <a-button shape="circle" icon="tag" @click="() => openTagsModal(acl)"></a-button> |               <a-button shape="circle" icon="tag" @click="() => openTagsModal(acl)"></a-button> | ||||||
|               <a-button shape="circle" icon="edit" @click="() => openEditRuleModal(acl)"></a-button> |               <a-button shape="circle" icon="edit" @click="() => openEditRuleModal(acl)"></a-button> | ||||||
|               <a-button shape="circle" icon="delete" type="danger" @click="() => handleDeleteRule(acl.id)"></a-button> |               <a-button shape="circle" icon="delete" type="danger" :disabled="!('deleteNetworkACL' in $store.getters.apis)" @click="() => handleDeleteRule(acl.id)"></a-button> | ||||||
|             </div> |             </div> | ||||||
|           </div> |           </div> | ||||||
|         </transition-group> |         </transition-group> | ||||||
|  | |||||||
| @ -53,7 +53,7 @@ | |||||||
|           <a-input v-model="newRule.icmpcode"></a-input> |           <a-input v-model="newRule.icmpcode"></a-input> | ||||||
|         </div> |         </div> | ||||||
|         <div class="form__item"> |         <div class="form__item"> | ||||||
|           <a-button type="primary" icon="plus" @click="addRule">{{ $t('label.add') }}</a-button> |           <a-button :disabled="!('createEgressFirewallRule' in $store.getters.apis)" type="primary" icon="plus" @click="addRule">{{ $t('label.add') }}</a-button> | ||||||
|         </div> |         </div> | ||||||
|       </div> |       </div> | ||||||
|     </div> |     </div> | ||||||
| @ -78,7 +78,7 @@ | |||||||
|         {{ record.icmpcode || record.endport >= 0 ? record.icmpcode || record.endport : 'All' }} |         {{ record.icmpcode || record.endport >= 0 ? record.icmpcode || record.endport : 'All' }} | ||||||
|       </template> |       </template> | ||||||
|       <template slot="actions" slot-scope="record"> |       <template slot="actions" slot-scope="record"> | ||||||
|         <a-button shape="circle" type="danger" icon="delete" @click="deleteRule(record)" /> |         <a-button :disabled="!('deleteEgressFirewallRule' in $store.getters.apis)" shape="circle" type="danger" icon="delete" @click="deleteRule(record)" /> | ||||||
|       </template> |       </template> | ||||||
|     </a-table> |     </a-table> | ||||||
|     <a-pagination |     <a-pagination | ||||||
|  | |||||||
| @ -48,7 +48,7 @@ | |||||||
|           <a-input v-model="newRule.icmpcode"></a-input> |           <a-input v-model="newRule.icmpcode"></a-input> | ||||||
|         </div> |         </div> | ||||||
|         <div class="form__item" style="margin-left: auto;"> |         <div class="form__item" style="margin-left: auto;"> | ||||||
|           <a-button type="primary" @click="addRule">{{ $t('label.add') }}</a-button> |           <a-button :disabled="!('createFirewallRule' in $store.getters.apis)" type="primary" @click="addRule">{{ $t('label.add') }}</a-button> | ||||||
|         </div> |         </div> | ||||||
|       </div> |       </div> | ||||||
|     </div> |     </div> | ||||||
| @ -75,7 +75,13 @@ | |||||||
|       <template slot="actions" slot-scope="record"> |       <template slot="actions" slot-scope="record"> | ||||||
|         <div class="actions"> |         <div class="actions"> | ||||||
|           <a-button shape="circle" icon="tag" class="rule-action" @click="() => openTagsModal(record.id)" /> |           <a-button shape="circle" icon="tag" class="rule-action" @click="() => openTagsModal(record.id)" /> | ||||||
|           <a-button shape="circle" type="danger" icon="delete" class="rule-action" @click="deleteRule(record)" /> |           <a-button | ||||||
|  |             shape="circle" | ||||||
|  |             type="danger" | ||||||
|  |             icon="delete" | ||||||
|  |             class="rule-action" | ||||||
|  |             :disabled="!('deleteFirewallRule' in $store.getters.apis)" | ||||||
|  |             @click="deleteRule(record)" /> | ||||||
|         </div> |         </div> | ||||||
|       </template> |       </template> | ||||||
|     </a-table> |     </a-table> | ||||||
| @ -101,14 +107,14 @@ | |||||||
|           <p class="add-tags__label">{{ $t('label.value') }}</p> |           <p class="add-tags__label">{{ $t('label.value') }}</p> | ||||||
|           <a-input v-model="newTag.value"></a-input> |           <a-input v-model="newTag.value"></a-input> | ||||||
|         </div> |         </div> | ||||||
|         <a-button type="primary" @click="() => handleAddTag()" :loading="addTagLoading">{{ $t('label.add') }}</a-button> |         <a-button type="primary" :disabled="!('createTag' in $store.getters.apis)" @click="() => handleAddTag()" :loading="addTagLoading">{{ $t('label.add') }}</a-button> | ||||||
|       </div> |       </div> | ||||||
| 
 | 
 | ||||||
|       <a-divider></a-divider> |       <a-divider></a-divider> | ||||||
| 
 | 
 | ||||||
|       <div class="tags-container"> |       <div class="tags-container"> | ||||||
|         <div class="tags" v-for="(tag, index) in tags" :key="index"> |         <div class="tags" v-for="(tag, index) in tags" :key="index"> | ||||||
|           <a-tag :key="index" :closable="true" :afterClose="() => handleDeleteTag(tag)"> |           <a-tag :key="index" :closable="'deleteTag' in $store.getters.apis" :afterClose="() => handleDeleteTag(tag)"> | ||||||
|             {{ tag.key }} = {{ tag.value }} |             {{ tag.key }} = {{ tag.value }} | ||||||
|           </a-tag> |           </a-tag> | ||||||
|         </div> |         </div> | ||||||
|  | |||||||
| @ -64,7 +64,7 @@ | |||||||
|           </div> |           </div> | ||||||
|         </div> |         </div> | ||||||
|         <div class="form__item" style="flex: 0"> |         <div class="form__item" style="flex: 0"> | ||||||
|           <a-button type="primary" @click="handleAddRule">{{ $t('label.add') }}</a-button> |           <a-button :disabled="!('authorizeSecurityGroupInress' in $store.getters.apis) && !('authorizeSecurityGroupEgress' in $store.getters.apis)" type="primary" @click="handleAddRule">{{ $t('label.add') }}</a-button> | ||||||
|         </div> |         </div> | ||||||
|       </div> |       </div> | ||||||
|     </div> |     </div> | ||||||
| @ -92,7 +92,7 @@ | |||||||
|           okText="Yes" |           okText="Yes" | ||||||
|           cancelText="No" |           cancelText="No" | ||||||
|         > |         > | ||||||
|           <a-button shape="circle" type="danger" icon="delete" class="rule-action" /> |           <a-button :disabled="!('revokeSecurityGroupIngress' in $store.getters.apis) && !('revokeSecurityGroupEgress' in $store.getters.apis)" shape="circle" type="danger" icon="delete" class="rule-action" /> | ||||||
|         </a-popconfirm> |         </a-popconfirm> | ||||||
|       </template> |       </template> | ||||||
|     </a-table> |     </a-table> | ||||||
|  | |||||||
| @ -17,7 +17,7 @@ | |||||||
| 
 | 
 | ||||||
| <template> | <template> | ||||||
|   <a-spin :spinning="fetchLoading"> |   <a-spin :spinning="fetchLoading"> | ||||||
|     <a-button type="dashed" icon="plus" style="width: 100%; margin-bottom: 15px" @click="acquireIpAddress"> |     <a-button :disabled="!('associateIpAddress' in $store.getters.apis)" type="dashed" icon="plus" style="width: 100%; margin-bottom: 15px" @click="acquireIpAddress"> | ||||||
|       {{ $t('label.acquire.new.ip') }} |       {{ $t('label.acquire.new.ip') }} | ||||||
|     </a-button> |     </a-button> | ||||||
|     <div v-if="$route.path.startsWith('/vpc')"> |     <div v-if="$route.path.startsWith('/vpc')"> | ||||||
| @ -68,6 +68,7 @@ | |||||||
|           type="danger" |           type="danger" | ||||||
|           icon="delete" |           icon="delete" | ||||||
|           shape="circle" |           shape="circle" | ||||||
|  |           :disabled="!('disassociateIpAddress' in $store.getters.apis)" | ||||||
|           @click="releaseIpAddress(record)" /> |           @click="releaseIpAddress(record)" /> | ||||||
|       </template> |       </template> | ||||||
|     </a-table> |     </a-table> | ||||||
|  | |||||||
| @ -34,6 +34,8 @@ | |||||||
|           <a-input v-model="newRule.privateport"></a-input> |           <a-input v-model="newRule.privateport"></a-input> | ||||||
|           <span class="error-text">Required</span> |           <span class="error-text">Required</span> | ||||||
|         </div> |         </div> | ||||||
|  |       </div> | ||||||
|  |       <div class="form"> | ||||||
|         <div class="form__item"> |         <div class="form__item"> | ||||||
|           <div class="form__label">{{ $t('label.algorithm') }}</div> |           <div class="form__label">{{ $t('label.algorithm') }}</div> | ||||||
|           <a-select v-model="newRule.algorithm"> |           <a-select v-model="newRule.algorithm"> | ||||||
| @ -52,7 +54,7 @@ | |||||||
|         </div> |         </div> | ||||||
|         <div class="form__item"> |         <div class="form__item"> | ||||||
|           <div class="form__label" style="white-space: nowrap;">{{ $t('label.add.vms') }}</div> |           <div class="form__label" style="white-space: nowrap;">{{ $t('label.add.vms') }}</div> | ||||||
|           <a-button type="primary" @click="handleOpenAddVMModal">Add</a-button> |           <a-button :disabled="!('createLoadBalancerRule' in $store.getters.apis)" type="primary" @click="handleOpenAddVMModal">Add</a-button> | ||||||
|         </div> |         </div> | ||||||
|       </div> |       </div> | ||||||
|     </div> |     </div> | ||||||
| @ -107,14 +109,14 @@ | |||||||
|       <template slot="actions" slot-scope="record"> |       <template slot="actions" slot-scope="record"> | ||||||
|         <div class="actions"> |         <div class="actions"> | ||||||
|           <a-button shape="circle" icon="edit" @click="() => openEditRuleModal(record)"></a-button> |           <a-button shape="circle" icon="edit" @click="() => openEditRuleModal(record)"></a-button> | ||||||
|           <a-button shape="circle" icon="tag" @click="() => openTagsModal(record.id)" /> |           <a-button :disabled="!('editLoadBalancerRule' in $store.getters.apis)" shape="circle" icon="tag" @click="() => openTagsModal(record.id)" /> | ||||||
|           <a-popconfirm |           <a-popconfirm | ||||||
|             :title="$t('label.delete') + '?'" |             :title="$t('label.delete') + '?'" | ||||||
|             @confirm="handleDeleteRule(record)" |             @confirm="handleDeleteRule(record)" | ||||||
|             okText="Yes" |             okText="Yes" | ||||||
|             cancelText="No" |             cancelText="No" | ||||||
|           > |           > | ||||||
|             <a-button shape="circle" type="danger" icon="delete" /> |             <a-button :disabled="!('deleteLoadBalancerRule' in $store.getters.apis)" shape="circle" type="danger" icon="delete" /> | ||||||
|           </a-popconfirm> |           </a-popconfirm> | ||||||
|         </div> |         </div> | ||||||
|       </template> |       </template> | ||||||
| @ -149,14 +151,14 @@ | |||||||
|             <a-input v-decorator="['value', { rules: [{ required: true, message: 'Please specify a tag value'}] }]" /> |             <a-input v-decorator="['value', { rules: [{ required: true, message: 'Please specify a tag value'}] }]" /> | ||||||
|           </a-form-item> |           </a-form-item> | ||||||
|         </div> |         </div> | ||||||
|         <a-button type="primary" html-type="submit">{{ $t('label.add') }}</a-button> |         <a-button :disabled="!('createTags' in $store.getters.apis)" type="primary" html-type="submit">{{ $t('label.add') }}</a-button> | ||||||
|       </a-form> |       </a-form> | ||||||
| 
 | 
 | ||||||
|       <a-divider></a-divider> |       <a-divider></a-divider> | ||||||
| 
 | 
 | ||||||
|       <div v-show="!tagsModalLoading" class="tags-container"> |       <div v-show="!tagsModalLoading" class="tags-container"> | ||||||
|         <div class="tags" v-for="(tag, index) in tags" :key="index"> |         <div class="tags" v-for="(tag, index) in tags" :key="index"> | ||||||
|           <a-tag :key="index" :closable="true" :afterClose="() => handleDeleteTag(tag)"> |           <a-tag :key="index" :closable="'deleteTag' in $store.getters.apis" :afterClose="() => handleDeleteTag(tag)"> | ||||||
|             {{ tag.key }} = {{ tag.value }} |             {{ tag.key }} = {{ tag.value }} | ||||||
|           </a-tag> |           </a-tag> | ||||||
|         </div> |         </div> | ||||||
|  | |||||||
| @ -64,7 +64,7 @@ | |||||||
|         </div> |         </div> | ||||||
|         <div class="form__item" style="margin-left: auto;"> |         <div class="form__item" style="margin-left: auto;"> | ||||||
|           <div class="form__label">{{ $t('label.add.vm') }}</div> |           <div class="form__label">{{ $t('label.add.vm') }}</div> | ||||||
|           <a-button type="primary" @click="openAddVMModal">{{ $t('label.add') }}</a-button> |           <a-button :disabled="!('createPortForwardingRule' in $store.getters.apis)" type="primary" @click="openAddVMModal">{{ $t('label.add') }}</a-button> | ||||||
|         </div> |         </div> | ||||||
|       </div> |       </div> | ||||||
|     </div> |     </div> | ||||||
| @ -97,7 +97,13 @@ | |||||||
|       <template slot="actions" slot-scope="record"> |       <template slot="actions" slot-scope="record"> | ||||||
|         <div class="actions"> |         <div class="actions"> | ||||||
|           <a-button shape="circle" icon="tag" class="rule-action" @click="() => openTagsModal(record.id)" /> |           <a-button shape="circle" icon="tag" class="rule-action" @click="() => openTagsModal(record.id)" /> | ||||||
|           <a-button shape="circle" type="danger" icon="delete" class="rule-action" @click="deleteRule(record)" /> |           <a-button | ||||||
|  |             shape="circle" | ||||||
|  |             type="danger" | ||||||
|  |             icon="delete" | ||||||
|  |             class="rule-action" | ||||||
|  |             :disabled="!('deletePortForwardingRule' in $store.getters.apis)" | ||||||
|  |             @click="deleteRule(record)" /> | ||||||
|         </div> |         </div> | ||||||
|       </template> |       </template> | ||||||
|     </a-table> |     </a-table> | ||||||
|  | |||||||
| @ -19,7 +19,7 @@ | |||||||
|   <a-spin :spinning="componentLoading"> |   <a-spin :spinning="componentLoading"> | ||||||
|     <div class="new-route"> |     <div class="new-route"> | ||||||
|       <a-input v-model="newRoute" icon="plus" :placeholder="$t('label.cidr.destination.network')"></a-input> |       <a-input v-model="newRoute" icon="plus" :placeholder="$t('label.cidr.destination.network')"></a-input> | ||||||
|       <a-button type="primary" @click="handleAdd">{{ $t('label.add.route') }}</a-button> |       <a-button type="primary" :disabled="!('createStaticRoute' in $store.getters.apis)" @click="handleAdd">{{ $t('label.add.route') }}</a-button> | ||||||
|     </div> |     </div> | ||||||
| 
 | 
 | ||||||
|     <div class="list"> |     <div class="list"> | ||||||
| @ -30,7 +30,7 @@ | |||||||
|         </div> |         </div> | ||||||
|         <div class="actions"> |         <div class="actions"> | ||||||
|           <a-button shape="circle" icon="tag" @click="() => openTagsModal(route)"></a-button> |           <a-button shape="circle" icon="tag" @click="() => openTagsModal(route)"></a-button> | ||||||
|           <a-button shape="circle" icon="delete" type="danger" @click="() => handleDelete(route)"></a-button> |           <a-button :disabled="!('deleteStaticRoute' in $store.getters.apis)" shape="circle" icon="delete" type="danger" @click="() => handleDelete(route)"></a-button> | ||||||
|         </div> |         </div> | ||||||
|       </div> |       </div> | ||||||
|     </div> |     </div> | ||||||
| @ -52,14 +52,14 @@ | |||||||
|               <a-input v-decorator="['value', { rules: [{ required: true, message: 'Please specify a tag value'}] }]" /> |               <a-input v-decorator="['value', { rules: [{ required: true, message: 'Please specify a tag value'}] }]" /> | ||||||
|             </a-form-item> |             </a-form-item> | ||||||
|           </div> |           </div> | ||||||
|           <a-button type="primary" html-type="submit">{{ $t('label.add') }}</a-button> |           <a-button type="primary" :disabled="!('createTags' in $store.getters.apis)" html-type="submit">{{ $t('label.add') }}</a-button> | ||||||
|         </a-form> |         </a-form> | ||||||
| 
 | 
 | ||||||
|         <a-divider style="margin-top: 0;"></a-divider> |         <a-divider style="margin-top: 0;"></a-divider> | ||||||
| 
 | 
 | ||||||
|         <div class="tags-container"> |         <div class="tags-container"> | ||||||
|           <div class="tags" v-for="(tag, index) in tags" :key="index"> |           <div class="tags" v-for="(tag, index) in tags" :key="index"> | ||||||
|             <a-tag :key="index" :closable="true" :afterClose="() => handleDeleteTag(tag)"> |             <a-tag :key="index" :closable="'deleteTags' in $store.getters.apis" :afterClose="() => handleDeleteTag(tag)"> | ||||||
|               {{ tag.key }} = {{ tag.value }} |               {{ tag.key }} = {{ tag.value }} | ||||||
|             </a-tag> |             </a-tag> | ||||||
|           </div> |           </div> | ||||||
|  | |||||||
| @ -36,6 +36,7 @@ | |||||||
|           type="dashed" |           type="dashed" | ||||||
|           icon="plus" |           icon="plus" | ||||||
|           style="width: 100%" |           style="width: 100%" | ||||||
|  |           :disabled="!('createNetworkACLList' in $store.getters.apis)" | ||||||
|           @click="() => handleOpenModals('networkAcl')"> |           @click="() => handleOpenModals('networkAcl')"> | ||||||
|           Add Network ACL List |           Add Network ACL List | ||||||
|         </a-button> |         </a-button> | ||||||
| @ -83,6 +84,7 @@ | |||||||
|           type="dashed" |           type="dashed" | ||||||
|           icon="plus" |           icon="plus" | ||||||
|           style="width: 100%" |           style="width: 100%" | ||||||
|  |           :disabled="!('createPrivateGateway' in $store.getters.apis)" | ||||||
|           @click="() => handleOpenModals('privateGateways')">Add Private Gateway</a-button> |           @click="() => handleOpenModals('privateGateways')">Add Private Gateway</a-button> | ||||||
|         <a-table |         <a-table | ||||||
|           class="table" |           class="table" | ||||||
| @ -166,6 +168,7 @@ | |||||||
|           type="dashed" |           type="dashed" | ||||||
|           icon="plus" |           icon="plus" | ||||||
|           style="width: 100%" |           style="width: 100%" | ||||||
|  |           :disabled="!('createVpnGateway' in $store.getters.apis)" | ||||||
|           @click="handleCreateVpnGateway"> |           @click="handleCreateVpnGateway"> | ||||||
|           Create Site-to-Site VPN Gateway |           Create Site-to-Site VPN Gateway | ||||||
|         </a-button> |         </a-button> | ||||||
| @ -189,6 +192,7 @@ | |||||||
|           type="dashed" |           type="dashed" | ||||||
|           icon="plus" |           icon="plus" | ||||||
|           style="width: 100%" |           style="width: 100%" | ||||||
|  |           :disabled="!('createVpnConnection' in $store.getters.apis)" | ||||||
|           @click="handleOpenModals('vpnConnection')"> |           @click="handleOpenModals('vpnConnection')"> | ||||||
|           Create Site-to-Site VPN Connection |           Create Site-to-Site VPN Connection | ||||||
|         </a-button> |         </a-button> | ||||||
|  | |||||||
| @ -17,7 +17,12 @@ | |||||||
| 
 | 
 | ||||||
| <template> | <template> | ||||||
|   <a-spin :spinning="fetchLoading"> |   <a-spin :spinning="fetchLoading"> | ||||||
|     <a-button type="dashed" icon="plus" style="width: 100%;margin-bottom: 20px;" @click="handleOpenModal">Add Network</a-button> |     <a-button | ||||||
|  |       type="dashed" | ||||||
|  |       icon="plus" | ||||||
|  |       style="width: 100%;margin-bottom: 20px;" | ||||||
|  |       :disabled="!('createNetwork' in $store.getters.apis)" | ||||||
|  |       @click="handleOpenModal">Add Network</a-button> | ||||||
|     <a-list class="list"> |     <a-list class="list"> | ||||||
|       <a-list-item v-for="(network, idx) in networks" :key="idx" class="list__item"> |       <a-list-item v-for="(network, idx) in networks" :key="idx" class="list__item"> | ||||||
|         <div class="list__item-outer-container"> |         <div class="list__item-outer-container"> | ||||||
| @ -57,7 +62,12 @@ | |||||||
|               <a-icon type="caret-right" :rotate="props.isActive ? 90 : 0" /> |               <a-icon type="caret-right" :rotate="props.isActive ? 90 : 0" /> | ||||||
|             </template> |             </template> | ||||||
|             <a-collapse-panel :header="$t('label.instances')" key="vm" :style="customStyle"> |             <a-collapse-panel :header="$t('label.instances')" key="vm" :style="customStyle"> | ||||||
|               <a-button icon="plus" type="dashed" style="margin-bottom: 15px; width: 100%" @click="$router.push({ path: '/action/deployVirtualMachine?networkid=' + network.id })"> |               <a-button | ||||||
|  |                 icon="plus" | ||||||
|  |                 type="dashed" | ||||||
|  |                 style="margin-bottom: 15px; width: 100%" | ||||||
|  |                 :disabled="!('deployVirtualMachine' in $store.getters.apis)" | ||||||
|  |                 @click="$router.push({ path: '/action/deployVirtualMachine?networkid=' + network.id })"> | ||||||
|                 {{ $t('label.vm.add') }} |                 {{ $t('label.vm.add') }} | ||||||
|               </a-button> |               </a-button> | ||||||
|               <a-table |               <a-table | ||||||
| @ -93,7 +103,12 @@ | |||||||
|                 showSizeChanger/> |                 showSizeChanger/> | ||||||
|             </a-collapse-panel> |             </a-collapse-panel> | ||||||
|             <a-collapse-panel :header="$t('label.internal.lb')" key="ilb" :style="customStyle" :disabled="!showIlb(network)" > |             <a-collapse-panel :header="$t('label.internal.lb')" key="ilb" :style="customStyle" :disabled="!showIlb(network)" > | ||||||
|               <a-button icon="plus" type="dashed" style="margin-bottom: 15px; width: 100%" @click="handleAddInternalLB(network.id)"> |               <a-button | ||||||
|  |                 icon="plus" | ||||||
|  |                 type="dashed" | ||||||
|  |                 style="margin-bottom: 15px; width: 100%" | ||||||
|  |                 :disabled="!('createLoadBalancer' in $store.getters.apis)" | ||||||
|  |                 @click="handleAddInternalLB(network.id)"> | ||||||
|                 {{ $t('label.add.internal.lb') }} |                 {{ $t('label.add.internal.lb') }} | ||||||
|               </a-button> |               </a-button> | ||||||
|               <a-table |               <a-table | ||||||
|  | |||||||
| @ -22,7 +22,7 @@ | |||||||
|       <p>Your IPSec pre-shared key is <strong>{{ remoteAccessVpn.presharedkey }}</strong></p> |       <p>Your IPSec pre-shared key is <strong>{{ remoteAccessVpn.presharedkey }}</strong></p> | ||||||
|       <a-divider/> |       <a-divider/> | ||||||
|       <a-button><router-link :to="{ path: '/vpnuser'}">Manage VPN Users</router-link></a-button> |       <a-button><router-link :to="{ path: '/vpnuser'}">Manage VPN Users</router-link></a-button> | ||||||
|       <a-button style="margin-left: 10px" type="danger" @click="disableVpn = true">Disable VPN</a-button> |       <a-button style="margin-left: 10px" type="danger" @click="disableVpn = true" :disabled="!('deleteRemoteAccessVpn' in $store.getters.apis)">Disable VPN</a-button> | ||||||
|     </div> |     </div> | ||||||
| 
 | 
 | ||||||
|     <a-modal v-model="disableVpn" :footer="null" oncancel="disableVpn = false" title="Disable Remove Access VPN"> |     <a-modal v-model="disableVpn" :footer="null" oncancel="disableVpn = false" title="Disable Remove Access VPN"> | ||||||
| @ -38,7 +38,7 @@ | |||||||
| 
 | 
 | ||||||
|   </div> |   </div> | ||||||
|   <div v-else> |   <div v-else> | ||||||
|     <a-button type="primary" @click="enableVpn = true">Enable VPN</a-button> |     <a-button :disabled="!('createRemoteAccessVpn' in $store.getters.apis)" type="primary" @click="enableVpn = true">Enable VPN</a-button> | ||||||
| 
 | 
 | ||||||
|     <a-modal v-model="enableVpn" :footer="null" onCancel="enableVpn = false" title="Enable Remote Access VPN"> |     <a-modal v-model="enableVpn" :footer="null" onCancel="enableVpn = false" title="Enable Remote Access VPN"> | ||||||
|       <p>Please confirm that you want Remote Access VPN enabled for this IP address.</p> |       <p>Please confirm that you want Remote Access VPN enabled for this IP address.</p> | ||||||
|  | |||||||
| @ -32,7 +32,13 @@ | |||||||
|               <template slot="title"> |               <template slot="title"> | ||||||
|                 {{ $t('label.make.project.owner') }} |                 {{ $t('label.make.project.owner') }} | ||||||
|               </template> |               </template> | ||||||
|               <a-button type="default" shape="circle" icon="user" size="small" @click="onMakeProjectOwner(record)" /> |               <a-button | ||||||
|  |                 type="default" | ||||||
|  |                 shape="circle" | ||||||
|  |                 icon="user" | ||||||
|  |                 size="small" | ||||||
|  |                 :disabled="!('updateProject' in $store.getters.apis)" | ||||||
|  |                 @click="onMakeProjectOwner(record)" /> | ||||||
|             </a-tooltip> |             </a-tooltip> | ||||||
|             <a-tooltip placement="top"> |             <a-tooltip placement="top"> | ||||||
|               <template slot="title"> |               <template slot="title"> | ||||||
| @ -43,6 +49,7 @@ | |||||||
|                 shape="circle" |                 shape="circle" | ||||||
|                 icon="delete" |                 icon="delete" | ||||||
|                 size="small" |                 size="small" | ||||||
|  |                 :disabled="!('deleteAccountFromProject' in $store.getters.apis)" | ||||||
|                 @click="onShowConfirmDelete(record)"/> |                 @click="onShowConfirmDelete(record)"/> | ||||||
|             </a-tooltip> |             </a-tooltip> | ||||||
|           </span> |           </span> | ||||||
|  | |||||||
| @ -148,7 +148,7 @@ | |||||||
|           <div class="tagsTitle">{{ $t('label.tags') }}</div> |           <div class="tagsTitle">{{ $t('label.tags') }}</div> | ||||||
|           <div> |           <div> | ||||||
|             <template v-for="(tag, index) in tags"> |             <template v-for="(tag, index) in tags"> | ||||||
|               <a-tag :key="index" :closable="true" :afterClose="() => handleDeleteTag(tag)"> |               <a-tag :key="index" :closable="'deleteTags' in $store.getters.apis" :afterClose="() => handleDeleteTag(tag)"> | ||||||
|                 {{ tag.key }} = {{ tag.value }} |                 {{ tag.key }} = {{ tag.value }} | ||||||
|               </a-tag> |               </a-tag> | ||||||
|             </template> |             </template> | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user