@rancher/shell 0.3.3 → 0.3.5
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/app.scss +1 -1
- package/assets/styles/fonts/_fontstack.scss +11 -11
- package/assets/styles/vendor/vue-js-modal.scss +3 -3
- package/assets/translations/en-us.yaml +92 -22
- package/assets/translations/zh-hans.yaml +84 -15
- package/babel.config.js +13 -0
- package/chart/gatekeeper.vue +77 -0
- package/chart/istio.vue +108 -111
- package/chart/logging/index.vue +13 -4
- package/chart/monitoring/index.vue +15 -5
- package/chart/monitoring/steps/uninstall-v1.vue +2 -2
- package/chart/rancher-backup/index.vue +10 -3
- package/cloud-credential/aws.vue +1 -1
- package/cloud-credential/digitalocean.vue +1 -1
- package/cloud-credential/gcp.vue +1 -1
- package/cloud-credential/generic.vue +2 -2
- package/cloud-credential/linode.vue +1 -1
- package/cloud-credential/pnap.vue +1 -1
- package/components/ActionMenu.vue +3 -4
- package/components/AssignTo.vue +1 -1
- package/components/AsyncButton.vue +1 -1
- package/components/BannerGraphic.vue +1 -1
- package/components/ButtonDropdown.vue +2 -3
- package/components/ChartPsp.vue +76 -0
- package/components/CruResource.vue +6 -2
- package/components/DashboardMetrics.vue +12 -10
- package/components/DetailText.vue +1 -1
- package/components/DisableAuthProviderModal.vue +1 -1
- package/components/EmberPage.vue +1 -1
- package/components/EtcdInfoBanner.vue +5 -4
- package/components/ExplorerMembers.vue +1 -1
- package/components/ExplorerProjectsNamespaces.vue +15 -2
- package/components/FileDiff.vue +6 -7
- package/components/GrafanaDashboard.vue +18 -21
- package/components/LazyImage.vue +10 -12
- package/components/LogItem.vue +1 -1
- package/components/Markdown.vue +1 -1
- package/components/PromptRemove.vue +2 -2
- package/components/PromptRestore.vue +1 -1
- package/components/ResourceDetail/Masthead.vue +16 -0
- package/components/ResourceDetail/index.vue +21 -4
- package/components/ResourceList/index.vue +1 -1
- package/components/ResourceTable.vue +4 -1
- package/components/SingleClusterInfo.vue +2 -2
- package/components/SortableTable/THead.vue +1 -1
- package/components/SortableTable/index.vue +5 -2
- package/components/__tests__/AsyncButton.test.ts +3 -1
- package/components/__tests__/ChartPsp.test.ts +75 -0
- package/components/__tests__/CruResource.test.ts +3 -1
- package/components/auth/Principal.vue +1 -1
- package/components/fleet/FleetBundles.vue +3 -1
- package/components/fleet/FleetClusters.vue +1 -2
- package/components/fleet/FleetIntro.vue +9 -1
- package/components/fleet/FleetNoWorkspaces.vue +62 -0
- package/components/fleet/FleetSummary.vue +7 -1
- package/components/form/LabeledSelect.vue +14 -11
- package/components/form/MatchExpressions.vue +17 -2
- package/components/form/NameNsDescription.vue +31 -45
- package/components/form/ResourceSelector.vue +1 -1
- package/components/form/SecretSelector.vue +5 -1
- package/components/form/ServiceNameSelect.vue +1 -1
- package/components/form/SimpleSecretSelector.vue +9 -9
- package/components/form/__tests__/LabeledSelect.test.ts +138 -0
- package/components/form/__tests__/NameNsDescription.ts +32 -0
- package/components/formatter/InternalExternalIP.vue +6 -0
- package/components/formatter/InvolvedObjectLink.vue +54 -0
- package/components/formatter/Link.vue +20 -4
- package/components/formatter/LinkName.vue +6 -1
- package/components/formatter/ServiceTargets.vue +1 -1
- package/components/nav/Group.vue +2 -2
- package/components/nav/NamespaceFilter.vue +15 -11
- package/components/nav/TopLevelMenu.vue +2 -4
- package/components/nav/Type.vue +1 -1
- package/components/nav/WorkspaceSwitcher.vue +46 -5
- package/config/labels-annotations.js +17 -0
- package/config/product/auth.js +3 -2
- package/config/product/explorer.js +11 -4
- package/config/product/fleet.js +2 -0
- package/config/router.js +414 -0
- package/config/table-headers.js +10 -2
- package/config/types.js +11 -8
- package/config/uiplugins.js +30 -0
- package/content/docs/en-us/whats-new.md +10 -0
- package/content/docs/zh-hans/whats-new.md +11 -1
- package/core/plugin-helpers.js +64 -61
- package/core/plugin-routes.ts +23 -0
- package/creators/app/app.package.json +2 -1
- package/creators/app/files/.eslintrc.js +1 -1
- package/creators/app/files/babel.config.js +1 -18
- package/creators/app/files/vue.config.js +7 -0
- package/creators/app/init +5 -5
- package/creators/pkg/files/.github/workflows/build-extension.yml +111 -0
- package/creators/pkg/init +35 -4
- package/creators/update/init +1 -1
- package/detail/constraints.gatekeeper.sh.constraint.vue +20 -10
- package/detail/fleet.cattle.io.gitrepo.vue +19 -11
- package/detail/harvesterhci.io.management.cluster.vue +3 -3
- package/detail/provisioning.cattle.io.cluster.vue +54 -12
- package/detail/workload/index.vue +3 -3
- package/dialog/AddClusterMemberDialog.vue +1 -1
- package/dialog/AddProjectMemberDialog.vue +2 -2
- package/dialog/AddonConfigConfirmationDialog.vue +27 -15
- package/dialog/DiagnosticTimingsDialog.vue +1 -1
- package/dialog/ForceMachineRemoveDialog.vue +1 -1
- package/dialog/GenericPrompt.vue +18 -6
- package/dialog/RotateEncryptionKeyDialog.vue +1 -1
- package/dialog/SaveAsRKETemplateDialog.vue +1 -1
- package/dialog/ScaleMachineDownDialog.vue +1 -1
- package/edit/auth/github.vue +8 -8
- package/edit/auth/googleoauth.vue +5 -5
- package/edit/auth/ldap/index.vue +1 -1
- package/edit/auth/oidc.vue +1 -1
- package/edit/auth/saml.vue +1 -1
- package/edit/cis.cattle.io.clusterscan.vue +1 -1
- package/edit/fleet.cattle.io.clustergroup.vue +6 -4
- package/edit/fleet.cattle.io.gitrepo.vue +16 -3
- package/edit/helm.cattle.io.projecthelmchart.vue +5 -1
- package/edit/management.cattle.io.fleetworkspace.vue +141 -6
- package/edit/management.cattle.io.podsecurityadmissionconfigurationtemplate.vue +4 -1
- package/edit/management.cattle.io.setting.vue +1 -1
- package/edit/monitoring.coreos.com.alertmanagerconfig/types/webhook.vue +2 -2
- package/edit/monitoring.coreos.com.receiver/tls.vue +18 -18
- package/edit/monitoring.coreos.com.receiver/types/webhook.banner.vue +4 -4
- package/edit/monitoring.coreos.com.receiver/types/webhook.vue +1 -1
- package/edit/namespace.vue +2 -2
- package/edit/networking.k8s.io.networkpolicy/PolicyRuleTarget.vue +126 -45
- package/edit/networking.k8s.io.networkpolicy/index.vue +1 -1
- package/edit/provisioning.cattle.io.cluster/MachinePool.vue +10 -0
- package/edit/provisioning.cattle.io.cluster/RegistryConfigs.vue +1 -0
- package/edit/provisioning.cattle.io.cluster/__tests__/rke2.test.ts +202 -2
- package/edit/provisioning.cattle.io.cluster/rke2.vue +248 -84
- package/edit/resources.cattle.io.backup.vue +1 -1
- package/edit/service.vue +1 -1
- package/edit/storage.k8s.io.storageclass/provisioners/driver.harvesterhci.io.vue +2 -2
- package/edit/workload/__tests__/Job.test.ts +3 -1
- package/edit/workload/index.vue +8 -3
- package/edit/workload/mixins/workload.js +16 -0
- package/layouts/default.vue +7 -3
- package/list/fleet.cattle.io.bundle.vue +6 -3
- package/list/fleet.cattle.io.clusterregistrationtoken.vue +3 -1
- package/list/fleet.cattle.io.gitrepo.vue +44 -5
- package/list/management.cattle.io.fleetworkspace.vue +45 -0
- package/list/node.vue +69 -16
- package/list/provisioning.cattle.io.cluster.vue +30 -1
- package/machine-config/azure.vue +97 -38
- package/middleware/authenticated.js +34 -0
- package/mixins/chart.js +73 -2
- package/mixins/resource-fetch.js +2 -2
- package/models/apps.statefulset.js +28 -0
- package/models/cluster/node.js +23 -2
- package/models/cluster.x-k8s.io.machine.js +4 -2
- package/models/clusterroletemplatebinding.js +7 -0
- package/models/constraints.gatekeeper.sh.constraint.js +9 -0
- package/models/fleet.cattle.io.cluster.js +19 -10
- package/models/fleet.cattle.io.gitrepo.js +7 -2
- package/models/management.cattle.io.cluster.js +1 -1
- package/models/management.cattle.io.fleetworkspace.js +12 -0
- package/models/management.cattle.io.gitreporestriction.js +5 -0
- package/models/management.cattle.io.podsecurityadmissionconfigurationtemplate.js +3 -0
- package/models/namespace.js +5 -5
- package/models/provisioning.cattle.io.cluster.js +7 -5
- package/nuxt/App.js +210 -0
- package/nuxt/axios.js +186 -0
- package/nuxt/client.js +817 -0
- package/nuxt/components/nuxt-build-indicator.vue +143 -0
- package/nuxt/components/nuxt-child.js +122 -0
- package/nuxt/components/nuxt-error.vue +98 -0
- package/nuxt/components/nuxt-link.client.js +98 -0
- package/nuxt/components/nuxt-link.server.js +16 -0
- package/nuxt/components/nuxt-loading.vue +154 -0
- package/nuxt/components/nuxt.js +101 -0
- package/nuxt/cookie-universal-nuxt.js +9 -0
- package/nuxt/empty.js +1 -0
- package/nuxt/index.js +365 -0
- package/nuxt/jsonp.js +82 -0
- package/nuxt/loading.html +39 -0
- package/nuxt/middleware.js +12 -0
- package/nuxt/mixins/fetch.client.js +90 -0
- package/nuxt/mixins/fetch.server.js +69 -0
- package/nuxt/portal-vue.js +4 -0
- package/nuxt/server.js +312 -0
- package/nuxt/store.js +178 -0
- package/nuxt/utils.js +630 -0
- package/nuxt/views/app.template.html +9 -0
- package/nuxt/views/error.html +23 -0
- package/package.json +5 -9
- package/pages/auth/setup.vue +2 -2
- package/pages/c/_cluster/apps/charts/__tests__/install.helper.test.ts +33 -0
- package/pages/c/_cluster/apps/charts/chart.vue +4 -4
- package/pages/c/_cluster/apps/charts/install.helpers.js +26 -0
- package/pages/c/_cluster/apps/charts/install.vue +40 -66
- package/pages/c/_cluster/explorer/EventsTable.vue +5 -19
- package/pages/c/_cluster/explorer/index.vue +29 -25
- package/pages/c/_cluster/explorer/tools/index.vue +8 -8
- package/pages/c/_cluster/fleet/index.vue +95 -34
- package/pages/c/_cluster/gatekeeper/index.vue +1 -1
- package/pages/c/_cluster/istio/index.vue +5 -5
- package/pages/c/_cluster/manager/cloudCredential/index.vue +1 -1
- package/pages/c/_cluster/monitoring/index.vue +7 -0
- package/pages/c/_cluster/uiplugins/InstallDialog.vue +8 -8
- package/pages/c/_cluster/uiplugins/PluginInfoPanel.vue +20 -7
- package/pages/c/_cluster/uiplugins/index.vue +49 -17
- package/pages/home.vue +9 -4
- package/pages/index.vue +10 -1
- package/plugins/clean-html-directive.js +31 -0
- package/plugins/dashboard-store/actions.js +32 -9
- package/plugins/dashboard-store/mutations.js +5 -2
- package/plugins/dashboard-store/resource-class.js +8 -1
- package/plugins/steve/mutations.js +3 -2
- package/plugins/steve/steve-description-class.js +5 -1
- package/plugins/steve/subscribe.js +63 -54
- package/plugins/steve-create-worker.js +14 -0
- package/promptRemove/management.cattle.io.globalrole.vue +2 -2
- package/promptRemove/management.cattle.io.project.vue +2 -2
- package/promptRemove/management.cattle.io.roletemplate.vue +2 -2
- package/promptRemove/pod.vue +1 -1
- package/public/index.html +65 -0
- package/rancher-components/components/Banner/Banner.test.ts +9 -1
- package/rancher-components/components/Banner/Banner.vue +1 -1
- package/rancher-components/components/Form/Checkbox/Checkbox.vue +2 -0
- package/rancher-components/components/Form/Radio/RadioButton.vue +1 -1
- package/scripts/build-pkg.sh +1 -0
- package/scripts/clean +6 -0
- package/scripts/extension/bundle +58 -0
- package/scripts/extension/helmpatch +89 -0
- package/scripts/extension/publish +314 -0
- package/scripts/test-plugins-build.sh +4 -0
- package/store/__tests__/index.test.ts +110 -0
- package/store/index.js +145 -58
- package/store/type-map.js +26 -19
- package/tsconfig.default.json +36 -0
- package/tsconfig.json +24 -0
- package/types/shell/index.d.ts +420 -343
- package/utils/__tests__/string.test.ts +12 -0
- package/utils/auth.js +65 -0
- package/utils/monitoring.js +2 -1
- package/utils/position.js +5 -8
- package/utils/router.scrollBehavior.js +80 -0
- package/utils/select.js +1 -3
- package/utils/socket.js +1 -0
- package/utils/string.js +13 -0
- package/utils/time.js +9 -0
- package/vue.config.js +679 -0
- package/yarn-error.log +196 -0
- package/chart/rancher-alerting-drivers.vue +0 -53
- package/chart/rancher-gatekeeper.vue +0 -37
- package/creators/app/files/nuxt.config.js +0 -6
- package/models/management.cattle.io.podsecurityadmissionconfigurationtemplate.ts +0 -4
- package/nuxt.config.js +0 -798
|
@@ -11,6 +11,7 @@ import { CAPI, MANAGEMENT, NORMAN, SNAPSHOT } from '@shell/config/types';
|
|
|
11
11
|
import {
|
|
12
12
|
STATE, NAME as NAME_COL, AGE, AGE_NORMAN, INTERNAL_EXTERNAL_IP, STATE_NORMAN, ROLES, MACHINE_NODE_OS, MANAGEMENT_NODE_OS, NAME,
|
|
13
13
|
} from '@shell/config/table-headers';
|
|
14
|
+
import { STATES_ENUM } from '@shell/plugins/dashboard-store/resource-class';
|
|
14
15
|
import CustomCommand from '@shell/edit/provisioning.cattle.io.cluster/CustomCommand';
|
|
15
16
|
import AsyncButton from '@shell/components/AsyncButton.vue';
|
|
16
17
|
import AnsiUp from 'ansi_up';
|
|
@@ -30,6 +31,7 @@ import Socket, {
|
|
|
30
31
|
import { get } from '@shell/utils/object';
|
|
31
32
|
import CapiMachineDeployment from '@shell/models/cluster.x-k8s.io.machinedeployment';
|
|
32
33
|
import { isAlternate } from '@shell/utils/platform';
|
|
34
|
+
import { defaultTableSortGenerationFn } from '@shell/components/ResourceTable.vue';
|
|
33
35
|
|
|
34
36
|
let lastId = 1;
|
|
35
37
|
const ansiup = new AnsiUp();
|
|
@@ -248,15 +250,33 @@ export default {
|
|
|
248
250
|
},
|
|
249
251
|
|
|
250
252
|
fakeMachines() {
|
|
253
|
+
const machineNameFn = (clusterName, machinePoolName) => `${ clusterName }-${ machinePoolName }`;
|
|
254
|
+
|
|
251
255
|
// When we scale up, the quantity will change to N+1 - so from 0 to 1, the quantity changes,
|
|
252
256
|
// but it takes tiem for the machine to appear, so the pool is empty, but if we just go off on a non-zero quqntity
|
|
253
257
|
// then the pool would be hidden - so we find empty pool by checking the machines
|
|
254
258
|
const emptyPools = (this.value.spec.rkeConfig?.machinePools || []).filter((mp) => {
|
|
255
|
-
const
|
|
259
|
+
const machineFullName = machineNameFn(this.value.name, mp.name);
|
|
260
|
+
|
|
256
261
|
const machines = this.value.machines.filter((machine) => {
|
|
257
262
|
const isElementalCluster = machine.spec?.infrastructureRef?.apiVersion.startsWith('elemental.cattle.io');
|
|
263
|
+
const machinePoolInfName = machine.spec?.infrastructureRef?.name;
|
|
264
|
+
|
|
265
|
+
if (isElementalCluster) {
|
|
266
|
+
return machinePoolInfName.includes(machineFullName);
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
// if labels exist, then the machineFullName must unequivocally be equal to manchineLabelFullName (based on labels)
|
|
270
|
+
const machineLabelClusterName = machine.metadata?.labels?.['cluster.x-k8s.io/cluster-name'];
|
|
271
|
+
const machineLabelPoolName = machine.metadata?.labels?.['rke.cattle.io/rke-machine-pool-name'];
|
|
272
|
+
|
|
273
|
+
if (machineLabelClusterName && machineLabelPoolName) {
|
|
274
|
+
const manchineLabelFullName = machineNameFn(machineLabelClusterName, machineLabelPoolName);
|
|
275
|
+
|
|
276
|
+
return machineFullName === manchineLabelFullName;
|
|
277
|
+
}
|
|
258
278
|
|
|
259
|
-
return
|
|
279
|
+
return machinePoolInfName.startsWith(machineFullName);
|
|
260
280
|
});
|
|
261
281
|
|
|
262
282
|
return machines.length === 0;
|
|
@@ -335,7 +355,7 @@ export default {
|
|
|
335
355
|
},
|
|
336
356
|
|
|
337
357
|
showEksNodeGroupWarning() {
|
|
338
|
-
if ( this.value.provisioner === 'EKS' ) {
|
|
358
|
+
if ( this.value.provisioner === 'EKS' && this.value.state !== STATES_ENUM.ACTIVE) {
|
|
339
359
|
const desiredTotal = this.value.eksNodeGroups.filter(g => g.desiredSize === 0);
|
|
340
360
|
|
|
341
361
|
if ( desiredTotal.length === this.value.eksNodeGroups.length ) {
|
|
@@ -620,6 +640,26 @@ export default {
|
|
|
620
640
|
return day(time).format(this.dateTimeFormatStr);
|
|
621
641
|
}
|
|
622
642
|
},
|
|
643
|
+
|
|
644
|
+
machineSortGenerationFn() {
|
|
645
|
+
// The sort generation function creates a unique value and is used to create a key including sort details.
|
|
646
|
+
// The unique key determines if the list is redrawn or a cached version is shown.
|
|
647
|
+
// Because we ensure the 'not in a pool' group is there via a row, and timing issues, the unqiue key doesn't change
|
|
648
|
+
// after a machine is added/removed... so the list won't update... so we need to inject a string to ensure the key is fresh
|
|
649
|
+
const base = defaultTableSortGenerationFn(this.machineSchema, this.$store);
|
|
650
|
+
|
|
651
|
+
return base + (!!this.fakeMachines.length ? '-fake' : '');
|
|
652
|
+
},
|
|
653
|
+
|
|
654
|
+
nodeSortGenerationFn() {
|
|
655
|
+
// The sort generation function creates a unique value and is used to create a key including sort details.
|
|
656
|
+
// The unique key determines if the list is redrawn or a cached version is shown.
|
|
657
|
+
// Because we ensure the 'not in a pool' group is there via a row, and timing issues, the unqiue key doesn't change
|
|
658
|
+
// after a machine is added/removed... so the list won't update... so we need to inject a string to ensure the key is fresh
|
|
659
|
+
const base = defaultTableSortGenerationFn(this.mgmtNodeSchema, this.$store);
|
|
660
|
+
|
|
661
|
+
return base + (!!this.fakeNodes.length ? '-fake' : '');
|
|
662
|
+
},
|
|
623
663
|
}
|
|
624
664
|
};
|
|
625
665
|
</script>
|
|
@@ -663,6 +703,7 @@ export default {
|
|
|
663
703
|
:group-by="value.isCustom ? null : 'poolId'"
|
|
664
704
|
group-ref="pool"
|
|
665
705
|
:group-sort="['pool.nameDisplay']"
|
|
706
|
+
:sort-generation-fn="machineSortGenerationFn"
|
|
666
707
|
>
|
|
667
708
|
<template #main-row:isFake="{fullColspan}">
|
|
668
709
|
<tr class="main-row">
|
|
@@ -686,11 +727,11 @@ export default {
|
|
|
686
727
|
>
|
|
687
728
|
<div
|
|
688
729
|
v-if="group && group.ref"
|
|
689
|
-
v-html="group.ref.groupByPoolShortLabel"
|
|
730
|
+
v-clean-html="group.ref.groupByPoolShortLabel"
|
|
690
731
|
/>
|
|
691
732
|
<div
|
|
692
733
|
v-else
|
|
693
|
-
v-html="t('resourceTable.groupLabel.notInANodePool')"
|
|
734
|
+
v-clean-html="t('resourceTable.groupLabel.notInANodePool')"
|
|
694
735
|
/>
|
|
695
736
|
<div
|
|
696
737
|
v-if="group.ref && group.ref.template"
|
|
@@ -747,6 +788,7 @@ export default {
|
|
|
747
788
|
:group-by="value.isCustom ? null : 'spec.nodePoolName'"
|
|
748
789
|
group-ref="pool"
|
|
749
790
|
:group-sort="['pool.nameDisplay']"
|
|
791
|
+
:sort-generation-fn="nodeSortGenerationFn"
|
|
750
792
|
>
|
|
751
793
|
<template #main-row:isFake="{fullColspan}">
|
|
752
794
|
<tr class="main-row">
|
|
@@ -770,11 +812,11 @@ export default {
|
|
|
770
812
|
>
|
|
771
813
|
<div
|
|
772
814
|
v-if="group.ref"
|
|
773
|
-
v-html="t('resourceTable.groupLabel.nodePool', { name: group.ref.spec.hostnamePrefix}, true)"
|
|
815
|
+
v-clean-html="t('resourceTable.groupLabel.nodePool', { name: group.ref.spec.hostnamePrefix}, true)"
|
|
774
816
|
/>
|
|
775
817
|
<div
|
|
776
818
|
v-else
|
|
777
|
-
v-html="t('resourceTable.groupLabel.notInANodePool')"
|
|
819
|
+
v-clean-html="t('resourceTable.groupLabel.notInANodePool')"
|
|
778
820
|
/>
|
|
779
821
|
<div
|
|
780
822
|
v-if="group.ref && group.ref.nodeTemplate"
|
|
@@ -846,13 +888,13 @@ export default {
|
|
|
846
888
|
>
|
|
847
889
|
<td
|
|
848
890
|
:key="line.id + '-time'"
|
|
891
|
+
v-clean-html="format(line.time)"
|
|
849
892
|
class="time"
|
|
850
|
-
v-html="format(line.time)"
|
|
851
893
|
/>
|
|
852
894
|
<td
|
|
853
895
|
:key="line.id + '-msg'"
|
|
896
|
+
v-clean-html="line.msg"
|
|
854
897
|
class="msg"
|
|
855
|
-
v-html="line.msg"
|
|
856
898
|
/>
|
|
857
899
|
</tr>
|
|
858
900
|
</template>
|
|
@@ -890,22 +932,22 @@ export default {
|
|
|
890
932
|
@copied-windows="hasWindowsMachine ? null : showWindowsWarning = true"
|
|
891
933
|
/>
|
|
892
934
|
<template v-else>
|
|
893
|
-
<h4 v-html="t('cluster.import.commandInstructions', null, true)" />
|
|
935
|
+
<h4 v-clean-html="t('cluster.import.commandInstructions', null, true)" />
|
|
894
936
|
<CopyCode class="m-10 p-10">
|
|
895
937
|
{{ clusterToken.command }}
|
|
896
938
|
</CopyCode>
|
|
897
939
|
|
|
898
940
|
<h4
|
|
941
|
+
v-clean-html="t('cluster.import.commandInstructionsInsecure', null, true)"
|
|
899
942
|
class="mt-10"
|
|
900
|
-
v-html="t('cluster.import.commandInstructionsInsecure', null, true)"
|
|
901
943
|
/>
|
|
902
944
|
<CopyCode class="m-10 p-10">
|
|
903
945
|
{{ clusterToken.insecureCommand }}
|
|
904
946
|
</CopyCode>
|
|
905
947
|
|
|
906
948
|
<h4
|
|
949
|
+
v-clean-html="t('cluster.import.clusterRoleBindingInstructions', null, true)"
|
|
907
950
|
class="mt-10"
|
|
908
|
-
v-html="t('cluster.import.clusterRoleBindingInstructions', null, true)"
|
|
909
951
|
/>
|
|
910
952
|
<CopyCode class="m-10 p-10">
|
|
911
953
|
{{ t('cluster.import.clusterRoleBindingCommand', null, true) }}
|
|
@@ -108,8 +108,8 @@ export default {
|
|
|
108
108
|
computed: {
|
|
109
109
|
...mapGetters(['currentCluster']),
|
|
110
110
|
|
|
111
|
-
|
|
112
|
-
return this.value
|
|
111
|
+
isScalable() {
|
|
112
|
+
return this.value?.canUpdate;
|
|
113
113
|
},
|
|
114
114
|
|
|
115
115
|
isJob() {
|
|
@@ -335,7 +335,7 @@ export default {
|
|
|
335
335
|
class="text-right"
|
|
336
336
|
:label="t('tableHeaders.scale')"
|
|
337
337
|
:value="value.spec.replicas"
|
|
338
|
-
:disabled="!
|
|
338
|
+
:disabled="!isScalable"
|
|
339
339
|
@minus="scaleDown"
|
|
340
340
|
@plus="scaleUp"
|
|
341
341
|
/>
|
|
@@ -63,7 +63,7 @@ export default {
|
|
|
63
63
|
async principalProperty() {
|
|
64
64
|
const principal = await this.principal;
|
|
65
65
|
|
|
66
|
-
return principal
|
|
66
|
+
return principal?.principalType === 'group' ? 'groupPrincipalId' : 'userPrincipalId';
|
|
67
67
|
},
|
|
68
68
|
|
|
69
69
|
close() {
|
|
@@ -114,8 +114,8 @@ export default {
|
|
|
114
114
|
>
|
|
115
115
|
<h4
|
|
116
116
|
slot="title"
|
|
117
|
+
v-clean-html="t('addProjectMemberDialog.title')"
|
|
117
118
|
class="text-default-text"
|
|
118
|
-
v-html="t('addProjectMemberDialog.title')"
|
|
119
119
|
/>
|
|
120
120
|
|
|
121
121
|
<div
|
|
@@ -46,7 +46,7 @@ export default {
|
|
|
46
46
|
|
|
47
47
|
<template>
|
|
48
48
|
<Card
|
|
49
|
-
class="
|
|
49
|
+
class="prompt-restore"
|
|
50
50
|
:show-highlight-border="false"
|
|
51
51
|
>
|
|
52
52
|
<h4
|
|
@@ -66,24 +66,36 @@ export default {
|
|
|
66
66
|
slot="actions"
|
|
67
67
|
class="bottom"
|
|
68
68
|
>
|
|
69
|
-
<
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
69
|
+
<div class="buttons">
|
|
70
|
+
<button
|
|
71
|
+
type="button"
|
|
72
|
+
class="btn role-secondary mr-10"
|
|
73
|
+
@click="close"
|
|
74
|
+
>
|
|
75
|
+
{{ t('generic.cancel') }}
|
|
76
|
+
</button>
|
|
77
|
+
<AsyncButton
|
|
78
|
+
mode="continue"
|
|
79
|
+
@click="apply"
|
|
80
|
+
/>
|
|
81
|
+
</div>
|
|
80
82
|
</div>
|
|
81
83
|
</Card>
|
|
82
84
|
</template>
|
|
83
85
|
<style lang='scss' scoped>
|
|
84
|
-
|
|
86
|
+
.prompt-restore {
|
|
87
|
+
margin: 0;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.bottom {
|
|
91
|
+
display: flex;
|
|
92
|
+
flex-direction: column;
|
|
93
|
+
flex: 1;
|
|
94
|
+
|
|
95
|
+
.buttons {
|
|
85
96
|
display: flex;
|
|
86
|
-
|
|
87
|
-
|
|
97
|
+
justify-content: flex-end;
|
|
98
|
+
width: 100%;
|
|
88
99
|
}
|
|
100
|
+
}
|
|
89
101
|
</style>
|
|
@@ -83,7 +83,7 @@ export default {
|
|
|
83
83
|
class="pl-10 pr-10"
|
|
84
84
|
>
|
|
85
85
|
<span
|
|
86
|
-
v-html="t('promptForceRemove.removeWarning', { nameToMatch }, true)"
|
|
86
|
+
v-clean-html="t('promptForceRemove.removeWarning', { nameToMatch }, true)"
|
|
87
87
|
/>
|
|
88
88
|
<div class="mt-10 mb-10">
|
|
89
89
|
{{ t('promptForceRemove.confirmName') }}
|
package/dialog/GenericPrompt.vue
CHANGED
|
@@ -3,6 +3,7 @@ import AsyncButton from '@shell/components/AsyncButton';
|
|
|
3
3
|
import { Card } from '@components/Card';
|
|
4
4
|
import { Banner } from '@components/Banner';
|
|
5
5
|
import { exceptionToErrorsArray } from '@shell/utils/error';
|
|
6
|
+
import { decodeHtml } from '@shell/utils/string';
|
|
6
7
|
|
|
7
8
|
export default {
|
|
8
9
|
components: {
|
|
@@ -26,28 +27,39 @@ export default {
|
|
|
26
27
|
body: {
|
|
27
28
|
type: String,
|
|
28
29
|
default: ''
|
|
29
|
-
}
|
|
30
|
+
},
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* Callback to identify response of the prompt
|
|
34
|
+
*/
|
|
35
|
+
confirm: {
|
|
36
|
+
type: Function,
|
|
37
|
+
default: () => { }
|
|
38
|
+
},
|
|
30
39
|
},
|
|
31
40
|
data() {
|
|
32
41
|
return { errors: [] };
|
|
33
42
|
},
|
|
34
43
|
|
|
35
44
|
methods: {
|
|
45
|
+
decodeHtml,
|
|
36
46
|
close() {
|
|
37
|
-
this
|
|
47
|
+
this.confirm(false);
|
|
48
|
+
this.$emit('close', false);
|
|
38
49
|
},
|
|
39
50
|
|
|
40
51
|
async apply(buttonDone) {
|
|
41
52
|
try {
|
|
42
53
|
await this.applyAction(buttonDone);
|
|
43
|
-
this.
|
|
54
|
+
this.confirm(true);
|
|
55
|
+
this.$emit('close', true);
|
|
44
56
|
} catch (err) {
|
|
45
57
|
console.error(err); // eslint-disable-line
|
|
46
58
|
this.errors = exceptionToErrorsArray(err);
|
|
47
59
|
buttonDone(false);
|
|
48
60
|
}
|
|
49
61
|
}
|
|
50
|
-
}
|
|
62
|
+
},
|
|
51
63
|
};
|
|
52
64
|
</script>
|
|
53
65
|
|
|
@@ -58,16 +70,16 @@ export default {
|
|
|
58
70
|
>
|
|
59
71
|
<h4
|
|
60
72
|
slot="title"
|
|
73
|
+
v-clean-html="title"
|
|
61
74
|
class="text-default-text"
|
|
62
|
-
v-html="title"
|
|
63
75
|
/>
|
|
64
76
|
|
|
65
77
|
<template slot="body">
|
|
66
78
|
<slot name="body">
|
|
67
79
|
<div
|
|
80
|
+
v-clean-html="decodeHtml(body)"
|
|
68
81
|
class="pl-10 pr-10"
|
|
69
82
|
style="min-height: 50px; display: flex;"
|
|
70
|
-
v-html="body"
|
|
71
83
|
/>
|
|
72
84
|
</slot>
|
|
73
85
|
</template>
|
|
@@ -74,8 +74,8 @@ export default {
|
|
|
74
74
|
>
|
|
75
75
|
<h4
|
|
76
76
|
slot="title"
|
|
77
|
+
v-clean-html="t('promptSaveAsRKETemplate.title', { cluster: cluster.displayName }, true)"
|
|
77
78
|
class="text-default-text"
|
|
78
|
-
v-html="t('promptSaveAsRKETemplate.title', { cluster: cluster.displayName }, true)"
|
|
79
79
|
/>
|
|
80
80
|
|
|
81
81
|
<div
|
|
@@ -116,7 +116,7 @@ export default {
|
|
|
116
116
|
<span
|
|
117
117
|
v-for="i in ignored"
|
|
118
118
|
:key="i.name"
|
|
119
|
-
v-html="t('promptScaleMachineDown.retainedMachine2', { name: i.name }, true)"
|
|
119
|
+
v-clean-html="t('promptScaleMachineDown.retainedMachine2', { name: i.name }, true)"
|
|
120
120
|
/>
|
|
121
121
|
</div>
|
|
122
122
|
</div>
|
package/edit/auth/github.vue
CHANGED
|
@@ -187,9 +187,9 @@ export default {
|
|
|
187
187
|
class="step-box"
|
|
188
188
|
>
|
|
189
189
|
<ul class="step-list">
|
|
190
|
-
<li v-html="t(`authConfig.${NAME}.form.prefix.1`, tArgs, true)" />
|
|
191
|
-
<li v-html="t(`authConfig.${NAME}.form.prefix.2`, tArgs, true)" />
|
|
192
|
-
<li v-html="t(`authConfig.${NAME}.form.prefix.3`, tArgs, true)" />
|
|
190
|
+
<li v-clean-html="t(`authConfig.${NAME}.form.prefix.1`, tArgs, true)" />
|
|
191
|
+
<li v-clean-html="t(`authConfig.${NAME}.form.prefix.2`, tArgs, true)" />
|
|
192
|
+
<li v-clean-html="t(`authConfig.${NAME}.form.prefix.3`, tArgs, true)" />
|
|
193
193
|
</ul>
|
|
194
194
|
</InfoBox>
|
|
195
195
|
<InfoBox
|
|
@@ -200,7 +200,7 @@ export default {
|
|
|
200
200
|
<li>
|
|
201
201
|
{{ t(`authConfig.${NAME}.form.instruction`, tArgs, true) }}
|
|
202
202
|
<ul class="mt-10">
|
|
203
|
-
<li><b>{{ t(`authConfig.${NAME}.form.app.label`) }}</b>: <span v-html="t(`authConfig.${NAME}.form.app.value`, tArgs, true)" /></li>
|
|
203
|
+
<li><b>{{ t(`authConfig.${NAME}.form.app.label`) }}</b>: <span v-clean-html="t(`authConfig.${NAME}.form.app.value`, tArgs, true)" /></li>
|
|
204
204
|
<li>
|
|
205
205
|
<b>{{ t(`authConfig.${NAME}.form.homepage.label`) }}</b>: {{ serverUrl }} <CopyToClipboard
|
|
206
206
|
label-as="tooltip"
|
|
@@ -209,7 +209,7 @@ export default {
|
|
|
209
209
|
action-color="bg-transparent"
|
|
210
210
|
/>
|
|
211
211
|
</li>
|
|
212
|
-
<li><b>{{ t(`authConfig.${NAME}.form.description.label`) }}</b>: <span v-html="t(`authConfig.${NAME}.form.description.value`, tArgs, true)" /></li>
|
|
212
|
+
<li><b>{{ t(`authConfig.${NAME}.form.description.label`) }}</b>: <span v-clean-html="t(`authConfig.${NAME}.form.description.value`, tArgs, true)" /></li>
|
|
213
213
|
<li>
|
|
214
214
|
<b>{{ t(`authConfig.${NAME}.form.callback.label`) }}</b>: {{ serverUrl }} <CopyToClipboard
|
|
215
215
|
:text="serverUrl"
|
|
@@ -227,8 +227,8 @@ export default {
|
|
|
227
227
|
class="mb-20"
|
|
228
228
|
>
|
|
229
229
|
<ul class="step-list">
|
|
230
|
-
<li v-html="t(`authConfig.${NAME}.form.suffix.1`, tArgs, true)" />
|
|
231
|
-
<li v-html="t(`authConfig.${NAME}.form.suffix.2`, tArgs, true)" />
|
|
230
|
+
<li v-clean-html="t(`authConfig.${NAME}.form.suffix.1`, tArgs, true)" />
|
|
231
|
+
<li v-clean-html="t(`authConfig.${NAME}.form.suffix.2`, tArgs, true)" />
|
|
232
232
|
</ul>
|
|
233
233
|
</InfoBox>
|
|
234
234
|
|
|
@@ -255,8 +255,8 @@ export default {
|
|
|
255
255
|
>
|
|
256
256
|
<div class="col span-12">
|
|
257
257
|
<Banner
|
|
258
|
+
v-clean-html="t('authConfig.associatedWarning', tArgs, true)"
|
|
258
259
|
color="info"
|
|
259
|
-
v-html="t('authConfig.associatedWarning', tArgs, true)"
|
|
260
260
|
/>
|
|
261
261
|
</div>
|
|
262
262
|
</div>
|
|
@@ -141,7 +141,7 @@ export default {
|
|
|
141
141
|
:step="1"
|
|
142
142
|
class=" mt-20 mb-20"
|
|
143
143
|
>
|
|
144
|
-
<h3 v-html="t('authConfig.googleoauth.steps.1.title', tArgs, true)" />
|
|
144
|
+
<h3 v-clean-html="t('authConfig.googleoauth.steps.1.title', tArgs, true)" />
|
|
145
145
|
<ul class="mt-0 step-list">
|
|
146
146
|
<li>{{ t('authConfig.googleoauth.steps.1.body.1', {}, true) }} </li>
|
|
147
147
|
<li>
|
|
@@ -165,7 +165,7 @@ export default {
|
|
|
165
165
|
class="mb-20"
|
|
166
166
|
>
|
|
167
167
|
<div class="row">
|
|
168
|
-
<h3 v-html="t('authConfig.googleoauth.steps.2.title', tArgs, true)" />
|
|
168
|
+
<h3 v-clean-html="t('authConfig.googleoauth.steps.2.title', tArgs, true)" />
|
|
169
169
|
</div>
|
|
170
170
|
<div class="row">
|
|
171
171
|
<div class="col span-6">
|
|
@@ -211,11 +211,11 @@ export default {
|
|
|
211
211
|
class="mb-20"
|
|
212
212
|
>
|
|
213
213
|
<div class="row">
|
|
214
|
-
<h3 v-html="t('authConfig.googleoauth.steps.3.title', tArgs, true)" />
|
|
214
|
+
<h3 v-clean-html="t('authConfig.googleoauth.steps.3.title', tArgs, true)" />
|
|
215
215
|
</div>
|
|
216
216
|
<div class="row">
|
|
217
217
|
<div class="col span-6">
|
|
218
|
-
<div v-html="t('authConfig.googleoauth.steps.3.introduction', tArgs, true)" />
|
|
218
|
+
<div v-clean-html="t('authConfig.googleoauth.steps.3.introduction', tArgs, true)" />
|
|
219
219
|
<ul class="mt-10 step-list">
|
|
220
220
|
<li>{{ t('authConfig.googleoauth.steps.3.body.1', {}, true) }} </li>
|
|
221
221
|
<li>{{ t('authConfig.googleoauth.steps.3.body.2', {}, true) }} </li>
|
|
@@ -248,8 +248,8 @@ export default {
|
|
|
248
248
|
>
|
|
249
249
|
<div class="col span-12 google">
|
|
250
250
|
<Banner
|
|
251
|
+
v-clean-html="t('authConfig.associatedWarning', tArgs, true)"
|
|
251
252
|
color="info"
|
|
252
|
-
v-html="t('authConfig.associatedWarning', tArgs, true)"
|
|
253
253
|
/>
|
|
254
254
|
</div>
|
|
255
255
|
</div>
|
package/edit/auth/ldap/index.vue
CHANGED
package/edit/auth/oidc.vue
CHANGED
package/edit/auth/saml.vue
CHANGED
|
@@ -322,7 +322,7 @@ export default {
|
|
|
322
322
|
class="mt-0"
|
|
323
323
|
:color="hasAlertManager ? 'info' : 'warning'"
|
|
324
324
|
>
|
|
325
|
-
<span v-html="t('cis.alertNeeded', {link: monitoringUrl}, true)" />
|
|
325
|
+
<span v-clean-html="t('cis.alertNeeded', {link: monitoringUrl}, true)" />
|
|
326
326
|
</banner>
|
|
327
327
|
<Checkbox
|
|
328
328
|
v-model="scanAlertRule.alertOnComplete"
|
|
@@ -27,7 +27,9 @@ export default {
|
|
|
27
27
|
mixins: [CreateEditView],
|
|
28
28
|
|
|
29
29
|
async fetch() {
|
|
30
|
-
|
|
30
|
+
if (this.$store.getters['management/schemaFor']( FLEET.CLUSTER )) {
|
|
31
|
+
this.allClusters = await this.$store.getters['management/all'](FLEET.CLUSTER);
|
|
32
|
+
}
|
|
31
33
|
this.allWorkspaces = await this.$store.dispatch('management/findAll', { type: FLEET.WORKSPACE });
|
|
32
34
|
|
|
33
35
|
if ( !this.value.spec?.selector ) {
|
|
@@ -146,15 +148,15 @@ export default {
|
|
|
146
148
|
>
|
|
147
149
|
<span
|
|
148
150
|
v-if="matchingClusters.isAll"
|
|
149
|
-
v-html="t('fleet.clusterGroup.selector.matchesAll', matchingClusters)"
|
|
151
|
+
v-clean-html="t('fleet.clusterGroup.selector.matchesAll', matchingClusters)"
|
|
150
152
|
/>
|
|
151
153
|
<span
|
|
152
154
|
v-else-if="matchingClusters.isNone"
|
|
153
|
-
v-html="t('fleet.clusterGroup.selector.matchesNone', matchingClusters)"
|
|
155
|
+
v-clean-html="t('fleet.clusterGroup.selector.matchesNone', matchingClusters)"
|
|
154
156
|
/>
|
|
155
157
|
<span
|
|
156
158
|
v-else
|
|
157
|
-
v-html="t('fleet.clusterGroup.selector.matchesSome', matchingClusters)"
|
|
159
|
+
v-clean-html="t('fleet.clusterGroup.selector.matchesSome', matchingClusters)"
|
|
158
160
|
/>
|
|
159
161
|
</Banner>
|
|
160
162
|
|
|
@@ -23,6 +23,7 @@ import { _CREATE } from '@shell/config/query-params';
|
|
|
23
23
|
import { isHarvesterCluster } from '@shell/utils/cluster';
|
|
24
24
|
import { CAPI, CATALOG } from '@shell/config/labels-annotations';
|
|
25
25
|
import { SECRET_TYPES } from '@shell/config/secret';
|
|
26
|
+
import { checkSchemasForFindAllHash } from '@shell/utils/auth';
|
|
26
27
|
|
|
27
28
|
const _VERIFY = 'verify';
|
|
28
29
|
const _SKIP = 'skip';
|
|
@@ -48,8 +49,20 @@ export default {
|
|
|
48
49
|
mixins: [CreateEditView],
|
|
49
50
|
|
|
50
51
|
async fetch() {
|
|
51
|
-
|
|
52
|
-
|
|
52
|
+
const hash = await checkSchemasForFindAllHash({
|
|
53
|
+
allClusters: {
|
|
54
|
+
inStoreType: 'management',
|
|
55
|
+
type: FLEET.CLUSTER
|
|
56
|
+
},
|
|
57
|
+
|
|
58
|
+
allClusterGroups: {
|
|
59
|
+
inStoreType: 'management',
|
|
60
|
+
type: FLEET.CLUSTER_GROUP
|
|
61
|
+
}
|
|
62
|
+
}, this.$store);
|
|
63
|
+
|
|
64
|
+
this.allClusters = hash.allClusters || [];
|
|
65
|
+
this.allClusterGroups = hash.allClusterGroups || [];
|
|
53
66
|
|
|
54
67
|
let tls = _VERIFY;
|
|
55
68
|
|
|
@@ -412,7 +425,7 @@ export default {
|
|
|
412
425
|
await secret.save();
|
|
413
426
|
|
|
414
427
|
await this.$nextTick(() => {
|
|
415
|
-
this.updateAuth(secret.
|
|
428
|
+
this.updateAuth(secret.metadata.name, name);
|
|
416
429
|
});
|
|
417
430
|
|
|
418
431
|
return secret;
|
|
@@ -48,6 +48,10 @@ export default {
|
|
|
48
48
|
},
|
|
49
49
|
|
|
50
50
|
data() {
|
|
51
|
+
if (!this.value.spec.values) {
|
|
52
|
+
this.$set(this.value.spec, 'values', {});
|
|
53
|
+
}
|
|
54
|
+
|
|
51
55
|
return {
|
|
52
56
|
systemNamespaces: null,
|
|
53
57
|
namespaces: [],
|
|
@@ -128,7 +132,7 @@ export default {
|
|
|
128
132
|
:side-tabs="true"
|
|
129
133
|
>
|
|
130
134
|
<Questions
|
|
131
|
-
v-model="value"
|
|
135
|
+
v-model="value.spec.values"
|
|
132
136
|
tabbed="multiple"
|
|
133
137
|
:target-namespace="value.metadata.namespace"
|
|
134
138
|
:source="selectedNamespaceQuestions"
|