@rancher/shell 3.0.5-rc.7 → 3.0.5-rc.9
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 +19 -0
- package/assets/styles/base/_helpers.scss +10 -0
- package/assets/styles/base/_variables.scss +1 -1
- package/assets/styles/fonts/_icons.scss +1 -32
- package/assets/styles/global/_layout.scss +1 -1
- package/assets/styles/global/_tooltip.scss +7 -4
- package/assets/styles/themes/_dark.scss +272 -259
- package/assets/styles/themes/_light.scss +551 -516
- package/assets/styles/themes/_modern.scss +936 -0
- package/assets/translations/en-us.yaml +219 -38
- package/assets/translations/zh-hans.yaml +0 -1
- package/chart/__tests__/S3.test.ts +2 -1
- package/chart/monitoring/grafana/index.vue +8 -2
- package/cloud-credential/generic.vue +18 -10
- package/cloud-credential/harvester.vue +1 -9
- package/components/ActionMenuShell.vue +3 -1
- package/components/AdvancedSection.vue +8 -0
- package/components/ChartReadme.vue +17 -7
- package/components/Cron/CronExpressionEditor.vue +299 -0
- package/components/Cron/CronExpressionEditorModal.vue +247 -0
- package/components/Cron/CronTooltip.vue +87 -0
- package/components/Cron/types.ts +13 -0
- package/components/Drawer/ResourceDetailDrawer/__tests__/composables.test.ts +1 -26
- package/components/Drawer/ResourceDetailDrawer/composables.ts +0 -23
- package/components/Drawer/ResourceDetailDrawer/index.vue +17 -4
- package/components/ForceDirectedTreeChart/composable.ts +11 -0
- package/components/InstallHelmCharts.vue +656 -0
- package/components/LazyImage.vue +60 -4
- package/components/LocaleSelector.vue +7 -2
- package/components/Markdown.vue +4 -0
- package/components/PromptModal.vue +1 -1
- package/components/Resource/Detail/Card/__tests__/StateCard.test.ts +1 -0
- package/components/Resource/Detail/CopyToClipboard.vue +78 -0
- package/components/Resource/Detail/FetchLoader/__tests__/composables.test.ts +69 -0
- package/components/Resource/Detail/FetchLoader/composables.ts +27 -0
- package/components/Resource/Detail/Masthead/composable.ts +16 -0
- package/components/Resource/Detail/Masthead/index.vue +37 -0
- package/components/Resource/Detail/Metadata/Annotations/__tests__/index.test.ts +1 -1
- package/components/Resource/Detail/Metadata/Annotations/index.vue +1 -1
- package/components/Resource/Detail/Metadata/IdentifyingInformation/__tests__/identifying-fields.test.ts +13 -61
- package/components/Resource/Detail/Metadata/IdentifyingInformation/__tests__/index.test.ts +33 -6
- package/components/Resource/Detail/Metadata/IdentifyingInformation/identifying-fields.ts +29 -43
- package/components/Resource/Detail/Metadata/IdentifyingInformation/index.vue +25 -5
- package/components/Resource/Detail/Metadata/KeyValue.vue +12 -23
- package/components/Resource/Detail/Metadata/KeyValueRow.vue +144 -0
- package/components/Resource/Detail/Metadata/Labels/__tests__/index.test.ts +1 -0
- package/components/Resource/Detail/Metadata/Labels/index.vue +1 -0
- package/components/Resource/Detail/Metadata/__tests__/KeyValue.test.ts +30 -32
- package/components/Resource/Detail/Metadata/__tests__/KeyValueRow.test.ts +108 -0
- package/components/Resource/Detail/Metadata/__tests__/composables.test.ts +10 -20
- package/components/Resource/Detail/Metadata/__tests__/index.test.ts +12 -5
- package/components/Resource/Detail/Metadata/composables.ts +9 -10
- package/components/Resource/Detail/Metadata/index.vue +18 -2
- package/components/Resource/Detail/Page.vue +35 -21
- package/components/Resource/Detail/Preview/Content.vue +63 -0
- package/components/Resource/Detail/Preview/Preview.vue +128 -0
- package/components/Resource/Detail/Preview/__tests__/Content.spec.ts +71 -0
- package/components/Resource/Detail/Preview/__tests__/Preview.spec.ts +121 -0
- package/components/Resource/Detail/ResourcePopover/ResourcePopoverCard.vue +141 -0
- package/components/Resource/Detail/ResourcePopover/__tests__/ResourcePopoverCard.test.ts +136 -0
- package/components/Resource/Detail/ResourcePopover/__tests__/index.test.ts +245 -0
- package/components/Resource/Detail/ResourcePopover/index.vue +226 -0
- package/components/Resource/Detail/SpacedRow.vue +1 -0
- package/components/Resource/Detail/TitleBar/__tests__/composables.test.ts +8 -14
- package/components/Resource/Detail/TitleBar/__tests__/index.test.ts +1 -1
- package/components/Resource/Detail/TitleBar/composables.ts +3 -6
- package/components/Resource/Detail/TitleBar/index.vue +11 -29
- package/components/Resource/Detail/ViewOptions/composable.ts +9 -0
- package/components/Resource/Detail/ViewOptions/index.vue +41 -0
- package/components/Resource/Detail/__tests__/CopyToClipboard.spec.ts +82 -0
- package/components/ResourceDetail/Masthead/legacy.vue +0 -19
- package/components/ResourceDetail/index.vue +544 -74
- package/components/ResourceTable.vue +24 -0
- package/components/SlideInPanelManager.vue +10 -3
- package/components/SortableTable/index.vue +11 -5
- package/components/SortableTable/paging.js +3 -0
- package/components/Tabbed/Tab.vue +43 -1
- package/components/Tabbed/index.vue +32 -4
- package/components/__tests__/Cron/CronExpressionEditor.test.ts +151 -0
- package/components/__tests__/Cron/CronExpressionEditorModal.test.ts +81 -0
- package/components/__tests__/LazyImage.spec.ts +121 -0
- package/components/auth/login/saml.vue +86 -0
- package/components/fleet/FleetStatus.vue +4 -0
- package/components/form/ClusterAppearance.vue +5 -0
- package/components/form/LabeledSelect.vue +8 -8
- package/components/form/Members/ClusterPermissionsEditor.vue +1 -1
- package/components/form/ProjectMemberEditor.vue +1 -1
- package/components/form/ResourceLabeledSelect.vue +19 -6
- package/components/form/ResourceTabs/composable.ts +54 -0
- package/components/form/ResourceTabs/index.vue +30 -7
- package/components/form/SecretSelector.vue +9 -0
- package/components/form/Select.vue +13 -10
- package/components/form/__tests__/LabeledSelect.test.ts +133 -0
- package/components/form/__tests__/Select.test.ts +134 -0
- package/components/form/labeled-select-utils/labeled-select-pagination.ts +3 -38
- package/components/formatter/FleetApplicationSource.vue +25 -17
- package/components/nav/Favorite.vue +4 -0
- package/components/nav/NotificationCenter/Notification.vue +1 -27
- package/components/nav/WindowManager/index.vue +3 -3
- package/composables/useExtensionManager.ts +17 -0
- package/config/home-links.js +12 -0
- package/config/labels-annotations.js +1 -3
- package/config/page-actions.js +0 -1
- package/config/product/explorer.js +3 -1
- package/config/product/fleet.js +2 -7
- package/config/product/manager.js +0 -5
- package/config/query-params.js +1 -0
- package/config/router/navigation-guards/clusters.js +2 -1
- package/config/router/navigation-guards/products.js +1 -1
- package/core/extension-manager-impl.js +518 -0
- package/core/plugins.js +35 -468
- package/core/types.ts +8 -2
- package/detail/__tests__/autoscaling.horizontalpodautoscaler.test.ts +1 -0
- package/detail/__tests__/provisioning.cattle.io.cluster.test.ts +11 -0
- package/detail/__tests__/workload.test.ts +164 -0
- package/detail/catalog.cattle.io.app.vue +7 -4
- package/detail/configmap.vue +33 -75
- package/detail/fleet.cattle.io.bundle.vue +1 -5
- package/detail/fleet.cattle.io.cluster.vue +3 -2
- package/detail/fleet.cattle.io.gitrepo.vue +76 -49
- package/detail/fleet.cattle.io.helmop.vue +78 -49
- package/detail/projectsecret.vue +11 -0
- package/detail/provisioning.cattle.io.cluster.vue +350 -324
- package/detail/secret.vue +49 -308
- package/detail/workload/index.vue +38 -21
- package/dialog/AddonConfigConfirmationDialog.vue +1 -1
- package/dialog/GenericPrompt.vue +1 -1
- package/dialog/ImportDialog.vue +9 -2
- package/dialog/InstallExtensionDialog.vue +26 -15
- package/edit/__tests__/fleet.cattle.io.gitrepo.test.ts +2 -1
- package/edit/__tests__/fleet.cattle.io.helmop.test.ts +224 -0
- package/edit/__tests__/resources.cattle.io.restore.test.ts +106 -0
- package/edit/cloudcredential.vue +31 -17
- package/edit/constraints.gatekeeper.sh.constraint/index.vue +10 -2
- package/edit/fleet.cattle.io.cluster.vue +19 -0
- package/edit/fleet.cattle.io.gitrepo.vue +28 -22
- 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/monitoring.coreos.com.alertmanagerconfig/index.vue +12 -11
- package/edit/monitoring.coreos.com.alertmanagerconfig/receiverConfig.vue +11 -1
- package/edit/networking.k8s.io.ingress/Certificate.vue +9 -11
- 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.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/index.vue +14 -19
- package/edit/provisioning.cattle.io.cluster/rke2.vue +31 -15
- package/edit/provisioning.cattle.io.cluster/tabs/AgentConfiguration.vue +9 -7
- 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 +30 -31
- 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/resources.cattle.io.restore.vue +5 -8
- package/edit/workload/index.vue +5 -14
- package/list/__tests__/workload.test.ts +1 -0
- package/list/provisioning.cattle.io.cluster.vue +1 -69
- package/list/workload.vue +8 -1
- package/machine-config/__tests__/vmwarevsphere.test.ts +5 -7
- package/machine-config/components/GCEImage.vue +6 -5
- package/machine-config/google.vue +20 -7
- package/machine-config/vmwarevsphere.vue +7 -17
- package/mixins/__tests__/chart.test.ts +139 -1
- package/mixins/chart.js +58 -20
- package/mixins/resource-fetch-api-pagination.js +3 -4
- package/models/__tests__/chart.test.ts +111 -80
- package/models/__tests__/fleet.cattle.io.helmop.test.ts +224 -0
- package/models/__tests__/namespace.test.ts +69 -0
- package/models/__tests__/node.test.ts +7 -63
- package/models/apps.statefulset.js +8 -10
- package/models/catalog.cattle.io.app.js +1 -1
- package/models/catalog.cattle.io.operation.js +1 -1
- package/models/chart.js +41 -21
- 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/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 +16 -63
- package/models/fleet.cattle.io.bundle.js +1 -38
- package/models/fleet.cattle.io.gitrepo.js +19 -1
- package/models/fleet.cattle.io.helmop.js +30 -22
- package/models/management.cattle.io.project.js +12 -0
- package/models/management.cattle.io.setting.js +4 -0
- package/models/namespace.js +30 -0
- package/models/persistentvolumeclaim.js +1 -1
- package/models/pod.js +2 -2
- package/models/provisioning.cattle.io.cluster.js +16 -40
- package/models/rke.cattle.io.etcdsnapshot.js +1 -1
- package/models/secret.js +4 -0
- package/models/storage.k8s.io.storageclass.js +2 -2
- package/models/workload.js +6 -3
- package/package.json +19 -18
- package/pages/c/_cluster/apps/charts/AppChartCardFooter.vue +26 -10
- 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 +440 -183
- package/pages/c/_cluster/apps/charts/index.vue +1 -0
- package/pages/c/_cluster/apps/charts/install.vue +7 -6
- package/pages/c/_cluster/explorer/projectsecret.vue +3 -13
- package/pages/c/_cluster/explorer/tools/__tests__/index.test.ts +102 -12
- package/pages/c/_cluster/explorer/tools/index.vue +145 -254
- package/pages/c/_cluster/fleet/__tests__/index.test.ts +608 -314
- package/pages/c/_cluster/fleet/index.vue +103 -44
- package/pages/c/_cluster/manager/cloudCredential/index.vue +20 -60
- package/pages/c/_cluster/manager/drivers/kontainerDriver/index.vue +12 -2
- package/pages/c/_cluster/uiplugins/PluginInfoPanel.vue +11 -4
- package/pages/c/_cluster/uiplugins/__tests__/index.spec.ts +318 -0
- package/pages/c/_cluster/uiplugins/index.vue +256 -387
- package/pages/home.vue +1 -9
- package/plugins/dashboard-store/actions.js +42 -22
- package/plugins/dashboard-store/resource-class.js +80 -0
- 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/subscribe.js +192 -19
- package/plugins/steve/worker/web-worker.advanced.js +2 -0
- package/public/index.html +2 -1
- package/rancher-components/Card/Card.vue +1 -19
- package/rancher-components/Form/Checkbox/Checkbox.vue +1 -1
- package/rancher-components/Form/Radio/RadioButton.vue +1 -1
- package/rancher-components/Form/Radio/RadioGroup.vue +1 -1
- package/rancher-components/LabeledTooltip/LabeledTooltip.vue +1 -11
- package/rancher-components/Pill/RcCounterBadge/RcCounterBadge.test.ts +53 -0
- package/rancher-components/Pill/RcCounterBadge/RcCounterBadge.vue +65 -0
- package/rancher-components/Pill/RcCounterBadge/index.ts +1 -0
- package/rancher-components/Pill/RcCounterBadge/types.ts +7 -0
- 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/RcTag/RcTag.test.ts +64 -0
- package/rancher-components/Pill/RcTag/RcTag.vue +94 -0
- package/rancher-components/Pill/RcTag/index.ts +1 -0
- package/rancher-components/Pill/RcTag/types.ts +9 -0
- package/rancher-components/Pill/types.ts +3 -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 +41 -6
- package/rancher-components/RcItemCard/RcItemCardAction.vue +12 -0
- package/store/__tests__/catalog.test.ts +156 -1
- package/store/aws.js +19 -8
- package/store/catalog.js +10 -5
- package/store/type-map.js +3 -15
- package/types/extension-manager.ts +26 -0
- package/types/resources/settings.d.ts +1 -1
- package/types/shell/index.d.ts +149 -44
- package/types/uiplugins.ts +73 -0
- package/utils/__tests__/back-off.test.ts +354 -0
- package/utils/__tests__/kontainer.test.ts +19 -0
- package/utils/__tests__/product.test.ts +129 -0
- package/utils/__tests__/resource.test.ts +87 -0
- package/utils/__tests__/uiplugins.test.ts +84 -0
- package/utils/alertmanagerconfig.js +2 -2
- package/utils/auth.js +3 -76
- package/utils/back-off.ts +176 -0
- package/utils/dynamic-importer.js +8 -0
- package/utils/kontainer.ts +3 -5
- package/utils/product.ts +39 -0
- package/utils/resource.ts +35 -0
- package/utils/select.js +0 -24
- 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 +91 -7
- package/utils/validators/formRules/index.ts +84 -8
- package/utils/validators/setting.js +17 -0
- package/vue.config.js +1 -1
- package/cloud-credential/__tests__/harvester.test.ts +0 -18
- package/components/Resource/Detail/Metadata/Rectangle.vue +0 -34
- package/components/Resource/Detail/Metadata/__tests__/Rectangle.test.ts +0 -24
- package/components/ResourceDetail/Masthead/__tests__/legacy.test.ts +0 -65
- package/components/ResourceDetail/__tests__/index.test.ts +0 -135
- package/components/ResourceDetail/legacy.vue +0 -562
- package/components/formatter/CloudCredExpired.vue +0 -69
- package/pages/explorer/resource/detail/configmap.vue +0 -42
- package/pages/explorer/resource/detail/projectsecret.vue +0 -9
- package/pages/explorer/resource/detail/secret.vue +0 -63
- package/utils/aws.js +0 -0
- /package/components/{ForceDirectedTreeChart.vue → ForceDirectedTreeChart/index.vue} +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() {
|
|
@@ -357,7 +363,8 @@ export default {
|
|
|
357
363
|
|
|
358
364
|
_filterResources(state) {
|
|
359
365
|
return state.resources.filter((item) => this._decodeTypeFilter(item.namespace, item.type) &&
|
|
360
|
-
this._decodeStateFilter(item.namespace, state)
|
|
366
|
+
this._decodeStateFilter(item.namespace, state) &&
|
|
367
|
+
this._decodeSearchFilter(item.namespace, item.nameDisplay)
|
|
361
368
|
);
|
|
362
369
|
},
|
|
363
370
|
|
|
@@ -369,7 +376,7 @@ export default {
|
|
|
369
376
|
},
|
|
370
377
|
|
|
371
378
|
_stateExistsInWorkspace(workspace, state) {
|
|
372
|
-
return !!this.applicationStates[workspace]
|
|
379
|
+
return !!this.applicationStates[workspace]?.find((s) => s.statePanel.id === state);
|
|
373
380
|
},
|
|
374
381
|
|
|
375
382
|
_decodeStateFilter(workspace, state) {
|
|
@@ -383,17 +390,33 @@ export default {
|
|
|
383
390
|
return true;
|
|
384
391
|
}
|
|
385
392
|
|
|
386
|
-
|
|
393
|
+
return !!this.stateFilter[workspace]?.[state.statePanel.id];
|
|
394
|
+
},
|
|
395
|
+
|
|
396
|
+
_decodeTypeFilter(workspace, type) {
|
|
397
|
+
if (isEmpty(this.typeFilter)) {
|
|
387
398
|
return true;
|
|
388
399
|
}
|
|
389
400
|
|
|
390
|
-
|
|
401
|
+
if (!this.viewMode) {
|
|
402
|
+
return true;
|
|
403
|
+
}
|
|
404
|
+
|
|
405
|
+
return !!this.typeFilter[workspace]?.[type];
|
|
391
406
|
},
|
|
392
407
|
|
|
393
|
-
|
|
394
|
-
|
|
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];
|
|
395
418
|
|
|
396
|
-
return
|
|
419
|
+
return !search || name?.includes(search);
|
|
397
420
|
},
|
|
398
421
|
|
|
399
422
|
_cleanStateFilter(workspace) {
|
|
@@ -429,12 +452,15 @@ export default {
|
|
|
429
452
|
};
|
|
430
453
|
|
|
431
454
|
this.stateFilter[ws.id] = {};
|
|
455
|
+
|
|
456
|
+
this.searchFilter[ws.id] = '';
|
|
432
457
|
});
|
|
433
458
|
|
|
434
459
|
this.preset('isWorkspaceCollapsed', 'object');
|
|
435
460
|
this.preset('isStateCollapsed', 'object');
|
|
436
461
|
this.preset('typeFilter', 'object');
|
|
437
462
|
this.preset('stateFilter', 'object');
|
|
463
|
+
this.preset('searchFilter', 'object');
|
|
438
464
|
}
|
|
439
465
|
}
|
|
440
466
|
}
|
|
@@ -559,6 +585,7 @@ export default {
|
|
|
559
585
|
small
|
|
560
586
|
ghost
|
|
561
587
|
:aria-label="`workspace-expand-btn-${ workspace.id }`"
|
|
588
|
+
:data-testid="`workspace-expand-btn-${ workspace.id }`"
|
|
562
589
|
@click="toggleCard(workspace.id)"
|
|
563
590
|
>
|
|
564
591
|
<i
|
|
@@ -578,27 +605,44 @@ export default {
|
|
|
578
605
|
:data-testid="`fleet-dashboard-expanded-panel-${ workspace.id }`"
|
|
579
606
|
>
|
|
580
607
|
<div class="actions">
|
|
581
|
-
<div class="
|
|
582
|
-
<
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
@update:value="selectType(workspace.id, FLEET.GIT_REPO, $event)"
|
|
586
|
-
>
|
|
587
|
-
<template #label>
|
|
588
|
-
<i class="icon icon-lg icon-git mr-5" />
|
|
589
|
-
<span class="label">{{ t('fleet.dashboard.cards.filters.gitRepos') }}</span>
|
|
590
|
-
</template>
|
|
591
|
-
</Checkbox>
|
|
592
|
-
<Checkbox
|
|
593
|
-
:data-testid="'fleet-dashboard-filter-helm-ops'"
|
|
594
|
-
:value="typeFilter[workspace.id]?.[FLEET.HELM_OP]"
|
|
595
|
-
@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"
|
|
596
612
|
>
|
|
597
|
-
<
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
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>
|
|
602
646
|
</div>
|
|
603
647
|
<div
|
|
604
648
|
v-if="permissions.gitRepos || permissions.helmOps"
|
|
@@ -613,7 +657,7 @@ export default {
|
|
|
613
657
|
</div>
|
|
614
658
|
</div>
|
|
615
659
|
<div
|
|
616
|
-
v-if="viewMode ===
|
|
660
|
+
v-if="viewMode === VIEW_MODE.CARDS"
|
|
617
661
|
class="cards-panel"
|
|
618
662
|
>
|
|
619
663
|
<div
|
|
@@ -842,23 +886,38 @@ export default {
|
|
|
842
886
|
align-items: center;
|
|
843
887
|
justify-content: space-between;
|
|
844
888
|
|
|
845
|
-
.
|
|
889
|
+
.resource-filters {
|
|
846
890
|
display: flex;
|
|
847
|
-
flex-direction:
|
|
848
|
-
|
|
891
|
+
flex-direction: row;
|
|
892
|
+
align-items: center;
|
|
849
893
|
|
|
850
|
-
.
|
|
851
|
-
|
|
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
|
+
}
|
|
852
912
|
}
|
|
853
913
|
|
|
854
|
-
.
|
|
914
|
+
.search-filter {
|
|
855
915
|
margin-top: 2px;
|
|
856
|
-
|
|
857
|
-
}
|
|
916
|
+
margin-right: 32px;
|
|
858
917
|
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
918
|
+
input {
|
|
919
|
+
width: 190px;
|
|
920
|
+
}
|
|
862
921
|
}
|
|
863
922
|
}
|
|
864
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() {
|
|
@@ -41,6 +37,17 @@ export default {
|
|
|
41
37
|
allCredentials: null,
|
|
42
38
|
resource: NORMAN.CLOUD_CREDENTIAL,
|
|
43
39
|
schema: this.$store.getters['rancher/schemaFor'](NORMAN.CLOUD_CREDENTIAL),
|
|
40
|
+
groupOptions: [{
|
|
41
|
+
tooltipKey: 'resourceTable.groupBy.none',
|
|
42
|
+
icon: 'icon-list-flat',
|
|
43
|
+
value: 'none',
|
|
44
|
+
}, {
|
|
45
|
+
tooltipKey: 'manager.cloudCredentials.list.groupBy.provider',
|
|
46
|
+
hideColumn: 'provider',
|
|
47
|
+
icon: 'icon-folder',
|
|
48
|
+
value: 'providerDisplay',
|
|
49
|
+
field: 'providerDisplay',
|
|
50
|
+
}],
|
|
44
51
|
};
|
|
45
52
|
},
|
|
46
53
|
|
|
@@ -50,7 +57,7 @@ export default {
|
|
|
50
57
|
},
|
|
51
58
|
|
|
52
59
|
headers() {
|
|
53
|
-
|
|
60
|
+
return [
|
|
54
61
|
ID_UNLINKED,
|
|
55
62
|
NAME_UNLINKED,
|
|
56
63
|
{
|
|
@@ -60,23 +67,16 @@ export default {
|
|
|
60
67
|
sort: 'publicData',
|
|
61
68
|
search: 'publicData',
|
|
62
69
|
formatter: 'CloudCredPublicData',
|
|
70
|
+
}, {
|
|
71
|
+
name: 'provider',
|
|
72
|
+
labelKey: 'manager.cloudCredentials.list.headers.provider',
|
|
73
|
+
value: 'providerDisplay',
|
|
74
|
+
sort: 'providerDisplay',
|
|
75
|
+
search: 'providerDisplay',
|
|
63
76
|
},
|
|
64
77
|
DESCRIPTION,
|
|
78
|
+
AGE_NORMAN
|
|
65
79
|
];
|
|
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
80
|
},
|
|
81
81
|
|
|
82
82
|
createLocation() {
|
|
@@ -88,29 +88,6 @@ export default {
|
|
|
88
88
|
},
|
|
89
89
|
};
|
|
90
90
|
},
|
|
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
91
|
},
|
|
115
92
|
|
|
116
93
|
};
|
|
@@ -125,24 +102,13 @@ export default {
|
|
|
125
102
|
:create-location="createLocation"
|
|
126
103
|
:type-display="t('manager.cloudCredentials.label')"
|
|
127
104
|
/>
|
|
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
105
|
|
|
140
106
|
<ResourceTable
|
|
141
107
|
:schema="schema"
|
|
142
108
|
:rows="rows"
|
|
143
109
|
:headers="headers"
|
|
144
110
|
:namespaced="false"
|
|
145
|
-
group-
|
|
111
|
+
:group-options="groupOptions"
|
|
146
112
|
>
|
|
147
113
|
<template #cell:id="{row}">
|
|
148
114
|
{{ row.id.replace('cattle-global-data:', '') }}
|
|
@@ -150,9 +116,3 @@ export default {
|
|
|
150
116
|
</ResourceTable>
|
|
151
117
|
</div>
|
|
152
118
|
</template>
|
|
153
|
-
|
|
154
|
-
<style lang="scss" scoped>
|
|
155
|
-
.banner {
|
|
156
|
-
margin: 0 0 10px 0
|
|
157
|
-
}
|
|
158
|
-
</style>
|
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
<script>
|
|
2
2
|
import { NORMAN } from '@shell/config/types';
|
|
3
|
+
import { isAdminUser } from '@shell/store/type-map';
|
|
3
4
|
import ResourceTable from '@shell/components/ResourceTable';
|
|
4
5
|
import AsyncButton from '@shell/components/AsyncButton';
|
|
5
6
|
import Loading from '@shell/components/Loading';
|
|
6
7
|
import Masthead from '@shell/components/ResourceList/Masthead';
|
|
8
|
+
import Banner from '@components/Banner/Banner.vue';
|
|
9
|
+
|
|
7
10
|
export default {
|
|
8
11
|
name: 'KontainerDrivers',
|
|
9
12
|
components: {
|
|
10
|
-
ResourceTable, Loading, Masthead, AsyncButton
|
|
13
|
+
ResourceTable, Loading, Masthead, AsyncButton, Banner
|
|
11
14
|
},
|
|
12
15
|
|
|
13
16
|
async fetch() {
|
|
@@ -21,7 +24,8 @@ export default {
|
|
|
21
24
|
resource: NORMAN.KONTAINER_DRIVER,
|
|
22
25
|
schema: this.$store.getters['rancher/schemaFor'](NORMAN.KONTAINER_DRIVER),
|
|
23
26
|
useQueryParamsForSimpleFiltering: false,
|
|
24
|
-
forceUpdateLiveAndDelayed: 10
|
|
27
|
+
forceUpdateLiveAndDelayed: 10,
|
|
28
|
+
showDeprecationBanner: isAdminUser(this.$store.getters),
|
|
25
29
|
};
|
|
26
30
|
},
|
|
27
31
|
computed: {
|
|
@@ -69,6 +73,12 @@ export default {
|
|
|
69
73
|
/>
|
|
70
74
|
</template>
|
|
71
75
|
</Masthead>
|
|
76
|
+
<Banner
|
|
77
|
+
v-if="showDeprecationBanner"
|
|
78
|
+
color="warning"
|
|
79
|
+
label-key="drivers.kontainer.emberDeprecationMessage"
|
|
80
|
+
data-testid="kontainer-driver-ember-deprecation-banner"
|
|
81
|
+
/>
|
|
72
82
|
<ResourceTable
|
|
73
83
|
:schema="schema"
|
|
74
84
|
:rows="rows"
|
|
@@ -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
|
};
|
|
@@ -216,7 +223,7 @@ export default {
|
|
|
216
223
|
:aria-label="t('plugins.closePluginPanel')"
|
|
217
224
|
tabindex="0"
|
|
218
225
|
@click="hide()"
|
|
219
|
-
@
|
|
226
|
+
@keydown.enter.space="hide()"
|
|
220
227
|
>
|
|
221
228
|
<i class="icon icon-close" />
|
|
222
229
|
</div>
|
|
@@ -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>
|