@rancher/shell 0.1.4 → 0.2.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 (170) hide show
  1. package/assets/brand/suse/favicon.png +0 -0
  2. package/assets/images/generic-plugin.svg +1 -7
  3. package/assets/styles/global/_button.scss +1 -0
  4. package/assets/translations/en-us.yaml +129 -53
  5. package/assets/translations/zh-hans.yaml +18 -0
  6. package/components/CommunityLinks.vue +40 -49
  7. package/components/ExplorerProjectsNamespaces.vue +20 -3
  8. package/components/HarvesterServiceAddOnConfig.vue +10 -10
  9. package/components/LazyImage.vue +21 -8
  10. package/components/PromptRemove.vue +2 -2
  11. package/components/ResourceList/Masthead.vue +21 -1
  12. package/components/ResourceList/ResourceLoadingIndicator.vue +0 -8
  13. package/components/ResourceList/index.vue +42 -36
  14. package/components/ResourceTable.vue +19 -0
  15. package/components/SortableTable/THead.vue +311 -70
  16. package/components/SortableTable/advanced-filtering.js +272 -0
  17. package/components/SortableTable/filtering.js +90 -29
  18. package/components/SortableTable/index.vue +486 -280
  19. package/components/Tabbed/index.vue +25 -7
  20. package/components/TypeDescription.vue +10 -1
  21. package/components/fleet/FleetClusters.vue +6 -0
  22. package/components/fleet/FleetRepos.vue +7 -1
  23. package/components/form/Command.vue +5 -0
  24. package/components/form/EnvVars.vue +5 -0
  25. package/components/form/NameNsDescription.vue +3 -1
  26. package/components/form/NodeScheduling.vue +6 -1
  27. package/components/form/PodAffinity.vue +5 -0
  28. package/components/form/ServiceNameSelect.vue +5 -0
  29. package/components/form/ValueFromResource.vue +7 -1
  30. package/components/form/WorkloadPorts.vue +2 -2
  31. package/components/nav/TopLevelMenu.vue +2 -1
  32. package/config/home-links.js +155 -0
  33. package/config/private-label.js +1 -1
  34. package/config/product/manager.js +0 -2
  35. package/config/product/settings.js +1 -0
  36. package/config/product/uiplugins.js +2 -1
  37. package/config/settings.js +3 -1
  38. package/config/uiplugins.js +76 -6
  39. package/config/version.js +17 -0
  40. package/core/plugin.ts +12 -0
  41. package/core/plugins.js +29 -5
  42. package/core/types.ts +6 -0
  43. package/creators/app/{.eslintignore → files/.eslintignore} +0 -0
  44. package/creators/app/{.eslintrc.js → files/.eslintrc.js} +0 -0
  45. package/creators/app/{.vscode → files/.vscode}/settings.json +0 -0
  46. package/creators/app/{babel.config.js → files/babel.config.js} +0 -0
  47. package/creators/app/{nuxt.config.js → files/nuxt.config.js} +0 -0
  48. package/creators/app/{tsconfig.json → files/tsconfig.json} +2 -1
  49. package/creators/app/init +16 -17
  50. package/creators/app/package.json +7 -1
  51. package/creators/pkg/{babel.config.js → files/babel.config.js} +0 -0
  52. package/creators/pkg/{index.ts → files/index.ts} +0 -0
  53. package/creators/pkg/{tsconfig.json → files/tsconfig.json} +13 -12
  54. package/creators/pkg/{vue.config.js → files/vue.config.js} +0 -0
  55. package/creators/pkg/init +1 -1
  56. package/creators/pkg/package.json +1 -1
  57. package/creators/update/init +54 -0
  58. package/creators/update/package.json +20 -0
  59. package/creators/update/upgrade +56 -0
  60. package/creators/update/yarn-error.log +54 -0
  61. package/detail/provisioning.cattle.io.cluster.vue +1 -1
  62. package/detail/workload/index.vue +1 -0
  63. package/edit/persistentvolume/index.vue +48 -13
  64. package/edit/persistentvolumeclaim.vue +31 -13
  65. package/edit/provisioning.cattle.io.cluster/ACE.vue +2 -1
  66. package/edit/provisioning.cattle.io.cluster/DrainOptions.vue +0 -1
  67. package/edit/provisioning.cattle.io.cluster/rke2.vue +52 -43
  68. package/edit/service.vue +1 -1
  69. package/edit/workload/index.vue +19 -9
  70. package/edit/workload/mixins/workload.js +109 -114
  71. package/edit/workload/storage/index.vue +11 -17
  72. package/edit/workload/storage/persistentVolumeClaim/index.vue +5 -0
  73. package/edit/workload/storage/secret.vue +6 -1
  74. package/list/catalog.cattle.io.app.vue +10 -9
  75. package/list/catalog.cattle.io.clusterrepo.vue +6 -61
  76. package/list/cis.cattle.io.clusterscan.vue +12 -12
  77. package/list/fleet.cattle.io.bundle.vue +33 -28
  78. package/list/fleet.cattle.io.cluster.vue +26 -22
  79. package/list/fleet.cattle.io.clustergroup.vue +6 -0
  80. package/list/fleet.cattle.io.clusterregistrationtoken.vue +28 -24
  81. package/list/fleet.cattle.io.gitrepo.vue +25 -14
  82. package/list/helm.cattle.io.projecthelmchart.vue +52 -33
  83. package/list/logging.banzaicloud.io.clusterflow.vue +7 -12
  84. package/list/logging.banzaicloud.io.flow.vue +7 -14
  85. package/list/management.cattle.io.cluster.vue +26 -15
  86. package/list/management.cattle.io.feature.vue +13 -8
  87. package/list/management.cattle.io.user.vue +38 -19
  88. package/list/monitoring.coreos.com.alertmanagerconfig.vue +8 -15
  89. package/list/namespace.vue +14 -1
  90. package/list/node.vue +13 -16
  91. package/list/persistentvolume.vue +16 -9
  92. package/list/persistentvolumeclaim.vue +5 -8
  93. package/list/provisioning.cattle.io.cluster.vue +34 -8
  94. package/list/service.vue +24 -12
  95. package/list/ui.cattle.io.navlink.vue +6 -0
  96. package/list/workload.vue +2 -2
  97. package/middleware/authenticated.js +6 -0
  98. package/mixins/resource-fetch.js +12 -18
  99. package/mixins/resource-manager.js +126 -0
  100. package/models/catalog.cattle.io.uiplugin.js +4 -0
  101. package/models/management.cattle.io.cluster.js +9 -1
  102. package/models/pod.js +15 -5
  103. package/models/provisioning.cattle.io.cluster.js +4 -0
  104. package/models/workload.service.js +10 -0
  105. package/nuxt.config.js +2 -1
  106. package/package.json +1 -1
  107. package/pages/auth/login.vue +10 -0
  108. package/pages/auth/verify.vue +9 -0
  109. package/pages/c/_cluster/apps/charts/install.vue +119 -31
  110. package/pages/c/_cluster/settings/DefaultLinksEditor.vue +108 -0
  111. package/pages/c/_cluster/settings/links.vue +53 -101
  112. package/pages/c/_cluster/settings/performance.vue +90 -7
  113. package/pages/c/_cluster/uiplugins/DeveloperInstallDialog.vue +3 -3
  114. package/pages/c/_cluster/uiplugins/InstallDialog.vue +72 -21
  115. package/pages/c/_cluster/uiplugins/PluginInfoPanel.vue +26 -7
  116. package/pages/c/_cluster/uiplugins/RemoveUIPlugins.vue +2 -7
  117. package/pages/c/_cluster/uiplugins/SetupUIPlugins.vue +23 -15
  118. package/pages/c/_cluster/uiplugins/UninstallDialog.vue +12 -5
  119. package/pages/c/_cluster/uiplugins/index.vue +223 -72
  120. package/pages/support/index.vue +31 -142
  121. package/plugins/dashboard-store/actions.js +19 -0
  122. package/plugins/dashboard-store/getters.js +20 -3
  123. package/plugins/dashboard-store/mutations.js +13 -7
  124. package/plugins/plugin.js +18 -15
  125. package/plugins/steve/getters.js +12 -0
  126. package/plugins/version.js +21 -0
  127. package/promptRemove/mixin/roleDeletionCheck.js +15 -1
  128. package/rancher-components/Form/TextArea/TextAreaAutoGrow.vue +6 -7
  129. package/rancher-components/components/BadgeState/BadgeState.spec.ts +12 -0
  130. package/rancher-components/components/BadgeState/BadgeState.vue +107 -0
  131. package/rancher-components/components/BadgeState/index.ts +1 -0
  132. package/rancher-components/components/Banner/Banner.test.ts +13 -0
  133. package/rancher-components/components/Banner/Banner.vue +163 -0
  134. package/rancher-components/components/Banner/index.ts +1 -0
  135. package/rancher-components/components/Card/Card.vue +150 -0
  136. package/rancher-components/components/Card/index.ts +1 -0
  137. package/rancher-components/components/Form/Checkbox/Checkbox.test.ts +77 -0
  138. package/rancher-components/components/Form/Checkbox/Checkbox.vue +395 -0
  139. package/rancher-components/components/Form/Checkbox/index.ts +1 -0
  140. package/rancher-components/components/Form/LabeledInput/LabeledInput.test.ts +29 -0
  141. package/rancher-components/components/Form/LabeledInput/LabeledInput.vue +343 -0
  142. package/rancher-components/components/Form/LabeledInput/index.ts +1 -0
  143. package/rancher-components/components/Form/Radio/RadioButton.vue +270 -0
  144. package/rancher-components/components/Form/Radio/RadioGroup.vue +235 -0
  145. package/rancher-components/components/Form/Radio/index.ts +2 -0
  146. package/rancher-components/components/Form/TextArea/TextAreaAutoGrow.vue +168 -0
  147. package/rancher-components/components/Form/TextArea/index.ts +1 -0
  148. package/rancher-components/components/Form/ToggleSwitch/ToggleSwitch.test.ts +107 -0
  149. package/rancher-components/components/Form/ToggleSwitch/ToggleSwitch.vue +137 -0
  150. package/rancher-components/components/Form/ToggleSwitch/index.ts +1 -0
  151. package/rancher-components/components/Form/index.ts +5 -0
  152. package/rancher-components/components/LabeledTooltip/LabeledTooltip.vue +137 -0
  153. package/rancher-components/components/LabeledTooltip/index.ts +1 -0
  154. package/scripts/publish-shell.sh +39 -6
  155. package/scripts/record-deps.js +37 -0
  156. package/scripts/test-plugins-build.sh +8 -5
  157. package/scripts/typegen.sh +84 -0
  158. package/store/auth.js +3 -0
  159. package/store/index.js +12 -3
  160. package/store/type-map.js +2 -0
  161. package/types/shell/index.d.ts +3046 -0
  162. package/utils/favicon.js +8 -2
  163. package/utils/gc/gc-interval.ts +40 -0
  164. package/utils/gc/gc-root-store.js +76 -0
  165. package/utils/gc/gc-route-changed.ts +44 -0
  166. package/utils/gc/gc-types.ts +21 -0
  167. package/utils/gc/gc.ts +282 -0
  168. package/config/footer.js +0 -18
  169. package/creators/pkg/nuxt.config.js +0 -6
  170. package/yarn-error.log +0 -195
@@ -83,7 +83,7 @@ export default {
83
83
  <div class="plugin-info-panel">
84
84
  <div v-if="showSlideIn" class="glass" @click="hide()" />
85
85
  <div class="slideIn" :class="{'hide': false, 'slideIn__show': showSlideIn}">
86
- <div v-if="info">
86
+ <div v-if="info" class="plugin-info-content">
87
87
  <div class="plugin-header">
88
88
  <div class="plugin-icon">
89
89
  <LazyImage
@@ -116,11 +116,15 @@ export default {
116
116
  </div>
117
117
  </div>
118
118
  <div>
119
- <Banner v-if="!info.certified" color="warning" :label="t('plugins.descriptions.third-party')" class="mt-10" />
120
- <Banner v-if="info.experimental" color="warning" :label="t('plugins.descriptions.experimental')" class="mt-10" />
119
+ <Banner v-if="info.error" color="error" :label="info.error" class="mt-10" />
120
+ <Banner v-if="info.builtin" color="warning" :label="t('plugins.descriptions.built-in')" class="mt-10" />
121
+ <template v-else>
122
+ <Banner v-if="!info.certified" color="warning" :label="t('plugins.descriptions.third-party')" class="mt-10" />
123
+ <Banner v-if="info.experimental" color="warning" :label="t('plugins.descriptions.experimental')" class="mt-10" />
124
+ </template>
121
125
  </div>
122
126
 
123
- <h3 v-if="info.versions">
127
+ <h3 v-if="info.versions.length">
124
128
  {{ t('plugins.info.versions') }}
125
129
  </h3>
126
130
  <div class="plugin-versions mb-10">
@@ -138,11 +142,16 @@ export default {
138
142
  <div v-if="versionError">
139
143
  {{ t('plugins.info.versionError') }}
140
144
  </div>
141
- <div v-else>
145
+ <h3 v-if="versionInfo">
146
+ {{ t('plugins.info.detail') }}
147
+ </h3>
148
+ <div v-if="versionInfo" class="plugin-info-detail">
149
+ <ChartReadme v-if="versionInfo" :version-info="versionInfo" />
150
+ </div>
151
+ <div v-if="!info.versions.length">
142
152
  <h3>
143
- {{ t('plugins.info.detail') }}
153
+ {{ t('plugins.version', { version: info.displayVersion }) }}
144
154
  </h3>
145
- <ChartReadme v-if="versionInfo" :version-info="versionInfo" />
146
155
  </div>
147
156
  </div>
148
157
  </div>
@@ -186,6 +195,16 @@ export default {
186
195
 
187
196
  transition: right .5s ease;
188
197
 
198
+ .plugin-info-content {
199
+ display: flex;
200
+ flex-direction: column;
201
+ overflow: hidden;
202
+
203
+ .plugin-info-detail {
204
+ overflow: auto;
205
+ }
206
+ }
207
+
189
208
  h3 {
190
209
  font-size: 14px;
191
210
  margin: 15px 0 10px 0;
@@ -79,14 +79,9 @@ export default {
79
79
 
80
80
  await new Promise(resolve => setTimeout(resolve, 5000));
81
81
 
82
- btnCb(true);
82
+ this.$emit('done');
83
83
 
84
- this.$router.push(
85
- {
86
- path: this.$route.path,
87
- force: true,
88
- },
89
- );
84
+ btnCb(true);
90
85
  },
91
86
  }
92
87
  };
@@ -1,7 +1,7 @@
1
1
  <script>
2
2
  import AsyncButton from '@shell/components/AsyncButton';
3
3
  import IconMessage from '@shell/components/IconMessage.vue';
4
- import { CATALOG, UI_PLUGIN } from '@shell/config/types';
4
+ import { CATALOG, MANAGEMENT } from '@shell/config/types';
5
5
  import { CATALOG as CATALOG_ANNOTATIONS } from '@shell/config/labels-annotations';
6
6
  import Dialog from '@shell/components/Dialog.vue';
7
7
  import Checkbox from '@components/Form/Checkbox/Checkbox.vue';
@@ -47,17 +47,23 @@ export default {
47
47
  }
48
48
  }
49
49
 
50
+ this.defaultRegistrySetting = await this.$store.dispatch('management/find', {
51
+ type: MANAGEMENT.SETTING,
52
+ id: 'system-default-registry'
53
+ });
54
+
50
55
  this.loading = false;
51
56
  },
52
57
 
53
58
  data() {
54
59
  return {
55
- loading: true,
56
- haveCharts: false,
57
- installCharts: [],
58
- errors: [],
59
- addRepo: true,
60
- buttonState: ASYNC_BUTTON_STATES.ACTION,
60
+ loading: true,
61
+ haveCharts: false,
62
+ installCharts: [],
63
+ errors: [],
64
+ addRepo: true,
65
+ buttonState: ASYNC_BUTTON_STATES.ACTION,
66
+ defaultRegistrySetting: null,
61
67
  };
62
68
  },
63
69
 
@@ -88,6 +94,15 @@ export default {
88
94
  values: {}
89
95
  };
90
96
 
97
+ // Pass in the system default registry property if set
98
+ const defaultRegistry = this.defaultRegistrySetting?.value || '';
99
+
100
+ if (defaultRegistry) {
101
+ chart.values.global = chart.values.global || {};
102
+ chart.values.global.cattle = chart.values.global.cattle || {};
103
+ chart.values.global.cattle.systemDefaultRegistry = defaultRegistry;
104
+ }
105
+
91
106
  const input = {
92
107
  charts: [chart],
93
108
  wait: true,
@@ -130,16 +145,9 @@ export default {
130
145
 
131
146
  await new Promise(resolve => setTimeout(resolve, 5000));
132
147
 
133
- this.$store.dispatch('management/forgetType', UI_PLUGIN);
134
-
135
148
  this.buttonState = this.errors.length > 0 ? ASYNC_BUTTON_STATES.ERROR : ASYNC_BUTTON_STATES.ACTION;
136
149
 
137
- this.$router.push(
138
- {
139
- path: this.$route.path,
140
- force: true,
141
- },
142
- );
150
+ this.$emit('done');
143
151
  }
144
152
  },
145
153
 
@@ -26,6 +26,8 @@ export default {
26
26
 
27
27
  const plugin = this.plugin;
28
28
 
29
+ this.$emit('update', plugin.name, 'uninstall');
30
+
29
31
  // Delete the CR if this is a developer plugin (there is no Helm App, so need to remove the CRD ourselves)
30
32
  if (plugin.uiplugin?.isDeveloper) {
31
33
  // Delete the custom resource
@@ -40,14 +42,19 @@ export default {
40
42
  });
41
43
 
42
44
  if (pluginApp) {
43
- await pluginApp.remove();
45
+ try {
46
+ await pluginApp.remove();
47
+ } catch (e) {
48
+ this.$store.dispatch('growl/error', {
49
+ title: this.t('plugins.error.generic'),
50
+ message: e.message ? e.message : e,
51
+ timeout: 10000
52
+ }, { root: true });
53
+ }
44
54
 
45
55
  await this.$store.dispatch('management/findAll', { type: CATALOG.OPERATION });
46
56
  }
47
57
 
48
- // Unload the plugin code
49
- this.$plugin.removePlugin(plugin.name);
50
-
51
58
  this.closeDialog(plugin);
52
59
  }
53
60
  }
@@ -62,7 +69,7 @@ export default {
62
69
  >
63
70
  <div v-if="plugin" class="plugin-install-dialog">
64
71
  <h4 class="mt-10">
65
- {{ t('plugins.uninstall.title', { name: plugin.name }) }}
72
+ {{ t('plugins.uninstall.title', { name: plugin.label }) }}
66
73
  </h4>
67
74
  <div class="mt-10 dialog-panel">
68
75
  <div class="dialog-info">