-
Notifications
You must be signed in to change notification settings - Fork 257
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove table stripes, add border edges, fix row-actions with table-ac…
…tions=false
- Loading branch information
Showing
5 changed files
with
83 additions
and
74 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,55 @@ | ||
import Cluster from './cluster'; | ||
import { insertAt } from '@/utils/array'; | ||
|
||
export default Cluster; | ||
export default { | ||
|
||
_availableActions() { | ||
const out = this._standardActions; | ||
|
||
insertAt(out, 0, { | ||
action: 'openShell', | ||
label: 'Kubectl Shell', | ||
icon: 'icon icon-terminal', | ||
enabled: !!this.links.shell, | ||
}); | ||
|
||
return out; | ||
}, | ||
|
||
openShell() { | ||
return () => { | ||
this.$dispatch('wm/open', { | ||
id: `kubectl-${ this.id }`, | ||
label: this.$rootGetters['i18n/t']('wm.kubectlShell.title', { name: this.nameDisplay }), | ||
icon: 'terminal', | ||
component: 'KubectlShell', | ||
attrs: { | ||
cluster: this, | ||
pod: {} | ||
} | ||
}, { root: true }); | ||
}; | ||
}, | ||
|
||
isReady() { | ||
return this.hasCondition('Ready'); | ||
}, | ||
|
||
configName() { | ||
const allKeys = Object.keys(this.spec); | ||
const configKey = allKeys.find( kee => kee.includes('Config')); | ||
|
||
return configKey; | ||
}, | ||
|
||
kubernetesVersion() { | ||
if ( this?.status?.version?.gitVersion ) { | ||
return this.status.version.gitVersion; | ||
} else { | ||
return this.$rootGetters['i18n/t']('generic.unknown'); | ||
} | ||
}, | ||
|
||
canDelete() { | ||
return this.hasLink('remove') && !this?.spec?.internal; | ||
}, | ||
}; |