@rancher/shell 3.0.0-rc.2 → 3.0.0-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/base/_variables.scss +12 -4
- package/assets/styles/global/_layout.scss +10 -1
- package/assets/styles/global/_tooltip.scss +13 -1
- package/assets/translations/en-us.yaml +62 -26
- package/assets/translations/zh-hans.yaml +6 -5
- package/chart/istio.vue +2 -0
- package/chart/monitoring/ClusterSelector.vue +2 -0
- package/chart/monitoring/StorageClassSelector.vue +4 -1
- package/chart/monitoring/index.vue +2 -0
- package/chart/rancher-backup/S3.vue +2 -0
- package/chart/rancher-backup/index.vue +2 -0
- package/cloud-credential/aws.vue +2 -0
- package/cloud-credential/azure.vue +2 -0
- package/cloud-credential/digitalocean.vue +2 -0
- package/cloud-credential/gcp.vue +2 -0
- package/cloud-credential/generic.vue +2 -0
- package/cloud-credential/harvester.vue +2 -0
- package/cloud-credential/linode.vue +2 -0
- package/cloud-credential/pnap.vue +2 -0
- package/cloud-credential/s3.vue +2 -0
- package/cloud-credential/vmwarevsphere.vue +2 -0
- package/components/ActionDropdown.vue +1 -1
- package/components/ActionMenu.vue +4 -1
- package/components/AppModal.vue +4 -1
- package/components/ButtonDropdown.vue +3 -0
- package/components/ButtonGroup.vue +2 -0
- package/components/ButtonMultiAction.vue +41 -0
- package/components/Carousel.vue +3 -0
- package/components/CodeMirror.vue +88 -71
- package/components/Collapse.vue +4 -1
- package/components/CollapsibleCard.vue +4 -1
- package/components/ContainerResourceLimit.vue +2 -0
- package/components/CopyCode.vue +8 -4
- package/components/CopyToClipboardText.vue +2 -0
- package/components/CruResource.vue +61 -61
- package/components/CruResourceFooter.vue +2 -0
- package/components/Dialog.vue +2 -0
- package/components/DisableAuthProviderModal.vue +4 -1
- package/components/EmberPage.vue +2 -0
- package/components/ExplorerProjectsNamespaces.vue +11 -8
- package/components/GlobalRoleBindings.vue +2 -0
- package/components/Import.vue +2 -1
- package/components/InputOrDisplay.vue +23 -18
- package/components/Loading.vue +4 -1
- package/components/LocaleSelector.vue +4 -2
- package/components/Markdown.vue +2 -0
- package/components/ModalWithCard.vue +2 -0
- package/components/MoveModal.vue +2 -0
- package/components/PodSecurityAdmission.vue +2 -0
- package/components/Questions/Array.vue +2 -0
- package/components/Questions/Boolean.vue +2 -0
- package/components/Questions/CloudCredential.vue +2 -0
- package/components/Questions/Enum.vue +2 -0
- package/components/Questions/Float.vue +2 -0
- package/components/Questions/Int.vue +2 -0
- package/components/Questions/QuestionMap.vue +4 -1
- package/components/Questions/Radio.vue +2 -0
- package/components/Questions/Reference.vue +2 -0
- package/components/Questions/String.vue +2 -0
- package/components/Questions/Yaml.vue +2 -0
- package/components/Questions/index.vue +2 -0
- package/components/ResourceCancelModal.vue +2 -0
- package/components/ResourceDetail/Masthead.vue +4 -3
- package/components/ResourceDetail/index.vue +17 -15
- package/components/ResourceTable.vue +2 -0
- package/components/ResourceYaml.vue +2 -0
- package/components/SelectIconGrid.vue +2 -0
- package/components/SimpleBox.vue +2 -0
- package/components/SortableTable/THead.vue +2 -0
- package/components/SortableTable/index.vue +17 -20
- package/components/StatusTable.vue +2 -0
- package/components/Tabbed/Tab.vue +2 -0
- package/components/Tabbed/index.vue +2 -0
- package/components/Wizard.vue +4 -0
- package/components/YamlEditor.vue +3 -1
- package/components/__tests__/ButtonMultiAction.test.ts +31 -0
- package/components/__tests__/ContainerResourceLimit.test.ts +35 -0
- package/components/auth/RoleDetailEdit.vue +2 -0
- package/components/auth/SelectPrincipal.vue +3 -1
- package/components/auth/login/ldap.vue +2 -0
- package/components/fleet/FleetStatus.vue +2 -2
- package/components/form/ArrayList.vue +16 -1
- package/components/form/ArrayListSelect.vue +2 -0
- package/components/form/ChangePassword.vue +2 -0
- package/components/form/ColorInput.vue +2 -0
- package/components/form/Command.vue +2 -0
- package/components/form/FileImageSelector.vue +2 -0
- package/components/form/FileSelector.vue +2 -0
- package/components/form/Footer.vue +2 -0
- package/components/form/GitPicker.vue +1 -0
- package/components/form/HealthCheck.vue +5 -3
- package/components/form/HookOption.vue +22 -18
- package/components/form/InputWithSelect.vue +3 -1
- package/components/form/KeyValue.vue +2 -0
- package/components/form/LabeledSelect.vue +13 -3
- package/components/form/Labels.vue +11 -13
- package/components/form/LifecycleHooks.vue +2 -0
- package/components/form/MatchExpressions.vue +2 -0
- package/components/form/Members/ClusterPermissionsEditor.vue +2 -0
- package/components/form/Members/MembershipEditor.vue +2 -0
- package/components/form/NameNsDescription.vue +4 -1
- package/components/form/Networking.vue +2 -0
- package/components/form/NodeAffinity.vue +4 -1
- package/components/form/Password.vue +2 -0
- package/components/form/PlusMinus.vue +2 -0
- package/components/form/PodAffinity.vue +4 -1
- package/components/form/Ports.vue +2 -0
- package/components/form/Probe.vue +8 -4
- package/components/form/ResourceQuota/NamespaceRow.vue +2 -0
- package/components/form/ResourceQuota/Project.vue +2 -0
- package/components/form/ResourceQuota/ProjectRow.vue +2 -0
- package/components/form/RuleSelector.vue +2 -0
- package/components/form/SecretSelector.vue +1 -0
- package/components/form/Security.vue +5 -2
- package/components/form/Select.vue +2 -1
- package/components/form/SelectOrCreateAuthSecret.vue +2 -0
- package/components/form/ServiceNameSelect.vue +2 -0
- package/components/form/ServicePorts.vue +2 -0
- package/components/form/ShellInput.vue +2 -0
- package/components/form/SimpleSecretSelector.vue +2 -0
- package/components/form/Taints.vue +2 -0
- package/components/form/Tolerations.vue +2 -0
- package/components/form/UnitInput.vue +2 -0
- package/components/form/ValueFromResource.vue +2 -0
- package/components/form/WorkloadPorts.vue +5 -3
- package/components/form/__tests__/HookOption.test.ts +28 -0
- package/components/form/__tests__/LabeledSelect.test.ts +42 -0
- package/components/form/__tests__/Probe.test.ts +12 -0
- package/components/form/__tests__/UnitInput.test.ts +68 -0
- package/components/formatter/AppSummaryGraph.vue +2 -2
- package/components/formatter/FleetSummaryGraph.vue +2 -2
- package/components/formatter/InternalExternalIP.vue +13 -15
- package/components/formatter/MachineSummaryGraph.vue +2 -2
- package/components/formatter/Scale.vue +2 -2
- package/components/nav/Header.vue +17 -141
- package/components/nav/HeaderPageActionMenu.vue +173 -0
- package/components/nav/Jump.vue +2 -0
- package/components/nav/NamespaceFilter.vue +7 -2
- package/components/nav/TopLevelMenu.vue +4 -4
- package/components/nav/Type.vue +28 -2
- package/components/nav/WindowManager/ContainerLogs.vue +2 -1
- package/components/nav/WindowManager/ContainerShell.vue +6 -12
- package/components/nav/WindowManager/index.vue +2 -0
- package/components/nav/__tests__/Type.test.ts +68 -24
- package/composables/useClickOutside.ts +81 -0
- package/composables/useUserRetentionValidation.test.ts +1 -1
- package/composables/useUserRetentionValidation.ts +1 -1
- package/config/product/cis.js +4 -3
- package/config/product/manager.js +1 -0
- package/config/router/routes.js +1 -1
- package/config/table-headers.js +0 -10
- package/config/uiplugins.js +186 -143
- package/config/version.js +10 -0
- package/core/{plugin-helpers.js → plugin-helpers.ts} +25 -7
- package/core/plugin-routes.ts +5 -6
- package/core/plugin.ts +30 -3
- package/detail/autoscaling.horizontalpodautoscaler/index.vue +2 -0
- package/detail/configmap.vue +2 -0
- package/detail/fleet.cattle.io.cluster.vue +2 -0
- package/detail/fleet.cattle.io.clustergroup.vue +2 -0
- package/detail/fleet.cattle.io.gitrepo.vue +2 -0
- package/detail/harvesterhci.io.management.cluster.vue +2 -0
- package/detail/helm.cattle.io.projecthelmchart.vue +6 -8
- package/detail/management.cattle.io.roletemplate.vue +4 -4
- package/detail/management.cattle.io.user.vue +2 -0
- package/detail/namespace.vue +2 -0
- package/detail/networking.k8s.io.ingress.vue +1 -0
- package/detail/node.vue +2 -0
- package/detail/provisioning.cattle.io.cluster.vue +2 -0
- package/detail/secret.vue +2 -0
- package/detail/service.vue +2 -0
- package/detail/workload/index.vue +1 -1
- package/dialog/AddClusterMemberDialog.vue +2 -0
- package/dialog/AddCustomBadgeDialog.vue +3 -1
- package/dialog/AddProjectMemberDialog.vue +2 -0
- package/dialog/AddonConfigConfirmationDialog.vue +2 -0
- package/dialog/DeactivateDriverDialog.vue +2 -0
- package/dialog/DiagnosticTimingsDialog.vue +2 -0
- package/dialog/DrainNode.vue +2 -0
- package/dialog/ForceMachineRemoveDialog.vue +2 -0
- package/dialog/GenericPrompt.vue +2 -0
- package/dialog/RollbackWorkloadDialog.vue +2 -0
- package/dialog/RotateCertificatesDialog.vue +2 -0
- package/dialog/RotateEncryptionKeyDialog.vue +2 -0
- package/dialog/SaveAsRKETemplateDialog.vue +2 -0
- package/dialog/ScaleMachineDownDialog.vue +2 -0
- package/dialog/ScalePoolDownDialog.vue +2 -0
- package/dialog/SloDialog.vue +2 -0
- package/edit/auth/ldap/config.vue +282 -280
- package/edit/auth/saml.vue +1 -4
- package/edit/autoscaling.horizontalpodautoscaler/hpa-scaling-rule.vue +3 -3
- package/edit/autoscaling.horizontalpodautoscaler/index.vue +4 -2
- package/edit/catalog.cattle.io.clusterrepo.vue +2 -0
- package/edit/cis.cattle.io.clusterscan.vue +115 -97
- package/edit/cis.cattle.io.clusterscanprofile.vue +29 -31
- package/edit/cloudcredential.vue +2 -0
- package/edit/constraints.gatekeeper.sh.constraint/MatchKinds.vue +2 -0
- package/edit/constraints.gatekeeper.sh.constraint/NamespaceList.vue +2 -0
- package/edit/constraints.gatekeeper.sh.constraint/Scope.vue +2 -0
- package/edit/constraints.gatekeeper.sh.constraint/index.vue +2 -0
- package/edit/fleet.cattle.io.cluster.vue +2 -0
- package/edit/fleet.cattle.io.clustergroup.vue +4 -1
- package/edit/fleet.cattle.io.gitrepo.vue +2 -0
- package/edit/k8s.cni.cncf.io.networkattachmentdefinition.vue +2 -0
- package/edit/logging-flow/Match.vue +2 -0
- package/edit/logging-flow/index.vue +10 -8
- package/edit/logging.banzaicloud.io.output/providers/elasticsearch.vue +1 -1
- package/edit/logging.banzaicloud.io.output/providers/opensearch.vue +1 -1
- package/edit/logging.banzaicloud.io.output/providers/redis.vue +3 -3
- package/edit/management.cattle.io.clusterroletemplatebinding.vue +1 -0
- package/edit/management.cattle.io.fleetworkspace.vue +4 -1
- package/edit/management.cattle.io.project.vue +2 -0
- package/edit/management.cattle.io.roletemplate.vue +1 -1
- package/edit/monitoring.coreos.com.alertmanagerconfig/index.vue +1 -0
- package/edit/monitoring.coreos.com.alertmanagerconfig/types/email.vue +2 -0
- package/edit/monitoring.coreos.com.receiver/types/email.vue +1 -0
- package/edit/namespace.vue +1 -0
- package/edit/networking.k8s.io.ingress/Certificate.vue +2 -0
- package/edit/networking.k8s.io.ingress/DefaultBackend.vue +2 -1
- package/edit/networking.k8s.io.ingress/Rule.vue +1 -0
- package/edit/networking.k8s.io.ingress/RulePath.vue +20 -23
- package/edit/networking.k8s.io.ingress/index.vue +1 -0
- package/edit/networking.k8s.io.networkpolicy/PolicyRulePort.vue +1 -1
- package/edit/networking.k8s.io.networkpolicy/index.vue +1 -0
- package/edit/node.vue +2 -0
- package/edit/persistentvolumeclaim.vue +1 -0
- package/edit/policy.poddisruptionbudget.vue +3 -1
- package/edit/provisioning.cattle.io.cluster/CustomCommand.vue +2 -0
- package/edit/provisioning.cattle.io.cluster/Labels.vue +2 -0
- package/edit/provisioning.cattle.io.cluster/SelectCredential.vue +2 -0
- package/edit/provisioning.cattle.io.cluster/import.vue +2 -0
- package/edit/provisioning.cattle.io.cluster/index.vue +2 -2
- package/edit/provisioning.cattle.io.cluster/rke2.vue +38 -13
- package/edit/provisioning.cattle.io.cluster/tabs/AddOnAdditionalManifest.vue +49 -0
- package/edit/provisioning.cattle.io.cluster/tabs/AddOnConfig.vue +32 -65
- package/edit/provisioning.cattle.io.cluster/tabs/AgentConfiguration.vue +2 -0
- package/edit/provisioning.cattle.io.cluster/tabs/Basics.vue +2 -0
- package/edit/provisioning.cattle.io.cluster/tabs/MachinePool.vue +2 -0
- package/edit/provisioning.cattle.io.cluster/tabs/etcd/S3Config.vue +2 -0
- package/edit/provisioning.cattle.io.cluster/tabs/etcd/index.vue +2 -0
- package/edit/provisioning.cattle.io.cluster/tabs/networking/index.vue +2 -0
- package/edit/provisioning.cattle.io.cluster/tabs/registries/RegistryConfigs.vue +2 -0
- package/edit/provisioning.cattle.io.cluster/tabs/registries/index.vue +31 -32
- package/edit/provisioning.cattle.io.cluster/tabs/upgrade/DrainOptions.vue +2 -0
- package/edit/resources.cattle.io.backup.vue +97 -99
- package/edit/resources.cattle.io.restore.vue +96 -98
- package/edit/secret/index.vue +2 -0
- package/edit/service.vue +12 -3
- package/edit/ui.cattle.io.navlink.vue +1 -0
- package/edit/workload/Job.vue +3 -2
- package/edit/workload/Upgrading.vue +1 -0
- package/edit/workload/__tests__/index.test.ts +9 -7
- package/edit/workload/index.vue +33 -16
- package/edit/workload/storage/ContainerMountPaths.vue +37 -97
- package/edit/workload/storage/awsElasticBlockStore.vue +1 -1
- package/edit/workload/storage/azureDisk.vue +1 -1
- package/edit/workload/storage/csi/driver.longhorn.io.vue +2 -0
- package/edit/workload/storage/ephemeralVolume/index.vue +2 -0
- package/edit/workload/storage/gcePersistentDisk.vue +1 -1
- package/edit/workload/storage/index.vue +38 -22
- package/edit/workload/storage/persistentVolumeClaim/index.vue +2 -0
- package/edit/workload/storage/persistentVolumeClaim/persistentvolumeclaim.vue +1 -0
- package/edit/workload/storage/vsphereVolume.vue +1 -1
- package/initialize/install-components.js +0 -12
- package/initialize/install-plugins.js +6 -7
- package/machine-config/azure.vue +2 -0
- package/machine-config/generic.vue +2 -0
- package/machine-config/vmwarevsphere.vue +2 -0
- package/mixins/fetch.client.js +2 -1
- package/mixins/resource-manager.js +1 -1
- package/models/cis.cattle.io.clusterscan.js +17 -16
- package/models/cis.cattle.io.clusterscanprofile.js +17 -0
- package/models/management.cattle.io.user.js +3 -3
- package/models/provisioning.cattle.io.cluster.js +2 -1
- package/models/steve-schema.ts +1 -1
- package/models/workload.js +2 -1
- package/package.json +6 -8
- package/pages/auth/login.vue +2 -1
- package/pages/c/_cluster/apps/charts/chart.vue +3 -1
- package/pages/c/_cluster/apps/charts/install.vue +5 -56
- package/pages/c/_cluster/auth/user.retention/index.vue +1 -1
- package/pages/c/_cluster/fleet/index.vue +0 -1
- package/pages/c/_cluster/monitoring/alertmanagerconfig/_alertmanagerconfigid/receiver.vue +1 -0
- package/pages/c/_cluster/settings/DefaultLinksEditor.vue +2 -0
- package/pages/c/_cluster/settings/performance.vue +2 -2
- package/pages/c/_cluster/uiplugins/AddExtensionRepos.vue +45 -52
- package/pages/c/_cluster/uiplugins/CatalogList/CatalogLoadDialog.vue +2 -0
- package/pages/c/_cluster/uiplugins/CatalogList/CatalogUninstallDialog.vue +2 -0
- package/pages/c/_cluster/uiplugins/CatalogList/index.vue +2 -0
- package/pages/c/_cluster/uiplugins/DeveloperInstallDialog.vue +6 -3
- package/pages/c/_cluster/uiplugins/InstallDialog.vue +2 -0
- package/pages/c/_cluster/uiplugins/PluginInfoPanel.vue +7 -17
- package/pages/c/_cluster/uiplugins/UninstallDialog.vue +2 -0
- package/pages/c/_cluster/uiplugins/__tests__/AddExtensionRepos.test.ts +3 -6
- package/pages/c/_cluster/uiplugins/index.vue +93 -92
- package/pages/index.vue +10 -2
- package/pkg/vue.config.js +2 -0
- package/plugins/i18n.js +1 -1
- package/plugins/plugin.js +27 -19
- package/plugins/version.js +3 -13
- package/promptRemove/management.cattle.io.roletemplate.vue +3 -5
- package/promptRemove/pod.vue +2 -0
- package/rancher-components/Form/LabeledInput/LabeledInput.vue +14 -8
- package/rancher-components/Form/Radio/RadioButton.vue +0 -1
- package/rancher-components/Form/TextArea/TextAreaAutoGrow.vue +17 -9
- package/rancher-components/LabeledTooltip/LabeledTooltip.vue +4 -33
- package/rancher-components/StringList/StringList.vue +6 -15
- package/scripts/extension/bundle +1 -1
- package/scripts/extension/publish +174 -99
- package/store/catalog.js +0 -26
- package/store/growl.js +8 -5
- package/store/type-map.js +3 -2
- package/utils/cluster.js +9 -0
- package/utils/versions.ts +39 -0
- package/vue.config.js +5 -0
- package/components/form/PodSecurity.vue +0 -168
- package/components/formatter/Weight.vue +0 -147
- package/components/nuxt/nuxt-build-indicator.vue +0 -170
- package/components/nuxt/nuxt-child.js +0 -52
- package/components/nuxt/nuxt-error.vue +0 -128
- package/components/nuxt/nuxt-link.client.js +0 -17
- package/components/nuxt/nuxt-loading.vue +0 -165
- package/composables/useStore.ts +0 -16
|
@@ -26,6 +26,8 @@ const RESOURCE_METRICS_API_GROUP = 'metrics.k8s.io';
|
|
|
26
26
|
export default {
|
|
27
27
|
name: 'CruHPA',
|
|
28
28
|
|
|
29
|
+
emits: ['input'],
|
|
30
|
+
|
|
29
31
|
components: {
|
|
30
32
|
HpaScalingRule,
|
|
31
33
|
ArrayListGrouped,
|
|
@@ -229,7 +231,7 @@ export default {
|
|
|
229
231
|
<div class="row">
|
|
230
232
|
<div class="col span-6">
|
|
231
233
|
<LabeledInput
|
|
232
|
-
v-model.number="value.spec.minReplicas"
|
|
234
|
+
v-model:value.number="value.spec.minReplicas"
|
|
233
235
|
:mode="mode"
|
|
234
236
|
:label="t('hpa.workloadTab.min')"
|
|
235
237
|
placeholder="1"
|
|
@@ -239,7 +241,7 @@ export default {
|
|
|
239
241
|
</div>
|
|
240
242
|
<div class="col span-6">
|
|
241
243
|
<LabeledInput
|
|
242
|
-
v-model.number="value.spec.maxReplicas"
|
|
244
|
+
v-model:value.number="value.spec.maxReplicas"
|
|
243
245
|
:mode="mode"
|
|
244
246
|
:label="t('hpa.workloadTab.max')"
|
|
245
247
|
placeholder="1"
|
|
@@ -12,7 +12,7 @@ import { allHash } from '@shell/utils/promise';
|
|
|
12
12
|
import { Checkbox } from '@components/Form/Checkbox';
|
|
13
13
|
import { RadioGroup } from '@components/Form/Radio';
|
|
14
14
|
import { get } from '@shell/utils/object';
|
|
15
|
-
import { _VIEW, _CREATE } from '@shell/config/query-params';
|
|
15
|
+
import { _VIEW, _CREATE, _EDIT } from '@shell/config/query-params';
|
|
16
16
|
import { isValidCron } from 'cron-validator';
|
|
17
17
|
import { fetchSpecsScheduledScanConfig } from '@shell/models/cis.cattle.io.clusterscan';
|
|
18
18
|
|
|
@@ -39,6 +39,37 @@ export default {
|
|
|
39
39
|
},
|
|
40
40
|
|
|
41
41
|
async fetch() {
|
|
42
|
+
// we need to force-fetch the resource fields, otherwise on page refresh
|
|
43
|
+
// in the clusterscan edit/create views the "canBeScheduled" won't run properly
|
|
44
|
+
await this.schema.fetchResourceFields();
|
|
45
|
+
|
|
46
|
+
if (this.realMode === _CREATE || this.realMode === _EDIT) {
|
|
47
|
+
const includeScheduling = this.value.canBeScheduled();
|
|
48
|
+
const spec = this.value.spec || {};
|
|
49
|
+
|
|
50
|
+
spec.scanProfileName = null;
|
|
51
|
+
if (includeScheduling) {
|
|
52
|
+
spec.scoreWarning = 'pass';
|
|
53
|
+
spec.scheduledScanConfig = { scanAlertRule: {}, retentionCount: 3 };
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
this.value.spec = spec;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
if (!this.value.metadata.name) {
|
|
60
|
+
this.value.metadata.generateName = 'scan-';
|
|
61
|
+
}
|
|
62
|
+
if (!this.value.spec.scheduledScanConfig) {
|
|
63
|
+
this.value.spec['scheduledScanConfig'] = { scanAlertRule: {} };
|
|
64
|
+
}
|
|
65
|
+
if (!this.value.spec.scheduledScanConfig.scanAlertRule) {
|
|
66
|
+
this.value.spec.scheduledScanConfig['scanAlertRule'] = { };
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
this.isScheduled = !!get(this.value, 'spec.scheduledScanConfig.cronSchedule');
|
|
70
|
+
this.scheduledScanConfig = this.value.spec.scheduledScanConfig;
|
|
71
|
+
this.scanAlertRule = this.value.spec.scheduledScanConfig.scanAlertRule;
|
|
72
|
+
|
|
42
73
|
const hash = await allHash({
|
|
43
74
|
profiles: this.$store.dispatch('cluster/findAll', { type: CIS.CLUSTER_SCAN_PROFILE }),
|
|
44
75
|
benchmarks: this.$store.dispatch('cluster/findAll', { type: CIS.BENCHMARK }),
|
|
@@ -65,24 +96,13 @@ export default {
|
|
|
65
96
|
},
|
|
66
97
|
|
|
67
98
|
data() {
|
|
68
|
-
if (!this.value.metadata.name) {
|
|
69
|
-
this.value.metadata.generateName = 'scan-';
|
|
70
|
-
}
|
|
71
|
-
if (!this.value.spec.scheduledScanConfig) {
|
|
72
|
-
this.value.spec['scheduledScanConfig'] = { scanAlertRule: {} };
|
|
73
|
-
}
|
|
74
|
-
if (!this.value.spec.scheduledScanConfig.scanAlertRule) {
|
|
75
|
-
this.value.spec.scheduledScanConfig['scanAlertRule'] = { };
|
|
76
|
-
}
|
|
77
|
-
const isScheduled = !!get(this.value, 'spec.scheduledScanConfig.cronSchedule');
|
|
78
|
-
|
|
79
99
|
return {
|
|
80
100
|
allProfiles: [],
|
|
81
101
|
defaultConfigMap: null,
|
|
82
|
-
scheduledScanConfig:
|
|
83
|
-
scanAlertRule:
|
|
102
|
+
scheduledScanConfig: null,
|
|
103
|
+
scanAlertRule: null,
|
|
84
104
|
hasAlertManager: false,
|
|
85
|
-
isScheduled
|
|
105
|
+
isScheduled: null
|
|
86
106
|
};
|
|
87
107
|
},
|
|
88
108
|
|
|
@@ -245,101 +265,99 @@ export default {
|
|
|
245
265
|
@finish="saveScan"
|
|
246
266
|
@error="e=>errors = e"
|
|
247
267
|
>
|
|
248
|
-
<
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
268
|
+
<Banner
|
|
269
|
+
v-if="!validProfiles.length"
|
|
270
|
+
color="warning"
|
|
271
|
+
:label="t('cis.noProfiles')"
|
|
272
|
+
/>
|
|
273
|
+
|
|
274
|
+
<div
|
|
275
|
+
v-else
|
|
276
|
+
class="row mb-20"
|
|
277
|
+
>
|
|
278
|
+
<div class="col span-6">
|
|
279
|
+
<LabeledSelect
|
|
280
|
+
v-model:value="value.spec.scanProfileName"
|
|
281
|
+
:mode="mode"
|
|
282
|
+
:label="t('cis.profile')"
|
|
283
|
+
:options="validProfiles"
|
|
284
|
+
/>
|
|
285
|
+
</div>
|
|
255
286
|
<div
|
|
256
|
-
v-
|
|
257
|
-
class="
|
|
287
|
+
v-if="canBeScheduled"
|
|
288
|
+
class="col span-6"
|
|
258
289
|
>
|
|
259
|
-
<
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
290
|
+
<span>{{ t('cis.scoreWarning.label') }}</span> <i
|
|
291
|
+
v-clean-tooltip="t('cis.scoreWarning.protip')"
|
|
292
|
+
class="icon icon-info"
|
|
293
|
+
/>
|
|
294
|
+
<RadioGroup
|
|
295
|
+
v-model:value="value.spec.scoreWarning"
|
|
296
|
+
:mode="mode"
|
|
297
|
+
name="scoreWarning"
|
|
298
|
+
:options="['pass', 'fail']"
|
|
299
|
+
:labels="[t('cis.scan.pass'), t('cis.scan.fail')]"
|
|
300
|
+
/>
|
|
301
|
+
</div>
|
|
302
|
+
</div>
|
|
303
|
+
<template v-if="canBeScheduled">
|
|
304
|
+
<h3>{{ t('cis.scheduling.title') }}</h3>
|
|
305
|
+
<div class="row mb-20">
|
|
306
|
+
<div class="col">
|
|
275
307
|
<RadioGroup
|
|
276
|
-
v-model:value="
|
|
308
|
+
v-model:value="isScheduled"
|
|
277
309
|
:mode="mode"
|
|
278
|
-
name="
|
|
279
|
-
:options="['
|
|
280
|
-
:labels="[t('cis.scan.pass'), t('cis.scan.fail')]"
|
|
310
|
+
name="scheduling"
|
|
311
|
+
:options="[ {value: false, label: t('cis.scheduling.disable')}, {value: true, label: t('cis.scheduling.enable')}]"
|
|
281
312
|
/>
|
|
282
313
|
</div>
|
|
283
314
|
</div>
|
|
284
|
-
<template v-if="
|
|
285
|
-
<h3>Scheduling</h3>
|
|
315
|
+
<template v-if="isScheduled">
|
|
286
316
|
<div class="row mb-20">
|
|
287
|
-
<div class="col">
|
|
288
|
-
<
|
|
289
|
-
v-model:value="
|
|
317
|
+
<div class="col span-6">
|
|
318
|
+
<LabeledInput
|
|
319
|
+
v-model:value="scheduledScanConfig.cronSchedule"
|
|
320
|
+
required
|
|
290
321
|
:mode="mode"
|
|
291
|
-
|
|
292
|
-
:
|
|
322
|
+
:label="t('cis.cronSchedule.label')"
|
|
323
|
+
:placeholder="t('cis.cronSchedule.placeholder')"
|
|
324
|
+
type="cron"
|
|
293
325
|
/>
|
|
294
326
|
</div>
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
:label="t('cis.cronSchedule.label')"
|
|
304
|
-
:placeholder="t('cis.cronSchedule.placeholder')"
|
|
305
|
-
type="cron"
|
|
306
|
-
/>
|
|
307
|
-
</div>
|
|
308
|
-
<div class="col span-6">
|
|
309
|
-
<UnitInput
|
|
310
|
-
v-model.number="scheduledScanConfig.retentionCount"
|
|
311
|
-
:suffix="t('cis.reports')"
|
|
312
|
-
type="number"
|
|
313
|
-
:mode="mode"
|
|
314
|
-
:label="t('cis.retention')"
|
|
315
|
-
/>
|
|
316
|
-
</div>
|
|
327
|
+
<div class="col span-6">
|
|
328
|
+
<UnitInput
|
|
329
|
+
v-model.number="scheduledScanConfig.retentionCount"
|
|
330
|
+
:suffix="t('cis.reports')"
|
|
331
|
+
type="number"
|
|
332
|
+
:mode="mode"
|
|
333
|
+
:label="t('cis.retention')"
|
|
334
|
+
/>
|
|
317
335
|
</div>
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
336
|
+
</div>
|
|
337
|
+
<h3 class="mt-20">
|
|
338
|
+
{{ t('cis.alerting') }}
|
|
339
|
+
</h3>
|
|
340
|
+
<div class="row mb-20">
|
|
341
|
+
<div class="col span-12">
|
|
342
|
+
<Banner
|
|
343
|
+
v-if="scanAlertRule.alertOnFailure || scanAlertRule.alertOnComplete"
|
|
344
|
+
class="mt-0"
|
|
345
|
+
:color="hasAlertManager ? 'info' : 'warning'"
|
|
346
|
+
>
|
|
347
|
+
<span v-clean-html="t('cis.alertNeeded', {link: monitoringUrl}, true)" />
|
|
348
|
+
</banner>
|
|
349
|
+
<Checkbox
|
|
350
|
+
v-model:value="scanAlertRule.alertOnComplete"
|
|
351
|
+
:mode="mode"
|
|
352
|
+
:label="t('cis.alertOnComplete')"
|
|
353
|
+
/>
|
|
354
|
+
<Checkbox
|
|
355
|
+
v-model:value="scanAlertRule.alertOnFailure"
|
|
356
|
+
:mode="mode"
|
|
357
|
+
:label="t('cis.alertOnFailure')"
|
|
358
|
+
/>
|
|
341
359
|
</div>
|
|
342
|
-
</
|
|
360
|
+
</div>
|
|
343
361
|
</template>
|
|
344
362
|
</template>
|
|
345
363
|
</CruResource>
|
|
@@ -113,40 +113,38 @@ export default {
|
|
|
113
113
|
@finish="save"
|
|
114
114
|
@error="e=>errors = e"
|
|
115
115
|
>
|
|
116
|
-
<
|
|
117
|
-
|
|
118
|
-
<div class="
|
|
119
|
-
<
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
/>
|
|
126
|
-
</div>
|
|
116
|
+
<div class="spacer" />
|
|
117
|
+
<div class="row">
|
|
118
|
+
<div class="col span-12">
|
|
119
|
+
<NameNsDescription
|
|
120
|
+
:mode="mode"
|
|
121
|
+
:value="value"
|
|
122
|
+
:namespaced="false"
|
|
123
|
+
@change="name=value.metadata.name"
|
|
124
|
+
/>
|
|
127
125
|
</div>
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
126
|
+
</div>
|
|
127
|
+
<div class="row">
|
|
128
|
+
<div class="col span-6">
|
|
129
|
+
<LabeledSelect
|
|
130
|
+
v-model:value="value.spec.benchmarkVersion"
|
|
131
|
+
:mode="mode"
|
|
132
|
+
:label="t('cis.benchmarkVersion')"
|
|
133
|
+
:options="compatibleBenchmarkNames"
|
|
134
|
+
/>
|
|
137
135
|
</div>
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
136
|
+
</div>
|
|
137
|
+
<div class="spacer" />
|
|
138
|
+
<div class="row">
|
|
139
|
+
<div class="col span-6">
|
|
140
|
+
<ArrayList
|
|
141
|
+
v-model:value="value.spec.skipTests"
|
|
142
|
+
:title="t('cis.testsToSkip')"
|
|
143
|
+
:value-placeholder="t('cis.testID')"
|
|
144
|
+
:mode="mode"
|
|
145
|
+
/>
|
|
148
146
|
</div>
|
|
149
|
-
</
|
|
147
|
+
</div>
|
|
150
148
|
</CruResource>
|
|
151
149
|
</div>
|
|
152
150
|
</template>
|
package/edit/cloudcredential.vue
CHANGED
|
@@ -14,7 +14,7 @@ import { allHash } from '@shell/utils/promise';
|
|
|
14
14
|
import { isArray } from '@shell/utils/array';
|
|
15
15
|
import { matchRuleIsPopulated } from '@shell/models/logging.banzaicloud.io.flow';
|
|
16
16
|
import LabeledSelect from '@shell/components/form/LabeledSelect';
|
|
17
|
-
import { clone
|
|
17
|
+
import { clone } from '@shell/utils/object';
|
|
18
18
|
import isEmpty from 'lodash/isEmpty';
|
|
19
19
|
import ArrayListGrouped from '@shell/components/form/ArrayListGrouped';
|
|
20
20
|
import { exceptionToErrorsArray } from '@shell/utils/error';
|
|
@@ -33,6 +33,8 @@ function emptyMatch(include = true) {
|
|
|
33
33
|
}
|
|
34
34
|
|
|
35
35
|
export default {
|
|
36
|
+
emits: ['input'],
|
|
37
|
+
|
|
36
38
|
components: {
|
|
37
39
|
Banner,
|
|
38
40
|
CruResource,
|
|
@@ -75,7 +77,7 @@ export default {
|
|
|
75
77
|
const schemas = this.$store.getters['cluster/all'](SCHEMA);
|
|
76
78
|
let filtersYaml;
|
|
77
79
|
|
|
78
|
-
|
|
80
|
+
this.value.spec = this.value.spec || {};
|
|
79
81
|
|
|
80
82
|
if ( this.value.spec.filters?.length ) {
|
|
81
83
|
filtersYaml = jsyaml.dump(this.value.spec.filters);
|
|
@@ -219,7 +221,7 @@ export default {
|
|
|
219
221
|
}
|
|
220
222
|
});
|
|
221
223
|
|
|
222
|
-
|
|
224
|
+
this.value.spec.match = matches;
|
|
223
225
|
}
|
|
224
226
|
},
|
|
225
227
|
filtersYaml: {
|
|
@@ -229,9 +231,9 @@ export default {
|
|
|
229
231
|
const filterJson = jsyaml.load(this.filtersYaml);
|
|
230
232
|
|
|
231
233
|
if ( isArray(filterJson) ) {
|
|
232
|
-
|
|
234
|
+
this.value.spec.filters = filterJson;
|
|
233
235
|
} else {
|
|
234
|
-
|
|
236
|
+
this.value.spec.filters = undefined;
|
|
235
237
|
}
|
|
236
238
|
} catch (e) {
|
|
237
239
|
this.errors = exceptionToErrorsArray(e);
|
|
@@ -241,13 +243,13 @@ export default {
|
|
|
241
243
|
globalOutputRefs: {
|
|
242
244
|
deep: true,
|
|
243
245
|
handler() {
|
|
244
|
-
|
|
246
|
+
this.value.spec.globalOutputRefs = this.globalOutputRefs;
|
|
245
247
|
}
|
|
246
248
|
},
|
|
247
249
|
localOutputRefs: {
|
|
248
250
|
deep: true,
|
|
249
251
|
handler() {
|
|
250
|
-
|
|
252
|
+
this.value.spec.localOutputRefs = this.localOutputRefs;
|
|
251
253
|
}
|
|
252
254
|
}
|
|
253
255
|
},
|
|
@@ -262,7 +264,7 @@ export default {
|
|
|
262
264
|
|
|
263
265
|
methods: {
|
|
264
266
|
addMatch(include) {
|
|
265
|
-
this.matches.
|
|
267
|
+
this.matches = [...this.matches, emptyMatch(include)];
|
|
266
268
|
},
|
|
267
269
|
|
|
268
270
|
removeMatch(idx) {
|
|
@@ -67,7 +67,7 @@ export default {
|
|
|
67
67
|
</div>
|
|
68
68
|
<div class="col span-2">
|
|
69
69
|
<LabeledInput
|
|
70
|
-
v-model.number="port"
|
|
70
|
+
v-model:value.number="port"
|
|
71
71
|
:mode="mode"
|
|
72
72
|
:disabled="disabled"
|
|
73
73
|
class="port"
|
|
@@ -81,7 +81,7 @@ export default {
|
|
|
81
81
|
<div class="row">
|
|
82
82
|
<div class="col span-6">
|
|
83
83
|
<LabeledInput
|
|
84
|
-
v-model.number="value.db_number"
|
|
84
|
+
v-model:value.number="value.db_number"
|
|
85
85
|
:mode="mode"
|
|
86
86
|
:disabled="disabled"
|
|
87
87
|
type="number"
|
|
@@ -90,7 +90,7 @@ export default {
|
|
|
90
90
|
</div>
|
|
91
91
|
<div class="col span-6">
|
|
92
92
|
<LabeledInput
|
|
93
|
-
v-model.number="value.ttl"
|
|
93
|
+
v-model:value.number="value.ttl"
|
|
94
94
|
:mode="mode"
|
|
95
95
|
:disabled="disabled"
|
|
96
96
|
type="number"
|
|
@@ -18,7 +18,10 @@ import Banner from '@components/Banner/Banner.vue';
|
|
|
18
18
|
import ArrayList from '@shell/components/form/ArrayList.vue';
|
|
19
19
|
|
|
20
20
|
export default {
|
|
21
|
-
name:
|
|
21
|
+
name: 'FleetCruWorkspace',
|
|
22
|
+
|
|
23
|
+
emits: ['input'],
|
|
24
|
+
|
|
22
25
|
inheritAttrs: false,
|
|
23
26
|
components: {
|
|
24
27
|
CruResource,
|
|
@@ -19,6 +19,8 @@ import { HARVESTER_NAME as HARVESTER } from '@shell/config/features';
|
|
|
19
19
|
import { Banner } from '@components/Banner';
|
|
20
20
|
|
|
21
21
|
export default {
|
|
22
|
+
emits: ['input'],
|
|
23
|
+
|
|
22
24
|
components: {
|
|
23
25
|
ContainerResourceLimit, CruResource, Labels, NameNsDescription, ProjectMembershipEditor, ResourceQuota, Tabbed, Tab, Banner
|
|
24
26
|
},
|