Latest changes from harvester/master

Signed-off-by: Francesco Torchia <francesco.torchia@suse.com>
This commit is contained in:
Francesco Torchia
2024-10-23 17:01:03 +02:00
parent deeccf3db6
commit ec3d88aeb7
56 changed files with 1498 additions and 2197 deletions
+41 -7
View File
@@ -8,6 +8,7 @@ import {
import { allHash } from '@shell/utils/promise';
import metricPoller from '@shell/mixins/metric-poller';
import { HCI } from '../types';
import { DOC_LINKS } from '../config/doc-links';
const schema = {
id: HCI.HOST,
@@ -91,6 +92,7 @@ export default {
value: 'internalIp',
formatter: 'CopyToClipboard',
sort: ['internalIp'],
align: 'center',
},
];
@@ -98,7 +100,7 @@ export default {
const metricCol = [
{
name: 'cpu',
labelKey: 'tableHeaders.cpu',
labelKey: 'node.detail.glance.consumptionGauge.cpu',
value: 'id',
formatter: 'HarvesterCPUUsed',
formatterOpts: { showUsed: true },
@@ -121,12 +123,23 @@ export default {
labelKey: 'tableHeaders.storage',
value: 'id',
formatter: 'HarvesterStorageUsed',
formatterOpts: { showReserved: true },
formatterOpts: { showAllocated: true },
};
out.splice(-1, 0, storageHeader);
}
out.push({
name: 'cpuManager',
labelKey: 'harvester.tableHeaders.cpuManager',
value: 'id',
formatter: 'HarvesterCPUPinning',
formatterOpts: { rows: this.rows },
width: 150,
align: 'center',
});
if (this.hasLonghornSchema) {
out.push({
name: 'diskState',
@@ -143,7 +156,7 @@ export default {
name: 'console',
label: ' ',
align: 'right',
width: 65,
width: 80,
});
return out;
@@ -151,6 +164,10 @@ export default {
schema() {
return schema;
},
consoleDocLink() {
return DOC_LINKS.CONSOLE_URL;
}
},
methods: {
@@ -169,7 +186,15 @@ export default {
goto(row) {
window.open(row.consoleUrl, '_blank');
}
},
consoleTooltip(row) {
if (!row.consoleUrl) {
return this.t('harvester.host.noConsoleUrl');
}
return '';
},
},
typeDisplay() {
@@ -199,10 +224,19 @@ export default {
>
<template #cell:console="{row}">
<button type="button" class="btn btn-sm role-primary" :disabled="!row.consoleUrl" @click="goto(row)">
{{ t('harvester.host.console') }}
</button>
<div class="console-button">
<button v-clean-tooltip="consoleTooltip(row)" type="button" class="mr-5 btn btn-sm role-primary" :disabled="!row.consoleUrl" @click="goto(row)">
{{ t('harvester.host.console') }}
</button>
<a v-if="!row.consoleUrl" :href="consoleDocLink" target="_blank"><i class="icon icon-info" /></a>
</div>
</template>
</ResourceTable>
</div>
</template>
<style lang="scss" scoped>
.console-button {
display: flex;
}
</style>