mirror of
https://github.com/harvester/harvester-ui-extension.git
synced 2026-10-06 14:16:05 +08:00
Add pkg/harvester components + shell portings - 1
Signed-off-by: Francesco Torchia <francesco.torchia@suse.com>
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
<script>
|
||||
import { NODE } from '@shell/config/types';
|
||||
import CopyToClipboardText from '@shell/components/CopyToClipboardText';
|
||||
|
||||
export default {
|
||||
components: { CopyToClipboardText },
|
||||
props: {
|
||||
value: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
},
|
||||
|
||||
computed: {
|
||||
node() {
|
||||
const inStore = this.$store.getters['currentProduct'].inStore;
|
||||
|
||||
return this.$store.getters[`${ inStore }/byId`](NODE, this.value);
|
||||
},
|
||||
|
||||
ip() {
|
||||
return this.node?.internalIp;
|
||||
},
|
||||
|
||||
nameDisplay() {
|
||||
return this.node?.nameDisplay || '';
|
||||
}
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div>
|
||||
<CopyToClipboardText v-clean-tooltip="ip" :text="nameDisplay" />
|
||||
</div>
|
||||
</template>
|
||||
Reference in New Issue
Block a user