mirror of https://github.com/rancher/dashboard.git
clean up
This commit is contained in:
parent
656d13af1b
commit
cdeb02a221
|
|
@ -12,12 +12,6 @@ export default {
|
|||
type: String,
|
||||
default: 'text',
|
||||
},
|
||||
// if true, hide placeholder text until field is focused, then show until field has value
|
||||
// If false, show placeholder text until field is focused
|
||||
hidePlaceholder: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
mode: {
|
||||
type: String,
|
||||
default: _EDIT
|
||||
|
|
@ -59,20 +53,12 @@ export default {
|
|||
|
||||
onFocus() {
|
||||
this.onFocusLabeled();
|
||||
if (this.hidePlaceholder) {
|
||||
this.actualPlaceholder = `${ this.placeholder }`;
|
||||
} else {
|
||||
this.actualPlaceholder = '';
|
||||
}
|
||||
this.actualPlaceholder = '';
|
||||
},
|
||||
|
||||
onBlur() {
|
||||
this.onBlurLabeled();
|
||||
if (this.hidePlaceholder) {
|
||||
this.actualPlaceholder = null;
|
||||
} else {
|
||||
this.actualPlaceholder = `${ this.placeholder }`;
|
||||
}
|
||||
this.actualPlaceholder = `${ this.placeholder }`;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
|
|||
|
|
@ -16,32 +16,14 @@ export const NODE_ROLES = {
|
|||
ETCD: 'node-role.kubernetes.io/etcd',
|
||||
};
|
||||
|
||||
// TODO consult w/ backend about what labels & annotations to hide from editing
|
||||
export const LABEL_PREFIX_TO_IGNORE = [
|
||||
'io.cattle.lifecycle.',
|
||||
'beta.kubernetes.io/',
|
||||
'failure-domain.beta.kubernetes.io/',
|
||||
'node-role.kubernetes.io/',
|
||||
'kubernetes.io/',
|
||||
'cattle.io/',
|
||||
'authz.management.cattle.io',
|
||||
'rke.cattle.io',
|
||||
'field.cattle.io',
|
||||
'workload.user.cattle.io/',
|
||||
'k3s.io',
|
||||
'node.kubernetes.io',
|
||||
];
|
||||
|
||||
export const ANNOTATIONS_TO_IGNORE_CONTAINS = [
|
||||
'coreos.com/',
|
||||
'cattle.io/',
|
||||
'k3s.io',
|
||||
];
|
||||
|
||||
export const ANNOTATIONS_TO_IGNORE_PREFIX = [
|
||||
'kubernetes.io/',
|
||||
'beta.kubernetes.io/',
|
||||
'node.alpha.kubernetes.io/',
|
||||
'volumes.kubernetes.io/',
|
||||
'k3s.io',
|
||||
DESCRIPTION
|
||||
]
|
||||
;
|
||||
|
|
|
|||
|
|
@ -6,11 +6,14 @@ import DetailTop from '@/components/DetailTop';
|
|||
import SortableTable from '@/components/SortableTable';
|
||||
import { KEY, VALUE } from '@/config/table-headers';
|
||||
import { base64Decode } from '@/utils/crypto';
|
||||
import CreateEditView from '@/mixins/create-edit-view';
|
||||
|
||||
export default {
|
||||
components: {
|
||||
DetailTop,
|
||||
SortableTable,
|
||||
},
|
||||
mixins: [CreateEditView],
|
||||
props: {
|
||||
value: {
|
||||
type: Object,
|
||||
|
|
@ -147,5 +150,29 @@ export default {
|
|||
/>
|
||||
</div>
|
||||
</template>
|
||||
<Tabbed default-tab="labels">
|
||||
<Tab name="labels" label="Labels">
|
||||
<KeyValue
|
||||
key="labels"
|
||||
v-model="labels"
|
||||
:mode="mode"
|
||||
title="Labels"
|
||||
:initial-empty-row="true"
|
||||
:pad-left="false"
|
||||
:read-allowed="false"
|
||||
/>
|
||||
</Tab>
|
||||
<Tab name="annotations" label="Annotations">
|
||||
<KeyValue
|
||||
key="annotations"
|
||||
v-model="annotations"
|
||||
:mode="mode"
|
||||
title="Annotations"
|
||||
:initial-empty-row="true"
|
||||
:pad-left="false"
|
||||
:read-allowed="false"
|
||||
/>
|
||||
</Tab>
|
||||
</Tabbed>
|
||||
</div>
|
||||
</template>
|
||||
|
|
|
|||
|
|
@ -156,8 +156,7 @@ export default {
|
|||
</div>
|
||||
<template v-else>
|
||||
<NameNsDescription
|
||||
v-model="value.metadata"
|
||||
:description.sync="description"
|
||||
v-model="value"
|
||||
:namespaced="false"
|
||||
:mode="mode"
|
||||
name-label="Name"
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ export default {
|
|||
RadioGroup,
|
||||
NameNsDescription,
|
||||
Tabbed,
|
||||
Tab
|
||||
Tab,
|
||||
},
|
||||
|
||||
mixins: [CreateEditView],
|
||||
|
|
@ -61,7 +61,6 @@ export default {
|
|||
|
||||
return {
|
||||
types,
|
||||
// type: this.value._type,
|
||||
isNamespaced,
|
||||
registryAddresses,
|
||||
newNS: false,
|
||||
|
|
|
|||
Loading…
Reference in New Issue