@rancher/shell 3.0.12-rc.3 → 3.0.12-rc.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/styles/global/_layout.scss +4 -0
- package/assets/translations/en-us.yaml +144 -41
- package/assets/translations/zh-hans.yaml +1 -7
- package/chart/monitoring/ClusterSelector.vue +0 -21
- package/chart/monitoring/prometheus/index.vue +6 -3
- package/components/CruResource.vue +161 -14
- package/components/ExplorerMembers.vue +8 -4
- package/components/ExplorerProjectsNamespaces.vue +10 -6
- package/components/GrowlManager.vue +4 -0
- package/components/MgmtNodeList.vue +184 -0
- package/components/Resource/Detail/Card/StateCard/__tests__/composables.test.ts +90 -1
- package/components/Resource/Detail/Card/StateCard/composables.ts +57 -87
- package/components/Resource/Detail/Card/StatusCard/__tests__/StatusCard.test.ts +61 -0
- package/components/Resource/Detail/Card/StatusCard/index.vue +61 -15
- package/components/Resource/Detail/Metadata/IdentifyingInformation/index.vue +2 -0
- package/components/Resource/Detail/Metadata/KeyValue.vue +5 -2
- package/components/Resource/Detail/Metadata/KeyValueRow.vue +2 -6
- package/components/ResourceDetail/index.vue +1 -1
- package/components/ResourceList/Masthead.vue +7 -1
- package/components/ResourceList/index.vue +82 -1
- package/components/RichTranslation.vue +5 -2
- package/components/Setting.vue +1 -0
- package/components/SubtleLink.vue +31 -6
- package/components/Tabbed/Tab.vue +29 -3
- package/components/Tabbed/index.vue +25 -3
- package/components/TableOfContents/TableOfContents.vue +109 -0
- package/components/TableOfContents/composables.ts +258 -0
- package/components/Window/ContainerShell.vue +21 -11
- package/components/Window/__tests__/ContainerShell.test.ts +107 -37
- package/components/Wizard.vue +9 -4
- package/components/fleet/AppCoChartGrid.vue +401 -0
- package/components/fleet/AppCoEmptyState.vue +127 -0
- package/components/fleet/AppCoPageHeader.vue +119 -0
- package/components/fleet/AppCoVersionSelect.vue +70 -0
- package/components/fleet/FleetClusterTargets/ClusterSelectionFields.vue +217 -0
- package/components/fleet/FleetClusterTargets/TargetsList.vue +123 -35
- package/components/fleet/FleetClusterTargets/index.vue +189 -146
- package/components/fleet/FleetIntro.vue +7 -3
- package/components/fleet/FleetNoWorkspaces.vue +7 -3
- package/components/fleet/FleetSecretSelector.vue +5 -3
- package/components/fleet/FleetValuesFrom.vue +8 -2
- package/components/fleet/GitRepoTargetTab.vue +0 -2
- package/components/fleet/HelmOpAdvancedTab.vue +19 -53
- package/components/fleet/HelmOpAppCoConfigTab.vue +593 -0
- package/components/fleet/HelmOpAppCoResourcesSection.vue +162 -0
- package/components/fleet/HelmOpResourcesSection.vue +82 -0
- package/components/fleet/HelmOpTargetOptionsSection.vue +89 -0
- package/components/fleet/HelmOpTargetTab.vue +64 -60
- package/components/fleet/HelmOpValuesTab.vue +129 -105
- package/components/fleet/__tests__/AppCoEmptyState.test.ts +71 -0
- package/components/fleet/__tests__/AppCoVersionSelect.test.ts +36 -0
- package/components/fleet/__tests__/ClusterSelectionFields.test.ts +62 -0
- package/components/fleet/__tests__/FleetClusterTargets.test.ts +253 -0
- package/components/fleet/__tests__/FleetSecretSelector.test.ts +16 -0
- package/components/fleet/__tests__/FleetValuesFrom.test.ts +44 -0
- package/components/fleet/__tests__/HelmOpAppCoConfigTab.test.ts +59 -0
- package/components/fleet/__tests__/HelmOpAppCoResourcesSection.test.ts +62 -0
- package/components/fleet/__tests__/HelmOpResourcesSection.test.ts +43 -0
- package/components/fleet/__tests__/HelmOpTargetOptionsSection.test.ts +34 -0
- package/components/fleet/__tests__/HelmOpValuesTab.test.ts +39 -0
- package/components/fleet/__tests__/__snapshots__/AppCoEmptyState.test.ts.snap +97 -0
- package/components/fleet/__tests__/__snapshots__/AppCoVersionSelect.test.ts.snap +30 -0
- package/components/fleet/__tests__/__snapshots__/ClusterSelectionFields.test.ts.snap +209 -0
- package/components/fleet/__tests__/__snapshots__/HelmOpTargetOptionsSection.test.ts.snap +140 -0
- package/components/fleet/dashboard/Empty.vue +8 -4
- package/components/fleet/dashboard/ResourceCard.vue +28 -0
- package/components/fleet/dashboard/ResourceDetails.vue +28 -0
- package/components/fleet/dashboard/__tests__/ResourceCard.test.ts +87 -0
- package/components/form/ArrayList.vue +61 -4
- package/components/form/KeyValue.vue +23 -2
- package/components/form/LabeledSelect.vue +39 -1
- package/components/form/Labels.vue +22 -3
- package/components/form/NameNsDescription.vue +13 -5
- package/components/form/ResourceTabs/index.vue +1 -0
- package/components/form/__tests__/NameNsDescription.test.ts +75 -0
- package/components/formatter/InternalExternalIP.vue +10 -4
- package/components/formatter/ServiceTargets.vue +26 -7
- package/components/formatter/__tests__/InternalExternalIP.test.ts +132 -0
- package/components/formatter/__tests__/ServiceTargets.test.ts +412 -0
- package/components/nav/Header.vue +4 -0
- package/components/nav/TopLevelMenu.vue +7 -2
- package/components/nav/__tests__/Header.test.ts +15 -0
- package/components/nav/__tests__/TopLevelMenu.test.ts +120 -2
- package/components/templates/default.vue +9 -4
- package/components/templates/home.vue +9 -4
- package/components/templates/plain.vue +9 -4
- package/composables/useHelmOpResources.test.ts +56 -0
- package/composables/useHelmOpResources.ts +32 -0
- package/composables/useStateColor.test.ts +325 -0
- package/composables/useStateColor.ts +128 -0
- package/config/home-links.js +1 -1
- package/config/labels-annotations.js +1 -0
- package/config/product/explorer.js +17 -4
- package/config/product/manager.js +2 -0
- package/config/router/index.js +16 -0
- package/config/router/navigation-guards/__tests__/authentication.test.ts +130 -0
- package/config/router/navigation-guards/authentication.js +10 -4
- package/config/router/routes.js +20 -6
- package/config/settings.ts +0 -2
- package/config/table-headers.js +3 -4
- package/config/types.js +9 -0
- package/core/plugin-products-base.ts +3 -3
- package/core/plugin-types.ts +83 -30
- package/core/plugin.ts +3 -0
- package/core/types-provisioning.ts +34 -1
- package/core/types.ts +15 -2
- package/detail/__tests__/provisioning.cattle.io.cluster.test.ts +114 -0
- package/detail/__tests__/workload.test.ts +3 -152
- package/detail/catalog.cattle.io.clusterrepo.vue +1 -1
- package/detail/provisioning.cattle.io.cluster.vue +30 -4
- package/detail/workload/index.vue +12 -55
- package/edit/__tests__/catalog.cattle.io.clusterrepo.test.ts +248 -0
- package/edit/__tests__/fleet.cattle.io.helmop.test.ts +105 -0
- package/edit/auditlog.cattle.io.auditpolicy/__tests__/__snapshots__/General.test.ts.snap +6 -0
- package/edit/auditlog.cattle.io.auditpolicy/__tests__/__snapshots__/index.test.ts.snap +1 -0
- package/edit/auth/__tests__/azuread.test.ts +34 -9
- package/edit/auth/__tests__/github.test.ts +234 -0
- package/edit/auth/__tests__/oidc.test.ts +26 -6
- package/edit/auth/__tests__/saml.test.ts +196 -0
- package/edit/auth/azuread.vue +128 -95
- package/edit/auth/github.vue +72 -13
- package/edit/auth/ldap/__tests__/index.test.ts +206 -0
- package/edit/auth/ldap/config.vue +8 -0
- package/edit/auth/ldap/index.vue +75 -1
- package/edit/auth/oidc.vue +119 -73
- package/edit/auth/saml.vue +76 -12
- package/edit/catalog.cattle.io.clusterrepo.vue +140 -32
- package/edit/fleet.cattle.io.helmop.vue +491 -136
- package/edit/management.cattle.io.user.vue +5 -2
- package/edit/provisioning.cattle.io.cluster/rke2.vue +84 -10
- package/edit/provisioning.cattle.io.cluster/tabs/MachinePool.vue +11 -0
- package/list/group.principal.vue +5 -4
- package/list/harvesterhci.io.management.cluster.vue +8 -9
- package/list/management.cattle.io.user.vue +12 -9
- package/list/provisioning.cattle.io.cluster.vue +16 -10
- package/mixins/__tests__/auth-config.test.ts +90 -0
- package/mixins/__tests__/chart.test.ts +94 -0
- package/mixins/__tests__/resource-fetch-api-pagination.test.ts +48 -0
- package/mixins/auth-config.js +7 -0
- package/mixins/chart.js +11 -2
- package/mixins/child-hook.js +12 -6
- package/mixins/create-edit-view/impl.js +5 -3
- package/mixins/resource-fetch-api-pagination.js +21 -1
- package/models/__tests__/catalog.cattle.io.clusterrepo.test.ts +57 -0
- package/models/__tests__/compliance.cattle.io.clusterscan.test.ts +144 -0
- package/models/__tests__/fleet-application.test.ts +175 -0
- package/models/__tests__/fleet.cattle.io.bundle.test.ts +169 -0
- package/models/__tests__/fleet.cattle.io.helmop.test.ts +84 -0
- package/models/__tests__/management.cattle.io.node.ts +22 -0
- package/models/__tests__/namespace.test.ts +36 -0
- package/models/__tests__/provisioning.cattle.io.cluster.test.ts +49 -0
- package/models/__tests__/workload.test.ts +401 -26
- package/models/catalog.cattle.io.clusterrepo.js +28 -4
- package/models/compliance.cattle.io.clusterscan.js +39 -4
- package/models/fleet-application.js +4 -0
- package/models/fleet.cattle.io.helmop.js +20 -1
- package/models/management.cattle.io.cluster.js +18 -2
- package/models/management.cattle.io.node.js +44 -3
- package/models/namespace.js +1 -1
- package/models/pod.js +33 -1
- package/models/provisioning.cattle.io.cluster.js +5 -5
- package/models/workload.js +108 -13
- package/models/workload.service.js +5 -0
- package/package.json +14 -13
- package/pages/about.vue +5 -6
- package/pages/auth/login.vue +0 -35
- package/pages/auth/setup.vue +11 -0
- package/pages/c/_cluster/apps/charts/AppChartCardFooter.vue +2 -2
- package/pages/c/_cluster/apps/charts/AppChartCardSubHeader.vue +10 -1
- package/pages/c/_cluster/apps/charts/__tests__/index.test.ts +93 -0
- package/pages/c/_cluster/apps/charts/chart.vue +2 -1
- package/pages/c/_cluster/apps/charts/index.vue +48 -10
- package/pages/c/_cluster/apps/charts/install.vue +122 -116
- package/pages/c/_cluster/auth/roles/index.vue +5 -4
- package/pages/c/_cluster/explorer/workload-dashboard/ByNamespaceSection.vue +31 -0
- package/pages/c/_cluster/explorer/workload-dashboard/ByStateSection.vue +138 -0
- package/pages/c/_cluster/explorer/workload-dashboard/ByTypeSection.vue +30 -0
- package/pages/c/_cluster/explorer/workload-dashboard/WorkloadCard.vue +155 -0
- package/pages/c/_cluster/explorer/workload-dashboard/WorkloadNamespaceCard.vue +142 -0
- package/pages/c/_cluster/explorer/workload-dashboard/WorkloadTypeCard.vue +159 -0
- package/pages/c/_cluster/explorer/workload-dashboard/__tests__/composable.test.ts +561 -0
- package/pages/c/_cluster/explorer/workload-dashboard/composable.ts +440 -0
- package/pages/c/_cluster/explorer/workload-dashboard/index.vue +187 -0
- package/pages/c/_cluster/explorer/workload-dashboard/types.ts +80 -0
- package/pages/c/_cluster/fleet/application/create.vue +187 -136
- package/pages/c/_cluster/fleet/application/index.vue +5 -3
- package/pages/c/_cluster/fleet/application/suse-app-collection/ChartDetailBody.vue +338 -0
- package/pages/c/_cluster/fleet/application/suse-app-collection/ChartDetailHeader.vue +121 -0
- package/pages/c/_cluster/fleet/application/suse-app-collection/chart.vue +369 -0
- package/pages/c/_cluster/fleet/application/suse-app-collection/charts.vue +248 -0
- package/pages/c/_cluster/fleet/application/suse-app-collection/credentials.vue +310 -0
- package/pages/c/_cluster/fleet/index.vue +2 -2
- package/pages/c/_cluster/uiplugins/__tests__/index.test.ts +96 -0
- package/pages/c/_cluster/uiplugins/index.vue +15 -0
- package/pages/fail-whale.vue +16 -11
- package/pages/home.vue +16 -46
- package/plugins/clean-html.d.ts +9 -0
- package/plugins/dashboard-store/__tests__/resource-class.test.ts +93 -0
- package/plugins/dashboard-store/resource-class.js +62 -7
- package/plugins/steve/__tests__/actions.test.ts +212 -0
- package/plugins/steve/actions.js +96 -0
- package/plugins/steve/steve-pagination-utils.ts +1 -1
- package/rancher-components/Accordion/Accordion.vue +53 -9
- package/rancher-components/Form/Checkbox/Checkbox.vue +14 -0
- package/rancher-components/Form/Radio/RadioButton.vue +17 -1
- package/rancher-components/Form/Radio/RadioGroup.vue +10 -0
- package/rancher-components/Pill/RcTag/RcTag.vue +3 -2
- package/rancher-components/RcButton/RcButton.test.ts +103 -0
- package/rancher-components/RcButton/RcButton.vue +94 -15
- package/rancher-components/RcButton/types.ts +3 -0
- package/rancher-components/RcItemCard/RcItemCard.test.ts +18 -0
- package/rancher-components/RcItemCard/RcItemCard.vue +2 -2
- package/rancher-components/RcSection/RcSection.vue +28 -3
- package/scripts/extension/helm/package/Dockerfile +1 -1
- package/scripts/test-plugins-build.sh +2 -1
- package/store/__tests__/notifications.test.ts +434 -0
- package/store/catalog.js +57 -0
- package/store/plugins.js +7 -4
- package/types/components/buttonGroup.ts +5 -0
- package/types/shell/index.d.ts +104 -70
- package/utils/__tests__/auth.test.ts +273 -0
- package/utils/__tests__/computed.test.ts +193 -0
- package/utils/__tests__/cspAdaptor.test.ts +163 -0
- package/utils/__tests__/dom.test.ts +81 -0
- package/utils/__tests__/duration.test.ts +37 -1
- package/utils/__tests__/dynamic-importer.test.ts +102 -0
- package/utils/__tests__/fleet-appco.test.ts +312 -0
- package/utils/__tests__/monitoring.test.ts +130 -0
- package/utils/__tests__/object.test.ts +22 -0
- package/utils/__tests__/platform.test.ts +91 -0
- package/utils/__tests__/position.test.ts +237 -0
- package/utils/__tests__/provider.test.ts +51 -1
- package/utils/__tests__/queue.test.ts +232 -0
- package/utils/__tests__/release-notes.test.ts +221 -0
- package/utils/__tests__/router.test.js +254 -1
- package/utils/__tests__/select.test.ts +208 -0
- package/utils/__tests__/time.test.ts +265 -1
- package/utils/__tests__/title.test.ts +47 -0
- package/utils/__tests__/width.test.ts +53 -0
- package/utils/__tests__/window.test.ts +158 -0
- package/utils/__tests__/xccdf.test.ts +126 -6
- package/utils/crypto/__tests__/browserHashUtils.test.ts +98 -0
- package/utils/crypto/__tests__/index.test.ts +144 -0
- package/utils/duration.ts +104 -0
- package/utils/dynamic-content/__tests__/notification-handler.test.ts +196 -0
- package/utils/dynamic-content/info.ts +2 -1
- package/utils/error.js +13 -0
- package/utils/fleet-appco.ts +323 -0
- package/utils/object.js +22 -2
- package/utils/provider.ts +12 -0
- package/utils/validators/__tests__/container-images.test.ts +104 -0
- package/utils/validators/__tests__/flow-output.test.ts +91 -0
- package/utils/validators/__tests__/logging-outputs.test.ts +58 -0
- package/utils/validators/__tests__/monitoring-route.test.ts +119 -0
- package/utils/xccdf.ts +39 -42
- package/vue.config.js +1 -1
- package/pages/support/index.vue +0 -264
- package/utils/duration.js +0 -43
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
|
+
|
|
3
|
+
exports[`component: AppCoVersionSelect should match snapshot 1`] = `
|
|
4
|
+
<labeled-select-stub
|
|
5
|
+
appendtobody="true"
|
|
6
|
+
clearable="false"
|
|
7
|
+
closeonselect="true"
|
|
8
|
+
disabled="false"
|
|
9
|
+
filterable="true"
|
|
10
|
+
hovertooltip="true"
|
|
11
|
+
instore="cluster"
|
|
12
|
+
label="%fleet.helmOp.appCoConfig.chartVersion%"
|
|
13
|
+
loading="false"
|
|
14
|
+
localizedlabel="false"
|
|
15
|
+
lockedoptions=""
|
|
16
|
+
mode="edit"
|
|
17
|
+
nooptionslabelkey="labelSelect.noOptions.empty"
|
|
18
|
+
optionkey="value"
|
|
19
|
+
optionlabel="label"
|
|
20
|
+
options="[object Object],[object Object]"
|
|
21
|
+
placeholder=""
|
|
22
|
+
reduce="[Function]"
|
|
23
|
+
required="false"
|
|
24
|
+
requiredirty="true"
|
|
25
|
+
rules=""
|
|
26
|
+
searchable="true"
|
|
27
|
+
selectable="[Function]"
|
|
28
|
+
value="1.2.0"
|
|
29
|
+
/>
|
|
30
|
+
`;
|
|
@@ -0,0 +1,209 @@
|
|
|
1
|
+
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
|
+
|
|
3
|
+
exports[`component: ClusterSelectionFields should match snapshot with appco variant 1`] = `
|
|
4
|
+
<div
|
|
5
|
+
class="appco-select-clusters"
|
|
6
|
+
>
|
|
7
|
+
<!-- Select by cluster name -->
|
|
8
|
+
<div>
|
|
9
|
+
<h4>
|
|
10
|
+
%fleet.clusterTargets.clusters.byName.title%
|
|
11
|
+
</h4>
|
|
12
|
+
<labeled-select-stub
|
|
13
|
+
appendtobody="true"
|
|
14
|
+
class=""
|
|
15
|
+
clearable="false"
|
|
16
|
+
closeonselect="false"
|
|
17
|
+
data-testid="fleet-target-cluster-name-selector"
|
|
18
|
+
disabled="false"
|
|
19
|
+
filterable="true"
|
|
20
|
+
hovertooltip="true"
|
|
21
|
+
instore="cluster"
|
|
22
|
+
label="%fleet.clusterTargets.clusters.byName.label%"
|
|
23
|
+
loading="false"
|
|
24
|
+
localizedlabel="false"
|
|
25
|
+
lockedoptions=""
|
|
26
|
+
mode="edit"
|
|
27
|
+
multiple="true"
|
|
28
|
+
nooptionslabelkey="labelSelect.noOptions.empty"
|
|
29
|
+
optionlabel="label"
|
|
30
|
+
options="[object Object]"
|
|
31
|
+
placeholder="%fleet.clusterTargets.clusters.byName.placeholder%"
|
|
32
|
+
reduce="[Function]"
|
|
33
|
+
required="false"
|
|
34
|
+
requiredirty="true"
|
|
35
|
+
rules=""
|
|
36
|
+
searchable="false"
|
|
37
|
+
selectable="[Function]"
|
|
38
|
+
taggable="true"
|
|
39
|
+
value="cluster-1"
|
|
40
|
+
/>
|
|
41
|
+
</div>
|
|
42
|
+
<!-- Select by labels -->
|
|
43
|
+
<div
|
|
44
|
+
class=""
|
|
45
|
+
>
|
|
46
|
+
<h4
|
|
47
|
+
class=""
|
|
48
|
+
>
|
|
49
|
+
%fleet.clusterTargets.clusters.byLabel.title%
|
|
50
|
+
</h4>
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
<rc-button-stub
|
|
54
|
+
class="mmt-3"
|
|
55
|
+
ghost="false"
|
|
56
|
+
link="false"
|
|
57
|
+
multiaction="false"
|
|
58
|
+
primary="false"
|
|
59
|
+
secondary="false"
|
|
60
|
+
size="small"
|
|
61
|
+
small="false"
|
|
62
|
+
tertiary="false"
|
|
63
|
+
variant="secondary"
|
|
64
|
+
/>
|
|
65
|
+
</div>
|
|
66
|
+
<!-- Select by cluster groups -->
|
|
67
|
+
<div
|
|
68
|
+
class=""
|
|
69
|
+
>
|
|
70
|
+
<h4
|
|
71
|
+
class=""
|
|
72
|
+
>
|
|
73
|
+
%fleet.clusterTargets.clusterGroups.title%
|
|
74
|
+
</h4>
|
|
75
|
+
<labeled-select-stub
|
|
76
|
+
appendtobody="true"
|
|
77
|
+
class=""
|
|
78
|
+
clearable="false"
|
|
79
|
+
closeonselect="false"
|
|
80
|
+
data-testid="fleet-target-cluster-group-selector"
|
|
81
|
+
disabled="false"
|
|
82
|
+
filterable="true"
|
|
83
|
+
hovertooltip="true"
|
|
84
|
+
instore="cluster"
|
|
85
|
+
label="%fleet.clusterTargets.clusterGroups.byName.label%"
|
|
86
|
+
loading="false"
|
|
87
|
+
localizedlabel="false"
|
|
88
|
+
lockedoptions=""
|
|
89
|
+
mode="edit"
|
|
90
|
+
multiple="true"
|
|
91
|
+
nooptionslabelkey="labelSelect.noOptions.empty"
|
|
92
|
+
optionlabel="label"
|
|
93
|
+
options=""
|
|
94
|
+
placeholder="%fleet.clusterTargets.clusterGroups.byName.placeholder%"
|
|
95
|
+
reduce="[Function]"
|
|
96
|
+
required="false"
|
|
97
|
+
requiredirty="true"
|
|
98
|
+
rules=""
|
|
99
|
+
searchable="false"
|
|
100
|
+
selectable="[Function]"
|
|
101
|
+
taggable="true"
|
|
102
|
+
value=""
|
|
103
|
+
/>
|
|
104
|
+
</div>
|
|
105
|
+
</div>
|
|
106
|
+
`;
|
|
107
|
+
|
|
108
|
+
exports[`component: ClusterSelectionFields should match snapshot with default variant 1`] = `
|
|
109
|
+
<div
|
|
110
|
+
class=""
|
|
111
|
+
>
|
|
112
|
+
<!-- Select by cluster name -->
|
|
113
|
+
<div>
|
|
114
|
+
<!--v-if-->
|
|
115
|
+
<labeled-select-stub
|
|
116
|
+
appendtobody="true"
|
|
117
|
+
class="mmt-4"
|
|
118
|
+
clearable="false"
|
|
119
|
+
closeonselect="false"
|
|
120
|
+
data-testid="fleet-target-cluster-name-selector"
|
|
121
|
+
disabled="false"
|
|
122
|
+
filterable="true"
|
|
123
|
+
hovertooltip="true"
|
|
124
|
+
instore="cluster"
|
|
125
|
+
label="%fleet.clusterTargets.clusters.byName.label%"
|
|
126
|
+
loading="false"
|
|
127
|
+
localizedlabel="false"
|
|
128
|
+
lockedoptions=""
|
|
129
|
+
mode="edit"
|
|
130
|
+
multiple="true"
|
|
131
|
+
nooptionslabelkey="labelSelect.noOptions.empty"
|
|
132
|
+
optionlabel="label"
|
|
133
|
+
options="[object Object]"
|
|
134
|
+
placeholder="%fleet.clusterTargets.clusters.byName.placeholder%"
|
|
135
|
+
reduce="[Function]"
|
|
136
|
+
required="false"
|
|
137
|
+
requiredirty="true"
|
|
138
|
+
rules=""
|
|
139
|
+
searchable="false"
|
|
140
|
+
selectable="[Function]"
|
|
141
|
+
taggable="true"
|
|
142
|
+
value="cluster-1"
|
|
143
|
+
/>
|
|
144
|
+
</div>
|
|
145
|
+
<!-- Select by labels -->
|
|
146
|
+
<div
|
|
147
|
+
class="mmt-6"
|
|
148
|
+
>
|
|
149
|
+
<h4
|
|
150
|
+
class="m-0"
|
|
151
|
+
>
|
|
152
|
+
%fleet.clusterTargets.clusters.byLabel.title%
|
|
153
|
+
</h4>
|
|
154
|
+
|
|
155
|
+
|
|
156
|
+
<rc-button-stub
|
|
157
|
+
class="mmt-4"
|
|
158
|
+
ghost="false"
|
|
159
|
+
link="false"
|
|
160
|
+
multiaction="false"
|
|
161
|
+
primary="false"
|
|
162
|
+
secondary="false"
|
|
163
|
+
size="small"
|
|
164
|
+
small="false"
|
|
165
|
+
tertiary="false"
|
|
166
|
+
variant="secondary"
|
|
167
|
+
/>
|
|
168
|
+
</div>
|
|
169
|
+
<!-- Select by cluster groups -->
|
|
170
|
+
<div
|
|
171
|
+
class="mmt-8"
|
|
172
|
+
>
|
|
173
|
+
<h3
|
|
174
|
+
class="m-0"
|
|
175
|
+
>
|
|
176
|
+
%fleet.clusterTargets.clusterGroups.title%
|
|
177
|
+
</h3>
|
|
178
|
+
<labeled-select-stub
|
|
179
|
+
appendtobody="true"
|
|
180
|
+
class="mmt-4"
|
|
181
|
+
clearable="false"
|
|
182
|
+
closeonselect="false"
|
|
183
|
+
data-testid="fleet-target-cluster-group-selector"
|
|
184
|
+
disabled="false"
|
|
185
|
+
filterable="true"
|
|
186
|
+
hovertooltip="true"
|
|
187
|
+
instore="cluster"
|
|
188
|
+
label="%fleet.clusterTargets.clusterGroups.byName.label%"
|
|
189
|
+
loading="false"
|
|
190
|
+
localizedlabel="false"
|
|
191
|
+
lockedoptions=""
|
|
192
|
+
mode="edit"
|
|
193
|
+
multiple="true"
|
|
194
|
+
nooptionslabelkey="labelSelect.noOptions.empty"
|
|
195
|
+
optionlabel="label"
|
|
196
|
+
options=""
|
|
197
|
+
placeholder="%fleet.clusterTargets.clusterGroups.byName.placeholder%"
|
|
198
|
+
reduce="[Function]"
|
|
199
|
+
required="false"
|
|
200
|
+
requiredirty="true"
|
|
201
|
+
rules=""
|
|
202
|
+
searchable="false"
|
|
203
|
+
selectable="[Function]"
|
|
204
|
+
taggable="true"
|
|
205
|
+
value=""
|
|
206
|
+
/>
|
|
207
|
+
</div>
|
|
208
|
+
</div>
|
|
209
|
+
`;
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
|
+
|
|
3
|
+
exports[`component: HelmOpTargetOptionsSection should match snapshot in compact mode 1`] = `
|
|
4
|
+
<div
|
|
5
|
+
class="col gap-md"
|
|
6
|
+
data-testid="helmop-target-options-section"
|
|
7
|
+
>
|
|
8
|
+
<p>
|
|
9
|
+
%fleet.helmOp.target.clusterDeploymentDescription%
|
|
10
|
+
<br />
|
|
11
|
+
%generic.learnMoreAbout%
|
|
12
|
+
<a
|
|
13
|
+
href="https://fleet.rancher.io/reference/ref-crds#_bundledeploymentoptions"
|
|
14
|
+
rel="noopener noreferrer nofollow"
|
|
15
|
+
target="_blank"
|
|
16
|
+
>
|
|
17
|
+
%fleet.helmOp.target.clusterDeploymentLink%
|
|
18
|
+
<rc-icon-stub
|
|
19
|
+
ariahidden="true"
|
|
20
|
+
size="small"
|
|
21
|
+
status="inherit"
|
|
22
|
+
type="external-link"
|
|
23
|
+
/>
|
|
24
|
+
</a>
|
|
25
|
+
</p>
|
|
26
|
+
<div
|
|
27
|
+
class="col span-6 cluster-deployment-settings-input"
|
|
28
|
+
>
|
|
29
|
+
<labeled-input-stub
|
|
30
|
+
arialabel=""
|
|
31
|
+
class=""
|
|
32
|
+
data-testid="helmop-target-options-service-account"
|
|
33
|
+
delay="0"
|
|
34
|
+
disabled="false"
|
|
35
|
+
hidearrows="false"
|
|
36
|
+
hovertooltip="true"
|
|
37
|
+
ignorepasswordmanagers="false"
|
|
38
|
+
labelkey="fleet.helmOp.serviceAccount.label"
|
|
39
|
+
mode="edit"
|
|
40
|
+
placeholder=""
|
|
41
|
+
placeholderkey="fleet.helmOp.serviceAccount.compactPlaceholder"
|
|
42
|
+
required="false"
|
|
43
|
+
requiredirty="true"
|
|
44
|
+
rules=""
|
|
45
|
+
type="text"
|
|
46
|
+
value="sa-1"
|
|
47
|
+
/>
|
|
48
|
+
<p
|
|
49
|
+
class="sub-description"
|
|
50
|
+
>
|
|
51
|
+
%fleet.helmOp.serviceAccount.compactDescription%
|
|
52
|
+
</p>
|
|
53
|
+
</div>
|
|
54
|
+
<div
|
|
55
|
+
class="col span-6 cluster-deployment-settings-input"
|
|
56
|
+
>
|
|
57
|
+
<labeled-input-stub
|
|
58
|
+
arialabel=""
|
|
59
|
+
class=""
|
|
60
|
+
data-testid="helmop-target-options-namespace"
|
|
61
|
+
delay="0"
|
|
62
|
+
disabled="false"
|
|
63
|
+
hidearrows="false"
|
|
64
|
+
hovertooltip="true"
|
|
65
|
+
ignorepasswordmanagers="false"
|
|
66
|
+
labelkey="fleet.helmOp.targetNamespace.label"
|
|
67
|
+
mode="edit"
|
|
68
|
+
placeholder=""
|
|
69
|
+
placeholderkey="fleet.helmOp.targetNamespace.compactPlaceholder"
|
|
70
|
+
required="false"
|
|
71
|
+
requiredirty="true"
|
|
72
|
+
rules=""
|
|
73
|
+
type="text"
|
|
74
|
+
value="ns-1"
|
|
75
|
+
/>
|
|
76
|
+
<p
|
|
77
|
+
class="sub-description"
|
|
78
|
+
>
|
|
79
|
+
%fleet.helmOp.targetNamespace.compactDescription%
|
|
80
|
+
</p>
|
|
81
|
+
</div>
|
|
82
|
+
</div>
|
|
83
|
+
`;
|
|
84
|
+
|
|
85
|
+
exports[`component: HelmOpTargetOptionsSection should match snapshot with default props 1`] = `
|
|
86
|
+
<div
|
|
87
|
+
class="row"
|
|
88
|
+
data-testid="helmop-target-options-section"
|
|
89
|
+
>
|
|
90
|
+
<!--v-if-->
|
|
91
|
+
<div
|
|
92
|
+
class="col span-6 cluster-deployment-settings-input"
|
|
93
|
+
>
|
|
94
|
+
<labeled-input-stub
|
|
95
|
+
arialabel=""
|
|
96
|
+
class=""
|
|
97
|
+
data-testid="helmop-target-options-service-account"
|
|
98
|
+
delay="0"
|
|
99
|
+
disabled="false"
|
|
100
|
+
hidearrows="false"
|
|
101
|
+
hovertooltip="true"
|
|
102
|
+
ignorepasswordmanagers="false"
|
|
103
|
+
labelkey="fleet.helmOp.serviceAccount.label"
|
|
104
|
+
mode="edit"
|
|
105
|
+
placeholder=""
|
|
106
|
+
placeholderkey="fleet.helmOp.serviceAccount.placeholder"
|
|
107
|
+
required="false"
|
|
108
|
+
requiredirty="true"
|
|
109
|
+
rules=""
|
|
110
|
+
type="text"
|
|
111
|
+
value="sa-1"
|
|
112
|
+
/>
|
|
113
|
+
<!--v-if-->
|
|
114
|
+
</div>
|
|
115
|
+
<div
|
|
116
|
+
class="col span-6 cluster-deployment-settings-input"
|
|
117
|
+
>
|
|
118
|
+
<labeled-input-stub
|
|
119
|
+
arialabel=""
|
|
120
|
+
class=""
|
|
121
|
+
data-testid="helmop-target-options-namespace"
|
|
122
|
+
delay="0"
|
|
123
|
+
disabled="false"
|
|
124
|
+
hidearrows="false"
|
|
125
|
+
hovertooltip="true"
|
|
126
|
+
ignorepasswordmanagers="false"
|
|
127
|
+
labelkey="fleet.helmOp.targetNamespace.label"
|
|
128
|
+
mode="edit"
|
|
129
|
+
placeholder=""
|
|
130
|
+
placeholderkey="fleet.helmOp.targetNamespace.placeholder"
|
|
131
|
+
required="false"
|
|
132
|
+
requiredirty="true"
|
|
133
|
+
rules=""
|
|
134
|
+
type="text"
|
|
135
|
+
value="ns-1"
|
|
136
|
+
/>
|
|
137
|
+
<!--v-if-->
|
|
138
|
+
</div>
|
|
139
|
+
</div>
|
|
140
|
+
`;
|
|
@@ -1,8 +1,11 @@
|
|
|
1
|
-
|
|
2
1
|
<script>
|
|
2
|
+
import { RcButton } from '@components/RcButton';
|
|
3
|
+
|
|
3
4
|
export default {
|
|
4
5
|
name: 'FleetDashboardEmpty',
|
|
5
6
|
|
|
7
|
+
components: { RcButton },
|
|
8
|
+
|
|
6
9
|
props: {
|
|
7
10
|
permissions: {
|
|
8
11
|
type: Object,
|
|
@@ -38,12 +41,13 @@ export default {
|
|
|
38
41
|
<h3 class="mb-30">
|
|
39
42
|
{{ t('fleet.dashboard.noApplications', null, true) }}
|
|
40
43
|
</h3>
|
|
41
|
-
<
|
|
44
|
+
<rc-button
|
|
45
|
+
size="large"
|
|
46
|
+
variant="secondary"
|
|
42
47
|
:to="getStartedLink"
|
|
43
|
-
class="btn role-secondary"
|
|
44
48
|
>
|
|
45
49
|
{{ t('fleet.dashboard.getStarted') }}
|
|
46
|
-
</
|
|
50
|
+
</rc-button>
|
|
47
51
|
</template>
|
|
48
52
|
</div>
|
|
49
53
|
</template>
|
|
@@ -6,6 +6,8 @@ import { RcItemCard } from '@components/RcItemCard';
|
|
|
6
6
|
import ResourceCardSummary from '@shell/components/fleet/dashboard/ResourceCardSummary.vue';
|
|
7
7
|
import FleetUtils from '@shell/utils/fleet';
|
|
8
8
|
import { FleetDashboardState, FleetResourceState } from '@shell/types/fleet';
|
|
9
|
+
import suseAppCoLogo from '@shell/assets/images/content/suse.svg';
|
|
10
|
+
import suseAppCoLogoDark from '@shell/assets/images/content/dark/suse.svg';
|
|
9
11
|
|
|
10
12
|
export default {
|
|
11
13
|
|
|
@@ -107,6 +109,18 @@ export default {
|
|
|
107
109
|
return !this.value.status?.desiredReadyClusters;
|
|
108
110
|
},
|
|
109
111
|
|
|
112
|
+
/**
|
|
113
|
+
* SUSE Application Collection bundles use the SUSE AppCo logo instead of the
|
|
114
|
+
* default resource icon font glyph.
|
|
115
|
+
*/
|
|
116
|
+
isSuseAppCollection() {
|
|
117
|
+
return !!this.value.isSuseAppCollectionFromUI;
|
|
118
|
+
},
|
|
119
|
+
|
|
120
|
+
suseAppCoIcon() {
|
|
121
|
+
return this.$store.getters['prefs/theme'] === 'dark' ? suseAppCoLogoDark : suseAppCoLogo;
|
|
122
|
+
},
|
|
123
|
+
|
|
110
124
|
nameTooltip() {
|
|
111
125
|
if (this.value.nameDisplay?.length >= 15) {
|
|
112
126
|
return this.value.nameDisplay;
|
|
@@ -146,7 +160,14 @@ export default {
|
|
|
146
160
|
@keydown.self.space.stop.prevent="$router.push(value.detailLocation)"
|
|
147
161
|
>
|
|
148
162
|
<template #item-card-image>
|
|
163
|
+
<img
|
|
164
|
+
v-if="isSuseAppCollection"
|
|
165
|
+
class="suse-appco-icon"
|
|
166
|
+
:src="suseAppCoIcon"
|
|
167
|
+
:alt="value.nameDisplay"
|
|
168
|
+
>
|
|
149
169
|
<i
|
|
170
|
+
v-else
|
|
150
171
|
class="icon-lg"
|
|
151
172
|
:class="value.dashboardIcon"
|
|
152
173
|
/>
|
|
@@ -178,6 +199,13 @@ export default {
|
|
|
178
199
|
margin-right: 8px;
|
|
179
200
|
}
|
|
180
201
|
|
|
202
|
+
.suse-appco-icon {
|
|
203
|
+
height: 30px;
|
|
204
|
+
width: 30px;
|
|
205
|
+
margin-right: 8px;
|
|
206
|
+
object-fit: contain;
|
|
207
|
+
}
|
|
208
|
+
|
|
181
209
|
// .item-card-body {
|
|
182
210
|
// width: -webkit-fill-available;
|
|
183
211
|
// }
|
|
@@ -9,6 +9,8 @@ import Tabbed from '@shell/components/Tabbed/index.vue';
|
|
|
9
9
|
import Tab from '@shell/components/Tabbed/Tab.vue';
|
|
10
10
|
import Drawer from '@shell/components/Drawer/Chrome.vue';
|
|
11
11
|
import DrawerCard from '@shell/components/Drawer/DrawerCard.vue';
|
|
12
|
+
import suseAppCoLogo from '@shell/assets/images/content/suse.svg';
|
|
13
|
+
import suseAppCoLogoDark from '@shell/assets/images/content/dark/suse.svg';
|
|
12
14
|
|
|
13
15
|
export default {
|
|
14
16
|
name: 'FleetDashboardResourceDetails',
|
|
@@ -62,6 +64,18 @@ export default {
|
|
|
62
64
|
|
|
63
65
|
clusterSchema() {
|
|
64
66
|
return this.$store.getters['management/schemaFor'](FLEET.CLUSTER);
|
|
67
|
+
},
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* SUSE Application Collection bundles use the SUSE AppCo logo instead of the
|
|
71
|
+
* default resource icon font glyph.
|
|
72
|
+
*/
|
|
73
|
+
isSuseAppCollection() {
|
|
74
|
+
return !!this.value.isSuseAppCollectionFromUI;
|
|
75
|
+
},
|
|
76
|
+
|
|
77
|
+
suseAppCoIcon() {
|
|
78
|
+
return this.$store.getters['prefs/theme'] === 'dark' ? suseAppCoLogoDark : suseAppCoLogo;
|
|
65
79
|
}
|
|
66
80
|
|
|
67
81
|
},
|
|
@@ -84,7 +98,14 @@ export default {
|
|
|
84
98
|
#title
|
|
85
99
|
:data-testid="'fleet-dashboard-resource-details-header'"
|
|
86
100
|
>
|
|
101
|
+
<img
|
|
102
|
+
v-if="isSuseAppCollection"
|
|
103
|
+
class="suse-appco-icon mmr-3"
|
|
104
|
+
:src="suseAppCoIcon"
|
|
105
|
+
:alt="value.nameDisplay"
|
|
106
|
+
>
|
|
87
107
|
<i
|
|
108
|
+
v-else
|
|
88
109
|
class="icon-lg mmr-3"
|
|
89
110
|
:class="value.dashboardIcon"
|
|
90
111
|
/>
|
|
@@ -164,4 +185,11 @@ export default {
|
|
|
164
185
|
.icon-lg {
|
|
165
186
|
font-size: 24px;
|
|
166
187
|
}
|
|
188
|
+
|
|
189
|
+
.suse-appco-icon {
|
|
190
|
+
height: 30px;
|
|
191
|
+
width: 30px;
|
|
192
|
+
object-fit: contain;
|
|
193
|
+
vertical-align: middle;
|
|
194
|
+
}
|
|
167
195
|
</style>
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import { shallowMount } from '@vue/test-utils';
|
|
2
|
+
import ResourceCard from '@shell/components/fleet/dashboard/ResourceCard.vue';
|
|
3
|
+
import suseAppCoLogo from '@shell/assets/images/content/suse.svg';
|
|
4
|
+
import suseAppCoLogoDark from '@shell/assets/images/content/dark/suse.svg';
|
|
5
|
+
|
|
6
|
+
const statePanel = {
|
|
7
|
+
index: 2,
|
|
8
|
+
id: 'success',
|
|
9
|
+
label: 'Active',
|
|
10
|
+
color: '#5D995D',
|
|
11
|
+
icon: 'icon icon-checkmark',
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
const baseValue = {
|
|
15
|
+
type: 'fleet.cattle.io.helmop',
|
|
16
|
+
id: 'helm-op',
|
|
17
|
+
nameDisplay: 'helm-op',
|
|
18
|
+
metadata: { namespace: 'fleet-default' },
|
|
19
|
+
dashboardIcon: 'icon icon-helm',
|
|
20
|
+
status: { desiredReadyClusters: 1 },
|
|
21
|
+
allResourceStatuses: { states: {} },
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
const mountCard = (value: Record<string, unknown>, theme = 'light') => {
|
|
25
|
+
return shallowMount(ResourceCard as any, {
|
|
26
|
+
props: { value, statePanel },
|
|
27
|
+
global: {
|
|
28
|
+
mocks: {
|
|
29
|
+
$store: {
|
|
30
|
+
getters: {
|
|
31
|
+
'i18n/withFallback': () => '',
|
|
32
|
+
'prefs/theme': theme,
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
stubs: {
|
|
37
|
+
// Render the image slot so we can assert what icon is displayed
|
|
38
|
+
RcItemCard: { template: '<div><slot name="item-card-image" /></div>' },
|
|
39
|
+
},
|
|
40
|
+
directives: { 'clean-tooltip': {} },
|
|
41
|
+
},
|
|
42
|
+
});
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
describe('component: FleetDashboardResourceCard', () => {
|
|
46
|
+
describe('SUSE Application Collection bundles', () => {
|
|
47
|
+
it('renders the SUSE AppCo logo instead of the resource icon glyph', () => {
|
|
48
|
+
const wrapper = mountCard({ ...baseValue, isSuseAppCollectionFromUI: true });
|
|
49
|
+
|
|
50
|
+
const img = wrapper.find('img.suse-appco-icon');
|
|
51
|
+
|
|
52
|
+
expect(img.exists()).toBe(true);
|
|
53
|
+
expect(wrapper.find('i.icon-lg').exists()).toBe(false);
|
|
54
|
+
});
|
|
55
|
+
|
|
56
|
+
it('uses the light logo variant by default', () => {
|
|
57
|
+
const wrapper = mountCard({ ...baseValue, isSuseAppCollectionFromUI: true });
|
|
58
|
+
|
|
59
|
+
expect((wrapper.vm as any).suseAppCoIcon).toBe(suseAppCoLogo);
|
|
60
|
+
});
|
|
61
|
+
|
|
62
|
+
it('uses the dark logo variant when the dark theme is active', () => {
|
|
63
|
+
const wrapper = mountCard({ ...baseValue, isSuseAppCollectionFromUI: true }, 'dark');
|
|
64
|
+
|
|
65
|
+
expect((wrapper.vm as any).suseAppCoIcon).toBe(suseAppCoLogoDark);
|
|
66
|
+
});
|
|
67
|
+
});
|
|
68
|
+
|
|
69
|
+
describe('non SUSE Application Collection resources', () => {
|
|
70
|
+
it('renders the default resource icon glyph', () => {
|
|
71
|
+
const wrapper = mountCard({ ...baseValue, isSuseAppCollectionFromUI: false });
|
|
72
|
+
|
|
73
|
+
const icon = wrapper.find('i.icon-lg');
|
|
74
|
+
|
|
75
|
+
expect(icon.exists()).toBe(true);
|
|
76
|
+
expect(icon.classes()).toContain('icon-helm');
|
|
77
|
+
expect(wrapper.find('img.suse-appco-icon').exists()).toBe(false);
|
|
78
|
+
});
|
|
79
|
+
|
|
80
|
+
it('treats a missing isSuseAppCollectionFromUI flag as a non-AppCo resource', () => {
|
|
81
|
+
const wrapper = mountCard({ ...baseValue });
|
|
82
|
+
|
|
83
|
+
expect((wrapper.vm as any).isSuseAppCollection).toBe(false);
|
|
84
|
+
expect(wrapper.find('i.icon-lg').exists()).toBe(true);
|
|
85
|
+
});
|
|
86
|
+
});
|
|
87
|
+
});
|