dashboard-shell-shell 0.0.1000000000001133 → 0.0.1000000000001138

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 (33) hide show
  1. package/assets/translations/zh-hans.yaml +1 -1
  2. package/components/CruResource.vue +1 -0
  3. package/components/ExplorerProjectsNamespaces.vue +35 -5
  4. package/components/PodSecurityAdmission.vue +1 -1
  5. package/components/ResourceDetail/Masthead.vue +6 -2
  6. package/components/SortableTable/selection.js +2 -2
  7. package/components/Tabbed/index.vue +1 -1
  8. package/components/rancherResourceDetail/Masthead.vue +769 -0
  9. package/components/rancherResourceDetail/__tests__/Masthead.test.ts +65 -0
  10. package/components/rancherResourceDetail/index.vue +591 -0
  11. package/components/rancherResourceList/Masthead-btn.vue +225 -0
  12. package/components/rancherResourceList/Masthead.vue +375 -0
  13. package/components/rancherResourceList/ResourceLoadingIndicator.vue +140 -0
  14. package/components/rancherResourceList/index.vue +307 -0
  15. package/components/rancherResourceList/resource-list.config.js +7 -0
  16. package/components/rancherResourceTable.vue +783 -0
  17. package/components/rancherSortableTable/THead.vue +561 -0
  18. package/components/rancherSortableTable/actions.js +153 -0
  19. package/components/rancherSortableTable/advanced-filtering.js +272 -0
  20. package/components/rancherSortableTable/debug.js +117 -0
  21. package/components/rancherSortableTable/filtering.js +290 -0
  22. package/components/rancherSortableTable/grouping.js +48 -0
  23. package/components/rancherSortableTable/index.vue +2712 -0
  24. package/components/rancherSortableTable/paging.js +155 -0
  25. package/components/rancherSortableTable/selection.js +629 -0
  26. package/components/rancherSortableTable/sortable-config.ts +4 -0
  27. package/components/rancherSortableTable/sorting.js +129 -0
  28. package/config/table-headers.js +1 -1
  29. package/package.json +1 -1
  30. package/rancher-components/Banner/Banner.vue +2 -2
  31. package/rancher-components/RcDropdown/RcDropdownMenu.vue +2 -2
  32. package/scripts/publish-shell.sh +2 -0
  33. package/vue.config.js +5 -0
@@ -7122,7 +7122,7 @@ registryConfig:
7122
7122
  ##############################
7123
7123
 
7124
7124
  advancedSettings:
7125
- label: 设置
7125
+ label: 基础设置
7126
7126
  subtext: 一般用户不需要修改此处的设置。请谨慎操作,不正确的值会破坏 {appName} 的安装。与默认不同的设置会标记为“已修改”。
7127
7127
  show: 显示
7128
7128
  hide: 隐藏
@@ -895,6 +895,7 @@ form.create-resource-container .cru {
895
895
  display: flex;
896
896
  flex-direction: column;
897
897
  flex-grow: 1;
898
+ height: 100%;
898
899
  }
899
900
 
900
901
  &__content {
@@ -1,13 +1,13 @@
1
1
  <script>
2
2
  import { mapGetters, useStore } from 'vuex';
3
- import ResourceTable, { defaultTableSortGenerationFn } from '@shell/components/ResourceTable';
3
+ import ResourceTable, { defaultTableSortGenerationFn } from '@shell/components/rancherResourceTable';
4
4
  import { STATE, AGE, NAME, NS_SNAPSHOT_QUOTA } from '@shell/config/table-headers';
5
5
  import { uniq } from '@shell/utils/array';
6
6
  import { MANAGEMENT, NAMESPACE, VIRTUAL_TYPES, HCI } from '@shell/config/types';
7
7
  import { PROJECT_ID, FLAT_VIEW } from '@shell/config/query-params';
8
8
  import { PanelLocation, ExtensionPoint } from '@shell/core/types';
9
9
  import ExtensionPanel from '@shell/components/ExtensionPanel';
10
- import Masthead from '@shell/components/ResourceList/Masthead';
10
+ import Masthead from '@shell/components/rancherResourceList/Masthead';
11
11
  import { mapPref, GROUP_RESOURCES, ALL_NAMESPACES, DEV } from '@shell/store/prefs';
12
12
  import MoveModal from '@shell/components/MoveModal';
13
13
  import ButtonMultiAction from '@shell/components/ButtonMultiAction.vue';
@@ -427,6 +427,8 @@ export default {
427
427
  :show-incremental-loading-indicator="showIncrementalLoadingIndicator"
428
428
  :load-resources="loadResources"
429
429
  :load-indeterminate="loadIndeterminate"
430
+
431
+ :main-button-visible="false"
430
432
  >
431
433
  <template
432
434
  v-if="showCreateNsButton"
@@ -460,7 +462,26 @@ export default {
460
462
  :loading="loading"
461
463
  group-tooltip="resourceTable.groupBy.project"
462
464
  key-field="_key"
465
+
466
+ :create-location="createProjectLocation"
467
+ :schemaBtn="projectSchema"
468
+ :create-button-label="t('projectNamespaces.createProject')"
469
+ :type-display="t('projectNamespaces.label')"
470
+ :resource="MANAGEMENT.PROJECT"
471
+ :main-button-visible="true"
463
472
  >
473
+ <template
474
+ v-if="showCreateNsButton"
475
+ #extraActions
476
+ >
477
+ <router-link
478
+ :to="createNamespaceLocationFlatList()"
479
+ class="btn role-primary mr-10"
480
+ data-testid="create_project_namespaces"
481
+ >
482
+ {{ t('projectNamespaces.createNamespace') }}
483
+ </router-link>
484
+ </template>
464
485
  <template #group-by="group">
465
486
  <div
466
487
  class="project-bar"
@@ -481,10 +502,10 @@ export default {
481
502
  {{ projectDescription(group.group) }}
482
503
  </div>
483
504
  </div>
484
- <div class="right mr-10">
505
+ <div class="right">
485
506
  <router-link
486
507
  v-if="isNamespaceCreatable && (canSeeProjectlessNamespaces || group.group.key !== notInProjectKey)"
487
- class="create-namespace btn btn-sm role-secondary mr-5"
508
+ class="create-namespace btn btn-sm mr-5"
488
509
  :to="createNamespaceLocation(group.group)"
489
510
  >
490
511
  {{ t('projectNamespaces.createNamespace') }}
@@ -575,7 +596,6 @@ export default {
575
596
  <style lang="scss" scoped>
576
597
  .invisible {
577
598
  display: inline-block;
578
- min-width: 28px;
579
599
  }
580
600
 
581
601
  .project-namespaces {
@@ -592,6 +612,16 @@ export default {
592
612
  display: flex;
593
613
  flex-direction: row;
594
614
  justify-content: space-between;
615
+ background-color: var(--sortable-table-bg) !important;
616
+
617
+ .right {
618
+ display: flex;
619
+ align-items: center;
620
+ }
621
+
622
+ .create-namespace {
623
+ color: var(--link);
624
+ }
595
625
 
596
626
  .group-tab {
597
627
  max-width: calc(100% - 230px);
@@ -218,7 +218,7 @@ export default defineComponent({
218
218
  :key="i"
219
219
  class="row row--y-center mb-20"
220
220
  >
221
- <span class="col span-2">
221
+ <span class="col">
222
222
  <Checkbox
223
223
  v-if="!labelsAlwaysActive"
224
224
  v-model:value="psaControl.active"
@@ -400,7 +400,9 @@ export default {
400
400
  demoDisplay() {
401
401
  const product = this.$store.getters['productId'];
402
402
 
403
- const productId = this.$store.getters['type-map/groupForBasicType'](this.$store.getters['productId'], this.location.params.resource);
403
+ const resources = this.location?.params?.resource || ''
404
+
405
+ const productId = this.$store.getters['type-map/groupForBasicType'](this.$store.getters['productId'], resources);
404
406
 
405
407
  if (productId === undefined) {
406
408
  return '';
@@ -420,8 +422,10 @@ export default {
420
422
  },
421
423
  menuIcon() {
422
424
  const product = this.$store.getters['productId'];
425
+
426
+ const resources = this.location?.params?.resource || ''
423
427
 
424
- return this.$store.getters['type-map/groupsForVirTypes'](product, cloud2harvesterhci(this.location.params.resource));
428
+ return this.$store.getters['type-map/groupsForVirTypes'](product, cloud2harvesterhci(resources));
425
429
  },
426
430
 
427
431
  location() {
@@ -10,7 +10,7 @@ export const NONE = 'none';
10
10
 
11
11
  export default {
12
12
  mounted() {
13
- const table = this.$el.querySelector('TABLE');
13
+ const table = this.$el && this.$el.querySelector('TABLE');
14
14
 
15
15
  this._onRowClickBound = this.onRowClick.bind(this);
16
16
  this._onRowMousedownBound = this.onRowMousedown.bind(this);
@@ -22,7 +22,7 @@ export default {
22
22
  },
23
23
 
24
24
  beforeUnmount() {
25
- const table = this.$el.querySelector('TABLE');
25
+ const table = this.$el && this.$el.querySelector('TABLE');
26
26
 
27
27
  table.removeEventListener('click', this._onRowClickBound);
28
28
  table.removeEventListener('mousedown', this._onRowMousedownBound);
@@ -499,7 +499,7 @@ margin: 0px -20px;
499
499
  // }
500
500
  & .tab {
501
501
  /* width: 100%; */
502
- width: 120px;
502
+ min-width: 120px;
503
503
  height: 36px;
504
504
  /* border-top: solid 5px transparent; */
505
505
  display: flex;