@rancher/shell 3.0.1-rc.3 → 3.0.1

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.
Files changed (94) hide show
  1. package/assets/data/aws-regions.json +1 -0
  2. package/assets/styles/base/_basic.scss +5 -0
  3. package/assets/styles/base/_mixins.scss +8 -0
  4. package/assets/styles/global/_button.scss +5 -0
  5. package/assets/styles/themes/_dark.scss +2 -0
  6. package/assets/styles/themes/_light.scss +2 -0
  7. package/assets/translations/en-us.yaml +40 -22
  8. package/assets/translations/zh-hans.yaml +1 -7
  9. package/chart/monitoring/StorageClassSelector.vue +1 -1
  10. package/components/AssignTo.vue +1 -0
  11. package/components/AsyncButton.vue +1 -0
  12. package/components/BackLink.vue +8 -2
  13. package/components/PaginatedResourceTable.vue +135 -0
  14. package/components/ResourceDetail/Masthead.vue +1 -1
  15. package/components/ResourceDetail/index.vue +66 -11
  16. package/components/ResourceList/index.vue +0 -1
  17. package/components/ResourceTable.vue +6 -1
  18. package/components/ResourceYaml.vue +0 -53
  19. package/components/SortableTable/index.vue +8 -6
  20. package/components/Tabbed/index.vue +35 -2
  21. package/components/form/ResourceLabeledSelect.vue +2 -2
  22. package/components/form/ResourceTabs/index.vue +0 -23
  23. package/components/form/Taints.vue +1 -1
  24. package/components/form/UnitInput.vue +1 -1
  25. package/components/form/__tests__/UnitInput.test.ts +1 -1
  26. package/components/nav/TopLevelMenu.helper.ts +546 -0
  27. package/components/nav/TopLevelMenu.vue +125 -160
  28. package/components/nav/WindowManager/ContainerShell.vue +13 -4
  29. package/components/nav/WindowManager/__tests__/ContainerShell.test.ts +20 -18
  30. package/components/nav/__tests__/TopLevelMenu.test.ts +338 -326
  31. package/composables/useLabeledFormElement.ts +6 -2
  32. package/config/pagination-table-headers.js +4 -4
  33. package/config/product/explorer.js +2 -0
  34. package/config/router/navigation-guards/index.js +1 -2
  35. package/config/router/routes.js +1 -1
  36. package/config/settings.ts +15 -8
  37. package/core/plugin.ts +8 -1
  38. package/core/types-provisioning.ts +5 -0
  39. package/core/types.ts +26 -1
  40. package/dialog/DrainNode.vue +6 -6
  41. package/edit/catalog.cattle.io.clusterrepo.vue +95 -52
  42. package/edit/provisioning.cattle.io.cluster/index.vue +8 -3
  43. package/edit/workload/index.vue +1 -1
  44. package/edit/workload/storage/csi/index.vue +29 -1
  45. package/edit/workload/storage/index.vue +1 -0
  46. package/initialize/App.vue +3 -10
  47. package/initialize/install-plugins.js +1 -2
  48. package/list/management.cattle.io.podsecurityadmissionconfigurationtemplate.vue +6 -2
  49. package/list/node.vue +8 -5
  50. package/mixins/resource-fetch-api-pagination.js +40 -5
  51. package/mixins/resource-fetch.js +48 -5
  52. package/models/management.cattle.io.nodepool.js +5 -4
  53. package/models/nodedriver.js +2 -2
  54. package/models/provisioning.cattle.io.cluster.js +3 -11
  55. package/package.json +7 -8
  56. package/pages/about.vue +22 -0
  57. package/pages/auth/setup.vue +7 -28
  58. package/pages/c/_cluster/explorer/__tests__/index.test.ts +36 -24
  59. package/pages/c/_cluster/explorer/index.vue +100 -59
  60. package/pages/home.vue +308 -123
  61. package/plugins/dashboard-store/__tests__/mutations.test.ts +2 -0
  62. package/plugins/dashboard-store/actions.js +29 -19
  63. package/plugins/dashboard-store/getters.js +5 -2
  64. package/plugins/dashboard-store/mutations.js +4 -2
  65. package/plugins/steve/__tests__/mutations.test.ts +2 -1
  66. package/plugins/steve/steve-pagination-utils.ts +25 -2
  67. package/plugins/steve/subscribe.js +22 -8
  68. package/rancher-components/Banner/Banner.vue +1 -0
  69. package/rancher-components/Form/Checkbox/Checkbox.vue +2 -0
  70. package/rancher-components/Form/LabeledInput/LabeledInput.vue +2 -0
  71. package/rancher-components/Form/Radio/RadioButton.vue +2 -0
  72. package/rancher-components/Form/Radio/RadioGroup.vue +2 -0
  73. package/rancher-components/Form/TextArea/TextAreaAutoGrow.vue +2 -0
  74. package/rancher-components/Form/ToggleSwitch/ToggleSwitch.vue +3 -0
  75. package/rancher-components/StringList/StringList.test.ts +15 -15
  76. package/rancher-components/StringList/StringList.vue +3 -0
  77. package/scripts/extension/helm/charts/ui-plugin-server/Chart.yaml +0 -2
  78. package/scripts/extension/parse-tag-name +2 -0
  79. package/scripts/test-plugins-build.sh +4 -2
  80. package/store/index.js +31 -9
  81. package/tsconfig.json +7 -1
  82. package/types/resources/settings.d.ts +1 -1
  83. package/types/shell/index.d.ts +1107 -1276
  84. package/types/store/dashboard-store.types.ts +4 -0
  85. package/types/store/pagination.types.ts +13 -0
  86. package/types/store/vuex.d.ts +8 -0
  87. package/types/vue-shim.d.ts +6 -31
  88. package/utils/cluster.js +92 -1
  89. package/utils/pagination-utils.ts +17 -8
  90. package/utils/pagination-wrapper.ts +70 -0
  91. package/utils/uiplugins.ts +307 -0
  92. package/components/templates/error.vue +0 -131
  93. package/config/router/navigation-guards/history.js +0 -13
  94. package/plugins/back-button.js +0 -3
@@ -1,131 +0,0 @@
1
- <script>
2
- import Brand from '@shell/mixins/brand';
3
-
4
- export default {
5
- name: 'NuxtError',
6
- mixins: [Brand],
7
-
8
- data() {
9
- return { ready: false };
10
- },
11
-
12
- computed: {
13
- statusCode() {
14
- return 599;
15
- },
16
- message() {
17
- return '';
18
- }
19
- },
20
- watch: {
21
- message(neu) {
22
- document.title = neu;
23
- }
24
- },
25
-
26
- mounted() {
27
- // If the page isn't a sub-path of the base url, redirect to it instead of saying not found.
28
- // For clicking from manager -> explorer -> back, nuxt tries to load /g/clusters and doesn't
29
- // have a route for that.
30
- if (this.statusCode === 404 && !this.$route.path?.startsWith(this.$router.options.base) && window._popStateDetected) {
31
- window.location.href = this.$route.fullPath;
32
-
33
- return;
34
- }
35
-
36
- // Avoid scenarios where the 404 error will blip up whilst the authenticated middleware is determining if there's an alternative valid
37
- // route
38
- setTimeout(() => {
39
- this.ready = true;
40
- }, 1000);
41
- document.title = this.message;
42
- },
43
- };
44
- </script>
45
-
46
- <template>
47
- <div
48
- v-if="ready"
49
- class="wrapper"
50
- >
51
- <div class="error">
52
- <svg
53
- xmlns="http://www.w3.org/2000/svg"
54
- width="90"
55
- height="90"
56
- fill="#DBE1EC"
57
- viewBox="0 0 48 48"
58
- >
59
- <path d="M22 30h4v4h-4zm0-16h4v12h-4zm1.99-10C12.94 4 4 12.95 4 24s8.94 20 19.99 20S44 35.05 44 24 35.04 4 23.99 4zM24 40c-8.84 0-16-7.16-16-16S15.16 8 24 8s16 7.16 16 16-7.16 16-16 16z" />
60
- </svg>
61
-
62
- <div class="title">
63
- {{ message }}
64
- </div>
65
-
66
- <p
67
- v-if="statusCode === 404"
68
- class="description"
69
- >
70
- <a
71
- v-if="typeof $route === 'undefined'"
72
- class="error-link"
73
- href="/"
74
- >Back to Home</a>
75
- <router-link
76
- v-else
77
- class="error-link"
78
- to="/"
79
- >
80
- Back to Home
81
- </router-link>
82
- </p>
83
- </div>
84
- </div>
85
- </template>
86
-
87
- <style lang="scss" scoped>
88
- .wrapper {
89
- padding: 1rem;
90
- background: #F7F8FB;
91
- color: #47494E;
92
- text-align: center;
93
- display: flex;
94
- justify-content: center;
95
- align-items: center;
96
- flex-direction: column;
97
- font-family: sans-serif;
98
- font-weight: 100 !important;
99
- -ms-text-size-adjust: 100%;
100
- -webkit-text-size-adjust: 100%;
101
- -webkit-font-smoothing: antialiased;
102
- position: fixed;
103
- top: 0;
104
- left: 0;
105
- right: 0;
106
- bottom: 0;
107
- z-index: 1000;
108
-
109
- .error {
110
- max-width: 450px;
111
- }
112
-
113
- .title {
114
- font-size: 1.5rem;
115
- margin-top: 15px;
116
- color: #47494E;
117
- margin-bottom: 8px;
118
- }
119
-
120
- .description {
121
- color: #7F828B;
122
- line-height: 21px;
123
- margin-bottom: 10px;
124
- }
125
-
126
- a {
127
- color: #7F828B !important;
128
- text-decoration: none;
129
- }
130
- }
131
- </style>
@@ -1,13 +0,0 @@
1
- export function install(router, context) {
2
- router.beforeEach((to, from, next) => loadHistory(to, from, next, context));
3
- }
4
-
5
- export async function loadHistory(to, from, next) {
6
- // Clear state used to record if back button was used for navigation
7
- // TODO: Investigate if this can be removed. This is only used on the templates/error.vue page and seems hacky.
8
- setTimeout(() => {
9
- window._popStateDetected = false;
10
- }, 1);
11
-
12
- next();
13
- }
@@ -1,3 +0,0 @@
1
- window.addEventListener('popstate', () => {
2
- window._popStateDetected = true;
3
- });