dashboard-shell-shell 1.0.1000000117 → 1.0.1000000118
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.
- package/assets/styles/base/_functions.scss +0 -0
- package/assets/styles/base/_mixins.scss +1 -1
- package/assets/styles/global/_button.scss +10 -17
- package/assets/styles/global/_form.scss +2 -2
- package/assets/styles/global/_labeled-input.scss +2 -6
- package/assets/styles/global/_select.scss +7 -6
- package/assets/styles/global/_table.scss +2 -3
- package/assets/styles/global/_tooltip.scss +1 -8
- package/assets/styles/themes/_dark.scss +0 -2
- package/assets/styles/themes/_light.scss +2 -5
- package/assets/styles/vendor/vue-select.scss +1 -2
- package/assets/translations/en-us.yaml +3 -1
- package/assets/translations/zh-hans.yaml +28 -51
- package/components/ActionDropdown.vue +0 -1
- package/components/ActionMenuShell.vue +3 -6
- package/components/BrandImage.vue +0 -22
- package/components/ClusterIconMenu.vue +1 -1
- package/components/CodeMirror.vue +0 -1
- package/components/CruResource.vue +1 -1
- package/components/CruResourceFooter.vue +1 -1
- package/components/ExplorerProjectsNamespaces.vue +24 -4
- package/components/GlobalRoleBindings.vue +48 -112
- package/components/IndentedPanel.vue +10 -4
- package/components/PromptRemove.vue +3 -3
- package/components/ResourceDetail/Masthead.vue +242 -190
- package/components/ResourceDetail/index.vue +5 -20
- package/components/ResourceList/Masthead.vue +84 -146
- package/components/ResourceList/ResourceLoadingIndicator.vue +2 -5
- package/components/ResourceTable.vue +1 -76
- package/components/SideNav.vue +29 -66
- package/components/SortableTable/THead.vue +0 -6
- package/components/SortableTable/index.vue +388 -481
- package/components/Tabbed/index.vue +5 -4
- package/components/auth/Principal.vue +2 -3
- package/components/auth/RoleDetailEdit.vue +5 -58
- package/components/auth/SelectPrincipal.vue +0 -1
- package/components/form/BannerSettings.vue +16 -18
- package/components/form/ChangePassword.vue +4 -4
- package/components/form/ColorInput.vue +8 -32
- package/components/form/Footer.vue +1 -1
- package/components/form/InputWithSelect.vue +0 -2
- package/components/form/KeyValue.vue +7 -31
- package/components/form/LabeledSelect.vue +178 -178
- package/components/form/Members/ClusterPermissionsEditor.vue +2 -1
- package/components/form/Members/MembershipEditor.vue +1 -1
- package/components/form/NameNsDescription.vue +11 -24
- package/components/form/Password.vue +2 -6
- package/components/form/ResourceQuota/Namespace.vue +1 -1
- package/components/form/ResourceQuota/NamespaceRow.vue +10 -13
- package/components/form/ResourceQuota/ProjectRow.vue +1 -0
- package/components/form/Select.vue +2 -2
- package/components/nav/Favorite.vue +1 -5
- package/components/nav/Group.vue +23 -69
- package/components/nav/Header.vue +17 -82
- package/components/nav/HeaderPageActionMenu.vue +0 -1
- package/components/nav/NamespaceFilter.vue +3 -0
- package/components/nav/TopLevelMenu.vue +119 -182
- package/components/nav/Type.vue +11 -48
- package/components/rancherResourceDetail/Masthead.vue +769 -0
- package/components/rancherResourceDetail/__tests__/Masthead.test.ts +65 -0
- package/components/rancherResourceDetail/index.vue +591 -0
- package/components/rancherResourceList/Masthead.vue +375 -0
- package/components/rancherResourceList/ResourceLoadingIndicator.vue +140 -0
- package/components/rancherResourceList/index.vue +307 -0
- package/components/rancherResourceList/resource-list.config.js +7 -0
- package/components/rancherResourceTable.vue +783 -0
- package/components/rancherSortableTable/THead.vue +561 -0
- package/components/rancherSortableTable/actions.js +153 -0
- package/components/rancherSortableTable/advanced-filtering.js +272 -0
- package/components/rancherSortableTable/debug.js +117 -0
- package/components/rancherSortableTable/filtering.js +290 -0
- package/components/rancherSortableTable/grouping.js +48 -0
- package/components/rancherSortableTable/index.vue +2712 -0
- package/components/rancherSortableTable/paging.js +155 -0
- package/components/rancherSortableTable/selection.js +629 -0
- package/components/rancherSortableTable/sortable-config.ts +4 -0
- package/components/rancherSortableTable/sorting.js +129 -0
- package/composables/useClickOutside.ts +1 -1
- package/config/product/auth.js +7 -16
- package/config/product/explorer.js +1 -1
- package/config/product/settings.js +8 -17
- package/config/settings.ts +0 -28
- package/edit/management.cattle.io.user.vue +4 -17
- package/edit/networking.k8s.io.ingress/RulePath.vue +1 -1
- package/edit/token.vue +1 -1
- package/list/harvesterhci.io.management.cluster.vue +0 -17
- package/list/management.cattle.io.setting.vue +13 -22
- package/list/management.cattle.io.user.vue +14 -25
- package/list/provisioning.cattle.io.cluster.vue +7 -6
- package/mixins/brand.js +0 -17
- package/package.json +1 -1
- package/pages/auth/login.vue +29 -84
- package/pages/c/_cluster/auth/roles/index.vue +14 -61
- package/pages/c/_cluster/settings/banners.vue +101 -174
- package/pages/c/_cluster/settings/brand.vue +301 -348
- package/pages/c/_cluster/settings/performance.vue +38 -61
- package/pages/home.vue +21 -70
- package/pages/prefs.vue +23 -25
- package/pkg/tsconfig.json +9 -9
- package/pkg/vue.config.js +1 -1
- package/promptRemove/mixin/roleDeletionCheck.js +2 -2
- package/scripts/clean +0 -0
- package/scripts/extension/bundle +0 -0
- package/scripts/extension/helm/scripts/package +0 -0
- package/scripts/extension/helm/scripts/patch +0 -0
- package/scripts/extension/helm/scripts/version +0 -0
- package/scripts/extension/helmpatch +0 -0
- package/scripts/extension/parse-tag-name +0 -0
- package/scripts/extension/publish +0 -0
- package/scripts/publish-shell.sh +60 -86
- package/scripts/serve-pkgs +0 -0
- package/scripts/sync-shell-deps +0 -0
- package/scripts/typegen.sh +28 -44
- package/store/i18n.js +5 -5
- package/store/prefs.js +5 -17
- package/store/type-map.js +1 -2
- package/types/cloud-shell/index.d.ts +11014 -0
- package/types/shell/index.d.ts +1 -1
- package/utils/error.js +0 -4
- package/utils/router.js +3 -3
- package/vue.config.js +6 -1
- package/assets/images/action.svg +0 -6
- package/assets/images/pl/logo.png +0 -0
- /package/components/{ResourceList → rancherResourceList}/Masthead-btn.vue +0 -0
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
import { ROWS_PER_PAGE } from '@shell/store/prefs';
|
|
2
|
+
|
|
3
|
+
export default {
|
|
4
|
+
computed: {
|
|
5
|
+
totalRows() {
|
|
6
|
+
if (this.externalPaginationEnabled) {
|
|
7
|
+
return this.externalPaginationResult?.count || 0;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
return this.filteredRows.length;
|
|
11
|
+
},
|
|
12
|
+
|
|
13
|
+
indexFrom() {
|
|
14
|
+
return Math.max(0, 1 + this.perPage * (this.page - 1));
|
|
15
|
+
},
|
|
16
|
+
|
|
17
|
+
indexTo() {
|
|
18
|
+
// return Math.min(this.totalRows, this.indexFrom + this.perPage - 1);
|
|
19
|
+
return Math.min(this.totalRows, this.indexFrom + Number(this.perPage) - 1);
|
|
20
|
+
},
|
|
21
|
+
|
|
22
|
+
totalPages() {
|
|
23
|
+
return Math.ceil(this.totalRows / this.perPage );
|
|
24
|
+
},
|
|
25
|
+
|
|
26
|
+
showPaging() {
|
|
27
|
+
// if (!this.paging) {
|
|
28
|
+
// return false;
|
|
29
|
+
// }
|
|
30
|
+
|
|
31
|
+
// const havePages = this.totalPages > 1;
|
|
32
|
+
|
|
33
|
+
// if (this.altLoading) {
|
|
34
|
+
// return havePages;
|
|
35
|
+
// }
|
|
36
|
+
|
|
37
|
+
// return !this.loading && havePages;
|
|
38
|
+
return !this.loading && this.paging && this.totalPages >= 1;
|
|
39
|
+
},
|
|
40
|
+
|
|
41
|
+
pagingDisplay() {
|
|
42
|
+
const opt = {
|
|
43
|
+
...(this.pagingParams || {}),
|
|
44
|
+
|
|
45
|
+
count: this.totalRows,
|
|
46
|
+
pages: this.totalPages,
|
|
47
|
+
from: this.indexFrom,
|
|
48
|
+
to: this.indexTo,
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
return this.$store.getters['i18n/t'](this.pagingLabel, opt);
|
|
52
|
+
},
|
|
53
|
+
|
|
54
|
+
pagedRows() {
|
|
55
|
+
if (this.externalPaginationEnabled) {
|
|
56
|
+
return this.rows;
|
|
57
|
+
} else if ( this.paging ) {
|
|
58
|
+
return this.filteredRows.slice(this.indexFrom - 1, this.indexTo);
|
|
59
|
+
} else {
|
|
60
|
+
return this.filteredRows;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
|
|
65
|
+
data() {
|
|
66
|
+
// const perPage = this.getPerPage();
|
|
67
|
+
|
|
68
|
+
return { page: 1, perPage:10 };
|
|
69
|
+
},
|
|
70
|
+
|
|
71
|
+
watch: {
|
|
72
|
+
pagedRows() {
|
|
73
|
+
// Go to the last page if we end up "past" the last page because the table changed
|
|
74
|
+
|
|
75
|
+
const from = this.indexFrom;
|
|
76
|
+
const last = this.totalRows;
|
|
77
|
+
|
|
78
|
+
if ( this.totalPages > 0 && this.page > 1 && from > last ) {
|
|
79
|
+
this.setPage(this.totalPages);
|
|
80
|
+
}
|
|
81
|
+
},
|
|
82
|
+
|
|
83
|
+
// page() {
|
|
84
|
+
// this.debouncedPaginationChanged();
|
|
85
|
+
// },
|
|
86
|
+
|
|
87
|
+
// perPage() {
|
|
88
|
+
// this.debouncedPaginationChanged();
|
|
89
|
+
// },
|
|
90
|
+
|
|
91
|
+
},
|
|
92
|
+
|
|
93
|
+
methods: {
|
|
94
|
+
// getPerPage() {
|
|
95
|
+
// // perPage can not change while the list is displayed
|
|
96
|
+
// let out = this.rowsPerPage || 0;
|
|
97
|
+
|
|
98
|
+
// if ( out <= 0 ) {
|
|
99
|
+
// out = parseInt(this.$store.getters['prefs/get'](ROWS_PER_PAGE), 10) || 0;
|
|
100
|
+
// }
|
|
101
|
+
|
|
102
|
+
// // This should ideally never happen, but the preference value could be invalid, so return something...
|
|
103
|
+
// if ( out <= 0 ) {
|
|
104
|
+
// out = 10;
|
|
105
|
+
// }
|
|
106
|
+
|
|
107
|
+
// return out;
|
|
108
|
+
// },
|
|
109
|
+
|
|
110
|
+
|
|
111
|
+
setgetPerPage(num) {
|
|
112
|
+
this.setPage(1);
|
|
113
|
+
this.perPage = num;
|
|
114
|
+
},
|
|
115
|
+
|
|
116
|
+
setPage(num) {
|
|
117
|
+
if (this.page === num) {
|
|
118
|
+
return;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
this.page = num;
|
|
122
|
+
},
|
|
123
|
+
|
|
124
|
+
goToPage(which) {
|
|
125
|
+
let page;
|
|
126
|
+
|
|
127
|
+
switch (which) {
|
|
128
|
+
case 'first':
|
|
129
|
+
page = 1;
|
|
130
|
+
break;
|
|
131
|
+
case 'prev':
|
|
132
|
+
page = Math.max(1, this.page - 1 );
|
|
133
|
+
break;
|
|
134
|
+
case 'next':
|
|
135
|
+
page = Math.min(this.totalPages, this.page + 1 );
|
|
136
|
+
break;
|
|
137
|
+
case 'last':
|
|
138
|
+
page = this.totalPages;
|
|
139
|
+
break;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
this.setPage(page);
|
|
143
|
+
},
|
|
144
|
+
|
|
145
|
+
getPageByRow(rowId, getRowId = (x) => x) {
|
|
146
|
+
const pos = this.filteredRows.map(getRowId).indexOf(rowId);
|
|
147
|
+
|
|
148
|
+
if (pos === -1) {
|
|
149
|
+
return null;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
return Math.ceil(pos / this.perPage);
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
};
|