@rancher/shell 3.0.8-rc.8 → 3.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/apis/impl/apis.ts +61 -0
- package/apis/index.ts +40 -0
- package/apis/intf/modal.ts +90 -0
- package/apis/intf/shell.ts +36 -0
- package/apis/intf/slide-in.ts +98 -0
- package/apis/intf/system.ts +41 -0
- package/apis/shell/__tests__/modal.test.ts +80 -0
- package/apis/shell/__tests__/notifications.test.ts +71 -0
- package/apis/shell/__tests__/slide-in.test.ts +54 -0
- package/apis/shell/__tests__/system.test.ts +129 -0
- package/apis/shell/index.ts +38 -0
- package/apis/shell/modal.ts +41 -0
- package/apis/shell/notifications.ts +65 -0
- package/apis/shell/slide-in.ts +33 -0
- package/apis/shell/system.ts +65 -0
- package/apis/vue-shim.d.ts +11 -0
- package/assets/brand/suse/dark/rancher-logo.svg +1 -64
- package/assets/styles/global/_tooltip.scss +6 -1
- package/assets/translations/en-us.yaml +14 -1
- package/components/ActionMenuShell.vue +3 -1
- package/components/BackLink.vue +8 -0
- package/components/BannerGraphic.vue +1 -5
- package/components/BrandImage.vue +17 -6
- package/components/Cron/CronExpressionEditor.vue +1 -1
- package/components/Cron/CronExpressionEditorModal.vue +1 -1
- package/components/CruResource.vue +8 -1
- package/components/Drawer/ResourceDetailDrawer/ConfigTab.vue +1 -0
- package/components/Drawer/ResourceDetailDrawer/__tests__/composables.test.ts +50 -1
- package/components/Drawer/ResourceDetailDrawer/composables.ts +19 -0
- package/components/Drawer/ResourceDetailDrawer/index.vue +4 -1
- package/components/Drawer/ResourceDetailDrawer/types.ts +2 -1
- package/components/LocaleSelector.vue +2 -2
- package/components/ModalManager.vue +11 -1
- package/components/Questions/__tests__/Yaml.test.ts +1 -1
- package/components/Questions/__tests__/index.test.ts +159 -0
- package/components/RelatedResources.vue +5 -0
- package/components/Resource/Detail/Metadata/Annotations/index.vue +2 -2
- package/components/Resource/Detail/Metadata/Labels/index.vue +2 -2
- package/components/Resource/Detail/Metadata/index.vue +3 -3
- package/components/Resource/Detail/ResourcePopover/index.vue +5 -1
- package/components/Resource/Detail/composables.ts +2 -2
- package/components/ResourceDetail/Masthead/latest.vue +23 -21
- package/components/ResourceDetail/index.vue +3 -0
- package/components/ResourceTable.vue +54 -21
- package/components/SlideInPanelManager.vue +16 -11
- package/components/SortableTable/THead.vue +2 -1
- package/components/SortableTable/index.vue +20 -2
- package/components/Tabbed/__tests__/index.test.ts +86 -0
- package/components/Tabbed/index.vue +37 -2
- package/components/__tests__/NamespaceFilter.test.ts +49 -0
- package/components/auth/SelectPrincipal.vue +28 -6
- package/components/auth/__tests__/SelectPrincipal.test.ts +119 -0
- package/components/auth/login/ldap.vue +3 -3
- package/components/fleet/FleetSecretSelector.vue +1 -1
- package/components/form/KeyValue.vue +1 -1
- package/components/form/NameNsDescription.vue +1 -1
- package/components/form/NodeScheduling.vue +2 -2
- package/components/form/ResourceTabs/composable.ts +2 -2
- package/components/form/ResourceTabs/index.vue +0 -2
- package/components/form/__tests__/NameNsDescription.test.ts +42 -0
- package/components/formatter/InternalExternalIP.vue +4 -1
- package/components/formatter/LinkName.vue +5 -0
- package/components/formatter/__tests__/InternalExternalIP.test.ts +1 -1
- package/components/nav/Group.vue +25 -7
- package/components/nav/Header.vue +1 -1
- package/components/nav/NamespaceFilter.vue +1 -0
- package/components/nav/Type.vue +17 -6
- package/components/nav/WindowManager/panels/TabBodyContainer.vue +1 -1
- package/components/nav/__tests__/Type.test.ts +59 -0
- package/components/templates/standalone.vue +1 -1
- package/composables/cruResource.ts +27 -0
- package/composables/focusTrap.ts +3 -1
- package/composables/resourceDetail.ts +15 -0
- package/composables/useI18n.ts +10 -1
- package/composables/useLabeledFormElement.ts +3 -4
- package/config/__test__/uiplugins.test.ts +309 -0
- package/config/labels-annotations.js +1 -0
- package/config/product/explorer.js +3 -1
- package/config/product/fleet.js +1 -1
- package/config/router/navigation-guards/clusters.js +3 -3
- package/config/router/navigation-guards/products.js +1 -1
- package/config/router/routes.js +7 -7
- package/config/types.js +7 -0
- package/config/uiplugins.js +46 -2
- package/core/__tests__/extension-manager-impl.test.js +437 -0
- package/core/extension-manager-impl.js +21 -25
- package/core/plugin-helpers.ts +2 -2
- package/core/plugin.ts +9 -1
- package/core/plugins-loader.js +2 -2
- package/core/types-provisioning.ts +5 -1
- package/core/types.ts +35 -0
- package/detail/provisioning.cattle.io.cluster.vue +9 -6
- package/dialog/DeveloperLoadExtensionDialog.vue +13 -4
- package/dialog/MoveNamespaceDialog.vue +20 -4
- package/dialog/RollbackWorkloadDialog.vue +2 -5
- package/dialog/SearchDialog.vue +1 -0
- package/dialog/__tests__/MoveNamespaceDialog.test.ts +249 -0
- package/directives/__tests__/clean-tooltip.test.ts +298 -0
- package/directives/clean-tooltip.ts +234 -0
- package/edit/__tests__/fleet.cattle.io.gitrepo.test.ts +2 -2
- package/edit/__tests__/fleet.cattle.io.helmop.test.ts +100 -3
- package/edit/autoscaling.horizontalpodautoscaler/index.vue +1 -0
- package/edit/configmap.vue +1 -0
- package/edit/constraints.gatekeeper.sh.constraint/index.vue +1 -0
- package/edit/fleet.cattle.io.helmop.vue +11 -6
- package/edit/helm.cattle.io.projecthelmchart.vue +1 -0
- package/edit/k8s.cni.cncf.io.networkattachmentdefinition.vue +1 -0
- package/edit/logging-flow/index.vue +1 -0
- package/edit/logging.banzaicloud.io.output/index.vue +1 -0
- package/edit/management.cattle.io.fleetworkspace.vue +1 -1
- package/edit/management.cattle.io.project.vue +1 -0
- package/edit/monitoring.coreos.com.alertmanagerconfig/index.vue +4 -1
- package/edit/monitoring.coreos.com.alertmanagerconfig/receiverConfig.vue +2 -1
- package/edit/monitoring.coreos.com.prometheusrule/index.vue +1 -0
- package/edit/monitoring.coreos.com.receiver/index.vue +2 -1
- package/edit/monitoring.coreos.com.route.vue +1 -1
- package/edit/namespace.vue +1 -0
- package/edit/networking.istio.io.destinationrule/index.vue +1 -0
- package/edit/networking.k8s.io.ingress/index.vue +1 -0
- package/edit/networking.k8s.io.networkpolicy/PolicyRules.vue +1 -0
- package/edit/networking.k8s.io.networkpolicy/index.vue +1 -0
- package/edit/node.vue +1 -0
- package/edit/persistentvolume/index.vue +27 -22
- package/edit/persistentvolume/plugins/awsElasticBlockStore.vue +13 -14
- package/edit/persistentvolume/plugins/azureDisk.vue +49 -48
- package/edit/persistentvolume/plugins/azureFile.vue +15 -14
- package/edit/persistentvolume/plugins/cephfs.vue +15 -14
- package/edit/persistentvolume/plugins/cinder.vue +15 -14
- package/edit/persistentvolume/plugins/csi.vue +18 -16
- package/edit/persistentvolume/plugins/fc.vue +13 -14
- package/edit/persistentvolume/plugins/flexVolume.vue +15 -14
- package/edit/persistentvolume/plugins/flocker.vue +1 -3
- package/edit/persistentvolume/plugins/gcePersistentDisk.vue +13 -14
- package/edit/persistentvolume/plugins/glusterfs.vue +15 -14
- package/edit/persistentvolume/plugins/hostPath.vue +40 -39
- package/edit/persistentvolume/plugins/iscsi.vue +13 -14
- package/edit/persistentvolume/plugins/local.vue +1 -3
- package/edit/persistentvolume/plugins/longhorn.vue +23 -22
- package/edit/persistentvolume/plugins/nfs.vue +15 -14
- package/edit/persistentvolume/plugins/photonPersistentDisk.vue +1 -14
- package/edit/persistentvolume/plugins/portworxVolume.vue +15 -14
- package/edit/persistentvolume/plugins/quobyte.vue +15 -14
- package/edit/persistentvolume/plugins/rbd.vue +15 -14
- package/edit/persistentvolume/plugins/scaleIO.vue +15 -14
- package/edit/persistentvolume/plugins/storageos.vue +15 -14
- package/edit/persistentvolume/plugins/vsphereVolume.vue +1 -3
- package/edit/provisioning.cattle.io.cluster/__tests__/rke2.test.ts +21 -21
- package/edit/provisioning.cattle.io.cluster/index.vue +5 -5
- package/edit/provisioning.cattle.io.cluster/rke2.vue +9 -8
- package/edit/resources.cattle.io.restore.vue +1 -1
- package/edit/secret/index.vue +1 -1
- package/edit/service.vue +1 -0
- package/edit/serviceaccount.vue +1 -0
- package/edit/storage.k8s.io.storageclass/index.vue +1 -0
- package/edit/workload/Job.vue +2 -2
- package/edit/workload/index.vue +2 -1
- package/edit/workload/mixins/workload.js +1 -1
- package/initialize/App.vue +4 -4
- package/initialize/install-plugins.js +19 -5
- package/machine-config/azure.vue +1 -1
- package/machine-config/components/GCEImage.vue +1 -1
- package/mixins/__tests__/brand.spec.ts +2 -2
- package/mixins/brand.js +1 -7
- package/mixins/create-edit-view/index.js +5 -0
- package/models/__tests__/provisioning.cattle.io.cluster.test.ts +128 -5
- package/models/chart.js +70 -74
- package/models/management.cattle.io.cluster.js +21 -3
- package/models/provisioning.cattle.io.cluster.js +31 -11
- package/package.json +11 -10
- package/pages/auth/login.vue +4 -6
- package/pages/auth/setup.vue +1 -1
- package/pages/auth/verify.vue +3 -3
- package/pages/c/_cluster/apps/charts/__tests__/chart.test.ts +135 -0
- package/pages/c/_cluster/apps/charts/chart.vue +33 -15
- package/pages/c/_cluster/apps/charts/index.vue +122 -24
- package/pages/c/_cluster/apps/charts/install.vue +33 -0
- package/pages/c/_cluster/explorer/__tests__/index.test.ts +1 -1
- package/pages/c/_cluster/explorer/index.vue +8 -6
- package/pages/c/_cluster/fleet/index.vue +4 -7
- package/pages/c/_cluster/manager/hostedprovider/index.vue +12 -6
- package/pages/c/_cluster/settings/brand.vue +1 -1
- package/pages/c/_cluster/settings/index.vue +5 -0
- package/pages/c/_cluster/uiplugins/__tests__/index.test.ts +7 -0
- package/pages/c/_cluster/uiplugins/catalogs.vue +147 -0
- package/pages/c/_cluster/uiplugins/index.vue +126 -184
- package/pkg/auto-import.js +3 -3
- package/pkg/dynamic-importer.lib.js +1 -1
- package/pkg/import.js +1 -1
- package/plugins/__tests__/mutations.tests.ts +179 -0
- package/plugins/dashboard-client-init.js +3 -0
- package/plugins/dashboard-store/getters.js +19 -2
- package/plugins/dashboard-store/model-loader.js +1 -1
- package/plugins/dashboard-store/mutations.js +23 -2
- package/plugins/dashboard-store/resource-class.js +11 -5
- package/plugins/i18n.js +8 -0
- package/plugins/plugin.js +2 -2
- package/plugins/steve/__tests__/steve-pagination-utils.test.ts +506 -0
- package/plugins/steve/steve-class.js +1 -1
- package/plugins/steve/steve-pagination-utils.ts +131 -47
- package/rancher-components/Form/Checkbox/Checkbox.vue +1 -1
- package/rancher-components/Form/LabeledInput/LabeledInput.vue +1 -1
- package/rancher-components/Pill/RcStatusBadge/RcStatusBadge.vue +6 -42
- package/rancher-components/Pill/RcStatusBadge/index.ts +0 -1
- package/rancher-components/Pill/RcStatusBadge/types.ts +1 -1
- package/rancher-components/Pill/RcStatusIndicator/RcStatusIndicator.vue +5 -28
- package/rancher-components/Pill/RcStatusIndicator/types.ts +2 -1
- package/rancher-components/Pill/types.ts +0 -1
- package/rancher-components/RcDropdown/useDropdownContext.ts +2 -4
- package/rancher-components/RcIcon/RcIcon.test.ts +51 -0
- package/rancher-components/RcIcon/RcIcon.vue +46 -0
- package/rancher-components/RcIcon/index.ts +1 -0
- package/rancher-components/RcIcon/types.ts +160 -0
- package/rancher-components/RcItemCard/RcItemCard.vue +1 -1
- package/rancher-components/utils/status.test.ts +67 -0
- package/rancher-components/utils/status.ts +77 -0
- package/scripts/publish-shell.sh +25 -0
- package/scripts/typegen.sh +1 -0
- package/store/__tests__/catalog.test.ts +1 -1
- package/store/__tests__/type-map.test.ts +164 -2
- package/store/action-menu.js +8 -0
- package/store/auth.js +25 -13
- package/store/catalog.js +6 -0
- package/store/i18n.js +3 -3
- package/store/index.js +8 -6
- package/store/notifications.ts +2 -0
- package/store/prefs.js +6 -7
- package/store/type-map.js +17 -7
- package/store/wm.ts +4 -4
- package/types/internal-api/shell/modal.d.ts +6 -6
- package/types/notifications/index.ts +126 -15
- package/types/rancher/index.d.ts +9 -0
- package/types/shell/index.d.ts +54 -3
- package/types/store/__tests__/pagination.types.spec.ts +137 -0
- package/types/store/pagination.types.ts +157 -9
- package/types/vue-shim.d.ts +5 -4
- package/utils/__tests__/provider.test.ts +98 -0
- package/utils/__tests__/router.test.js +238 -0
- package/utils/__tests__/selector-typed.test.ts +263 -0
- package/utils/cluster.js +4 -1
- package/utils/color.js +1 -1
- package/utils/dynamic-content/__tests__/info.test.ts +6 -0
- package/utils/dynamic-content/info.ts +43 -0
- package/utils/favicon.js +4 -4
- package/utils/fleet.ts +8 -1
- package/utils/pagination-utils.ts +2 -2
- package/utils/pagination-wrapper.ts +1 -1
- package/utils/provider.ts +14 -0
- package/utils/router.js +50 -0
- package/utils/selector-typed.ts +6 -2
- package/utils/unit-tests/pagination-utils.spec.ts +8 -8
- package/vue.config.js +3 -3
- package/composables/useExtensionManager.ts +0 -17
- package/core/plugins.js +0 -38
- package/directives/clean-tooltip.js +0 -32
- package/plugins/internal-api/index.ts +0 -37
- package/plugins/internal-api/shared/base-api.ts +0 -13
- package/plugins/internal-api/shell/shell.api.ts +0 -108
- package/plugins/nuxt-client-init.js +0 -3
- package/types/internal-api/shell/growl.d.ts +0 -25
- package/types/internal-api/shell/slideIn.d.ts +0 -15
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
// system.test.ts
|
|
2
|
+
|
|
3
|
+
import {
|
|
4
|
+
describe, it, expect, jest, beforeEach
|
|
5
|
+
} from '@jest/globals';
|
|
6
|
+
import { SystemApiImpl } from '../system';
|
|
7
|
+
import { Store } from 'vuex';
|
|
8
|
+
|
|
9
|
+
// --- Mock the external modules ---
|
|
10
|
+
|
|
11
|
+
// 1. Import the functions we need to mock
|
|
12
|
+
import { getVersionData, getKubeVersionData, isRancherPrime } from '@shell/config/version';
|
|
13
|
+
import { isDevBuild, isPrerelease } from '@shell/utils/version';
|
|
14
|
+
|
|
15
|
+
// 2. Tell Jest to mock the entire module
|
|
16
|
+
// We provide a factory function () => ({ ... }) to define the mock implementation.
|
|
17
|
+
jest.mock('@shell/config/version', () => ({
|
|
18
|
+
getVersionData: jest.fn(),
|
|
19
|
+
getKubeVersionData: jest.fn(),
|
|
20
|
+
isRancherPrime: jest.fn(),
|
|
21
|
+
}));
|
|
22
|
+
|
|
23
|
+
jest.mock('@shell/utils/version', () => ({
|
|
24
|
+
isDevBuild: jest.fn(),
|
|
25
|
+
isPrerelease: jest.fn(),
|
|
26
|
+
}));
|
|
27
|
+
|
|
28
|
+
// 3. Cast the imported functions to Jest Mocks for type-safety
|
|
29
|
+
const mockGetVersionData = getVersionData as jest.Mock;
|
|
30
|
+
const mockGetKubeVersionData = getKubeVersionData as jest.Mock;
|
|
31
|
+
const mockIsRancherPrime = isRancherPrime as jest.Mock;
|
|
32
|
+
const mockIsDevBuild = isDevBuild as jest.Mock;
|
|
33
|
+
const mockIsPrerelease = isPrerelease as jest.Mock;
|
|
34
|
+
|
|
35
|
+
// --- End of Mocking Setup ---
|
|
36
|
+
|
|
37
|
+
describe('systemApiImpl', () => {
|
|
38
|
+
let mockStore: Store<any>;
|
|
39
|
+
let systemApi: SystemApiImpl;
|
|
40
|
+
let mockGetter: jest.Mock;
|
|
41
|
+
|
|
42
|
+
beforeEach(() => {
|
|
43
|
+
// Reset all mocks before each test
|
|
44
|
+
mockGetVersionData.mockClear();
|
|
45
|
+
mockGetKubeVersionData.mockClear();
|
|
46
|
+
mockIsRancherPrime.mockClear();
|
|
47
|
+
mockIsDevBuild.mockClear();
|
|
48
|
+
mockIsPrerelease.mockClear();
|
|
49
|
+
|
|
50
|
+
// Arrange: Mock the store
|
|
51
|
+
mockGetter = jest.fn() as any;
|
|
52
|
+
mockStore = {
|
|
53
|
+
getters: { 'management/byId': mockGetter },
|
|
54
|
+
$config: { dashboardVersion: 'v2.9-test' }
|
|
55
|
+
} as any;
|
|
56
|
+
|
|
57
|
+
// Arrange: Instantiate the class
|
|
58
|
+
systemApi = new SystemApiImpl(mockStore);
|
|
59
|
+
});
|
|
60
|
+
|
|
61
|
+
// --- Tests for Store-based Getters ---
|
|
62
|
+
|
|
63
|
+
it('should get uiVersion from store.$config', () => {
|
|
64
|
+
expect(systemApi.uiVersion).toBe('v2.9-test');
|
|
65
|
+
});
|
|
66
|
+
// --- Tests for Mocked Module Getters ---
|
|
67
|
+
|
|
68
|
+
it('should get rancherVersion and gitCommit from getVersionData', () => {
|
|
69
|
+
// Arrange: Define the return value for this test
|
|
70
|
+
mockGetVersionData.mockReturnValue({ Version: 'v2.8.0', GitCommit: 'abc1234' });
|
|
71
|
+
|
|
72
|
+
// Act & Assert
|
|
73
|
+
expect(systemApi.rancherVersion).toBe('v2.8.0');
|
|
74
|
+
expect(systemApi.gitCommit).toBe('abc1234');
|
|
75
|
+
expect(mockGetVersionData).toHaveBeenCalledTimes(2); // Called for both getters
|
|
76
|
+
});
|
|
77
|
+
|
|
78
|
+
it('should get kubernetesVersion and buildPlatform from getKubeVersionData', () => {
|
|
79
|
+
// Arrange
|
|
80
|
+
mockGetKubeVersionData.mockReturnValue({ gitVersion: 'v1.25.0', platform: 'linux/amd64' });
|
|
81
|
+
|
|
82
|
+
// Act & Assert
|
|
83
|
+
expect(systemApi.kubernetesVersion).toBe('v1.25.0');
|
|
84
|
+
});
|
|
85
|
+
|
|
86
|
+
it('should handle undefined kubeData gracefully', () => {
|
|
87
|
+
// Arrange: Simulate getKubeVersionData returning nothing
|
|
88
|
+
mockGetKubeVersionData.mockReturnValue(undefined);
|
|
89
|
+
|
|
90
|
+
// Act & Assert (The code's `|| {}` handles this)
|
|
91
|
+
expect(systemApi.kubernetesVersion).toBeUndefined();
|
|
92
|
+
});
|
|
93
|
+
|
|
94
|
+
it('should get isRancherPrime from isRancherPrime', () => {
|
|
95
|
+
// Arrange
|
|
96
|
+
mockIsRancherPrime.mockReturnValue(true);
|
|
97
|
+
|
|
98
|
+
// Act & Assert
|
|
99
|
+
expect(systemApi.isRancherPrime).toBe(true);
|
|
100
|
+
expect(mockIsRancherPrime).toHaveBeenCalledTimes(1);
|
|
101
|
+
});
|
|
102
|
+
|
|
103
|
+
it('should call isDevBuild with the correct rancherVersion', () => {
|
|
104
|
+
// Arrange
|
|
105
|
+
mockGetVersionData.mockReturnValue({ Version: 'v2.8.0-dev', GitCommit: '...' });
|
|
106
|
+
mockIsDevBuild.mockReturnValue(true); // The logic we are testing
|
|
107
|
+
|
|
108
|
+
// Act
|
|
109
|
+
const result = systemApi.isDevBuild;
|
|
110
|
+
|
|
111
|
+
// Assert
|
|
112
|
+
expect(result).toBe(true);
|
|
113
|
+
// This is the key check: verify it passed its OWN version to the util
|
|
114
|
+
expect(mockIsDevBuild).toHaveBeenCalledWith('v2.8.0-dev');
|
|
115
|
+
});
|
|
116
|
+
|
|
117
|
+
it('should call isPrereleaseVersion with the correct rancherVersion', () => {
|
|
118
|
+
// Arrange
|
|
119
|
+
mockGetVersionData.mockReturnValue({ Version: 'v2.8.0-rc1', GitCommit: '...' });
|
|
120
|
+
mockIsPrerelease.mockReturnValue(true);
|
|
121
|
+
|
|
122
|
+
// Act
|
|
123
|
+
const result = systemApi.isPrereleaseVersion;
|
|
124
|
+
|
|
125
|
+
// Assert
|
|
126
|
+
expect(result).toBe(true);
|
|
127
|
+
expect(mockIsPrerelease).toHaveBeenCalledWith('v2.8.0-rc1');
|
|
128
|
+
});
|
|
129
|
+
});
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { Store } from 'vuex';
|
|
2
|
+
import {
|
|
3
|
+
ModalApi, ShellApi, SlideInApi, NotificationApi, SystemApi
|
|
4
|
+
} from '@shell/apis/intf/shell';
|
|
5
|
+
import { ModalApiImpl } from './modal';
|
|
6
|
+
import { SlideInApiImpl } from './slide-in';
|
|
7
|
+
import { NotificationApiImpl } from './notifications';
|
|
8
|
+
import { SystemApiImpl } from './system';
|
|
9
|
+
|
|
10
|
+
export class ShellApiImpl implements ShellApi {
|
|
11
|
+
private modalApi: ModalApi;
|
|
12
|
+
private slideInApi: SlideInApi;
|
|
13
|
+
private notificationApi: NotificationApi;
|
|
14
|
+
private systemApi: SystemApi;
|
|
15
|
+
|
|
16
|
+
constructor(store: Store<any>) {
|
|
17
|
+
this.modalApi = new ModalApiImpl(store);
|
|
18
|
+
this.slideInApi = new SlideInApiImpl(store);
|
|
19
|
+
this.notificationApi = new NotificationApiImpl(store);
|
|
20
|
+
this.systemApi = new SystemApiImpl(store);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
get modal(): ModalApi {
|
|
24
|
+
return this.modalApi;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
get slideIn(): SlideInApi {
|
|
28
|
+
return this.slideInApi;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
get notification(): NotificationApi {
|
|
32
|
+
return this.notificationApi;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
get system(): SystemApi {
|
|
36
|
+
return this.systemApi;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { Component } from 'vue';
|
|
2
|
+
import { ModalApi, ModalConfig } from '@shell/apis/intf/shell';
|
|
3
|
+
import { Store } from 'vuex';
|
|
4
|
+
|
|
5
|
+
export class ModalApiImpl implements ModalApi {
|
|
6
|
+
private store: Store<any>;
|
|
7
|
+
|
|
8
|
+
constructor(store: Store<any>) {
|
|
9
|
+
this.store = store;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Opens a modal by committing to the Vuex store.
|
|
14
|
+
*
|
|
15
|
+
* Example:
|
|
16
|
+
* ```ts
|
|
17
|
+
* import MyCustomModal from '@/components/MyCustomModal.vue';
|
|
18
|
+
*
|
|
19
|
+
* this.$shell.modal.open(MyCustomModal, {
|
|
20
|
+
* props: { title: 'Hello Modal' }
|
|
21
|
+
* });
|
|
22
|
+
* ```
|
|
23
|
+
*
|
|
24
|
+
* @param component
|
|
25
|
+
* The Vue component to be displayed inside the modal.
|
|
26
|
+
* This can be any SFC (Single-File Component) imported and passed in as a `Component`.
|
|
27
|
+
*
|
|
28
|
+
* @param config Configuration object for opening a modal.
|
|
29
|
+
*
|
|
30
|
+
*/
|
|
31
|
+
public open(component: Component, config?: ModalConfig): void {
|
|
32
|
+
this.store.commit('modal/openModal', {
|
|
33
|
+
component,
|
|
34
|
+
componentProps: config?.props || {},
|
|
35
|
+
resources: config?.resources || [],
|
|
36
|
+
modalWidth: config?.width || '600px',
|
|
37
|
+
closeOnClickOutside: config?.closeOnClickOutside ?? true,
|
|
38
|
+
// modalSticky: config.modalSticky ?? false // Not implemented yet
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { Store } from 'vuex';
|
|
2
|
+
import { NotificationApi } from '@shell/apis/intf/shell';
|
|
3
|
+
import { NotificationLevel, NotificationConfig } from '@shell/types/notifications';
|
|
4
|
+
|
|
5
|
+
export class NotificationApiImpl implements NotificationApi {
|
|
6
|
+
private store: Store<any>;
|
|
7
|
+
|
|
8
|
+
constructor(store: Store<any>) {
|
|
9
|
+
this.store = store;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Sends a notification to the Rancher UI Notification Center
|
|
14
|
+
*
|
|
15
|
+
* Example:
|
|
16
|
+
* ```ts
|
|
17
|
+
* import { NotificationLevel } from '@shell/types/notifications';
|
|
18
|
+
*
|
|
19
|
+
* this.$shell.notification.send(NotificationLevel.Success, 'Some notification title', 'Hello world! Success!', {})
|
|
20
|
+
* ```
|
|
21
|
+
*
|
|
22
|
+
* For usage with the Composition API check usage guide [here](../../shell-api#using-composition-api-in-vue).
|
|
23
|
+
*
|
|
24
|
+
* @param level The `level` specifies the importance of the notification and determines the icon that is shown in the notification
|
|
25
|
+
* @param title The notification title
|
|
26
|
+
* @param message The notification message to be displayed
|
|
27
|
+
* @param config Notifications configuration object
|
|
28
|
+
*
|
|
29
|
+
* * @returns notification ID
|
|
30
|
+
*
|
|
31
|
+
*/
|
|
32
|
+
public async send(level: NotificationLevel, title: string, message?:string, config?: NotificationConfig): Promise<string> {
|
|
33
|
+
const notification = {
|
|
34
|
+
level,
|
|
35
|
+
title,
|
|
36
|
+
message,
|
|
37
|
+
...config
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
return await this.store.dispatch('notifications/add', notification, { root: true });
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* Update notification progress (Only valid for notifications of type `Task`)
|
|
45
|
+
*
|
|
46
|
+
* Example:
|
|
47
|
+
* ```ts
|
|
48
|
+
* this.$shell.notification.updateProgress('some-notification-id', 80)
|
|
49
|
+
* ```
|
|
50
|
+
*
|
|
51
|
+
* For usage with the Composition API check usage guide [here](../../shell-api#using-composition-api-in-vue).
|
|
52
|
+
*
|
|
53
|
+
* @param notificationId Unique ID for the notification
|
|
54
|
+
* @param progress Progress (0-100) for notifications of type `Task`
|
|
55
|
+
*
|
|
56
|
+
*/
|
|
57
|
+
public updateProgress(notificationId: string, progress: number): void {
|
|
58
|
+
const notification = {
|
|
59
|
+
id: notificationId,
|
|
60
|
+
progress
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
this.store.dispatch('notifications/update', notification, { root: true });
|
|
64
|
+
}
|
|
65
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { Component } from 'vue';
|
|
2
|
+
import { SlideInApi, SlideInConfig } from '@shell/apis/intf/shell';
|
|
3
|
+
import { Store } from 'vuex';
|
|
4
|
+
|
|
5
|
+
export class SlideInApiImpl implements SlideInApi {
|
|
6
|
+
private store: Store<any>;
|
|
7
|
+
|
|
8
|
+
constructor(store: Store<any>) {
|
|
9
|
+
this.store = store;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Opens a slide in panel in Rancher UI
|
|
14
|
+
*
|
|
15
|
+
* Example:
|
|
16
|
+
* ```ts
|
|
17
|
+
* import MyCustomSlideIn from '@/components/MyCustomSlideIn.vue';
|
|
18
|
+
*
|
|
19
|
+
* this.$shell.slideIn.open(MyCustomSlideIn, {
|
|
20
|
+
* title: 'Hello from SlideIn panel!'
|
|
21
|
+
* });
|
|
22
|
+
* ```
|
|
23
|
+
*
|
|
24
|
+
* @param component - A Vue component (imported SFC, functional component, etc.) to be rendered in the panel.
|
|
25
|
+
* @param config - Slide-In configuration object
|
|
26
|
+
*/
|
|
27
|
+
public open(component: Component, config?: SlideInConfig): void {
|
|
28
|
+
this.store.commit('slideInPanel/open', {
|
|
29
|
+
component,
|
|
30
|
+
componentProps: { ...config || {} }
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { SystemApi } from '@shell/apis/intf/shell';
|
|
2
|
+
import { Store } from 'vuex';
|
|
3
|
+
import { isDevBuild, isPrerelease } from '@shell/utils/version';
|
|
4
|
+
import { getVersionData, getKubeVersionData, isRancherPrime } from '@shell/config/version';
|
|
5
|
+
|
|
6
|
+
export class SystemApiImpl implements SystemApi {
|
|
7
|
+
private store: Store<any>;
|
|
8
|
+
|
|
9
|
+
constructor(store: Store<any>) {
|
|
10
|
+
this.store = store;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Rancher version
|
|
15
|
+
*/
|
|
16
|
+
get rancherVersion(): string {
|
|
17
|
+
return getVersionData().Version;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Rancher UI version
|
|
22
|
+
*/
|
|
23
|
+
get uiVersion(): string {
|
|
24
|
+
const storeTyped = this.store as any;
|
|
25
|
+
|
|
26
|
+
return storeTyped.$config.dashboardVersion;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* If Rancher system running is Prime
|
|
31
|
+
*/
|
|
32
|
+
get isRancherPrime(): boolean {
|
|
33
|
+
return isRancherPrime();
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Git Commit for Rancher system running
|
|
38
|
+
*/
|
|
39
|
+
get gitCommit(): string {
|
|
40
|
+
return getVersionData().GitCommit;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* Rancher Kubernetes version
|
|
45
|
+
*/
|
|
46
|
+
get kubernetesVersion(): string {
|
|
47
|
+
const kubeData = getKubeVersionData() as any || {};
|
|
48
|
+
|
|
49
|
+
return kubeData.gitVersion;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* If Rancher system is a Dev build
|
|
54
|
+
*/
|
|
55
|
+
get isDevBuild(): boolean {
|
|
56
|
+
return isDevBuild(this.rancherVersion);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* If Rancher system is a Pre-Release build/version
|
|
61
|
+
*/
|
|
62
|
+
get isPrereleaseVersion(): boolean {
|
|
63
|
+
return isPrerelease(this.rancherVersion);
|
|
64
|
+
}
|
|
65
|
+
}
|
|
@@ -1,64 +1 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="
|
|
2
|
-
<!-- Generator: Adobe Illustrator 28.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
|
3
|
-
<svg version="1.1" id="Layer_2_00000129197277348757038330000010842559623398722730_"
|
|
4
|
-
xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 439.6 36.2"
|
|
5
|
-
style="enable-background:new 0 0 439.6 36.2;" xml:space="preserve">
|
|
6
|
-
<style type="text/css">
|
|
7
|
-
.st0{fill:#FFFFFF;}
|
|
8
|
-
</style>
|
|
9
|
-
<g id="Layer_1-2">
|
|
10
|
-
<g id="Layer_1-3">
|
|
11
|
-
<path class="st0" d="M67.1,11.3c-0.4-0.5-1.2-0.5-1.6,0c-0.5,0.5-0.4,1.4,0.2,1.8c0.4,0.2,0.9,0.2,1.3,0
|
|
12
|
-
C67.5,12.7,67.6,11.8,67.1,11.3 M65.6,7.4c-3.1-0.7-5.8,2-5.1,5.1c0.4,1.6,1.6,2.8,3.2,3.2c3.1,0.7,5.9-2.1,5.1-5.1
|
|
13
|
-
C68.4,9,67.2,7.8,65.6,7.4 M45.3,24.7c-2-0.7-2.8-0.6-5.3-0.6c-1.8,0-1.8,0-3.9,0c-0.6,0-0.9,3,1.4,3.6c1,0.3,2.1,0.5,2.8,1.2
|
|
14
|
-
c0.3,0.3,0.5,0.9-0.2,0.9h-5.6c-1,0-1.9,0-2.7-0.6c-1.1-1-1.7-2.3-2.2-3.6c-0.6-1.4-1.2-2.7-2-4c-1.5-2.6-3.5-4.9-6.1-6.3
|
|
15
|
-
c-3.3-1.8-8.9-2.6-13.3,0.8c-4.7,3.6-3.7,10.3,0.4,13.6c1.6,1.3,3.7,1.8,5.8,1.7c4-0.2,7-3.2,6.3-6.9c-0.2-1.2-1-2.4-2-3
|
|
16
|
-
c-0.8-0.5-1.7-0.6-2.6-0.6c-0.9,0-2,0.2-2.6,0.9c-0.8,0.8-0.9,2.2-0.3,3.1c0.4,0.5,0.9,0.9,0.8,1.6c-0.1,0.5-0.4,0.8-0.9,0.9
|
|
17
|
-
c-0.8,0.2-1.4-0.3-2-0.8c-1.3-1.4-1.7-3.5-1-5.2c0.9-2.3,3.6-3.5,6-3.5c3.2,0.1,6.2,2.2,7.5,5.1s0.9,6.5-0.9,9.1
|
|
18
|
-
c-4,5.8-13.8,5.1-18.4,0.2C1.4,29.2-0.2,26.2,0,20.6c0.2-3.9,2.4-7.8,5.3-10.6c4.7-4.4,10.9-7.5,17.3-8.8c3.8-0.8,7.8-1,11.7-0.6
|
|
19
|
-
c3.4,0.3,6.9,1,10.2,2c1.6,0.5,3.2,1.1,4.8,1.8c1.4,0.6,3.2,1.3,4.2,2.4c0-2-0.1-4.2-0.1-5.7c0-0.6,0.6-1,1.1-0.7
|
|
20
|
-
c2.2,1,7.5,3.5,11.1,5.2c4.7,2.2,5.1,7.3,5.2,11.8c0,0.1,0,0.2,0,0.3c-0.2,0.3-0.9,0.2-1.2,0.2c-0.6,0-1.4,0-2,0
|
|
21
|
-
c-1.1,0-2.2,0-3.4,0c-2.1-0.1-4.1-1-5.5-2.2c-0.1-0.1-0.6-0.2-0.8,0s-0.1,0.6,0,0.7c0.8,0.8,1.6,1.3,2.6,1.8
|
|
22
|
-
c1.2,0.6,2.6,0.8,4,0.9c1.5,0.1,2.9,0.1,4.4-0.1c1.2-0.1,1.5-0.2,0.3,0.7c-1.1,0.8-2.3,1.4-3.6,1.8c-1.8,0.6-3.7,0.9-5.6,1
|
|
23
|
-
c-1.2,0-2.3,0-3.4-0.2c-0.6-0.1-1.2-0.2-1.8-0.2c-0.5,0-1-0.1-1.5,0c-0.4,0.1-0.8,0.3-1.1,0.7c-0.4,0.5-0.5,1.8-0.3,2.4
|
|
24
|
-
c0.4,1.1,1.3,1.8,2.3,2.4c1,0.6,2.4,0.8,2.7,2c0.1,0.2-2.2,0.3-2.4,0.2h-3c0,0-1.6,0-2.2-0.2c0,0,0,0-0.1,0
|
|
25
|
-
c-0.3-0.2-0.5-0.6-0.6-1c-0.2-0.5-0.5-1-0.8-1.5C47.3,26.2,46.3,25.1,45.3,24.7 M67.8,11.6c0,1.7-1.4,3.2-3.2,3.2
|
|
26
|
-
s-3.2-1.4-3.2-3.1s1.4-3.1,3.2-3.1C66.4,8.4,67.8,9.8,67.8,11.6"/>
|
|
27
|
-
</g>
|
|
28
|
-
<path class="st0" d="M80.4,25.5l3-3c2.2,2.2,4.2,3.1,6.5,3.1c3.2,0,5-1.6,5-4c0-6.4-14-2.8-14-12.5c0-5.2,3.9-8.5,9.8-8.5
|
|
29
|
-
c3.6,0,6.6,1.4,8.5,3.5l-3.1,3.1c-1.6-1.6-3.2-2.5-5.4-2.5c-3,0-4.9,1.5-4.9,3.9c0,6.1,14.1,2.1,14.1,12.2c0,5.4-4.1,8.8-10.2,8.8
|
|
30
|
-
C85.6,29.8,82.6,28.1,80.4,25.5z"/>
|
|
31
|
-
<path class="st0" d="M104.5,19.5V1.2h4.9v17.9c0,4.1,2.4,6.1,6,6.1s5.9-2,5.9-6.1V1.2h4.9v18.3c0,6.8-4.3,10.2-10.8,10.2
|
|
32
|
-
S104.5,26.4,104.5,19.5z"/>
|
|
33
|
-
<path class="st0" d="M130.7,25.5l3-3c2.2,2.2,4.2,3.1,6.5,3.1c3.2,0,5-1.6,5-4c0-6.4-14-2.8-14-12.5c0-5.2,3.9-8.5,9.8-8.5
|
|
34
|
-
c3.6,0,6.6,1.4,8.5,3.5l-3.1,3.1c-1.6-1.6-3.2-2.5-5.4-2.5c-3,0-4.9,1.5-4.9,3.9c0,6.1,14.1,2.1,14.1,12.2c0,5.4-4.1,8.8-10.2,8.8
|
|
35
|
-
C135.9,29.8,132.8,28.1,130.7,25.5L130.7,25.5z"/>
|
|
36
|
-
<path class="st0" d="M154.4,24.5V5.9c0-2.7,2-4.7,4.7-4.7h13.6v4.5h-12c-0.8,0-1.5,0.6-1.5,1.4V13h12.6v4.3h-12.6v6
|
|
37
|
-
c0,0.8,0.6,1.4,1.5,1.4h12v4.5h-13.6C156.4,29.2,154.4,27.2,154.4,24.5z"/>
|
|
38
|
-
<path class="st0" d="M187.5,1.2h9c5.6,0,9.4,2.9,9.4,8.4c0,4.7-2.5,7.3-6.5,8.1l7.4,11.5h-4l-7-11.2h-4.9v11.2h-3.4L187.5,1.2
|
|
39
|
-
L187.5,1.2z M196.4,15c3.6,0,6.1-1.7,6.1-5.4c0-3.5-2.4-5.5-6.1-5.5h-5.4V15C190.9,15,196.4,15,196.4,15z"/>
|
|
40
|
-
<path class="st0" d="M222.9,27.3c-1.1,1.5-3,2.3-5.7,2.3c-4.6,0-7.4-2.3-7.4-5.7s2.8-6,7.8-6c2.1,0,3.7,0.5,4.9,1.3v-2.5
|
|
41
|
-
c0-2.9-1.5-4.3-4.5-4.3c-2,0-4.4,0.8-6,2.3l-1.5-2.2c1.7-2,4.7-3,7.7-3c4.5,0,7.6,2.4,7.6,7.2v6.2c0,2.1,0,4.2,0.1,6.3h-2.9
|
|
42
|
-
C222.9,29.2,222.9,27.3,222.9,27.3z M217.8,27.2c2.9,0,4.7-1.3,4.7-3.3s-1.8-3.3-4.7-3.3s-4.8,1.3-4.8,3.3S215,27.2,217.8,27.2z"/>
|
|
43
|
-
<path class="st0" d="M232,10h3.1v3c1.6-2.6,4.3-3.4,6.4-3.4c4.3,0,7.3,2.8,7.3,8.3v11.3h-3.2V18.4c0-4.1-2.1-5.8-4.9-5.8
|
|
44
|
-
c-3,0-5.4,2-5.4,5.9v10.8H232L232,10L232,10z"/>
|
|
45
|
-
<path class="st0" d="M253.5,19.8v-0.5c0-5.8,4.2-9.8,9.9-9.8c2.8,0,5.2,1.1,6.8,3l-2,2c-1.2-1.3-2.8-2-4.8-2
|
|
46
|
-
c-3.8,0-6.7,2.7-6.7,6.8v0.5c0,4.1,2.8,6.8,6.7,6.8c1.9,0,3.5-0.6,4.8-1.9l2,2c-1.6,1.9-4.1,3-6.8,3
|
|
47
|
-
C257.7,29.6,253.5,25.6,253.5,19.8L253.5,19.8z"/>
|
|
48
|
-
<path class="st0" d="M274.9,0h3.1v13c1.6-2.6,4.3-3.4,6.4-3.4c4.3,0,7.3,2.8,7.3,8.3v11.3h-3.2V18.4c0-4.1-2.1-5.8-4.9-5.8
|
|
49
|
-
c-3,0-5.4,2-5.4,5.9v10.8h-3.2L274.9,0L274.9,0z"/>
|
|
50
|
-
<path class="st0" d="M296.4,19.7v-0.4c0-5.6,3.6-9.7,9-9.7s8.9,4.4,8.2,11h-13.9c0.4,3.6,2.8,6.1,6.6,6.1c2,0,3.6-0.5,4.7-1.5
|
|
51
|
-
l1.8,2c-1.5,1.6-3.9,2.5-6.7,2.5C300.3,29.6,296.4,25.6,296.4,19.7L296.4,19.7z M310.5,17.9c0-3.5-2.1-5.6-5-5.6
|
|
52
|
-
c-3.2,0-5.3,2.2-5.8,5.6H310.5L310.5,17.9z"/>
|
|
53
|
-
<path class="st0" d="M317.8,10h3.2V13c0.9-2.4,3-3.2,5.3-3.2h1.6v3.2H326c-3.1,0-5,1.5-5,4.7v11.4h-3.2L317.8,10L317.8,10z"/>
|
|
54
|
-
<path class="st0" d="M341.5,1.2h8.7c5.6,0,9.4,3.1,9.4,8.4s-3.8,8.4-9.4,8.4h-5.3v11.2h-3.4V1.2z M350.3,15.2
|
|
55
|
-
c3.5,0,5.8-2.2,5.8-5.5s-2.4-5.5-5.8-5.5h-5.4v11H350.3z"/>
|
|
56
|
-
<path class="st0" d="M363.5,10h3.2V13c0.9-2.4,3-3.2,5.3-3.2h1.6v3.2h-1.9c-3.1,0-5,1.5-5,4.7v11.4h-3.2L363.5,10L363.5,10z"/>
|
|
57
|
-
<path class="st0" d="M379,12.8h-3.7V10h6.9v19.2H379V12.8z M378.9,1.1h3.5v4.6h-3.5V1.1z"/>
|
|
58
|
-
<path class="st0" d="M388.6,10h3.1v3c1.5-2.6,4-3.4,6.1-3.4c2.8,0,5,1.2,6.1,3.8c1.6-2.9,4.5-3.8,6.6-3.8c4.2,0,7.1,2.7,7.1,8.2
|
|
59
|
-
v11.4h-3.2v-11c0-4-1.8-5.6-4.6-5.6s-5,2-5,5.6v11h-3.2v-11c0-4-1.8-5.6-4.6-5.6s-5,2-5,5.6v11h-3.2L388.6,10L388.6,10z"/>
|
|
60
|
-
<path class="st0" d="M422.3,19.7v-0.4c0-5.6,3.6-9.7,9-9.7s8.9,4.4,8.2,11h-13.9c0.4,3.6,2.8,6.1,6.6,6.1c2,0,3.6-0.5,4.7-1.5
|
|
61
|
-
l1.8,2c-1.5,1.6-3.9,2.5-6.7,2.5C426.2,29.6,422.3,25.6,422.3,19.7L422.3,19.7z M436.4,17.9c0-3.5-2.1-5.6-5-5.6
|
|
62
|
-
c-3.2,0-5.3,2.2-5.8,5.6H436.4L436.4,17.9z"/>
|
|
63
|
-
</g>
|
|
64
|
-
</svg>
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?><svg id="Layer_2" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 439.57 36.19"><defs><style>.cls-1{fill:#30ba78;}.cls-2{fill:#efefef;}</style></defs><g id="Layer_1-2"><g id="Layer_1-3"><path class="cls-1" d="M67.08,11.32c-.45-.46-1.18-.46-1.63,0-.5.5-.44,1.37.18,1.78.38.25.89.25,1.27,0,.62-.41.68-1.28.18-1.78M65.59,7.4c-3.08-.72-5.85,2.04-5.12,5.12.37,1.57,1.61,2.81,3.18,3.18,3.08.72,5.85-2.05,5.12-5.12-.37-1.57-1.61-2.81-3.18-3.18M45.26,24.73c-2.01-.74-2.78-.59-5.35-.56-1.78.02-1.84-.04-3.87-.04-.63,0-.86,3,1.41,3.63.99.27,2.07.45,2.81,1.21.33.34.52.85-.25.85h-5.63c-.99,0-1.92.02-2.67-.61-1.14-.96-1.67-2.28-2.24-3.6-.59-1.36-1.23-2.71-1.97-3.99-1.49-2.56-3.45-4.87-6.09-6.28-3.29-1.77-8.88-2.64-13.31.76-4.66,3.58-3.66,10.29.42,13.57,1.61,1.3,3.71,1.84,5.78,1.72,4.03-.24,7.01-3.21,6.27-6.87-.25-1.23-.96-2.38-2.04-3.02-.77-.45-1.67-.61-2.56-.61-.95,0-1.97.2-2.65.86-.81.78-.94,2.17-.29,3.1.36.51.94.94.84,1.61-.07.45-.44.79-.89.89-.76.17-1.45-.26-1.96-.79-1.31-1.35-1.72-3.5-1-5.24.94-2.28,3.57-3.53,6.03-3.45,3.18.11,6.17,2.2,7.47,5.1,1.3,2.9.91,6.46-.88,9.08-3.99,5.83-13.84,5.14-18.41.22C1.36,29.19-.2,26.19.02,20.62c.15-3.94,2.43-7.82,5.32-10.55C10.06,5.63,16.28,2.59,22.6,1.28c3.84-.79,7.81-.98,11.71-.59,3.44.34,6.86.97,10.16,2,1.64.51,3.25,1.12,4.81,1.83,1.38.63,3.18,1.32,4.25,2.41,0-1.98-.08-4.15-.08-5.66,0-.58.61-.97,1.13-.72,2.24,1.04,7.53,3.54,11.07,5.16,4.74,2.16,5.07,7.27,5.24,11.79,0,.1,0,.21-.04.29-.15.31-.95.23-1.24.23-.57,0-1.42,0-1.99.03-1.13.05-2.23.03-3.36-.03-2.09-.1-4.11-1.03-5.47-2.17-.13-.11-.57-.24-.78-.02-.21.22-.14.57-.02.68.78.78,1.62,1.29,2.6,1.8,1.24.64,2.6.8,3.97.88,1.47.09,2.95.07,4.42-.09,1.23-.12,1.54-.21.33.69-1.06.79-2.3,1.36-3.55,1.78-1.79.61-3.69.91-5.58.96-1.15.03-2.29-.03-3.43-.18-.59-.07-1.17-.18-1.76-.24-.48-.05-.98-.14-1.45-.04-.43.09-.83.33-1.11.68-.37.49-.5,1.83-.29,2.41.42,1.13,1.34,1.78,2.3,2.36,1.05.62,2.43.84,2.7,2.03.06.25-2.18.26-2.43.25h-2.97s-1.62.04-2.24-.19c-.02,0-.04-.02-.06-.02-.34-.18-.49-.64-.61-.99-.17-.49-.46-.98-.81-1.48-.67-.96-1.7-2-2.78-2.4M67.76,11.55c0,1.74-1.41,3.15-3.15,3.15s-3.15-1.41-3.15-3.15,1.41-3.15,3.15-3.15,3.15,1.41,3.15,3.15"/></g><path class="cls-2" d="M80.39,25.52l3.04-3.04c2.16,2.2,4.16,3.12,6.52,3.12,3.16,0,5.04-1.6,5.04-3.96,0-6.44-13.96-2.8-13.96-12.48,0-5.2,3.88-8.52,9.76-8.52,3.6,0,6.6,1.4,8.48,3.52l-3.12,3.12c-1.6-1.64-3.24-2.48-5.36-2.48-2.96,0-4.88,1.52-4.88,3.88,0,6.08,14.08,2.12,14.08,12.24,0,5.36-4.12,8.84-10.2,8.84-4.2,0-7.24-1.68-9.4-4.24Z"/><path class="cls-2" d="M104.47,19.52V1.2h4.92v17.92c0,4.08,2.36,6.08,5.96,6.08s5.92-2,5.92-6.08V1.2h4.92v18.32c0,6.84-4.32,10.24-10.84,10.24s-10.88-3.4-10.88-10.24Z"/><path class="cls-2" d="M130.67,25.52l3.04-3.04c2.16,2.2,4.16,3.12,6.52,3.12,3.16,0,5.04-1.6,5.04-3.96,0-6.44-13.96-2.8-13.96-12.48,0-5.2,3.88-8.52,9.76-8.52,3.6,0,6.6,1.4,8.48,3.52l-3.12,3.12c-1.6-1.64-3.24-2.48-5.36-2.48-2.96,0-4.88,1.52-4.88,3.88,0,6.08,14.08,2.12,14.08,12.24,0,5.36-4.12,8.84-10.2,8.84-4.2,0-7.24-1.68-9.4-4.24Z"/><path class="cls-2" d="M154.43,24.52V5.88c0-2.72,1.96-4.68,4.68-4.68h13.6v4.48h-11.96c-.84,0-1.48.64-1.48,1.44v5.88h12.6v4.28h-12.6v6c0,.8.64,1.44,1.48,1.44h11.96v4.48h-13.6c-2.72,0-4.68-1.96-4.68-4.68Z"/><path class="cls-2" d="M187.51,1.2h9c5.64,0,9.4,2.88,9.4,8.36,0,4.72-2.52,7.32-6.52,8.12l7.36,11.52h-3.96l-7-11.24h-4.88v11.24h-3.4V1.2ZM196.35,15.04c3.64,0,6.08-1.68,6.08-5.4,0-3.52-2.44-5.52-6.08-5.52h-5.44v10.92h5.44Z"/><path class="cls-2" d="M222.91,27.28c-1.08,1.52-2.96,2.32-5.68,2.32-4.56,0-7.4-2.28-7.4-5.68s2.8-5.96,7.76-5.96c2.08,0,3.72.48,4.92,1.32v-2.52c0-2.88-1.48-4.28-4.48-4.28-2,0-4.36.76-6.04,2.28l-1.52-2.2c1.72-1.96,4.72-3,7.68-3,4.48,0,7.56,2.4,7.56,7.16v6.16c0,2.12,0,4.2.12,6.32h-2.92v-1.92ZM217.83,27.16c2.88,0,4.68-1.28,4.68-3.32s-1.76-3.28-4.68-3.28-4.76,1.28-4.76,3.28,1.88,3.32,4.76,3.32Z"/><path class="cls-2" d="M231.99,9.96h3.12v3.04c1.56-2.64,4.32-3.44,6.36-3.44,4.32,0,7.28,2.8,7.28,8.32v11.32h-3.2v-10.84c0-4.12-2.08-5.84-4.88-5.84-2.96,0-5.44,2.04-5.44,5.88v10.8h-3.24V9.96Z"/><path class="cls-2" d="M253.51,19.8v-.48c0-5.76,4.2-9.76,9.88-9.76,2.76,0,5.2,1.08,6.76,2.96l-2,2c-1.2-1.28-2.8-1.96-4.76-1.96-3.84,0-6.68,2.68-6.68,6.76v.48c0,4.08,2.84,6.8,6.72,6.8,1.92,0,3.52-.6,4.84-1.92l1.96,1.96c-1.6,1.88-4.08,2.96-6.84,2.96-5.72,0-9.88-4.04-9.88-9.8Z"/><path class="cls-2" d="M274.87,0h3.12v13c1.56-2.64,4.32-3.44,6.36-3.44,4.32,0,7.28,2.8,7.28,8.32v11.32h-3.2v-10.84c0-4.12-2.08-5.84-4.88-5.84-2.96,0-5.44,2.04-5.44,5.88v10.8h-3.24V0Z"/><path class="cls-2" d="M296.39,19.68v-.4c0-5.56,3.6-9.72,9-9.72s8.92,4.36,8.16,11h-13.92c.36,3.56,2.8,6.08,6.56,6.08,2,0,3.56-.48,4.72-1.52l1.84,2c-1.48,1.6-3.92,2.48-6.72,2.48-5.72,0-9.64-4.04-9.64-9.92ZM310.47,17.92c-.04-3.52-2.08-5.56-5.04-5.56-3.24,0-5.32,2.2-5.76,5.56h10.8Z"/><path class="cls-2" d="M317.75,9.96h3.16v3.08c.92-2.44,2.96-3.16,5.32-3.16h1.64v3.2h-1.92c-3.12,0-4.96,1.52-4.96,4.72v11.4h-3.24V9.96Z"/><path class="cls-2" d="M341.47,1.2h8.68c5.6,0,9.36,3.12,9.36,8.44s-3.76,8.4-9.36,8.4h-5.28v11.16h-3.4V1.2ZM350.31,15.16c3.48,0,5.84-2.16,5.84-5.52s-2.36-5.48-5.84-5.48h-5.44v11h5.44Z"/><path class="cls-2" d="M363.47,9.96h3.16v3.08c.92-2.44,2.96-3.16,5.32-3.16h1.64v3.2h-1.92c-3.12,0-4.96,1.52-4.96,4.72v11.4h-3.24V9.96Z"/><path class="cls-2" d="M379.03,12.76h-3.72v-2.8h6.92v19.24h-3.2V12.76ZM378.91,1.08h3.52v4.64h-3.52V1.08Z"/><path class="cls-2" d="M388.59,9.96h3.12v3c1.48-2.56,3.96-3.4,6.08-3.4,2.8,0,4.96,1.24,6.08,3.76,1.6-2.88,4.48-3.76,6.6-3.76,4.2,0,7.08,2.68,7.08,8.2v11.44h-3.2v-11.04c0-3.96-1.84-5.64-4.64-5.64s-5,2-5,5.64v11.04h-3.24v-11.04c0-3.96-1.84-5.64-4.6-5.64s-5.04,2-5.04,5.64v11.04h-3.24V9.96Z"/><path class="cls-2" d="M422.31,19.68v-.4c0-5.56,3.6-9.72,9-9.72s8.92,4.36,8.16,11h-13.92c.36,3.56,2.8,6.08,6.56,6.08,2,0,3.56-.48,4.72-1.52l1.84,2c-1.48,1.6-3.92,2.48-6.72,2.48-5.72,0-9.64-4.04-9.64-9.92ZM436.39,17.92c-.04-3.52-2.08-5.56-5.04-5.56-3.24,0-5.32,2.2-5.76,5.56h10.8Z"/></g></svg>
|
|
@@ -162,7 +162,12 @@
|
|
|
162
162
|
}
|
|
163
163
|
|
|
164
164
|
//icon tooltip
|
|
165
|
-
.icon-info.
|
|
165
|
+
.icon-info.has-clean-tooltip {
|
|
166
166
|
font-size: 14px;
|
|
167
167
|
}
|
|
168
168
|
|
|
169
|
+
// making sure hovering on the tooltip's arrow part does not cause flickering
|
|
170
|
+
.v-popper__arrow-container {
|
|
171
|
+
pointer-events: none;
|
|
172
|
+
}
|
|
173
|
+
|
|
@@ -125,6 +125,7 @@ generic:
|
|
|
125
125
|
enable: Enable
|
|
126
126
|
disable: Disable
|
|
127
127
|
experimental: Experimental
|
|
128
|
+
primeOnly: Prime Only
|
|
128
129
|
|
|
129
130
|
deprecated: Deprecated
|
|
130
131
|
upgradeable: Upgradeable
|
|
@@ -1125,6 +1126,7 @@ catalog:
|
|
|
1125
1126
|
home: Homepage
|
|
1126
1127
|
repository: Repository Page
|
|
1127
1128
|
maintainers: Maintainers
|
|
1129
|
+
maintainerContactTooltip: Contact {maintainer}
|
|
1128
1130
|
related: Related
|
|
1129
1131
|
chartUrls: Chart
|
|
1130
1132
|
keywords: Keywords
|
|
@@ -1729,6 +1731,7 @@ cluster:
|
|
|
1729
1731
|
addVolume: Add Volume
|
|
1730
1732
|
addVMImage: Add VM Image
|
|
1731
1733
|
storageClass: Storage Class
|
|
1734
|
+
reservedMemory: Reserved Memory
|
|
1732
1735
|
sshUser: SSH User
|
|
1733
1736
|
userData:
|
|
1734
1737
|
label: User Data Template
|
|
@@ -1774,6 +1777,8 @@ cluster:
|
|
|
1774
1777
|
placeholder: e.g. 2
|
|
1775
1778
|
memory:
|
|
1776
1779
|
placeholder: e.g. 4
|
|
1780
|
+
reservedMemory:
|
|
1781
|
+
placeholder: e.g. 256
|
|
1777
1782
|
disk:
|
|
1778
1783
|
placeholder: e.g. 4
|
|
1779
1784
|
namespace:
|
|
@@ -1803,6 +1808,7 @@ cluster:
|
|
|
1803
1808
|
current: (current)
|
|
1804
1809
|
experimental: (experimental)
|
|
1805
1810
|
deprecated: (deprecated)
|
|
1811
|
+
manual: (manually upgraded)
|
|
1806
1812
|
deprecatedPatches: Show deprecated Kubernetes patch versions
|
|
1807
1813
|
deprecatedPatchWarning: We recommend using the latest patch version for each minor Kubernetes version. Deprecated patch versions can be useful for migration purposes.
|
|
1808
1814
|
legacyWarning: The legacy feature flag is enabled and not all legacy features are supported in Kubernetes 1.21+.
|
|
@@ -2343,6 +2349,7 @@ cluster:
|
|
|
2343
2349
|
placeholder: Search for a member to provide cluster access
|
|
2344
2350
|
searchPlaceholder: Start typing to search
|
|
2345
2351
|
noResults: No results found
|
|
2352
|
+
minCharacters: Type at least {count} characters to search
|
|
2346
2353
|
privateRegistry:
|
|
2347
2354
|
header: Registry for Rancher System Container Images
|
|
2348
2355
|
label: Enable cluster scoped container registry for Rancher system container images
|
|
@@ -4614,6 +4621,7 @@ moveModal:
|
|
|
4614
4621
|
description: 'You are moving the following namespaces:'
|
|
4615
4622
|
moveButtonLabel: Move
|
|
4616
4623
|
targetProject: Target Project
|
|
4624
|
+
noProject: None (remove from any project)
|
|
4617
4625
|
|
|
4618
4626
|
nameNsDescription:
|
|
4619
4627
|
name:
|
|
@@ -5248,6 +5256,7 @@ inactivity:
|
|
|
5248
5256
|
# Rancher Extensions
|
|
5249
5257
|
plugins:
|
|
5250
5258
|
altIcon: Icon for {extension} extension card
|
|
5259
|
+
incompatiblePrimeOnly: "The latest version of this extension ({ version }) needs Rancher Prime in order to be installed."
|
|
5251
5260
|
incompatibleRancherVersion: "The latest version of this extension ({ version }) is not compatible with the current Rancher version ({ required })."
|
|
5252
5261
|
incompatibleKubeVersion: "The latest version of this extension ({ version }) is not compatible with the current Kube version ({ required })."
|
|
5253
5262
|
incompatibleUiExtensionsApiVersionMissing: 'The latest version of this extension ({ version }) is missing the mandatory annotation catalog.cattle.io/ui-extensions-version from Rancher 2.10 and onwards.'
|
|
@@ -5257,6 +5266,8 @@ plugins:
|
|
|
5257
5266
|
closePluginPanel: Close plugin description panel
|
|
5258
5267
|
viewVersionDetails: View extension {name} version {version} details/Readme
|
|
5259
5268
|
labels:
|
|
5269
|
+
isDeveloper: Developer Load
|
|
5270
|
+
primeOnly: Prime only
|
|
5260
5271
|
builtin: Built-In
|
|
5261
5272
|
experimental: Experimental
|
|
5262
5273
|
third-party: Third-Party
|
|
@@ -5279,6 +5290,7 @@ plugins:
|
|
|
5279
5290
|
title: Error loading extension
|
|
5280
5291
|
message: Could not load extension code
|
|
5281
5292
|
generic: Extension error
|
|
5293
|
+
primeOnly: Unable to load Rancher Prime Extension in Rancher Community
|
|
5282
5294
|
apiAnnotationMissing: 'Unable to load Extension. The version installed is not compatible with the current Extensions API Version (Extension is missing the annotation catalog.cattle.io/ui-extensions-version which implies incompatibility with Rancher 2.10 and onwards)'
|
|
5283
5295
|
api: Unable to load Extension. The version installed is not compatible with the current Extensions API version
|
|
5284
5296
|
host: Unable to load Extension. The version installed is not compatible with this application host
|
|
@@ -5303,6 +5315,7 @@ plugins:
|
|
|
5303
5315
|
detail: Detail
|
|
5304
5316
|
versions: Versions
|
|
5305
5317
|
versionError: Could not load version information
|
|
5318
|
+
requiresRancherPrime: "Requires Rancher Prime"
|
|
5306
5319
|
requiresRancherVersion: "Requires Rancher {required}"
|
|
5307
5320
|
requiresKubeVersion: "Requires Kube version {required}"
|
|
5308
5321
|
requiresExtensionApiVersionMissing: 'Missing the annotation catalog.cattle.io/ui-extensions-version which implies incompatibility with Rancher 2.10 and onwards'
|
|
@@ -5322,7 +5335,7 @@ plugins:
|
|
|
5322
5335
|
warnNoAuth: This version of the extension will be loaded before authentication and will have access to the login process.
|
|
5323
5336
|
manageCatalog:
|
|
5324
5337
|
label: Manage Extension Catalogs
|
|
5325
|
-
title:
|
|
5338
|
+
title: Extensions
|
|
5326
5339
|
subtitle: Catalogs
|
|
5327
5340
|
imageLoad:
|
|
5328
5341
|
load: Import Extension Catalog
|
|
@@ -8,6 +8,8 @@ import { RcDropdownMenu } from '@components/RcDropdown';
|
|
|
8
8
|
import { ButtonRoleProps, ButtonSizeProps } from '@components/RcButton/types';
|
|
9
9
|
import { DropdownOption } from '@components/RcDropdown/types';
|
|
10
10
|
|
|
11
|
+
defineOptions({ inheritAttrs: false });
|
|
12
|
+
|
|
11
13
|
const store = useStore();
|
|
12
14
|
|
|
13
15
|
type RcDropdownMenuComponentProps = {
|
|
@@ -16,7 +18,7 @@ type RcDropdownMenuComponentProps = {
|
|
|
16
18
|
buttonAriaLabel?: string;
|
|
17
19
|
dropdownAriaLabel?: string;
|
|
18
20
|
dataTestid?: string;
|
|
19
|
-
resource
|
|
21
|
+
resource?: Object;
|
|
20
22
|
customActions?: DropdownOption[];
|
|
21
23
|
}
|
|
22
24
|
|
package/components/BackLink.vue
CHANGED
|
@@ -34,8 +34,16 @@ export default {
|
|
|
34
34
|
display: flex;
|
|
35
35
|
font-size: 16px;
|
|
36
36
|
margin: 10px 0 20px 0;
|
|
37
|
+
padding: 0 4px 2px 0;
|
|
37
38
|
outline: 0;
|
|
38
39
|
width: fit-content;
|
|
40
|
+
border-bottom: 2px solid transparent;
|
|
41
|
+
|
|
42
|
+
&:hover {
|
|
43
|
+
text-decoration: none;
|
|
44
|
+
border-bottom: 2px solid;
|
|
45
|
+
border-bottom-color: inherit;
|
|
46
|
+
}
|
|
39
47
|
|
|
40
48
|
&:focus-visible {
|
|
41
49
|
@include focus-outline;
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
<script>
|
|
2
2
|
import Closeable from '@shell/mixins/closeable';
|
|
3
3
|
import BrandImage from '@shell/components/BrandImage';
|
|
4
|
-
import { MANAGEMENT } from '@shell/config/types';
|
|
5
|
-
import { SETTING } from '@shell/config/settings';
|
|
6
4
|
import { getBrandMeta } from '@shell/utils/brand';
|
|
7
5
|
|
|
8
6
|
export default {
|
|
@@ -21,9 +19,7 @@ export default {
|
|
|
21
19
|
},
|
|
22
20
|
|
|
23
21
|
data() {
|
|
24
|
-
const
|
|
25
|
-
const setting = globalSettings?.find((gs) => gs.id === SETTING.BRAND);
|
|
26
|
-
const brandMeta = getBrandMeta(setting?.value);
|
|
22
|
+
const brandMeta = getBrandMeta(this.$store.getters['management/brand']);
|
|
27
23
|
const banner = brandMeta?.banner || {};
|
|
28
24
|
const align = banner.textAlign || 'center';
|
|
29
25
|
const bannerClass = banner.bannerClass || '';
|