@rancher/shell 3.0.5-rc.6 → 3.0.5-rc.8
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/brand/classic/metadata.json +3 -0
- package/assets/styles/app.scss +1 -0
- package/assets/styles/base/_color.scss +16 -0
- package/assets/styles/base/_helpers.scss +10 -0
- package/assets/styles/base/_variables.scss +18 -12
- package/assets/styles/fonts/_icons.scss +1 -32
- package/assets/styles/global/_layout.scss +1 -1
- package/assets/styles/themes/_dark.scss +262 -258
- package/assets/styles/themes/_light.scss +538 -509
- package/assets/styles/themes/_modern.scss +914 -0
- package/assets/translations/en-us.yaml +110 -29
- package/chart/__tests__/S3.test.ts +2 -1
- package/cloud-credential/generic.vue +18 -10
- package/cloud-credential/harvester.vue +1 -9
- package/components/AdvancedSection.vue +8 -0
- package/components/ChartReadme.vue +17 -7
- package/components/CodeMirror.vue +1 -1
- package/components/Drawer/Chrome.vue +0 -1
- package/components/Drawer/ResourceDetailDrawer/__tests__/composables.test.ts +27 -28
- package/components/Drawer/ResourceDetailDrawer/composables.ts +4 -24
- package/components/Drawer/ResourceDetailDrawer/index.vue +18 -4
- package/components/InstallHelmCharts.vue +656 -0
- package/components/LazyImage.vue +60 -4
- package/components/Loading.vue +1 -1
- package/components/LocaleSelector.vue +7 -2
- package/components/Markdown.vue +4 -0
- package/components/PaginatedResourceTable.vue +46 -1
- package/components/PromptRestore.vue +22 -44
- package/components/Resource/Detail/Masthead/composable.ts +16 -0
- package/components/Resource/Detail/Masthead/index.vue +37 -0
- package/components/Resource/Detail/Metadata/IdentifyingInformation/composable.ts +10 -2
- package/components/Resource/Detail/Metadata/IdentifyingInformation/identifying-fields.ts +26 -7
- package/components/Resource/Detail/Metadata/IdentifyingInformation/index.vue +8 -1
- package/components/Resource/Detail/Metadata/KeyValue.vue +12 -10
- package/components/Resource/Detail/Metadata/Rectangle.vue +3 -1
- package/components/Resource/Detail/Metadata/__tests__/composables.test.ts +10 -17
- package/components/Resource/Detail/Metadata/composables.ts +9 -7
- package/components/Resource/Detail/Metadata/index.vue +17 -2
- package/components/Resource/Detail/Page.vue +35 -21
- package/components/Resource/Detail/SpacedRow.vue +1 -1
- package/components/Resource/Detail/TitleBar/__tests__/composables.test.ts +8 -9
- package/components/Resource/Detail/TitleBar/composables.ts +5 -5
- package/components/Resource/Detail/TitleBar/index.vue +12 -3
- package/components/ResourceDetail/Masthead/legacy.vue +1 -1
- package/components/ResourceDetail/index.vue +569 -72
- package/components/ResourceList/index.vue +1 -0
- package/components/ResourceTable.vue +6 -1
- package/components/ResourceYaml.vue +1 -1
- package/components/RichTranslation.vue +106 -0
- package/components/SlideInPanelManager.vue +13 -10
- package/components/SortableTable/index.vue +5 -5
- package/components/SortableTable/selection.js +0 -1
- package/components/Tabbed/index.vue +35 -4
- package/components/__tests__/LazyImage.spec.ts +121 -0
- package/components/__tests__/PromptRestore.test.ts +1 -65
- package/components/__tests__/RichTranslation.test.ts +115 -0
- package/components/fleet/FleetStatus.vue +4 -0
- package/components/fleet/dashboard/ResourcePanel.vue +2 -1
- package/components/form/ClusterAppearance.vue +5 -0
- package/components/form/FileImageSelector.vue +1 -1
- package/components/form/Members/ClusterPermissionsEditor.vue +1 -1
- package/components/form/NameNsDescription.vue +1 -0
- package/components/form/Networking.vue +24 -19
- package/components/form/ProjectMemberEditor.vue +1 -1
- package/components/form/ResourceLabeledSelect.vue +22 -8
- package/components/form/ResourceTabs/index.vue +20 -0
- package/components/form/SecretSelector.vue +9 -0
- package/components/form/SelectOrCreateAuthSecret.vue +6 -3
- package/components/form/__tests__/Networking.test.ts +116 -0
- package/components/form/labeled-select-utils/labeled-select-pagination.ts +3 -38
- package/components/formatter/FleetApplicationSource.vue +25 -17
- package/components/formatter/PodImages.vue +1 -1
- package/components/formatter/__tests__/LiveDate.test.ts +10 -2
- package/components/google/AccountAccess.vue +44 -46
- package/components/nav/Favorite.vue +4 -0
- package/components/nav/Group.vue +4 -1
- package/components/nav/NotificationCenter/Notification.vue +1 -27
- package/components/nav/WindowManager/index.vue +3 -3
- package/composables/resources.ts +2 -2
- package/config/labels-annotations.js +3 -2
- package/config/pagination-table-headers.js +8 -1
- package/config/product/explorer.js +27 -2
- package/config/product/manager.js +0 -1
- package/config/query-params.js +10 -0
- package/config/router/routes.js +21 -1
- package/config/system-namespaces.js +1 -1
- package/config/table-headers.js +30 -1
- package/config/types.js +1 -1
- package/config/version.js +1 -1
- package/detail/__tests__/provisioning.cattle.io.cluster.test.ts +11 -0
- package/detail/__tests__/workload.test.ts +164 -0
- package/detail/configmap.vue +33 -75
- package/detail/projectsecret.vue +11 -0
- package/detail/provisioning.cattle.io.cluster.vue +351 -369
- package/detail/secret.vue +49 -308
- package/detail/workload/index.vue +38 -21
- package/dialog/InstallExtensionDialog.vue +8 -5
- package/dialog/RotateEncryptionKeyDialog.vue +10 -30
- package/edit/__tests__/fleet.cattle.io.helmop.test.ts +224 -0
- package/edit/auth/ldap/__tests__/config.test.ts +14 -0
- package/edit/auth/ldap/config.vue +24 -0
- package/edit/compliance.cattle.io.clusterscan.vue +1 -1
- package/edit/configmap.vue +4 -1
- package/edit/fleet.cattle.io.gitrepo.vue +5 -6
- package/edit/fleet.cattle.io.helmop.vue +78 -56
- package/edit/logging.banzaicloud.io.output/index.vue +1 -1
- package/edit/logging.banzaicloud.io.output/providers/awsElasticsearch.vue +5 -6
- package/edit/networking.k8s.io.ingress/Certificate.vue +20 -22
- package/edit/networking.k8s.io.ingress/DefaultBackend.vue +8 -3
- package/edit/networking.k8s.io.ingress/Rule.vue +2 -5
- package/edit/networking.k8s.io.ingress/RulePath.vue +17 -11
- package/edit/networking.k8s.io.ingress/__tests__/Certificate.test.ts +165 -0
- package/edit/networking.k8s.io.networkpolicy/PolicyRuleTarget.vue +11 -10
- package/edit/networking.k8s.io.networkpolicy/PolicyRules.vue +1 -3
- package/edit/networking.k8s.io.networkpolicy/index.vue +17 -17
- package/edit/provisioning.cattle.io.cluster/__tests__/rke2.test.ts +3 -2
- package/edit/provisioning.cattle.io.cluster/rke2.vue +123 -61
- package/edit/provisioning.cattle.io.cluster/tabs/AgentConfiguration.vue +9 -7
- package/edit/provisioning.cattle.io.cluster/tabs/Basics.vue +22 -13
- package/edit/provisioning.cattle.io.cluster/tabs/DirectoryConfig.vue +10 -12
- package/edit/provisioning.cattle.io.cluster/tabs/MachinePool.vue +39 -38
- package/edit/provisioning.cattle.io.cluster/tabs/etcd/S3Config.vue +41 -19
- package/edit/provisioning.cattle.io.cluster/tabs/etcd/index.vue +16 -3
- package/edit/provisioning.cattle.io.cluster/tabs/registries/RegistryConfigs.vue +32 -33
- package/edit/provisioning.cattle.io.cluster/tabs/registries/RegistryMirrors.vue +9 -10
- package/edit/provisioning.cattle.io.cluster/tabs/registries/index.vue +1 -3
- package/edit/provisioning.cattle.io.cluster/tabs/upgrade/DrainOptions.vue +16 -9
- package/edit/secret/basic.vue +1 -0
- package/edit/secret/index.vue +126 -15
- package/edit/workload/index.vue +5 -14
- package/list/projectsecret.vue +345 -0
- package/list/provisioning.cattle.io.cluster.vue +1 -69
- package/list/secret.vue +109 -0
- package/machine-config/__tests__/vmwarevsphere.test.ts +5 -7
- package/machine-config/google.vue +9 -1
- package/machine-config/vmwarevsphere.vue +7 -17
- package/mixins/__tests__/brand.spec.ts +2 -2
- package/mixins/chart.js +0 -2
- package/mixins/create-edit-view/impl.js +10 -1
- package/mixins/resource-fetch-api-pagination.js +11 -12
- package/mixins/resource-fetch.js +3 -1
- package/models/__tests__/chart.test.ts +111 -80
- package/models/__tests__/fleet.cattle.io.helmop.test.ts +224 -0
- package/models/__tests__/node.test.ts +7 -63
- package/models/catalog.cattle.io.app.js +1 -1
- package/models/catalog.cattle.io.operation.js +1 -1
- package/models/chart.js +36 -20
- package/models/cloudcredential.js +2 -163
- package/models/cluster/node.js +7 -7
- package/models/cluster.x-k8s.io.machine.js +3 -3
- package/models/cluster.x-k8s.io.machinedeployment.js +11 -2
- package/models/compliance.cattle.io.clusterscan.js +2 -2
- package/models/configmap.js +4 -0
- package/models/constraints.gatekeeper.sh.constraint.js +1 -1
- package/models/fleet-application.js +0 -17
- package/models/fleet.cattle.io.cluster.js +2 -2
- package/models/fleet.cattle.io.gitrepo.js +15 -1
- package/models/fleet.cattle.io.helmop.js +26 -22
- package/models/management.cattle.io.setting.js +4 -0
- package/models/persistentvolumeclaim.js +1 -1
- package/models/pod.js +2 -2
- package/models/provisioning.cattle.io.cluster.js +39 -67
- package/models/rke.cattle.io.etcdsnapshot.js +1 -1
- package/models/secret.js +161 -2
- package/models/storage.k8s.io.storageclass.js +2 -2
- package/models/workload.js +3 -3
- package/package.json +11 -10
- package/pages/c/_cluster/apps/charts/AppChartCardFooter.vue +1 -0
- package/pages/c/_cluster/apps/charts/AppChartCardSubHeader.vue +4 -1
- package/pages/c/_cluster/apps/charts/__tests__/AppChartCardFooter.spec.js +41 -0
- package/pages/c/_cluster/apps/charts/chart.vue +422 -174
- package/pages/c/_cluster/apps/charts/index.vue +46 -35
- package/pages/c/_cluster/apps/charts/install.vue +1 -1
- package/pages/c/_cluster/explorer/projectsecret.vue +24 -0
- package/pages/c/_cluster/fleet/__tests__/index.test.ts +608 -314
- package/pages/c/_cluster/fleet/index.vue +103 -45
- package/pages/c/_cluster/manager/cloudCredential/index.vue +2 -59
- package/pages/c/_cluster/uiplugins/PluginInfoPanel.vue +10 -3
- package/pages/c/_cluster/uiplugins/index.vue +36 -25
- package/plugins/dashboard-store/__tests__/normalize.test.ts +223 -0
- package/plugins/dashboard-store/__tests__/resource-class.test.ts +191 -0
- package/plugins/dashboard-store/__tests__/utils/normalize-usecases.ts +1526 -0
- package/plugins/dashboard-store/actions.js +42 -22
- package/plugins/dashboard-store/normalize.js +29 -17
- package/plugins/dashboard-store/resource-class.js +83 -17
- package/plugins/steve/__tests__/getters.test.ts +1 -1
- package/plugins/steve/__tests__/subscribe.spec.ts +259 -1
- package/plugins/steve/getters.js +8 -2
- package/plugins/steve/resourceWatcher.js +10 -3
- package/plugins/steve/steve-pagination-utils.ts +14 -3
- package/plugins/steve/subscribe.js +192 -19
- package/plugins/steve/worker/web-worker.advanced.js +2 -0
- package/rancher-components/Card/Card.vue +0 -18
- package/rancher-components/Pill/RcStatusBadge/RcStatusBadge.test.ts +15 -0
- package/rancher-components/Pill/RcStatusBadge/RcStatusBadge.vue +65 -0
- package/rancher-components/Pill/RcStatusBadge/index.ts +2 -0
- package/rancher-components/Pill/RcStatusBadge/types.ts +5 -0
- package/rancher-components/Pill/RcStatusIndicator/RcStatusIndicator.test.ts +33 -0
- package/rancher-components/Pill/RcStatusIndicator/RcStatusIndicator.vue +75 -0
- package/rancher-components/Pill/RcStatusIndicator/index.ts +2 -0
- package/rancher-components/Pill/RcStatusIndicator/types.ts +7 -0
- package/rancher-components/Pill/types.ts +2 -0
- package/rancher-components/RcButton/RcButton.vue +1 -1
- package/rancher-components/RcDropdown/RcDropdown.test.ts +98 -0
- package/rancher-components/RcDropdown/RcDropdown.vue +5 -0
- package/rancher-components/RcDropdown/RcDropdownItem.vue +7 -1
- package/rancher-components/RcDropdown/RcDropdownItemCheckbox.vue +2 -1
- package/rancher-components/RcDropdown/RcDropdownItemSelect.vue +2 -1
- package/rancher-components/RcDropdown/useDropdownContext.ts +21 -0
- package/rancher-components/RcDropdown/useDropdownItem.ts +30 -1
- package/rancher-components/RcItemCard/RcItemCard.test.ts +20 -0
- package/rancher-components/RcItemCard/RcItemCard.vue +40 -6
- package/store/__tests__/catalog.test.ts +93 -1
- package/store/aws.js +19 -8
- package/store/catalog.js +8 -3
- package/types/kube/kube-api.ts +12 -0
- package/types/resources/settings.d.ts +1 -1
- package/types/shell/index.d.ts +643 -585
- package/types/store/pagination.types.ts +16 -6
- package/types/uiplugins.ts +73 -0
- package/utils/__tests__/back-off.test.ts +354 -0
- package/utils/__tests__/create-yaml.test.ts +235 -0
- package/utils/__tests__/kontainer.test.ts +19 -0
- package/utils/__tests__/uiplugins.test.ts +84 -0
- package/utils/back-off.ts +176 -0
- package/utils/create-yaml.js +103 -9
- package/utils/dynamic-importer.js +8 -0
- package/utils/kontainer.ts +3 -5
- package/utils/pagination-utils.ts +18 -0
- package/utils/style.ts +3 -0
- package/utils/uiplugins.ts +29 -2
- package/utils/validators/__tests__/setting.test.js +92 -0
- package/utils/validators/formRules/__tests__/index.test.ts +88 -7
- package/utils/validators/formRules/index.ts +83 -8
- package/utils/validators/setting.js +17 -0
- package/cloud-credential/__tests__/harvester.test.ts +0 -18
- package/components/ResourceDetail/__tests__/index.test.ts +0 -135
- package/components/ResourceDetail/legacy.vue +0 -562
- package/components/formatter/CloudCredExpired.vue +0 -69
- package/models/etcdbackup.js +0 -45
- package/pages/explorer/resource/detail/configmap.vue +0 -42
- package/pages/explorer/resource/detail/secret.vue +0 -50
- package/utils/aws.js +0 -0
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
<script>
|
|
2
|
+
import debounce from 'lodash/debounce';
|
|
2
3
|
import { getVersionData } from '@shell/config/version';
|
|
3
4
|
import { mapState, mapGetters } from 'vuex';
|
|
4
5
|
import { isEmpty } from '@shell/utils/object';
|
|
@@ -103,13 +104,13 @@ export default {
|
|
|
103
104
|
|
|
104
105
|
data() {
|
|
105
106
|
return {
|
|
106
|
-
permissions:
|
|
107
|
+
permissions: {},
|
|
107
108
|
FLEET,
|
|
108
|
-
[FLEET.
|
|
109
|
-
[FLEET.HELM_OP]:
|
|
110
|
-
fleetWorkspaces:
|
|
109
|
+
[FLEET.GIT_REPO]: [],
|
|
110
|
+
[FLEET.HELM_OP]: [],
|
|
111
|
+
fleetWorkspaces: [],
|
|
111
112
|
VIEW_MODE,
|
|
112
|
-
viewModeOptions:
|
|
113
|
+
viewModeOptions: [
|
|
113
114
|
{
|
|
114
115
|
tooltipKey: 'fleet.dashboard.viewMode.table',
|
|
115
116
|
icon: 'icon-list-flat',
|
|
@@ -129,6 +130,7 @@ export default {
|
|
|
129
130
|
isStateCollapsed: {},
|
|
130
131
|
typeFilter: {},
|
|
131
132
|
stateFilter: {},
|
|
133
|
+
searchFilter: {},
|
|
132
134
|
selectedCard: null,
|
|
133
135
|
presetVersion: getVersionData()?.Version,
|
|
134
136
|
};
|
|
@@ -136,6 +138,10 @@ export default {
|
|
|
136
138
|
|
|
137
139
|
created() {
|
|
138
140
|
this.$store.dispatch('showWorkspaceSwitcher', false);
|
|
141
|
+
|
|
142
|
+
this.debouncedUpdateSearchFilter = debounce((workspace, value) => {
|
|
143
|
+
this.searchFilter[workspace] = value;
|
|
144
|
+
}, 300);
|
|
139
145
|
},
|
|
140
146
|
|
|
141
147
|
mounted() {
|
|
@@ -323,7 +329,6 @@ export default {
|
|
|
323
329
|
workspace,
|
|
324
330
|
showHeader: false,
|
|
325
331
|
width: window.innerWidth / 3 > 530 ? `${ window.innerWidth / 3 }px` : '530px',
|
|
326
|
-
zIndex: 1,
|
|
327
332
|
triggerFocusTrap: true,
|
|
328
333
|
returnFocusSelector: `[data-testid="resource-card-${ value.id }"]`
|
|
329
334
|
}
|
|
@@ -358,7 +363,8 @@ export default {
|
|
|
358
363
|
|
|
359
364
|
_filterResources(state) {
|
|
360
365
|
return state.resources.filter((item) => this._decodeTypeFilter(item.namespace, item.type) &&
|
|
361
|
-
this._decodeStateFilter(item.namespace, state)
|
|
366
|
+
this._decodeStateFilter(item.namespace, state) &&
|
|
367
|
+
this._decodeSearchFilter(item.namespace, item.nameDisplay)
|
|
362
368
|
);
|
|
363
369
|
},
|
|
364
370
|
|
|
@@ -370,7 +376,7 @@ export default {
|
|
|
370
376
|
},
|
|
371
377
|
|
|
372
378
|
_stateExistsInWorkspace(workspace, state) {
|
|
373
|
-
return !!this.applicationStates[workspace]
|
|
379
|
+
return !!this.applicationStates[workspace]?.find((s) => s.statePanel.id === state);
|
|
374
380
|
},
|
|
375
381
|
|
|
376
382
|
_decodeStateFilter(workspace, state) {
|
|
@@ -384,17 +390,33 @@ export default {
|
|
|
384
390
|
return true;
|
|
385
391
|
}
|
|
386
392
|
|
|
387
|
-
|
|
393
|
+
return !!this.stateFilter[workspace]?.[state.statePanel.id];
|
|
394
|
+
},
|
|
395
|
+
|
|
396
|
+
_decodeTypeFilter(workspace, type) {
|
|
397
|
+
if (isEmpty(this.typeFilter)) {
|
|
388
398
|
return true;
|
|
389
399
|
}
|
|
390
400
|
|
|
391
|
-
|
|
401
|
+
if (!this.viewMode) {
|
|
402
|
+
return true;
|
|
403
|
+
}
|
|
404
|
+
|
|
405
|
+
return !!this.typeFilter[workspace]?.[type];
|
|
392
406
|
},
|
|
393
407
|
|
|
394
|
-
|
|
395
|
-
|
|
408
|
+
_decodeSearchFilter(workspace, name) {
|
|
409
|
+
if (isEmpty(this.searchFilter)) {
|
|
410
|
+
return true;
|
|
411
|
+
}
|
|
412
|
+
|
|
413
|
+
if (this.viewMode !== VIEW_MODE.CARDS) {
|
|
414
|
+
return true;
|
|
415
|
+
}
|
|
416
|
+
|
|
417
|
+
const search = this.searchFilter[workspace];
|
|
396
418
|
|
|
397
|
-
return
|
|
419
|
+
return !search || name?.includes(search);
|
|
398
420
|
},
|
|
399
421
|
|
|
400
422
|
_cleanStateFilter(workspace) {
|
|
@@ -430,12 +452,15 @@ export default {
|
|
|
430
452
|
};
|
|
431
453
|
|
|
432
454
|
this.stateFilter[ws.id] = {};
|
|
455
|
+
|
|
456
|
+
this.searchFilter[ws.id] = '';
|
|
433
457
|
});
|
|
434
458
|
|
|
435
459
|
this.preset('isWorkspaceCollapsed', 'object');
|
|
436
460
|
this.preset('isStateCollapsed', 'object');
|
|
437
461
|
this.preset('typeFilter', 'object');
|
|
438
462
|
this.preset('stateFilter', 'object');
|
|
463
|
+
this.preset('searchFilter', 'object');
|
|
439
464
|
}
|
|
440
465
|
}
|
|
441
466
|
}
|
|
@@ -560,6 +585,7 @@ export default {
|
|
|
560
585
|
small
|
|
561
586
|
ghost
|
|
562
587
|
:aria-label="`workspace-expand-btn-${ workspace.id }`"
|
|
588
|
+
:data-testid="`workspace-expand-btn-${ workspace.id }`"
|
|
563
589
|
@click="toggleCard(workspace.id)"
|
|
564
590
|
>
|
|
565
591
|
<i
|
|
@@ -579,27 +605,44 @@ export default {
|
|
|
579
605
|
:data-testid="`fleet-dashboard-expanded-panel-${ workspace.id }`"
|
|
580
606
|
>
|
|
581
607
|
<div class="actions">
|
|
582
|
-
<div class="
|
|
583
|
-
<
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
@update:value="selectType(workspace.id, FLEET.GIT_REPO, $event)"
|
|
587
|
-
>
|
|
588
|
-
<template #label>
|
|
589
|
-
<i class="icon icon-lg icon-git mr-5" />
|
|
590
|
-
<span class="label">{{ t('fleet.dashboard.cards.filters.gitRepos') }}</span>
|
|
591
|
-
</template>
|
|
592
|
-
</Checkbox>
|
|
593
|
-
<Checkbox
|
|
594
|
-
:data-testid="'fleet-dashboard-filter-helm-ops'"
|
|
595
|
-
:value="typeFilter[workspace.id]?.[FLEET.HELM_OP]"
|
|
596
|
-
@update:value="selectType(workspace.id, FLEET.HELM_OP, $event)"
|
|
608
|
+
<div class="resource-filters">
|
|
609
|
+
<div
|
|
610
|
+
v-if="viewMode === VIEW_MODE.CARDS"
|
|
611
|
+
class="search-filter"
|
|
597
612
|
>
|
|
598
|
-
<
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
613
|
+
<input
|
|
614
|
+
:value="searchFilter[workspace.id]"
|
|
615
|
+
type="search"
|
|
616
|
+
role="textbox"
|
|
617
|
+
class="input"
|
|
618
|
+
:data-testid="`fleet-dashboard-search-input-${ workspace.id }`"
|
|
619
|
+
:aria-label="t('fleet.dashboard.cards.search')"
|
|
620
|
+
:placeholder="t('fleet.dashboard.cards.search')"
|
|
621
|
+
@input="debouncedUpdateSearchFilter(workspace.id, $event.target.value)"
|
|
622
|
+
>
|
|
623
|
+
</div>
|
|
624
|
+
<div class="type-filter">
|
|
625
|
+
<Checkbox
|
|
626
|
+
:data-testid="'fleet-dashboard-filter-git-repos'"
|
|
627
|
+
:value="typeFilter[workspace.id]?.[FLEET.GIT_REPO]"
|
|
628
|
+
@update:value="selectType(workspace.id, FLEET.GIT_REPO, $event)"
|
|
629
|
+
>
|
|
630
|
+
<template #label>
|
|
631
|
+
<i class="icon icon-lg icon-git mr-5" />
|
|
632
|
+
<span class="label">{{ t('fleet.dashboard.cards.filters.gitRepos') }}</span>
|
|
633
|
+
</template>
|
|
634
|
+
</Checkbox>
|
|
635
|
+
<Checkbox
|
|
636
|
+
:data-testid="'fleet-dashboard-filter-helm-ops'"
|
|
637
|
+
:value="typeFilter[workspace.id]?.[FLEET.HELM_OP]"
|
|
638
|
+
@update:value="selectType(workspace.id, FLEET.HELM_OP, $event)"
|
|
639
|
+
>
|
|
640
|
+
<template #label>
|
|
641
|
+
<i class="icon icon-lg icon-helm mr-5" />
|
|
642
|
+
<span class="label">{{ t('fleet.dashboard.cards.filters.helmOps') }}</span>
|
|
643
|
+
</template>
|
|
644
|
+
</Checkbox>
|
|
645
|
+
</div>
|
|
603
646
|
</div>
|
|
604
647
|
<div
|
|
605
648
|
v-if="permissions.gitRepos || permissions.helmOps"
|
|
@@ -614,7 +657,7 @@ export default {
|
|
|
614
657
|
</div>
|
|
615
658
|
</div>
|
|
616
659
|
<div
|
|
617
|
-
v-if="viewMode ===
|
|
660
|
+
v-if="viewMode === VIEW_MODE.CARDS"
|
|
618
661
|
class="cards-panel"
|
|
619
662
|
>
|
|
620
663
|
<div
|
|
@@ -843,23 +886,38 @@ export default {
|
|
|
843
886
|
align-items: center;
|
|
844
887
|
justify-content: space-between;
|
|
845
888
|
|
|
846
|
-
.
|
|
889
|
+
.resource-filters {
|
|
847
890
|
display: flex;
|
|
848
|
-
flex-direction:
|
|
849
|
-
|
|
891
|
+
flex-direction: row;
|
|
892
|
+
align-items: center;
|
|
850
893
|
|
|
851
|
-
.
|
|
852
|
-
|
|
894
|
+
.type-filter {
|
|
895
|
+
display: flex;
|
|
896
|
+
flex-direction: column;
|
|
897
|
+
margin-top: 5px;
|
|
898
|
+
|
|
899
|
+
.checkbox-outer-container {
|
|
900
|
+
width: fit-content;
|
|
901
|
+
}
|
|
902
|
+
|
|
903
|
+
.label {
|
|
904
|
+
margin-top: 2px;
|
|
905
|
+
line-height: 20px;
|
|
906
|
+
}
|
|
907
|
+
|
|
908
|
+
.icon {
|
|
909
|
+
padding: 2px;
|
|
910
|
+
font-size: 25px;
|
|
911
|
+
}
|
|
853
912
|
}
|
|
854
913
|
|
|
855
|
-
.
|
|
914
|
+
.search-filter {
|
|
856
915
|
margin-top: 2px;
|
|
857
|
-
|
|
858
|
-
}
|
|
916
|
+
margin-right: 32px;
|
|
859
917
|
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
918
|
+
input {
|
|
919
|
+
width: 190px;
|
|
920
|
+
}
|
|
863
921
|
}
|
|
864
922
|
}
|
|
865
923
|
}
|
|
@@ -10,14 +10,12 @@ import {
|
|
|
10
10
|
NAME_UNLINKED,
|
|
11
11
|
} from '@shell/config/table-headers';
|
|
12
12
|
import { allHash } from 'utils/promise';
|
|
13
|
-
import { Banner } from '@components/Banner';
|
|
14
13
|
|
|
15
14
|
export default {
|
|
16
15
|
components: {
|
|
17
16
|
Loading,
|
|
18
17
|
ResourceTable,
|
|
19
18
|
Masthead,
|
|
20
|
-
Banner
|
|
21
19
|
},
|
|
22
20
|
|
|
23
21
|
async fetch() {
|
|
@@ -32,8 +30,6 @@ export default {
|
|
|
32
30
|
const hash = await allHash(promises);
|
|
33
31
|
|
|
34
32
|
this.allCredentials = hash.allCredentials;
|
|
35
|
-
// This can be optimized in future to to a quick fetch for those with annotation `"provisioning.cattle.io/driver": "harvester"`
|
|
36
|
-
this.hasHarvester = !!this.allCredentials.find((cc) => !!cc.harvestercredentialConfig);
|
|
37
33
|
},
|
|
38
34
|
|
|
39
35
|
data() {
|
|
@@ -50,7 +46,7 @@ export default {
|
|
|
50
46
|
},
|
|
51
47
|
|
|
52
48
|
headers() {
|
|
53
|
-
|
|
49
|
+
return [
|
|
54
50
|
ID_UNLINKED,
|
|
55
51
|
NAME_UNLINKED,
|
|
56
52
|
{
|
|
@@ -62,21 +58,8 @@ export default {
|
|
|
62
58
|
formatter: 'CloudCredPublicData',
|
|
63
59
|
},
|
|
64
60
|
DESCRIPTION,
|
|
61
|
+
AGE_NORMAN
|
|
65
62
|
];
|
|
66
|
-
|
|
67
|
-
if (this.hasHarvester) {
|
|
68
|
-
headers.push({
|
|
69
|
-
name: 'expiresDate',
|
|
70
|
-
labelKey: 'tableHeaders.expires',
|
|
71
|
-
value: 'expires',
|
|
72
|
-
sort: 'expiresForSort',
|
|
73
|
-
formatter: 'CloudCredExpired',
|
|
74
|
-
});
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
headers.push(AGE_NORMAN);
|
|
78
|
-
|
|
79
|
-
return headers;
|
|
80
63
|
},
|
|
81
64
|
|
|
82
65
|
createLocation() {
|
|
@@ -88,29 +71,6 @@ export default {
|
|
|
88
71
|
},
|
|
89
72
|
};
|
|
90
73
|
},
|
|
91
|
-
|
|
92
|
-
expiredData() {
|
|
93
|
-
const counts = this.allCredentials.reduce((res, cc) => {
|
|
94
|
-
const expireData = cc.expireData;
|
|
95
|
-
|
|
96
|
-
if (expireData?.expiring) {
|
|
97
|
-
res.expiring++;
|
|
98
|
-
}
|
|
99
|
-
if (expireData?.expired) {
|
|
100
|
-
res.expired++;
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
return res;
|
|
104
|
-
}, {
|
|
105
|
-
expiring: 0,
|
|
106
|
-
expired: 0
|
|
107
|
-
});
|
|
108
|
-
|
|
109
|
-
return {
|
|
110
|
-
expiring: counts.expiring ? this.t('manager.cloudCredentials.banners.expiring', { count: counts.expiring }) : '',
|
|
111
|
-
expired: counts.expired ? this.t('manager.cloudCredentials.banners.expired', { count: counts.expired }) : '',
|
|
112
|
-
};
|
|
113
|
-
}
|
|
114
74
|
},
|
|
115
75
|
|
|
116
76
|
};
|
|
@@ -125,17 +85,6 @@ export default {
|
|
|
125
85
|
:create-location="createLocation"
|
|
126
86
|
:type-display="t('manager.cloudCredentials.label')"
|
|
127
87
|
/>
|
|
128
|
-
<Banner
|
|
129
|
-
v-if="expiredData.expiring"
|
|
130
|
-
data-testid="cert-expiring-banner"
|
|
131
|
-
color="warning"
|
|
132
|
-
:label="expiredData.expiring"
|
|
133
|
-
/>
|
|
134
|
-
<Banner
|
|
135
|
-
v-if="expiredData.expired"
|
|
136
|
-
color="error"
|
|
137
|
-
:label="expiredData.expired"
|
|
138
|
-
/>
|
|
139
88
|
|
|
140
89
|
<ResourceTable
|
|
141
90
|
:schema="schema"
|
|
@@ -150,9 +99,3 @@ export default {
|
|
|
150
99
|
</ResourceTable>
|
|
151
100
|
</div>
|
|
152
101
|
</template>
|
|
153
|
-
|
|
154
|
-
<style lang="scss" scoped>
|
|
155
|
-
.banner {
|
|
156
|
-
margin: 0 0 10px 0
|
|
157
|
-
}
|
|
158
|
-
</style>
|
|
@@ -6,6 +6,7 @@ import LazyImage from '@shell/components/LazyImage';
|
|
|
6
6
|
import { MANAGEMENT } from '@shell/config/types';
|
|
7
7
|
import { SETTING } from '@shell/config/settings';
|
|
8
8
|
import { useWatcherBasedSetupFocusTrapWithDestroyIncluded } from '@shell/composables/focusTrap';
|
|
9
|
+
import { getPluginChartVersionLabel, getPluginChartVersion } from '@shell/utils/uiplugins';
|
|
9
10
|
|
|
10
11
|
export default {
|
|
11
12
|
async fetch() {
|
|
@@ -79,9 +80,11 @@ export default {
|
|
|
79
80
|
},
|
|
80
81
|
|
|
81
82
|
async loadPluginVersionInfo(version) {
|
|
82
|
-
const
|
|
83
|
+
const pluginChartVersion = getPluginChartVersion(this.info);
|
|
83
84
|
|
|
84
|
-
const
|
|
85
|
+
const versionName = version || pluginChartVersion || this.info.versions?.[0]?.version;
|
|
86
|
+
|
|
87
|
+
const isVersionNotCompatible = this.info.versions?.find((v) => versionName === (v.appVersion ?? v.version) && !v.isVersionCompatible);
|
|
85
88
|
|
|
86
89
|
if (!this.info.chart || isVersionNotCompatible) {
|
|
87
90
|
return;
|
|
@@ -147,6 +150,10 @@ export default {
|
|
|
147
150
|
if (event.key === 'Escape') {
|
|
148
151
|
this.hide();
|
|
149
152
|
}
|
|
153
|
+
},
|
|
154
|
+
|
|
155
|
+
getVersionLabel(version) {
|
|
156
|
+
return getPluginChartVersionLabel(version);
|
|
150
157
|
}
|
|
151
158
|
}
|
|
152
159
|
};
|
|
@@ -264,7 +271,7 @@ export default {
|
|
|
264
271
|
@click="loadPluginVersionInfo(v.version)"
|
|
265
272
|
@keyup.enter.space="loadPluginVersionInfo(v.version)"
|
|
266
273
|
>
|
|
267
|
-
{{ v
|
|
274
|
+
{{ getVersionLabel(v) }}
|
|
268
275
|
</a>
|
|
269
276
|
</div>
|
|
270
277
|
</div>
|
|
@@ -32,6 +32,7 @@ import {
|
|
|
32
32
|
} from '@shell/config/uiplugins';
|
|
33
33
|
import TabTitle from '@shell/components/TabTitle';
|
|
34
34
|
import versions from '@shell/utils/versions';
|
|
35
|
+
import { getPluginChartVersionLabel } from '@shell/utils/uiplugins';
|
|
35
36
|
|
|
36
37
|
const MAX_DESCRIPTION_LENGTH = 200;
|
|
37
38
|
|
|
@@ -272,12 +273,14 @@ export default {
|
|
|
272
273
|
item.certified = latestCompatible?.annotations?.[CATALOG_ANNOTATIONS.CERTIFIED] === CATALOG_ANNOTATIONS._RANCHER;
|
|
273
274
|
|
|
274
275
|
item.displayVersion = latestCompatible.version;
|
|
276
|
+
item.displayVersionLabel = getPluginChartVersionLabel(latestCompatible);
|
|
275
277
|
item.icon = latestCompatible.icon;
|
|
276
278
|
} else {
|
|
277
279
|
item.experimental = uiPluginHasAnnotation(chart, CATALOG_ANNOTATIONS.EXPERIMENTAL, 'true');
|
|
278
280
|
item.certified = uiPluginHasAnnotation(chart, CATALOG_ANNOTATIONS.CERTIFIED, CATALOG_ANNOTATIONS._RANCHER);
|
|
279
281
|
|
|
280
282
|
item.displayVersion = item.versions?.[0]?.version;
|
|
283
|
+
item.displayVersionLabel = getPluginChartVersionLabel(item.versions?.[0]);
|
|
281
284
|
item.icon = chart.icon || latestCompatible?.annotations?.['catalog.cattle.io/ui-icon'];
|
|
282
285
|
}
|
|
283
286
|
|
|
@@ -318,17 +321,18 @@ export default {
|
|
|
318
321
|
|
|
319
322
|
const label = rancher.annotations?.[UI_PLUGIN_CHART_ANNOTATIONS.DISPLAY_NAME] || p.name;
|
|
320
323
|
const item = {
|
|
321
|
-
name:
|
|
324
|
+
name: p.name,
|
|
322
325
|
label,
|
|
323
|
-
description:
|
|
324
|
-
icon:
|
|
325
|
-
id:
|
|
326
|
-
versions:
|
|
327
|
-
displayVersion:
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
326
|
+
description: p.metadata?.description,
|
|
327
|
+
icon: p.metadata?.icon,
|
|
328
|
+
id: p.id,
|
|
329
|
+
versions: [],
|
|
330
|
+
displayVersion: p.metadata?.version,
|
|
331
|
+
displayVersionLabel: p.metadata?.version || '-',
|
|
332
|
+
installed: true,
|
|
333
|
+
builtin: !!p.builtin,
|
|
334
|
+
experimental: rancher?.annotations?.[CATALOG_ANNOTATIONS.EXPERIMENTAL] === 'true',
|
|
335
|
+
certified: rancher?.annotations?.[CATALOG_ANNOTATIONS.CERTIFIED] === CATALOG_ANNOTATIONS._RANCHER
|
|
332
336
|
};
|
|
333
337
|
|
|
334
338
|
// Built-in plugins can chose to be hidden - used where we implement as extensions
|
|
@@ -347,35 +351,42 @@ export default {
|
|
|
347
351
|
chart.installed = true;
|
|
348
352
|
chart.uiplugin = p;
|
|
349
353
|
chart.displayVersion = p.version;
|
|
354
|
+
let displayVersionLabel = p.version;
|
|
350
355
|
|
|
351
356
|
// Can't do this here
|
|
352
357
|
chart.installing = this.installing[chart.name];
|
|
353
358
|
|
|
354
359
|
// Check for upgrade
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
360
|
+
const latestInstallableVersion = chart.installableVersions?.[0];
|
|
361
|
+
|
|
362
|
+
if (latestInstallableVersion && p.version !== (latestInstallableVersion.appVersion ?? latestInstallableVersion.version)) {
|
|
363
|
+
// Use the currently installed version's metadata to show/hide the experimental and certified labels
|
|
364
|
+
const installedVersion = (chart.installableVersions || []).find((v) => (v.appVersion ?? v.version) === p.version);
|
|
358
365
|
|
|
359
366
|
if (installedVersion) {
|
|
360
367
|
chart.experimental = installedVersion?.annotations?.[CATALOG_ANNOTATIONS.EXPERIMENTAL] === 'true';
|
|
361
368
|
chart.certified = installedVersion?.annotations?.[CATALOG_ANNOTATIONS.CERTIFIED] === CATALOG_ANNOTATIONS._RANCHER;
|
|
369
|
+
displayVersionLabel = getPluginChartVersionLabel(installedVersion);
|
|
362
370
|
}
|
|
363
371
|
|
|
364
|
-
chart.upgrade =
|
|
372
|
+
chart.upgrade = getPluginChartVersionLabel(latestInstallableVersion);
|
|
365
373
|
}
|
|
374
|
+
|
|
375
|
+
chart.displayVersionLabel = displayVersionLabel;
|
|
366
376
|
} else {
|
|
367
377
|
// No chart, so add a card for the plugin based on its Custom resource being present
|
|
368
378
|
const item = {
|
|
369
|
-
name:
|
|
370
|
-
label:
|
|
371
|
-
description:
|
|
372
|
-
id:
|
|
373
|
-
versions:
|
|
374
|
-
displayVersion:
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
+
name: p.name,
|
|
380
|
+
label: p.name,
|
|
381
|
+
description: p.description || '-',
|
|
382
|
+
id: `${ p.name }-${ p.version }`,
|
|
383
|
+
versions: [],
|
|
384
|
+
displayVersion: p.version,
|
|
385
|
+
displayVersionLabel: p.version || '-',
|
|
386
|
+
installed: true,
|
|
387
|
+
installing: false,
|
|
388
|
+
builtin: false,
|
|
389
|
+
uiplugin: p,
|
|
379
390
|
};
|
|
380
391
|
|
|
381
392
|
all.push(item);
|
|
@@ -937,7 +948,7 @@ export default {
|
|
|
937
948
|
-
|
|
938
949
|
</span>
|
|
939
950
|
<span v-else>
|
|
940
|
-
<span>{{ plugin.
|
|
951
|
+
<span>{{ plugin.displayVersionLabel }}</span>
|
|
941
952
|
<span
|
|
942
953
|
v-if="plugin.upgrade"
|
|
943
954
|
v-clean-tooltip="t('plugins.upgradeAvailable')"
|