@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
package/pages/prefs.vue
CHANGED
|
@@ -1,32 +1,41 @@
|
|
|
1
1
|
<script>
|
|
2
2
|
import day from 'dayjs';
|
|
3
3
|
import { mapGetters } from 'vuex';
|
|
4
|
+
import { isAdminUser } from '@shell/store/type-map';
|
|
4
5
|
import BackLink from '@shell/components/BackLink';
|
|
5
6
|
import BackRoute from '@shell/mixins/back-link';
|
|
6
7
|
import ButtonGroup from '@shell/components/ButtonGroup';
|
|
7
8
|
import { Checkbox } from '@components/Form/Checkbox';
|
|
8
9
|
import LandingPagePreference from '@shell/components/LandingPagePreference';
|
|
9
10
|
import {
|
|
10
|
-
mapPref, THEME, KEYMAP,
|
|
11
|
+
mapPref, THEME, KEYMAP, DATE_FORMAT, TIME_FORMAT, ROWS_PER_PAGE, HIDE_DESC, SHOW_PRE_RELEASE, MENU_MAX_CLUSTERS,
|
|
12
|
+
VIEW_IN_API, ALL_NAMESPACES, THEME_SHORTCUT, PLUGIN_DEVELOPER
|
|
11
13
|
} from '@shell/store/prefs';
|
|
12
14
|
import LabeledSelect from '@shell/components/form/LabeledSelect';
|
|
13
15
|
import { addObject } from '@shell/utils/array';
|
|
16
|
+
import LocaleSelector from '@shell/components/LocaleSelector';
|
|
14
17
|
|
|
15
18
|
export default {
|
|
16
19
|
layout: 'plain',
|
|
17
20
|
components: {
|
|
18
|
-
BackLink, ButtonGroup, LabeledSelect, Checkbox, LandingPagePreference
|
|
21
|
+
BackLink, ButtonGroup, LabeledSelect, Checkbox, LandingPagePreference, LocaleSelector
|
|
19
22
|
},
|
|
20
|
-
mixins:
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
23
|
+
mixins: [BackRoute],
|
|
24
|
+
data() {
|
|
25
|
+
return { admin: isAdminUser(this.$store.getters) };
|
|
26
|
+
},
|
|
27
|
+
computed: {
|
|
28
|
+
keymap: mapPref(KEYMAP),
|
|
29
|
+
viewInApi: mapPref(VIEW_IN_API),
|
|
30
|
+
allNamespaces: mapPref(ALL_NAMESPACES),
|
|
31
|
+
themeShortcut: mapPref(THEME_SHORTCUT),
|
|
32
|
+
dateFormat: mapPref(DATE_FORMAT),
|
|
33
|
+
timeFormat: mapPref(TIME_FORMAT),
|
|
34
|
+
perPage: mapPref(ROWS_PER_PAGE),
|
|
35
|
+
hideDesc: mapPref(HIDE_DESC),
|
|
36
|
+
showPreRelease: mapPref(SHOW_PRE_RELEASE),
|
|
37
|
+
menuMaxClusters: mapPref(MENU_MAX_CLUSTERS),
|
|
38
|
+
pluginDeveloper: mapPref(PLUGIN_DEVELOPER),
|
|
30
39
|
|
|
31
40
|
...mapGetters(['isSingleProduct']),
|
|
32
41
|
|
|
@@ -137,101 +146,112 @@ export default {
|
|
|
137
146
|
this.hideDesc = val;
|
|
138
147
|
}
|
|
139
148
|
},
|
|
140
|
-
}
|
|
149
|
+
}
|
|
141
150
|
};
|
|
142
151
|
</script>
|
|
143
152
|
|
|
144
153
|
<template>
|
|
145
154
|
<div>
|
|
146
155
|
<BackLink :link="backLink" />
|
|
147
|
-
<h1 v-t="'prefs.title'" />
|
|
148
|
-
|
|
149
|
-
<
|
|
150
|
-
|
|
151
|
-
<
|
|
156
|
+
<h1 v-t="'prefs.title'" class="mb-20" />
|
|
157
|
+
<!-- Language -->
|
|
158
|
+
<div class="mt-10 mb-10">
|
|
159
|
+
<h4 v-t="'prefs.language'" />
|
|
160
|
+
<div class="row">
|
|
161
|
+
<div class="col span-4">
|
|
162
|
+
<LocaleSelector />
|
|
163
|
+
</div>
|
|
164
|
+
</div>
|
|
152
165
|
</div>
|
|
153
|
-
|
|
154
|
-
|
|
166
|
+
<!-- Theme -->
|
|
167
|
+
<div class="mt-10 mb-10">
|
|
168
|
+
<hr />
|
|
169
|
+
<h4 v-t="'prefs.theme.label'" />
|
|
170
|
+
<ButtonGroup v-model="theme" :options="themeOptions" />
|
|
171
|
+
<div class="mt-10">
|
|
172
|
+
<t k="prefs.theme.autoDetail" :pm="pm" :am="am" />
|
|
173
|
+
</div>
|
|
155
174
|
</div>
|
|
156
|
-
|
|
175
|
+
<!-- Login landing page -->
|
|
176
|
+
<div v-if="!isSingleProduct" class="mt-10 mb-10">
|
|
157
177
|
<hr />
|
|
158
178
|
<h4 v-t="'prefs.landing.label'" />
|
|
159
179
|
<LandingPagePreference />
|
|
160
180
|
</div>
|
|
161
|
-
|
|
162
|
-
<
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
181
|
+
<!-- Display Settings -->
|
|
182
|
+
<div class="mt-10 mb-10">
|
|
183
|
+
<hr />
|
|
184
|
+
<h4 v-t="'prefs.displaySettings.title'" />
|
|
185
|
+
<p class="set-landing-leadin">
|
|
186
|
+
{{ t('prefs.displaySettings.detail', {}, raw=true) }}
|
|
187
|
+
</p>
|
|
188
|
+
<div class="row mt-20">
|
|
189
|
+
<div class="col span-4">
|
|
190
|
+
<LabeledSelect
|
|
191
|
+
v-model="dateFormat"
|
|
192
|
+
:label="t('prefs.dateFormat.label')"
|
|
193
|
+
:options="dateOptions"
|
|
194
|
+
/>
|
|
195
|
+
</div>
|
|
196
|
+
<div class="col span-4">
|
|
197
|
+
<LabeledSelect
|
|
198
|
+
v-model="timeFormat"
|
|
199
|
+
:label="t('prefs.timeFormat.label')"
|
|
200
|
+
:options="timeOptions"
|
|
201
|
+
/>
|
|
202
|
+
</div>
|
|
180
203
|
</div>
|
|
181
|
-
</div>
|
|
182
204
|
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
205
|
+
<div class="row mt-20">
|
|
206
|
+
<div class="col span-4">
|
|
207
|
+
<LabeledSelect
|
|
208
|
+
v-model.number="perPage"
|
|
209
|
+
:label="t('prefs.perPage.label')"
|
|
210
|
+
:options="perPageOptions"
|
|
211
|
+
option-key="value"
|
|
212
|
+
option-label="label"
|
|
213
|
+
placeholder="Select a row count"
|
|
214
|
+
/>
|
|
215
|
+
</div>
|
|
216
|
+
<div class="col span-4">
|
|
217
|
+
<LabeledSelect
|
|
218
|
+
v-model.number="menuMaxClusters"
|
|
219
|
+
:label="t('prefs.clusterToShow.label')"
|
|
220
|
+
:options="menuClusterOptions"
|
|
221
|
+
option-key="value"
|
|
222
|
+
option-label="label"
|
|
223
|
+
placeholder="Select a row count"
|
|
224
|
+
/>
|
|
225
|
+
</div>
|
|
203
226
|
</div>
|
|
204
227
|
</div>
|
|
205
|
-
|
|
206
|
-
<
|
|
207
|
-
|
|
208
|
-
<
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
228
|
+
<!-- Advanced Features -->
|
|
229
|
+
<div class="col adv-features mt-10 mb-10">
|
|
230
|
+
<hr />
|
|
231
|
+
<h4 v-t="'prefs.advFeatures.title'" />
|
|
232
|
+
<Checkbox v-model="viewInApi" :label="t('prefs.advFeatures.viewInApi', {}, true)" class="mt-10" />
|
|
233
|
+
<br />
|
|
234
|
+
<Checkbox v-model="allNamespaces" :label="t('prefs.advFeatures.allNamespaces', {}, true)" class="mt-20" />
|
|
235
|
+
<br />
|
|
236
|
+
<Checkbox v-model="themeShortcut" :label="t('prefs.advFeatures.themeShortcut', {}, true)" class="mt-20" />
|
|
237
|
+
<br />
|
|
238
|
+
<Checkbox v-if="!isSingleProduct" v-model="hideDescriptions" :label="t('prefs.hideDesc.label')" class="mt-20" />
|
|
239
|
+
<template v-if="admin">
|
|
240
|
+
<br />
|
|
241
|
+
<Checkbox v-model="pluginDeveloper" :label="t('prefs.advFeatures.pluginDeveloper', {}, true)" class="mt-20" />
|
|
242
|
+
</template>
|
|
217
243
|
</div>
|
|
218
|
-
|
|
219
|
-
<
|
|
220
|
-
|
|
221
|
-
<
|
|
222
|
-
|
|
223
|
-
<ButtonGroup v-model="keymap" :options="keymapOptions" />
|
|
224
|
-
</div>
|
|
244
|
+
<!-- YAML editor key mapping -->
|
|
245
|
+
<div class="col mt-10 mb-10">
|
|
246
|
+
<hr />
|
|
247
|
+
<h4 v-t="'prefs.keymap.label'" />
|
|
248
|
+
<ButtonGroup v-model="keymap" :options="keymapOptions" />
|
|
225
249
|
</div>
|
|
226
|
-
|
|
227
|
-
<div v-if="!isSingleProduct">
|
|
250
|
+
<!-- Helm Charts -->
|
|
251
|
+
<div v-if="!isSingleProduct" class="col mt-10 mb-40">
|
|
228
252
|
<hr />
|
|
229
|
-
<
|
|
230
|
-
|
|
231
|
-
<h4 v-t="'prefs.helm.label'" />
|
|
232
|
-
<ButtonGroup v-model="showPreRelease" :options="helmOptions" />
|
|
233
|
-
</div>
|
|
234
|
-
</div>
|
|
253
|
+
<h4 v-t="'prefs.helm.label'" />
|
|
254
|
+
<ButtonGroup v-model="showPreRelease" :options="helmOptions" />
|
|
235
255
|
</div>
|
|
236
256
|
</div>
|
|
237
257
|
</template>
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
<script>
|
|
2
|
+
export default {
|
|
3
|
+
middleware({ redirect, store } ) {
|
|
4
|
+
const dashboardHome = { name: 'home' };
|
|
5
|
+
const t = store.getters['i18n/t'];
|
|
6
|
+
|
|
7
|
+
setTimeout(() => {
|
|
8
|
+
store.dispatch('growl/success', {
|
|
9
|
+
title: t('plugins.safeMode.title'),
|
|
10
|
+
message: t('plugins.safeMode.message')
|
|
11
|
+
}, { root: true });
|
|
12
|
+
}, 1000);
|
|
13
|
+
|
|
14
|
+
return redirect(dashboardHome);
|
|
15
|
+
}
|
|
16
|
+
};
|
|
17
|
+
</script>
|
package/pages/support/index.vue
CHANGED
|
@@ -1,17 +1,13 @@
|
|
|
1
1
|
<script>
|
|
2
|
-
import { options } from '@shell/config/footer';
|
|
3
2
|
import BannerGraphic from '@shell/components/BannerGraphic';
|
|
4
|
-
import AsyncButton from '@shell/components/AsyncButton';
|
|
5
3
|
import IndentedPanel from '@shell/components/IndentedPanel';
|
|
6
|
-
import { Card } from '@components/Card';
|
|
7
4
|
import CommunityLinks from '@shell/components/CommunityLinks';
|
|
8
5
|
import { CATALOG, MANAGEMENT } from '@shell/config/types';
|
|
9
|
-
import { getVendor
|
|
6
|
+
import { getVendor } from '@shell/config/private-label';
|
|
10
7
|
import { SETTING } from '@shell/config/settings';
|
|
11
8
|
import { findBy } from '@shell/utils/array';
|
|
12
9
|
import { addParam } from '@shell/utils/url';
|
|
13
|
-
|
|
14
|
-
const KEY_REGEX = /^[0-9a-fA-F]{16}$/;
|
|
10
|
+
import { isRancherPrime } from '@shell/config/version';
|
|
15
11
|
|
|
16
12
|
export default {
|
|
17
13
|
layout: 'home',
|
|
@@ -19,8 +15,6 @@ export default {
|
|
|
19
15
|
components: {
|
|
20
16
|
BannerGraphic,
|
|
21
17
|
IndentedPanel,
|
|
22
|
-
AsyncButton,
|
|
23
|
-
Card,
|
|
24
18
|
CommunityLinks
|
|
25
19
|
},
|
|
26
20
|
|
|
@@ -50,9 +44,7 @@ export default {
|
|
|
50
44
|
if ( this.$store.getters['management/canList'](CATALOG.APP) ) {
|
|
51
45
|
this.apps = await this.$store.dispatch('management/findAll', { type: CATALOG.APP });
|
|
52
46
|
}
|
|
53
|
-
this.supportSetting = await fetchOrCreateSetting('has-support', 'false');
|
|
54
47
|
this.brandSetting = await fetchOrCreateSetting(SETTING.BRAND, '');
|
|
55
|
-
this.communitySetting = await fetchOrCreateSetting(SETTING.COMMUNITY_LINKS, 'true');
|
|
56
48
|
this.serverUrlSetting = await fetchOrCreateSetting(SETTING.SERVER_URL, '');
|
|
57
49
|
this.uiIssuesSetting = await this.$store.dispatch('management/find', { type: MANAGEMENT.SETTING, id: SETTING.ISSUES });
|
|
58
50
|
},
|
|
@@ -62,10 +54,8 @@ export default {
|
|
|
62
54
|
apps: [],
|
|
63
55
|
vendor: getVendor(),
|
|
64
56
|
supportKey: '',
|
|
65
|
-
supportSetting: null,
|
|
66
57
|
brandSetting: null,
|
|
67
58
|
uiIssuesSetting: null,
|
|
68
|
-
communitySetting: null,
|
|
69
59
|
serverSetting: null,
|
|
70
60
|
promos: [
|
|
71
61
|
'support.promos.one',
|
|
@@ -81,6 +71,10 @@ export default {
|
|
|
81
71
|
return findBy(this.apps, 'metadata.name', 'rancher-csp-adapter' );
|
|
82
72
|
},
|
|
83
73
|
|
|
74
|
+
hasSupport() {
|
|
75
|
+
return this.hasAWSSupport || isRancherPrime();
|
|
76
|
+
},
|
|
77
|
+
|
|
84
78
|
hasAWSSupport() {
|
|
85
79
|
return !!this.cspAdapter;
|
|
86
80
|
},
|
|
@@ -103,68 +97,15 @@ export default {
|
|
|
103
97
|
return `${ this.serverUrl }/v1/generateSUSERancherSupportConfig`;
|
|
104
98
|
},
|
|
105
99
|
|
|
106
|
-
hasSupport() {
|
|
107
|
-
return (this.supportSetting?.value && this.supportSetting?.value !== 'false') || this.hasAWSSupport;
|
|
108
|
-
},
|
|
109
|
-
|
|
110
|
-
options() {
|
|
111
|
-
return options( this.uiIssuesSetting?.value, this.communitySetting?.value === 'false');
|
|
112
|
-
},
|
|
113
|
-
|
|
114
100
|
title() {
|
|
115
101
|
return this.hasSupport ? 'support.suse.title' : 'support.community.title';
|
|
116
102
|
},
|
|
117
103
|
|
|
118
|
-
validSupportKey() {
|
|
119
|
-
return !!this.supportKey.match(KEY_REGEX);
|
|
120
|
-
},
|
|
121
|
-
|
|
122
104
|
sccLink() {
|
|
123
105
|
return this.hasAWSSupport ? addParam('https://scc.suse.com', 'from_marketplace', '1') : 'https://scc.suse.com';
|
|
124
106
|
}
|
|
125
107
|
},
|
|
126
108
|
|
|
127
|
-
methods: {
|
|
128
|
-
async addSubscription(done) {
|
|
129
|
-
try {
|
|
130
|
-
this.supportSetting.value = 'true';
|
|
131
|
-
this.brandSetting.value = 'suse';
|
|
132
|
-
await Promise.all([this.supportSetting.save(), this.brandSetting.save()]);
|
|
133
|
-
setBrand('suse');
|
|
134
|
-
done(true);
|
|
135
|
-
this.$modal.hide('toggle-support');
|
|
136
|
-
} catch {
|
|
137
|
-
done(false);
|
|
138
|
-
}
|
|
139
|
-
},
|
|
140
|
-
|
|
141
|
-
async removeSubscription(done) {
|
|
142
|
-
try {
|
|
143
|
-
this.supportSetting.value = 'false';
|
|
144
|
-
this.brandSetting.value = '';
|
|
145
|
-
await Promise.all([this.supportSetting.save(), this.brandSetting.save()]);
|
|
146
|
-
setBrand('');
|
|
147
|
-
done(true);
|
|
148
|
-
this.$modal.hide('toggle-support');
|
|
149
|
-
} catch {
|
|
150
|
-
done(false);
|
|
151
|
-
}
|
|
152
|
-
},
|
|
153
|
-
|
|
154
|
-
showDialog(isAdd) {
|
|
155
|
-
this.isRemoveDialog = isAdd;
|
|
156
|
-
this.supportKey = '';
|
|
157
|
-
this.$modal.show('toggle-support');
|
|
158
|
-
},
|
|
159
|
-
|
|
160
|
-
dialogOpened() {
|
|
161
|
-
const input = this.$refs.subscriptionIDInput;
|
|
162
|
-
|
|
163
|
-
if (input) {
|
|
164
|
-
input.focus();
|
|
165
|
-
}
|
|
166
|
-
},
|
|
167
|
-
}
|
|
168
109
|
};
|
|
169
110
|
</script>
|
|
170
111
|
<template>
|
|
@@ -173,10 +114,18 @@ export default {
|
|
|
173
114
|
|
|
174
115
|
<IndentedPanel>
|
|
175
116
|
<div class="content mt-20">
|
|
176
|
-
<div class="promo">
|
|
117
|
+
<div class="promo col main-panel">
|
|
177
118
|
<div class="box mb-20 box-primary">
|
|
178
119
|
<h2>{{ t('support.suse.access.title') }}</h2>
|
|
179
|
-
<div>
|
|
120
|
+
<div v-if="!hasSupport" class="external support-links mt-20">
|
|
121
|
+
<div class="support-link">
|
|
122
|
+
<a class="support-link" href="https://rancher.com/support-maintenance-terms" target="_blank" rel="noopener noreferrer nofollow">{{ t('support.community.learnMore') }}</a>
|
|
123
|
+
</div>
|
|
124
|
+
<div class="support-link">
|
|
125
|
+
<a class="support-link" href="https://rancher.com/pricing" target="_blank" rel="noopener noreferrer nofollow">{{ t('support.community.pricing') }}</a>
|
|
126
|
+
</div>
|
|
127
|
+
</div>
|
|
128
|
+
<div v-else>
|
|
180
129
|
<p class="pb-10">
|
|
181
130
|
{{ hasAWSSupport ? t("support.suse.access.aws.text") : t("support.suse.access.text") }}
|
|
182
131
|
</p>
|
|
@@ -194,69 +143,28 @@ export default {
|
|
|
194
143
|
<div>{{ t(`${key}.text`) }}</div>
|
|
195
144
|
</div>
|
|
196
145
|
</div>
|
|
197
|
-
<div v-if="!hasSupport" class="external">
|
|
198
|
-
<a href="https://rancher.com/support-maintenance-terms" target="_blank" rel="noopener noreferrer nofollow">{{ t('support.community.learnMore') }} <i class="icon icon-external-link" /></a>
|
|
199
|
-
or
|
|
200
|
-
<a href="https://rancher.com/pricing" target="_blank" rel="noopener noreferrer nofollow">{{ t('support.community.pricing') }} <i class="icon icon-external-link" /></a>
|
|
201
|
-
</div>
|
|
202
|
-
<div v-if="!hasSupport" class="register row">
|
|
203
|
-
<div>
|
|
204
|
-
{{ t('support.subscription.haveSupport') }}
|
|
205
|
-
</div>
|
|
206
|
-
<button class="ml-5 btn role-secondary btn-sm" type="button" @click="showDialog(false)">
|
|
207
|
-
{{ t('support.subscription.addSubscription') }}
|
|
208
|
-
</button>
|
|
209
|
-
</div>
|
|
210
|
-
<div v-if="hasSupport && !hasAWSSupport" class="register row">
|
|
211
|
-
<a class="remove-link" @click="showDialog(true)">
|
|
212
|
-
{{ t('support.subscription.removeSubscription') }}
|
|
213
|
-
</a>
|
|
214
|
-
</div>
|
|
215
|
-
</div>
|
|
216
|
-
<div class="community">
|
|
217
|
-
<CommunityLinks />
|
|
218
146
|
</div>
|
|
147
|
+
<CommunityLinks :is-support-page="true" class="community col side-panel span-3" />
|
|
219
148
|
</div>
|
|
220
149
|
</IndentedPanel>
|
|
221
|
-
<modal
|
|
222
|
-
name="toggle-support"
|
|
223
|
-
height="auto"
|
|
224
|
-
:width="340"
|
|
225
|
-
@opened="dialogOpened"
|
|
226
|
-
>
|
|
227
|
-
<Card :show-highlight-border="false" class="toggle-support">
|
|
228
|
-
<template #title>
|
|
229
|
-
{{ isRemoveDialog? t('support.subscription.removeTitle') : t('support.subscription.addTitle') }}
|
|
230
|
-
</template>
|
|
231
|
-
<template #body>
|
|
232
|
-
<div v-if="isRemoveDialog" class="mt-20">
|
|
233
|
-
{{ t('support.subscription.removeBody') }}
|
|
234
|
-
</div>
|
|
235
|
-
<div v-else class="mt-20">
|
|
236
|
-
<p class="pb-10">
|
|
237
|
-
{{ t('support.subscription.addLabel') }}
|
|
238
|
-
</p>
|
|
239
|
-
<input ref="subscriptionIDInput" v-model="supportKey" />
|
|
240
|
-
</div>
|
|
241
|
-
</template>
|
|
242
|
-
<template #actions>
|
|
243
|
-
<button type="button" class="btn role-secondary" @click="$modal.hide('toggle-support')">
|
|
244
|
-
{{ t('generic.cancel') }}
|
|
245
|
-
</button>
|
|
246
|
-
<AsyncButton v-if="!isRemoveDialog" :disabled="!validSupportKey" class="pull-right" @click="addSubscription" />
|
|
247
|
-
<AsyncButton v-else :action-label="t('generic.remove')" class="pull-right" @click="removeSubscription" />
|
|
248
|
-
</template>
|
|
249
|
-
</Card>
|
|
250
|
-
</modal>
|
|
251
150
|
</div>
|
|
252
151
|
</template>
|
|
253
152
|
<style lang="scss" scoped>
|
|
254
153
|
.content {
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
154
|
+
|
|
155
|
+
display: flex;
|
|
156
|
+
align-items: stretch;
|
|
157
|
+
.col {
|
|
158
|
+
margin: 0
|
|
159
|
+
}
|
|
160
|
+
.main-panel {
|
|
161
|
+
flex: auto;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
.side-panel {
|
|
165
|
+
margin-left: 1.75%;
|
|
166
|
+
}
|
|
167
|
+
}
|
|
260
168
|
|
|
261
169
|
.toggle-support {
|
|
262
170
|
height: 100%;
|
|
@@ -271,21 +179,10 @@ export default {
|
|
|
271
179
|
}
|
|
272
180
|
}
|
|
273
181
|
|
|
274
|
-
.
|
|
275
|
-
|
|
276
|
-
padding-left: 20px;
|
|
277
|
-
> h2 {
|
|
278
|
-
font-size: 18px;
|
|
279
|
-
font-weight: 300;
|
|
280
|
-
margin-bottom: 20px;
|
|
281
|
-
}
|
|
282
|
-
.support-link {
|
|
283
|
-
margin: 10px 0;
|
|
284
|
-
}
|
|
285
|
-
}
|
|
286
|
-
.external {
|
|
287
|
-
margin-top: 20px;
|
|
182
|
+
.support-link:not(:first-child) {
|
|
183
|
+
margin: 15px 0 0 0;
|
|
288
184
|
}
|
|
185
|
+
|
|
289
186
|
.register {
|
|
290
187
|
display: flex;
|
|
291
188
|
align-items: center;
|
|
@@ -5,6 +5,7 @@ import { SPOOFED_API_PREFIX, SPOOFED_PREFIX } from '@shell/store/type-map';
|
|
|
5
5
|
import { createYaml } from '@shell/utils/create-yaml';
|
|
6
6
|
import { classify } from '@shell/plugins/dashboard-store/classify';
|
|
7
7
|
import { normalizeType } from './normalize';
|
|
8
|
+
import garbageCollect from '@shell/utils/gc/gc';
|
|
8
9
|
|
|
9
10
|
export const _ALL = 'all';
|
|
10
11
|
export const _MERGE = 'merge';
|
|
@@ -316,6 +317,8 @@ export default {
|
|
|
316
317
|
dispatch('resource-fetch/updateManualRefreshIsLoading', false, { root: true });
|
|
317
318
|
}
|
|
318
319
|
|
|
320
|
+
garbageCollect.gcUpdateLastAccessed(ctx, type);
|
|
321
|
+
|
|
319
322
|
return all;
|
|
320
323
|
},
|
|
321
324
|
|
|
@@ -371,6 +374,8 @@ export default {
|
|
|
371
374
|
});
|
|
372
375
|
}
|
|
373
376
|
|
|
377
|
+
garbageCollect.gcUpdateLastAccessed(ctx, type);
|
|
378
|
+
|
|
374
379
|
return getters.matching( type, selector, namespace );
|
|
375
380
|
},
|
|
376
381
|
|
|
@@ -426,6 +431,8 @@ export default {
|
|
|
426
431
|
|
|
427
432
|
out = getters.byId(type, id);
|
|
428
433
|
|
|
434
|
+
garbageCollect.gcUpdateLastAccessed(ctx, type);
|
|
435
|
+
|
|
429
436
|
return out;
|
|
430
437
|
},
|
|
431
438
|
|
|
@@ -490,6 +497,10 @@ export default {
|
|
|
490
497
|
return classify(ctx, data);
|
|
491
498
|
},
|
|
492
499
|
|
|
500
|
+
createMany(ctx, data) {
|
|
501
|
+
return data.map(d => classify(ctx, d));
|
|
502
|
+
},
|
|
503
|
+
|
|
493
504
|
createPopulated(ctx, userData) {
|
|
494
505
|
const data = ctx.getters['defaultFor'](userData.type);
|
|
495
506
|
|
|
@@ -587,5 +598,13 @@ export default {
|
|
|
587
598
|
|
|
588
599
|
incrementLoadCounter({ commit }, resource) {
|
|
589
600
|
commit('incrementLoadCounter', resource);
|
|
601
|
+
},
|
|
602
|
+
|
|
603
|
+
garbageCollect(ctx, ignoreTypes) {
|
|
604
|
+
return garbageCollect.garbageCollect(ctx, ignoreTypes);
|
|
605
|
+
},
|
|
606
|
+
|
|
607
|
+
gcResetStore({ state }) {
|
|
608
|
+
garbageCollect.gcResetStore(state);
|
|
590
609
|
}
|
|
591
610
|
};
|
|
@@ -9,10 +9,11 @@ import Resource from '@shell/plugins/dashboard-store/resource-class';
|
|
|
9
9
|
import mutations from './mutations';
|
|
10
10
|
import { keyFieldFor, normalizeType } from './normalize';
|
|
11
11
|
import { lookup } from './model-loader';
|
|
12
|
+
import garbageCollect from '@shell/utils/gc/gc';
|
|
12
13
|
|
|
13
14
|
export default {
|
|
14
15
|
|
|
15
|
-
all: (state, getters) => (type) => {
|
|
16
|
+
all: (state, getters, rootState) => (type) => {
|
|
16
17
|
type = getters.normalizeType(type);
|
|
17
18
|
|
|
18
19
|
if ( !getters.typeRegistered(type) ) {
|
|
@@ -22,10 +23,14 @@ export default {
|
|
|
22
23
|
mutations.registerType(state, type);
|
|
23
24
|
}
|
|
24
25
|
|
|
26
|
+
garbageCollect.gcUpdateLastAccessed({
|
|
27
|
+
state, getters, rootState
|
|
28
|
+
}, type);
|
|
29
|
+
|
|
25
30
|
return state.types[type].list;
|
|
26
31
|
},
|
|
27
32
|
|
|
28
|
-
matching: (state, getters) => (type, selector, namespace) => {
|
|
33
|
+
matching: (state, getters, rootState) => (type, selector, namespace) => {
|
|
29
34
|
let all = getters['all'](type);
|
|
30
35
|
|
|
31
36
|
// Filter first by namespace if one is provided, since this is efficient
|
|
@@ -33,16 +38,24 @@ export default {
|
|
|
33
38
|
all = all.filter(obj => obj.namespace === namespace);
|
|
34
39
|
}
|
|
35
40
|
|
|
41
|
+
garbageCollect.gcUpdateLastAccessed({
|
|
42
|
+
state, getters, rootState
|
|
43
|
+
}, type);
|
|
44
|
+
|
|
36
45
|
return all.filter((obj) => {
|
|
37
46
|
return matches(obj, selector);
|
|
38
47
|
});
|
|
39
48
|
},
|
|
40
49
|
|
|
41
|
-
byId: (state, getters) => (type, id) => {
|
|
50
|
+
byId: (state, getters, rootState) => (type, id) => {
|
|
42
51
|
type = getters.normalizeType(type);
|
|
43
52
|
const entry = state.types[type];
|
|
44
53
|
|
|
45
54
|
if ( entry ) {
|
|
55
|
+
garbageCollect.gcUpdateLastAccessed({
|
|
56
|
+
state, getters, rootState
|
|
57
|
+
}, type);
|
|
58
|
+
|
|
46
59
|
return entry.map.get(id);
|
|
47
60
|
}
|
|
48
61
|
},
|
|
@@ -300,5 +313,9 @@ export default {
|
|
|
300
313
|
}
|
|
301
314
|
|
|
302
315
|
return 0;
|
|
316
|
+
},
|
|
317
|
+
|
|
318
|
+
gcIgnoreTypes: () => {
|
|
319
|
+
return {};
|
|
303
320
|
}
|
|
304
321
|
};
|