Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 14 additions & 2 deletions frontend/src/views/home/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,12 @@
<el-carousel-item key="systemInfo">
<CardWithHeader :header="$t('home.systemInfo')">
<template #header-r>
<el-button
class="h-button-setting"
@click="toggleSensitiveInfo"
link
:icon="showSensitiveInfo ? 'View' : 'Hide'"
/>
<el-button class="h-button-setting" @click="handleCopy" link icon="CopyDocument" />
</template>
<template #body>
Expand All @@ -185,7 +191,7 @@
<template #label>
<span class="system-label">{{ $t('home.hostname') }}</span>
</template>
{{ baseInfo.hostname }}
{{ showSensitiveInfo ? baseInfo.hostname : '****' }}
</el-descriptions-item>
<el-descriptions-item
class-name="system-content"
Expand Down Expand Up @@ -225,7 +231,7 @@
<template #label>
<span class="system-label">{{ $t('home.ip') }}</span>
</template>
{{ baseInfo.ipV4Addr }}
{{ showSensitiveInfo ? baseInfo.ipV4Addr : '****' }}
</el-descriptions-item>
<el-descriptions-item
v-if="baseInfo.httpProxy && baseInfo.httpProxy !== 'noProxy'"
Expand Down Expand Up @@ -346,6 +352,8 @@ let isStatusInit = ref<boolean>(true);
let isActive = ref(true);
let isCurrentActive = ref(true);

const showSensitiveInfo = ref(true);

const ioReadBytes = ref<Array<number>>([]);
const ioWriteBytes = ref<Array<number>>([]);
const netBytesSents = ref<Array<number>>([]);
Expand Down Expand Up @@ -507,6 +515,10 @@ const showSimpleNode = () => {
return globalStore.isMasterProductPro && simpleNodes.value?.length !== 0;
};

const toggleSensitiveInfo = () => {
showSensitiveInfo.value = !showSensitiveInfo.value;
};

const jumpPanel = (row: any) => {
let entrance = row.securityEntrance.startsWith('/') ? row.securityEntrance.slice(1) : row.securityEntrance;
entrance = entrance ? '/' + entrance : '';
Expand Down
Loading