dashboard-shell-shell 1.0.1000000113 → 1.0.1000000117

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 (125) hide show
  1. package/assets/images/action.svg +6 -0
  2. package/assets/images/pl/logo.png +0 -0
  3. package/assets/styles/base/_functions.scss +0 -0
  4. package/assets/styles/base/_mixins.scss +1 -1
  5. package/assets/styles/global/_button.scss +17 -10
  6. package/assets/styles/global/_form.scss +2 -2
  7. package/assets/styles/global/_labeled-input.scss +6 -2
  8. package/assets/styles/global/_select.scss +6 -7
  9. package/assets/styles/global/_table.scss +3 -2
  10. package/assets/styles/global/_tooltip.scss +8 -1
  11. package/assets/styles/themes/_dark.scss +2 -0
  12. package/assets/styles/themes/_light.scss +5 -2
  13. package/assets/styles/vendor/vue-select.scss +2 -1
  14. package/assets/translations/en-us.yaml +1 -3
  15. package/assets/translations/zh-hans.yaml +51 -28
  16. package/components/ActionDropdown.vue +1 -0
  17. package/components/ActionMenuShell.vue +6 -3
  18. package/components/BrandImage.vue +22 -0
  19. package/components/ClusterIconMenu.vue +1 -1
  20. package/components/CodeMirror.vue +1 -0
  21. package/components/CruResource.vue +1 -1
  22. package/components/CruResourceFooter.vue +1 -1
  23. package/components/ExplorerProjectsNamespaces.vue +4 -25
  24. package/components/GlobalRoleBindings.vue +112 -48
  25. package/components/IndentedPanel.vue +4 -10
  26. package/components/PromptRemove.vue +3 -3
  27. package/components/ResourceDetail/Masthead.vue +190 -242
  28. package/components/ResourceDetail/index.vue +20 -5
  29. package/components/ResourceList/Masthead.vue +146 -84
  30. package/components/ResourceList/ResourceLoadingIndicator.vue +5 -2
  31. package/components/ResourceTable.vue +76 -1
  32. package/components/SideNav.vue +66 -29
  33. package/components/SortableTable/THead.vue +6 -0
  34. package/components/SortableTable/index.vue +480 -370
  35. package/components/Tabbed/index.vue +4 -5
  36. package/components/auth/Principal.vue +3 -2
  37. package/components/auth/RoleDetailEdit.vue +59 -6
  38. package/components/auth/SelectPrincipal.vue +1 -0
  39. package/components/form/BannerSettings.vue +18 -16
  40. package/components/form/ChangePassword.vue +4 -4
  41. package/components/form/ColorInput.vue +32 -8
  42. package/components/form/Footer.vue +1 -1
  43. package/components/form/InputWithSelect.vue +2 -0
  44. package/components/form/KeyValue.vue +31 -7
  45. package/components/form/LabeledSelect.vue +178 -178
  46. package/components/form/Members/ClusterPermissionsEditor.vue +1 -2
  47. package/components/form/Members/MembershipEditor.vue +1 -1
  48. package/components/form/NameNsDescription.vue +24 -11
  49. package/components/form/Password.vue +6 -2
  50. package/components/form/ResourceQuota/Namespace.vue +1 -1
  51. package/components/form/ResourceQuota/NamespaceRow.vue +13 -10
  52. package/components/form/ResourceQuota/ProjectRow.vue +0 -1
  53. package/components/form/Select.vue +2 -2
  54. package/components/nav/Favorite.vue +5 -1
  55. package/components/nav/Group.vue +69 -23
  56. package/components/nav/Header.vue +82 -17
  57. package/components/nav/HeaderPageActionMenu.vue +1 -0
  58. package/components/nav/NamespaceFilter.vue +0 -3
  59. package/components/nav/TopLevelMenu.vue +182 -119
  60. package/components/nav/Type.vue +48 -11
  61. package/composables/useClickOutside.ts +1 -1
  62. package/config/product/auth.js +16 -7
  63. package/config/product/explorer.js +1 -1
  64. package/config/product/settings.js +17 -8
  65. package/config/router/navigation-guards/index.js +3 -3
  66. package/config/settings.ts +28 -0
  67. package/edit/management.cattle.io.user.vue +17 -4
  68. package/edit/networking.k8s.io.ingress/RulePath.vue +1 -1
  69. package/edit/token.vue +1 -1
  70. package/list/harvesterhci.io.management.cluster.vue +17 -0
  71. package/list/management.cattle.io.setting.vue +22 -13
  72. package/list/management.cattle.io.user.vue +25 -14
  73. package/list/provisioning.cattle.io.cluster.vue +6 -7
  74. package/mixins/brand.js +17 -0
  75. package/package.json +1 -1
  76. package/pages/auth/login.vue +84 -29
  77. package/pages/c/_cluster/auth/roles/index.vue +61 -14
  78. package/pages/c/_cluster/settings/banners.vue +174 -101
  79. package/pages/c/_cluster/settings/brand.vue +348 -301
  80. package/pages/c/_cluster/settings/performance.vue +61 -38
  81. package/pages/home.vue +70 -21
  82. package/pages/prefs.vue +25 -23
  83. package/pkg/tsconfig.json +9 -9
  84. package/pkg/vue.config.js +1 -1
  85. package/promptRemove/mixin/roleDeletionCheck.js +2 -2
  86. package/scripts/clean +0 -0
  87. package/scripts/extension/bundle +0 -0
  88. package/scripts/extension/helm/scripts/package +0 -0
  89. package/scripts/extension/helm/scripts/patch +0 -0
  90. package/scripts/extension/helm/scripts/version +0 -0
  91. package/scripts/extension/helmpatch +0 -0
  92. package/scripts/extension/parse-tag-name +0 -0
  93. package/scripts/extension/publish +0 -0
  94. package/scripts/publish-shell.sh +86 -60
  95. package/scripts/serve-pkgs +0 -0
  96. package/scripts/sync-shell-deps +0 -0
  97. package/scripts/typegen.sh +44 -28
  98. package/store/i18n.js +5 -5
  99. package/store/prefs.js +17 -5
  100. package/store/type-map.js +2 -1
  101. package/types/shell/index.d.ts +1 -1
  102. package/utils/error.js +4 -0
  103. package/utils/router.js +4 -4
  104. package/vue.config.js +1 -6
  105. package/components/rancherResourceDetail/Masthead.vue +0 -769
  106. package/components/rancherResourceDetail/__tests__/Masthead.test.ts +0 -65
  107. package/components/rancherResourceDetail/index.vue +0 -591
  108. package/components/rancherResourceList/Masthead.vue +0 -375
  109. package/components/rancherResourceList/ResourceLoadingIndicator.vue +0 -140
  110. package/components/rancherResourceList/index.vue +0 -307
  111. package/components/rancherResourceList/resource-list.config.js +0 -7
  112. package/components/rancherResourceTable.vue +0 -783
  113. package/components/rancherSortableTable/THead.vue +0 -561
  114. package/components/rancherSortableTable/actions.js +0 -153
  115. package/components/rancherSortableTable/advanced-filtering.js +0 -272
  116. package/components/rancherSortableTable/debug.js +0 -117
  117. package/components/rancherSortableTable/filtering.js +0 -290
  118. package/components/rancherSortableTable/grouping.js +0 -48
  119. package/components/rancherSortableTable/index.vue +0 -2712
  120. package/components/rancherSortableTable/paging.js +0 -155
  121. package/components/rancherSortableTable/selection.js +0 -629
  122. package/components/rancherSortableTable/sortable-config.ts +0 -4
  123. package/components/rancherSortableTable/sorting.js +0 -129
  124. package/types/cloud-shell/index.d.ts +0 -11014
  125. /package/components/{rancherResourceList → ResourceList}/Masthead-btn.vue +0 -0
@@ -1,129 +0,0 @@
1
- import { sortBy } from '@shell/utils/sort';
2
- import { uniq } from '@shell/utils/array';
3
-
4
- /**
5
- * Always sort by something, this is the best guess on properties
6
- *
7
- * Can be overriden
8
- */
9
- const DEFAULT_MANDATORY_SORT = ['nameSort', 'id'];
10
-
11
- export default {
12
- computed: {
13
- sortFields() {
14
- let fromGroup = ( this.groupBy ? this.groupSort || this.groupBy : null) || [];
15
- let fromColumn = [];
16
-
17
- const column = (this.columns || this.headers).find((x) => x && x.name && x.name.toLowerCase() === this.sortBy.toLowerCase());
18
-
19
- if ( this.sortBy && column && column.sort ) {
20
- fromColumn = column.sort;
21
- }
22
-
23
- if ( !Array.isArray(fromGroup) ) {
24
- fromGroup = [fromGroup];
25
- }
26
-
27
- if ( !Array.isArray(fromColumn) ) {
28
- fromColumn = [fromColumn];
29
- }
30
-
31
- // return the sorting based on grouping, user selection and fallback
32
- return uniq([...fromGroup, ...fromColumn].concat(...(this.mandatorySort || DEFAULT_MANDATORY_SORT)));
33
- },
34
-
35
- arrangedRows() {
36
- if (this.externalPaginationEnabled) {
37
- return;
38
- }
39
-
40
- let key;
41
-
42
- // Why is sortGeneration needed when we have sortGenerationFn?
43
- // 1. sortGenerationFn is called when this fn is kicked off and returns latest and greatest string (given things like namespace)
44
- // 2. it can be kicked off with stale rows... which is then stored against latest string
45
- // 3. when updates rows comes through... sortGenerationFn returns same string
46
- // 4. we therefor think nothing has changed and return old, stale rows
47
- // This is avoided by outside storage of sortGeneration against rows
48
- // (it would be nice to have that hash on the rows object itself, but it gets messy)
49
- const sortGenerationKey = this.sortGeneration || this.sortGenerationFn?.apply(this);
50
-
51
- if ( sortGenerationKey) {
52
- key = `${ sortGenerationKey }/${ this.rows.length }/${ this.descending }/${ this.sortFields.join(',') }`;
53
- if ( this.cacheKey === key ) {
54
- return this.cachedRows;
55
- }
56
- }
57
-
58
- const out = sortBy(this.rows, this.sortFields, this.descending);
59
-
60
- if ( key ) {
61
- this.cacheKey = key;
62
- this.cachedRows = out;
63
- }
64
-
65
- return out;
66
- },
67
- },
68
-
69
- data() {
70
- let sortBy = null;
71
-
72
- this._defaultSortBy = this.defaultSortBy;
73
-
74
- // Try to find a reasonable default sort
75
- if ( !this._defaultSortBy ) {
76
- const markedColumn = this.headers.find((x) => !!x.defaultSort);
77
- const nameColumn = this.headers.find( (x) => x.name === 'name');
78
-
79
- if ( markedColumn ) {
80
- this._defaultSortBy = markedColumn.name;
81
- } else if ( nameColumn ) {
82
- // Use the name column if there is one
83
- this._defaultSortBy = nameColumn.name;
84
- } else {
85
- // The first column that isn't state
86
- const first = this.headers.filter( (x) => x.name !== 'state' )[0];
87
-
88
- if ( first ) {
89
- this._defaultSortBy = first.name;
90
- } else {
91
- // I give up
92
- this._defaultSortBy = 'id';
93
- }
94
- }
95
- }
96
-
97
- // If the sort column doesn't exist or isn't specified, use default
98
- if ( !sortBy || !this.headers.find((x) => x.name === sortBy ) ) {
99
- sortBy = this._defaultSortBy;
100
- }
101
-
102
- return {
103
- sortBy,
104
- descending: false,
105
- cachedRows: null,
106
- cacheKey: null,
107
- };
108
- },
109
-
110
- methods: {
111
- changeSort(sort, desc) {
112
- this.sortBy = sort;
113
- this.descending = desc;
114
-
115
- // Always go back to the first page when the sort is changed
116
- this.setPage(1);
117
- },
118
- },
119
-
120
- watch: {
121
- sortFields() {
122
- this.debouncedPaginationChanged();
123
- },
124
-
125
- descending() {
126
- this.debouncedPaginationChanged();
127
- }
128
- }
129
- };