@rancher/shell 3.0.5-rc.1 → 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.
Files changed (200) hide show
  1. package/assets/images/providers/sks.svg +1 -0
  2. package/assets/styles/base/_helpers.scss +4 -0
  3. package/assets/styles/base/_variables.scss +1 -0
  4. package/assets/translations/en-us.yaml +31 -15
  5. package/assets/translations/zh-hans.yaml +4 -3
  6. package/chart/monitoring/index.vue +3 -1
  7. package/components/ActionDropdownShell.vue +71 -0
  8. package/components/AppModal.vue +18 -4
  9. package/components/CommunityLinks.vue +3 -58
  10. package/components/CruResource.vue +6 -1
  11. package/components/ExplorerProjectsNamespaces.vue +12 -4
  12. package/components/GlobalRoleBindings.vue +5 -1
  13. package/components/GrowlManager.vue +1 -0
  14. package/components/LandingPagePreference.vue +2 -0
  15. package/components/LocaleSelector.vue +1 -1
  16. package/components/ModalManager.vue +55 -0
  17. package/components/PromptModal.vue +47 -8
  18. package/components/ResourceDetail/Masthead.vue +38 -12
  19. package/components/ResourceDetail/__tests__/Masthead.test.ts +5 -1
  20. package/components/ResourceDetail/index.vue +47 -12
  21. package/components/ResourceTable.vue +54 -19
  22. package/components/SideNav.vue +5 -1
  23. package/components/SlideInPanelManager.vue +126 -0
  24. package/components/SortableTable/THead.vue +5 -2
  25. package/components/SortableTable/actions.js +1 -1
  26. package/components/SortableTable/index.vue +54 -40
  27. package/components/SortableTable/paging.js +16 -19
  28. package/components/SortableTable/selection.js +0 -11
  29. package/components/Wizard.vue +2 -2
  30. package/components/__tests__/ModalManager.spec.ts +176 -0
  31. package/components/__tests__/PromptModal.test.ts +148 -0
  32. package/components/__tests__/SlideInPanelManager.spec.ts +166 -0
  33. package/components/auth/AuthBanner.vue +13 -11
  34. package/components/auth/Principal.vue +1 -0
  35. package/components/auth/login/ldap.vue +1 -1
  36. package/components/fleet/FleetResources.vue +21 -6
  37. package/components/form/ArrayList.vue +10 -6
  38. package/components/form/BannerSettings.vue +17 -2
  39. package/components/form/ColorInput.vue +35 -6
  40. package/components/form/EnvVars.vue +1 -0
  41. package/components/form/LabeledSelect.vue +18 -23
  42. package/components/form/MatchExpressions.vue +4 -1
  43. package/components/form/NameNsDescription.vue +5 -1
  44. package/components/form/NotificationSettings.vue +15 -1
  45. package/components/form/Password.vue +1 -0
  46. package/components/form/Probe.vue +1 -0
  47. package/components/form/SSHKnownHosts/__tests__/KnownHostsEditDialog.test.ts +15 -34
  48. package/components/form/SSHKnownHosts/index.vue +14 -11
  49. package/components/form/Select.vue +1 -15
  50. package/components/form/ValueFromResource.vue +12 -12
  51. package/components/form/__tests__/ArrayList.test.ts +2 -2
  52. package/components/form/__tests__/ColorInput.test.ts +35 -0
  53. package/components/form/__tests__/LabeledSelect.test.ts +40 -0
  54. package/components/form/__tests__/SSHKnownHosts.test.ts +11 -2
  55. package/components/nav/Group.vue +12 -4
  56. package/components/nav/Header.vue +16 -43
  57. package/components/nav/NamespaceFilter.vue +134 -86
  58. package/components/nav/TopLevelMenu.vue +4 -5
  59. package/components/nav/WindowManager/ContainerLogs.vue +87 -61
  60. package/components/nav/WindowManager/ContainerLogsActions.vue +76 -0
  61. package/components/templates/default.vue +6 -3
  62. package/components/templates/home.vue +6 -0
  63. package/components/templates/plain.vue +6 -3
  64. package/composables/focusTrap.ts +12 -4
  65. package/config/store.js +4 -0
  66. package/config/uiplugins.js +5 -1
  67. package/core/types.ts +7 -6
  68. package/detail/catalog.cattle.io.app.vue +6 -1
  69. package/detail/fleet.cattle.io.bundle.vue +70 -6
  70. package/detail/fleet.cattle.io.gitrepo.vue +1 -1
  71. package/detail/namespace.vue +0 -3
  72. package/detail/node.vue +17 -13
  73. package/detail/provisioning.cattle.io.cluster.vue +72 -6
  74. package/dialog/AddCustomBadgeDialog.vue +0 -1
  75. package/{pages/c/_cluster/uiplugins/AddExtensionRepos.vue → dialog/AddExtensionReposDialog.vue} +72 -42
  76. package/dialog/AssignToDialog.vue +176 -0
  77. package/dialog/ChangePasswordDialog.vue +106 -0
  78. package/{pages/c/_cluster/uiplugins/DeveloperInstallDialog.vue → dialog/DeveloperLoadExtensionDialog.vue} +74 -71
  79. package/dialog/DisableAuthProviderDialog.vue +101 -0
  80. package/dialog/DrainNode.vue +1 -1
  81. package/{pages/c/_cluster/uiplugins/CatalogList/CatalogLoadDialog.vue → dialog/ExtensionCatalogInstallDialog.vue} +100 -88
  82. package/{pages/c/_cluster/uiplugins/CatalogList/CatalogUninstallDialog.vue → dialog/ExtensionCatalogUninstallDialog.vue} +69 -57
  83. package/dialog/FeatureFlagListDialog.vue +288 -0
  84. package/dialog/ForceMachineRemoveDialog.vue +1 -1
  85. package/{components/Import.vue → dialog/ImportDialog.vue} +0 -5
  86. package/{pages/c/_cluster/uiplugins/InstallDialog.vue → dialog/InstallExtensionDialog.vue} +124 -106
  87. package/{components/form/SSHKnownHosts → dialog}/KnownHostsEditDialog.vue +52 -62
  88. package/dialog/MoveNamespaceDialog.vue +157 -0
  89. package/dialog/ScalePoolDownDialog.vue +1 -1
  90. package/{components/nav/Jump.vue → dialog/SearchDialog.vue} +34 -14
  91. package/{pages/c/_cluster/uiplugins/UninstallDialog.vue → dialog/UninstallExtensionDialog.vue} +67 -58
  92. package/dialog/WechatDialog.vue +57 -0
  93. package/edit/auth/azuread.vue +1 -1
  94. package/edit/auth/github.vue +1 -1
  95. package/edit/auth/googleoauth.vue +1 -1
  96. package/edit/auth/ldap/index.vue +1 -1
  97. package/edit/auth/oidc.vue +1 -1
  98. package/edit/auth/saml.vue +1 -1
  99. package/edit/cloudcredential.vue +24 -10
  100. package/edit/management.cattle.io.user.vue +28 -3
  101. package/edit/namespace.vue +1 -4
  102. package/edit/provisioning.cattle.io.cluster/CustomCommand.vue +4 -1
  103. package/edit/provisioning.cattle.io.cluster/SelectCredential.vue +26 -10
  104. package/edit/provisioning.cattle.io.cluster/__tests__/Advanced.test.ts +8 -8
  105. package/edit/provisioning.cattle.io.cluster/__tests__/DirectoryConfig.test.ts +26 -12
  106. package/edit/provisioning.cattle.io.cluster/__tests__/rke2.test.ts +66 -0
  107. package/edit/provisioning.cattle.io.cluster/__tests__/utils/rke2-test-data.ts +58 -0
  108. package/edit/provisioning.cattle.io.cluster/rke2.vue +24 -7
  109. package/edit/provisioning.cattle.io.cluster/tabs/DirectoryConfig.vue +5 -3
  110. package/edit/provisioning.cattle.io.cluster/tabs/MachinePool.vue +4 -1
  111. package/initialize/install-plugins.js +2 -1
  112. package/list/harvesterhci.io.management.cluster.vue +4 -1
  113. package/list/management.cattle.io.feature.vue +4 -288
  114. package/machine-config/azure.vue +16 -4
  115. package/mixins/vue-select-overrides.js +0 -4
  116. package/models/fleet.cattle.io.cluster.js +8 -2
  117. package/models/fleet.cattle.io.gitrepo.js +8 -34
  118. package/models/management.cattle.io.feature.js +7 -1
  119. package/models/namespace.js +7 -1
  120. package/package.json +1 -1
  121. package/pages/about.vue +13 -3
  122. package/pages/account/index.vue +12 -5
  123. package/pages/auth/login.vue +7 -4
  124. package/pages/auth/setup.vue +1 -0
  125. package/pages/auth/verify.vue +9 -7
  126. package/pages/c/_cluster/apps/charts/install.vue +26 -26
  127. package/pages/c/_cluster/auth/config/index.vue +10 -12
  128. package/pages/c/_cluster/explorer/EventsTable.vue +38 -33
  129. package/pages/c/_cluster/explorer/index.vue +17 -15
  130. package/pages/c/_cluster/istio/index.vue +2 -2
  131. package/pages/c/_cluster/longhorn/index.vue +1 -1
  132. package/pages/c/_cluster/monitoring/index.vue +1 -1
  133. package/pages/c/_cluster/monitoring/monitor/_namespace/_id.vue +4 -2
  134. package/pages/c/_cluster/monitoring/monitor/create.vue +4 -2
  135. package/pages/c/_cluster/monitoring/route-receiver/_id.vue +4 -2
  136. package/pages/c/_cluster/monitoring/route-receiver/create.vue +5 -2
  137. package/pages/c/_cluster/neuvector/index.vue +1 -1
  138. package/pages/c/_cluster/settings/banners.vue +4 -3
  139. package/pages/c/_cluster/uiplugins/CatalogList/index.vue +8 -10
  140. package/pages/c/_cluster/uiplugins/__tests__/AddExtensionRepos.test.ts +4 -7
  141. package/pages/c/_cluster/uiplugins/index.vue +98 -55
  142. package/pages/diagnostic.vue +12 -9
  143. package/pages/fail-whale.vue +8 -5
  144. package/pages/prefs.vue +7 -6
  145. package/plugins/internal-api/index.ts +37 -0
  146. package/plugins/internal-api/shared/base-api.ts +13 -0
  147. package/plugins/internal-api/shell/shell.api.ts +108 -0
  148. package/plugins/steve/actions.js +0 -12
  149. package/public/index.html +1 -0
  150. package/rancher-components/Card/Card.vue +1 -1
  151. package/rancher-components/Form/Checkbox/Checkbox.test.ts +59 -1
  152. package/rancher-components/Form/Checkbox/Checkbox.vue +27 -3
  153. package/rancher-components/Form/LabeledInput/LabeledInput.test.ts +47 -0
  154. package/rancher-components/Form/LabeledInput/LabeledInput.vue +20 -2
  155. package/rancher-components/Form/Radio/RadioButton.test.ts +36 -1
  156. package/rancher-components/Form/Radio/RadioButton.vue +20 -4
  157. package/rancher-components/Form/Radio/RadioGroup.test.ts +60 -0
  158. package/rancher-components/Form/Radio/RadioGroup.vue +75 -35
  159. package/rancher-components/Form/ToggleSwitch/ToggleSwitch.test.ts +17 -0
  160. package/rancher-components/Form/ToggleSwitch/ToggleSwitch.vue +5 -0
  161. package/rancher-components/LabeledTooltip/LabeledTooltip.vue +10 -1
  162. package/rancher-components/RcButton/RcButton.vue +2 -1
  163. package/rancher-components/RcButton/types.ts +1 -0
  164. package/rancher-components/RcDropdown/RcDropdown.vue +17 -6
  165. package/rancher-components/RcDropdown/RcDropdownItem.vue +3 -56
  166. package/rancher-components/RcDropdown/RcDropdownItemCheckbox.vue +68 -0
  167. package/rancher-components/RcDropdown/RcDropdownItemSelect.vue +92 -0
  168. package/rancher-components/RcDropdown/index.ts +2 -0
  169. package/rancher-components/RcDropdown/useDropdownItem.ts +63 -0
  170. package/scripts/extension/bundle +20 -0
  171. package/scripts/extension/helm/charts/ui-plugin-server/templates/cr.yaml +2 -1
  172. package/scripts/extension/helm/charts/ui-plugin-server/values.yaml +2 -0
  173. package/scripts/extension/helmpatch +44 -31
  174. package/scripts/extension/publish +12 -13
  175. package/scripts/typegen.sh +2 -4
  176. package/store/action-menu.js +26 -56
  177. package/store/index.js +5 -0
  178. package/store/modal.ts +71 -0
  179. package/store/slideInPanel.ts +47 -0
  180. package/store/type-map.js +8 -1
  181. package/store/type-map.utils.ts +4 -4
  182. package/types/global-vue.d.ts +5 -0
  183. package/types/internal-api/shell/growl.d.ts +25 -0
  184. package/types/internal-api/shell/modal.d.ts +77 -0
  185. package/types/internal-api/shell/slideIn.d.ts +15 -0
  186. package/types/resources/fleet.d.ts +0 -14
  187. package/types/shell/index.d.ts +35 -23
  188. package/types/vue-shim.d.ts +4 -1
  189. package/utils/__mocks__/tabbable.js +13 -0
  190. package/utils/__tests__/object.test.ts +38 -4
  191. package/utils/fleet.ts +15 -73
  192. package/utils/object.js +48 -5
  193. package/utils/validators/formRules/__tests__/index.test.ts +10 -1
  194. package/utils/validators/formRules/index.ts +27 -3
  195. package/components/AssignTo.vue +0 -199
  196. package/components/DisableAuthProviderModal.vue +0 -115
  197. package/components/MoveModal.vue +0 -167
  198. package/components/PromptChangePassword.vue +0 -123
  199. package/components/fleet/FleetBundleResources.vue +0 -86
  200. package/types/vue-shim.d +0 -20
@@ -1,167 +0,0 @@
1
- <script>
2
- import { mapState, mapGetters } from 'vuex';
3
- import { Card } from '@components/Card';
4
- import AsyncButton from '@shell/components/AsyncButton';
5
- import AppModal from '@shell/components/AppModal.vue';
6
- import LabeledSelect from '@shell/components/form/LabeledSelect';
7
- import { MANAGEMENT } from '@shell/config/types';
8
- import Loading from '@shell/components/Loading';
9
- import { PROJECT } from '@shell/config/labels-annotations';
10
-
11
- export default {
12
- emits: ['moving'],
13
-
14
- components: {
15
- AsyncButton, Card, LabeledSelect, Loading, AppModal
16
- },
17
-
18
- async fetch() {
19
- this.projects = await this.$store.dispatch('management/findAll', { type: MANAGEMENT.PROJECT });
20
- },
21
-
22
- data() {
23
- return {
24
- modalName: 'move-modal', projects: [], targetProject: null, showModal: false
25
- };
26
- },
27
-
28
- computed: {
29
- ...mapState('action-menu', ['showPromptMove', 'toMove']),
30
- ...mapGetters(['currentCluster']),
31
-
32
- excludedProjects() {
33
- return this.toMove.filter((namespace) => !!namespace.project).map((namespace) => namespace.project.shortId);
34
- },
35
-
36
- projectOptions() {
37
- return this.projects.reduce((inCluster, project) => {
38
- if (!this.excludedProjects.includes(project.shortId) && project.spec?.clusterName === this.currentCluster.id) {
39
- inCluster.push({
40
- value: project.shortId,
41
- label: project.nameDisplay
42
- });
43
- }
44
-
45
- return inCluster;
46
- }, []);
47
- }
48
- },
49
-
50
- watch: {
51
- showPromptMove(show) {
52
- if (show) {
53
- this.showModal = true;
54
- } else {
55
- this.showModal = false;
56
- }
57
- }
58
- },
59
-
60
- methods: {
61
- close() {
62
- this.$store.commit('action-menu/togglePromptMove');
63
- },
64
-
65
- async move(finish) {
66
- const cluster = this.$store.getters['currentCluster'];
67
- const clusterWithProjectId = `${ cluster.id }:${ this.targetProject }`;
68
-
69
- const promises = this.toMove.map((namespace) => {
70
- namespace.setLabel(PROJECT, this.targetProject);
71
- namespace.setAnnotation(PROJECT, clusterWithProjectId);
72
-
73
- return namespace.save();
74
- });
75
-
76
- try {
77
- this.$emit('moving');
78
- await Promise.all(promises);
79
- finish(true);
80
- this.targetProject = null;
81
- this.close();
82
- } catch (ex) {
83
- finish(false);
84
- }
85
- }
86
- }
87
- };
88
- </script>
89
- <template>
90
- <app-modal
91
- v-if="showModal"
92
- class="move-modal"
93
- :name="modalName"
94
- :width="440"
95
- height="auto"
96
- :trigger-focus-trap="true"
97
- @close="close"
98
- >
99
- <Loading v-if="$fetchState.pending" />
100
- <Card
101
- v-else
102
- class="move-modal-card"
103
- :show-highlight-border="false"
104
- >
105
- <template #title>
106
- <h4 class="text-default-text">
107
- {{ t('moveModal.title') }}
108
- </h4>
109
- </template>
110
- <template #body>
111
- <div>
112
- {{ t('moveModal.description') }}
113
- <ul class="namespaces">
114
- <li
115
- v-for="(namespace, i) in toMove"
116
- :key="i"
117
- >
118
- {{ namespace.nameDisplay }}
119
- </li>
120
- </ul>
121
- </div>
122
- <LabeledSelect
123
- v-model:value="targetProject"
124
- :options="projectOptions"
125
- :label="t('moveModal.targetProject')"
126
- />
127
- </template>
128
- <template #actions>
129
- <button
130
- class="btn role-secondary"
131
- @click="close"
132
- >
133
- {{ t('generic.cancel') }}
134
- </button>
135
- <AsyncButton
136
- :action-label="t('moveModal.moveButtonLabel')"
137
- class="btn bg-primary ml-10"
138
- :disabled="!targetProject"
139
- @click="move"
140
- />
141
- </template>
142
- </Card>
143
- </app-modal>
144
- </template>
145
-
146
- <style lang='scss'>
147
- .move-modal {
148
- .namespaces {
149
- max-height: 200px;
150
- overflow-y: scroll;
151
- }
152
-
153
- .move-modal-card {
154
- box-shadow: none;
155
-
156
- border-radius: var(--border-radius);
157
- }
158
-
159
- .actions {
160
- text-align: right;
161
- }
162
- .card-actions {
163
- display: flex;
164
- justify-content: center;
165
- }
166
- }
167
- </style>
@@ -1,123 +0,0 @@
1
- <script>
2
- import { mapGetters } from 'vuex';
3
- import ChangePassword from '@shell/components/form/ChangePassword';
4
- import { Card } from '@components/Card';
5
- import AsyncButton from '@shell/components/AsyncButton';
6
- import AppModal from '@shell/components/AppModal.vue';
7
-
8
- export default {
9
- components: {
10
- Card, AsyncButton, ChangePassword, AppModal
11
- },
12
- data() {
13
- return {
14
- valid: false, password: '', showModal: false
15
- };
16
- },
17
- computed: { ...mapGetters({ t: 'i18n/t' }) },
18
- methods: {
19
- show(show) {
20
- if (show) {
21
- this.showModal = true;
22
- } else {
23
- this.showModal = false;
24
- }
25
- },
26
- async submit(buttonCb) {
27
- try {
28
- await this.$refs.changePassword.save();
29
- this.show(false);
30
- buttonCb(true);
31
- } catch (err) {
32
- buttonCb(false);
33
- }
34
- }
35
- },
36
- };
37
- </script>
38
-
39
- <template>
40
- <app-modal
41
- v-if="showModal"
42
- custom-class="change-password-modal"
43
- data-testid="change-password__modal"
44
- name="password-modal"
45
- :width="500"
46
- :height="465"
47
- :trigger-focus-trap="true"
48
- @close="show(false)"
49
- >
50
- <Card
51
- class="prompt-password"
52
- :show-highlight-border="false"
53
- >
54
- <template #title>
55
- <h4 class="text-default-text">
56
- {{ t("changePassword.title") }}
57
- </h4>
58
- </template>
59
-
60
- <template #body>
61
- <form @submit.prevent>
62
- <ChangePassword
63
- ref="changePassword"
64
- @valid="valid = $event"
65
- />
66
- </form>
67
- </template>
68
-
69
- <template #actions>
70
- <!-- type reset is required by lastpass -->
71
- <button
72
- class="btn role-secondary"
73
- role="button"
74
- :aria-label="t('changePassword.cancel')"
75
- type="reset"
76
- @click="show(false)"
77
- >
78
- {{ t("changePassword.cancel") }}
79
- </button>
80
- <AsyncButton
81
- type="submit"
82
- mode="apply"
83
- class="btn bg-error ml-10"
84
- :disabled="!valid"
85
- value="LOGIN"
86
- @click="submit"
87
- />
88
- </template>
89
- </Card>
90
- </app-modal>
91
- </template>
92
-
93
- <style lang="scss" scoped>
94
- .prompt-password {
95
- :deep() .card-wrap {
96
- display: flex;
97
- flex-direction: column;
98
-
99
- .card-body {
100
- flex: 1;
101
- justify-content: start;
102
- & > div {
103
- flex: 1;
104
- display: flex;
105
- }
106
- }
107
-
108
- .card-actions {
109
- display: flex;
110
- justify-content: flex-end;
111
- width: 100%;
112
- }
113
- }
114
- }
115
-
116
- .prompt-password {
117
- flex: 1;
118
- display: flex;
119
- form {
120
- flex: 1;
121
- }
122
- }
123
- </style>
@@ -1,86 +0,0 @@
1
- <script>
2
- import { colorForState, stateDisplay, stateSort } from '@shell/plugins/dashboard-store/resource-class';
3
- import SortableTable from '@shell/components/SortableTable';
4
- import { randomStr } from '@shell/utils/string';
5
-
6
- export default {
7
- name: 'FleetBundleResources',
8
-
9
- components: { SortableTable },
10
-
11
- props: {
12
- value: {
13
- type: Array,
14
- default: () => [],
15
- }
16
- },
17
-
18
- computed: {
19
- computedResources() {
20
- return this.value.map((item) => {
21
- const { state } = item;
22
- const color = colorForState(state).replace('text-', 'bg-');
23
- const display = stateDisplay(state);
24
-
25
- return {
26
- ...item,
27
- tableKey: randomStr(),
28
- stateBackground: color,
29
- stateDisplay: display,
30
- stateSort: stateSort(color, display),
31
- };
32
- });
33
- },
34
-
35
- resourceHeaders() {
36
- return [
37
- {
38
- name: 'state',
39
- value: 'state',
40
- label: 'State',
41
- sort: 'stateSort',
42
- formatter: 'BadgeStateFormatter',
43
- width: 100,
44
- },
45
- {
46
- name: 'apiVersion',
47
- value: 'apiVersion',
48
- sort: 'apiVersion',
49
- label: 'API Version',
50
- },
51
- {
52
- name: 'kind',
53
- value: 'kind',
54
- sort: 'kind',
55
- label: 'Kind',
56
- },
57
- {
58
- name: 'name',
59
- value: 'name',
60
- sort: 'name',
61
- label: 'Name',
62
- formatter: 'LinkDetail',
63
- },
64
- {
65
- name: 'namespace',
66
- value: 'namespace',
67
- sort: 'namespace',
68
- label: 'Namespace',
69
- },
70
- ];
71
- },
72
- }
73
- };
74
- </script>
75
-
76
- <template>
77
- <SortableTable
78
- :rows="computedResources"
79
- :headers="resourceHeaders"
80
- :table-actions="false"
81
- :row-actions="false"
82
- key-field="tableKey"
83
- default-sort-by="state"
84
- :paged="true"
85
- />
86
- </template>
package/types/vue-shim.d DELETED
@@ -1,20 +0,0 @@
1
- declare module '*.vue' {
2
- import Vue from 'vue';
3
- export default Vue;
4
- }
5
-
6
- // This is required to keep typescript from complaining. It is required for
7
- // our i18n plugin. For more info see:
8
- // https://v2.vuejs.org/v2/guide/typescript.html?redirect=true#Augmenting-Types-for-Use-with-Plugins
9
- declare module 'vue/types/vue' {
10
- // eslint-disable-next-line no-unused-vars
11
- interface Vue {
12
- /**
13
- * Lookup a given string with the given arguments
14
- * @param raw if set, do not do HTML escaping.
15
- */
16
- t: (key: string, args?: Record<string, any>, raw?: boolean) => string,
17
- }
18
- }
19
-
20
- declare module 'js-yaml';