mirror of
				https://github.com/apache/cloudstack.git
				synced 2025-11-04 00:02:37 +01:00 
			
		
		
		
	ui: Fix bulk deletion of ssh key pairs (#6286)
This commit is contained in:
		
							parent
							
								
									4313c3def7
								
							
						
					
					
						commit
						c339f6eef9
					
				@ -622,9 +622,9 @@ export default {
 | 
			
		||||
          popup: true,
 | 
			
		||||
          groupMap: (selection, values, record) => {
 | 
			
		||||
            return selection.map(x => {
 | 
			
		||||
              const data = record.filter(y => { return y.name === x })
 | 
			
		||||
              const data = record.filter(y => { return y.id === x })
 | 
			
		||||
              return {
 | 
			
		||||
                name: x, account: data[0].account, domainid: data[0].domainid
 | 
			
		||||
                name: data[0].name, account: data[0].account, domainid: data[0].domainid
 | 
			
		||||
              }
 | 
			
		||||
            })
 | 
			
		||||
          }
 | 
			
		||||
 | 
			
		||||
@ -590,7 +590,7 @@ export default {
 | 
			
		||||
          if (this.$route.path.includes('/template') || this.$route.path.includes('/iso')) {
 | 
			
		||||
            objIndex = selectedItems.findIndex(obj => (obj.zoneid === tempResource[r]))
 | 
			
		||||
          } else {
 | 
			
		||||
            objIndex = selectedItems.findIndex(obj => (obj.id === tempResource[r] || obj.username === tempResource[r]))
 | 
			
		||||
            objIndex = selectedItems.findIndex(obj => (obj.id === tempResource[r] || obj.username === tempResource[r] || obj.name === tempResource[r]))
 | 
			
		||||
          }
 | 
			
		||||
          if (state && objIndex !== -1) {
 | 
			
		||||
            this.selectedItems[objIndex].status = state
 | 
			
		||||
@ -1261,7 +1261,7 @@ export default {
 | 
			
		||||
          this.items.map(x => {
 | 
			
		||||
            itemsNameMap[x.id] = x.name || x.displaytext || x.id
 | 
			
		||||
          })
 | 
			
		||||
          const paramsList = this.currentAction.groupMap(this.selectedRowKeys, values)
 | 
			
		||||
          const paramsList = this.currentAction.groupMap(this.selectedRowKeys, values, this.items)
 | 
			
		||||
          for (const params of paramsList) {
 | 
			
		||||
            var resourceName = itemsNameMap[params.id]
 | 
			
		||||
            // Using a method for this since it's an async call and don't want wrong prarms to be passed
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user