mirror of
https://github.com/harvester/harvester-ui-extension.git
synced 2026-10-02 20:26:09 +08:00
Compare commits
10
Commits
v1.7.0-rc4
..
v1.7.0
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8fbe1943d8 | ||
|
|
ec6bc4d639 | ||
|
|
3824a14730 | ||
|
|
0fc8bece02 | ||
|
|
39764af627 | ||
|
|
bdc87bda0e | ||
|
|
e0dc77624b | ||
|
|
c3ba10bd22 | ||
|
|
5b7d54d0a3 | ||
|
|
99a216dfa0 |
+2
-2
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "harvester-ui-extension",
|
||||
"version": "1.7.0-rc4",
|
||||
"version": "1.7.0",
|
||||
"private": false,
|
||||
"engines": {
|
||||
"node": ">=20.0.0"
|
||||
@@ -26,7 +26,7 @@
|
||||
"json5": "2.2.3",
|
||||
"@types/lodash": "4.17.21",
|
||||
"merge": "2.1.1",
|
||||
"node-forge": "1.3.2",
|
||||
"node-forge": "1.3.3",
|
||||
"nth-check": "2.1.1",
|
||||
"qs": "6.14.0",
|
||||
"roarr": "7.21.2",
|
||||
|
||||
@@ -50,6 +50,7 @@ export const HCI = {
|
||||
STORAGE_CLASS: 'harvesterhci.io/storageClassName',
|
||||
STORAGE_NETWORK: 'storage-network.settings.harvesterhci.io',
|
||||
ADDON_EXPERIMENTAL: 'addon.harvesterhci.io/experimental',
|
||||
ADDON_DISPLAYNAME: 'addon.harvesterhci.io/displayName',
|
||||
VOLUME_ERROR: 'longhorn.io/volume-scheduling-error',
|
||||
VOLUME_FOR_VM: 'harvesterhci.io/volumeForVirtualMachine',
|
||||
KVM_AMD_CPU: 'cpu-feature.node.kubevirt.io/svm',
|
||||
|
||||
@@ -96,7 +96,6 @@ export default {
|
||||
templateVersionId: '',
|
||||
namePrefix: '',
|
||||
isSingle: true,
|
||||
useTemplate: false,
|
||||
isOpen: false,
|
||||
hostname,
|
||||
isRestartImmediately,
|
||||
|
||||
@@ -1561,6 +1561,7 @@ harvester:
|
||||
'harvester-seeder': harvester-seeder is an add-on that uses IPMI and Redfish to discover hardware information and perform out-of-band operations.
|
||||
'harvester-system/harvester-seeder': harvester-seeder is an add-on that uses IPMI and Redfish to discover hardware information and perform out-of-band operations.
|
||||
'harvester-csi-driver-lvm': harvester-csi-driver-lvm is an add-on allowing users to create PVC through the LVM with local devices.
|
||||
'descheduler': 'The virtual machine auto balance optimizes workload scheduling by evicting pods that are not optimally placed according to administrator-defined policies.'
|
||||
vmImport:
|
||||
titles:
|
||||
basic: Basic
|
||||
|
||||
@@ -142,6 +142,7 @@ export default {
|
||||
showYaml: false,
|
||||
spec: null,
|
||||
osType: 'linux',
|
||||
useTemplate: false,
|
||||
sshKey: [],
|
||||
maintenanceStrategies,
|
||||
maintenanceStrategy: 'Migrate',
|
||||
@@ -273,7 +274,7 @@ export default {
|
||||
|
||||
needNewSecret() {
|
||||
// When creating a template it is always necessary to create a new secret.
|
||||
return this.showYaml ? false : this.resourceType === HCI.VM_VERSION || this.isCreate;
|
||||
return this.isCreate || this.showYaml ? false : this.resourceType === HCI.VM_VERSION;
|
||||
},
|
||||
|
||||
defaultTerminationSetting() {
|
||||
@@ -708,7 +709,8 @@ export default {
|
||||
const volumeClaimTemplates = [];
|
||||
|
||||
disk.forEach( (R, index) => {
|
||||
const dataVolumeName = this.parseDataVolumeName(R);
|
||||
const prefixName = this.value.metadata?.name || '';
|
||||
const dataVolumeName = this.parseDataVolumeName(R, prefixName);
|
||||
|
||||
const _disk = this.parseDisk(R, index);
|
||||
const _volume = this.parseVolume(R, dataVolumeName);
|
||||
@@ -1003,23 +1005,18 @@ export default {
|
||||
this['cpuMemoryHotplugEnabled'] = cpuMemoryHotplugEnabled;
|
||||
},
|
||||
|
||||
parseDataVolumeName(R) {
|
||||
const prefixName = this.value.metadata?.name || '';
|
||||
parseDataVolumeName(R, prefixName) {
|
||||
let dataVolumeName = '';
|
||||
|
||||
if (!R.dataVolumeName) {
|
||||
if (R.source === SOURCE_TYPE.ATTACH_VOLUME) {
|
||||
dataVolumeName = R.volumeName;
|
||||
} else if (this.isClone || !this.hasCreateVolumes.includes(R.realName)) {
|
||||
dataVolumeName = `${ prefixName }-${ R.name }-${ randomStr(5).toLowerCase() }`;
|
||||
} else {
|
||||
dataVolumeName = R.realName;
|
||||
}
|
||||
|
||||
R.dataVolumeName = dataVolumeName;
|
||||
if (R.source === SOURCE_TYPE.ATTACH_VOLUME) {
|
||||
dataVolumeName = R.volumeName;
|
||||
} else if (this.isClone || !this.hasCreateVolumes.includes(R.realName)) {
|
||||
dataVolumeName = `${ prefixName }-${ R.name }-${ randomStr(5).toLowerCase() }`;
|
||||
} else {
|
||||
dataVolumeName = R.realName;
|
||||
}
|
||||
|
||||
return R.dataVolumeName;
|
||||
return dataVolumeName;
|
||||
},
|
||||
|
||||
parseDisk(R, index) {
|
||||
@@ -1647,7 +1644,8 @@ export default {
|
||||
|
||||
secretRef: {
|
||||
handler(secret) {
|
||||
if (secret && this.resourceType !== HCI.BACKUP && this.resourceType !== HCI.VM) {
|
||||
// we should not inherit the secret if it's from VM template.
|
||||
if (secret && this.resourceType !== HCI.BACKUP && !this.useTemplate) {
|
||||
this.secretName = secret?.metadata.name;
|
||||
}
|
||||
},
|
||||
|
||||
@@ -113,8 +113,9 @@ export default class HciAddonConfig extends HarvesterResource {
|
||||
|
||||
get displayName() {
|
||||
const isExperimental = this.metadata?.labels?.[HCI_ANNOTATIONS.ADDON_EXPERIMENTAL] === 'true';
|
||||
const name = this.metadata?.labels?.[HCI_ANNOTATIONS.ADDON_DISPLAYNAME] || this.metadata.name;
|
||||
|
||||
return isExperimental ? `${ this.metadata.name } (${ this.t('generic.experimental') })` : this.metadata.name;
|
||||
return isExperimental ? `${ name } (${ this.t('generic.experimental') })` : name;
|
||||
}
|
||||
|
||||
get customValidationRules() {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "harvester",
|
||||
"description": "Rancher UI Extension for Harvester",
|
||||
"version": "1.7.0-rc4",
|
||||
"version": "1.7.0",
|
||||
"private": false,
|
||||
"rancher": {
|
||||
"annotations": {
|
||||
|
||||
@@ -3453,9 +3453,9 @@
|
||||
"@types/node" "*"
|
||||
|
||||
"@types/node@*", "@types/node@20.10.8", "@types/node@^14.14.31", "@types/node@~20.19.0":
|
||||
version "20.19.25"
|
||||
resolved "https://registry.yarnpkg.com/@types/node/-/node-20.19.25.tgz#467da94a2fd966b57cc39c357247d68047611190"
|
||||
integrity sha512-ZsJzA5thDQMSQO788d7IocwwQbI8B5OPzmqNvpf3NY/+MHDAS759Wo0gd2WQeXYt5AAAQjzcrTVC6SKCuYgoCQ==
|
||||
version "20.19.27"
|
||||
resolved "https://registry.yarnpkg.com/@types/node/-/node-20.19.27.tgz#d51333f77953a5e4e71d3b5aefa83ec5297fbb80"
|
||||
integrity sha512-N2clP5pJhB2YnZJ3PIHFk5RkygRX5WO/5f0WC08tp0wd+sv0rsJk3MqWn3CbNmT2J505a5336jaQj4ph1AdMug==
|
||||
dependencies:
|
||||
undici-types "~6.21.0"
|
||||
|
||||
@@ -10310,10 +10310,10 @@ node-fetch@^2.6.7:
|
||||
dependencies:
|
||||
whatwg-url "^5.0.0"
|
||||
|
||||
node-forge@1.3.2, node-forge@^1:
|
||||
version "1.3.2"
|
||||
resolved "https://registry.yarnpkg.com/node-forge/-/node-forge-1.3.2.tgz#d0d2659a26eef778bf84d73e7f55c08144ee7750"
|
||||
integrity sha512-6xKiQ+cph9KImrRh0VsjH2d8/GXA4FIMlgU4B757iI1ApvcyA9VlouP0yZJha01V+huImO+kKMU7ih+2+E14fw==
|
||||
node-forge@1.3.3, node-forge@^1:
|
||||
version "1.3.3"
|
||||
resolved "https://registry.yarnpkg.com/node-forge/-/node-forge-1.3.3.tgz#0ad80f6333b3a0045e827ac20b7f735f93716751"
|
||||
integrity sha512-rLvcdSyRCyouf6jcOIPe/BgwG/d7hKjzMKOas33/pHEr6gbq18IK9zV7DiPvzsz0oBJPme6qr6H6kGZuI9/DZg==
|
||||
|
||||
node-int64@^0.4.0:
|
||||
version "0.4.0"
|
||||
@@ -13728,9 +13728,9 @@ yaml@^1.10.0, yaml@^1.10.2, yaml@^1.7.2:
|
||||
integrity sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg==
|
||||
|
||||
yaml@^2.5.1:
|
||||
version "2.8.1"
|
||||
resolved "https://registry.yarnpkg.com/yaml/-/yaml-2.8.1.tgz#1870aa02b631f7e8328b93f8bc574fac5d6c4d79"
|
||||
integrity sha512-lcYcMxX2PO9XMGvAJkJ3OsNMw+/7FKes7/hgerGUYWIoWu5j/+YQqcZr5JnPZWzOsEBgMbSbiSTn/dv/69Mkpw==
|
||||
version "2.8.2"
|
||||
resolved "https://registry.yarnpkg.com/yaml/-/yaml-2.8.2.tgz#5694f25eca0ce9c3e7a9d9e00ce0ddabbd9e35c5"
|
||||
integrity sha512-mplynKqc1C2hTVYxd0PU2xQAc22TI1vShAYGksCCfxbn/dFwnHTNi1bvYsBTkhdUNtGIf5xNOg938rrSSYvS9A==
|
||||
|
||||
yargs-parser@^18.1.2:
|
||||
version "18.1.3"
|
||||
|
||||
Reference in New Issue
Block a user