mirror of
https://github.com/harvester/harvester-ui-extension.git
synced 2026-10-04 13:16:05 +08:00
@@ -1,10 +1,10 @@
|
||||
<script>
|
||||
import { HCI } from '../types';
|
||||
import { SCHEMA } from '@shell/config/types';
|
||||
import { allHash } from '@shell/utils/promise';
|
||||
import Banner from '@components/Banner/Banner.vue';
|
||||
import Loading from '@shell/components/Loading';
|
||||
import MessageLink from '@shell/components/MessageLink';
|
||||
import { HCI } from '../types';
|
||||
import DeviceList from '../edit/kubevirt.io.virtualmachine/VirtualMachinePciDevices/DeviceList';
|
||||
import { ADD_ONS } from '../config/harvester-map';
|
||||
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
<script>
|
||||
import { HCI } from '../types';
|
||||
import { ADD_ONS } from '../config/harvester-map';
|
||||
import { NODE } from '@shell/config/types';
|
||||
import { STATE, AGE, SIMPLE_NAME } from '@shell/config/table-headers';
|
||||
import { allHash } from '@shell/utils/promise';
|
||||
@@ -8,6 +6,8 @@ import Banner from '@components/Banner/Banner.vue';
|
||||
import Loading from '@shell/components/Loading';
|
||||
import MessageLink from '@shell/components/MessageLink';
|
||||
import ResourceTable from '@shell/components/ResourceTable';
|
||||
import { ADD_ONS } from '../config/harvester-map';
|
||||
import { HCI } from '../types';
|
||||
|
||||
export default {
|
||||
name: 'ListSriovGpuDevices',
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
<script>
|
||||
import { HCI } from '../types';
|
||||
import { allHash } from '@shell/utils/promise';
|
||||
import Banner from '@components/Banner/Banner.vue';
|
||||
import Loading from '@shell/components/Loading';
|
||||
import MessageLink from '@shell/components/MessageLink';
|
||||
import { HCI } from '../types';
|
||||
import VGpuDeviceList from '../edit/kubevirt.io.virtualmachine/VirtualMachineVGpuDevices/VGpuDeviceList';
|
||||
import { ADD_ONS } from '../config/harvester-map';
|
||||
|
||||
|
||||
@@ -3,8 +3,8 @@ import Loading from '@shell/components/Loading';
|
||||
import ResourceTable from '@shell/components/ResourceTable';
|
||||
|
||||
import { allHash } from '@shell/utils/promise';
|
||||
import { HCI } from '../types';
|
||||
import { STATE, NAME } from '@shell/config/table-headers';
|
||||
import { HCI } from '../types';
|
||||
|
||||
export default {
|
||||
name: 'ListHarvesterAddons',
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
import ResourceTable from '@shell/components/ResourceTable';
|
||||
import Loading from '@shell/components/Loading';
|
||||
import { CONFIG_MAP, SCHEMA } from '@shell/config/types';
|
||||
import { HCI } from '../types';
|
||||
import { NAME, AGE, NAMESPACE } from '@shell/config/table-headers';
|
||||
import { HCI as HCI_ANNOTATIONS } from '@pkg/harvester/config/labels-annotations';
|
||||
import { HCI } from '../types';
|
||||
|
||||
const schema = {
|
||||
id: HCI.CLOUD_TEMPLATE,
|
||||
|
||||
@@ -15,7 +15,6 @@ import { REASON } from '@shell/config/table-headers';
|
||||
import {
|
||||
EVENT, METRIC, NODE, SERVICE, PVC, LONGHORN, POD, COUNT, NETWORK_ATTACHMENT
|
||||
} from '@shell/config/types';
|
||||
import { HCI } from '../types';
|
||||
import ResourceSummary, { resourceCounts, colorToCountName } from '@shell/components/ResourceSummary';
|
||||
import { colorForState } from '@shell/plugins/dashboard-store/resource-class';
|
||||
import HardwareResourceGauge from '@shell/components/HardwareResourceGauge';
|
||||
@@ -25,6 +24,7 @@ import DashboardMetrics from '@shell/components/DashboardMetrics';
|
||||
import metricPoller from '@shell/mixins/metric-poller';
|
||||
import { allDashboardsExist } from '@shell/utils/grafana';
|
||||
import { isEmpty } from '@shell/utils/object';
|
||||
import { HCI } from '../types';
|
||||
import HarvesterUpgrade from '../components/HarvesterUpgrade';
|
||||
import { PRODUCT_NAME as HARVESTER_PRODUCT } from '../config/harvester';
|
||||
|
||||
|
||||
@@ -5,9 +5,9 @@ import { STATE, NAME, AGE } from '@shell/config/table-headers';
|
||||
import {
|
||||
CAPI, METRIC, NODE, SCHEMA, LONGHORN, POD
|
||||
} from '@shell/config/types';
|
||||
import { HCI } from '../types';
|
||||
import { allHash } from '@shell/utils/promise';
|
||||
import metricPoller from '@shell/mixins/metric-poller';
|
||||
import { HCI } from '../types';
|
||||
|
||||
const schema = {
|
||||
id: HCI.HOST,
|
||||
|
||||
@@ -6,11 +6,10 @@ import BadgeState from '@shell/components/formatter/BadgeStateFormatter';
|
||||
|
||||
import { NAME, AGE, NAMESPACE, STATE } from '@shell/config/table-headers';
|
||||
import { NETWORK_ATTACHMENT, SCHEMA } from '@shell/config/types';
|
||||
import { allHash } from '@shell/utils/promise';
|
||||
import { HCI as HCI_ANNOTATIONS } from '../config/labels-annotations';
|
||||
import { HCI } from '../types';
|
||||
|
||||
import { allHash } from '@shell/utils/promise';
|
||||
|
||||
const schema = {
|
||||
id: HCI.NETWORK_ATTACHMENT,
|
||||
type: SCHEMA,
|
||||
@@ -126,9 +125,9 @@ export default {
|
||||
},
|
||||
|
||||
abnormalNetwork() {
|
||||
const notReadyCrd = this.hostNetworks.filter( (O) => !O.isReady);
|
||||
const notReadyCrd = this.hostNetworks.filter( O => !O.isReady);
|
||||
|
||||
return notReadyCrd.map( (O) => O.linkMessage);
|
||||
return notReadyCrd.map( O => O.linkMessage);
|
||||
},
|
||||
|
||||
filterRows() {
|
||||
|
||||
@@ -4,12 +4,12 @@ import { Banner } from '@components/Banner';
|
||||
import Loading from '@shell/components/Loading';
|
||||
import { VIEW_IN_API, DEV } from '@shell/store/prefs';
|
||||
import { MANAGEMENT } from '@shell/config/types';
|
||||
import { HCI } from '../types';
|
||||
import { allHash } from '@shell/utils/promise';
|
||||
import { HCI_ALLOWED_SETTINGS, HCI_SINGLE_CLUSTER_ALLOWED_SETTING } from '../config/settings';
|
||||
import Tabbed from '@shell/components/Tabbed/index.vue';
|
||||
import Tab from '@shell/components/Tabbed/Tab.vue';
|
||||
import Settings from '@pkg/harvester/components/SettingList.vue';
|
||||
import { HCI_ALLOWED_SETTINGS, HCI_SINGLE_CLUSTER_ALLOWED_SETTING } from '../config/settings';
|
||||
import { HCI } from '../types';
|
||||
|
||||
export default {
|
||||
components: {
|
||||
|
||||
@@ -4,10 +4,10 @@ import ResourceTable from '@shell/components/ResourceTable';
|
||||
|
||||
import { allHash } from '@shell/utils/promise';
|
||||
import { SCHEMA, STORAGE_CLASS } from '@shell/config/types';
|
||||
import { HCI } from '../types';
|
||||
import {
|
||||
STATE, AGE, NAME, STORAGE_CLASS_PROVISIONER, STORAGE_CLASS_DEFAULT
|
||||
} from '@shell/config/table-headers';
|
||||
import { HCI } from '../types';
|
||||
|
||||
const schema = {
|
||||
id: HCI.STORAGE,
|
||||
|
||||
@@ -5,9 +5,9 @@ import MessageLink from '@shell/components/MessageLink';
|
||||
import Masthead from '@shell/components/ResourceList/Masthead';
|
||||
import ResourceTable from '@shell/components/ResourceTable';
|
||||
|
||||
import { STATE, AGE, NAME, NAMESPACE } from '@shell/config/table-headers';
|
||||
import { HCI } from '../types';
|
||||
import { allSettled } from '../utils/promise';
|
||||
import { STATE, AGE, NAME, NAMESPACE } from '@shell/config/table-headers';
|
||||
import { BACKUP_TYPE } from '../config/types';
|
||||
|
||||
export default {
|
||||
@@ -35,7 +35,7 @@ export default {
|
||||
this.settings = hash.settings;
|
||||
|
||||
if (this.$store.getters[`${ inStore }/schemaFor`](HCI.SETTING)) {
|
||||
const backupTargetResource = hash.settings.find( (O) => O.id === 'backup-target');
|
||||
const backupTargetResource = hash.settings.find( O => O.id === 'backup-target');
|
||||
const isEmpty = this.getBackupTargetValueIsEmpty(backupTargetResource);
|
||||
|
||||
if (backupTargetResource && !isEmpty) {
|
||||
@@ -134,15 +134,15 @@ export default {
|
||||
},
|
||||
|
||||
hasBackupProgresses() {
|
||||
return !!this.rows.find((R) => R.status?.progress !== undefined);
|
||||
return !!this.rows.find(R => R.status?.progress !== undefined);
|
||||
},
|
||||
|
||||
filteredRows() {
|
||||
return this.rows.filter((R) => R.spec?.type !== BACKUP_TYPE.SNAPSHOT);
|
||||
return this.rows.filter(R => R.spec?.type !== BACKUP_TYPE.SNAPSHOT);
|
||||
},
|
||||
|
||||
backupTargetResource() {
|
||||
return this.settings.find( (O) => O.id === 'backup-target');
|
||||
return this.settings.find( O => O.id === 'backup-target');
|
||||
},
|
||||
|
||||
isEmptyValue() {
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
<script>
|
||||
import ResourceTable from '@shell/components/ResourceTable';
|
||||
import { Banner } from '@components/Banner';
|
||||
import FilterLabel from '../components/FilterLabel';
|
||||
import { defaultTableSortGenerationFn } from '@shell/components/ResourceTable.vue';
|
||||
import FilterLabel from '../components/FilterLabel';
|
||||
|
||||
export default {
|
||||
name: 'ListHarvesterImage',
|
||||
|
||||
@@ -3,9 +3,9 @@ import Loading from '@shell/components/Loading';
|
||||
import LiveData from '@shell/components/formatter/LiveDate';
|
||||
import ResourceTable from '@shell/components/ResourceTable';
|
||||
|
||||
import { HCI } from '../types';
|
||||
import { allHash } from '@shell/utils/promise';
|
||||
import { STATE, AGE, NAME, NAMESPACE } from '@shell/config/table-headers';
|
||||
import { HCI } from '../types';
|
||||
|
||||
export default {
|
||||
name: 'HarvesterListTemplate',
|
||||
|
||||
@@ -3,10 +3,10 @@ import Loading from '@shell/components/Loading';
|
||||
import Masthead from '@shell/components/ResourceList/Masthead';
|
||||
import ResourceTable from '@shell/components/ResourceTable';
|
||||
|
||||
import { HCI } from '../types';
|
||||
import { SCHEMA } from '@shell/config/types';
|
||||
import { allHash } from '@shell/utils/promise';
|
||||
import { STATE, AGE, NAME, NAMESPACE } from '@shell/config/table-headers';
|
||||
import { HCI } from '../types';
|
||||
import { BACKUP_TYPE } from '../config/types';
|
||||
|
||||
const schema = {
|
||||
@@ -34,7 +34,7 @@ export default {
|
||||
|
||||
const schema = this.$store.getters[`${ inStore }/schemaFor`](HCI.BACKUP);
|
||||
|
||||
if (!schema?.collectionMethods.find((x) => x.toLowerCase() === 'post')) {
|
||||
if (!schema?.collectionMethods.find(x => x.toLowerCase() === 'post')) {
|
||||
this.$store.dispatch('type-map/configureType', { match: HCI.VM_SNAPSHOT, isCreatable: false });
|
||||
}
|
||||
|
||||
@@ -85,7 +85,7 @@ export default {
|
||||
},
|
||||
|
||||
filteredRows() {
|
||||
return this.rows.filter((R) => R.spec?.type !== BACKUP_TYPE.BACKUP);
|
||||
return this.rows.filter(R => R.spec?.type !== BACKUP_TYPE.BACKUP);
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
<script>
|
||||
import Loading from '@shell/components/Loading';
|
||||
import ResourceTable from '@shell/components/ResourceTable';
|
||||
import { PV, PVC, SCHEMA, LONGHORN } from '@shell/config/types';
|
||||
import { STATE, AGE, NAME, NAMESPACE } from '@shell/config/table-headers';
|
||||
import HarvesterVolumeState from '../formatters/HarvesterVolumeState';
|
||||
|
||||
import { allSettled } from '../utils/promise';
|
||||
import { PV, PVC, SCHEMA, LONGHORN } from '@shell/config/types';
|
||||
import { HCI, VOLUME_SNAPSHOT } from '../types';
|
||||
import { STATE, AGE, NAME, NAMESPACE } from '@shell/config/table-headers';
|
||||
|
||||
const schema = {
|
||||
id: HCI.VOLUME,
|
||||
@@ -50,7 +50,7 @@ export default {
|
||||
|
||||
const pvcSchema = this.$store.getters[`${ inStore }/schemaFor`](PVC);
|
||||
|
||||
if (!pvcSchema?.collectionMethods.find((x) => x.toLowerCase() === 'post')) {
|
||||
if (!pvcSchema?.collectionMethods.find(x => x.toLowerCase() === 'post')) {
|
||||
this.$store.dispatch('type-map/configureType', { match: HCI.VOLUME, isCreatable: false });
|
||||
}
|
||||
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
import ResourceTable from '@shell/components/ResourceTable';
|
||||
import Loading from '@shell/components/Loading';
|
||||
import { SCHEMA, PVC } from '@shell/config/types';
|
||||
import { VOLUME_SNAPSHOT, HCI } from '../types';
|
||||
import { allHash } from '@shell/utils/promise';
|
||||
import { VOLUME_SNAPSHOT, HCI } from '../types';
|
||||
|
||||
const schema = {
|
||||
id: HCI.SNAPSHOT,
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
<script>
|
||||
import ConsoleBar from '../components/VMConsoleBar';
|
||||
import ResourceTable from '@shell/components/ResourceTable';
|
||||
import LinkDetail from '@shell/components/formatter/LinkDetail';
|
||||
import HarvesterVmState from '../formatters/HarvesterVmState';
|
||||
|
||||
import { STATE, AGE, NAME, NAMESPACE } from '@shell/config/table-headers';
|
||||
import { NODE, POD } from '@shell/config/types';
|
||||
import { HCI } from '../types';
|
||||
|
||||
import { allHash } from '@shell/utils/promise';
|
||||
import Loading from '@shell/components/Loading';
|
||||
import { clone } from '@shell/utils/object';
|
||||
import { HCI } from '../types';
|
||||
import HarvesterVmState from '../formatters/HarvesterVmState';
|
||||
import ConsoleBar from '../components/VMConsoleBar';
|
||||
|
||||
export const VM_HEADERS = [
|
||||
STATE,
|
||||
|
||||
@@ -50,7 +50,7 @@ export default {
|
||||
name: 'type',
|
||||
labelKey: 'tableHeaders.type',
|
||||
value: 'typeDisplay',
|
||||
getValue: (row) => row.typeDisplay,
|
||||
getValue: row => row.typeDisplay,
|
||||
sort: ['typeDisplay'],
|
||||
},
|
||||
AGE,
|
||||
@@ -99,7 +99,7 @@ export default {
|
||||
const clusterNetworks = this.$store.getters[`${ inStore }/all`](HCI.CLUSTER_NETWORK);
|
||||
|
||||
const out = clusterNetworks.map((network) => {
|
||||
const hasChild = !!this.rows.find((config) => config?.spec?.clusterNetwork === network.id);
|
||||
const hasChild = !!this.rows.find(config => config?.spec?.clusterNetwork === network.id);
|
||||
|
||||
return {
|
||||
...network,
|
||||
|
||||
Reference in New Issue
Block a user