@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.
Files changed (245) hide show
  1. package/assets/brand/suse/dark/rancher-logo.svg +1 -148
  2. package/assets/brand/suse/favicon.png +0 -0
  3. package/assets/brand/suse/rancher-logo.svg +1 -130
  4. package/assets/images/featured/img1.jpg +0 -0
  5. package/assets/images/featured.jpg +0 -0
  6. package/assets/images/generic-plugin.svg +1 -0
  7. package/assets/styles/themes/_dark.scss +3 -0
  8. package/assets/styles/themes/_light.scss +3 -0
  9. package/assets/styles/themes/_suse.scss +1 -1
  10. package/assets/translations/en-us.yaml +219 -47
  11. package/assets/translations/zh-hans.yaml +21 -24
  12. package/components/AsyncButton.vue +17 -2
  13. package/components/ButtonDropdown.vue +4 -0
  14. package/components/Carousel.vue +291 -0
  15. package/components/CommunityLinks.vue +64 -22
  16. package/components/CruResource.vue +11 -3
  17. package/components/Dialog.vue +102 -0
  18. package/components/ExplorerMembers.vue +2 -4
  19. package/components/ExplorerProjectsNamespaces.vue +25 -9
  20. package/components/IconMessage.vue +9 -1
  21. package/components/LazyImage.vue +21 -8
  22. package/components/LocaleSelector.vue +62 -29
  23. package/components/PromptRemove.vue +2 -2
  24. package/components/ResourceList/Masthead.vue +21 -1
  25. package/components/ResourceList/ResourceLoadingIndicator.vue +0 -8
  26. package/components/ResourceList/index.vue +9 -23
  27. package/components/ResourceTable.vue +7 -2
  28. package/components/SimpleBox.vue +6 -4
  29. package/components/SortableTable/index.vue +18 -25
  30. package/components/Tabbed/Tab.vue +5 -0
  31. package/components/Tabbed/index.vue +54 -9
  32. package/components/TypeDescription.vue +10 -1
  33. package/components/auth/Principal.vue +1 -0
  34. package/components/fleet/FleetBundles.vue +8 -3
  35. package/components/fleet/FleetClusters.vue +6 -0
  36. package/components/fleet/FleetRepos.vue +7 -1
  37. package/components/fleet/FleetSummary.vue +6 -0
  38. package/components/form/Command.vue +5 -0
  39. package/components/form/EnvVars.vue +5 -0
  40. package/components/form/KeyValue.vue +80 -58
  41. package/components/form/NameNsDescription.vue +13 -5
  42. package/components/form/NodeScheduling.vue +6 -1
  43. package/components/form/PodAffinity.vue +5 -0
  44. package/components/form/ResourceTabs/index.vue +5 -1
  45. package/components/form/ServiceNameSelect.vue +5 -0
  46. package/components/form/ValueFromResource.vue +7 -1
  47. package/components/formatter/ClusterLink.vue +3 -7
  48. package/components/nav/NamespaceFilter.vue +3 -3
  49. package/components/nav/TopLevelMenu.vue +12 -29
  50. package/config/home-links.js +155 -0
  51. package/config/labels-annotations.js +2 -1
  52. package/config/private-label.js +1 -1
  53. package/config/product/explorer.js +5 -4
  54. package/config/product/legacy.js +0 -47
  55. package/config/product/manager.js +0 -2
  56. package/config/product/multi-cluster-apps.js +0 -12
  57. package/config/product/settings.js +12 -1
  58. package/config/product/uiplugins.js +17 -0
  59. package/config/settings.js +23 -2
  60. package/config/types.js +5 -1
  61. package/config/uiplugins.js +117 -0
  62. package/config/version.js +17 -0
  63. package/content/docs/en-us/getting-started.md +1 -26
  64. package/core/plugin.ts +12 -0
  65. package/core/plugins.js +38 -2
  66. package/core/types.ts +6 -0
  67. package/creators/app/{.eslintignore → files/.eslintignore} +0 -0
  68. package/creators/app/{.eslintrc.js → files/.eslintrc.js} +0 -0
  69. package/creators/app/{.vscode → files/.vscode}/settings.json +0 -0
  70. package/creators/app/{babel.config.js → files/babel.config.js} +0 -0
  71. package/creators/app/{nuxt.config.js → files/nuxt.config.js} +0 -0
  72. package/creators/app/{tsconfig.json → files/tsconfig.json} +2 -1
  73. package/creators/app/init +16 -17
  74. package/creators/app/package.json +6 -0
  75. package/creators/pkg/{babel.config.js → files/babel.config.js} +0 -0
  76. package/creators/pkg/{index.ts → files/index.ts} +0 -0
  77. package/creators/pkg/{tsconfig.json → files/tsconfig.json} +13 -12
  78. package/creators/pkg/{vue.config.js → files/vue.config.js} +0 -0
  79. package/creators/pkg/init +1 -1
  80. package/creators/update/init +54 -0
  81. package/creators/update/package.json +20 -0
  82. package/creators/update/upgrade +56 -0
  83. package/creators/update/yarn-error.log +54 -0
  84. package/detail/provisioning.cattle.io.cluster.vue +3 -3
  85. package/detail/workload/index.vue +3 -2
  86. package/dialog/DiagnosticTimingsDialog.vue +116 -0
  87. package/dialog/RotateCertificatesDialog.vue +9 -3
  88. package/edit/auth/azuread.vue +28 -9
  89. package/edit/networking.k8s.io.ingress/index.vue +2 -2
  90. package/edit/persistentvolume/index.vue +51 -13
  91. package/edit/persistentvolumeclaim.vue +31 -13
  92. package/edit/pod.vue +27 -0
  93. package/edit/provisioning.cattle.io.cluster/rke2.vue +103 -24
  94. package/edit/service.vue +7 -5
  95. package/edit/workload/__tests__/Upgrading.test.ts +1 -0
  96. package/edit/workload/index.vue +32 -10
  97. package/edit/workload/mixins/workload.js +121 -126
  98. package/edit/workload/storage/ContainerMountPaths.vue +240 -0
  99. package/edit/workload/storage/Mount.vue +1 -0
  100. package/edit/workload/storage/awsElasticBlockStore.vue +20 -1
  101. package/edit/workload/storage/azureDisk.vue +22 -2
  102. package/edit/workload/storage/azureFile.vue +20 -2
  103. package/edit/workload/storage/csi/index.vue +23 -1
  104. package/edit/workload/storage/gcePersistentDisk.vue +20 -2
  105. package/edit/workload/storage/index.vue +33 -65
  106. package/edit/workload/storage/persistentVolumeClaim/index.vue +5 -0
  107. package/edit/workload/storage/secret.vue +6 -1
  108. package/edit/workload/storage/vsphereVolume.vue +11 -1
  109. package/layouts/default.vue +14 -8
  110. package/layouts/home.vue +9 -4
  111. package/layouts/plain.vue +10 -5
  112. package/list/catalog.cattle.io.app.vue +10 -9
  113. package/list/catalog.cattle.io.clusterrepo.vue +6 -61
  114. package/list/cis.cattle.io.clusterscan.vue +12 -12
  115. package/list/fleet.cattle.io.bundle.vue +33 -28
  116. package/list/fleet.cattle.io.cluster.vue +26 -22
  117. package/list/fleet.cattle.io.clustergroup.vue +6 -0
  118. package/list/fleet.cattle.io.clusterregistrationtoken.vue +28 -24
  119. package/list/fleet.cattle.io.gitrepo.vue +25 -14
  120. package/list/helm.cattle.io.projecthelmchart.vue +52 -33
  121. package/list/logging.banzaicloud.io.clusterflow.vue +7 -12
  122. package/list/logging.banzaicloud.io.flow.vue +7 -14
  123. package/list/management.cattle.io.cluster.vue +26 -15
  124. package/list/management.cattle.io.feature.vue +13 -8
  125. package/list/management.cattle.io.setting.vue +3 -3
  126. package/list/management.cattle.io.user.vue +38 -19
  127. package/list/monitoring.coreos.com.alertmanagerconfig.vue +8 -15
  128. package/list/namespace.vue +14 -1
  129. package/list/node.vue +13 -16
  130. package/list/persistentvolume.vue +16 -9
  131. package/list/persistentvolumeclaim.vue +5 -8
  132. package/list/provisioning.cattle.io.cluster.vue +35 -9
  133. package/list/service.vue +24 -12
  134. package/list/ui.cattle.io.navlink.vue +6 -0
  135. package/list/workload.vue +2 -2
  136. package/machine-config/harvester.vue +5 -3
  137. package/middleware/authenticated.js +6 -0
  138. package/mixins/resource-fetch.js +12 -18
  139. package/mixins/resource-manager.js +126 -0
  140. package/models/catalog.cattle.io.uiplugin.js +38 -0
  141. package/models/cluster/node.js +25 -2
  142. package/models/fleet.cattle.io.bundle.js +1 -1
  143. package/models/harvesterhci.io.management.cluster.js +11 -5
  144. package/models/pod.js +15 -5
  145. package/models/provisioning.cattle.io.cluster.js +16 -6
  146. package/models/workload.js +5 -3
  147. package/models/workload.service.js +10 -0
  148. package/nuxt.config.js +70 -25
  149. package/package.json +108 -109
  150. package/pages/auth/login.vue +11 -1
  151. package/pages/auth/verify.vue +9 -0
  152. package/pages/c/_cluster/apps/charts/index.vue +46 -1
  153. package/pages/c/_cluster/apps/charts/install.vue +10 -9
  154. package/pages/c/_cluster/explorer/index.vue +72 -9
  155. package/pages/c/_cluster/explorer/tools/index.vue +12 -5
  156. package/pages/c/_cluster/mcapps/index.vue +1 -1
  157. package/pages/c/_cluster/settings/DefaultLinksEditor.vue +108 -0
  158. package/pages/c/_cluster/settings/brand.vue +0 -40
  159. package/pages/c/_cluster/settings/links.vue +152 -0
  160. package/pages/c/_cluster/settings/performance.vue +90 -7
  161. package/pages/c/_cluster/uiplugins/DeveloperInstallDialog.vue +232 -0
  162. package/pages/c/_cluster/uiplugins/InstallDialog.vue +293 -0
  163. package/pages/c/_cluster/uiplugins/PluginInfoPanel.vue +300 -0
  164. package/pages/c/_cluster/uiplugins/RemoveUIPlugins.vue +125 -0
  165. package/pages/c/_cluster/uiplugins/SetupUIPlugins.vue +261 -0
  166. package/pages/c/_cluster/uiplugins/UninstallDialog.vue +122 -0
  167. package/pages/c/_cluster/uiplugins/index.vue +808 -0
  168. package/pages/diagnostic.vue +185 -101
  169. package/pages/docs/_doc.vue +3 -1
  170. package/pages/home.vue +21 -56
  171. package/pages/prefs.vue +108 -88
  172. package/pages/safeMode.vue +17 -0
  173. package/pages/support/index.vue +34 -137
  174. package/pkg/dynamic-importer.lib.js +4 -0
  175. package/plugins/dashboard-store/actions.js +19 -0
  176. package/plugins/dashboard-store/getters.js +20 -3
  177. package/plugins/dashboard-store/mutations.js +13 -7
  178. package/plugins/dashboard-store/resource-class.js +2 -2
  179. package/plugins/formatters.js +15 -0
  180. package/plugins/plugin.js +61 -6
  181. package/plugins/steve/getters.js +12 -0
  182. package/plugins/steve/mutations.js +1 -1
  183. package/plugins/steve/subscribe.js +94 -72
  184. package/plugins/steve/web-worker.steve-sub-worker.js +24 -15
  185. package/plugins/version.js +21 -0
  186. package/promptRemove/management.cattle.io.globalrole.vue +47 -0
  187. package/promptRemove/management.cattle.io.roletemplate.vue +47 -0
  188. package/promptRemove/mixin/roleDeletionCheck.js +97 -0
  189. package/rancher-components/Form/TextArea/TextAreaAutoGrow.vue +6 -7
  190. package/rancher-components/components/BadgeState/BadgeState.spec.ts +12 -0
  191. package/rancher-components/components/BadgeState/BadgeState.vue +107 -0
  192. package/rancher-components/components/BadgeState/index.ts +1 -0
  193. package/rancher-components/components/Banner/Banner.test.ts +13 -0
  194. package/rancher-components/components/Banner/Banner.vue +163 -0
  195. package/rancher-components/components/Banner/index.ts +1 -0
  196. package/rancher-components/components/Card/Card.vue +150 -0
  197. package/rancher-components/components/Card/index.ts +1 -0
  198. package/rancher-components/components/Form/Checkbox/Checkbox.test.ts +77 -0
  199. package/rancher-components/components/Form/Checkbox/Checkbox.vue +395 -0
  200. package/rancher-components/components/Form/Checkbox/index.ts +1 -0
  201. package/rancher-components/components/Form/LabeledInput/LabeledInput.test.ts +29 -0
  202. package/rancher-components/components/Form/LabeledInput/LabeledInput.vue +343 -0
  203. package/rancher-components/components/Form/LabeledInput/index.ts +1 -0
  204. package/rancher-components/components/Form/Radio/RadioButton.vue +270 -0
  205. package/rancher-components/components/Form/Radio/RadioGroup.vue +235 -0
  206. package/rancher-components/components/Form/Radio/index.ts +2 -0
  207. package/rancher-components/components/Form/TextArea/TextAreaAutoGrow.vue +168 -0
  208. package/rancher-components/components/Form/TextArea/index.ts +1 -0
  209. package/rancher-components/components/Form/ToggleSwitch/ToggleSwitch.test.ts +107 -0
  210. package/rancher-components/components/Form/ToggleSwitch/ToggleSwitch.vue +137 -0
  211. package/rancher-components/components/Form/ToggleSwitch/index.ts +1 -0
  212. package/rancher-components/components/Form/index.ts +5 -0
  213. package/rancher-components/components/LabeledTooltip/LabeledTooltip.vue +137 -0
  214. package/rancher-components/components/LabeledTooltip/index.ts +1 -0
  215. package/scripts/publish-shell.sh +40 -7
  216. package/scripts/record-deps.js +37 -0
  217. package/scripts/sync-shell-deps +37 -0
  218. package/scripts/test-plugins-build.sh +8 -5
  219. package/scripts/typegen.sh +84 -0
  220. package/store/auth.js +3 -0
  221. package/store/catalog.js +9 -8
  222. package/store/i18n.js +10 -1
  223. package/store/index.js +12 -3
  224. package/store/prefs.js +16 -0
  225. package/store/type-map.js +32 -5
  226. package/store/uiplugins.ts +15 -61
  227. package/types/shell/index.d.ts +3046 -0
  228. package/utils/__tests__/object.test.ts +0 -24
  229. package/utils/__tests__/selector.test.ts +1 -1
  230. package/utils/dynamic-importer.js +4 -0
  231. package/utils/favicon.js +8 -2
  232. package/utils/gc/gc-interval.ts +40 -0
  233. package/utils/gc/gc-root-store.js +76 -0
  234. package/utils/gc/gc-route-changed.ts +44 -0
  235. package/utils/gc/gc-types.ts +21 -0
  236. package/utils/gc/gc.ts +282 -0
  237. package/utils/grafana.js +2 -6
  238. package/utils/socket.js +41 -20
  239. package/utils/string.js +1 -7
  240. package/utils/validators/formRules/__tests__/index.test.ts +108 -0
  241. package/utils/validators/formRules/index.ts +9 -1
  242. package/config/footer.js +0 -19
  243. package/creators/pkg/nuxt.config.js +0 -6
  244. package/pages/plugins.vue +0 -387
  245. package/server/verdaccio-middleware.js +0 -56
@@ -1,10 +1,13 @@
1
1
  <script>
2
+ import { mapGetters } from 'vuex';
2
3
  import { LabeledInput } from '@components/Form/LabeledInput';
3
4
  import { RadioGroup } from '@components/Form/Radio';
4
- import { mapGetters } from 'vuex';
5
+ import { Checkbox } from '@components/Form/Checkbox';
5
6
 
6
7
  export default {
7
- components: { LabeledInput, RadioGroup },
8
+ components: {
9
+ LabeledInput, RadioGroup, Checkbox
10
+ },
8
11
  props: {
9
12
  // volumeAttributes object
10
13
  value: {
@@ -31,6 +34,23 @@ export default {
31
34
 
32
35
  <template>
33
36
  <div>
37
+ <div class="row mb-10">
38
+ <div class="col span-6">
39
+ <LabeledInput
40
+ v-model="value.name"
41
+ :required="true"
42
+ :mode="mode"
43
+ :label="t('workload.storage.volumeName')"
44
+ />
45
+ </div>
46
+ <div class="col span-6">
47
+ <Checkbox
48
+ v-model="value.azureDisk.readOnly"
49
+ :mode="mode"
50
+ :label="t('workload.storage.readOnly')"
51
+ />
52
+ </div>
53
+ </div>
34
54
  <div class="row mb-10">
35
55
  <div class="col span-6">
36
56
  <LabeledInput
@@ -1,9 +1,10 @@
1
1
  <script>
2
- import { LabeledInput } from '@components/Form/LabeledInput';
3
2
  import { mapGetters } from 'vuex';
3
+ import { Checkbox } from '@components/Form/Checkbox';
4
+ import { LabeledInput } from '@components/Form/LabeledInput';
4
5
 
5
6
  export default {
6
- components: { LabeledInput },
7
+ components: { LabeledInput, Checkbox },
7
8
 
8
9
  props: {
9
10
  value: {
@@ -25,6 +26,23 @@ export default {
25
26
 
26
27
  <template>
27
28
  <div>
29
+ <div class="row mb-10">
30
+ <div class="col span-6">
31
+ <LabeledInput
32
+ v-model="value.name"
33
+ :required="true"
34
+ :mode="mode"
35
+ :label="t('workload.storage.volumeName')"
36
+ />
37
+ </div>
38
+ <div class="col span-6">
39
+ <Checkbox
40
+ v-model="value.azureFile.readOnly"
41
+ :mode="mode"
42
+ :label="t('workload.storage.readOnly')"
43
+ />
44
+ </div>
45
+ </div>
28
46
  <div class="row mb-10">
29
47
  <div class="col span-6">
30
48
  <LabeledInput
@@ -1,9 +1,14 @@
1
1
  <script>
2
2
  import LabeledSelect from '@shell/components/form/LabeledSelect';
3
+ import { Checkbox } from '@components/Form/Checkbox';
4
+ import { LabeledInput } from '@components/Form/LabeledInput';
5
+
3
6
  import { mapGetters } from 'vuex';
4
7
 
5
8
  export default {
6
- components: { LabeledSelect },
9
+ components: {
10
+ LabeledSelect, Checkbox, LabeledInput
11
+ },
7
12
 
8
13
  props: {
9
14
  podSpec: {
@@ -45,6 +50,23 @@ export default {
45
50
  <template>
46
51
  <div>
47
52
  <div>
53
+ <div class="row mb-10">
54
+ <div class="col span-6">
55
+ <LabeledInput
56
+ v-model="value.name"
57
+ :required="true"
58
+ :mode="mode"
59
+ :label="t('workload.storage.volumeName')"
60
+ />
61
+ </div>
62
+ <div class="col span-6">
63
+ <Checkbox
64
+ v-model="value.csi.readOnly"
65
+ :mode="mode"
66
+ :label="t('workload.storage.readOnly')"
67
+ />
68
+ </div>
69
+ </div>
48
70
  <div class="row mb-10">
49
71
  <div class="col span-6">
50
72
  <LabeledSelect
@@ -1,9 +1,10 @@
1
1
  <script>
2
- import { LabeledInput } from '@components/Form/LabeledInput';
3
2
  import { mapGetters } from 'vuex';
3
+ import { LabeledInput } from '@components/Form/LabeledInput';
4
+ import { Checkbox } from '@components/Form/Checkbox';
4
5
 
5
6
  export default {
6
- components: { LabeledInput },
7
+ components: { LabeledInput, Checkbox },
7
8
 
8
9
  props: {
9
10
  value: {
@@ -25,6 +26,23 @@ export default {
25
26
 
26
27
  <template>
27
28
  <div>
29
+ <div class="row mb-10">
30
+ <div class="col span-6">
31
+ <LabeledInput
32
+ v-model="value.name"
33
+ :required="true"
34
+ :mode="mode"
35
+ :label="t('workload.storage.volumeName')"
36
+ />
37
+ </div>
38
+ <div class="col span-6">
39
+ <Checkbox
40
+ v-model="value.gcePersistentDisk.readOnly"
41
+ :mode="mode"
42
+ :label="t('workload.storage.readOnly')"
43
+ />
44
+ </div>
45
+ </div>
28
46
  <div class="row mb-10">
29
47
  <div class="col span-6">
30
48
  <LabeledInput
@@ -1,6 +1,4 @@
1
1
  <script>
2
- import { PVC } from '@shell/config/types';
3
- import { removeObjects, addObjects } from '@shell/utils/array';
4
2
  import ButtonDropdown from '@shell/components/ButtonDropdown';
5
3
  import Mount from '@shell/edit/workload/storage/Mount';
6
4
  import { _VIEW } from '@shell/config/query-params';
@@ -33,13 +31,6 @@ export default {
33
31
  default: null,
34
32
  },
35
33
 
36
- container: {
37
- type: Object,
38
- default: () => {
39
- return {};
40
- },
41
- },
42
-
43
34
  savePvcHookName: {
44
35
  type: String,
45
36
  required: true,
@@ -55,28 +46,25 @@ export default {
55
46
  type: Array,
56
47
  default: () => [],
57
48
  },
49
+ namespacedPvcs: {
50
+ type: Array,
51
+ default: () => [],
52
+ },
58
53
 
59
54
  registerBeforeHook: {
60
55
  type: Function,
61
56
  default: null,
62
57
  },
63
- },
64
-
65
- async fetch() {
66
- if ( this.$store.getters['cluster/schemaFor'](PVC) ) {
67
- this.pvcs = await this.$store.dispatch('cluster/findAll', { type: PVC });
68
- } else {
69
- this.pvcs = [];
70
- }
58
+ loading: {
59
+ default: false,
60
+ type: Boolean
61
+ },
71
62
  },
72
63
 
73
64
  data() {
74
65
  this.initializeStorage();
75
66
 
76
- return {
77
- pvcs: [],
78
- storageVolumes: this.getStorageVolumes(),
79
- };
67
+ return {};
80
68
  },
81
69
 
82
70
  computed: {
@@ -84,17 +72,11 @@ export default {
84
72
  return this.mode === _VIEW;
85
73
  },
86
74
 
87
- namespacedPVCs() {
88
- const namespace = this.namespace || this.$store.getters['defaultNamespace'];
89
-
90
- return this.pvcs.filter(pvc => pvc.metadata.namespace === namespace);
91
- },
92
-
93
75
  /**
94
76
  * Generated list of volumes
95
77
  */
96
78
  volumeTypeOptions() {
97
- const excludedFiles = ['index', 'Mount', 'PVC'];
79
+ const excludedFiles = ['index', 'Mount', 'PVC', 'ContainerMountPaths'];
98
80
  const defaultVolumeTypes = [
99
81
  'csi',
100
82
  'configMap',
@@ -121,82 +103,67 @@ export default {
121
103
  },
122
104
 
123
105
  pvcNames() {
124
- return this.namespacedPVCs.map(pvc => pvc.metadata.name);
106
+ return this.namespacedPvcs.map(pvc => pvc.metadata.name);
125
107
  },
126
108
  },
127
109
 
128
- watch: {
129
- storageVolumes(neu, old) {
130
- removeObjects(this.value.volumes, old);
131
- addObjects(this.value.volumes, neu);
132
- const names = neu.reduce((all, each) => {
133
- all.push(each.name);
110
+ // watch: {
111
+ // storageVolumes(neu, old) {
112
+ // removeObjects(this.value.volumes, old);
113
+ // addObjects(this.value.volumes, neu);
114
+ // const names = neu.reduce((all, each) => {
115
+ // all.push(each.name);
134
116
 
135
- return all;
136
- }, []);
117
+ // return all;
118
+ // }, []);
137
119
 
138
- this.container.volumeMounts = this.container.volumeMounts.filter(mount => names.includes(mount.name));
139
- }
140
- },
120
+ // this.container.volumeMounts = this.container.volumeMounts.filter(mount => names.includes(mount.name));
121
+ // }
122
+ // },
141
123
 
142
124
  methods: {
143
125
  /**
144
126
  * Initialize missing values for the container
145
127
  */
146
128
  initializeStorage() {
147
- if (!this.container.volumeMounts) {
148
- this.$set(this.container, 'volumeMounts', []);
149
- }
150
129
  if (!this.value.volumes) {
151
130
  this.$set(this.value, 'volumes', []);
152
131
  }
153
132
  },
154
133
 
155
- /**
156
- * Get existing paired storage volumes
157
- */
158
- getStorageVolumes() {
159
- // Extract volume mounts to map storage volumes
160
- const { volumeMounts = [] } = this.container;
161
- const names = volumeMounts.map(({ name }) => name);
162
-
163
- // Extract storage volumes to allow mutation, if matches mount map
164
- return this.value.volumes.filter(volume => names.includes(volume.name));
165
- },
166
-
167
134
  /**
168
135
  * Remove all mounts for given storage volume
169
136
  */
170
137
  removeVolume(volume) {
171
138
  const removeName = volume.row.value.name;
172
139
 
173
- this.storageVolumes = this.storageVolumes.filter(({ name }) => name !== removeName);
140
+ this.value.volumes = this.value.volumes.filter(({ name }) => name !== removeName);
174
141
  },
175
142
 
176
143
  addVolume(type) {
177
144
  const name = `vol-${ randomStr(5).toLowerCase() }`;
178
145
 
179
146
  if (type === 'createPVC') {
180
- this.storageVolumes.push({
147
+ this.value.volumes.push({
181
148
  _type: 'createPVC',
182
149
  persistentVolumeClaim: {},
183
150
  name,
184
151
  });
185
152
  } else if (type === 'csi') {
186
- this.storageVolumes.push({
153
+ this.value.volumes.push({
187
154
  _type: type,
188
155
  csi: { volumeAttributes: {} },
189
156
  name,
190
157
  });
191
158
  } else {
192
- this.storageVolumes.push({
159
+ this.value.volumes.push({
193
160
  _type: type,
194
161
  [type]: {},
195
162
  name,
196
163
  });
197
164
  }
198
165
 
199
- this.container.volumeMounts.push({ name });
166
+ // this.container.volumeMounts.push({ name });
200
167
  },
201
168
 
202
169
  volumeType(vol) {
@@ -275,8 +242,8 @@ export default {
275
242
  <div>
276
243
  <!-- Storage Volumes -->
277
244
  <ArrayListGrouped
278
- :key="storageVolumes.length"
279
- v-model="storageVolumes"
245
+ :key="value.volumes.length"
246
+ v-model="value.volumes"
280
247
  :mode="mode"
281
248
  @remove="removeVolume"
282
249
  >
@@ -296,6 +263,7 @@ export default {
296
263
  :pvcs="pvcNames"
297
264
  :register-before-hook="registerBeforeHook"
298
265
  :save-pvc-hook-name="savePvcHookName"
266
+ :loading="loading"
299
267
  @removePvcForm="removePvcForm"
300
268
  />
301
269
  <div v-else-if="isView">
@@ -307,19 +275,19 @@ export default {
307
275
  </div>
308
276
  </div>
309
277
 
310
- <!-- Mount point list to be mapped to volume -->
278
+ <!-- Mount point list to be mapped to volume
311
279
  <Mount
312
280
  :container="container"
313
281
  :name="props.row.value.name"
314
282
  :mode="mode"
315
- />
283
+ /> -->
316
284
  </template>
317
285
 
318
286
  <!-- Add Storage Volume -->
319
287
  <template #add>
320
288
  <ButtonDropdown
321
289
  v-if="!isView"
322
- id="add-volume"
290
+ id="select-volume"
323
291
  :button-label="t('workload.storage.addVolume')"
324
292
  :dropdown-options="volumeTypeOptions"
325
293
  size="sm"
@@ -53,6 +53,10 @@ export default {
53
53
  type: String,
54
54
  required: true
55
55
  },
56
+ loading: {
57
+ default: false,
58
+ type: Boolean
59
+ },
56
60
  },
57
61
 
58
62
  async fetch() {
@@ -129,6 +133,7 @@ export default {
129
133
  :mode="mode"
130
134
  :label="t('workload.storage.subtypes.persistentVolumeClaim')"
131
135
  :options="pvcs"
136
+ :loading="loading"
132
137
  />
133
138
  </div>
134
139
  </div>
@@ -43,7 +43,10 @@ export default {
43
43
  return {};
44
44
  }
45
45
  },
46
-
46
+ loading: {
47
+ default: false,
48
+ type: Boolean
49
+ },
47
50
  },
48
51
 
49
52
  computed: {
@@ -154,6 +157,7 @@ export default {
154
157
  :mode="mode"
155
158
  :required="true"
156
159
  :label="t('workload.storage.subtypes.secret')"
160
+ :loading="loading"
157
161
  />
158
162
  <LabeledSelect
159
163
  v-else-if="type==='configMap'"
@@ -162,6 +166,7 @@ export default {
162
166
  :required="true"
163
167
  :mode="mode"
164
168
  :label="t('workload.storage.subtypes.configMap')"
169
+ :loading="loading"
165
170
  />
166
171
  </div>
167
172
  <div class="col span-6">
@@ -1,6 +1,6 @@
1
1
  <script>
2
- import { LabeledInput } from '@components/Form/LabeledInput';
3
2
  import { mapGetters } from 'vuex';
3
+ import { LabeledInput } from '@components/Form/LabeledInput';
4
4
 
5
5
  export default {
6
6
  components: { LabeledInput },
@@ -25,6 +25,16 @@ export default {
25
25
 
26
26
  <template>
27
27
  <div>
28
+ <div class="row mb-10">
29
+ <div class="col span-6">
30
+ <LabeledInput
31
+ v-model="value.name"
32
+ :required="true"
33
+ :mode="mode"
34
+ :label="t('workload.storage.volumeName')"
35
+ />
36
+ </div>
37
+ </div>
28
38
  <div class="row mb-10">
29
39
  <div class="col span-6">
30
40
  <LabeledInput
@@ -1,7 +1,12 @@
1
1
  <script>
2
2
  import debounce from 'lodash/debounce';
3
3
  import { mapState, mapGetters } from 'vuex';
4
- import { mapPref, DEV, FAVORITE_TYPES, AFTER_LOGIN_ROUTE } from '@shell/store/prefs';
4
+ import {
5
+ mapPref,
6
+ FAVORITE_TYPES,
7
+ AFTER_LOGIN_ROUTE,
8
+ THEME_SHORTCUT
9
+ } from '@shell/store/prefs';
5
10
  import ActionMenu from '@shell/components/ActionMenu';
6
11
  import GrowlManager from '@shell/components/GrowlManager';
7
12
  import WindowManager from '@shell/components/nav/WindowManager';
@@ -55,9 +60,10 @@ export default {
55
60
  // Note - This will not run on route change
56
61
  data() {
57
62
  return {
58
- groups: [],
59
- gettingGroups: false,
60
- wantNavSync: false,
63
+ noLocaleShortcut: process.env.dev || false,
64
+ groups: [],
65
+ gettingGroups: false,
66
+ wantNavSync: false,
61
67
  };
62
68
  },
63
69
 
@@ -78,8 +84,8 @@ export default {
78
84
  return this.$store.getters['activeNamespaceCache'];
79
85
  },
80
86
 
81
- dev: mapPref(DEV),
82
- favoriteTypes: mapPref(FAVORITE_TYPES),
87
+ themeShortcut: mapPref(THEME_SHORTCUT),
88
+ favoriteTypes: mapPref(FAVORITE_TYPES),
83
89
 
84
90
  pageActions() {
85
91
  const pageActions = [];
@@ -647,8 +653,8 @@ export default {
647
653
  <PromptRestore />
648
654
  <AssignTo />
649
655
  <PromptModal />
650
- <button v-if="dev" v-shortkey.once="['shift','l']" class="hide" @shortkey="toggleNoneLocale()" />
651
- <button v-if="dev" v-shortkey.once="['shift','t']" class="hide" @shortkey="toggleTheme()" />
656
+ <button v-if="noLocaleShortcut" v-shortkey.once="['shift','l']" class="hide" @shortkey="toggleNoneLocale()" />
657
+ <button v-if="themeShortcut" v-shortkey.once="['shift','t']" class="hide" @shortkey="toggleTheme()" />
652
658
  <button v-shortkey.once="['f8']" class="hide" @shortkey="wheresMyDebugger()" />
653
659
  <button v-shortkey.once="['`']" class="hide" @shortkey="toggleShell" />
654
660
  </main>
package/layouts/home.vue CHANGED
@@ -3,7 +3,7 @@ import Header from '@shell/components/nav/Header';
3
3
  import Brand from '@shell/mixins/brand';
4
4
  import FixedBanner from '@shell/components/FixedBanner';
5
5
  import GrowlManager from '@shell/components/GrowlManager';
6
- import { mapPref, DEV } from '@shell/store/prefs';
6
+ import { mapPref, THEME_SHORTCUT } from '@shell/store/prefs';
7
7
  import AwsComplianceBanner from '@shell/components/AwsComplianceBanner';
8
8
  import AzureWarning from '@shell/components/auth/AzureWarning';
9
9
  import BrowserTabVisibility from '@shell/mixins/browser-tab-visibility';
@@ -26,12 +26,13 @@ export default {
26
26
  data() {
27
27
  return {
28
28
  // Assume home pages have routes where the name is the key to use for string lookup
29
- name: this.$route.name
29
+ name: this.$route.name,
30
+ noLocaleShortcut: process.env.dev || false
30
31
  };
31
32
  },
32
33
 
33
34
  computed: {
34
- dev: mapPref(DEV),
35
+ themeShortcut: mapPref(THEME_SHORTCUT),
35
36
  ...mapState(['managementReady']),
36
37
  },
37
38
 
@@ -39,6 +40,9 @@ export default {
39
40
  toggleTheme() {
40
41
  this.$store.dispatch('prefs/toggleTheme');
41
42
  },
43
+ toggleNoneLocale() {
44
+ this.$store.dispatch('i18n/toggleNone');
45
+ },
42
46
  }
43
47
 
44
48
  };
@@ -59,7 +63,8 @@ export default {
59
63
  </div>
60
64
  <FixedBanner :footer="true" />
61
65
  <GrowlManager />
62
- <button v-if="dev" v-shortkey.once="['shift','t']" class="hide" @shortkey="toggleTheme()" />
66
+ <button v-if="themeShortcut" v-shortkey.once="['shift','t']" class="hide" @shortkey="toggleTheme()" />
67
+ <button v-if="noLocaleShortcut" v-shortkey.once="['shift','l']" class="hide" @shortkey="toggleNoneLocale()" />
63
68
  </div>
64
69
  </template>
65
70
 
package/layouts/plain.vue CHANGED
@@ -1,5 +1,5 @@
1
1
  <script>
2
- import { mapPref, DEV } from '@shell/store/prefs';
2
+ import { mapPref, THEME_SHORTCUT } from '@shell/store/prefs';
3
3
  import ActionMenu from '@shell/components/ActionMenu';
4
4
  import Header from '@shell/components/nav/Header';
5
5
  import PromptRemove from '@shell/components/PromptRemove';
@@ -33,16 +33,20 @@ export default {
33
33
  data() {
34
34
  return {
35
35
  // Assume home pages have routes where the name is the key to use for string lookup
36
- name: this.$route.name,
36
+ name: this.$route.name,
37
+ noLocaleShortcut: process.env.dev || false,
37
38
  };
38
39
  },
39
40
 
40
- computed: { dev: mapPref(DEV) },
41
+ computed: { themeShortcut: mapPref(THEME_SHORTCUT) },
41
42
 
42
43
  methods: {
43
44
  toggleTheme() {
44
45
  this.$store.dispatch('prefs/toggleTheme');
45
- }
46
+ },
47
+ toggleNoneLocale() {
48
+ this.$store.dispatch('i18n/toggleNone');
49
+ },
46
50
  }
47
51
  };
48
52
  </script>
@@ -62,7 +66,8 @@ export default {
62
66
  <ActionMenu />
63
67
  <PromptRemove />
64
68
  <AssignTo />
65
- <button v-if="dev" v-shortkey.once="['shift','t']" class="hide" @shortkey="toggleTheme()" />
69
+ <button v-if="themeShortcut" v-shortkey.once="['shift','t']" class="hide" @shortkey="toggleTheme()" />
70
+ <button v-if="noLocaleShortcut" v-shortkey.once="['shift','l']" class="hide" @shortkey="toggleNoneLocale()" />
66
71
  </main>
67
72
  </div>
68
73
 
@@ -1,10 +1,11 @@
1
1
  <script>
2
2
  import ResourceTable from '@shell/components/ResourceTable';
3
- import Loading from '@shell/components/Loading';
3
+ import ResourceFetch from '@shell/mixins/resource-fetch';
4
4
 
5
5
  export default {
6
6
  name: 'ListApps',
7
- components: { Loading, ResourceTable },
7
+ components: { ResourceTable },
8
+ mixins: [ResourceFetch],
8
9
 
9
10
  props: {
10
11
  resource: {
@@ -21,18 +22,18 @@ export default {
21
22
  async fetch() {
22
23
  await this.$store.dispatch('catalog/load');
23
24
 
24
- this.rows = await this.$store.dispatch('cluster/findAll', { type: this.resource });
25
- },
26
-
27
- data() {
28
- return { rows: null };
25
+ await this.$fetchType(this.resource);
29
26
  },
30
27
  };
31
28
  </script>
32
29
 
33
30
  <template>
34
- <Loading v-if="$fetchState.pending" />
35
- <ResourceTable v-else class="apps" :schema="schema" :rows="rows">
31
+ <ResourceTable
32
+ class="apps"
33
+ :schema="schema"
34
+ :rows="rows"
35
+ :loading="loading"
36
+ >
36
37
  <template #cell:upgrade="{row}">
37
38
  <span v-if="row.upgradeAvailable" class="badge-state bg-warning hand" @click="row.goToUpgrade(row.upgradeAvailable)">
38
39
  {{ row.upgradeAvailable }}