mirror of
https://github.com/harvester/harvester-ui-extension.git
synced 2026-10-03 20:56:06 +08:00
Compare commits
8
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9233fb26f3 | ||
|
|
3c92a06268 | ||
|
|
6256cdc97a | ||
|
|
4323132565 | ||
|
|
d05ec68e16 | ||
|
|
cb2cef5e73 | ||
|
|
45116b568a | ||
|
|
f42d798d10 |
@@ -125,6 +125,13 @@ jobs:
|
|||||||
node-version-file: '.nvmrc'
|
node-version-file: '.nvmrc'
|
||||||
cache: 'yarn'
|
cache: 'yarn'
|
||||||
|
|
||||||
|
# Tag builds (RC, formal and sprint releases) ship the tag as the package
|
||||||
|
# version. RC/formal tags already match package.json; sprint tags
|
||||||
|
# (vX.Y.Z-dev-YYYYMMDD) only share its prefix, so pin it here for the build.
|
||||||
|
- name: Pin package version to tag
|
||||||
|
if: ${{ inputs.CI_BUILD_TAG != '' }}
|
||||||
|
run: ./scripts/bump_version.sh "${{ inputs.CI_BUILD_TAG }}"
|
||||||
|
|
||||||
- id: ci-build-pkg
|
- id: ci-build-pkg
|
||||||
name: Build pkg
|
name: Build pkg
|
||||||
run: ./scripts/ci-build-pkg.sh harvester
|
run: ./scripts/ci-build-pkg.sh harvester
|
||||||
|
|||||||
@@ -58,6 +58,12 @@ jobs:
|
|||||||
- name: Setup Nodejs with yarn install
|
- name: Setup Nodejs with yarn install
|
||||||
uses: ./.github/actions/setup
|
uses: ./.github/actions/setup
|
||||||
|
|
||||||
|
# The catalog image is tagged with the package.json version. Sprint tags
|
||||||
|
# (vX.Y.Z-dev-YYYYMMDD) only share its prefix, so pin it to the tag here.
|
||||||
|
- name: Pin package version to tag
|
||||||
|
if: ${{ github.ref_type == 'tag' }}
|
||||||
|
run: ./scripts/bump_version.sh "${{ github.ref_name }}"
|
||||||
|
|
||||||
- name: Build and push UI image
|
- name: Build and push UI image
|
||||||
run: |
|
run: |
|
||||||
publish="yarn publish-pkgs -cp -r ${{ inputs.registry_target }} -o ${{ inputs.registry_user }}"
|
publish="yarn publish-pkgs -cp -r ${{ inputs.registry_target }} -o ${{ inputs.registry_user }}"
|
||||||
|
|||||||
+1
-1
@@ -27,7 +27,7 @@
|
|||||||
"yaml": "^2.5.1"
|
"yaml": "^2.5.1"
|
||||||
},
|
},
|
||||||
"resolutions": {
|
"resolutions": {
|
||||||
"@types/node": "25.9.5",
|
"@types/node": "25.9.8",
|
||||||
"cronstrue": "2.59.0",
|
"cronstrue": "2.59.0",
|
||||||
"d3-color": "3.1.0",
|
"d3-color": "3.1.0",
|
||||||
"ejs": "3.1.10",
|
"ejs": "3.1.10",
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
|
After Width: | Height: | Size: 5.8 KiB |
File diff suppressed because one or more lines are too long
|
After Width: | Height: | Size: 5.8 KiB |
@@ -10,6 +10,7 @@ import { docLink } from '../utils/feature-flags';
|
|||||||
const CATEGORY = {
|
const CATEGORY = {
|
||||||
ui: [
|
ui: [
|
||||||
'branding',
|
'branding',
|
||||||
|
HCI_SETTING.SERVER_FLAVOR,
|
||||||
'ui-source',
|
'ui-source',
|
||||||
'ui-index',
|
'ui-index',
|
||||||
]
|
]
|
||||||
@@ -53,7 +54,7 @@ export default {
|
|||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|
||||||
computed: { ...mapGetters({ t: 'i18n/t' }) },
|
computed: { ...mapGetters({ t: 'i18n/t', isHarvesterPrime: 'harvester-common/isHarvesterPrime' }) },
|
||||||
|
|
||||||
watch: {
|
watch: {
|
||||||
settings: {
|
settings: {
|
||||||
@@ -269,7 +270,8 @@ export default {
|
|||||||
v-if="!setting.hide"
|
v-if="!setting.hide"
|
||||||
class="settings-value"
|
class="settings-value"
|
||||||
>
|
>
|
||||||
<pre v-if="setting.kind === 'json'">{{ setting.json }}</pre>
|
<pre v-if="setting.id === 'branding' && isHarvesterPrime">{{ $store.getters['harvester-common/privateLabel'] }}</pre>
|
||||||
|
<pre v-else-if="setting.kind === 'json'">{{ setting.json }}</pre>
|
||||||
<pre v-else-if="setting.kind === 'multiline'">{{ setting.data.value || setting.data.default }}</pre>
|
<pre v-else-if="setting.kind === 'multiline'">{{ setting.data.value || setting.data.default }}</pre>
|
||||||
<pre v-else-if="setting.kind === 'enum'">{{ t(setting.enum) }}</pre>
|
<pre v-else-if="setting.kind === 'enum'">{{ t(setting.enum) }}</pre>
|
||||||
<pre v-else-if="setting.kind === 'custom' && setting.custom">{{ setting.custom }}</pre>
|
<pre v-else-if="setting.kind === 'custom' && setting.custom">{{ setting.custom }}</pre>
|
||||||
|
|||||||
@@ -77,6 +77,10 @@ const FEATURE_FLAGS = {
|
|||||||
'staticIPForVM',
|
'staticIPForVM',
|
||||||
'fsFreezeDeadline',
|
'fsFreezeDeadline',
|
||||||
],
|
],
|
||||||
|
'v1.9.1': [
|
||||||
|
'lvmDmThinOnly',
|
||||||
|
],
|
||||||
|
'v1.10.0': [],
|
||||||
};
|
};
|
||||||
|
|
||||||
const generateFeatureFlags = () => {
|
const generateFeatureFlags = () => {
|
||||||
|
|||||||
@@ -57,6 +57,8 @@ import {
|
|||||||
} from './table-headers';
|
} from './table-headers';
|
||||||
import { ADD_ONS } from './harvester-map';
|
import { ADD_ONS } from './harvester-map';
|
||||||
import { registerAddonSideNav } from '../utils/dynamic-nav';
|
import { registerAddonSideNav } from '../utils/dynamic-nav';
|
||||||
|
import { setVendor } from '@shell/config/private-label';
|
||||||
|
import { createCssVars } from '@shell/utils/color';
|
||||||
|
|
||||||
const TEMPLATE = HCI.VM_VERSION;
|
const TEMPLATE = HCI.VM_VERSION;
|
||||||
const MONITORING_GROUP = 'Monitoring & Logging::Monitoring';
|
const MONITORING_GROUP = 'Monitoring & Logging::Monitoring';
|
||||||
@@ -109,15 +111,51 @@ export function init($plugin, store) {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
store.watch(
|
||||||
|
(_state, getters) => JSON.stringify([
|
||||||
|
!!getters['harvester-common/isHarvesterPrime'],
|
||||||
|
getters['prefs/theme'] === 'dark',
|
||||||
|
getters['harvester-common/privateLabel']
|
||||||
|
]),
|
||||||
|
(value) => {
|
||||||
|
const [isHarvesterPrime, isDark, privateLabel] = JSON.parse(value);
|
||||||
|
const primeLogo = isDark ? require('../assets/images/dark/suse-virtualization.svg') : require('../assets/images/suse-virtualization.svg');
|
||||||
|
|
||||||
|
setVendor(privateLabel || '');
|
||||||
|
|
||||||
|
let primaryColorStyle = document.getElementById('harvester-prime-primary-color');
|
||||||
|
|
||||||
|
// set harvester prime primary color style to #4dd192 (Cyan Green)
|
||||||
|
if (isHarvesterPrime) {
|
||||||
|
if (!primaryColorStyle) {
|
||||||
|
primaryColorStyle = document.createElement('style');
|
||||||
|
primaryColorStyle.id = 'harvester-prime-primary-color';
|
||||||
|
document.head.appendChild(primaryColorStyle);
|
||||||
|
primaryColorStyle.sheet.insertRule('body.theme-light, body.theme-dark {}', 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
const colors = createCssVars('#4dd192', isDark ? 'dark' : 'light');
|
||||||
|
const rule = primaryColorStyle.sheet.cssRules[0];
|
||||||
|
|
||||||
|
Object.entries(colors).forEach(([property, color]) => rule.style.setProperty(property.trim(), color));
|
||||||
|
} else {
|
||||||
|
primaryColorStyle?.remove();
|
||||||
|
}
|
||||||
|
|
||||||
|
const primeLabelKey = privateLabel ? 'harvester.branding.primeLabel' : 'harvester.branding.primeEmptyLabel';
|
||||||
|
|
||||||
store.dispatch('setIsSingleProduct', {
|
store.dispatch('setIsSingleProduct', {
|
||||||
productName: PRODUCT_NAME,
|
productName: PRODUCT_NAME,
|
||||||
logo: require(`@shell/assets/images/providers/harvester.svg`),
|
logo: isHarvesterPrime ? primeLogo : require(`@shell/assets/images/providers/harvester.svg`),
|
||||||
productNameKey: 'harvester.productLabel',
|
productNameKey: isHarvesterPrime ? primeLabelKey : 'harvester.productLabel',
|
||||||
getVersionInfo: (store) => store.getters[`${ PRODUCT_NAME }/byId`]?.(HCI.SETTING, 'server-version')?.value || 'unknown',
|
getVersionInfo: (store) => store.getters[`${ PRODUCT_NAME }/byId`]?.(HCI.SETTING, 'server-version')?.value || 'unknown',
|
||||||
afterLoginRoute: home,
|
afterLoginRoute: home,
|
||||||
logoRoute: home,
|
logoRoute: home,
|
||||||
supportCustomLogo: true
|
supportCustomLogo: !isHarvesterPrime
|
||||||
});
|
});
|
||||||
|
},
|
||||||
|
{ immediate: true }
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
product({
|
product({
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ export const HCI_SETTING = {
|
|||||||
CONTAINERD_REGISTRY: 'containerd-registry',
|
CONTAINERD_REGISTRY: 'containerd-registry',
|
||||||
LOG_LEVEL: 'log-level',
|
LOG_LEVEL: 'log-level',
|
||||||
SERVER_VERSION: 'server-version',
|
SERVER_VERSION: 'server-version',
|
||||||
|
SERVER_FLAVOR: 'server-flavor',
|
||||||
UI_INDEX: 'ui-index',
|
UI_INDEX: 'ui-index',
|
||||||
UPGRADE_CHECKER_ENABLED: 'upgrade-checker-enabled',
|
UPGRADE_CHECKER_ENABLED: 'upgrade-checker-enabled',
|
||||||
UPGRADE_CHECKER_URL: 'upgrade-checker-url',
|
UPGRADE_CHECKER_URL: 'upgrade-checker-url',
|
||||||
@@ -68,6 +69,7 @@ export const HCI_ALLOWED_SETTINGS = {
|
|||||||
kind: 'json', from: 'import', featureFlag: 'csiOnlineExpandValidation'
|
kind: 'json', from: 'import', featureFlag: 'csiOnlineExpandValidation'
|
||||||
},
|
},
|
||||||
[HCI_SETTING.SERVER_VERSION]: { readOnly: true },
|
[HCI_SETTING.SERVER_VERSION]: { readOnly: true },
|
||||||
|
[HCI_SETTING.SERVER_FLAVOR]: { readOnly: true },
|
||||||
[HCI_SETTING.UPGRADE_CHECKER_ENABLED]: { kind: 'boolean' },
|
[HCI_SETTING.UPGRADE_CHECKER_ENABLED]: { kind: 'boolean' },
|
||||||
[HCI_SETTING.UPGRADE_CHECKER_URL]: { kind: 'url' },
|
[HCI_SETTING.UPGRADE_CHECKER_URL]: { kind: 'url' },
|
||||||
[HCI_SETTING.HTTP_PROXY]: { kind: 'json', from: 'import' },
|
[HCI_SETTING.HTTP_PROXY]: { kind: 'json', from: 'import' },
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ import NameNsDescription from '@shell/components/form/NameNsDescription';
|
|||||||
import YamlEditor from '@shell/components/YamlEditor';
|
import YamlEditor from '@shell/components/YamlEditor';
|
||||||
|
|
||||||
import CreateEditView from '@shell/mixins/create-edit-view';
|
import CreateEditView from '@shell/mixins/create-edit-view';
|
||||||
|
import FormValidation from '@shell/mixins/form-validation';
|
||||||
import { HCI } from '@pkg/harvester/config/labels-annotations';
|
import { HCI } from '@pkg/harvester/config/labels-annotations';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
@@ -23,7 +24,7 @@ export default {
|
|||||||
NameNsDescription,
|
NameNsDescription,
|
||||||
},
|
},
|
||||||
|
|
||||||
mixins: [CreateEditView],
|
mixins: [CreateEditView, FormValidation],
|
||||||
|
|
||||||
inheritAttrs: false,
|
inheritAttrs: false,
|
||||||
|
|
||||||
@@ -31,6 +32,11 @@ export default {
|
|||||||
return {
|
return {
|
||||||
config: this.value.data?.cloudInit || '',
|
config: this.value.data?.cloudInit || '',
|
||||||
type: this.value?.metadata?.labels?.[HCI.CLOUD_INIT] || 'user',
|
type: this.value?.metadata?.labels?.[HCI.CLOUD_INIT] || 'user',
|
||||||
|
fvFormRuleSets: [{
|
||||||
|
path: 'metadata.name',
|
||||||
|
rules: ['required'],
|
||||||
|
translationKey: 'nameNsDescription.name.label',
|
||||||
|
}],
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -78,6 +84,7 @@ export default {
|
|||||||
:resource="value"
|
:resource="value"
|
||||||
:errors="errors"
|
:errors="errors"
|
||||||
:apply-hooks="applyHooks"
|
:apply-hooks="applyHooks"
|
||||||
|
:validation-passed="fvFormIsValid"
|
||||||
@finish="save"
|
@finish="save"
|
||||||
@cancel="done"
|
@cancel="done"
|
||||||
@error="e=>errors=e"
|
@error="e=>errors=e"
|
||||||
@@ -86,6 +93,7 @@ export default {
|
|||||||
:value="value"
|
:value="value"
|
||||||
:mode="mode"
|
:mode="mode"
|
||||||
:namespaced="true"
|
:namespaced="true"
|
||||||
|
:rules="{ name: fvGetAndReportPathRules('metadata.name') }"
|
||||||
@update:value="$emit('update:value', $event)"
|
@update:value="$emit('update:value', $event)"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
|
|||||||
+14
-1
@@ -7,8 +7,12 @@ import { allHash } from '@shell/utils/promise';
|
|||||||
import { clone } from '@shell/utils/object';
|
import { clone } from '@shell/utils/object';
|
||||||
import { HCI } from '../../../types';
|
import { HCI } from '../../../types';
|
||||||
import { NODE } from '@shell/config/types';
|
import { NODE } from '@shell/config/types';
|
||||||
|
import { _CREATE, _CLONE } from '@shell/config/query-params';
|
||||||
import { LVM_TOPOLOGY_LABEL } from '../index.vue';
|
import { LVM_TOPOLOGY_LABEL } from '../index.vue';
|
||||||
|
|
||||||
|
const STRIPED_TYPE = 'striped';
|
||||||
|
const DM_THIN_TYPE = 'dm-thin';
|
||||||
|
|
||||||
const DEFAULT_PARAMETERS = [
|
const DEFAULT_PARAMETERS = [
|
||||||
'type',
|
'type',
|
||||||
'vgName'
|
'vgName'
|
||||||
@@ -54,8 +58,17 @@ export default {
|
|||||||
data() {
|
data() {
|
||||||
const node = (this.value.allowedTopologies?.[0]?.matchLabelExpressions || []).find((t) => t.key === LVM_TOPOLOGY_LABEL)?.values[0];
|
const node = (this.value.allowedTopologies?.[0]?.matchLabelExpressions || []).find((t) => t.key === LVM_TOPOLOGY_LABEL)?.values[0];
|
||||||
|
|
||||||
|
// striped is dropped once the LVM add-on reaches GA (v1.9.1); dm-thin is the only supported type.
|
||||||
|
const dmThinOnly = this.$store.getters['harvester-common/getFeatureEnabled']('lvmDmThinOnly');
|
||||||
|
const volumeGroupTypes = dmThinOnly ? [DM_THIN_TYPE] : [STRIPED_TYPE, DM_THIN_TYPE];
|
||||||
|
|
||||||
|
// Default new storage classes to dm-thin, and reset a cloned striped type that is no longer selectable.
|
||||||
|
if (dmThinOnly && [_CREATE, _CLONE].includes(this.realMode) && !volumeGroupTypes.includes(this.value.parameters.type)) {
|
||||||
|
this.value.parameters.type = DM_THIN_TYPE;
|
||||||
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
volumeGroupTypes: ['striped', 'dm-thin'],
|
volumeGroupTypes,
|
||||||
node,
|
node,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -84,6 +84,8 @@ dialog:
|
|||||||
|
|
||||||
harvester:
|
harvester:
|
||||||
branding:
|
branding:
|
||||||
|
primeLabel: '{vendor}'
|
||||||
|
primeEmptyLabel: ''
|
||||||
logos:
|
logos:
|
||||||
tip: 'Upload a logo to replace the Harvester logo in the top-level navigation header. Image height should be 21 pixels with a max width of 200 pixels. Max file size is 20KB. Accepted formats: JPEG, PNG, SVG.'
|
tip: 'Upload a logo to replace the Harvester logo in the top-level navigation header. Image height should be 21 pixels with a max width of 200 pixels. Max file size is 20KB. Accepted formats: JPEG, PNG, SVG.'
|
||||||
favicon:
|
favicon:
|
||||||
@@ -2445,6 +2447,7 @@ advancedSettings:
|
|||||||
'harv-containerd-registry': Containerd Registry Configuration to connect private registries.
|
'harv-containerd-registry': Containerd Registry Configuration to connect private registries.
|
||||||
'harv-log-level': Configure Harvester server log level. Defaults to Info.
|
'harv-log-level': Configure Harvester server log level. Defaults to Info.
|
||||||
'harv-server-version': Harvester server version.
|
'harv-server-version': Harvester server version.
|
||||||
|
'harv-server-flavor': "Indicates the Harvester edition: Prime or Community."
|
||||||
'harv-upgrade-checker-enabled': Specifies whether to enable Harvester upgrade check or not. Default is True.
|
'harv-upgrade-checker-enabled': Specifies whether to enable Harvester upgrade check or not. Default is True.
|
||||||
'harv-upgrade-checker-url': Default Harvester upgrade check url. Only used when the <code>upgrade-checker-enabled</code> is equal to True.
|
'harv-upgrade-checker-url': Default Harvester upgrade check url. Only used when the <code>upgrade-checker-enabled</code> is equal to True.
|
||||||
'harv-ui-source': Configure how to load the UI source. The `External` option is used to load the UI from a ui-index URL, while the `Bundled` option loads the UI from the local Harvester server.
|
'harv-ui-source': Configure how to load the UI source. The `External` option is used to load the UI from a ui-index URL, while the `Bundled` option loads the UI from the local Harvester server.
|
||||||
|
|||||||
@@ -0,0 +1,14 @@
|
|||||||
|
import ManagementSetting from '@shell/models/management.cattle.io.setting';
|
||||||
|
import { HCI_SETTING } from '../../config/settings';
|
||||||
|
|
||||||
|
export default class HarvesterManagementSetting extends ManagementSetting {
|
||||||
|
get _availableActions() {
|
||||||
|
const actions = super._availableActions;
|
||||||
|
|
||||||
|
if (this.$rootGetters['isStandaloneHarvester'] && this.id === HCI_SETTING.UI_PL) {
|
||||||
|
return actions.filter((action) => !['goToClone', 'promptRemove'].includes(action.action));
|
||||||
|
}
|
||||||
|
|
||||||
|
return actions;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -63,6 +63,7 @@ export default {
|
|||||||
return {
|
return {
|
||||||
vendor: getVendor(),
|
vendor: getVendor(),
|
||||||
uiPLSetting: {},
|
uiPLSetting: {},
|
||||||
|
privateLabelDraft: null,
|
||||||
uiLogoDarkSetting: {},
|
uiLogoDarkSetting: {},
|
||||||
uiLogoDark: '',
|
uiLogoDark: '',
|
||||||
uiLogoLightSetting: {},
|
uiLogoLightSetting: {},
|
||||||
@@ -81,6 +82,17 @@ export default {
|
|||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
|
isHarvesterPrime() {
|
||||||
|
return !!this.$store.getters['harvester-common/isHarvesterPrime'];
|
||||||
|
},
|
||||||
|
privateLabel: {
|
||||||
|
get() {
|
||||||
|
return this.privateLabelDraft ?? (this.isHarvesterPrime ? this.$store.getters['harvester-common/privateLabel'] : this.uiPLSetting.value);
|
||||||
|
},
|
||||||
|
set(value) {
|
||||||
|
this.privateLabelDraft = value;
|
||||||
|
}
|
||||||
|
},
|
||||||
mode() {
|
mode() {
|
||||||
const schema = this.$store.getters[`management/schemaFor`](MANAGEMENT.SETTING);
|
const schema = this.$store.getters[`management/schemaFor`](MANAGEMENT.SETTING);
|
||||||
|
|
||||||
@@ -112,7 +124,7 @@ export default {
|
|||||||
this.errors.push(e);
|
this.errors.push(e);
|
||||||
},
|
},
|
||||||
async save(btnCB) {
|
async save(btnCB) {
|
||||||
this.uiPLSetting.value = this.uiPLSetting.value.replaceAll(/[\<>&=#()"]/gm, '');
|
this.uiPLSetting.value = (this.privateLabel || '').replaceAll(/[\<>&=#()"]/gm, '');
|
||||||
if (this.customizeLogo) {
|
if (this.customizeLogo) {
|
||||||
this.uiLogoLightSetting.value = this.uiLogoLight;
|
this.uiLogoLightSetting.value = this.uiLogoLight;
|
||||||
this.uiLogoDarkSetting.value = this.uiLogoDark;
|
this.uiLogoDarkSetting.value = this.uiLogoDark;
|
||||||
@@ -169,7 +181,7 @@ export default {
|
|||||||
<div class="row mb-20">
|
<div class="row mb-20">
|
||||||
<div class="col span-6">
|
<div class="col span-6">
|
||||||
<LabeledInput
|
<LabeledInput
|
||||||
v-model:value="uiPLSetting.value"
|
v-model:value="privateLabel"
|
||||||
:label="t('branding.uiPL.label')"
|
:label="t('branding.uiPL.label')"
|
||||||
:mode="mode"
|
:mode="mode"
|
||||||
:maxlength="100"
|
:maxlength="100"
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
import Parse from 'url-parse';
|
import Parse from 'url-parse';
|
||||||
|
import { MANAGEMENT } from '@shell/config/types';
|
||||||
|
import { SETTING } from '@shell/config/settings';
|
||||||
import { HCI } from '../types';
|
import { HCI } from '../types';
|
||||||
import { PRODUCT_NAME } from '../config/harvester';
|
import { PRODUCT_NAME } from '../config/harvester';
|
||||||
import { featureEnabled, getVersion } from '../utils/feature-flags';
|
import { featureEnabled, getVersion } from '../utils/feature-flags';
|
||||||
@@ -64,6 +66,23 @@ const mutations = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const getters = {
|
const getters = {
|
||||||
|
isHarvesterPrime: (_state, _getters, _rootState, rootGetters) => {
|
||||||
|
const setting = rootGetters['harvester/byId']?.(HCI.SETTING, 'server-flavor');
|
||||||
|
|
||||||
|
return (setting?.value || setting?.default) === 'prime';
|
||||||
|
},
|
||||||
|
|
||||||
|
privateLabel: (_state, getters, _rootState, rootGetters) => {
|
||||||
|
const setting = rootGetters['management/byId']?.(MANAGEMENT.SETTING, SETTING.PL);
|
||||||
|
const value = setting?.value || '';
|
||||||
|
|
||||||
|
if (getters.isHarvesterPrime && value === (setting?.default || 'Harvester')) {
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
|
||||||
|
return value;
|
||||||
|
},
|
||||||
|
|
||||||
getBundleId(state) {
|
getBundleId(state) {
|
||||||
return state.latestBundleId;
|
return state.latestBundleId;
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
import { FAVORITE_TYPES } from '@shell/store/prefs';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Dynamically toggles SideNav entries based on the enabled status of a specific Addon.
|
* Dynamically toggles SideNav entries based on the enabled status of a specific Addon.
|
||||||
*
|
*
|
||||||
@@ -26,10 +28,13 @@ export function registerAddonSideNav(store, productName, {
|
|||||||
|
|
||||||
// Toggle the trigger a few times so an early kick (fired before the SideNav
|
// Toggle the trigger a few times so an early kick (fired before the SideNav
|
||||||
// has mounted on first login) is retried once the component is listening.
|
// has mounted on first login) is retried once the component is listening.
|
||||||
|
// Use the prefs/load mutation (in-memory only)
|
||||||
[0, 600, 1500].forEach((delay) => {
|
[0, 600, 1500].forEach((delay) => {
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
store.dispatch('type-map/addFavorite', TRIGGER);
|
const base = (store.getters['prefs/get'](FAVORITE_TYPES) || []).filter((t) => t !== TRIGGER);
|
||||||
setTimeout(() => store.dispatch('type-map/removeFavorite', TRIGGER), 300);
|
|
||||||
|
store.commit('prefs/load', { key: FAVORITE_TYPES, value: [...base, TRIGGER] });
|
||||||
|
setTimeout(() => store.commit('prefs/load', { key: FAVORITE_TYPES, value: [...base] }), 300);
|
||||||
}, delay);
|
}, delay);
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -2935,10 +2935,10 @@
|
|||||||
dependencies:
|
dependencies:
|
||||||
"@types/node" "*"
|
"@types/node" "*"
|
||||||
|
|
||||||
"@types/node@*", "@types/node@25.3.3", "@types/node@25.9.5":
|
"@types/node@*", "@types/node@25.3.3", "@types/node@25.9.8":
|
||||||
version "25.9.5"
|
version "25.9.8"
|
||||||
resolved "https://registry.yarnpkg.com/@types/node/-/node-25.9.5.tgz#0fefc09e6e82e94cde291bacf43522e989eb01a4"
|
resolved "https://registry.yarnpkg.com/@types/node/-/node-25.9.8.tgz#a460865b194c2c416a8f11841613207848b92583"
|
||||||
integrity sha512-OScDchr2fwuUmWdf4kZ9h7PcJiYDVInhJizG/biAq3cAvqwYktuy/TYGGdZNMtNTFUP7rnb0NU4TUdm82kt4Rg==
|
integrity sha512-VfMrScDmMhUJQmd5hArdQnFvK0OIeD36uN2Va1FcpYaLB/BgkgM8Ulc50XtYISPMz7APJ30+N0T5EM0jlcdfRw==
|
||||||
dependencies:
|
dependencies:
|
||||||
undici-types ">=7.24.0 <7.24.7"
|
undici-types ">=7.24.0 <7.24.7"
|
||||||
|
|
||||||
@@ -3091,15 +3091,6 @@
|
|||||||
"@typescript-eslint/types" "^8.62.0"
|
"@typescript-eslint/types" "^8.62.0"
|
||||||
debug "^4.4.3"
|
debug "^4.4.3"
|
||||||
|
|
||||||
"@typescript-eslint/project-service@8.68.0":
|
|
||||||
version "8.68.0"
|
|
||||||
resolved "https://registry.yarnpkg.com/@typescript-eslint/project-service/-/project-service-8.68.0.tgz#ea4b2869f59165c420cd7a4bbebc38039794e8cc"
|
|
||||||
integrity sha512-5GQtWZCXFcFYux955pvoS02WLc49pXNlvIxocKjS0clvwo3in1RdlzVKyiqQH9vE5AKWFLTaUgeQkOrTS+0Qxw==
|
|
||||||
dependencies:
|
|
||||||
"@typescript-eslint/tsconfig-utils" "^8.68.0"
|
|
||||||
"@typescript-eslint/types" "^8.68.0"
|
|
||||||
debug "^4.4.3"
|
|
||||||
|
|
||||||
"@typescript-eslint/scope-manager@8.62.0":
|
"@typescript-eslint/scope-manager@8.62.0":
|
||||||
version "8.62.0"
|
version "8.62.0"
|
||||||
resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-8.62.0.tgz#a7a7b428d32444bc9a4fe16f24a78fc124283fd4"
|
resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-8.62.0.tgz#a7a7b428d32444bc9a4fe16f24a78fc124283fd4"
|
||||||
@@ -3108,24 +3099,11 @@
|
|||||||
"@typescript-eslint/types" "8.62.0"
|
"@typescript-eslint/types" "8.62.0"
|
||||||
"@typescript-eslint/visitor-keys" "8.62.0"
|
"@typescript-eslint/visitor-keys" "8.62.0"
|
||||||
|
|
||||||
"@typescript-eslint/scope-manager@8.68.0":
|
"@typescript-eslint/tsconfig-utils@8.62.0", "@typescript-eslint/tsconfig-utils@^8.62.0":
|
||||||
version "8.68.0"
|
|
||||||
resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-8.68.0.tgz#e5a13a1159497faeab4e48279bf07576045b1499"
|
|
||||||
integrity sha512-T5eXpcaJNg8bhjHJ8Rjp68Vq/QBteYtTKY8TZqVNPaUbuz0f6jI9t6aDkylwvalpAB9XTTFeFOjrjXAZ3YvmVA==
|
|
||||||
dependencies:
|
|
||||||
"@typescript-eslint/types" "8.68.0"
|
|
||||||
"@typescript-eslint/visitor-keys" "8.68.0"
|
|
||||||
|
|
||||||
"@typescript-eslint/tsconfig-utils@8.62.0":
|
|
||||||
version "8.62.0"
|
version "8.62.0"
|
||||||
resolved "https://registry.yarnpkg.com/@typescript-eslint/tsconfig-utils/-/tsconfig-utils-8.62.0.tgz#9440a673581c6d9de308c4d5803dd52ed5d71729"
|
resolved "https://registry.yarnpkg.com/@typescript-eslint/tsconfig-utils/-/tsconfig-utils-8.62.0.tgz#9440a673581c6d9de308c4d5803dd52ed5d71729"
|
||||||
integrity sha512-y2GAdB6ykaXUvuspbYnizQc4oDDz0Tz/Yc7iWrXf9mx8vm/L/0vLHCe0tS2boG96Zy+DivnVDQ9ZUEWoHqqx1g==
|
integrity sha512-y2GAdB6ykaXUvuspbYnizQc4oDDz0Tz/Yc7iWrXf9mx8vm/L/0vLHCe0tS2boG96Zy+DivnVDQ9ZUEWoHqqx1g==
|
||||||
|
|
||||||
"@typescript-eslint/tsconfig-utils@8.68.0", "@typescript-eslint/tsconfig-utils@^8.62.0", "@typescript-eslint/tsconfig-utils@^8.68.0":
|
|
||||||
version "8.68.0"
|
|
||||||
resolved "https://registry.yarnpkg.com/@typescript-eslint/tsconfig-utils/-/tsconfig-utils-8.68.0.tgz#594d7a3c5952055b3c431fc563ca7fd1defcce18"
|
|
||||||
integrity sha512-F7zrGQfiJHojPwi8vhxZQC1tWtJzvL74cK/nqri2lk8YUXvYaYwl263xOJ69jDWPUk1hmcdoayFwk9lX09npVw==
|
|
||||||
|
|
||||||
"@typescript-eslint/type-utils@8.62.0":
|
"@typescript-eslint/type-utils@8.62.0":
|
||||||
version "8.62.0"
|
version "8.62.0"
|
||||||
resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-8.62.0.tgz#6f64d813ed9f340d796baed40cdab86b8e9a491a"
|
resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-8.62.0.tgz#6f64d813ed9f340d796baed40cdab86b8e9a491a"
|
||||||
@@ -3137,16 +3115,11 @@
|
|||||||
debug "^4.4.3"
|
debug "^4.4.3"
|
||||||
ts-api-utils "^2.5.0"
|
ts-api-utils "^2.5.0"
|
||||||
|
|
||||||
"@typescript-eslint/types@8.62.0":
|
"@typescript-eslint/types@8.62.0", "@typescript-eslint/types@^8.62.0":
|
||||||
version "8.62.0"
|
version "8.62.0"
|
||||||
resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-8.62.0.tgz#601427c10203d9f0f34f0b3e474df735eb12b593"
|
resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-8.62.0.tgz#601427c10203d9f0f34f0b3e474df735eb12b593"
|
||||||
integrity sha512-KvAclkktORPvM54TgLgA4z9HIV1M8zOgw9ZVNXl9f/8dLYfXYX1wkMXP7qmabpijQRV5bHJLOmoyGQbLMaUYeg==
|
integrity sha512-KvAclkktORPvM54TgLgA4z9HIV1M8zOgw9ZVNXl9f/8dLYfXYX1wkMXP7qmabpijQRV5bHJLOmoyGQbLMaUYeg==
|
||||||
|
|
||||||
"@typescript-eslint/types@8.68.0", "@typescript-eslint/types@^8.62.0", "@typescript-eslint/types@^8.68.0":
|
|
||||||
version "8.68.0"
|
|
||||||
resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-8.68.0.tgz#3f9d4e62fbe5728f09403cdc7b4d58af842ac1af"
|
|
||||||
integrity sha512-9RnpsGJjrAllCMefGVVsImJM24YurhC0Q1h4UbvivtvOqXmR/vEJge2OoE++z9m6hyg8T1Q8t5SNT6tHSbrxcg==
|
|
||||||
|
|
||||||
"@typescript-eslint/typescript-estree@8.62.0":
|
"@typescript-eslint/typescript-estree@8.62.0":
|
||||||
version "8.62.0"
|
version "8.62.0"
|
||||||
resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-8.62.0.tgz#b96b55d02e26aa09434421c3fa678e525ca09a4c"
|
resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-8.62.0.tgz#b96b55d02e26aa09434421c3fa678e525ca09a4c"
|
||||||
@@ -3162,22 +3135,7 @@
|
|||||||
tinyglobby "^0.2.15"
|
tinyglobby "^0.2.15"
|
||||||
ts-api-utils "^2.5.0"
|
ts-api-utils "^2.5.0"
|
||||||
|
|
||||||
"@typescript-eslint/typescript-estree@8.68.0":
|
"@typescript-eslint/utils@8.62.0", "@typescript-eslint/utils@^8.0.0", "@typescript-eslint/utils@^8.13.0":
|
||||||
version "8.68.0"
|
|
||||||
resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-8.68.0.tgz#bf4165029825138ac27231a3ff02923ecd977f38"
|
|
||||||
integrity sha512-OKKsD0tYmoNiU5PW2zehO1yO56jYOm1ShYlxon/Z0SJNidAkdVg86eg9ruRuoXf8xfnuWZGbwDsStkoXbZtIIA==
|
|
||||||
dependencies:
|
|
||||||
"@typescript-eslint/project-service" "8.68.0"
|
|
||||||
"@typescript-eslint/tsconfig-utils" "8.68.0"
|
|
||||||
"@typescript-eslint/types" "8.68.0"
|
|
||||||
"@typescript-eslint/visitor-keys" "8.68.0"
|
|
||||||
debug "^4.4.3"
|
|
||||||
minimatch "^10.2.2"
|
|
||||||
semver "^7.7.3"
|
|
||||||
tinyglobby "^0.2.15"
|
|
||||||
ts-api-utils "^2.5.0"
|
|
||||||
|
|
||||||
"@typescript-eslint/utils@8.62.0":
|
|
||||||
version "8.62.0"
|
version "8.62.0"
|
||||||
resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-8.62.0.tgz#b5228524ca1ee51af40e156c82d425dec3e01cfe"
|
resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-8.62.0.tgz#b5228524ca1ee51af40e156c82d425dec3e01cfe"
|
||||||
integrity sha512-82r66fi9zYwZ+mTq3vKgwjbZ1PVk/DJzrXFLpG6RnBbdvH8TEGVHIs9H4d2drhkOzf0syZuD/OZvvlu6GDbP4g==
|
integrity sha512-82r66fi9zYwZ+mTq3vKgwjbZ1PVk/DJzrXFLpG6RnBbdvH8TEGVHIs9H4d2drhkOzf0syZuD/OZvvlu6GDbP4g==
|
||||||
@@ -3187,16 +3145,6 @@
|
|||||||
"@typescript-eslint/types" "8.62.0"
|
"@typescript-eslint/types" "8.62.0"
|
||||||
"@typescript-eslint/typescript-estree" "8.62.0"
|
"@typescript-eslint/typescript-estree" "8.62.0"
|
||||||
|
|
||||||
"@typescript-eslint/utils@^8.0.0", "@typescript-eslint/utils@^8.13.0":
|
|
||||||
version "8.68.0"
|
|
||||||
resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-8.68.0.tgz#00547f2c8de8aca2a3c21752a9711f73206fd36d"
|
|
||||||
integrity sha512-PB5gJMMOg0Q5P1tsgWtEAqQacJXq0qEqRHDX/YJ4FaTMLfZPpHB3gjl2EJuiZyPABxmj4ZQYiY9m1bdAJ5y7tQ==
|
|
||||||
dependencies:
|
|
||||||
"@eslint-community/eslint-utils" "^4.9.1"
|
|
||||||
"@typescript-eslint/scope-manager" "8.68.0"
|
|
||||||
"@typescript-eslint/types" "8.68.0"
|
|
||||||
"@typescript-eslint/typescript-estree" "8.68.0"
|
|
||||||
|
|
||||||
"@typescript-eslint/visitor-keys@8.62.0":
|
"@typescript-eslint/visitor-keys@8.62.0":
|
||||||
version "8.62.0"
|
version "8.62.0"
|
||||||
resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-8.62.0.tgz#b6daab190bf8f18612f5b86323469a12288c6b31"
|
resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-8.62.0.tgz#b6daab190bf8f18612f5b86323469a12288c6b31"
|
||||||
@@ -3205,14 +3153,6 @@
|
|||||||
"@typescript-eslint/types" "8.62.0"
|
"@typescript-eslint/types" "8.62.0"
|
||||||
eslint-visitor-keys "^5.0.0"
|
eslint-visitor-keys "^5.0.0"
|
||||||
|
|
||||||
"@typescript-eslint/visitor-keys@8.68.0":
|
|
||||||
version "8.68.0"
|
|
||||||
resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-8.68.0.tgz#78db3c9bb258a0309d9e2b1b617127c3a8fb1f54"
|
|
||||||
integrity sha512-YR65gGdGvTUAWLldC3xLOvOzamdGzB4A5/N8rehEaHs3Zvoe39BhgY+u0SPch1OvrVTfLcc55wsSgK2NcnTS/A==
|
|
||||||
dependencies:
|
|
||||||
"@typescript-eslint/types" "8.68.0"
|
|
||||||
eslint-visitor-keys "^5.0.0"
|
|
||||||
|
|
||||||
"@vee-validate/zod@4.15.0":
|
"@vee-validate/zod@4.15.0":
|
||||||
version "4.15.0"
|
version "4.15.0"
|
||||||
resolved "https://registry.yarnpkg.com/@vee-validate/zod/-/zod-4.15.0.tgz#2de193da114eda9f873b5a677f13c23bcecb58aa"
|
resolved "https://registry.yarnpkg.com/@vee-validate/zod/-/zod-4.15.0.tgz#2de193da114eda9f873b5a677f13c23bcecb58aa"
|
||||||
@@ -12712,9 +12652,9 @@ yaml@^1.10.0, yaml@^1.10.2, yaml@^1.7.2:
|
|||||||
integrity sha512-vIYeF1u3CjlhAFekPPAk2h/Kv4T3mAkMox5OymRiJQB0spDP10LHvt+K7G9Ny6NuuMAb25/6n1qyUjAcGNf/AA==
|
integrity sha512-vIYeF1u3CjlhAFekPPAk2h/Kv4T3mAkMox5OymRiJQB0spDP10LHvt+K7G9Ny6NuuMAb25/6n1qyUjAcGNf/AA==
|
||||||
|
|
||||||
yaml@^2.5.1:
|
yaml@^2.5.1:
|
||||||
version "2.9.0"
|
version "2.9.1"
|
||||||
resolved "https://registry.yarnpkg.com/yaml/-/yaml-2.9.0.tgz#78274afd93598a1dfdd6130df6a566defcbf9aa4"
|
resolved "https://registry.yarnpkg.com/yaml/-/yaml-2.9.1.tgz#c16233fb31944e705cfefaff38795587f57588ce"
|
||||||
integrity sha512-2AvhNX3mb8zd6Zy7INTtSpl1F15HW6Wnqj0srWlkKLcpYl/gMIMJiyuGq2KeI2YFxUPjdlB+3Lc10seMLtL4cA==
|
integrity sha512-3NxN8+78OdzbT7C/WjGsyfPAtJaN3FNDsWxv7Y7mcDsT/oOmgW8BpyQQFFBnvZE3j9Y2Sdz1ULFLezL7Eb2yFw==
|
||||||
|
|
||||||
yargs-parser@^18.1.2:
|
yargs-parser@^18.1.2:
|
||||||
version "18.1.3"
|
version "18.1.3"
|
||||||
|
|||||||
Reference in New Issue
Block a user