@rancher/shell 3.0.5-rc.5 → 3.0.5-rc.6
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/data/aws-regions.json +1 -0
- package/assets/images/key.svg +17 -0
- package/assets/styles/base/_spacing.scss +2 -2
- package/assets/styles/global/_form.scss +1 -1
- package/assets/styles/global/_labeled-input.scss +1 -1
- package/assets/styles/themes/_dark.scss +3 -0
- package/assets/styles/themes/_light.scss +3 -0
- package/assets/styles/vendor/vue-select.scss +1 -1
- package/assets/translations/en-us.yaml +404 -64
- package/assets/translations/zh-hans.yaml +3 -4
- package/cloud-credential/gcp.vue +9 -1
- package/components/AppModal.vue +2 -0
- package/components/CodeMirror.vue +1 -1
- package/components/ConfigMapSettings/Settings.vue +377 -0
- package/components/ConfigMapSettings/index.vue +354 -0
- package/components/CruResource.vue +1 -2
- package/components/DetailText.vue +61 -11
- package/components/Drawer/Chrome.vue +116 -0
- package/components/Drawer/ResourceDetailDrawer/ConfigTab.vue +61 -0
- package/components/Drawer/ResourceDetailDrawer/YamlTab.vue +48 -0
- package/components/Drawer/ResourceDetailDrawer/__tests__/ConfigTab.test.ts +54 -0
- package/components/Drawer/ResourceDetailDrawer/__tests__/YamlTab.test.ts +80 -0
- package/components/Drawer/ResourceDetailDrawer/__tests__/composables.test.ts +82 -0
- package/components/Drawer/ResourceDetailDrawer/__tests__/helpers.test.ts +42 -0
- package/components/Drawer/ResourceDetailDrawer/composables.ts +50 -0
- package/components/Drawer/ResourceDetailDrawer/helpers.ts +10 -0
- package/components/Drawer/ResourceDetailDrawer/index.vue +110 -0
- package/components/GrowlManager.vue +16 -15
- package/components/IconOrSvg.vue +5 -0
- package/components/KeyValueView.vue +1 -1
- package/components/LocaleSelector.vue +9 -1
- package/components/ProgressBarMulti.vue +1 -0
- package/components/PromptModal.vue +6 -1
- package/components/RelatedResources.vue +4 -12
- package/components/Resource/Detail/Additional.vue +46 -0
- package/components/Resource/Detail/Metadata/Annotations/__tests__/index.test.ts +1 -1
- package/components/Resource/Detail/Metadata/Annotations/index.vue +5 -0
- package/components/Resource/Detail/Metadata/IdentifyingInformation/__tests__/identifying-fields.test.ts +223 -0
- package/components/Resource/Detail/Metadata/IdentifyingInformation/composable.ts +37 -254
- package/components/Resource/Detail/Metadata/IdentifyingInformation/identifying-fields.ts +298 -0
- package/components/Resource/Detail/Metadata/IdentifyingInformation/index.vue +27 -5
- package/components/Resource/Detail/Metadata/KeyValue.vue +25 -17
- package/components/Resource/Detail/Metadata/Labels/__tests__/index.test.ts +1 -1
- package/components/Resource/Detail/Metadata/Labels/index.vue +4 -0
- package/components/Resource/Detail/Metadata/__tests__/KeyValue.test.ts +1 -1
- package/components/Resource/Detail/Metadata/__tests__/Rectangle.test.ts +1 -1
- package/components/Resource/Detail/Metadata/__tests__/composables.test.ts +75 -0
- package/components/Resource/Detail/Metadata/composables.ts +60 -11
- package/components/Resource/Detail/Metadata/index.vue +12 -5
- package/components/Resource/Detail/Page.vue +15 -0
- package/components/Resource/Detail/ResourceRow.vue +37 -18
- package/components/Resource/Detail/ResourceTabs/ConfigMapDataTab/__tests__/composables.test.ts +29 -0
- package/components/Resource/Detail/ResourceTabs/ConfigMapDataTab/__tests__/index.test.ts +48 -0
- package/components/Resource/Detail/ResourceTabs/ConfigMapDataTab/composables.ts +31 -0
- package/components/Resource/Detail/ResourceTabs/ConfigMapDataTab/index.vue +50 -0
- package/components/Resource/Detail/ResourceTabs/KnownHostsTab/__tests__/composables.test.ts +66 -0
- package/components/Resource/Detail/ResourceTabs/KnownHostsTab/composables.ts +21 -0
- package/components/Resource/Detail/ResourceTabs/KnownHostsTab/index.vue +31 -0
- package/components/Resource/Detail/ResourceTabs/SecretDataTab/Basic.vue +45 -0
- package/components/Resource/Detail/ResourceTabs/SecretDataTab/BasicAuth.vue +31 -0
- package/components/Resource/Detail/ResourceTabs/SecretDataTab/Certificate.vue +31 -0
- package/components/Resource/Detail/ResourceTabs/SecretDataTab/Registry.vue +22 -0
- package/components/Resource/Detail/ResourceTabs/SecretDataTab/ServiceAccountToken.vue +31 -0
- package/components/Resource/Detail/ResourceTabs/SecretDataTab/Ssh.vue +32 -0
- package/components/Resource/Detail/ResourceTabs/SecretDataTab/__tests__/Basic.test.ts +40 -0
- package/components/Resource/Detail/ResourceTabs/SecretDataTab/__tests__/BasicAuth.test.ts +33 -0
- package/components/Resource/Detail/ResourceTabs/SecretDataTab/__tests__/Certificate.test.ts +33 -0
- package/components/Resource/Detail/ResourceTabs/SecretDataTab/__tests__/Registry.test.ts +27 -0
- package/components/Resource/Detail/ResourceTabs/SecretDataTab/__tests__/ServiceAccountToken.test.ts +33 -0
- package/components/Resource/Detail/ResourceTabs/SecretDataTab/__tests__/Ssh.test.ts +33 -0
- package/components/Resource/Detail/ResourceTabs/SecretDataTab/__tests__/auth-types.test.ts +186 -0
- package/components/Resource/Detail/ResourceTabs/SecretDataTab/__tests__/composables.test.ts +102 -0
- package/components/Resource/Detail/ResourceTabs/SecretDataTab/auth-types.ts +109 -0
- package/components/Resource/Detail/ResourceTabs/SecretDataTab/composeables.ts +52 -0
- package/components/Resource/Detail/ResourceTabs/SecretDataTab/index.vue +71 -0
- package/components/Resource/Detail/TitleBar/Title.vue +2 -1
- package/components/Resource/Detail/TitleBar/__tests__/Title.test.ts +1 -1
- package/components/Resource/Detail/TitleBar/__tests__/Top.test.ts +1 -1
- package/components/Resource/Detail/TitleBar/__tests__/composables.test.ts +63 -0
- package/components/Resource/Detail/TitleBar/__tests__/index.test.ts +1 -1
- package/components/Resource/Detail/TitleBar/composables.ts +44 -0
- package/components/Resource/Detail/TitleBar/index.vue +83 -11
- package/components/Resource/Detail/composables.ts +45 -0
- package/components/ResourceDetail/Masthead/__tests__/index.test.ts +70 -0
- package/components/ResourceDetail/{__tests__/Masthead.test.ts → Masthead/__tests__/legacy.test.ts} +3 -3
- package/components/ResourceDetail/Masthead/index.vue +65 -0
- package/components/ResourceDetail/Masthead/latest.vue +44 -0
- package/components/ResourceDetail/__tests__/index.test.ts +26 -5
- package/components/ResourceDetail/index.vue +30 -16
- package/components/ResourceDetail/legacy.vue +18 -1
- package/components/ResourceList/Masthead.vue +6 -0
- package/components/ResourceYaml.vue +14 -1
- package/components/SlideInPanelManager.vue +46 -7
- package/components/StateDot/index.vue +28 -0
- package/components/Tabbed/index.vue +11 -15
- package/components/Wizard.vue +4 -2
- package/components/__tests__/ConfigMapSettings.test.ts +376 -0
- package/components/__tests__/GrowlManager.test.ts +0 -25
- package/components/auth/login/ldap.vue +1 -1
- package/components/fleet/FleetApplications.vue +0 -7
- package/components/fleet/FleetClusterTargets/TargetsList.vue +66 -0
- package/components/fleet/FleetClusterTargets/index.vue +455 -0
- package/components/fleet/FleetClusters.vue +25 -6
- package/components/fleet/FleetGitRepoPaths.vue +476 -0
- package/components/fleet/FleetHelmOps.vue +8 -0
- package/components/fleet/FleetRepos.vue +1 -6
- package/components/fleet/FleetResources.vue +4 -5
- package/components/fleet/FleetValuesFrom.vue +295 -0
- package/components/fleet/__tests__/FleetClusterTargets.test.ts +1224 -0
- package/components/fleet/__tests__/FleetGitRepoPaths.test.ts +265 -0
- package/components/fleet/__tests__/FleetOCIStorageSecret.test.ts +13 -13
- package/components/fleet/__tests__/FleetValuesFrom.test.ts +300 -0
- package/components/fleet/dashboard/ResourceCard.vue +1 -0
- package/components/fleet/dashboard/ResourceCardSummary.vue +1 -5
- package/components/fleet/dashboard/ResourceDetails.vue +8 -10
- package/components/fleet/dashboard/ResourcePanel.vue +15 -8
- package/components/form/ArrayList.vue +13 -2
- package/components/form/ChangePassword.vue +3 -1
- package/components/form/Footer.vue +10 -4
- package/components/form/KeyValue.vue +81 -43
- package/components/form/LabeledSelect.vue +56 -16
- package/components/form/Labels.vue +90 -17
- package/components/form/MatchExpressions.vue +46 -5
- package/components/form/NameNsDescription.vue +1 -1
- package/components/form/ResourceSelector.vue +1 -0
- package/components/form/ResourceTabs/index.vue +5 -0
- package/components/form/SecretSelector.vue +9 -2
- package/components/form/Select.vue +57 -19
- package/components/form/SimpleSecretSelector.vue +9 -2
- package/components/form/Taints.vue +21 -2
- package/components/form/UnitInput.vue +8 -0
- package/components/form/ValueFromResource.vue +1 -1
- package/components/form/__tests__/LabeledSelect.test.ts +8 -4
- package/components/form/__tests__/Labels.test.ts +360 -0
- package/components/form/__tests__/MatchExpressions.test.ts +16 -13
- package/components/form/__tests__/Select.test.ts +5 -2
- package/components/formatter/FleetApplicationSource.vue +1 -1
- package/components/formatter/WorkloadHealthScale.vue +1 -1
- package/components/google/AccountAccess.vue +211 -0
- package/components/google/types/gcp.d.ts +136 -0
- package/components/google/types/index.d.ts +101 -0
- package/components/google/util/__mocks__/gcp.ts +465 -0
- package/components/google/util/formatter.ts +82 -0
- package/components/google/util/gcp.ts +134 -0
- package/components/google/util/index.d.ts +11 -0
- package/components/nav/Favorite.vue +1 -1
- package/components/nav/Group.vue +70 -47
- package/components/nav/Header.vue +5 -1
- package/components/nav/NamespaceFilter.vue +13 -1
- package/components/nav/NotificationCenter/Notification.vue +510 -0
- package/components/nav/NotificationCenter/NotificationHeader.vue +112 -0
- package/components/nav/NotificationCenter/index.vue +148 -0
- package/composables/drawer.ts +26 -0
- package/composables/resources.test.ts +63 -0
- package/composables/resources.ts +38 -0
- package/composables/useIsNewDetailPageEnabled.ts +17 -0
- package/config/labels-annotations.js +6 -0
- package/config/product/auth.js +16 -1
- package/config/product/{cis.js → compliance.js} +23 -26
- package/config/product/explorer.js +5 -1
- package/config/product/fleet.js +7 -0
- package/config/product/settings.js +22 -11
- package/config/query-params.js +3 -0
- package/config/roles.ts +1 -1
- package/config/router/navigation-guards/authentication.js +51 -2
- package/config/router/routes.js +27 -31
- package/config/settings.ts +21 -3
- package/config/store.js +2 -0
- package/config/system-namespaces.js +1 -1
- package/config/table-headers.js +2 -2
- package/config/types.js +15 -6
- package/core/plugin.ts +32 -7
- package/core/types.ts +18 -1
- package/detail/{cis.cattle.io.clusterscan.vue → compliance.cattle.io.clusterscan.vue} +22 -18
- package/detail/management.cattle.io.fleetworkspace.vue +18 -27
- package/detail/management.cattle.io.oidcclient.vue +369 -0
- package/detail/node.vue +2 -2
- package/detail/pod.vue +2 -2
- package/detail/service.vue +10 -1
- package/detail/workload/index.vue +8 -2
- package/dialog/ExtensionCatalogUninstallDialog.vue +7 -4
- package/dialog/GenericPrompt.vue +1 -1
- package/dialog/ImportDialog.vue +8 -8
- package/dialog/OidcClientSecretDialog.vue +117 -0
- package/edit/__tests__/cis.cattle.io.clusterscan.test.ts +3 -3
- package/edit/__tests__/fleet.cattle.io.gitrepo.test.ts +5 -2
- package/edit/autoscaling.horizontalpodautoscaler/index.vue +4 -1
- package/edit/{cis.cattle.io.clusterscan.vue → compliance.cattle.io.clusterscan.vue} +30 -31
- package/edit/{cis.cattle.io.clusterscanbenchmark.vue → compliance.cattle.io.clusterscanbenchmark.vue} +4 -4
- package/edit/{cis.cattle.io.clusterscanprofile.vue → compliance.cattle.io.clusterscanprofile.vue} +5 -5
- package/edit/configmap.vue +4 -1
- package/edit/constraints.gatekeeper.sh.constraint/index.vue +1 -0
- package/edit/fleet.cattle.io.gitrepo.vue +44 -222
- package/edit/fleet.cattle.io.helmop.vue +44 -269
- package/edit/helm.cattle.io.projecthelmchart.vue +1 -0
- package/edit/k8s.cni.cncf.io.networkattachmentdefinition.vue +1 -0
- package/edit/logging-flow/index.vue +1 -0
- package/edit/logging.banzaicloud.io.output/index.vue +1 -0
- package/edit/management.cattle.io.fleetworkspace.vue +1 -0
- package/edit/management.cattle.io.oidcclient.vue +162 -0
- package/edit/management.cattle.io.project.vue +4 -1
- package/edit/monitoring.coreos.com.alertmanagerconfig/index.vue +1 -1
- package/edit/monitoring.coreos.com.alertmanagerconfig/receiverConfig.vue +5 -0
- package/edit/monitoring.coreos.com.prometheusrule/index.vue +1 -0
- package/edit/monitoring.coreos.com.receiver/auth.vue +30 -30
- package/edit/monitoring.coreos.com.receiver/index.vue +1 -0
- package/edit/monitoring.coreos.com.receiver/types/email.vue +1 -1
- package/edit/monitoring.coreos.com.route.vue +1 -0
- package/edit/namespace.vue +1 -0
- package/edit/networking.istio.io.destinationrule/index.vue +4 -1
- package/edit/networking.k8s.io.ingress/index.vue +4 -1
- package/edit/networking.k8s.io.networkpolicy/PolicyRules.vue +7 -2
- package/edit/networking.k8s.io.networkpolicy/index.vue +6 -2
- package/edit/node.vue +1 -0
- package/edit/persistentvolume/index.vue +4 -1
- package/edit/provisioning.cattle.io.cluster/rke2.vue +418 -382
- package/edit/provisioning.cattle.io.cluster/tabs/Basics.vue +27 -27
- package/edit/provisioning.cattle.io.cluster/tabs/MachinePool.vue +5 -0
- package/edit/resources.cattle.io.restore.vue +1 -1
- package/edit/secret/index.vue +1 -0
- package/edit/service.vue +4 -1
- package/edit/serviceaccount.vue +4 -1
- package/edit/storage.k8s.io.storageclass/index.vue +4 -1
- package/edit/workload/index.vue +5 -0
- package/list/{cis.cattle.io.clusterscan.vue → compliance.cattle.io.clusterscan.vue} +2 -2
- package/list/management.cattle.io.oidcclient.vue +108 -0
- package/list/node.vue +2 -0
- package/machine-config/amazonec2.vue +3 -24
- package/machine-config/components/GCEImage.vue +374 -0
- package/machine-config/google.vue +617 -0
- package/mixins/__tests__/brand.spec.ts +170 -0
- package/mixins/brand.js +16 -17
- package/mixins/create-edit-view/index.js +5 -0
- package/mixins/resource-fetch-api-pagination.js +16 -0
- package/mixins/vue-select-overrides.js +1 -0
- package/models/{cis.cattle.io.clusterscan.js → compliance.cattle.io.clusterscan.js} +8 -8
- package/models/{cis.cattle.io.clusterscanbenchmark.js → compliance.cattle.io.clusterscanbenchmark.js} +1 -1
- package/models/{cis.cattle.io.clusterscanprofile.js → compliance.cattle.io.clusterscanprofile.js} +5 -5
- package/models/{cis.cattle.io.clusterscanreport.js → compliance.cattle.io.clusterscanreport.js} +1 -1
- package/models/fleet-application.js +8 -79
- package/models/fleet.cattle.io.cluster.js +11 -0
- package/models/fleet.cattle.io.gitrepo.js +2 -2
- package/models/fleet.cattle.io.helmop.js +9 -39
- package/models/management.cattle.io.fleetworkspace.js +2 -1
- package/models/management.cattle.io.oidcclient.js +18 -0
- package/models/management.cattle.io.registration.js +3 -0
- package/models/provisioning.cattle.io.cluster.js +5 -5
- package/models/service.js +4 -0
- package/models/workload.js +5 -0
- package/package.json +1 -1
- package/pages/about.vue +4 -58
- package/pages/auth/login.vue +1 -1
- package/pages/c/_cluster/apps/charts/AddRepoLink.vue +0 -1
- package/pages/c/_cluster/apps/charts/index.vue +285 -81
- package/pages/c/_cluster/auth/user.retention/index.vue +87 -78
- package/pages/c/_cluster/explorer/index.vue +3 -3
- package/pages/c/_cluster/explorer/tools/pages/_page.vue +0 -1
- package/pages/c/_cluster/fleet/application/create.vue +3 -2
- package/pages/c/_cluster/fleet/index.vue +94 -56
- package/pages/c/_cluster/fleet/settings/index.vue +229 -0
- package/pages/c/_cluster/longhorn/index.vue +5 -2
- package/pages/c/_cluster/uiplugins/CatalogList/index.vue +16 -1
- package/pages/c/_cluster/uiplugins/PluginInfoPanel.vue +2 -2
- package/pages/explorer/resource/detail/configmap.vue +30 -7
- package/pages/explorer/resource/detail/secret.vue +50 -0
- package/pages/home.vue +9 -55
- package/pages/support/index.vue +4 -6
- package/plugins/dashboard-store/actions.js +19 -5
- package/plugins/dashboard-store/getters.js +4 -0
- package/plugins/dashboard-store/resource-class.js +16 -2
- package/plugins/steve/steve-pagination-utils.ts +26 -18
- package/plugins/steve/subscribe.js +6 -1
- package/rancher-components/Banner/Banner.vue +13 -0
- package/rancher-components/Form/Checkbox/Checkbox.vue +9 -4
- package/rancher-components/Form/LabeledInput/LabeledInput.vue +1 -1
- package/rancher-components/LabeledTooltip/LabeledTooltip.vue +1 -0
- package/rancher-components/RcItemCard/RcItemCard.vue +8 -3
- package/store/auth.js +2 -0
- package/store/catalog.js +23 -1
- package/store/growl.js +97 -8
- package/store/index.js +6 -0
- package/store/notifications.ts +426 -0
- package/store/prefs.js +0 -1
- package/store/type-map.js +19 -16
- package/store/uiplugins.ts +15 -1
- package/types/fleet.d.ts +24 -0
- package/types/notifications/index.ts +74 -0
- package/types/shell/index.d.ts +46 -32
- package/types/store/dashboard-store.types.ts +16 -0
- package/utils/__tests__/fleet.test.ts +148 -0
- package/utils/__tests__/object.test.ts +54 -1
- package/utils/__tests__/string.test.ts +273 -1
- package/utils/__tests__/time.test.ts +31 -0
- package/utils/auth.js +9 -2
- package/utils/crypto/encryption.ts +103 -0
- package/utils/cspAdaptor.ts +51 -0
- package/utils/fleet.ts +54 -65
- package/utils/object.js +36 -0
- package/utils/pagination-utils.ts +1 -1
- package/utils/release-notes.ts +48 -0
- package/utils/selector-typed.ts +7 -2
- package/utils/string.js +24 -0
- package/utils/{time.js → time.ts} +25 -6
- package/utils/uiplugins.ts +22 -0
- package/utils/validators/formRules/index.ts +3 -0
- package/components/Resource/Detail/TitleBar/composable.ts +0 -31
- package/config/product/legacy.js +0 -62
- package/pages/c/_cluster/legacy/pages/_page.vue +0 -29
- package/pages/c/_cluster/legacy/project/_page.vue +0 -57
- package/pages/c/_cluster/legacy/project/index.vue +0 -32
- package/pages/c/_cluster/legacy/project/pipelines.vue +0 -96
- /package/components/ResourceDetail/{Masthead.vue → Masthead/legacy.vue} +0 -0
|
@@ -4,7 +4,7 @@ import AsyncButton from '@shell/components/AsyncButton';
|
|
|
4
4
|
import Loading from '@shell/components/Loading';
|
|
5
5
|
import { Banner } from '@components/Banner';
|
|
6
6
|
import {
|
|
7
|
-
REPO_TYPE, REPO, CHART, VERSION, SEARCH_QUERY, _FLAGGED, CATEGORY, DEPRECATED, HIDDEN, TAG, STATUS
|
|
7
|
+
REPO_TYPE, REPO, CHART, VERSION, SEARCH_QUERY, SORT_BY, _FLAGGED, CATEGORY, DEPRECATED, HIDDEN, TAG, STATUS
|
|
8
8
|
} from '@shell/config/query-params';
|
|
9
9
|
import { APP_STATUS, compatibleVersionsFor, filterAndArrangeCharts, normalizeFilterQuery } from '@shell/store/catalog';
|
|
10
10
|
import { lcFirst } from '@shell/utils/string';
|
|
@@ -16,12 +16,20 @@ import { CATALOG } from '@shell/config/labels-annotations';
|
|
|
16
16
|
import { isUIPlugin } from '@shell/config/uiplugins';
|
|
17
17
|
import { RcItemCard } from '@components/RcItemCard';
|
|
18
18
|
import { get } from '@shell/utils/object';
|
|
19
|
-
import { CATALOG as CATALOG_TYPES } from '@shell/config/types';
|
|
19
|
+
import { CATALOG as CATALOG_TYPES, CATALOG_SORT_OPTIONS } from '@shell/config/types';
|
|
20
20
|
import FilterPanel from '@shell/components/FilterPanel';
|
|
21
21
|
import AppChartCardSubHeader from '@shell/pages/c/_cluster/apps/charts/AppChartCardSubHeader';
|
|
22
22
|
import AppChartCardFooter from '@shell/pages/c/_cluster/apps/charts/AppChartCardFooter';
|
|
23
23
|
import AddRepoLink from '@shell/pages/c/_cluster/apps/charts/AddRepoLink';
|
|
24
24
|
import StatusLabel from '@shell/pages/c/_cluster/apps/charts/StatusLabel';
|
|
25
|
+
import Select from '@shell/components/form/Select';
|
|
26
|
+
|
|
27
|
+
const createInitialFilters = () => ({
|
|
28
|
+
repos: [],
|
|
29
|
+
categories: [],
|
|
30
|
+
statuses: [],
|
|
31
|
+
tags: []
|
|
32
|
+
});
|
|
25
33
|
|
|
26
34
|
export default {
|
|
27
35
|
name: 'Charts',
|
|
@@ -32,7 +40,8 @@ export default {
|
|
|
32
40
|
RcItemCard,
|
|
33
41
|
FilterPanel,
|
|
34
42
|
AppChartCardSubHeader,
|
|
35
|
-
AppChartCardFooter
|
|
43
|
+
AppChartCardFooter,
|
|
44
|
+
Select
|
|
36
45
|
},
|
|
37
46
|
|
|
38
47
|
async fetch() {
|
|
@@ -42,6 +51,7 @@ export default {
|
|
|
42
51
|
|
|
43
52
|
this.searchQuery = query[SEARCH_QUERY] || '';
|
|
44
53
|
this.debouncedSearchQuery = query[SEARCH_QUERY] || '';
|
|
54
|
+
this.selectedSortOption = query[SORT_BY] || CATALOG_SORT_OPTIONS.RECOMMENDED;
|
|
45
55
|
this.showHidden = query[HIDDEN] === _FLAGGED;
|
|
46
56
|
this.filters.repos = normalizeFilterQuery(query[REPO]) || [];
|
|
47
57
|
this.filters.categories = normalizeFilterQuery(query[CATEGORY]) || [];
|
|
@@ -57,20 +67,12 @@ export default {
|
|
|
57
67
|
debouncedSearchQuery: null,
|
|
58
68
|
showDeprecated: null,
|
|
59
69
|
showHidden: null,
|
|
60
|
-
filters:
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
internalFilters: { // in order to update the filter checkboxes smoothly
|
|
67
|
-
repos: [],
|
|
68
|
-
categories: [],
|
|
69
|
-
statuses: [],
|
|
70
|
-
tags: []
|
|
71
|
-
},
|
|
72
|
-
installedApps: [],
|
|
73
|
-
statusOptions: [
|
|
70
|
+
filters: createInitialFilters(),
|
|
71
|
+
// to optimize UI responsiveness by immediately updating the filter state
|
|
72
|
+
internalFilters: createInitialFilters(),
|
|
73
|
+
isFilterUpdating: false,
|
|
74
|
+
installedApps: [],
|
|
75
|
+
statusOptions: [
|
|
74
76
|
{
|
|
75
77
|
value: APP_STATUS.INSTALLED,
|
|
76
78
|
label: {
|
|
@@ -79,7 +81,7 @@ export default {
|
|
|
79
81
|
label: this.t('generic.installed'),
|
|
80
82
|
icon: 'icon-warning',
|
|
81
83
|
iconColor: 'warning',
|
|
82
|
-
tooltip: this.t('catalog.charts.
|
|
84
|
+
tooltip: this.t('catalog.charts.statusFilterCautions.installation')
|
|
83
85
|
}
|
|
84
86
|
}
|
|
85
87
|
},
|
|
@@ -95,12 +97,20 @@ export default {
|
|
|
95
97
|
label: this.t('generic.upgradeable'),
|
|
96
98
|
icon: 'icon-warning',
|
|
97
99
|
iconColor: 'warning',
|
|
98
|
-
tooltip: this.t('catalog.charts.
|
|
100
|
+
tooltip: this.t('catalog.charts.statusFilterCautions.upgradeable')
|
|
99
101
|
}
|
|
100
102
|
}
|
|
101
103
|
}
|
|
102
104
|
],
|
|
103
|
-
appCardsCache:
|
|
105
|
+
appCardsCache: {},
|
|
106
|
+
selectedSortOption: CATALOG_SORT_OPTIONS.RECOMMENDED,
|
|
107
|
+
sortOptions: [
|
|
108
|
+
{ kind: 'group', label: this.t('catalog.charts.sort.prefix') },
|
|
109
|
+
{ value: CATALOG_SORT_OPTIONS.RECOMMENDED, label: this.t('catalog.charts.sort.recommended') },
|
|
110
|
+
{ value: CATALOG_SORT_OPTIONS.LAST_UPDATED_DESC, label: this.t('catalog.charts.sort.lastUpdatedDesc') },
|
|
111
|
+
{ value: CATALOG_SORT_OPTIONS.ALPHABETICAL_ASC, label: this.t('catalog.charts.sort.alphaAscending') },
|
|
112
|
+
{ value: CATALOG_SORT_OPTIONS.ALPHABETICAL_DESC, label: this.t('catalog.charts.sort.alphaDescending') },
|
|
113
|
+
]
|
|
104
114
|
};
|
|
105
115
|
},
|
|
106
116
|
|
|
@@ -171,7 +181,8 @@ export default {
|
|
|
171
181
|
category: categories,
|
|
172
182
|
searchQuery: this.debouncedSearchQuery,
|
|
173
183
|
repo: repos,
|
|
174
|
-
tag: tags
|
|
184
|
+
tag: tags,
|
|
185
|
+
sort: this.selectedSortOption
|
|
175
186
|
});
|
|
176
187
|
|
|
177
188
|
// status filtering is separated from other filters because "isInstalled" and "upgradeable" statuses are already calculated in models/chart.js
|
|
@@ -262,6 +273,20 @@ export default {
|
|
|
262
273
|
|
|
263
274
|
clusterId() {
|
|
264
275
|
return this.$store.getters['clusterId'];
|
|
276
|
+
},
|
|
277
|
+
|
|
278
|
+
noFiltersApplied() {
|
|
279
|
+
return Object.values(this.internalFilters).every((arr) => arr.length === 0) && !this.searchQuery;
|
|
280
|
+
},
|
|
281
|
+
|
|
282
|
+
totalMessage() {
|
|
283
|
+
const count = !this.isFilterUpdating ? this.appChartCards.length : '. . .';
|
|
284
|
+
|
|
285
|
+
if (this.noFiltersApplied) {
|
|
286
|
+
return this.t('catalog.charts.totalChartsMessage', { count });
|
|
287
|
+
} else {
|
|
288
|
+
return this.t('catalog.charts.totalMatchedChartsMessage', { count });
|
|
289
|
+
}
|
|
265
290
|
}
|
|
266
291
|
},
|
|
267
292
|
|
|
@@ -287,13 +312,21 @@ export default {
|
|
|
287
312
|
this.$router.applyQuery(query);
|
|
288
313
|
this.internalFilters = JSON.parse(JSON.stringify(newFilters));
|
|
289
314
|
}
|
|
290
|
-
}
|
|
315
|
+
},
|
|
316
|
+
|
|
317
|
+
selectedSortOption: {
|
|
318
|
+
handler(neu) {
|
|
319
|
+
this.$router.applyQuery({ [SORT_BY]: neu || undefined });
|
|
320
|
+
},
|
|
321
|
+
immediate: false
|
|
322
|
+
},
|
|
291
323
|
},
|
|
292
324
|
|
|
293
325
|
methods: {
|
|
294
326
|
get,
|
|
295
327
|
|
|
296
328
|
onFilterChange(newFilters) {
|
|
329
|
+
this.isFilterUpdating = true;
|
|
297
330
|
this.internalFilters = newFilters;
|
|
298
331
|
|
|
299
332
|
this.applyFiltersDebounced(newFilters);
|
|
@@ -301,6 +334,7 @@ export default {
|
|
|
301
334
|
|
|
302
335
|
applyFiltersDebounced: debounce(function(newFilters) {
|
|
303
336
|
this.filters = newFilters;
|
|
337
|
+
this.isFilterUpdating = false;
|
|
304
338
|
}, 100),
|
|
305
339
|
|
|
306
340
|
selectChart(chart) {
|
|
@@ -369,7 +403,7 @@ export default {
|
|
|
369
403
|
},
|
|
370
404
|
|
|
371
405
|
filterCharts({
|
|
372
|
-
repo, category, tag, searchQuery
|
|
406
|
+
repo, category, tag, searchQuery, sort
|
|
373
407
|
}) {
|
|
374
408
|
const enabledCharts = (this.enabledCharts || []);
|
|
375
409
|
const clusterProvider = this.currentCluster.status.provider || 'other';
|
|
@@ -384,8 +418,15 @@ export default {
|
|
|
384
418
|
showHidden: this.showHidden,
|
|
385
419
|
hideTypes: [CATALOG._CLUSTER_TPL],
|
|
386
420
|
showPrerelease: this.$store.getters['prefs/get'](SHOW_PRE_RELEASE),
|
|
421
|
+
sort
|
|
387
422
|
});
|
|
388
423
|
},
|
|
424
|
+
|
|
425
|
+
resetAllFilters() {
|
|
426
|
+
this.internalFilters = createInitialFilters();
|
|
427
|
+
this.filters = createInitialFilters();
|
|
428
|
+
this.searchQuery = '';
|
|
429
|
+
},
|
|
389
430
|
},
|
|
390
431
|
};
|
|
391
432
|
</script>
|
|
@@ -401,24 +442,34 @@ export default {
|
|
|
401
442
|
{{ t('catalog.chart.header.charts') }}
|
|
402
443
|
</h1>
|
|
403
444
|
<AsyncButton
|
|
445
|
+
class="refresh-repo-button"
|
|
446
|
+
:action-label="t('catalog.charts.refreshButton.label')"
|
|
447
|
+
:waitingLabel="t('catalog.charts.refreshButton.label')"
|
|
448
|
+
:success-label="t('catalog.charts.refreshButton.label')"
|
|
449
|
+
mode="refresh"
|
|
404
450
|
role="button"
|
|
405
451
|
:aria-label="t('catalog.charts.refresh')"
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
mode="refresh"
|
|
452
|
+
actionColor="role-secondary"
|
|
453
|
+
successColor="bg-success"
|
|
409
454
|
@click="refresh"
|
|
410
455
|
/>
|
|
411
456
|
</div>
|
|
412
|
-
<input
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
457
|
+
<div class="search-input">
|
|
458
|
+
<input
|
|
459
|
+
ref="searchQuery"
|
|
460
|
+
v-model="searchQuery"
|
|
461
|
+
type="search"
|
|
462
|
+
class="input"
|
|
463
|
+
:placeholder="t('catalog.charts.search')"
|
|
464
|
+
data-testid="charts-filter-input"
|
|
465
|
+
:aria-label="t('catalog.charts.search')"
|
|
466
|
+
role="textbox"
|
|
467
|
+
>
|
|
468
|
+
<i
|
|
469
|
+
v-if="!searchQuery"
|
|
470
|
+
class="icon icon-search"
|
|
471
|
+
/>
|
|
472
|
+
</div>
|
|
422
473
|
<button
|
|
423
474
|
v-shortkey.once="['/']"
|
|
424
475
|
class="hide"
|
|
@@ -441,44 +492,118 @@ export default {
|
|
|
441
492
|
|
|
442
493
|
<div
|
|
443
494
|
v-if="filteredCharts.length === 0"
|
|
444
|
-
class="
|
|
495
|
+
class="charts-empty-state"
|
|
496
|
+
data-testid="charts-empty-state"
|
|
445
497
|
>
|
|
446
|
-
<h1
|
|
498
|
+
<h1
|
|
499
|
+
class="empty-state-title"
|
|
500
|
+
data-testid="charts-empty-state-title"
|
|
501
|
+
>
|
|
502
|
+
{{ t('catalog.charts.noCharts.title') }}
|
|
503
|
+
</h1>
|
|
504
|
+
<div class="empty-state-tips">
|
|
505
|
+
<h4
|
|
506
|
+
v-clean-html="t('catalog.charts.noCharts.messagePart1', {}, true)"
|
|
507
|
+
/>
|
|
508
|
+
<a
|
|
509
|
+
tabindex="0"
|
|
510
|
+
role="button"
|
|
511
|
+
class="empty-state-reset-filters link"
|
|
512
|
+
data-testid="charts-empty-state-reset-filters"
|
|
513
|
+
@click="resetAllFilters"
|
|
514
|
+
>
|
|
515
|
+
{{ t('catalog.charts.noCharts.messagePart2') }}
|
|
516
|
+
</a>
|
|
517
|
+
<h4
|
|
518
|
+
v-clean-html="t('catalog.charts.noCharts.messagePart3', { repositoriesUrl: `/c/${clusterId}/apps/catalog.cattle.io.clusterrepo`}, true)"
|
|
519
|
+
/>
|
|
520
|
+
</div>
|
|
521
|
+
<h4
|
|
522
|
+
v-clean-html="t('catalog.charts.noCharts.messagePart4', {}, true)"
|
|
523
|
+
/>
|
|
447
524
|
</div>
|
|
448
525
|
<div
|
|
449
526
|
v-else
|
|
450
|
-
class="
|
|
451
|
-
data-testid="app-chart-cards-container"
|
|
527
|
+
class="right-section"
|
|
452
528
|
>
|
|
453
|
-
<
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
529
|
+
<div class="total-and-sort">
|
|
530
|
+
<div class="total">
|
|
531
|
+
<p class="total-message">
|
|
532
|
+
{{ totalMessage }}
|
|
533
|
+
</p>
|
|
534
|
+
<a
|
|
535
|
+
v-if="!noFiltersApplied"
|
|
536
|
+
class="reset-filters"
|
|
537
|
+
role="button"
|
|
538
|
+
:aria-label="t('catalog.charts.resetFilters.title')"
|
|
539
|
+
@click="resetAllFilters"
|
|
540
|
+
>
|
|
541
|
+
{{ t('catalog.charts.resetFilters.title') }}
|
|
542
|
+
</a>
|
|
543
|
+
</div>
|
|
544
|
+
<Select
|
|
545
|
+
v-model:value="selectedSortOption"
|
|
546
|
+
:clearable="false"
|
|
547
|
+
:searchable="false"
|
|
548
|
+
:options="sortOptions"
|
|
549
|
+
placement="bottom"
|
|
550
|
+
class="charts-sort-select"
|
|
469
551
|
>
|
|
470
|
-
<
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
#
|
|
552
|
+
<template #selected-option="{ label }">
|
|
553
|
+
<span class="mmr-1">{{ t('catalog.charts.sort.prefix') }}:</span>{{ label }}
|
|
554
|
+
</template>
|
|
555
|
+
|
|
556
|
+
<template #option="{ label, kind }">
|
|
557
|
+
<span
|
|
558
|
+
v-if="kind === 'group'"
|
|
559
|
+
class="mml-2 mmr-2"
|
|
560
|
+
>
|
|
561
|
+
{{ label }}:
|
|
562
|
+
</span>
|
|
563
|
+
<span
|
|
564
|
+
v-else
|
|
565
|
+
class="mml-6"
|
|
566
|
+
>
|
|
567
|
+
{{ label }}
|
|
568
|
+
</span>
|
|
569
|
+
</template>
|
|
570
|
+
</Select>
|
|
571
|
+
</div>
|
|
572
|
+
<div
|
|
573
|
+
class="app-chart-cards"
|
|
574
|
+
data-testid="app-chart-cards-container"
|
|
575
|
+
>
|
|
576
|
+
<rc-item-card
|
|
577
|
+
v-for="card in appChartCards"
|
|
578
|
+
:id="card.id"
|
|
579
|
+
:key="card.id"
|
|
580
|
+
:pill="card.pill"
|
|
581
|
+
:header="card.header"
|
|
582
|
+
:image="card.image"
|
|
583
|
+
:content="card.content"
|
|
584
|
+
:value="card.rawChart"
|
|
585
|
+
variant="medium"
|
|
586
|
+
:class="{ 'single-card': appChartCards.length === 1 }"
|
|
587
|
+
:clickable="true"
|
|
588
|
+
@card-click="selectChart"
|
|
475
589
|
>
|
|
476
|
-
<
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
590
|
+
<template
|
|
591
|
+
v-once
|
|
592
|
+
#item-card-sub-header
|
|
593
|
+
>
|
|
594
|
+
<AppChartCardSubHeader :items="card.subHeaderItems" />
|
|
595
|
+
</template>
|
|
596
|
+
<template
|
|
597
|
+
v-once
|
|
598
|
+
#item-card-footer
|
|
599
|
+
>
|
|
600
|
+
<AppChartCardFooter
|
|
601
|
+
:items="card.footerItems"
|
|
602
|
+
@click:item="handleFooterItemClick"
|
|
603
|
+
/>
|
|
604
|
+
</template>
|
|
605
|
+
</rc-item-card>
|
|
606
|
+
</div>
|
|
482
607
|
</div>
|
|
483
608
|
</div>
|
|
484
609
|
</div>
|
|
@@ -491,24 +616,76 @@ export default {
|
|
|
491
616
|
justify-content: space-between;
|
|
492
617
|
align-items: center;
|
|
493
618
|
margin-bottom: 24px;
|
|
619
|
+
|
|
620
|
+
.refresh-repo-button {
|
|
621
|
+
|
|
622
|
+
:deep(.icon) {
|
|
623
|
+
font-size: 14px;
|
|
624
|
+
}
|
|
625
|
+
}
|
|
494
626
|
}
|
|
495
627
|
|
|
496
628
|
.search-input {
|
|
629
|
+
position: relative;
|
|
497
630
|
margin-bottom: 24px;
|
|
498
|
-
}
|
|
499
631
|
|
|
500
|
-
|
|
501
|
-
|
|
632
|
+
input {
|
|
633
|
+
height: 48px;
|
|
634
|
+
padding-left: 16px;
|
|
635
|
+
padding-right: 16px;
|
|
636
|
+
}
|
|
637
|
+
|
|
638
|
+
.icon-search {
|
|
502
639
|
position: absolute;
|
|
503
|
-
|
|
640
|
+
top: 16px;
|
|
641
|
+
right: 16px;
|
|
642
|
+
font-size: 16px;
|
|
504
643
|
}
|
|
644
|
+
}
|
|
645
|
+
|
|
646
|
+
.right-section {
|
|
647
|
+
display: flex;
|
|
648
|
+
flex-direction: column;
|
|
649
|
+
gap: var(--gap-md);
|
|
650
|
+
flex: 1;
|
|
651
|
+
}
|
|
652
|
+
|
|
653
|
+
.total-and-sort {
|
|
654
|
+
display: flex;
|
|
655
|
+
align-items: center;
|
|
656
|
+
justify-content: space-between;
|
|
657
|
+
flex-wrap: wrap;
|
|
658
|
+
gap: var(--gap-md);
|
|
659
|
+
padding: 8px 0;
|
|
660
|
+
|
|
661
|
+
.total {
|
|
662
|
+
display: flex;
|
|
663
|
+
|
|
664
|
+
.total-message {
|
|
665
|
+
font-size: 16px;
|
|
666
|
+
font-weight: 600;
|
|
667
|
+
color: var(--body-text);
|
|
668
|
+
text-overflow: ellipsis;
|
|
669
|
+
white-space: nowrap;
|
|
670
|
+
overflow: hidden;
|
|
671
|
+
}
|
|
505
672
|
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
673
|
+
.reset-filters {
|
|
674
|
+
font-size: 16px;
|
|
675
|
+
font-weight: 600;
|
|
676
|
+
margin-left: 8px;
|
|
677
|
+
cursor: pointer;
|
|
678
|
+
}
|
|
679
|
+
}
|
|
680
|
+
|
|
681
|
+
.charts-sort-select {
|
|
682
|
+
width: 300px;
|
|
683
|
+
|
|
684
|
+
// make the color of the selected item consistent with the group title when the select dropdown is open
|
|
685
|
+
:deep(.v-select.inline.vs--single.vs--open .vs__selected) {
|
|
686
|
+
opacity: 1;
|
|
687
|
+
color: var(--dropdown-disabled-text);
|
|
688
|
+
}
|
|
512
689
|
}
|
|
513
690
|
}
|
|
514
691
|
|
|
@@ -517,20 +694,47 @@ export default {
|
|
|
517
694
|
gap: var(--gap-lg);
|
|
518
695
|
}
|
|
519
696
|
|
|
520
|
-
.
|
|
697
|
+
.charts-empty-state {
|
|
521
698
|
width: 100%;
|
|
522
|
-
|
|
523
|
-
padding: 32px;
|
|
699
|
+
padding: 72px 0;
|
|
524
700
|
text-align: center;
|
|
701
|
+
|
|
702
|
+
.empty-state-title {
|
|
703
|
+
margin-bottom: 24px;
|
|
704
|
+
}
|
|
705
|
+
|
|
706
|
+
.empty-state-tips {
|
|
707
|
+
margin-bottom: 12px;
|
|
708
|
+
|
|
709
|
+
.empty-state-reset-filters {
|
|
710
|
+
font-size: 16px;
|
|
711
|
+
}
|
|
712
|
+
|
|
713
|
+
h4 {
|
|
714
|
+
display: inline;
|
|
715
|
+
}
|
|
716
|
+
}
|
|
717
|
+
|
|
718
|
+
:deep(h4 .icon-external-link) {
|
|
719
|
+
text-decoration: underline;
|
|
720
|
+
}
|
|
721
|
+
|
|
722
|
+
:deep(h4:hover .icon-external-link) {
|
|
723
|
+
text-decoration: none;
|
|
724
|
+
}
|
|
525
725
|
}
|
|
526
726
|
|
|
527
727
|
.app-chart-cards {
|
|
528
728
|
display: grid;
|
|
529
|
-
grid-template-columns: repeat(auto-fit, minmax(
|
|
729
|
+
grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
|
|
530
730
|
grid-gap: var(--gap-md);
|
|
531
731
|
width: 100%;
|
|
532
732
|
height: max-content;
|
|
533
733
|
overflow: hidden;
|
|
734
|
+
|
|
735
|
+
.single-card {
|
|
736
|
+
max-width: 500px;
|
|
737
|
+
}
|
|
534
738
|
}
|
|
535
739
|
|
|
536
740
|
</style>
|