mirror of
				https://github.com/apache/cloudstack.git
				synced 2025-11-04 00:02:37 +01:00 
			
		
		
		
	config: allow custom action component needs to be in popup
When custom component is specified for an action, allow boolean option to display that component either in a popup or in routable component. Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
This commit is contained in:
		
							parent
							
								
									c4d20938f7
								
							
						
					
					
						commit
						0bd0fe2880
					
				@ -16,6 +16,7 @@ export default {
 | 
			
		||||
          icon: 'plus',
 | 
			
		||||
          label: 'Add Zone',
 | 
			
		||||
          listView: true,
 | 
			
		||||
          popup: true,
 | 
			
		||||
          component: () => import('@/views/infra/ZoneWizard.vue')
 | 
			
		||||
        }
 | 
			
		||||
      ]
 | 
			
		||||
 | 
			
		||||
@ -90,16 +90,16 @@
 | 
			
		||||
          :visible="showAction"
 | 
			
		||||
          :closable="true"
 | 
			
		||||
          style="top: 20px;"
 | 
			
		||||
          @ok="handleSubmit"
 | 
			
		||||
          @cancel="closeAction"
 | 
			
		||||
          :confirmLoading="currentAction.loading"
 | 
			
		||||
          :footer="null"
 | 
			
		||||
          centered
 | 
			
		||||
        >
 | 
			
		||||
          <component :is="currentAction.component"/></component>
 | 
			
		||||
        </a-modal>
 | 
			
		||||
      </keep-alive>
 | 
			
		||||
 | 
			
		||||
      <a-modal
 | 
			
		||||
        v-else
 | 
			
		||||
        :title="currentAction.label"
 | 
			
		||||
        :visible="showAction"
 | 
			
		||||
        :closable="true"
 | 
			
		||||
@ -369,7 +369,7 @@ export default {
 | 
			
		||||
      this.currentAction = {}
 | 
			
		||||
    },
 | 
			
		||||
    execAction (action) {
 | 
			
		||||
      if (action.component && action.api) {
 | 
			
		||||
      if (action.component && action.api && !action.popup) {
 | 
			
		||||
        this.$router.push({ name: action.api })
 | 
			
		||||
        return
 | 
			
		||||
      }
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user