@rancher/shell 0.1.3 → 0.1.21
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/brand/suse/dark/rancher-logo.svg +1 -148
- package/assets/brand/suse/favicon.png +0 -0
- package/assets/brand/suse/rancher-logo.svg +1 -130
- package/assets/images/featured/img1.jpg +0 -0
- package/assets/images/featured.jpg +0 -0
- package/assets/images/generic-plugin.svg +1 -0
- package/assets/styles/themes/_dark.scss +3 -0
- package/assets/styles/themes/_light.scss +3 -0
- package/assets/styles/themes/_suse.scss +1 -1
- package/assets/translations/en-us.yaml +219 -47
- package/assets/translations/zh-hans.yaml +21 -24
- package/components/AsyncButton.vue +17 -2
- package/components/ButtonDropdown.vue +4 -0
- package/components/Carousel.vue +291 -0
- package/components/CommunityLinks.vue +64 -22
- package/components/CruResource.vue +11 -3
- package/components/Dialog.vue +102 -0
- package/components/ExplorerMembers.vue +2 -4
- package/components/ExplorerProjectsNamespaces.vue +25 -9
- package/components/IconMessage.vue +9 -1
- package/components/LazyImage.vue +21 -8
- package/components/LocaleSelector.vue +62 -29
- package/components/PromptRemove.vue +2 -2
- package/components/ResourceList/Masthead.vue +21 -1
- package/components/ResourceList/ResourceLoadingIndicator.vue +0 -8
- package/components/ResourceList/index.vue +9 -23
- package/components/ResourceTable.vue +7 -2
- package/components/SimpleBox.vue +6 -4
- package/components/SortableTable/index.vue +18 -25
- package/components/Tabbed/Tab.vue +5 -0
- package/components/Tabbed/index.vue +54 -9
- package/components/TypeDescription.vue +10 -1
- package/components/auth/Principal.vue +1 -0
- package/components/fleet/FleetBundles.vue +8 -3
- package/components/fleet/FleetClusters.vue +6 -0
- package/components/fleet/FleetRepos.vue +7 -1
- package/components/fleet/FleetSummary.vue +6 -0
- package/components/form/Command.vue +5 -0
- package/components/form/EnvVars.vue +5 -0
- package/components/form/KeyValue.vue +80 -58
- package/components/form/NameNsDescription.vue +13 -5
- package/components/form/NodeScheduling.vue +6 -1
- package/components/form/PodAffinity.vue +5 -0
- package/components/form/ResourceTabs/index.vue +5 -1
- package/components/form/ServiceNameSelect.vue +5 -0
- package/components/form/ValueFromResource.vue +7 -1
- package/components/formatter/ClusterLink.vue +3 -7
- package/components/nav/NamespaceFilter.vue +3 -3
- package/components/nav/TopLevelMenu.vue +12 -29
- package/config/home-links.js +155 -0
- package/config/labels-annotations.js +2 -1
- package/config/private-label.js +1 -1
- package/config/product/explorer.js +5 -4
- package/config/product/legacy.js +0 -47
- package/config/product/manager.js +0 -2
- package/config/product/multi-cluster-apps.js +0 -12
- package/config/product/settings.js +12 -1
- package/config/product/uiplugins.js +17 -0
- package/config/settings.js +23 -2
- package/config/types.js +5 -1
- package/config/uiplugins.js +117 -0
- package/config/version.js +17 -0
- package/content/docs/en-us/getting-started.md +1 -26
- package/core/plugin.ts +12 -0
- package/core/plugins.js +38 -2
- package/core/types.ts +6 -0
- package/creators/app/{.eslintignore → files/.eslintignore} +0 -0
- package/creators/app/{.eslintrc.js → files/.eslintrc.js} +0 -0
- package/creators/app/{.vscode → files/.vscode}/settings.json +0 -0
- package/creators/app/{babel.config.js → files/babel.config.js} +0 -0
- package/creators/app/{nuxt.config.js → files/nuxt.config.js} +0 -0
- package/creators/app/{tsconfig.json → files/tsconfig.json} +2 -1
- package/creators/app/init +16 -17
- package/creators/app/package.json +6 -0
- package/creators/pkg/{babel.config.js → files/babel.config.js} +0 -0
- package/creators/pkg/{index.ts → files/index.ts} +0 -0
- package/creators/pkg/{tsconfig.json → files/tsconfig.json} +13 -12
- package/creators/pkg/{vue.config.js → files/vue.config.js} +0 -0
- package/creators/pkg/init +1 -1
- package/creators/update/init +54 -0
- package/creators/update/package.json +20 -0
- package/creators/update/upgrade +56 -0
- package/creators/update/yarn-error.log +54 -0
- package/detail/provisioning.cattle.io.cluster.vue +3 -3
- package/detail/workload/index.vue +3 -2
- package/dialog/DiagnosticTimingsDialog.vue +116 -0
- package/dialog/RotateCertificatesDialog.vue +9 -3
- package/edit/auth/azuread.vue +28 -9
- package/edit/networking.k8s.io.ingress/index.vue +2 -2
- package/edit/persistentvolume/index.vue +51 -13
- package/edit/persistentvolumeclaim.vue +31 -13
- package/edit/pod.vue +27 -0
- package/edit/provisioning.cattle.io.cluster/rke2.vue +103 -24
- package/edit/service.vue +7 -5
- package/edit/workload/__tests__/Upgrading.test.ts +1 -0
- package/edit/workload/index.vue +32 -10
- package/edit/workload/mixins/workload.js +121 -126
- package/edit/workload/storage/ContainerMountPaths.vue +240 -0
- package/edit/workload/storage/Mount.vue +1 -0
- package/edit/workload/storage/awsElasticBlockStore.vue +20 -1
- package/edit/workload/storage/azureDisk.vue +22 -2
- package/edit/workload/storage/azureFile.vue +20 -2
- package/edit/workload/storage/csi/index.vue +23 -1
- package/edit/workload/storage/gcePersistentDisk.vue +20 -2
- package/edit/workload/storage/index.vue +33 -65
- package/edit/workload/storage/persistentVolumeClaim/index.vue +5 -0
- package/edit/workload/storage/secret.vue +6 -1
- package/edit/workload/storage/vsphereVolume.vue +11 -1
- package/layouts/default.vue +14 -8
- package/layouts/home.vue +9 -4
- package/layouts/plain.vue +10 -5
- package/list/catalog.cattle.io.app.vue +10 -9
- package/list/catalog.cattle.io.clusterrepo.vue +6 -61
- package/list/cis.cattle.io.clusterscan.vue +12 -12
- package/list/fleet.cattle.io.bundle.vue +33 -28
- package/list/fleet.cattle.io.cluster.vue +26 -22
- package/list/fleet.cattle.io.clustergroup.vue +6 -0
- package/list/fleet.cattle.io.clusterregistrationtoken.vue +28 -24
- package/list/fleet.cattle.io.gitrepo.vue +25 -14
- package/list/helm.cattle.io.projecthelmchart.vue +52 -33
- package/list/logging.banzaicloud.io.clusterflow.vue +7 -12
- package/list/logging.banzaicloud.io.flow.vue +7 -14
- package/list/management.cattle.io.cluster.vue +26 -15
- package/list/management.cattle.io.feature.vue +13 -8
- package/list/management.cattle.io.setting.vue +3 -3
- package/list/management.cattle.io.user.vue +38 -19
- package/list/monitoring.coreos.com.alertmanagerconfig.vue +8 -15
- package/list/namespace.vue +14 -1
- package/list/node.vue +13 -16
- package/list/persistentvolume.vue +16 -9
- package/list/persistentvolumeclaim.vue +5 -8
- package/list/provisioning.cattle.io.cluster.vue +35 -9
- package/list/service.vue +24 -12
- package/list/ui.cattle.io.navlink.vue +6 -0
- package/list/workload.vue +2 -2
- package/machine-config/harvester.vue +5 -3
- package/middleware/authenticated.js +6 -0
- package/mixins/resource-fetch.js +12 -18
- package/mixins/resource-manager.js +126 -0
- package/models/catalog.cattle.io.uiplugin.js +38 -0
- package/models/cluster/node.js +25 -2
- package/models/fleet.cattle.io.bundle.js +1 -1
- package/models/harvesterhci.io.management.cluster.js +11 -5
- package/models/pod.js +15 -5
- package/models/provisioning.cattle.io.cluster.js +16 -6
- package/models/workload.js +5 -3
- package/models/workload.service.js +10 -0
- package/nuxt.config.js +70 -25
- package/package.json +108 -109
- package/pages/auth/login.vue +11 -1
- package/pages/auth/verify.vue +9 -0
- package/pages/c/_cluster/apps/charts/index.vue +46 -1
- package/pages/c/_cluster/apps/charts/install.vue +10 -9
- package/pages/c/_cluster/explorer/index.vue +72 -9
- package/pages/c/_cluster/explorer/tools/index.vue +12 -5
- package/pages/c/_cluster/mcapps/index.vue +1 -1
- package/pages/c/_cluster/settings/DefaultLinksEditor.vue +108 -0
- package/pages/c/_cluster/settings/brand.vue +0 -40
- package/pages/c/_cluster/settings/links.vue +152 -0
- package/pages/c/_cluster/settings/performance.vue +90 -7
- package/pages/c/_cluster/uiplugins/DeveloperInstallDialog.vue +232 -0
- package/pages/c/_cluster/uiplugins/InstallDialog.vue +293 -0
- package/pages/c/_cluster/uiplugins/PluginInfoPanel.vue +300 -0
- package/pages/c/_cluster/uiplugins/RemoveUIPlugins.vue +125 -0
- package/pages/c/_cluster/uiplugins/SetupUIPlugins.vue +261 -0
- package/pages/c/_cluster/uiplugins/UninstallDialog.vue +122 -0
- package/pages/c/_cluster/uiplugins/index.vue +808 -0
- package/pages/diagnostic.vue +185 -101
- package/pages/docs/_doc.vue +3 -1
- package/pages/home.vue +21 -56
- package/pages/prefs.vue +108 -88
- package/pages/safeMode.vue +17 -0
- package/pages/support/index.vue +34 -137
- package/pkg/dynamic-importer.lib.js +4 -0
- package/plugins/dashboard-store/actions.js +19 -0
- package/plugins/dashboard-store/getters.js +20 -3
- package/plugins/dashboard-store/mutations.js +13 -7
- package/plugins/dashboard-store/resource-class.js +2 -2
- package/plugins/formatters.js +15 -0
- package/plugins/plugin.js +61 -6
- package/plugins/steve/getters.js +12 -0
- package/plugins/steve/mutations.js +1 -1
- package/plugins/steve/subscribe.js +94 -72
- package/plugins/steve/web-worker.steve-sub-worker.js +24 -15
- package/plugins/version.js +21 -0
- package/promptRemove/management.cattle.io.globalrole.vue +47 -0
- package/promptRemove/management.cattle.io.roletemplate.vue +47 -0
- package/promptRemove/mixin/roleDeletionCheck.js +97 -0
- package/rancher-components/Form/TextArea/TextAreaAutoGrow.vue +6 -7
- package/rancher-components/components/BadgeState/BadgeState.spec.ts +12 -0
- package/rancher-components/components/BadgeState/BadgeState.vue +107 -0
- package/rancher-components/components/BadgeState/index.ts +1 -0
- package/rancher-components/components/Banner/Banner.test.ts +13 -0
- package/rancher-components/components/Banner/Banner.vue +163 -0
- package/rancher-components/components/Banner/index.ts +1 -0
- package/rancher-components/components/Card/Card.vue +150 -0
- package/rancher-components/components/Card/index.ts +1 -0
- package/rancher-components/components/Form/Checkbox/Checkbox.test.ts +77 -0
- package/rancher-components/components/Form/Checkbox/Checkbox.vue +395 -0
- package/rancher-components/components/Form/Checkbox/index.ts +1 -0
- package/rancher-components/components/Form/LabeledInput/LabeledInput.test.ts +29 -0
- package/rancher-components/components/Form/LabeledInput/LabeledInput.vue +343 -0
- package/rancher-components/components/Form/LabeledInput/index.ts +1 -0
- package/rancher-components/components/Form/Radio/RadioButton.vue +270 -0
- package/rancher-components/components/Form/Radio/RadioGroup.vue +235 -0
- package/rancher-components/components/Form/Radio/index.ts +2 -0
- package/rancher-components/components/Form/TextArea/TextAreaAutoGrow.vue +168 -0
- package/rancher-components/components/Form/TextArea/index.ts +1 -0
- package/rancher-components/components/Form/ToggleSwitch/ToggleSwitch.test.ts +107 -0
- package/rancher-components/components/Form/ToggleSwitch/ToggleSwitch.vue +137 -0
- package/rancher-components/components/Form/ToggleSwitch/index.ts +1 -0
- package/rancher-components/components/Form/index.ts +5 -0
- package/rancher-components/components/LabeledTooltip/LabeledTooltip.vue +137 -0
- package/rancher-components/components/LabeledTooltip/index.ts +1 -0
- package/scripts/publish-shell.sh +40 -7
- package/scripts/record-deps.js +37 -0
- package/scripts/sync-shell-deps +37 -0
- package/scripts/test-plugins-build.sh +8 -5
- package/scripts/typegen.sh +84 -0
- package/store/auth.js +3 -0
- package/store/catalog.js +9 -8
- package/store/i18n.js +10 -1
- package/store/index.js +12 -3
- package/store/prefs.js +16 -0
- package/store/type-map.js +32 -5
- package/store/uiplugins.ts +15 -61
- package/types/shell/index.d.ts +3046 -0
- package/utils/__tests__/object.test.ts +0 -24
- package/utils/__tests__/selector.test.ts +1 -1
- package/utils/dynamic-importer.js +4 -0
- package/utils/favicon.js +8 -2
- package/utils/gc/gc-interval.ts +40 -0
- package/utils/gc/gc-root-store.js +76 -0
- package/utils/gc/gc-route-changed.ts +44 -0
- package/utils/gc/gc-types.ts +21 -0
- package/utils/gc/gc.ts +282 -0
- package/utils/grafana.js +2 -6
- package/utils/socket.js +41 -20
- package/utils/string.js +1 -7
- package/utils/validators/formRules/__tests__/index.test.ts +108 -0
- package/utils/validators/formRules/index.ts +9 -1
- package/config/footer.js +0 -19
- package/creators/pkg/nuxt.config.js +0 -6
- package/pages/plugins.vue +0 -387
- package/server/verdaccio-middleware.js +0 -56
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import Vue from 'vue';
|
|
3
|
+
|
|
4
|
+
export default Vue.extend({
|
|
5
|
+
props: {
|
|
6
|
+
/**
|
|
7
|
+
* The Labeled Tooltip value.
|
|
8
|
+
*/
|
|
9
|
+
value: {
|
|
10
|
+
type: [String, Object],
|
|
11
|
+
default: null
|
|
12
|
+
},
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* The status for the Labeled Tooltip. Controls the Labeled Tooltip class.
|
|
16
|
+
* @values info, success, warning, error
|
|
17
|
+
*/
|
|
18
|
+
status: {
|
|
19
|
+
type: String,
|
|
20
|
+
default: 'error'
|
|
21
|
+
},
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Displays the Labeled Tooltip on mouse hover.
|
|
25
|
+
*/
|
|
26
|
+
hover: {
|
|
27
|
+
type: Boolean,
|
|
28
|
+
default: true
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
computed: {
|
|
32
|
+
iconClass() {
|
|
33
|
+
return this.status === 'error' ? 'icon-warning' : 'icon-info';
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
});
|
|
37
|
+
</script>
|
|
38
|
+
|
|
39
|
+
<template>
|
|
40
|
+
<div ref="container" class="labeled-tooltip" :class="{[status]: true, hoverable: hover}">
|
|
41
|
+
<template v-if="hover">
|
|
42
|
+
<i v-tooltip="value.content ? { ...{content: value.content, classes: [`tooltip-${status}`]}, ...value } : value" :class="{'hover':!value, [iconClass]: true}" class="icon status-icon" />
|
|
43
|
+
</template>
|
|
44
|
+
<template v-else>
|
|
45
|
+
<i :class="{'hover':!value}" class="icon status-icon" />
|
|
46
|
+
<div v-if="value" class="tooltip" x-placement="bottom">
|
|
47
|
+
<div class="tooltip-arrow" />
|
|
48
|
+
<div class="tooltip-inner">
|
|
49
|
+
{{ value }}
|
|
50
|
+
</div>
|
|
51
|
+
</div>
|
|
52
|
+
</template>
|
|
53
|
+
</div>
|
|
54
|
+
</template>
|
|
55
|
+
|
|
56
|
+
<style lang='scss'>
|
|
57
|
+
.labeled-tooltip {
|
|
58
|
+
position: absolute;
|
|
59
|
+
width: 100%;
|
|
60
|
+
height: 100%;
|
|
61
|
+
left: 0;
|
|
62
|
+
top: 0;
|
|
63
|
+
|
|
64
|
+
&.hoverable {
|
|
65
|
+
height: 0%;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.status-icon {
|
|
69
|
+
position: absolute;
|
|
70
|
+
right: 30px;
|
|
71
|
+
top: $input-padding-lg;
|
|
72
|
+
font-size: 20px;
|
|
73
|
+
z-index: z-index(hoverOverContent);
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
.tooltip {
|
|
77
|
+
position: absolute;
|
|
78
|
+
width: calc(100% + 2px);
|
|
79
|
+
top: calc(100% + 6px);
|
|
80
|
+
|
|
81
|
+
.tooltip-arrow {
|
|
82
|
+
right: 30px;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
.tooltip-inner {
|
|
86
|
+
padding: 10px;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
@mixin tooltipColors($color) {
|
|
91
|
+
.status-icon {
|
|
92
|
+
color: $color;
|
|
93
|
+
}
|
|
94
|
+
.tooltip {
|
|
95
|
+
.tooltip-inner {
|
|
96
|
+
color: var(--input-bg);
|
|
97
|
+
background: $color;
|
|
98
|
+
border-color: $color;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
.tooltip-arrow {
|
|
102
|
+
border-bottom-color: $color;
|
|
103
|
+
&:after {
|
|
104
|
+
border: none;
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
&.error {
|
|
111
|
+
@include tooltipColors(var(--error));
|
|
112
|
+
|
|
113
|
+
.status-icon {
|
|
114
|
+
top: 7px;
|
|
115
|
+
right: 5px;
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
&.warning {
|
|
120
|
+
@include tooltipColors(var(--warning));
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
&.success {
|
|
124
|
+
@include tooltipColors(var(--success));
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
// Ensure code blocks inside tootips don't look awful
|
|
129
|
+
.tooltip {
|
|
130
|
+
.tooltip-inner {
|
|
131
|
+
> pre {
|
|
132
|
+
padding: 2px;
|
|
133
|
+
vertical-align: middle;
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
</style>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as LabeledTooltip } from './LabeledTooltip.vue';
|
package/scripts/publish-shell.sh
CHANGED
|
@@ -6,7 +6,13 @@ BASE_DIR="$(
|
|
|
6
6
|
pwd
|
|
7
7
|
)"
|
|
8
8
|
SHELL_DIR=$BASE_DIR/shell/
|
|
9
|
-
|
|
9
|
+
TMP_DIR=$BASE_DIR/tmp
|
|
10
|
+
PUBLISH_ARGS="--no-git-tag-version --access public $PUBLISH_ARGS"
|
|
11
|
+
|
|
12
|
+
if [ ! -d "${BASE_DIR}/node_modules" ]; then
|
|
13
|
+
echo "You need to run 'yarn install' first"
|
|
14
|
+
exit 1
|
|
15
|
+
fi
|
|
10
16
|
|
|
11
17
|
echo "Publishing Shell Packages"
|
|
12
18
|
|
|
@@ -20,6 +26,7 @@ PKG_DIST=$BASE_DIR/dist-pkg/creators
|
|
|
20
26
|
mkdir -p ${PKG_DIST}
|
|
21
27
|
rm -rf ${PKG_DIST}/app
|
|
22
28
|
rm -rf ${PKG_DIST}/pkg
|
|
29
|
+
rm -rf ${PKG_DIST}/update
|
|
23
30
|
|
|
24
31
|
pushd ${SHELL_DIR} >/dev/null
|
|
25
32
|
|
|
@@ -30,12 +37,15 @@ echo "Publishing version: $PKG_VERSION"
|
|
|
30
37
|
|
|
31
38
|
cp -R ${SHELL_DIR}/creators/app ${PKG_DIST}
|
|
32
39
|
cp -R ${SHELL_DIR}/creators/pkg ${PKG_DIST}
|
|
40
|
+
cp -R ${SHELL_DIR}/creators/update ${PKG_DIST}
|
|
33
41
|
|
|
34
42
|
sed -i.bak -e "s/\"0.0.0/"\"$PKG_VERSION"/g" ${PKG_DIST}/app/package.json
|
|
35
43
|
sed -i.bak -e "s/\"0.0.0/"\"$PKG_VERSION"/g" ${PKG_DIST}/pkg/package.json
|
|
44
|
+
sed -i.bak -e "s/\"0.0.0/"\"$PKG_VERSION"/g" ${PKG_DIST}/update/package.json
|
|
36
45
|
|
|
37
46
|
rm ${PKG_DIST}/app/package.json.bak
|
|
38
47
|
rm ${PKG_DIST}/pkg/package.json.bak
|
|
48
|
+
rm ${PKG_DIST}/update/package.json.bak
|
|
39
49
|
|
|
40
50
|
function publish() {
|
|
41
51
|
NAME=$1
|
|
@@ -45,14 +55,32 @@ function publish() {
|
|
|
45
55
|
pushd ${FOLDER} >/dev/null
|
|
46
56
|
|
|
47
57
|
# For now, copy the rancher components into the shell and ship them with it
|
|
48
|
-
if [ "$NAME" == "Shell" ]; then
|
|
58
|
+
if [ "$NAME" == "+Shell" ]; then
|
|
49
59
|
echo "Adding Rancher Components"
|
|
50
|
-
|
|
51
|
-
|
|
60
|
+
cp -R ${BASE_DIR}/pkg/rancher-components/src/components ./rancher-components/
|
|
61
|
+
fi
|
|
62
|
+
|
|
63
|
+
if [ "$NAME" == "Update" ]; then
|
|
64
|
+
# Add files from the app and pkg creators to the update package
|
|
65
|
+
mkdir -p ./app
|
|
66
|
+
mkdir -p ./pkg
|
|
67
|
+
cp -R ${BASE_DIR}/shell/creators/app/* ./app
|
|
68
|
+
cp -R ${BASE_DIR}/shell/creators/pkg/* ./pkg
|
|
69
|
+
# Remove index.ts from pkg files, as we don't want to replace that
|
|
70
|
+
rm -f ./pkg/files/index.ts
|
|
71
|
+
|
|
72
|
+
# Update the package.json for the app
|
|
73
|
+
cd app
|
|
74
|
+
node ${SCRIPT_DIR}/record-deps.js
|
|
75
|
+
cd ..
|
|
52
76
|
fi
|
|
53
77
|
|
|
78
|
+
# Make a note of dependency versions, if required
|
|
79
|
+
node ${SCRIPT_DIR}/record-deps.js
|
|
80
|
+
|
|
54
81
|
yarn publish . --new-version ${PKG_VERSION} ${PUBLISH_ARGS}
|
|
55
82
|
RET=$?
|
|
83
|
+
|
|
56
84
|
popd >/dev/null
|
|
57
85
|
|
|
58
86
|
if [ $RET -ne 0 ]; then
|
|
@@ -61,10 +89,15 @@ function publish() {
|
|
|
61
89
|
fi
|
|
62
90
|
}
|
|
63
91
|
|
|
92
|
+
# Generate the type definitions for the shell
|
|
93
|
+
${SCRIPT_DIR}/typegen.sh
|
|
94
|
+
|
|
64
95
|
# Publish the packages - don't tag the git repo and don't auto-increment the version number
|
|
65
96
|
publish "Shell" ${SHELL_DIR}
|
|
66
|
-
|
|
67
|
-
publish "
|
|
68
|
-
publish "
|
|
97
|
+
publish "Application creator" ${PKG_DIST}/app/
|
|
98
|
+
publish "Package creator" ${PKG_DIST}/pkg/
|
|
99
|
+
publish "Update" ${PKG_DIST}/update/
|
|
69
100
|
|
|
70
101
|
echo "Done"
|
|
102
|
+
|
|
103
|
+
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
const fs = require('fs');
|
|
2
|
+
const path = require('path');
|
|
3
|
+
|
|
4
|
+
// Script lives in shell/scripts, so work out top-level dir from there
|
|
5
|
+
const topDir = path.resolve(__dirname, '..', '..')
|
|
6
|
+
const dir = process.cwd();
|
|
7
|
+
|
|
8
|
+
// Read the package.json file
|
|
9
|
+
const topPkgFile = path.join(topDir, 'package.json');
|
|
10
|
+
const pkgFile = path.join(dir, 'package.json');
|
|
11
|
+
|
|
12
|
+
const topPkg = JSON.parse(fs.readFileSync(topPkgFile));
|
|
13
|
+
const mainPkg = JSON.parse(fs.readFileSync(pkgFile));
|
|
14
|
+
|
|
15
|
+
// Look to see if we specify the deps we require
|
|
16
|
+
if (mainPkg._requires) {
|
|
17
|
+
// Map each one to the same version as the main package
|
|
18
|
+
const out = {};
|
|
19
|
+
|
|
20
|
+
mainPkg._requires.forEach(name => {
|
|
21
|
+
let ver = topPkg.dependencies?.[name] || topPkg.devDependencies?.[name];
|
|
22
|
+
|
|
23
|
+
if (name === '@rancher/components') {
|
|
24
|
+
const componentsPkgFile = path.join(topDir, 'pkg', 'rancher-components', 'package.json');
|
|
25
|
+
const componentsPkg = JSON.parse(fs.readFileSync(componentsPkgFile));
|
|
26
|
+
|
|
27
|
+
ver = componentsPkg.version;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
out[name] = ver;
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
mainPkg._pkgs = out;
|
|
34
|
+
delete mainPkg._requires;
|
|
35
|
+
|
|
36
|
+
fs.writeFileSync(pkgFile, JSON.stringify(mainPkg, null, 2), 'utf-8');
|
|
37
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
const fs = require('fs-extra');
|
|
4
|
+
const path = require('path');
|
|
5
|
+
|
|
6
|
+
console.log(__dirname);
|
|
7
|
+
|
|
8
|
+
const dir = path.resolve('.');
|
|
9
|
+
|
|
10
|
+
console.log('Syncing shell dependencies');
|
|
11
|
+
|
|
12
|
+
const topFile = path.join(dir, 'package.json');
|
|
13
|
+
const shellFile = path.join(dir, 'shell', 'package.json');
|
|
14
|
+
|
|
15
|
+
console.log(topFile);
|
|
16
|
+
console.log(shellFile);
|
|
17
|
+
|
|
18
|
+
const mainPkg = JSON.parse(fs.readFileSync(topFile));
|
|
19
|
+
|
|
20
|
+
console.log(mainPkg.version);
|
|
21
|
+
|
|
22
|
+
const shellPkg = JSON.parse(fs.readFileSync(shellFile));
|
|
23
|
+
|
|
24
|
+
console.log(shellPkg.version);
|
|
25
|
+
|
|
26
|
+
Object.keys(shellPkg.dependencies).forEach(k => {
|
|
27
|
+
const version = mainPkg.dependencies[k] || mainPkg.devDependencies[k];
|
|
28
|
+
const current = shellPkg.dependencies[k];
|
|
29
|
+
|
|
30
|
+
if (version) {
|
|
31
|
+
console.log(`Syncing ${ k } -> ${ version } was ${ current }`);
|
|
32
|
+
shellPkg.dependencies[k] = version;
|
|
33
|
+
}
|
|
34
|
+
});
|
|
35
|
+
|
|
36
|
+
fs.writeFileSync(shellFile, JSON.stringify(shellPkg, undefined, 2));
|
|
37
|
+
|
|
@@ -67,7 +67,10 @@ else
|
|
|
67
67
|
fi
|
|
68
68
|
|
|
69
69
|
export YARN_REGISTRY=http://localhost:4873
|
|
70
|
-
export
|
|
70
|
+
export NUXT_TELEMETRY_DISABLED=1
|
|
71
|
+
|
|
72
|
+
# Remove test package from previous run, if present
|
|
73
|
+
rm -rf ${BASE_DIR}/pkg/test-pkg
|
|
71
74
|
|
|
72
75
|
# We need to patch the version number of the shell, otherwise if we are running
|
|
73
76
|
# with the currently published version, things will fail as those versions
|
|
@@ -92,21 +95,21 @@ if [ "${SKIP_STANDALONE}" == "false" ]; then
|
|
|
92
95
|
yarn install
|
|
93
96
|
|
|
94
97
|
echo "Building skeleton app"
|
|
95
|
-
yarn build
|
|
98
|
+
FORCE_COLOR=true yarn build | cat
|
|
96
99
|
|
|
97
100
|
# Package creator
|
|
98
101
|
echo "Verifying package creator package"
|
|
99
102
|
yarn create @rancher/pkg test-pkg
|
|
100
103
|
|
|
101
104
|
echo "Building test package"
|
|
102
|
-
yarn build-pkg test-pkg
|
|
105
|
+
FORCE_COLOR=true yarn build-pkg test-pkg | cat
|
|
103
106
|
|
|
104
107
|
# Add test list component to the test package
|
|
105
108
|
# Validates rancher-components imports
|
|
106
109
|
mkdir pkg/test-pkg/list
|
|
107
110
|
cp ${SHELL_DIR}/list/catalog.cattle.io.clusterrepo.vue pkg/test-pkg/list
|
|
108
111
|
|
|
109
|
-
yarn build-pkg test-pkg
|
|
112
|
+
FORCE_COLOR=true yarn build-pkg test-pkg | cat
|
|
110
113
|
|
|
111
114
|
echo "Cleaning temporary dir"
|
|
112
115
|
popd > /dev/null
|
|
@@ -126,7 +129,7 @@ yarn install
|
|
|
126
129
|
rm -rf ./pkg/test-pkg
|
|
127
130
|
yarn create @rancher/pkg test-pkg -t
|
|
128
131
|
cp ${SHELL_DIR}/list/catalog.cattle.io.clusterrepo.vue ./pkg/test-pkg/list
|
|
129
|
-
yarn build-pkg test-pkg
|
|
132
|
+
FORCE_COLOR=true yarn build-pkg test-pkg | cat
|
|
130
133
|
rm -rf ./pkg/test-pkg
|
|
131
134
|
|
|
132
135
|
echo "All done"
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
|
|
3
|
+
SCRIPT_DIR="$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
|
|
4
|
+
BASE_DIR="$( cd $SCRIPT_DIR && cd ../.. & pwd)"
|
|
5
|
+
SHELL_DIR=$BASE_DIR/shell
|
|
6
|
+
|
|
7
|
+
echo "Generating typescript definitions"
|
|
8
|
+
|
|
9
|
+
rm -rf ${SHELL_DIR}/tmp
|
|
10
|
+
mkdir -p ${SHELL_DIR}/tmp
|
|
11
|
+
|
|
12
|
+
echo "Generating ..."
|
|
13
|
+
|
|
14
|
+
# utils
|
|
15
|
+
${BASE_DIR}/node_modules/.bin/tsc shell/utils/*.js --declaration --allowJs --emitDeclarationOnly --outDir ${SHELL_DIR}/tmp/utils > /dev/null
|
|
16
|
+
|
|
17
|
+
# config
|
|
18
|
+
${BASE_DIR}/node_modules/.bin/tsc shell/config/query-params.js --declaration --allowJs --emitDeclarationOnly --outDir ${SHELL_DIR}/tmp/config > /dev/null
|
|
19
|
+
${BASE_DIR}/node_modules/.bin/tsc shell/config/table-headers.js --declaration --allowJs --emitDeclarationOnly --outDir ${SHELL_DIR}/tmp/config > /dev/null
|
|
20
|
+
${BASE_DIR}/node_modules/.bin/tsc shell/config/types.js --declaration --allowJs --emitDeclarationOnly --outDir ${SHELL_DIR}/tmp/config > /dev/null
|
|
21
|
+
|
|
22
|
+
# store
|
|
23
|
+
${BASE_DIR}/node_modules/.bin/tsc shell/store/features.js --declaration --allowJs --emitDeclarationOnly --outDir ${SHELL_DIR}/tmp/store > /dev/null
|
|
24
|
+
|
|
25
|
+
# plugins
|
|
26
|
+
${BASE_DIR}/node_modules/.bin/tsc shell/plugins/dashboard-store/normalize.js --declaration --allowJs --emitDeclarationOnly --outDir ${SHELL_DIR}/tmp/plugins/dashboard-store/ > /dev/null
|
|
27
|
+
${BASE_DIR}/node_modules/.bin/tsc shell/plugins/dashboard-store/resource-class.js --declaration --allowJs --emitDeclarationOnly --outDir ${SHELL_DIR}/tmp/plugins/dashboard-store/ > /dev/null
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
# mkixins
|
|
31
|
+
${BASE_DIR}/node_modules/.bin/tsc shell/mixins/create-edit-view/index.js --declaration --allowJs --emitDeclarationOnly --outDir ${SHELL_DIR}/tmp/mixins/create-edit-view > /dev/null
|
|
32
|
+
|
|
33
|
+
#./node_modules/.bin/tsc shell/plugins/dashboard-store/*.js --declaration --allowJs --emitDeclarationOnly --outDir ${SHELL_DIR}/tmp/plugins/dashboard-store > /dev/null
|
|
34
|
+
|
|
35
|
+
# Go through all of the folders and combine by wrapping with 'declare module'
|
|
36
|
+
|
|
37
|
+
echo "Combining type definitions ..."
|
|
38
|
+
|
|
39
|
+
DEST=${SHELL_DIR}/types/shell
|
|
40
|
+
mkdir -p ${DEST}
|
|
41
|
+
|
|
42
|
+
INDEX=${DEST}/index.d.ts
|
|
43
|
+
rm -rf ${INDEX}
|
|
44
|
+
|
|
45
|
+
echo "// Auto-generated type definitions for shell" > ${INDEX}
|
|
46
|
+
echo "// Do not modify this file as changes will get overwritten" >> ${INDEX}
|
|
47
|
+
|
|
48
|
+
# Copy in the vue shim type definitions
|
|
49
|
+
if [ -f "$BASE_DIR/vue-shim.d.ts" ]; then
|
|
50
|
+
cat "$BASE_DIR/vue-shim.d.ts" >> ${INDEX}
|
|
51
|
+
fi
|
|
52
|
+
|
|
53
|
+
function processDir() {
|
|
54
|
+
local dir=$1
|
|
55
|
+
local basePkg=$2
|
|
56
|
+
|
|
57
|
+
for entry in $1/*
|
|
58
|
+
do
|
|
59
|
+
local filename=$(basename $entry)
|
|
60
|
+
|
|
61
|
+
if [ -d $entry ]; then
|
|
62
|
+
processDir $entry $basePkg/$filename
|
|
63
|
+
else
|
|
64
|
+
if [[ $filename == *.d.ts ]]; then
|
|
65
|
+
# We use convoluted mechanism here to ensure this works on mac with bash 3.x
|
|
66
|
+
local name=$(echo $filename | rev | cut -c6- | rev)
|
|
67
|
+
|
|
68
|
+
local module=${basePkg}/${name}
|
|
69
|
+
if [ "${name}" == "index" ]; then
|
|
70
|
+
module=${basePkg}
|
|
71
|
+
fi
|
|
72
|
+
|
|
73
|
+
echo -e "\n// ${module}\n" >> ${INDEX}
|
|
74
|
+
echo "declare module '${module}' {" >> ${INDEX}
|
|
75
|
+
cat $entry >> ${INDEX}
|
|
76
|
+
echo -e "}" >> ${INDEX}
|
|
77
|
+
fi
|
|
78
|
+
fi
|
|
79
|
+
done
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
processDir ${SHELL_DIR}/tmp @shell
|
|
83
|
+
|
|
84
|
+
rm -rf ${SHELL_DIR}/tmp
|
package/store/auth.js
CHANGED
|
@@ -310,6 +310,9 @@ export const actions = {
|
|
|
310
310
|
},
|
|
311
311
|
|
|
312
312
|
async logout({ dispatch, commit }) {
|
|
313
|
+
// Unload plugins - we will load again on login
|
|
314
|
+
await this.$plugin.logout();
|
|
315
|
+
|
|
313
316
|
try {
|
|
314
317
|
await dispatch('rancher/request', {
|
|
315
318
|
url: '/v3/tokens?action=logout',
|
package/store/catalog.js
CHANGED
|
@@ -61,6 +61,11 @@ export const getters = {
|
|
|
61
61
|
return [...clustered, ...namespaced];
|
|
62
62
|
},
|
|
63
63
|
|
|
64
|
+
// Raw charts
|
|
65
|
+
rawCharts(state) {
|
|
66
|
+
return state.charts;
|
|
67
|
+
},
|
|
68
|
+
|
|
64
69
|
repo(state, getters) {
|
|
65
70
|
return ({ repoType, repoName }) => {
|
|
66
71
|
const ary = (repoType === 'cluster' ? state.clusterRepos : state.namespacedRepos);
|
|
@@ -250,19 +255,13 @@ export const getters = {
|
|
|
250
255
|
|
|
251
256
|
haveComponent() {
|
|
252
257
|
return (name) => {
|
|
253
|
-
|
|
254
|
-
require.resolve(`@shell/chart/${ name }`);
|
|
255
|
-
|
|
256
|
-
return true;
|
|
257
|
-
} catch (e) {
|
|
258
|
-
return false;
|
|
259
|
-
}
|
|
258
|
+
return getters['type-map/hasCustomChart'](name);
|
|
260
259
|
};
|
|
261
260
|
},
|
|
262
261
|
|
|
263
262
|
importComponent(state, getters) {
|
|
264
263
|
return (name) => {
|
|
265
|
-
return importChart(name);
|
|
264
|
+
return getters['type-map/importChart'](name);
|
|
266
265
|
};
|
|
267
266
|
},
|
|
268
267
|
|
|
@@ -340,6 +339,7 @@ export const actions = {
|
|
|
340
339
|
// Installing an app? This is fine (in cluster store)
|
|
341
340
|
// Fetching list of cluster templates? This is fine (in management store)
|
|
342
341
|
// Installing a cluster template? This isn't fine (in cluster store as per installing app, but if there is no cluster we need to default to management)
|
|
342
|
+
|
|
343
343
|
const inStore = rootGetters['currentCluster'] ? rootGetters['currentProduct'].inStore : 'management';
|
|
344
344
|
|
|
345
345
|
if ( rootGetters[`${ inStore }/schemaFor`](CATALOG.CLUSTER_REPO) ) {
|
|
@@ -517,6 +517,7 @@ function addChart(ctx, map, chart, repo) {
|
|
|
517
517
|
chartName: chart.name,
|
|
518
518
|
chartNameDisplay: chart.annotations?.[CATALOG_ANNOTATIONS.DISPLAY_NAME] || chart.name,
|
|
519
519
|
chartDescription: chart.description,
|
|
520
|
+
featured: chart.annotations?.[CATALOG_ANNOTATIONS.FEATURED],
|
|
520
521
|
repoKey: repo._key,
|
|
521
522
|
versions: [],
|
|
522
523
|
categories: filterCategories(chart.keywords),
|
package/store/i18n.js
CHANGED
|
@@ -139,6 +139,14 @@ export const getters = {
|
|
|
139
139
|
return state.default;
|
|
140
140
|
},
|
|
141
141
|
|
|
142
|
+
multiWithFallback: (state, getters) => (items, key = 'key') => {
|
|
143
|
+
return items.map((item) => {
|
|
144
|
+
item[key] = getters.withFallback(item[key], null, item[key]);
|
|
145
|
+
|
|
146
|
+
return item;
|
|
147
|
+
});
|
|
148
|
+
},
|
|
149
|
+
|
|
142
150
|
withFallback: (state, getters) => (key, args, fallback, fallbackIsKey = false) => {
|
|
143
151
|
// Support withFallback(key,fallback) when no args
|
|
144
152
|
if ( !fallback && typeof args === 'string' ) {
|
|
@@ -153,7 +161,8 @@ export const getters = {
|
|
|
153
161
|
} else {
|
|
154
162
|
return fallback;
|
|
155
163
|
}
|
|
156
|
-
}
|
|
164
|
+
},
|
|
165
|
+
|
|
157
166
|
};
|
|
158
167
|
|
|
159
168
|
export const mutations = {
|
package/store/index.js
CHANGED
|
@@ -26,6 +26,7 @@ import {
|
|
|
26
26
|
NAMESPACE_FILTER_NAMESPACED_PREFIX as NAMESPACED_PREFIX,
|
|
27
27
|
splitNamespaceFilterKey,
|
|
28
28
|
} from '@shell/utils/namespace-filter';
|
|
29
|
+
import { gcActions, gcGetters } from '@shell/utils/gc/gc-root-store';
|
|
29
30
|
|
|
30
31
|
// Disables strict mode for all store instances to prevent warning about changing state outside of mutations
|
|
31
32
|
// because it's more efficient to do that sometimes.
|
|
@@ -44,6 +45,7 @@ export const plugins = [
|
|
|
44
45
|
namespace: 'cluster',
|
|
45
46
|
baseUrl: '', // URL is dynamically set for the selected cluster
|
|
46
47
|
supportsStream: false, // true, -- Disabled due to report that it's sometimes much slower in Chrome
|
|
48
|
+
supportsGc: true, // Enable garbage collection for this store only
|
|
47
49
|
}),
|
|
48
50
|
Steve({
|
|
49
51
|
namespace: 'rancher',
|
|
@@ -455,7 +457,9 @@ export const getters = {
|
|
|
455
457
|
const cluster = getters['currentCluster'];
|
|
456
458
|
|
|
457
459
|
return cluster?.status?.provider === VIRTUAL_HARVESTER_PROVIDER;
|
|
458
|
-
}
|
|
460
|
+
},
|
|
461
|
+
|
|
462
|
+
...gcGetters
|
|
459
463
|
};
|
|
460
464
|
|
|
461
465
|
export const mutations = {
|
|
@@ -539,7 +543,8 @@ export const mutations = {
|
|
|
539
543
|
|
|
540
544
|
setIsSingleProduct(state, isSingleProduct) {
|
|
541
545
|
state.isSingleProduct = isSingleProduct;
|
|
542
|
-
}
|
|
546
|
+
},
|
|
547
|
+
|
|
543
548
|
};
|
|
544
549
|
|
|
545
550
|
export const actions = {
|
|
@@ -861,6 +866,8 @@ export const actions = {
|
|
|
861
866
|
async onLogout(store) {
|
|
862
867
|
const { dispatch, commit, state } = store;
|
|
863
868
|
|
|
869
|
+
store.dispatch('gcStopIntervals');
|
|
870
|
+
|
|
864
871
|
Object.values(this.$plugin.getPlugins()).forEach((p) => {
|
|
865
872
|
if (p.onLogOut) {
|
|
866
873
|
p.onLogOut(store);
|
|
@@ -975,5 +982,7 @@ export const actions = {
|
|
|
975
982
|
|
|
976
983
|
setIsSingleProduct({ commit }, isSingleProduct) {
|
|
977
984
|
commit(`setIsSingleProduct`, isSingleProduct);
|
|
978
|
-
}
|
|
985
|
+
},
|
|
986
|
+
|
|
987
|
+
...gcActions
|
|
979
988
|
};
|
package/store/prefs.js
CHANGED
|
@@ -15,6 +15,7 @@ export const create = function(name, def, opt = {}) {
|
|
|
15
15
|
const asCookie = opt.asCookie === true;
|
|
16
16
|
const asUserPreference = opt.asUserPreference !== false;
|
|
17
17
|
const options = opt.options;
|
|
18
|
+
const inheritFrom = opt.inheritFrom;
|
|
18
19
|
|
|
19
20
|
definitions[name] = {
|
|
20
21
|
def,
|
|
@@ -22,6 +23,7 @@ export const create = function(name, def, opt = {}) {
|
|
|
22
23
|
parseJSON,
|
|
23
24
|
asCookie,
|
|
24
25
|
asUserPreference,
|
|
26
|
+
inheritFrom, // if value is not defined on server, we can default it to another pref
|
|
25
27
|
mangleRead: opt.mangleRead, // Alter the value read from the API (to match old Rancher expectations)
|
|
26
28
|
mangleWrite: opt.mangleWrite, // Alter the value written back to the API (ditto)
|
|
27
29
|
};
|
|
@@ -72,6 +74,7 @@ export const HIDE_REPOS = create('hide-repos', [], { parseJSON });
|
|
|
72
74
|
export const HIDE_DESC = create('hide-desc', [], { parseJSON });
|
|
73
75
|
export const HIDE_SENSITIVE = create('hide-sensitive', true, { options: [true, false], parseJSON });
|
|
74
76
|
export const SHOW_PRE_RELEASE = create('show-pre-release', false, { options: [false, true], parseJSON });
|
|
77
|
+
export const SHOW_CHART_MODE = create('chartMode', 'featured', { parseJSON });
|
|
75
78
|
|
|
76
79
|
export const DATE_FORMAT = create('date-format', 'ddd, MMM D YYYY', {
|
|
77
80
|
options: [
|
|
@@ -91,12 +94,18 @@ export const TIME_FORMAT = create('time-format', 'h:mm:ss a', {
|
|
|
91
94
|
});
|
|
92
95
|
|
|
93
96
|
export const TIME_ZONE = create('time-zone', 'local');
|
|
97
|
+
// DEV will be deprecated on v2.7.0, but is needed so that we can grab the value for the new settings that derived from it
|
|
98
|
+
// such as: VIEW_IN_API, ALL_NAMESPACES, THEME_SHORTCUT
|
|
94
99
|
export const DEV = create('dev', false, { parseJSON });
|
|
100
|
+
export const VIEW_IN_API = create('view-in-api', false, { parseJSON, inheritFrom: DEV });
|
|
101
|
+
export const ALL_NAMESPACES = create('all-namespaces', false, { parseJSON, inheritFrom: DEV });
|
|
102
|
+
export const THEME_SHORTCUT = create('theme-shortcut', false, { parseJSON, inheritFrom: DEV });
|
|
95
103
|
export const LAST_VISITED = create('last-visited', 'home', { parseJSON });
|
|
96
104
|
export const SEEN_WHATS_NEW = create('seen-whatsnew', '', { parseJSON });
|
|
97
105
|
export const READ_WHATS_NEW = create('read-whatsnew', '', { parseJSON });
|
|
98
106
|
export const AFTER_LOGIN_ROUTE = create('after-login-route', 'home', { parseJSON } );
|
|
99
107
|
export const HIDE_HOME_PAGE_CARDS = create('home-page-cards', {}, { parseJSON } );
|
|
108
|
+
export const PLUGIN_DEVELOPER = create('plugin-developer', false, { parseJSON, inheritFrom: DEV }); // Is the user a plugin developer?
|
|
100
109
|
|
|
101
110
|
export const _RKE1 = 'rke1';
|
|
102
111
|
export const _RKE2 = 'rke2';
|
|
@@ -105,6 +114,9 @@ export const PROVISIONER = create('provisioner', _RKE1, { options: [_RKE1, _RKE2
|
|
|
105
114
|
// Promo for Cluster Tools feature on Cluster Dashboard page
|
|
106
115
|
export const CLUSTER_TOOLS_TIP = create('hide-cluster-tools-tip', false, { parseJSON });
|
|
107
116
|
|
|
117
|
+
// Promo for Pod Security Policies (PSPs) being deprecated on kube version 1.25 on Cluster Dashboard page
|
|
118
|
+
export const PSP_DEPRECATION_BANNER = create('hide-psp-deprecation-banner', false, { parseJSON });
|
|
119
|
+
|
|
108
120
|
// Maximum number of clusters to show in the slide-in menu
|
|
109
121
|
export const MENU_MAX_CLUSTERS = create('menu-max-clusters', 4, { options: [2, 3, 4, 5, 6, 7, 8, 9, 10], parseJSON });
|
|
110
122
|
|
|
@@ -431,6 +443,10 @@ export const actions = {
|
|
|
431
443
|
const definition = definitions[key];
|
|
432
444
|
let value = clone(server.data[key]);
|
|
433
445
|
|
|
446
|
+
if (value === undefined && definition.inheritFrom) {
|
|
447
|
+
value = clone(server.data[definition.inheritFrom]);
|
|
448
|
+
}
|
|
449
|
+
|
|
434
450
|
if ( value === undefined || key === ignoreKey) {
|
|
435
451
|
continue;
|
|
436
452
|
}
|