forked from JointCloud/JCC-RIP
fix data render
This commit is contained in:
parent
b07bf993ce
commit
7f09933ff1
|
@ -57,7 +57,7 @@
|
|||
|
||||
<script>
|
||||
import { getNamespaceYaml, postNamespace, putNamespace } from '@/api/one-class-page/virtualMachine'
|
||||
import { set, get } from 'lodash'
|
||||
import { set, get, pull } from 'lodash'
|
||||
|
||||
export default {
|
||||
data() {
|
||||
|
@ -107,7 +107,8 @@ export default {
|
|||
getNamespaceYaml(this.$route.query.name).then(res => {
|
||||
this.formData.name = get(res, 'metadata.name')
|
||||
this.formData.description = get(res, 'metadata.annotations')['field.cattle.io/description']
|
||||
// this.formData.name = get(res, 'annotations["node.kubesphere.io/cpu-limits"]')
|
||||
this.formData.labels = Object.keys(get(res, 'metadata.labels')).map(e => ({ key: e, value: res.metadata.labels[e] }))
|
||||
this.formData.annotations = pull(Object.keys(get(res, 'metadata.annotations')), 'field.cattle.io/description').map(e => ({ key: e, value: res.metadata.annotations[e] }))
|
||||
})
|
||||
}
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue