@rancher/shell 0.3.5 → 0.3.6

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 (116) hide show
  1. package/assets/images/providers/outscale.svg +19 -0
  2. package/assets/styles/base/_basic.scss +18 -0
  3. package/assets/styles/base/_mixins.scss +0 -11
  4. package/assets/styles/base/_variables.scss +2 -4
  5. package/assets/styles/global/_button.scss +12 -2
  6. package/assets/translations/en-us.yaml +22 -1
  7. package/assets/translations/zh-hans.yaml +30 -10
  8. package/chart/gatekeeper.vue +3 -2
  9. package/chart/istio.vue +29 -3
  10. package/components/BrandImage.vue +1 -4
  11. package/components/Carousel.vue +85 -37
  12. package/components/EtcdInfoBanner.vue +7 -3
  13. package/components/ExplorerMembers.vue +100 -5
  14. package/components/ExplorerProjectsNamespaces.vue +32 -2
  15. package/components/GrafanaDashboard.vue +9 -2
  16. package/components/SortableTable/index.vue +23 -11
  17. package/components/SortableTable/selection.js +58 -50
  18. package/components/Wizard.vue +4 -2
  19. package/components/auth/RoleDetailEdit.vue +2 -2
  20. package/components/form/HookOption.vue +14 -10
  21. package/components/form/Labels.vue +32 -27
  22. package/components/form/MatchExpressions.vue +2 -2
  23. package/components/form/Members/ClusterPermissionsEditor.vue +32 -7
  24. package/components/form/NameNsDescription.vue +1 -1
  25. package/components/form/ProjectMemberEditor.vue +46 -21
  26. package/components/form/Tolerations.vue +4 -1
  27. package/components/form/ValueFromResource.vue +14 -9
  28. package/components/form/WorkloadPorts.vue +2 -2
  29. package/components/form/__tests__/NameNsDescription.ts +27 -0
  30. package/components/formatter/WorkloadHealthScale.vue +8 -2
  31. package/components/nav/NamespaceFilter.vue +8 -0
  32. package/{nuxt/components → components/nuxt}/nuxt.js +1 -1
  33. package/{nuxt → config}/middleware.js +8 -8
  34. package/config/product/explorer.js +24 -3
  35. package/config/query-params.js +1 -0
  36. package/config/router.js +1 -1
  37. package/{nuxt → config}/store.js +82 -79
  38. package/config/table-headers.js +46 -12
  39. package/config/types.js +7 -0
  40. package/core/plugin.ts +4 -2
  41. package/core/types.ts +258 -1
  42. package/creators/app/files/tsconfig.json +0 -1
  43. package/creators/app/files/vue.config.js +0 -1
  44. package/creators/pkg/files/.github/workflows/build-extension.yml +3 -4
  45. package/creators/pkg/files/tsconfig.json +0 -1
  46. package/creators/pkg/pkg.package.json +3 -3
  47. package/detail/constraints.gatekeeper.sh.constraint.vue +14 -7
  48. package/detail/fleet.cattle.io.clustergroup.vue +7 -1
  49. package/edit/fleet.cattle.io.gitrepo.vue +16 -1
  50. package/edit/logging.banzaicloud.io.output/index.vue +18 -5
  51. package/edit/logging.banzaicloud.io.output/providers/loki.vue +1 -0
  52. package/edit/namespace.vue +12 -8
  53. package/edit/provisioning.cattle.io.cluster/MachinePool.vue +11 -4
  54. package/edit/provisioning.cattle.io.cluster/import.vue +23 -25
  55. package/edit/provisioning.cattle.io.cluster/rke2.vue +96 -18
  56. package/edit/workload/mixins/workload.js +6 -7
  57. package/edit/workload/storage/Mount.vue +3 -3
  58. package/initialize/App.js +206 -0
  59. package/{nuxt → initialize}/client.js +406 -360
  60. package/{nuxt → initialize}/index.js +21 -22
  61. package/layouts/standalone.vue +13 -0
  62. package/list/catalog.cattle.io.clusterrepo.vue +1 -0
  63. package/list/rbac.authorization.k8s.io.clusterrolebinding.vue +48 -0
  64. package/list/workload.vue +6 -4
  65. package/mixins/chart.js +29 -1
  66. package/mixins/fetch.client.js +95 -0
  67. package/{nuxt/mixins → mixins}/fetch.server.js +30 -26
  68. package/mixins/labeled-form-element.ts +2 -2
  69. package/models/constraints.gatekeeper.sh.constraint.js +37 -0
  70. package/models/pod.js +4 -0
  71. package/models/rbac.authorization.k8s.io.clusterrolebinding.js +16 -0
  72. package/models/rbac.authorization.k8s.io.rolebinding.js +16 -0
  73. package/package.json +9 -13
  74. package/pages/c/_cluster/apps/charts/install.vue +61 -39
  75. package/pages/diagnostic.vue +32 -25
  76. package/pages/rio/mesh.vue +1 -2
  77. package/pkg/tsconfig.json +0 -1
  78. package/plugins/clean-html-directive.js +3 -0
  79. package/plugins/dashboard-store/index.js +1 -1
  80. package/plugins/plugin.js +0 -14
  81. package/plugins/portal-vue.js +4 -0
  82. package/rancher-components/components/Banner/Banner.test.ts +3 -5
  83. package/rancher-components/components/Banner/Banner.vue +1 -0
  84. package/rancher-components/components/Form/Radio/RadioButton.test.ts +31 -0
  85. package/rancher-components/components/Form/Radio/RadioButton.vue +14 -3
  86. package/scripts/extension/publish +42 -23
  87. package/scripts/serve-pkgs +6 -2
  88. package/store/type-map.js +1 -1
  89. package/tsconfig.json +0 -1
  90. package/types/rancher/index.d.ts +2 -0
  91. package/types/shell/index.d.ts +353 -284
  92. package/utils/__tests__/grafana.test.ts +44 -0
  93. package/utils/axios.js +190 -0
  94. package/{nuxt → utils}/cookie-universal-nuxt.js +7 -6
  95. package/utils/dom.js +15 -0
  96. package/utils/grafana.js +35 -16
  97. package/{nuxt/utils.js → utils/nuxt.js} +265 -236
  98. package/utils/router.scrollBehavior.js +1 -1
  99. package/vue.config.js +30 -19
  100. package/nuxt/App.js +0 -210
  101. package/nuxt/axios.js +0 -186
  102. package/nuxt/empty.js +0 -1
  103. package/nuxt/jsonp.js +0 -82
  104. package/nuxt/loading.html +0 -39
  105. package/nuxt/mixins/fetch.client.js +0 -90
  106. package/nuxt/portal-vue.js +0 -4
  107. package/nuxt/server.js +0 -312
  108. package/nuxt/views/app.template.html +0 -9
  109. package/nuxt/views/error.html +0 -23
  110. package/plugins/dashboard-store/extensions.js +0 -22
  111. /package/{nuxt/components → components/nuxt}/nuxt-build-indicator.vue +0 -0
  112. /package/{nuxt/components → components/nuxt}/nuxt-child.js +0 -0
  113. /package/{nuxt/components → components/nuxt}/nuxt-error.vue +0 -0
  114. /package/{nuxt/components → components/nuxt}/nuxt-link.client.js +0 -0
  115. /package/{nuxt/components → components/nuxt}/nuxt-link.server.js +0 -0
  116. /package/{nuxt/components → components/nuxt}/nuxt-loading.vue +0 -0
package/core/types.ts CHANGED
@@ -1,3 +1,4 @@
1
+ import { ProductFunction } from './plugin';
1
2
  import { RouteConfig } from 'vue-router';
2
3
 
3
4
  // package.json metadata
@@ -136,6 +137,255 @@ export type LocationConfig = {
136
137
  mode?: string[]
137
138
  };
138
139
 
140
+ export interface ProductOptions {
141
+ /**
142
+ * The category this product belongs under. i.e. 'config'
143
+ */
144
+ category?: string;
145
+
146
+ /**
147
+ * Hide the Copy KubeConfig button in the header
148
+ */
149
+ hideCopyConfig?: boolean;
150
+
151
+ /**
152
+ * Hide the Download KubeConfig button in the header
153
+ */
154
+ hideKubeConfig?: boolean;
155
+
156
+ /**
157
+ * Hide the Kubectl Shell button in the header
158
+ */
159
+ hideKubeShell?: boolean;
160
+
161
+ /**
162
+ * Hide the Namespace location
163
+ */
164
+ hideNamespaceLocation?: boolean;
165
+
166
+ /**
167
+ * Hide the system resources
168
+ */
169
+
170
+ hideSystemResources?: boolean;
171
+ /**
172
+ * The icon that should be displayed beside this item in the navigation.
173
+ */
174
+ icon?: string,
175
+
176
+ /**
177
+ * Only load the product if the feature is present
178
+ */
179
+ ifFeature?: string | RegExp;
180
+
181
+ /**
182
+ * Only load the product if the type is present
183
+ */
184
+ ifHave?: string;
185
+
186
+ /**
187
+ * Only load the product if the group is present
188
+ */
189
+ ifHaveGroup?: string | RegExp;
190
+
191
+ /**
192
+ * Only load the product if the type is present
193
+ */
194
+ ifHaveType?: string | RegExp;
195
+
196
+ /**
197
+ * The vuex store that this product should use by default i.e. 'management'
198
+ */
199
+ inStore?: string;
200
+
201
+ /**
202
+ * Show the cluster switcher in the navigation
203
+ */
204
+ showClusterSwitcher?: boolean;
205
+
206
+ /**
207
+ * Show the namespace filter in the header
208
+ */
209
+ showNamespaceFilter?: boolean;
210
+
211
+ /**
212
+ * A number used to determine where in navigation this item will be placed. The highest number will be at the top of the list.
213
+ */
214
+ weight?: number;
215
+
216
+ /**
217
+ * Leaving these here for completeness but I don't think these should be advertised as useable to plugin creators.
218
+ */
219
+ // ifHaveVerb: string | RegExp;
220
+ // removable: string;
221
+ // showWorkspaceSwitcher: boolean;
222
+ // supportRoute: string;
223
+ // to: string;
224
+ // typeStoreMap: string;
225
+ }
226
+
227
+ export interface HeaderOptions {
228
+ /**
229
+ * Name of the header. This should be unique.
230
+ */
231
+ name?: string;
232
+
233
+ /**
234
+ * A translation key where the resulting string will show in the table column
235
+ */
236
+ labelKey?: string;
237
+
238
+ /**
239
+ * A string which represents the path to access the value from the row object i.e. `row.meta.value`.
240
+ */
241
+ value?: string;
242
+
243
+ /**
244
+ * A string which represents the path to access the value from the row object which we'll use to sort i.e. `row.meta.value`
245
+ */
246
+ sort?: string;
247
+
248
+ /**
249
+ * A string which represents the path to access the value from the row object which we'll use to search i.e. `row.meta.value`
250
+ */
251
+ search?: string;
252
+
253
+ /**
254
+ * Number of pixels the column should be in the table
255
+ */
256
+ width?: number;
257
+
258
+ /**
259
+ * The name of a custom formatter. The available formatters can bee seen in `@rancher/shell/components/formatter`
260
+ */
261
+ formatter?: string;
262
+
263
+ /**
264
+ * These options are dependent on the formatter that's chosen. Examples can be seen in `@rancher/shell/components/formatter` and `@rancher/shell/config/table-headers`
265
+ */
266
+ formatterOpts?: any;
267
+
268
+ /**
269
+ * Provide a function which accets a row and returns the value that should be displayed in the column
270
+ * @param row This can be any value which represents the row
271
+ * @returns Can return {@link string | number | null | undefined} to display in the column
272
+ */
273
+ getValue?: (row: any) => string | number | null | undefined;
274
+ }
275
+
276
+ export interface ConfigureTypeOptions {
277
+ /**
278
+ * The resource can edit/show yaml
279
+ */
280
+ canYaml?: boolean;
281
+
282
+ /**
283
+ * Modify the way the name looks when displayed
284
+ */
285
+ displayName?: string;
286
+
287
+ /**
288
+ * New resources can be created of this type
289
+ */
290
+ isCreatable?: boolean;
291
+
292
+ /**
293
+ * Resources of this type can be deleted/removed
294
+ */
295
+ isRemovable?: boolean;
296
+
297
+ /**
298
+ * This type should be grouped by namespaces when displayed in a table
299
+ */
300
+ namespaced?: boolean;
301
+
302
+ /**
303
+ * Show the age column in when displaying this type in a table
304
+ */
305
+ showAge?: boolean;
306
+
307
+ /**
308
+ * Show the masthead at the top of the list view of this type
309
+ */
310
+ showListMasthead?: boolean;
311
+
312
+ /**
313
+ * Show the state column in when displaying this type in a table
314
+ */
315
+ showState?: boolean;
316
+
317
+ /**
318
+ * Leaving these here for completeness but I don't think these should be advertised as useable to plugin creators.
319
+ */
320
+ // alias
321
+ // customRoute
322
+ // customRoute
323
+ // depaginate
324
+ // graphConfig
325
+ // hasGraph
326
+ // isEditable
327
+ // limit
328
+ // listGroups
329
+ // localOnly
330
+ // location
331
+ // match
332
+ // realResource
333
+ // resource
334
+ // resourceDetail
335
+ // resourceEdit
336
+ // showConfigView
337
+ }
338
+
339
+ export interface DSLReturnType {
340
+ /**
341
+ * Register multiple types by name and place them all in a group if desired. Primarily used for grouping things in the cluster explorer navigation.
342
+ * @param types A list of types that are going to be registered
343
+ * @param group Conditionally a group you want to places all the types in
344
+ * @returns {@link void}
345
+ */
346
+ basicType: (types: string[], group?: string) => void;
347
+
348
+ /**
349
+ * Configure a myriad of options for the specified type
350
+ * @param type The type to be configured
351
+ * @param options {@link ConfigureTypeOptions}
352
+ * @returns {@link void}
353
+ */
354
+ configureType: (type: string, options: ConfigureTypeOptions) => void;
355
+
356
+ /**
357
+ * Register the headers/columns that should be used when rendering a table for the specified type.
358
+ * @param type The type you'd like to register headers/columns for.
359
+ * @param headers {@link HeaderOptions[]}
360
+ * @returns {@link void}
361
+ */
362
+ headers: (type: string, headers: HeaderOptions[]) => void;
363
+
364
+ /**
365
+ * Create and register a new product
366
+ * @param options {@link ProductOptions}
367
+ * @returns {@link void}
368
+ */
369
+ product: (options: ProductOptions) => void;
370
+
371
+ /**
372
+ * Leaving these here for completeness but I don't think these should be advertised as useable to plugin creators.
373
+ */
374
+ // componentForType: (type: string, replacementType: string)
375
+ // groupBy: (type: string, field: string)
376
+ // hideBulkActions: (type: string, field)
377
+ // ignoreGroup: (regexOrString)
378
+ // ignoreType: (regexOrString)
379
+ // mapGroup: (match, replace)
380
+ // mapType: (match, replace)
381
+ // moveType: (match, group)
382
+ // setGroupDefaultType: (input, defaultType)
383
+ // spoofedType: (obj)
384
+ // virtualType: (obj)
385
+ // weightGroup: (input, weight, forBasic)
386
+ // weightType: (input, weight, forBasic)
387
+ }
388
+
139
389
  /**
140
390
  * Interface for a Dashboard plugin
141
391
  */
@@ -144,7 +394,7 @@ export interface IPlugin {
144
394
  * Add a product
145
395
  * @param importFn Function that will import the module containing a product definition
146
396
  */
147
- addProduct(importFn: Function): void;
397
+ addProduct(importFn: ProductFunction): void;
148
398
 
149
399
  /**
150
400
  * Add a locale to the i18n store
@@ -249,4 +499,11 @@ export interface IPlugin {
249
499
  * @param {Function} fn function that dynamically loads the module for the thing being registered
250
500
  */
251
501
  register(type: string, name: string, fn: Function): void;
502
+
503
+ /**
504
+ * Will return all of the configuration functions used for creating a new product.
505
+ * @param store The store that was passed to the function that's passed to `plugin.addProduct(function)`
506
+ * @param productName The name of the new product. This name is displayed in the navigation.
507
+ */
508
+ DSL(store: any, productName: string): DSLReturnType;
252
509
  }
@@ -31,7 +31,6 @@
31
31
  ],
32
32
  "types": [
33
33
  "@types/node",
34
- "@nuxt/types",
35
34
  "cypress",
36
35
  "rancher",
37
36
  "shell"
@@ -3,5 +3,4 @@ const config = require('@rancher/shell/vue.config');
3
3
  module.exports = config(__dirname, {
4
4
  excludes: [],
5
5
  // excludes: ['fleet', 'example']
6
- // autoLoad: ['fleet', 'example']
7
6
  });
@@ -64,7 +64,7 @@ jobs:
64
64
  shell: bash
65
65
  id: build_script
66
66
  run: |
67
- yarn publish-pkgs -s "${{ github.repository }}" -b main
67
+ yarn publish-pkgs -s "${{ github.repository }}" -b gh-pages
68
68
 
69
69
  - name: Upload charts artifact
70
70
  if: github.ref == 'refs/heads/main' && github.event_name != 'pull_request'
@@ -83,8 +83,7 @@ jobs:
83
83
  - name: Checkout
84
84
  uses: actions/checkout@v3
85
85
  with:
86
- fetch-depth: 0
87
- ref: main
86
+ ref: gh-pages
88
87
 
89
88
  - name: Configure Git
90
89
  run: |
@@ -105,7 +104,7 @@ jobs:
105
104
  - name: Run chart-releaser
106
105
  uses: helm/chart-releaser-action@v1.4.1
107
106
  with:
108
- charts_dir: ./charts
107
+ charts_dir: ./charts/*
109
108
  env:
110
109
  CR_TOKEN: '${{ secrets.GITHUB_TOKEN }}'
111
110
  CR_SKIP_EXISTING: true
@@ -23,7 +23,6 @@
23
23
  "@types/node",
24
24
  "@types/jest",
25
25
  "@types/lodash",
26
- "@nuxt/types",
27
26
  "rancher",
28
27
  "shell"
29
28
  ],
@@ -9,9 +9,9 @@
9
9
  "node": ">=12"
10
10
  },
11
11
  "devDependencies": {
12
- "@vue/cli-plugin-babel": "~4.5.0",
13
- "@vue/cli-service": "~4.5.0",
14
- "@vue/cli-plugin-typescript": "^4.5.15"
12
+ "@vue/cli-plugin-babel": "4.5.18",
13
+ "@vue/cli-service": "4.5.18",
14
+ "@vue/cli-plugin-typescript": "4.5.18"
15
15
  },
16
16
  "browserslist": [
17
17
  "> 1%",
@@ -2,18 +2,26 @@
2
2
  import CreateEditView from '@shell/mixins/create-edit-view';
3
3
  import SortableTable from '@shell/components/SortableTable';
4
4
  import Banner from '@components/Banner/Banner.vue';
5
- import { CONSTRAINT_VIOLATION_RESOURCE_LINK, CONSTRAINT_VIOLATION_MESSAGE, CONSTRAINT_VIOLATION_TYPE } from '@shell/config/table-headers';
5
+ import {
6
+ CONSTRAINT_VIOLATION_RESOURCE_LINK,
7
+ CONSTRAINT_VIOLATION_MESSAGE,
8
+ CONSTRAINT_VIOLATION_TYPE,
9
+ CONSTRAINT_VIOLATION_NAMESPACE,
10
+ } from '@shell/config/table-headers';
6
11
 
7
12
  export default {
8
13
  components: { Banner, SortableTable },
9
14
  mixins: [CreateEditView],
10
15
  data() {
16
+ const headers = [
17
+ CONSTRAINT_VIOLATION_TYPE,
18
+ CONSTRAINT_VIOLATION_NAMESPACE,
19
+ CONSTRAINT_VIOLATION_RESOURCE_LINK,
20
+ CONSTRAINT_VIOLATION_MESSAGE
21
+ ];
22
+
11
23
  return {
12
- headers: [
13
- CONSTRAINT_VIOLATION_TYPE,
14
- CONSTRAINT_VIOLATION_RESOURCE_LINK,
15
- CONSTRAINT_VIOLATION_MESSAGE
16
- ],
24
+ headers,
17
25
  violations: this.value.violations.map((violation, i) => ({ ...violation, id: i }))
18
26
  };
19
27
  }
@@ -46,7 +54,6 @@ export default {
46
54
  <SortableTable
47
55
  :headers="headers"
48
56
  :rows="violations"
49
- :search="false"
50
57
  :table-actions="false"
51
58
  :row-actions="false"
52
59
  :paging="true"
@@ -5,6 +5,7 @@ import FleetClusters from '@shell/components/fleet/FleetClusters';
5
5
  import ResourceTabs from '@shell/components/form/ResourceTabs';
6
6
  import Tab from '@shell/components/Tabbed/Tab';
7
7
  import { FLEET } from '@shell/config/types';
8
+ import { allHash } from '@shell/utils/promise';
8
9
 
9
10
  export default {
10
11
  name: 'DetailClusterGroup',
@@ -25,7 +26,12 @@ export default {
25
26
  },
26
27
 
27
28
  async fetch() {
28
- await this.$store.dispatch('management/findAll', { type: FLEET.CLUSTER });
29
+ const hash = {
30
+ workspaces: this.$store.dispatch('cluster/findAll', { type: FLEET.WORKSPACE }),
31
+ FleetClusters: this.$store.dispatch('management/findAll', { type: FLEET.CLUSTER }),
32
+ };
33
+
34
+ await allHash(hash);
29
35
  },
30
36
 
31
37
  computed: {
@@ -24,6 +24,7 @@ import { isHarvesterCluster } from '@shell/utils/cluster';
24
24
  import { CAPI, CATALOG } from '@shell/config/labels-annotations';
25
25
  import { SECRET_TYPES } from '@shell/config/secret';
26
26
  import { checkSchemasForFindAllHash } from '@shell/utils/auth';
27
+ import Checkbox from '@components/Form/Checkbox/Checkbox.vue';
27
28
 
28
29
  const _VERIFY = 'verify';
29
30
  const _SKIP = 'skip';
@@ -33,6 +34,7 @@ export default {
33
34
  name: 'CruGitRepo',
34
35
 
35
36
  components: {
37
+ Checkbox,
36
38
  ArrayList,
37
39
  Banner,
38
40
  CruResource,
@@ -601,7 +603,20 @@ export default {
601
603
  </div>
602
604
  </template>
603
605
  <div class="spacer" />
604
-
606
+ <h2 v-t="'fleet.gitRepo.resources.label'" />
607
+ <Checkbox
608
+ v-model="value.spec.keepResources"
609
+ class="check"
610
+ type="checkbox"
611
+ label-key="fleet.gitRepo.resources.keepResources"
612
+ :mode="mode"
613
+ />
614
+ <Banner
615
+ color="info"
616
+ >
617
+ {{ t('fleet.gitRepo.resources.resourceBanner') }}
618
+ </Banner>
619
+ <div class="spacer" />
605
620
  <h2 v-t="'fleet.gitRepo.paths.label'" />
606
621
  <ArrayList
607
622
  v-model="value.spec.paths"
@@ -100,9 +100,6 @@ export default {
100
100
  }
101
101
  },
102
102
 
103
- created() {
104
- this.registerBeforeHook(this.willSave, 'willSave');
105
- },
106
103
  methods: {
107
104
  getComponent(name) {
108
105
  return require(`./providers/${ name }`).default;
@@ -110,7 +107,22 @@ export default {
110
107
  launch(provider) {
111
108
  this.$refs.tabbed.select(provider.name);
112
109
  },
113
- willSave() {
110
+ saveSettings(done) {
111
+ const t = this.$store.getters['i18n/t'];
112
+
113
+ if (this.selectedProvider === 'loki') {
114
+ const urlCheck = ['https://', 'http://'].some(checkValue => this.value.spec['loki'].url.toLowerCase().startsWith(checkValue));
115
+ const isLokiHttps = this.value.spec['loki'].url ? urlCheck : undefined;
116
+
117
+ if (!isLokiHttps) {
118
+ this.errors = [t('logging.loki.urlInvalid')];
119
+
120
+ return done(false);
121
+ }
122
+ }
123
+
124
+ this.errors = [];
125
+
114
126
  this.value.spec = { [this.selectedProvider]: this.value.spec[this.selectedProvider] };
115
127
 
116
128
  const bufferJson = jsyaml.load(this.bufferYaml);
@@ -120,6 +132,7 @@ export default {
120
132
  } else {
121
133
  this.$delete(this.value.spec[this.selectedProvider], 'buffer');
122
134
  }
135
+ this.save(done);
123
136
  },
124
137
  tabChanged({ tab }) {
125
138
  if ( tab.name === 'buffer' ) {
@@ -151,7 +164,7 @@ export default {
151
164
  :errors="errors"
152
165
  :can-yaml="true"
153
166
  @error="e=>errors = e"
154
- @finish="save"
167
+ @finish="saveSettings"
155
168
  @cancel="done"
156
169
  >
157
170
  <NameNsDescription
@@ -47,6 +47,7 @@ export default {
47
47
  :mode="mode"
48
48
  :disabled="disabled"
49
49
  class="url"
50
+ placeholder="https://127.0.0.1:8000"
50
51
  :label="t('logging.loki.url')"
51
52
  />
52
53
  </div>
@@ -10,7 +10,7 @@ import PodSecurityAdmission from '@shell/components/PodSecurityAdmission';
10
10
  import Tabbed from '@shell/components/Tabbed';
11
11
  import Tab from '@shell/components/Tabbed/Tab';
12
12
  import CruResource from '@shell/components/CruResource';
13
- import { PROJECT_ID, _VIEW } from '@shell/config/query-params';
13
+ import { PROJECT_ID, _VIEW, FLAT_VIEW, _CREATE } from '@shell/config/query-params';
14
14
  import MoveModal from '@shell/components/MoveModal';
15
15
  import ResourceQuota from '@shell/components/form/ResourceQuota/Namespace';
16
16
  import Loading from '@shell/components/Loading';
@@ -67,6 +67,10 @@ export default {
67
67
  computed: {
68
68
  ...mapGetters(['isSingleProduct']),
69
69
 
70
+ isCreate() {
71
+ return this.mode === _CREATE;
72
+ },
73
+
70
74
  isSingleHarvester() {
71
75
  return this.$store.getters['currentProduct'].inStore === HARVESTER && this.isSingleProduct;
72
76
  },
@@ -77,7 +81,6 @@ export default {
77
81
 
78
82
  // Filter out projects not for the current cluster
79
83
  projects = projects.filter(c => c.spec?.clusterName === clusterId);
80
-
81
84
  const out = projects.map((project) => {
82
85
  return {
83
86
  label: project.nameDisplay,
@@ -86,7 +89,7 @@ export default {
86
89
  });
87
90
 
88
91
  out.unshift({
89
- label: '(None)',
92
+ label: this.t('namespace.project.none'),
90
93
  value: null,
91
94
  });
92
95
 
@@ -105,6 +108,9 @@ export default {
105
108
  return !this.isSingleHarvester;
106
109
  },
107
110
 
111
+ flatView() {
112
+ return (this.$route.query[FLAT_VIEW] || false);
113
+ }
108
114
  },
109
115
 
110
116
  watch: {
@@ -139,13 +145,11 @@ export default {
139
145
  }
140
146
 
141
147
  const projects = this.$store.getters['management/all'](MANAGEMENT.PROJECT);
142
-
143
148
  const project = projects.find(p => p.id.includes(projectName));
144
149
 
145
150
  return project?.spec?.containerDefaultResourceLimit || {};
146
151
  }
147
- }
148
-
152
+ },
149
153
  };
150
154
  </script>
151
155
 
@@ -169,9 +173,10 @@ export default {
169
173
  :value="value"
170
174
  :namespaced="false"
171
175
  :mode="mode"
176
+ :extra-columns="['project-col']"
172
177
  >
173
178
  <template
174
- v-if="project"
179
+ v-if="flatView && isCreate"
175
180
  #project-col
176
181
  >
177
182
  <LabeledSelect
@@ -181,7 +186,6 @@ export default {
181
186
  />
182
187
  </template>
183
188
  </NameNsDescription>
184
-
185
189
  <Tabbed :side-tabs="true">
186
190
  <Tab
187
191
  v-if="showResourceQuota"
@@ -173,6 +173,14 @@ export default {
173
173
 
174
174
  <template>
175
175
  <div>
176
+ <Banner
177
+ v-if="value.pool.hostnameLengthLimit"
178
+ color="info"
179
+ >
180
+ <div class="text">
181
+ {{ t('cluster.machinePool.truncationPool', { limit: value.pool.hostnameLengthLimit }) }}
182
+ </div>
183
+ </Banner>
176
184
  <div class="row">
177
185
  <div class="col span-4">
178
186
  <LabeledInput
@@ -200,19 +208,19 @@ export default {
200
208
  <Checkbox
201
209
  v-model="value.pool.etcdRole"
202
210
  :mode="mode"
203
- label="etcd"
211
+ :label="t('cluster.machinePool.role.etcd')"
204
212
  :disabled="isWindows"
205
213
  />
206
214
  <Checkbox
207
215
  v-model="value.pool.controlPlaneRole"
208
216
  :mode="mode"
209
- label="Control Plane"
217
+ :label="t('cluster.machinePool.role.controlPlane')"
210
218
  :disabled="isWindows"
211
219
  />
212
220
  <Checkbox
213
221
  v-model="value.pool.workerRole"
214
222
  :mode="mode"
215
- label="Worker"
223
+ :label="t('cluster.machinePool.role.worker')"
216
224
  />
217
225
  </div>
218
226
  </div>
@@ -294,7 +302,6 @@ export default {
294
302
  :read-allowed="false"
295
303
  :value-can-be-empty="true"
296
304
  />
297
-
298
305
  <div class="spacer" />
299
306
 
300
307
  <Taints
@@ -135,31 +135,29 @@ export default {
135
135
  @finish="saveOverride"
136
136
  @error="e=>errors = e"
137
137
  >
138
- <div class="mt-20">
139
- <Banner
140
- v-if="harvesterLocation"
141
- color="info"
142
- :closable="true"
143
- class="mb-20"
144
- @close="hideHarvesterNotice"
145
- >
146
- {{ t('cluster.harvester.importNotice') }}
147
- <nuxt-link :to="harvesterLocation">
148
- {{ t('product.harvesterManager') }}
149
- </nuxt-link>
150
- </Banner>
151
-
152
- <NameNsDescription
153
- v-if="!isView"
154
- v-model="value"
155
- :mode="mode"
156
- :namespaced="false"
157
- name-label="cluster.name.label"
158
- name-placeholder="cluster.name.placeholder"
159
- description-label="cluster.description.label"
160
- description-placeholder="cluster.description.placeholder"
161
- />
162
- </div>
138
+ <Banner
139
+ v-if="harvesterLocation"
140
+ color="info"
141
+ :closable="true"
142
+ class="mb-20"
143
+ @close="hideHarvesterNotice"
144
+ >
145
+ {{ t('cluster.harvester.importNotice') }}
146
+ <nuxt-link :to="harvesterLocation">
147
+ {{ t('product.harvesterManager') }}
148
+ </nuxt-link>
149
+ </Banner>
150
+
151
+ <NameNsDescription
152
+ v-if="!isView"
153
+ v-model="value"
154
+ :mode="mode"
155
+ :namespaced="false"
156
+ name-label="cluster.name.label"
157
+ name-placeholder="cluster.name.placeholder"
158
+ description-label="cluster.description.label"
159
+ description-placeholder="cluster.description.placeholder"
160
+ />
163
161
 
164
162
  <Tabbed :side-tabs="true">
165
163
  <Tab