mirror of
https://github.com/harvester/harvester-ui-extension.git
synced 2026-11-22 00:27:38 +08:00
101 files changed
+186
-189
No files matched your search
@@ -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;
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
+1
-1
@@ -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', () => {
|
||||
|
||||
+1
-1
@@ -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', () => {
|
||||
|
||||
+1
-1
@@ -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', () => {
|
||||
|
||||
+1
-1
@@ -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', () => {
|
||||
|
||||
+2
-2
@@ -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',
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in new issue
Block a user