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.
- package/assets/translations/zh-hans.yaml +1 -1
- package/components/CruResource.vue +1 -0
- package/components/ExplorerProjectsNamespaces.vue +35 -5
- package/components/PodSecurityAdmission.vue +1 -1
- package/components/ResourceDetail/Masthead.vue +6 -2
- package/components/SortableTable/selection.js +2 -2
- package/components/Tabbed/index.vue +1 -1
- 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-btn.vue +225 -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/config/table-headers.js +1 -1
- package/package.json +1 -1
- package/rancher-components/Banner/Banner.vue +2 -2
- package/rancher-components/RcDropdown/RcDropdownMenu.vue +2 -2
- package/scripts/publish-shell.sh +2 -0
- package/vue.config.js +5 -0
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
<script>
|
|
2
2
|
import { mapGetters, useStore } from 'vuex';
|
|
3
|
-
import ResourceTable, { defaultTableSortGenerationFn } from '@shell/components/
|
|
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/
|
|
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
|
|
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
|
|
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);
|
|
@@ -400,7 +400,9 @@ export default {
|
|
|
400
400
|
demoDisplay() {
|
|
401
401
|
const product = this.$store.getters['productId'];
|
|
402
402
|
|
|
403
|
-
const
|
|
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(
|
|
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);
|