@rancher/shell 3.0.4 → 3.0.5-rc.2
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/assets/images/providers/sks.svg +1 -0
- package/assets/styles/base/_basic.scss +6 -0
- package/assets/styles/base/_helpers.scss +4 -0
- package/assets/styles/base/_variables.scss +1 -0
- package/assets/styles/global/_button.scss +1 -0
- package/assets/translations/en-us.yaml +65 -15
- package/assets/translations/zh-hans.yaml +4 -3
- package/chart/monitoring/index.vue +3 -1
- package/cloud-credential/aws.vue +2 -0
- package/components/ActionDropdownShell.vue +71 -0
- package/components/AppModal.vue +18 -4
- package/components/AsyncButton.vue +24 -7
- package/components/BannerGraphic.vue +1 -0
- package/components/CommunityLinks.vue +4 -59
- package/components/CopyToClipboardText.vue +2 -1
- package/components/CruResource.vue +6 -1
- package/components/DetailText.vue +5 -0
- package/components/ExplorerMembers.vue +1 -1
- package/components/ExplorerProjectsNamespaces.vue +68 -18
- package/components/GlobalRoleBindings.vue +5 -1
- package/components/GrowlManager.vue +1 -0
- package/components/LandingPagePreference.vue +7 -3
- package/components/LocaleSelector.vue +39 -95
- package/components/ModalManager.vue +55 -0
- package/components/ModalWithCard.vue +1 -0
- package/components/PromptModal.vue +47 -8
- package/components/PromptRemove.vue +1 -0
- package/components/PromptRestore.vue +1 -0
- package/components/ResourceCancelModal.vue +1 -0
- package/components/ResourceDetail/Masthead.vue +38 -12
- package/components/ResourceDetail/__tests__/Masthead.test.ts +5 -1
- package/components/ResourceDetail/index.vue +47 -12
- package/components/ResourceTable.vue +54 -19
- package/components/SideNav.vue +5 -1
- package/components/SlideInPanelManager.vue +126 -0
- package/components/SortableTable/THead.vue +5 -2
- package/components/SortableTable/actions.js +1 -1
- package/components/SortableTable/index.vue +64 -51
- package/components/SortableTable/paging.js +16 -19
- package/components/SortableTable/selection.js +0 -11
- package/components/Wizard.vue +2 -2
- package/components/__tests__/AsyncButton.test.ts +2 -2
- package/components/__tests__/ModalManager.spec.ts +176 -0
- package/components/__tests__/PromptModal.test.ts +148 -0
- package/components/__tests__/SlideInPanelManager.spec.ts +166 -0
- package/components/auth/AuthBanner.vue +13 -11
- package/components/auth/Principal.vue +1 -0
- package/components/auth/__tests__/RoleDetailEdit.test.ts +3 -2
- package/components/auth/login/ldap.vue +1 -1
- package/components/fleet/FleetResources.vue +21 -6
- package/components/form/ArrayList.vue +76 -60
- package/components/form/BannerSettings.vue +17 -2
- package/components/form/ColorInput.vue +35 -6
- package/components/form/Command.vue +6 -15
- package/components/form/EnvVars.vue +16 -8
- package/components/form/HealthCheck.vue +3 -3
- package/components/form/HookOption.vue +11 -16
- package/components/form/LabeledSelect.vue +18 -22
- package/components/form/LifecycleHooks.vue +3 -3
- package/components/form/MatchExpressions.vue +14 -8
- package/components/form/NameNsDescription.vue +128 -104
- package/components/form/Networking.vue +20 -12
- package/components/form/NodeAffinity.vue +31 -23
- package/components/form/NodeScheduling.vue +13 -3
- package/components/form/NotificationSettings.vue +15 -1
- package/components/form/Password.vue +1 -0
- package/components/form/PodAffinity.vue +43 -43
- package/components/form/Probe.vue +68 -66
- package/components/form/ResourceQuota/Project.vue +5 -1
- package/components/form/ResourceSelector.vue +7 -9
- package/components/form/SSHKnownHosts/__tests__/KnownHostsEditDialog.test.ts +16 -24
- package/components/form/SSHKnownHosts/index.vue +30 -13
- package/components/form/Security.vue +54 -56
- package/components/form/Select.vue +32 -21
- package/components/form/ShellInput.vue +5 -1
- package/components/form/Tolerations.vue +5 -1
- package/components/form/ValueFromResource.vue +134 -121
- package/components/form/WorkloadPorts.vue +18 -18
- package/components/form/__tests__/ArrayList.test.ts +5 -2
- package/components/form/__tests__/ColorInput.test.ts +35 -0
- package/components/form/__tests__/LabeledSelect.test.ts +40 -0
- package/components/form/__tests__/MatchExpressions.test.ts +12 -12
- package/components/form/__tests__/NameNsDescription.test.ts +115 -14
- package/components/form/__tests__/Probe.test.ts +12 -8
- package/components/form/__tests__/SSHKnownHosts.test.ts +22 -2
- package/components/form/__tests__/Select.test.ts +37 -0
- package/components/formatter/InternalExternalIP.vue +2 -0
- package/components/formatter/SecretData.vue +20 -7
- package/components/nav/Group.vue +27 -5
- package/components/nav/Header.vue +17 -43
- package/components/nav/NamespaceFilter.vue +134 -86
- package/components/nav/TopLevelMenu.vue +4 -5
- package/components/nav/Type.vue +12 -1
- package/components/nav/WindowManager/ContainerLogs.vue +87 -61
- package/components/nav/WindowManager/ContainerLogsActions.vue +76 -0
- package/components/templates/blank.vue +4 -1
- package/components/templates/default.vue +8 -3
- package/components/templates/home.vue +10 -1
- package/components/templates/plain.vue +10 -4
- package/composables/focusTrap.ts +12 -4
- package/composables/useRuntimeFlag.ts +29 -0
- package/config/router/routes.js +20 -13
- package/config/store.js +4 -0
- package/config/uiplugins.js +5 -1
- package/core/types.ts +12 -6
- package/detail/catalog.cattle.io.app.vue +6 -1
- package/detail/fleet.cattle.io.bundle.vue +70 -6
- package/detail/fleet.cattle.io.gitrepo.vue +1 -1
- package/detail/namespace.vue +0 -3
- package/detail/node.vue +17 -13
- package/detail/provisioning.cattle.io.cluster.vue +72 -6
- package/dialog/AddCustomBadgeDialog.vue +1 -1
- package/{pages/c/_cluster/uiplugins/AddExtensionRepos.vue → dialog/AddExtensionReposDialog.vue} +72 -42
- package/{components/AssignTo.vue → dialog/AssignToDialog.vue} +71 -80
- package/dialog/ChangePasswordDialog.vue +106 -0
- package/dialog/DeactivateDriverDialog.vue +1 -0
- package/{pages/c/_cluster/uiplugins/DeveloperInstallDialog.vue → dialog/DeveloperLoadExtensionDialog.vue} +74 -71
- package/dialog/DisableAuthProviderDialog.vue +101 -0
- package/dialog/DrainNode.vue +1 -1
- package/{pages/c/_cluster/uiplugins/CatalogList/CatalogLoadDialog.vue → dialog/ExtensionCatalogInstallDialog.vue} +100 -88
- package/{pages/c/_cluster/uiplugins/CatalogList/CatalogUninstallDialog.vue → dialog/ExtensionCatalogUninstallDialog.vue} +69 -57
- package/dialog/FeatureFlagListDialog.vue +288 -0
- package/dialog/ForceMachineRemoveDialog.vue +5 -2
- package/{components/Import.vue → dialog/ImportDialog.vue} +0 -5
- package/{pages/c/_cluster/uiplugins/InstallDialog.vue → dialog/InstallExtensionDialog.vue} +124 -106
- package/{components/form/SSHKnownHosts → dialog}/KnownHostsEditDialog.vue +52 -59
- package/dialog/MoveNamespaceDialog.vue +157 -0
- package/dialog/ScalePoolDownDialog.vue +1 -1
- package/{components/nav/Jump.vue → dialog/SearchDialog.vue} +34 -14
- package/{pages/c/_cluster/uiplugins/UninstallDialog.vue → dialog/UninstallExtensionDialog.vue} +67 -58
- package/dialog/WechatDialog.vue +57 -0
- package/edit/__tests__/monitoring.coreos.com.prometheusrule.test.ts +16 -3
- package/edit/auth/__tests__/oidc.test.ts +152 -109
- package/edit/auth/azuread.vue +2 -1
- package/edit/auth/github.vue +1 -1
- package/edit/auth/googleoauth.vue +5 -1
- package/edit/auth/ldap/index.vue +1 -1
- package/edit/auth/oidc.vue +38 -5
- package/edit/auth/saml.vue +1 -1
- package/edit/cloudcredential.vue +24 -9
- package/edit/logging.banzaicloud.io.output/__tests__/logging.banzaicloud.io.output.test.ts +40 -9
- package/edit/management.cattle.io.user.vue +28 -3
- package/edit/namespace.vue +1 -4
- package/edit/networking.k8s.io.ingress/IngressClass.vue +7 -3
- package/edit/networking.k8s.io.ingress/__tests__/IngressClass.test.ts +58 -0
- package/edit/persistentvolume/__tests__/persistentvolume.test.ts +14 -2
- package/edit/provisioning.cattle.io.cluster/CustomCommand.vue +4 -1
- package/edit/provisioning.cattle.io.cluster/SelectCredential.vue +26 -9
- package/edit/provisioning.cattle.io.cluster/__tests__/Advanced.test.ts +8 -8
- package/edit/provisioning.cattle.io.cluster/__tests__/DirectoryConfig.test.ts +26 -12
- package/edit/provisioning.cattle.io.cluster/__tests__/rke2.test.ts +66 -0
- package/edit/provisioning.cattle.io.cluster/__tests__/utils/rke2-test-data.ts +58 -0
- package/edit/provisioning.cattle.io.cluster/rke2.vue +49 -41
- package/edit/provisioning.cattle.io.cluster/tabs/AgentConfiguration.vue +6 -1
- package/edit/provisioning.cattle.io.cluster/tabs/DirectoryConfig.vue +5 -3
- package/edit/provisioning.cattle.io.cluster/tabs/MachinePool.vue +33 -2
- package/edit/provisioning.cattle.io.cluster/tabs/etcd/index.vue +2 -2
- package/edit/token.vue +2 -0
- package/edit/workload/index.vue +1 -0
- package/edit/workload/mixins/workload.js +0 -2
- package/initialize/install-plugins.js +2 -1
- package/list/harvesterhci.io.management.cluster.vue +4 -1
- package/list/management.cattle.io.feature.vue +4 -287
- package/list/provisioning.cattle.io.cluster.vue +20 -12
- package/machine-config/azure.vue +16 -4
- package/mixins/vue-select-overrides.js +0 -4
- package/models/__tests__/namespace.test.ts +25 -1
- package/models/cloudcredential.js +5 -0
- package/models/fleet.cattle.io.cluster.js +8 -2
- package/models/fleet.cattle.io.gitrepo.js +8 -34
- package/models/kontainerdriver.js +6 -3
- package/models/management.cattle.io.feature.js +7 -1
- package/models/management.cattle.io.node.js +3 -3
- package/models/namespace.js +11 -6
- package/models/nodedriver.js +6 -3
- package/models/workload.js +4 -1
- package/package.json +3 -3
- package/pages/about.vue +13 -3
- package/pages/account/index.vue +16 -6
- package/pages/auth/login.vue +18 -7
- package/pages/auth/logout.vue +4 -1
- package/pages/auth/setup.vue +2 -0
- package/pages/auth/verify.vue +13 -8
- package/pages/c/_cluster/apps/charts/chart.vue +1 -1
- package/pages/c/_cluster/apps/charts/install.vue +26 -26
- package/pages/c/_cluster/auth/config/index.vue +10 -12
- package/pages/c/_cluster/explorer/EventsTable.vue +38 -33
- package/pages/c/_cluster/explorer/index.vue +17 -15
- package/pages/c/_cluster/istio/index.vue +2 -2
- package/pages/c/_cluster/longhorn/index.vue +1 -1
- package/pages/c/_cluster/monitoring/index.vue +1 -1
- package/pages/c/_cluster/monitoring/monitor/_namespace/_id.vue +4 -2
- package/pages/c/_cluster/monitoring/monitor/create.vue +4 -2
- package/pages/c/_cluster/monitoring/route-receiver/_id.vue +4 -2
- package/pages/c/_cluster/monitoring/route-receiver/create.vue +5 -2
- package/pages/c/_cluster/neuvector/index.vue +1 -1
- package/pages/c/_cluster/settings/banners.vue +4 -3
- package/pages/c/_cluster/uiplugins/CatalogList/index.vue +8 -10
- package/pages/c/_cluster/uiplugins/__tests__/AddExtensionRepos.test.ts +4 -7
- package/pages/c/_cluster/uiplugins/index.vue +98 -55
- package/pages/diagnostic.vue +59 -11
- package/pages/fail-whale.vue +14 -8
- package/pages/home.vue +24 -18
- package/pages/prefs.vue +7 -6
- package/pages/support/index.vue +4 -1
- package/plugins/internal-api/index.ts +37 -0
- package/plugins/internal-api/shared/base-api.ts +13 -0
- package/plugins/internal-api/shell/shell.api.ts +108 -0
- package/plugins/steve/actions.js +0 -12
- package/public/index.html +1 -0
- package/rancher-components/Card/Card.vue +1 -1
- package/rancher-components/Form/Checkbox/Checkbox.test.ts +59 -1
- package/rancher-components/Form/Checkbox/Checkbox.vue +27 -3
- package/rancher-components/Form/LabeledInput/LabeledInput.test.ts +47 -0
- package/rancher-components/Form/LabeledInput/LabeledInput.vue +20 -2
- package/rancher-components/Form/Radio/RadioButton.test.ts +36 -1
- package/rancher-components/Form/Radio/RadioButton.vue +20 -4
- package/rancher-components/Form/Radio/RadioGroup.test.ts +60 -0
- package/rancher-components/Form/Radio/RadioGroup.vue +52 -10
- package/rancher-components/Form/ToggleSwitch/ToggleSwitch.test.ts +17 -0
- package/rancher-components/Form/ToggleSwitch/ToggleSwitch.vue +5 -0
- package/rancher-components/LabeledTooltip/LabeledTooltip.vue +10 -1
- package/rancher-components/RcButton/RcButton.vue +2 -1
- package/rancher-components/RcButton/types.ts +1 -0
- package/rancher-components/RcDropdown/RcDropdown.vue +18 -6
- package/rancher-components/RcDropdown/RcDropdownItem.vue +3 -56
- package/rancher-components/RcDropdown/RcDropdownItemCheckbox.vue +68 -0
- package/rancher-components/RcDropdown/RcDropdownItemSelect.vue +92 -0
- package/rancher-components/RcDropdown/RcDropdownTrigger.vue +10 -0
- package/rancher-components/RcDropdown/index.ts +2 -0
- package/rancher-components/RcDropdown/useDropdownCollection.ts +8 -0
- package/rancher-components/RcDropdown/useDropdownContext.ts +9 -3
- package/rancher-components/RcDropdown/useDropdownItem.ts +63 -0
- package/scripts/extension/bundle +20 -0
- package/scripts/extension/helm/charts/ui-plugin-server/templates/cr.yaml +2 -1
- package/scripts/extension/helm/charts/ui-plugin-server/values.yaml +2 -0
- package/scripts/extension/helmpatch +44 -31
- package/scripts/extension/publish +12 -12
- package/scripts/typegen.sh +2 -4
- package/server/har-file.js +25 -3
- package/store/action-menu.js +26 -56
- package/store/features.js +2 -1
- package/store/index.js +5 -0
- package/store/modal.ts +71 -0
- package/store/slideInPanel.ts +47 -0
- package/store/type-map.js +12 -1
- package/store/type-map.utils.ts +4 -4
- package/types/global-vue.d.ts +5 -0
- package/types/internal-api/shell/growl.d.ts +25 -0
- package/types/internal-api/shell/modal.d.ts +77 -0
- package/types/internal-api/shell/slideIn.d.ts +15 -0
- package/types/resources/fleet.d.ts +0 -14
- package/types/shell/index.d.ts +43 -24
- package/types/vue-shim.d.ts +4 -1
- package/utils/__mocks__/tabbable.js +13 -0
- package/utils/__tests__/object.test.ts +38 -4
- package/utils/cluster.js +35 -0
- package/utils/fleet.ts +15 -73
- package/utils/object.js +48 -5
- package/utils/validators/formRules/__tests__/index.test.ts +10 -1
- package/utils/validators/formRules/index.ts +27 -3
- package/utils/validators/machine-pool.ts +20 -0
- package/components/DisableAuthProviderModal.vue +0 -114
- package/components/MoveModal.vue +0 -166
- package/components/PromptChangePassword.vue +0 -123
- package/components/fleet/FleetBundleResources.vue +0 -86
- package/components/formatter/ExtensionCache.vue +0 -74
- package/components/formatter/Port.vue +0 -24
- package/components/formatter/SecretType.vue +0 -41
- package/types/vue-shim.d +0 -20
|
@@ -11,6 +11,7 @@ import merge from 'lodash/merge';
|
|
|
11
11
|
import { CATALOG } from '@shell/config/types';
|
|
12
12
|
import { sortBy } from '@shell/utils/sort';
|
|
13
13
|
import { allHash } from '@shell/utils/promise';
|
|
14
|
+
import { mergeWithReplace } from '@shell/utils/object';
|
|
14
15
|
|
|
15
16
|
export default {
|
|
16
17
|
name: 'DetailRelease',
|
|
@@ -52,7 +53,11 @@ export default {
|
|
|
52
53
|
},
|
|
53
54
|
|
|
54
55
|
valuesYaml() {
|
|
55
|
-
const combined =
|
|
56
|
+
const combined = mergeWithReplace(
|
|
57
|
+
merge({}, this.value?.chartValues || {}),
|
|
58
|
+
this.value?.values || {},
|
|
59
|
+
{ replaceObjectProps: true }
|
|
60
|
+
);
|
|
56
61
|
|
|
57
62
|
return jsyaml.dump(combined);
|
|
58
63
|
},
|
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
<script>
|
|
2
|
-
import { MANAGEMENT } from '@shell/config/types';
|
|
3
|
-
import
|
|
2
|
+
import { FLEET, MANAGEMENT } from '@shell/config/types';
|
|
3
|
+
import FleetResources from '@shell/components/fleet/FleetResources';
|
|
4
4
|
import FleetUtils from '@shell/utils/fleet';
|
|
5
|
+
import { checkSchemasForFindAllHash } from '@shell/utils/auth';
|
|
6
|
+
import Loading from '@shell/components/Loading.vue';
|
|
7
|
+
import { FLEET as FLEET_ANNOTATIONS } from '@shell/config/labels-annotations';
|
|
5
8
|
|
|
6
9
|
export default {
|
|
7
10
|
name: 'FleetBundleDetail',
|
|
8
11
|
|
|
9
|
-
components: {
|
|
12
|
+
components: { Loading, FleetResources },
|
|
10
13
|
props: {
|
|
11
14
|
value: {
|
|
12
15
|
type: Object,
|
|
@@ -14,15 +17,74 @@ export default {
|
|
|
14
17
|
}
|
|
15
18
|
},
|
|
16
19
|
|
|
20
|
+
data() {
|
|
21
|
+
return { allBundleDeployments: [] };
|
|
22
|
+
},
|
|
23
|
+
|
|
17
24
|
async fetch() {
|
|
25
|
+
const allDispatches = await checkSchemasForFindAllHash({
|
|
26
|
+
allBundleDeployments: {
|
|
27
|
+
inStoreType: 'management',
|
|
28
|
+
type: FLEET.BUNDLE_DEPLOYMENT,
|
|
29
|
+
},
|
|
30
|
+
|
|
31
|
+
// must be loaded for bundle.targetClusters to work
|
|
32
|
+
allFleetClusters: {
|
|
33
|
+
inStoreType: 'management',
|
|
34
|
+
type: FLEET.CLUSTER
|
|
35
|
+
},
|
|
36
|
+
clusterGroups: {
|
|
37
|
+
inStoreType: 'management',
|
|
38
|
+
type: FLEET.CLUSTER_GROUP
|
|
39
|
+
}
|
|
40
|
+
}, this.$store);
|
|
41
|
+
|
|
18
42
|
if (this.value.authorId && this.$store.getters['management/schemaFor'](MANAGEMENT.USER)) {
|
|
19
43
|
await this.$store.dispatch(`management/findAll`, { type: MANAGEMENT.USER }, { root: true });
|
|
20
44
|
}
|
|
45
|
+
|
|
46
|
+
this.allBundleDeployments = allDispatches.allBundleDeployments || [];
|
|
21
47
|
},
|
|
22
48
|
|
|
23
49
|
computed: {
|
|
24
50
|
bundleResources() {
|
|
25
|
-
|
|
51
|
+
if (!this.allBundleDeployments) {
|
|
52
|
+
return [];
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
const bundleDeploymentsByClusterId = this.allBundleDeployments
|
|
56
|
+
.reduce((res, bd) => {
|
|
57
|
+
if (this.value.id === FleetUtils.bundleIdFromBundleDeploymentLabels(bd.metadata?.labels)) {
|
|
58
|
+
res[FleetUtils.clusterIdFromBundleDeploymentLabels(bd.metadata?.labels)] = bd;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
return res;
|
|
62
|
+
}, {});
|
|
63
|
+
|
|
64
|
+
return this.value.targetClusters.reduce((res, cluster) => {
|
|
65
|
+
const bd = bundleDeploymentsByClusterId[cluster.id];
|
|
66
|
+
|
|
67
|
+
if (bd) {
|
|
68
|
+
FleetUtils.resourcesFromBundleDeploymentStatus(bd.status)
|
|
69
|
+
.forEach((r) => {
|
|
70
|
+
const type = FleetUtils.resourceType(r);
|
|
71
|
+
const key = `${ cluster.id }-${ type }-${ r.namespace }-${ r.name }`;
|
|
72
|
+
|
|
73
|
+
res.push({
|
|
74
|
+
...r,
|
|
75
|
+
key,
|
|
76
|
+
type,
|
|
77
|
+
id: FleetUtils.resourceId(r),
|
|
78
|
+
clusterId: cluster.id,
|
|
79
|
+
clusterName: cluster.nameDisplay,
|
|
80
|
+
|
|
81
|
+
detailLocation: FleetUtils.detailLocation(r, cluster.metadata.labels[FLEET_ANNOTATIONS.CLUSTER_NAME]),
|
|
82
|
+
});
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
return res;
|
|
87
|
+
}, []);
|
|
26
88
|
},
|
|
27
89
|
resourceCount() {
|
|
28
90
|
return this.bundleResources.length;
|
|
@@ -38,8 +100,10 @@ export default {
|
|
|
38
100
|
<h2>{{ t('fleet.bundles.resources') }}</h2>
|
|
39
101
|
<span>{{ resourceCount }}</span>
|
|
40
102
|
</div>
|
|
41
|
-
<
|
|
42
|
-
|
|
103
|
+
<Loading v-if="$fetchState.pending" />
|
|
104
|
+
<FleetResources
|
|
105
|
+
v-else
|
|
106
|
+
:rows="bundleResources"
|
|
43
107
|
/>
|
|
44
108
|
</div>
|
|
45
109
|
</template>
|
package/detail/namespace.vue
CHANGED
|
@@ -5,7 +5,6 @@ import ResourceTabs from '@shell/components/form/ResourceTabs';
|
|
|
5
5
|
import { COUNT, WORKLOAD_TYPES } from '@shell/config/types';
|
|
6
6
|
import { WORKLOAD_SCHEMA } from '@shell/config/schema';
|
|
7
7
|
import { getStatesByType } from '@shell/plugins/dashboard-store/resource-class';
|
|
8
|
-
import MoveModal from '@shell/components/MoveModal';
|
|
9
8
|
import Tab from '@shell/components/Tabbed/Tab';
|
|
10
9
|
import ResourceTable from '@shell/components/ResourceTable';
|
|
11
10
|
import SortableTable from '@shell/components/SortableTable';
|
|
@@ -20,7 +19,6 @@ export default {
|
|
|
20
19
|
ResourceTable,
|
|
21
20
|
ResourceTabs,
|
|
22
21
|
Loading,
|
|
23
|
-
MoveModal,
|
|
24
22
|
Tab,
|
|
25
23
|
SortableTable
|
|
26
24
|
},
|
|
@@ -264,6 +262,5 @@ export default {
|
|
|
264
262
|
/>
|
|
265
263
|
</Tab>
|
|
266
264
|
</ResourceTabs>
|
|
267
|
-
<MoveModal />
|
|
268
265
|
</div>
|
|
269
266
|
</template>
|
package/detail/node.vue
CHANGED
|
@@ -49,23 +49,25 @@ export default {
|
|
|
49
49
|
},
|
|
50
50
|
|
|
51
51
|
async fetch() {
|
|
52
|
-
|
|
52
|
+
if (this.podSchema) {
|
|
53
|
+
this.filterByApi = this.$store.getters[`cluster/paginationEnabled`](POD);
|
|
53
54
|
|
|
54
|
-
|
|
55
|
+
if (this.filterByApi) {
|
|
55
56
|
// Only get pods associated with this node. The actual values used are from a get all in node model `pods` getter (this works as it just gets all...)
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
57
|
+
const opt = { // Of type ActionFindPageArgs
|
|
58
|
+
pagination: new FilterArgs({
|
|
59
|
+
sort: [{ field: 'metadata.name', asc: true }],
|
|
60
|
+
filters: PaginationParamFilter.createSingleField({
|
|
61
|
+
field: 'spec.nodeName',
|
|
62
|
+
value: this.value.id,
|
|
63
|
+
})
|
|
62
64
|
})
|
|
63
|
-
}
|
|
64
|
-
};
|
|
65
|
+
};
|
|
65
66
|
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
67
|
+
this.$store.dispatch(`cluster/findPage`, { type: POD, opt });
|
|
68
|
+
} else {
|
|
69
|
+
this.$store.dispatch('cluster/findAll', { type: POD });
|
|
70
|
+
}
|
|
69
71
|
}
|
|
70
72
|
|
|
71
73
|
this.showMetrics = await allDashboardsExist(this.$store, this.currentCluster.id, [NODE_METRICS_DETAIL_URL, NODE_METRICS_SUMMARY_URL]);
|
|
@@ -97,6 +99,7 @@ export default {
|
|
|
97
99
|
VALUE,
|
|
98
100
|
EFFECT
|
|
99
101
|
],
|
|
102
|
+
podSchema,
|
|
100
103
|
podTableHeaders: this.$store.getters['type-map/headersFor'](podSchema),
|
|
101
104
|
NODE_METRICS_DETAIL_URL,
|
|
102
105
|
NODE_METRICS_SUMMARY_URL,
|
|
@@ -241,6 +244,7 @@ export default {
|
|
|
241
244
|
@update:value="$emit('input', $event)"
|
|
242
245
|
>
|
|
243
246
|
<Tab
|
|
247
|
+
v-if="podSchema"
|
|
244
248
|
name="pods"
|
|
245
249
|
:label="t('node.detail.tab.pods')"
|
|
246
250
|
:weight="4"
|
|
@@ -215,6 +215,41 @@ export default {
|
|
|
215
215
|
},
|
|
216
216
|
|
|
217
217
|
data() {
|
|
218
|
+
const noneGroupOption = {
|
|
219
|
+
tooltipKey: 'resourceTable.groupBy.none',
|
|
220
|
+
icon: 'icon-list-flat',
|
|
221
|
+
value: 'none',
|
|
222
|
+
};
|
|
223
|
+
const poolColumn = {
|
|
224
|
+
name: 'pool',
|
|
225
|
+
labelKey: 'cluster.machinePool.name.label',
|
|
226
|
+
value: 'spec.nodePoolName',
|
|
227
|
+
getValue: (row) => row.spec.nodePoolName,
|
|
228
|
+
sort: ['spec.nodePoolName'],
|
|
229
|
+
};
|
|
230
|
+
const poolGroupOption = {
|
|
231
|
+
tooltipKey: 'resourceTable.groupBy.pool',
|
|
232
|
+
icon: 'icon-cluster',
|
|
233
|
+
hideColumn: poolColumn.name,
|
|
234
|
+
value: 'spec.nodePoolName',
|
|
235
|
+
field: 'spec.nodePoolName'
|
|
236
|
+
};
|
|
237
|
+
|
|
238
|
+
const machineColumn = {
|
|
239
|
+
name: 'pool',
|
|
240
|
+
labelKey: 'cluster.machinePool.name.label',
|
|
241
|
+
value: 'pool.nameDisplay',
|
|
242
|
+
getValue: (row) => row.pool.nameDisplay,
|
|
243
|
+
sort: ['pool.nameDisplay'],
|
|
244
|
+
};
|
|
245
|
+
const machineGroupOption = {
|
|
246
|
+
tooltipKey: 'resourceTable.groupBy.pool',
|
|
247
|
+
icon: 'icon-cluster',
|
|
248
|
+
hideColumn: machineColumn.name,
|
|
249
|
+
value: 'poolId',
|
|
250
|
+
field: 'poolId'
|
|
251
|
+
};
|
|
252
|
+
|
|
218
253
|
return {
|
|
219
254
|
|
|
220
255
|
allMachines: [],
|
|
@@ -250,7 +285,25 @@ export default {
|
|
|
250
285
|
conditions: true, // in ResourceTabs
|
|
251
286
|
},
|
|
252
287
|
|
|
253
|
-
showWindowsWarning: false
|
|
288
|
+
showWindowsWarning: false,
|
|
289
|
+
|
|
290
|
+
machineColumn,
|
|
291
|
+
poolColumn,
|
|
292
|
+
|
|
293
|
+
noneGroupOption,
|
|
294
|
+
|
|
295
|
+
machineGroupOption,
|
|
296
|
+
machineGroupOptions: [
|
|
297
|
+
noneGroupOption,
|
|
298
|
+
machineGroupOption
|
|
299
|
+
],
|
|
300
|
+
|
|
301
|
+
poolGroupOption,
|
|
302
|
+
poolGroupOptions: [
|
|
303
|
+
noneGroupOption,
|
|
304
|
+
poolGroupOption,
|
|
305
|
+
]
|
|
306
|
+
|
|
254
307
|
};
|
|
255
308
|
},
|
|
256
309
|
|
|
@@ -416,7 +469,7 @@ export default {
|
|
|
416
469
|
},
|
|
417
470
|
|
|
418
471
|
machineHeaders() {
|
|
419
|
-
|
|
472
|
+
const headers = [
|
|
420
473
|
STATE,
|
|
421
474
|
NAME_COL,
|
|
422
475
|
{
|
|
@@ -433,10 +486,16 @@ export default {
|
|
|
433
486
|
ROLES,
|
|
434
487
|
AGE,
|
|
435
488
|
];
|
|
489
|
+
|
|
490
|
+
if (!this.value.isCustom) {
|
|
491
|
+
headers.splice(3, 0, this.machineColumn);
|
|
492
|
+
}
|
|
493
|
+
|
|
494
|
+
return headers;
|
|
436
495
|
},
|
|
437
496
|
|
|
438
497
|
mgmtNodeSchemaHeaders() {
|
|
439
|
-
|
|
498
|
+
const headers = [
|
|
440
499
|
STATE, NAME_COL,
|
|
441
500
|
{
|
|
442
501
|
name: 'node-name',
|
|
@@ -452,6 +511,12 @@ export default {
|
|
|
452
511
|
ROLES,
|
|
453
512
|
AGE
|
|
454
513
|
];
|
|
514
|
+
|
|
515
|
+
if (!this.value.isCustom) {
|
|
516
|
+
headers.splice(3, 0, this.poolColumn);
|
|
517
|
+
}
|
|
518
|
+
|
|
519
|
+
return headers;
|
|
455
520
|
},
|
|
456
521
|
|
|
457
522
|
rke1Snapshots() {
|
|
@@ -772,11 +837,11 @@ export default {
|
|
|
772
837
|
:schema="machineSchema"
|
|
773
838
|
:headers="machineHeaders"
|
|
774
839
|
default-sort-by="name"
|
|
775
|
-
:group-by="value.isCustom ? null : 'poolId'"
|
|
776
840
|
group-ref="pool"
|
|
841
|
+
:group-default="machineGroupOption.value"
|
|
777
842
|
:group-sort="['pool.nameDisplay']"
|
|
843
|
+
:group-options="value.isCustom ? [noneGroupOption] : machineGroupOptions"
|
|
778
844
|
:sort-generation-fn="machineSortGenerationFn"
|
|
779
|
-
:hide-grouping-controls="true"
|
|
780
845
|
>
|
|
781
846
|
<template #main-row:isFake="{fullColspan}">
|
|
782
847
|
<tr class="main-row">
|
|
@@ -859,9 +924,10 @@ export default {
|
|
|
859
924
|
:schema="mgmtNodeSchema"
|
|
860
925
|
:headers="mgmtNodeSchemaHeaders"
|
|
861
926
|
:rows="nodes"
|
|
862
|
-
:group-by="value.isCustom ? null : 'spec.nodePoolName'"
|
|
863
927
|
group-ref="pool"
|
|
928
|
+
:group-default="poolGroupOption.value"
|
|
864
929
|
:group-sort="['pool.nameDisplay']"
|
|
930
|
+
:group-options="value.isCustom ? [noneGroupOption] : poolGroupOptions"
|
|
865
931
|
:sort-generation-fn="nodeSortGenerationFn"
|
|
866
932
|
:hide-grouping-controls="true"
|
|
867
933
|
>
|
|
@@ -213,7 +213,6 @@ export default {
|
|
|
213
213
|
<Card
|
|
214
214
|
class="prompt-badge"
|
|
215
215
|
:show-highlight-border="false"
|
|
216
|
-
:trigger-focus-trap="true"
|
|
217
216
|
>
|
|
218
217
|
<template #title>
|
|
219
218
|
<h4 class="text-default-text">
|
|
@@ -296,6 +295,7 @@ export default {
|
|
|
296
295
|
v-model:value="badgeBgColor"
|
|
297
296
|
:disabled="!badgeColorPicker"
|
|
298
297
|
:default-value="badgeBgColor"
|
|
298
|
+
:aria-label="t('clusterBadge.modal.badgeBgColorInput')"
|
|
299
299
|
/>
|
|
300
300
|
</div>
|
|
301
301
|
</div>
|
package/{pages/c/_cluster/uiplugins/AddExtensionRepos.vue → dialog/AddExtensionReposDialog.vue}
RENAMED
|
@@ -1,22 +1,32 @@
|
|
|
1
1
|
<script>
|
|
2
|
-
import
|
|
3
|
-
import Dialog from '@shell/components/Dialog.vue';
|
|
2
|
+
import AsyncButton from '@shell/components/AsyncButton';
|
|
4
3
|
import Checkbox from '@components/Form/Checkbox/Checkbox.vue';
|
|
4
|
+
import { CATALOG } from '@shell/config/types';
|
|
5
5
|
import { UI_PLUGINS_REPOS } from '@shell/config/uiplugins';
|
|
6
6
|
import { isRancherPrime } from '@shell/config/version';
|
|
7
7
|
|
|
8
8
|
export default {
|
|
9
|
-
emits: ['
|
|
9
|
+
emits: ['close'],
|
|
10
|
+
|
|
11
|
+
components: { AsyncButton, Checkbox },
|
|
10
12
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
13
|
+
props: {
|
|
14
|
+
/**
|
|
15
|
+
* Callback to update install status on extensions main screen
|
|
16
|
+
*/
|
|
17
|
+
done: {
|
|
18
|
+
type: Function,
|
|
19
|
+
default: () => {}
|
|
20
|
+
},
|
|
14
21
|
},
|
|
15
22
|
|
|
16
23
|
async fetch() {
|
|
17
24
|
if (this.$store.getters['management/schemaFor'](CATALOG.CLUSTER_REPO)) {
|
|
18
25
|
this.repos = await this.$store.dispatch('management/findAll', { type: CATALOG.CLUSTER_REPO, opt: { force: true } });
|
|
19
26
|
}
|
|
27
|
+
|
|
28
|
+
this.addRepos.official = isRancherPrime() && !this.hasRancherUIPluginsRepo;
|
|
29
|
+
this.addRepos.partners = !this.hasRancherUIPartnersPluginsRepo;
|
|
20
30
|
},
|
|
21
31
|
|
|
22
32
|
data() {
|
|
@@ -25,8 +35,8 @@ export default {
|
|
|
25
35
|
repos: [],
|
|
26
36
|
prime: isRancherPrime(),
|
|
27
37
|
addRepos: {
|
|
28
|
-
official:
|
|
29
|
-
partners:
|
|
38
|
+
official: false,
|
|
39
|
+
partners: false
|
|
30
40
|
},
|
|
31
41
|
reposInfo: {
|
|
32
42
|
official: {
|
|
@@ -57,14 +67,6 @@ export default {
|
|
|
57
67
|
},
|
|
58
68
|
|
|
59
69
|
methods: {
|
|
60
|
-
showDialog() {
|
|
61
|
-
this.addRepos = {
|
|
62
|
-
official: isRancherPrime() && !this.hasRancherUIPluginsRepo,
|
|
63
|
-
partners: !this.hasRancherUIPartnersPluginsRepo,
|
|
64
|
-
};
|
|
65
|
-
this.isDialogActive = true;
|
|
66
|
-
},
|
|
67
|
-
|
|
68
70
|
async doAddRepos(btnCb) {
|
|
69
71
|
this.errors = [];
|
|
70
72
|
const promises = [];
|
|
@@ -96,24 +98,20 @@ export default {
|
|
|
96
98
|
});
|
|
97
99
|
}
|
|
98
100
|
|
|
99
|
-
this
|
|
101
|
+
this.done();
|
|
102
|
+
this.$emit('close');
|
|
100
103
|
|
|
101
104
|
btnCb(true);
|
|
102
105
|
},
|
|
103
106
|
}
|
|
104
107
|
};
|
|
105
108
|
</script>
|
|
109
|
+
|
|
106
110
|
<template>
|
|
107
|
-
<
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
mode="add"
|
|
112
|
-
data-testid="add-extensions-repos-modal"
|
|
113
|
-
:return-focus-selector="returnFocusSelector"
|
|
114
|
-
@okay="doAddRepos"
|
|
115
|
-
@closed="isDialogActive = false"
|
|
116
|
-
>
|
|
111
|
+
<div class="modal-dialog">
|
|
112
|
+
<h4>
|
|
113
|
+
{{ t('plugins.addRepos.title') }}
|
|
114
|
+
</h4>
|
|
117
115
|
<p class="mb-20">
|
|
118
116
|
{{ t('plugins.addRepos.prompt', {}, true) }}
|
|
119
117
|
</p>
|
|
@@ -124,7 +122,7 @@ export default {
|
|
|
124
122
|
>
|
|
125
123
|
<Checkbox
|
|
126
124
|
v-model:value="addRepos.official"
|
|
127
|
-
:disabled="hasRancherUIPluginsRepo"
|
|
125
|
+
:disabled="$fetchState.pending || hasRancherUIPluginsRepo"
|
|
128
126
|
:primary="true"
|
|
129
127
|
label-key="plugins.setup.install.addRancherRepo"
|
|
130
128
|
data-testid="add-extensions-repos-modal-add-official-repo"
|
|
@@ -142,7 +140,7 @@ export default {
|
|
|
142
140
|
>
|
|
143
141
|
<Checkbox
|
|
144
142
|
v-model:value="addRepos.partners"
|
|
145
|
-
:disabled="hasRancherUIPartnersPluginsRepo"
|
|
143
|
+
:disabled="$fetchState.pending || hasRancherUIPartnersPluginsRepo"
|
|
146
144
|
:primary="true"
|
|
147
145
|
label-key="plugins.setup.install.addPartnersRancherRepo"
|
|
148
146
|
data-testid="add-extensions-repos-modal-add-partners-repo"
|
|
@@ -154,22 +152,54 @@ export default {
|
|
|
154
152
|
({{ t('plugins.setup.installed') }})
|
|
155
153
|
</div>
|
|
156
154
|
</div>
|
|
157
|
-
|
|
155
|
+
<div class="dialog-buttons mt-20">
|
|
156
|
+
<button
|
|
157
|
+
class="btn role-secondary"
|
|
158
|
+
@click="$emit('close')"
|
|
159
|
+
>
|
|
160
|
+
{{ t('generic.cancel') }}
|
|
161
|
+
</button>
|
|
162
|
+
<AsyncButton
|
|
163
|
+
mode="add"
|
|
164
|
+
class="ml-10"
|
|
165
|
+
@click="doAddRepos"
|
|
166
|
+
/>
|
|
167
|
+
</div>
|
|
168
|
+
</div>
|
|
158
169
|
</template>
|
|
170
|
+
|
|
159
171
|
<style lang="scss" scoped>
|
|
160
|
-
.
|
|
161
|
-
|
|
162
|
-
margin-top: 20px;
|
|
163
|
-
}
|
|
172
|
+
.modal-dialog {
|
|
173
|
+
padding: 10px;
|
|
164
174
|
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
175
|
+
h4 {
|
|
176
|
+
font-weight: bold;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
.enable-plugin-support {
|
|
180
|
+
font-size: 14px;
|
|
181
|
+
margin-top: 20px;
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
.plugin-setup-error {
|
|
185
|
+
font-size: 14px;
|
|
186
|
+
color: var(--error);
|
|
187
|
+
margin: 10px 0 0 0;
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
.checkbox-info {
|
|
191
|
+
margin-left: 20px;
|
|
192
|
+
opacity: 0.7;
|
|
193
|
+
}
|
|
170
194
|
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
195
|
+
.dialog-buttons {
|
|
196
|
+
display: flex;
|
|
197
|
+
justify-content: flex-end;
|
|
198
|
+
margin-top: 10px;
|
|
199
|
+
|
|
200
|
+
> *:not(:last-child) {
|
|
201
|
+
margin-right: 10px;
|
|
202
|
+
}
|
|
203
|
+
}
|
|
174
204
|
}
|
|
175
205
|
</style>
|