Signed-off-by: Francesco Torchia <francesco.torchia@suse.com>
This commit is contained in:
Francesco Torchia 2024-06-03 18:25:30 +02:00
parent 4f2688f6ab
commit c983ed8384
No known key found for this signature in database
GPG Key ID: E6D011B7415D4393
101 changed files with 186 additions and 189 deletions

View File

@ -23,6 +23,7 @@
"build-pkg": "./node_modules/@rancher/shell/scripts/build-pkg.sh",
"serve-pkgs": "./node_modules/@rancher/shell/scripts/serve-pkgs",
"publish-pkgs": "./node_modules/@rancher/shell/scripts/extension/publish",
"parse-tag-name": "./node_modules/@rancher/shell/scripts/extension/parse-tag-name"
"parse-tag-name": "./node_modules/@rancher/shell/scripts/extension/parse-tag-name",
"lint": "./node_modules/.bin/eslint --max-warnings 0 --ext .js,.ts,.vue ."
}
}

View File

@ -1,11 +1,11 @@
<script>
import { mapGetters } from 'vuex';
import { HCI } from '../types';
import { allHash } from '@shell/utils/promise';
import { Checkbox } from '@components/Form/Checkbox';
import ModalWithCard from '@shell/components/ModalWithCard';
import LabeledSelect from '@shell/components/form/LabeledSelect';
import { Banner } from '@components/Banner';
import { HCI } from '../types';
import UpgradeInfo from './UpgradeInfo';
export default {
name: 'HarvesterUpgrade',
@ -45,7 +45,7 @@ export default {
versionOptions() {
const versions = this.$store.getters['harvester/all'](HCI.VERSION);
return versions.map((V) => V.metadata.name);
return versions.map(V => V.metadata.name);
},
currentVersion() {
@ -69,7 +69,7 @@ export default {
let upgradeMessage = [];
const list = neu || [];
const currentResource = list.find( (O) => !!O.isLatestUpgrade);
const currentResource = list.find( O => !!O.isLatestUpgrade);
upgradeMessage = currentResource ? currentResource.upgradeMessage : [];

View File

@ -1,13 +1,13 @@
<script>
import { NODE } from '@shell/config/types';
import { HCI } from '../types';
import { allHash } from '@shell/utils/promise';
import { HCI as HCI_ANNOTATIONS } from '@pkg/harvester/config/labels-annotations';
import PercentageBar from '@shell/components/PercentageBar';
import ProgressBarList from './HarvesterUpgradeProgressBarList';
import BadgeStateFormatter from '@shell/components/formatter/BadgeStateFormatter';
import { PRODUCT_NAME as HARVESTER } from '../config/harvester';
import { mapGetters } from 'vuex';
import { PRODUCT_NAME as HARVESTER } from '../config/harvester';
import { HCI } from '../types';
import ProgressBarList from './HarvesterUpgradeProgressBarList';
export default {
name: 'HarvesterUpgradeHeader',

View File

@ -4,10 +4,10 @@ import { escapeHtml } from '@shell/utils/string';
import { allHash } from '@shell/utils/promise';
import KeyTable from '@novnc/novnc/core/input/keysym';
import * as KeyboardUtil from '@novnc/novnc/core/input/util';
import { HCI } from '../../types';
import NovncConsole from './NovncConsole';
import NovncConsoleItem from './NovncConsoleItem';
import NovncConsoleCustomKeys from './NovncConsoleCustomKeys';
import { HCI } from '../../types';
const PREFERED_SHORTCUT_KEYS = 'prefered-shortcut-keys';

View File

@ -1,11 +1,11 @@
<script>
import Tip from '@shell/components/Tip';
import { HCI_SETTING } from '../../config/settings';
import Password from '@shell/components/form/Password';
import MessageLink from '@shell/components/MessageLink';
import CreateEditView from '@shell/mixins/create-edit-view';
import { LabeledInput } from '@components/Form/LabeledInput';
import LabeledSelect from '@shell/components/form/LabeledSelect';
import { HCI_SETTING } from '../../config/settings';
export default {
name: 'HarvesterEditBackupTarget',

View File

@ -2,8 +2,8 @@
import { _EDIT } from '@shell/config/query-params';
import LabeledSelect from '@shell/components/form/LabeledSelect';
import InfoBox from '@shell/components/InfoBox';
import { CSI_DRIVER, VOLUME_SNAPSHOT_CLASS } from '../../types';
import { allHash } from '@shell/utils/promise';
import { CSI_DRIVER, VOLUME_SNAPSHOT_CLASS } from '../../types';
const LONGHORN_DRIVER = 'driver.longhorn.io';

View File

@ -7,9 +7,9 @@ import { isValidCIDR } from '@shell/utils/validators/cidr';
import { _EDIT } from '@shell/config/query-params';
import { Banner } from '@components/Banner';
import Tip from '@shell/components/Tip';
import { HCI } from '../../types';
import { allHash } from '@shell/utils/promise';
import { NODE } from '@shell/config/types';
import { HCI } from '../../types';
export default {
name: 'HarvesterEditStorageNetwork',

View File

@ -2,10 +2,10 @@
import { STATE, AGE, NAME } from '@shell/config/table-headers';
import SortableTable from '@shell/components/SortableTable';
import Loading from '@shell/components/Loading';
import HarvesterVmState from '../../formatters/HarvesterVmState';
import { allHash } from '@shell/utils/promise';
import { HCI } from '../../types';
import { HOSTNAME } from '@shell/config/labels-annotations';
import HarvesterVmState from '../../formatters/HarvesterVmState';
import { HCI } from '../../types';
export default {
name: 'InstanceNode',

View File

@ -6,8 +6,8 @@ import { BadgeState } from '@components/BadgeState';
import { _CREATE } from '@shell/config/query-params';
import { findBy } from '@shell/utils/array';
import LinkStatus from './LinkStatus';
import { HCI } from '../../../types';
import LinkStatus from './LinkStatus';
export default {
name: 'HarvesterHostNetwork',

View File

@ -14,13 +14,13 @@ import metricPoller from '@shell/mixins/metric-poller';
import {
METRIC, NODE, LONGHORN, POD, EVENT
} from '@shell/config/types';
import { HCI } from '../../types';
import { HCI as HCI_ANNOTATIONS } from '@pkg/harvester/config/labels-annotations';
import { allHash } from '@shell/utils/promise';
import { formatSi } from '@shell/utils/units';
import { findBy } from '@shell/utils/array';
import { clone } from '@shell/utils/object';
import { escapeHtml } from '@shell/utils/string';
import { HCI } from '../../types';
import Basic from './HarvesterHostBasic';
import Instance from './VirtualMachineInstance';

View File

@ -5,9 +5,9 @@ import Loading from '@shell/components/Loading';
import CruResource from '@shell/components/CruResource';
import { Checkbox } from '@components/Form/Checkbox';
import LabelValue from '@shell/components/LabelValue';
import VM_MIXIN from '../../mixins/harvester-vm';
import { allHash } from '@shell/utils/promise';
import CreateEditView from '@shell/mixins/create-edit-view';
import VM_MIXIN from '../../mixins/harvester-vm';
import { HCI } from '../../types';
import CpuMemory from '../../edit/kubevirt.io.virtualmachine/VirtualMachineCpuMemory';

View File

@ -5,9 +5,9 @@ import Loading from '@shell/components/Loading';
import CruResource from '@shell/components/CruResource';
import { Checkbox } from '@components/Form/Checkbox';
import LabelValue from '@shell/components/LabelValue';
import VM_MIXIN from '../../mixins/harvester-vm';
import { allHash } from '@shell/utils/promise';
import CreateEditView from '@shell/mixins/create-edit-view';
import VM_MIXIN from '../../mixins/harvester-vm';
import { HCI } from '../../types';
import CpuMemory from '../../edit/kubevirt.io.virtualmachine/VirtualMachineCpuMemory';

View File

@ -1,10 +1,10 @@
<script>
import HarvesterIpAddress from '../../../formatters/HarvesterIpAddress';
import VMConsoleBar from '../../../components/VMConsoleBar';
import LabelValue from '@shell/components/LabelValue';
import InputOrDisplay from '@shell/components/InputOrDisplay';
import { HCI } from '../../../types';
import CreateEditView from '@shell/mixins/create-edit-view';
import HarvesterIpAddress from '../../../formatters/HarvesterIpAddress';
import VMConsoleBar from '../../../components/VMConsoleBar';
import { HCI } from '../../../types';
const UNDEFINED = 'n/a';

View File

@ -1,7 +1,7 @@
<script>
import isString from 'lodash/isString';
import { HCI } from '../../../types';
import { allHash } from '@shell/utils/promise';
import { HCI } from '../../../types';
import impl from '../../../mixins/harvester-vm/impl';
export default {

View File

@ -3,25 +3,25 @@ import { mapGetters } from 'vuex';
import Tabbed from '@shell/components/Tabbed';
import Tab from '@shell/components/Tabbed/Tab';
import { EVENT, SERVICE, POD } from '@shell/config/types';
import { HCI } from '../../types';
import CreateEditView from '@shell/mixins/create-edit-view';
import VM_MIXIN from '../../mixins/harvester-vm';
import DashboardMetrics from '@shell/components/DashboardMetrics';
import { allHash, setPromiseResult } from '@shell/utils/promise';
import { allDashboardsExist } from '@shell/utils/grafana';
import NodeScheduling from '@shell/components/form/NodeScheduling';
import PodAffinity from '@shell/components/form/PodAffinity';
import KeyValue from '@shell/components/form/KeyValue';
import Labels from '@shell/components/form/Labels';
import { HCI } from '../../types';
import VM_MIXIN from '../../mixins/harvester-vm';
import CloudConfig from '../../edit/kubevirt.io.virtualmachine/VirtualMachineCloudConfig';
import Volume from '../../edit/kubevirt.io.virtualmachine/VirtualMachineVolume';
import Network from '../../edit/kubevirt.io.virtualmachine/VirtualMachineNetwork';
import NodeScheduling from '@shell/components/form/NodeScheduling';
import PodAffinity from '@shell/components/form/PodAffinity';
import AccessCredentials from '../../edit/kubevirt.io.virtualmachine/VirtualMachineAccessCredentials';
import Events from './VirtualMachineTabs/VirtualMachineEvents';
import Migration from './VirtualMachineTabs/VirtualMachineMigration';
import OverviewBasics from './VirtualMachineTabs/VirtualMachineBasics';
import OverviewKeypairs from './VirtualMachineTabs/VirtualMachineKeypairs';
import KeyValue from '@shell/components/form/KeyValue';
import Labels from '@shell/components/form/Labels';
const VM_METRICS_DETAIL_URL = '/api/v1/namespaces/cattle-monitoring-system/services/http:rancher-monitoring-grafana:80/proxy/d/harvester-vm-detail-1/vm-info-detail?orgId=1';

View File

@ -1,9 +1,9 @@
<script>
import { HCI } from '../types';
import { mapGetters } from 'vuex';
import { Card } from '@components/Card';
import AsyncButton from '@shell/components/AsyncButton';
import { escapeHtml } from '@shell/utils/string';
import { HCI } from '../types';
export default {
name: 'HarvesterEnablePassthrough',

View File

@ -2,7 +2,6 @@
import { mapGetters } from 'vuex';
import { NODE } from '@shell/config/types';
import { HCI } from '../types';
import { exceptionToErrorsArray } from '@shell/utils/error';
import { HCI as HCI_ANNOTATIONS } from '@pkg/harvester/config/labels-annotations';
@ -10,6 +9,7 @@ import { Card } from '@components/Card';
import { Banner } from '@components/Banner';
import AsyncButton from '@shell/components/AsyncButton';
import LabeledSelect from '@shell/components/form/LabeledSelect';
import { HCI } from '../types';
export default {
components: {

View File

@ -2,7 +2,6 @@
import { mapGetters } from 'vuex';
import { randomStr } from '@shell/utils/string';
import { HCI } from '../types';
import { allHash } from '@shell/utils/promise';
import { exceptionToErrorsArray } from '@shell/utils/error';
@ -10,6 +9,7 @@ import { Card } from '@components/Card';
import { Banner } from '@components/Banner';
import AsyncButton from '@shell/components/AsyncButton';
import LabeledSelect from '@shell/components/form/LabeledSelect';
import { HCI } from '../types';
export default {
name: 'HarvesterRestoreModal',

View File

@ -10,7 +10,6 @@ import ButtonDropdown from '@shell/components/ButtonDropdown';
import CreateEditView from '@shell/mixins/create-edit-view';
import { HCI as HCI_LABELS_ANNOTATIONS } from '@pkg/harvester/config/labels-annotations';
import { LONGHORN, SECRET } from '@shell/config/types';
import { HCI } from '../../types';
import { allHash } from '@shell/utils/promise';
import { formatSi } from '@shell/utils/units';
import { findBy } from '@shell/utils/array';
@ -25,10 +24,11 @@ import { PRODUCT_NAME as HARVESTER_PRODUCT } from '@pkg/harvester/config/harvest
import { _EDIT } from '@shell/config/query-params';
import { sortBy } from '@shell/utils/sort';
import { Banner } from '@components/Banner';
import HarvesterDisk from './HarvesterDisk';
import HarvesterKsmtuned from './HarvesterKsmtuned';
import HarvesterSeeder from './HarvesterSeeder';
import { HCI } from '../../types';
import Tags from '../../components/DiskTags';
import HarvesterDisk from './HarvesterDisk';
import HarvesterSeeder from './HarvesterSeeder';
import HarvesterKsmtuned from './HarvesterKsmtuned';
export const LONGHORN_SYSTEM = 'longhorn-system';

View File

@ -50,7 +50,7 @@ export default {
const defaultReceiverValues = {};
const receiverSchema = this.$store.getters['harvester/schemaFor'](MONITORING.SPOOFED.ALERTMANAGERCONFIG_RECEIVER_SPEC);
const routeSchema = this.$store.getters['harvester/schemaFor'](MONITORING.SPOOFED.ALERTMANAGERCONFIG_ROUTE_SPEC);
const receiverOptions = (this.value?.spec?.receivers || []).map((receiver) => receiver.name);
const receiverOptions = (this.value?.spec?.receivers || []).map(receiver => receiver.name);
return {
actionMenuTargetElement: null,

View File

@ -2,7 +2,6 @@
import CreateEditView from '@shell/mixins/create-edit-view';
import CruResource from '@shell/components/CruResource';
import NameNsDescription from '@shell/components/form/NameNsDescription';
import Tags from '../../components/DiskTags';
import ArrayList from '@shell/components/form/ArrayList';
import Tab from '@shell/components/Tabbed/Tab';
import Tabbed from '@shell/components/Tabbed';
@ -15,9 +14,10 @@ import Loading from '@shell/components/Loading';
import { _CREATE, _VIEW } from '@shell/config/query-params';
import { mapFeature, UNSUPPORTED_STORAGE_DRIVERS } from '@shell/store/features';
import { STORAGE_CLASS, LONGHORN } from '@shell/config/types';
import { CSI_DRIVER } from '../../types';
import { allHash } from '@shell/utils/promise';
import { clone } from '@shell/utils/object';
import { CSI_DRIVER } from '../../types';
import Tags from '../../components/DiskTags';
const LONGHORN_DRIVER = 'driver.longhorn.io';

View File

@ -10,12 +10,12 @@ import Select from '@shell/components/form/Select';
import LabeledSelect from '@shell/components/form/LabeledSelect';
import CreateEditView from '@shell/mixins/create-edit-view';
import { OS } from '../mixins/harvester-vm';
import { VM_IMAGE_FILE_FORMAT } from '../validators/vm-image';
import { HCI as HCI_ANNOTATIONS } from '@pkg/harvester/config/labels-annotations';
import { exceptionToErrorsArray } from '@shell/utils/error';
import { allHash } from '@shell/utils/promise';
import { STORAGE_CLASS } from '@shell/config/types';
import { VM_IMAGE_FILE_FORMAT } from '../validators/vm-image';
import { OS } from '../mixins/harvester-vm';
import { HCI } from '../types';
const DOWNLOAD = 'download';

View File

@ -12,6 +12,14 @@ import NodeScheduling from '@shell/components/form/NodeScheduling';
import PodAffinity from '@shell/components/form/PodAffinity';
import UnitInput from '@shell/components/form/UnitInput';
import { randomStr } from '@shell/utils/string';
import { _CONFIG, _EDIT, _VIEW } from '@shell/config/query-params';
import { HCI as HCI_ANNOTATIONS } from '@pkg/harvester/config/labels-annotations';
import CreateEditView from '@shell/mixins/create-edit-view';
import { AFTER_SAVE_HOOKS } from '@shell/mixins/child-hook';
import { HCI } from '../types';
import { RunStrategys } from '../config/harvester-map';
import VM_MIXIN from '../mixins/harvester-vm';
import Reserved from './kubevirt.io.virtualmachine/VirtualMachineReserved';
import Volume from './kubevirt.io.virtualmachine/VirtualMachineVolume';
import Network from './kubevirt.io.virtualmachine/VirtualMachineNetwork';
@ -19,16 +27,6 @@ import CpuMemory from './kubevirt.io.virtualmachine/VirtualMachineCpuMemory';
import CloudConfig from './kubevirt.io.virtualmachine/VirtualMachineCloudConfig';
import SSHKey from './kubevirt.io.virtualmachine/VirtualMachineSSHKey';
import { HCI } from '../types';
import { randomStr } from '@shell/utils/string';
import { RunStrategys } from '../config/harvester-map';
import { _CONFIG, _EDIT, _VIEW } from '@shell/config/query-params';
import { HCI as HCI_ANNOTATIONS } from '@pkg/harvester/config/labels-annotations';
import VM_MIXIN from '../mixins/harvester-vm';
import CreateEditView from '@shell/mixins/create-edit-view';
import { AFTER_SAVE_HOOKS } from '@shell/mixins/child-hook';
export default {
name: 'HarvesterEditVMTemplate',

View File

@ -7,9 +7,9 @@ import CreateEditView from '@shell/mixins/create-edit-view';
import { allHash } from '@shell/utils/promise';
import { exceptionToErrorsArray } from '@shell/utils/error';
import { NAMESPACE } from '@shell/config/types';
import { HCI } from '../types';
import { sortBy } from '@shell/utils/sort';
import { clone } from '@shell/utils/object';
import { HCI } from '../types';
import { BACKUP_TYPE } from '../config/types';
const createObject = {

View File

@ -10,15 +10,15 @@ import NameNsDescription from '@shell/components/form/NameNsDescription';
import { allHash } from '@shell/utils/promise';
import { get } from '@shell/utils/object';
import { HCI, VOLUME_SNAPSHOT } from '../types';
import { STORAGE_CLASS, LONGHORN, PV } from '@shell/config/types';
import { sortBy } from '@shell/utils/sort';
import { saferDump } from '@shell/utils/create-yaml';
import { InterfaceOption, VOLUME_DATA_SOURCE_KIND } from '../config/harvester-map';
import { _CREATE } from '@shell/config/query-params';
import CreateEditView from '@shell/mixins/create-edit-view';
import { HCI as HCI_ANNOTATIONS } from '@pkg/harvester/config/labels-annotations';
import { STATE, NAME, AGE, NAMESPACE } from '@shell/config/table-headers';
import { InterfaceOption, VOLUME_DATA_SOURCE_KIND } from '../config/harvester-map';
import { HCI, VOLUME_SNAPSHOT } from '../types';
export default {
name: 'HarvesterVolume',

View File

@ -5,9 +5,9 @@ import ResourceTabs from '@shell/components/form/ResourceTabs';
import { LabeledInput } from '@components/Form/LabeledInput';
import NameNsDescription from '@shell/components/form/NameNsDescription';
import { get } from '@shell/utils/object';
import { HCI } from '../types';
import CreateEditView from '@shell/mixins/create-edit-view';
import { HCI as HCI_ANNOTATIONS } from '@shell/config/labels-annotations';
import { HCI } from '../types';
export default {
name: 'HarvesterSnapshot',

View File

@ -6,9 +6,9 @@ import InfoBox from '@shell/components/InfoBox';
import { randomStr } from '@shell/utils/string';
import { removeObject } from '@shell/utils/array';
import { ACCESS_CREDENTIALS } from '../../../config/harvester-map';
import { _EDIT } from '@shell/config/query-params';
import { HCI as HCI_ANNOTATIONS } from '@pkg/harvester/config/labels-annotations';
import { ACCESS_CREDENTIALS } from '../../../config/harvester-map';
const _NEW = '_NEW';

View File

@ -1,6 +1,6 @@
import { mount } from '@vue/test-utils';
import HarvesterEditNetwork from '../base.vue';
import { _EDIT } from '@shell/config/query-params';
import HarvesterEditNetwork from '../base.vue';
describe('component: HarvesterEditNetwork', () => {
// eslint-disable-next-line jest/no-commented-out-tests

View File

@ -1,14 +1,14 @@
<script>
import InfoBox from '@shell/components/InfoBox';
import Base from './base';
import { NETWORK_ATTACHMENT } from '@shell/config/types';
import { HCI as HCI_ANNOTATIONS } from '../../../config/labels-annotations';
import { sortBy } from '@shell/utils/sort';
import { clone } from '@shell/utils/object';
import { randomStr } from '@shell/utils/string';
import { removeObject } from '@shell/utils/array';
import { _VIEW } from '@shell/config/query-params';
import { HCI as HCI_ANNOTATIONS } from '../../../config/labels-annotations';
import Base from './base';
export default {
components: { InfoBox, Base },

View File

@ -1,11 +1,11 @@
<script>
import ResourceTable from '@shell/components/ResourceTable';
import FilterBySriov from '../../../components/FilterBySriov';
import { HCI } from '../../../types';
import { STATE, SIMPLE_NAME } from '@shell/config/table-headers';
import { defaultTableSortGenerationFn } from '@shell/components/ResourceTable.vue';
import { allHash } from '@shell/utils/promise';
import { HCI as HCI_ANNOTATIONS } from '@pkg/harvester/config/labels-annotations';
import { HCI } from '../../../types';
import FilterBySriov from '../../../components/FilterBySriov';
export default {
name: 'ListPciDevices',

View File

@ -1,14 +1,14 @@
<script>
import { _EDIT } from '@shell/config/query-params';
import { allHash } from '@shell/utils/promise';
import { HCI } from '../../../types';
import LabeledSelect from '@shell/components/form/LabeledSelect';
import Banner from '@components/Banner/Banner.vue';
import CompatibilityMatrix from './CompatibilityMatrix';
import DeviceList from './DeviceList';
import remove from 'lodash/remove';
import { get, set } from '@shell/utils/object';
import { HCI } from '../../../types';
import DeviceList from './DeviceList';
import CompatibilityMatrix from './CompatibilityMatrix';
export default {
name: 'VirtualMachinePCIDevices',

View File

@ -6,11 +6,11 @@ import { LabeledInput } from '@components/Form/LabeledInput';
import LabeledSelect from '@shell/components/form/LabeledSelect';
import ModalWithCard from '@shell/components/ModalWithCard';
import { HCI } from '../../types';
import { clone } from '@shell/utils/object';
import { _VIEW } from '@shell/config/query-params';
import { NAMESPACE } from '@shell/config/types';
import { HCI } from '../../types';
const _NEW = '_NEW';
@ -81,7 +81,7 @@ export default {
},
isCreatable() {
if ( this.schema && !this.schema?.collectionMethods.find((x) => ['blocked-post', 'post'].includes(x.toLowerCase())) ) {
if ( this.schema && !this.schema?.collectionMethods.find(x => ['blocked-post', 'post'].includes(x.toLowerCase())) ) {
return false;
}
@ -149,7 +149,7 @@ export default {
const namespaces = await this.$store.dispatch('harvester/findAll', { type: NAMESPACE });
const exists = namespaces?.find((n) => n.name === this.namespace);
const exists = namespaces?.find(n => n.name === this.namespace);
if (!exists) {
const ns = await this.$store.dispatch('harvester/createNamespace', { name: this.namespace }, { root: true });

View File

@ -1,11 +1,11 @@
<script>
import ResourceTable from '@shell/components/ResourceTable';
import FilterBySriov from '../../../components/FilterBySriov';
import { HCI } from '../../../types';
import { HCI as HCI_ANNOTATIONS } from '@pkg/harvester/config/labels-annotations';
import { STATE, SIMPLE_NAME } from '@shell/config/table-headers';
import { defaultTableSortGenerationFn } from '@shell/components/ResourceTable.vue';
import { allHash } from '@shell/utils/promise';
import { HCI } from '../../../types';
import FilterBySriov from '../../../components/FilterBySriov';
export default {
name: 'VGpuDeviceList',

View File

@ -1,13 +1,13 @@
<script>
import { _EDIT } from '@shell/config/query-params';
import { allHash } from '@shell/utils/promise';
import { HCI } from '../../../types';
import LabeledSelect from '@shell/components/form/LabeledSelect';
import Banner from '@components/Banner/Banner.vue';
import VGpuDeviceList from './VGpuDeviceList';
import remove from 'lodash/remove';
import { get, set } from '@shell/utils/object';
import { HCI } from '../../../types';
import VGpuDeviceList from './VGpuDeviceList';
export default {
name: 'VirtualMachinedevices',

View File

@ -9,14 +9,14 @@ import LabeledSelect from '@shell/components/form/LabeledSelect';
import ModalWithCard from '@shell/components/ModalWithCard';
import { PVC, STORAGE_CLASS } from '@shell/config/types';
import { HCI } from '../../../types';
import { clone } from '@shell/utils/object';
import { removeObject } from '@shell/utils/array';
import { randomStr } from '@shell/utils/string';
import { SOURCE_TYPE } from '../../../config/harvester-map';
import { _VIEW, _EDIT, _CREATE } from '@shell/config/query-params';
import { PRODUCT_NAME as HARVESTER_PRODUCT } from '../../../config/harvester';
import { PLUGIN_DEVELOPER, DEV } from '@shell/store/prefs';
import { SOURCE_TYPE } from '../../../config/harvester-map';
import { PRODUCT_NAME as HARVESTER_PRODUCT } from '../../../config/harvester';
import { HCI } from '../../../types';
export default {
components: {
@ -143,7 +143,7 @@ export default {
query: { mode: _EDIT }
};
V.pvc = this.pvcs.find((pvc) => pvc.metadata.name === V.realName);
V.pvc = this.pvcs.find(pvc => pvc.metadata.name === V.realName);
}
return V;
@ -174,7 +174,7 @@ export default {
if (type === SOURCE_TYPE.NEW) {
const inStore = this.$store.getters['currentProduct'].inStore;
const defaultStorage = this.$store.getters[`${ inStore }/all`](STORAGE_CLASS).find( (O) => O.isDefault);
const defaultStorage = this.$store.getters[`${ inStore }/all`](STORAGE_CLASS).find( O => O.isDefault);
neu.storageClassName = defaultStorage?.metadata?.name || 'longhorn';
}
@ -189,7 +189,7 @@ export default {
while (hasName) {
name = `disk-${ this.nameIdx }`;
hasName = this.rows.find((O) => O.name === name);
hasName = this.rows.find(O => O.name === name);
this.nameIdx++;
}
@ -253,7 +253,7 @@ export default {
},
getImageDisplayName(id) {
return this.$store.getters['harvester/all'](HCI.IMAGE).find((image) => image.id === id)?.spec?.displayName;
return this.$store.getters['harvester/all'](HCI.IMAGE).find(image => image.id === id)?.spec?.displayName;
}
},
};

View File

@ -1,6 +1,6 @@
import { mount } from '@vue/test-utils';
import HarvesterEditContainer from '../container.vue';
import { _EDIT } from '@shell/config/query-params';
import HarvesterEditContainer from '../container.vue';
describe('component: HarvesterEditContainer', () => {
it('should display all the inputs', () => {

View File

@ -1,6 +1,6 @@
import { mount } from '@vue/test-utils';
import HarvesterEditExisting from '../existing.vue';
import { _EDIT } from '@shell/config/query-params';
import HarvesterEditExisting from '../existing.vue';
describe('component: HarvesterEditExisting', () => {
it('should display all the inputs', () => {

View File

@ -1,6 +1,6 @@
import { mount } from '@vue/test-utils';
import HarvesterEditVMImage from '../vmImage.vue';
import { _CREATE } from '@shell/config/query-params';
import HarvesterEditVMImage from '../vmImage.vue';
describe('component: HarvesterEditVMImage', () => {
it('should display all the inputs', () => {

View File

@ -1,6 +1,6 @@
import { mount } from '@vue/test-utils';
import HarvesterEditVolume from '../volume.vue';
import { _EDIT } from '@shell/config/query-params';
import HarvesterEditVolume from '../volume.vue';
describe('component: HarvesterEditVolume', () => {
it('should display all the inputs', () => {

View File

@ -6,10 +6,10 @@ import InputOrDisplay from '@shell/components/InputOrDisplay';
import { sortBy } from '@shell/utils/sort';
import { PVC } from '@shell/config/types';
import { HCI } from '../../../../types';
import { _CREATE } from '@shell/config/query-params';
import { VOLUME_TYPE, InterfaceOption } from '../../../../config/harvester-map';
import { HCI as HCI_ANNOTATIONS } from '@pkg/harvester/config/labels-annotations';
import { HCI } from '../../../../types';
import { VOLUME_TYPE, InterfaceOption } from '../../../../config/harvester-map';
export default {
name: 'HarvesterEditExisting',

View File

@ -5,8 +5,8 @@ import { LabeledInput } from '@components/Form/LabeledInput';
import LabeledSelect from '@shell/components/form/LabeledSelect';
import InputOrDisplay from '@shell/components/InputOrDisplay';
import { PVC } from '@shell/config/types';
import { HCI } from '../../../../types';
import { formatSi, parseSi } from '@shell/utils/units';
import { HCI } from '../../../../types';
import { VOLUME_TYPE, InterfaceOption } from '../../../../config/harvester-map';
export default {

View File

@ -13,18 +13,8 @@ import NameNsDescription from '@shell/components/form/NameNsDescription';
import UnitInput from '@shell/components/form/UnitInput';
import Labels from '@shell/components/form/Labels';
import Reserved from './VirtualMachineReserved';
import SSHKey from './VirtualMachineSSHKey';
import Volume from './VirtualMachineVolume';
import Network from './VirtualMachineNetwork';
import CpuMemory from './VirtualMachineCpuMemory';
import CloudConfig from './VirtualMachineCloudConfig';
import NodeScheduling from '@shell/components/form/NodeScheduling';
import PodAffinity from '@shell/components/form/PodAffinity';
import AccessCredentials from './VirtualMachineAccessCredentials';
import PciDevices from './VirtualMachinePciDevices/index';
import VirtualMachineVGpuDevices from './VirtualMachineVGpuDevices/index';
import RestartVMDialog from '../../dialog/RestartVMDialog';
import KeyValue from '@shell/components/form/KeyValue';
import { clear } from '@shell/utils/array';
@ -40,6 +30,16 @@ import VM_MIXIN from '../../mixins/harvester-vm';
import CreateEditView from '@shell/mixins/create-edit-view';
import { parseVolumeClaimTemplates } from '@pkg/utils/vm';
import RestartVMDialog from '../../dialog/RestartVMDialog';
import VirtualMachineVGpuDevices from './VirtualMachineVGpuDevices/index';
import PciDevices from './VirtualMachinePciDevices/index';
import AccessCredentials from './VirtualMachineAccessCredentials';
import CloudConfig from './VirtualMachineCloudConfig';
import CpuMemory from './VirtualMachineCpuMemory';
import Network from './VirtualMachineNetwork';
import Volume from './VirtualMachineVolume';
import SSHKey from './VirtualMachineSSHKey';
import Reserved from './VirtualMachineReserved';
export default {
name: 'HarvesterEditVM',
@ -128,7 +128,7 @@ export default {
versionOptions() {
const defaultVersion = this.curTemplateResource?.defaultVersion;
return this.versions.filter( (O) => O.templateId === this.templateId).map( (T) => {
return this.versions.filter( O => O.templateId === this.templateId).map( (T) => {
const version = T.version;
const label = defaultVersion === version ? `${ version } (${ this.t('generic.default') })` : version;
@ -143,7 +143,7 @@ export default {
},
curTemplateResource() {
return this.templates.find( (O) => O.id === this.templateId);
return this.templates.find( O => O.id === this.templateId);
},
nameLabel() {
@ -184,7 +184,7 @@ export default {
if (id !== old && !this.templateVersionId) {
const templates = await this.$store.dispatch('harvester/findAll', { type: HCI.VM_TEMPLATE });
this.templateVersionId = templates.find( (O) => O.id === id)?.spec?.defaultVersionId;
this.templateVersionId = templates.find( O => O.id === id)?.spec?.defaultVersionId;
}
},
immediate: false
@ -196,7 +196,7 @@ export default {
return;
}
const versions = await this.$store.dispatch('harvester/findAll', { type: HCI.VM_VERSION });
const curVersion = versions.find( (V) => V.id === id);
const curVersion = versions.find( V => V.id === id);
const cloneVersionVM = clone(curVersion.spec.vm);
delete cloneVersionVM.spec?.template?.spec?.accessCredentials;
@ -412,7 +412,7 @@ export default {
hasAvailableVersion(templateId) {
let hasAvailableVersion = false;
this.versions.filter( (O) => O.templateId === templateId).find( (T) => {
this.versions.filter( O => O.templateId === templateId).find( (T) => {
if (T.isReady) {
hasAvailableVersion = true;
}

View File

@ -3,10 +3,10 @@ import debounce from 'lodash/debounce';
import LabeledSelect from '@shell/components/form/LabeledSelect';
import { LabeledInput } from '@components/Form/LabeledInput';
import Priority from './Priority';
import { NETWORK_ATTACHMENT } from '@shell/config/types';
import { _EDIT } from '@shell/config/query-params';
import Priority from './Priority';
export default {
components: {

View File

@ -6,9 +6,9 @@ import CreateEditView from '@shell/mixins/create-edit-view';
import { NETWORK_ATTACHMENT, CAPI } from '@shell/config/types';
import { allHash } from '@shell/utils/promise';
import CruResource from '@shell/components/CruResource';
import { HCI } from '@pkg/harvester/types';
import Range from './Range';
import Selector from './Selector';
import { HCI } from '@pkg/harvester/types';
export default {
name: 'HarvesterIPPool',

View File

@ -17,10 +17,10 @@ import CreateEditView from '@shell/mixins/create-edit-view';
import { NODE } from '@shell/config/types';
import { set, clone } from '@shell/utils/object';
import { uniq, findBy } from '@shell/utils/array';
import { HCI } from '../../types';
import { allHash } from '@shell/utils/promise';
import { HOSTNAME } from '@shell/config/labels-annotations';
import { matching } from '@shell/utils/selector';
import { HCI } from '../../types';
import NodeSelector from './NodeSelector';

View File

@ -23,7 +23,7 @@ export default {
computed: {
vm() {
const vm = this.vmList.find( (V) => V.id === `${ this.row.metadata.namespace }/${ this.value }`);
const vm = this.vmList.find( V => V.id === `${ this.row.metadata.namespace }/${ this.value }`);
return vm;
},

View File

@ -1,11 +1,11 @@
<script>
import { OFF } from '../models/kubevirt.io.virtualmachine';
import { get } from '@shell/utils/object';
import { isIpv4 } from '@shell/utils/string';
import { HCI as HCI_ANNOTATIONS } from '@pkg/harvester/config/labels-annotations';
import CopyToClipboardText from '@shell/components/CopyToClipboardText';
import { HCI } from '../types';
import { MANAGEMENT_NETWORK } from '../mixins/harvester-vm';
import CopyToClipboardText from '@shell/components/CopyToClipboardText';
import { OFF } from '../models/kubevirt.io.virtualmachine';
export default {
components: { CopyToClipboardText },

View File

@ -1,6 +1,6 @@
<script>
import { HCI } from '../types';
import { BadgeState } from '@components/BadgeState';
import { HCI } from '../types';
export default {
components: { BadgeState },

View File

@ -22,7 +22,7 @@ export default {
computed: {
volume() {
const namespace = this.row?.metadata?.namespace;
const volume = this.volumeList.find( (V) => V.id === `${ namespace }/${ this.value }`) || {};
const volume = this.volumeList.find( V => V.id === `${ namespace }/${ this.value }`) || {};
return volume;
},

View File

@ -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';

View File

@ -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',

View File

@ -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';

View File

@ -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',

View File

@ -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,

View File

@ -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';

View File

@ -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,

View File

@ -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() {

View File

@ -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: {

View File

@ -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,

View File

@ -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() {

View File

@ -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',

View File

@ -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',

View File

@ -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);
},
},
};

View File

@ -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 });
}

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -3,10 +3,10 @@ import jsyaml from 'js-yaml';
import isEqual from 'lodash/isEqual';
import { clone } from '@shell/utils/object';
import { SECRET } from '@shell/config/types';
import { HCI } from '../../types';
import { HCI as HCI_ANNOTATIONS } from '@pkg/harvester/config/labels-annotations';
import { OS } from './index';
import { HCI } from '../../types';
import { parseVolumeClaimTemplates } from '../../utils/vm';
import { OS } from './index';
export const QGA_JSON = {
package_update: true,

View File

@ -2,8 +2,8 @@ import SteveModel from '@shell/plugins/steve/steve-class';
import { escapeHtml } from '@shell/utils/string';
import { colorForState } from '@shell/plugins/dashboard-store/resource-class';
import { NODE } from '@shell/config/types';
import { HCI } from '../types';
import { HCI as HCI_ANNOTATIONS } from '@pkg/harvester/config/labels-annotations';
import { HCI } from '../types';
/**
* Class representing SR-IOV Device resource.

View File

@ -1,6 +1,6 @@
import SteveModel from '@shell/plugins/steve/steve-class';
import { PRODUCT_NAME as HARVESTER_PRODUCT } from '../config/harvester';
import { VIEW_IN_API, DEV } from '@shell/store/prefs';
import { PRODUCT_NAME as HARVESTER_PRODUCT } from '../config/harvester';
export default class HarvesterResource extends SteveModel {
get listLocation() {

View File

@ -1,6 +1,6 @@
import { clone } from '@shell/utils/object';
import { HCI } from '../../types';
import NetworkAttachmentDef from '@pkg/harvester/models/k8s.cni.cncf.io.networkattachmentdefinition';
import { HCI } from '../../types';
import { PRODUCT_NAME as HARVESTER_PRODUCT } from '../../config/harvester';
const NOT_READY = 'Not Ready';
@ -56,7 +56,7 @@ export default class HarvesterNetworkAttachmentDef extends NetworkAttachmentDef
get clusterNetworkResource() {
const clusterNetworks = this.$rootGetters[`${ this.inStore }/all`](HCI.CLUSTER_NETWORK);
return clusterNetworks.find((c) => c.id === this.clusterNetwork);
return clusterNetworks.find(c => c.id === this.clusterNetwork);
}
get clusterNetworkErrorMessage() {

View File

@ -1,8 +1,8 @@
import { clone } from '@shell/utils/object';
import { LOGGING } from '@shell/config/types';
import { HCI } from '../../types';
import HarvesterFlow from './logging.banzaicloud.io.flow';
import { PRODUCT_NAME as HARVESTER_PRODUCT } from '../../config/harvester';
import HarvesterFlow from './logging.banzaicloud.io.flow';
export default class HciClusterflow extends HarvesterFlow {
get allOutputs() {

View File

@ -1,7 +1,7 @@
import { clone } from '@shell/utils/object';
import { HCI } from '../../types';
import LogOutput from './logging.banzaicloud.io.output';
import { PRODUCT_NAME as HARVESTER_PRODUCT } from '../../config/harvester';
import LogOutput from './logging.banzaicloud.io.output';
export default class HciClusteroutput extends LogOutput {
get _detailLocation() {

View File

@ -1,7 +1,7 @@
import { LOGGING } from '@shell/config/types';
import { HCI } from '../../types';
import { clone } from '@shell/utils/object';
import Flow from '@shell/models/logging.banzaicloud.io.flow';
import { HCI } from '../../types';
import { PRODUCT_NAME as HARVESTER_PRODUCT } from '../../config/harvester';
import { FLOW_TYPE } from '../../config/harvester-map';

View File

@ -1,6 +1,6 @@
import { clone } from '@shell/utils/object';
import { HCI } from '../../types';
import LogOutput from '@shell/models/logging.banzaicloud.io.output';
import { HCI } from '../../types';
import { PRODUCT_NAME as HARVESTER_PRODUCT } from '../../config/harvester';
import { FLOW_TYPE } from '../../config/harvester-map';

View File

@ -1,7 +1,7 @@
import { HCI } from '../../types';
import { clone } from '@shell/utils/object';
import { PRODUCT_NAME as HARVESTER_PRODUCT } from '../../config/harvester';
import ManagementSetting from '@shell/models/management.cattle.io.setting';
import { HCI } from '../../types';
import { PRODUCT_NAME as HARVESTER_PRODUCT } from '../../config/harvester';
export default class HCIManagementSetting extends ManagementSetting {
get detailLocation() {

View File

@ -1,7 +1,7 @@
import { clone, set } from '@shell/utils/object';
import { _YAML, _CREATE, _VIEW, _CONFIG } from '@shell/config/query-params';
import { HCI } from '../../types';
import SteveModel from '@shell/plugins/steve/steve-class';
import { HCI } from '../../types';
import { PRODUCT_NAME as HARVESTER_PRODUCT } from '../../config/harvester';
export default class HciAlertmanagerConfig extends SteveModel {

View File

@ -1,6 +1,5 @@
import pickBy from 'lodash/pickBy';
import { CAPI, LONGHORN, POD, NODE } from '@shell/config/types';
import { HCI } from '../../types';
import { CAPI as CAPI_ANNOTATIONS } from '@shell/config/labels-annotations.js';
import { HCI as HCI_ANNOTATIONS } from '@pkg/harvester/config/labels-annotations';
import { clone } from '@shell/utils/object';
@ -11,11 +10,12 @@ import {
STATES_ENUM,
} from '@shell/plugins/dashboard-store/resource-class';
import { parseSi } from '@shell/utils/units';
import { findBy, isArray } from '@shell/utils/array';
import { ucFirst } from '@shell/utils/string';
import HarvesterResource from '../harvester';
import { PRODUCT_NAME as HARVESTER_PRODUCT } from '../../config/harvester';
import { findBy, isArray } from '@shell/utils/array';
import { ucFirst } from '@shell/utils/string';
import { HCI } from '../../types';
const ALLOW_SYSTEM_LABEL_KEYS = [
'topology.kubernetes.io/zone',

View File

@ -1,13 +1,13 @@
import Vue from 'vue';
import { _CLONE } from '@shell/config/query-params';
import pick from 'lodash/pick';
import { HCI, VOLUME_SNAPSHOT } from '../../types';
import { PV, LONGHORN } from '@shell/config/types';
import { DESCRIPTION } from '@shell/config/labels-annotations';
import { HCI as HCI_ANNOTATIONS } from '@pkg/harvester/config/labels-annotations';
import { findBy } from '@shell/utils/array';
import { get, clone } from '@shell/utils/object';
import { colorForState } from '@shell/plugins/dashboard-store/resource-class';
import { HCI, VOLUME_SNAPSHOT } from '../../types';
import HarvesterResource from '../harvester';
import { PRODUCT_NAME as HARVESTER_PRODUCT } from '../../config/harvester';

View File

@ -1,7 +1,7 @@
import { clone } from '@shell/utils/object';
import Secret from '@shell/models/secret';
import { HCI } from '../../types';
import { PRODUCT_NAME as HARVESTER_PRODUCT } from '../../config/harvester';
import Secret from '@shell/models/secret';
export default class HciSecret extends Secret {
get _detailLocation() {

View File

@ -1,8 +1,8 @@
import { clone } from '@shell/utils/object';
import { PVC } from '@shell/config/types';
import { HCI } from '../../types';
import HarvesterResource from '../harvester';
import { PRODUCT_NAME as HARVESTER_PRODUCT } from '../../config/harvester';
import { PVC } from '@shell/config/types';
export default class HciSnapshot extends HarvesterResource {
get availableActions() {

View File

@ -1,6 +1,6 @@
import { clone } from '@shell/utils/object';
import { HCI } from '../../types';
import StorageClass from '@shell/models/storage.k8s.io.storageclass';
import { HCI } from '../../types';
import { PRODUCT_NAME as HARVESTER_PRODUCT } from '../../config/harvester';
export default class HciStorageClass extends StorageClass {

View File

@ -1,7 +1,7 @@
import HarvesterResource from './harvester';
import { HCI as HCI_ANNOTATIONS } from '../config/labels-annotations';
import jsyaml from 'js-yaml';
import startCase from 'lodash/startCase';
import { HCI as HCI_ANNOTATIONS } from '../config/labels-annotations';
import HarvesterResource from './harvester';
export default class HciAddonConfig extends HarvesterResource {
get availableActions() {

View File

@ -1,8 +1,8 @@
import { findBy } from '@shell/utils/array';
import { HCI } from '../types';
import { HCI_ALLOWED_SETTINGS, HCI_SETTING } from '../config/settings';
import HarvesterResource from './harvester';
import { PRODUCT_NAME as HARVESTER_PRODUCT } from '../config/harvester';
import HarvesterResource from './harvester';
export default class HciSetting extends HarvesterResource {
get _availableActions() {

View File

@ -1,7 +1,7 @@
import { get } from '@shell/utils/object';
import { HCI } from '../types';
import Parse from 'url-parse';
import { findBy } from '@shell/utils/array';
import { HCI } from '../types';
import HarvesterResource from './harvester';
export default class HciUpgradeLog extends HarvesterResource {

View File

@ -1,5 +1,4 @@
import Vue from 'vue';
import { HCI } from '../types';
import {
DESCRIPTION,
ANNOTATIONS_TO_IGNORE_REGEX,
@ -10,8 +9,9 @@ import { formatSi } from '@shell/utils/units';
import { ucFirst } from '@shell/utils/string';
import { stateDisplay, colorForState } from '@shell/plugins/dashboard-store/resource-class';
import { _CLONE } from '@shell/config/query-params';
import HarvesterResource from './harvester';
import { HCI } from '../types';
import { PRODUCT_NAME as HARVESTER_PRODUCT } from '../config/harvester';
import HarvesterResource from './harvester';
function isReady() {
function getStatusConditionOfType(type, defaultValue = []) {

View File

@ -1,7 +1,7 @@
import { HCI } from '../types';
import { MODE, _CREATE } from '@shell/config/query-params';
import HarvesterResource from './harvester';
import { HCI } from '../types';
import { PRODUCT_NAME as HARVESTER_PRODUCT } from '../config/harvester';
import HarvesterResource from './harvester';
export default class HciVmTemplate extends HarvesterResource {
get availableActions() {

View File

@ -1,17 +1,17 @@
import Vue from 'vue';
import { find, pickBy, omitBy } from 'lodash';
import { HCI } from '../types';
import {
AS, MODE, _VIEW, _CONFIG, _UNFLAG, _EDIT
} from '@shell/config/query-params';
import { HCI as HCI_ANNOTATIONS } from '@pkg/harvester/config/labels-annotations';
import HarvesterResource from './harvester';
import { findBy } from '@shell/utils/array';
import { get, set } from '@shell/utils/object';
import { PRODUCT_NAME as HARVESTER_PRODUCT } from '../config/harvester';
import { colorForState } from '@shell/plugins/dashboard-store/resource-class';
import { LABELS_TO_IGNORE_REGEX } from '@shell/config/labels-annotations';
import { matchesSomeRegex } from '@shell/utils/string';
import { PRODUCT_NAME as HARVESTER_PRODUCT } from '../config/harvester';
import { HCI } from '../types';
import HarvesterResource from './harvester';
export default class HciVmTemplateVersion extends HarvesterResource {
get availableActions() {

View File

@ -4,17 +4,17 @@ import { omitBy, pickBy } from 'lodash';
import { colorForState } from '@shell/plugins/dashboard-store/resource-class';
import { POD, NODE, PVC } from '@shell/config/types';
import { HCI } from '../types';
import { findBy } from '@shell/utils/array';
import { parseSi } from '@shell/utils/units';
import { get, set } from '@shell/utils/object';
import { HCI as HCI_ANNOTATIONS } from '@pkg/harvester/config/labels-annotations';
import { _CLONE } from '@shell/config/query-params';
import HarvesterResource from './harvester';
import { matchesSomeRegex } from '@shell/utils/string';
import { LABELS_TO_IGNORE_REGEX } from '@shell/config/labels-annotations';
import { BACKUP_TYPE } from '../config/types';
import { parseVolumeClaimTemplates } from '@pkg/utils/vm';
import { BACKUP_TYPE } from '../config/types';
import { HCI } from '../types';
import HarvesterResource from './harvester';
export const OFF = 'Off';

View File

@ -1,7 +1,7 @@
import { colorForState } from '@shell/plugins/dashboard-store/resource-class';
import { NODE } from '@shell/config/types';
import { HCI } from '../types';
import { HCI as HCI_ANNOTATIONS } from '@pkg/harvester/config/labels-annotations';
import { HCI } from '../types';
import HarvesterResource from './harvester';
const PAUSED = 'Paused';

View File

@ -1,5 +1,5 @@
import HarvesterResource from './harvester';
import { set } from '@shell/utils/object';
import HarvesterResource from './harvester';
export default class HciInventory extends HarvesterResource {
applyDefaults() {

View File

@ -1,7 +1,7 @@
import { HCI } from '../types';
import { clone } from '@shell/utils/object';
import HarvesterResource from './harvester';
import { NODE } from '@shell/config/types';
import { HCI } from '../types';
import HarvesterResource from './harvester';
export default class HciClusterNetwork extends HarvesterResource {
get doneOverride() {

View File

@ -1,12 +1,12 @@
import { isEmpty } from 'lodash';
import { set, clone } from '@shell/utils/object';
import HarvesterResource from './harvester';
import { HCI } from '../types';
import { insertAt } from '@shell/utils/array';
import { HOSTNAME } from '@shell/config/labels-annotations';
import { matching } from '@shell/utils/selector';
import { NODE } from '@shell/config/types';
import { HCI } from '../types';
import HarvesterResource from './harvester';
const NOT_READY = 'Not Ready';

View File

@ -4,11 +4,11 @@ import { RadioGroup } from '@components/Form/Radio';
import { Checkbox } from '@components/Form/Checkbox';
import { LabeledInput } from '@components/Form/LabeledInput';
import LabeledSelect from '@shell/components/form/LabeledSelect';
import { exceptionToErrorsArray } from '@shell/utils/error';
import { HCI as HCI_ANNOTATIONS } from '@pkg/harvester/config/labels-annotations';
import UpgradeInfo from '../../../../components/UpgradeInfo';
import { HCI } from '../../../../types';
import { exceptionToErrorsArray } from '@shell/utils/error';
import { HCI as HCI_ANNOTATIONS } from '@pkg/harvester/config/labels-annotations';
import { PRODUCT_NAME as HARVESTER_PRODUCT } from '../../../../config/harvester';
const IMAGE_METHOD = {

View File

@ -1,7 +1,7 @@
<script>
import Loading from '@shell/components/Loading';
import { HCI } from '../../../../../types';
import SerialConsole from '../../../../../components/SerialConsole';
import Loading from '@shell/components/Loading';
export default {
components: { SerialConsole, Loading },

View File

@ -1,7 +1,7 @@
<script>
import Loading from '@shell/components/Loading';
import { HCI } from '../../../../../types';
import NovncConsoleWrapper from '../../../../../components/novnc/NovncConsoleWrapper.vue';
import Loading from '@shell/components/Loading';
export default {
components: { NovncConsoleWrapper, Loading },

View File

@ -1,7 +1,7 @@
<script>
import ExplorerMembers from '@shell/components/ExplorerMembers';
import { PRODUCT_NAME as HARVESTER_PRODUCT } from '../../../../config/harvester';
import { MANAGEMENT } from '@shell/config/types';
import { PRODUCT_NAME as HARVESTER_PRODUCT } from '../../../../config/harvester';
export default {
components: { ExplorerMembers },
computed: {

View File

@ -2,8 +2,8 @@
import Vue from 'vue';
import { Location } from 'vue-router';
import ExplorerProjectsNamespaces from '@shell/components/ExplorerProjectsNamespaces.vue';
import { PRODUCT_NAME as HARVESTER_PRODUCT } from '../../../config/harvester';
import { MANAGEMENT, NAMESPACE } from '@shell/config/types';
import { PRODUCT_NAME as HARVESTER_PRODUCT } from '../../../config/harvester';
interface Data {
createProjectLocation: Location,
createNamespaceLocation: Location

View File

@ -3,9 +3,9 @@ import { mapGetters } from 'vuex';
import { PLUGIN_DEVELOPER, DEV } from '@shell/store/prefs';
import BannerGraphic from '@shell/components/BannerGraphic';
import IndentedPanel from '@shell/components/IndentedPanel';
import HarvesterSupportBundle from '../../../../dialog/HarvesterSupportBundle';
import CommunityLinks from '@shell/components/CommunityLinks';
import { SCHEMA } from '@shell/config/types';
import HarvesterSupportBundle from '../../../../dialog/HarvesterSupportBundle';
import { HCI } from '../../../../types';
export default {

View File

@ -1,9 +1,9 @@
<script>
import { mapState, mapGetters } from 'vuex';
import { HCI } from '../types';
import { isEmpty } from '@shell/utils/object';
import Parse from 'url-parse';
import { resourceNames } from '@shell/utils/string';
import { HCI } from '../types';
export default {
name: 'HarvesterPromptRemove',

Some files were not shown because too many files have changed in this diff Show More