@rancher/shell 3.0.2-rc.5 → 3.0.2
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/images/providers/nutanix.svg +12 -1
- package/assets/styles/base/_basic.scss +2 -1
- package/assets/styles/base/_helpers.scss +4 -0
- package/assets/styles/base/_variables.scss +2 -0
- package/assets/styles/global/_labeled-input.scss +5 -13
- package/assets/styles/global/_layout.scss +4 -1
- package/assets/styles/global/_select.scss +5 -0
- package/assets/styles/themes/_dark.scss +1 -3
- package/assets/styles/themes/_light.scss +5 -1
- package/assets/translations/en-us.yaml +130 -23
- package/assets/translations/zh-hans.yaml +0 -3
- package/cloud-credential/azure.vue +1 -1
- package/components/ActionMenuShell.vue +105 -0
- package/components/AppModal.vue +2 -2
- package/components/AsyncButton.vue +2 -0
- package/components/ButtonGroup.vue +9 -2
- package/components/ClusterBadge.vue +1 -0
- package/components/ClusterIconMenu.vue +3 -0
- package/components/ClusterProviderIcon.vue +14 -1
- package/components/CodeMirror.vue +96 -5
- package/components/Collapse.vue +16 -3
- package/components/CruResource.vue +9 -0
- package/components/CruResourceFooter.vue +1 -1
- package/components/ExplorerMembers.vue +2 -1
- package/components/FixedBanner.vue +19 -12
- package/components/Import.vue +14 -1
- package/components/LandingPagePreference.vue +4 -2
- package/components/PodSecurityAdmission.vue +8 -6
- package/components/PromptChangePassword.vue +1 -0
- package/components/PromptRemove.vue +23 -21
- package/components/ResourceDetail/Masthead.vue +30 -11
- package/components/ResourceDetail/__tests__/Masthead.test.ts +61 -0
- package/components/ResourceDetail/index.vue +6 -0
- package/components/ResourceTable.vue +6 -1
- package/components/ResourceYaml.vue +1 -0
- package/components/Setting.vue +115 -0
- package/components/SortableTable/THead.vue +2 -0
- package/components/SortableTable/index.vue +7 -12
- package/components/StatusBadge.vue +71 -0
- package/components/Tabbed/index.vue +16 -15
- package/components/Wizard.vue +108 -104
- package/components/YamlEditor.vue +12 -2
- package/components/__tests__/Collapse.test.ts +2 -2
- package/components/__tests__/FixedBanner.test.ts +3 -3
- package/components/auth/Principal.vue +29 -17
- package/components/auth/__tests__/Principal.test.ts +40 -0
- package/components/auth/login/ldap.vue +7 -0
- package/components/fleet/FleetBundles.vue +1 -1
- package/components/fleet/FleetRepos.vue +1 -1
- package/components/fleet/FleetResources.vue +0 -2
- package/components/fleet/FleetSummary.vue +60 -65
- package/components/fleet/ForceDirectedTreeChart/index.vue +5 -1
- package/components/fleet/__tests__/FleetSummary.test.ts +49 -9
- package/components/form/ArrayList.vue +6 -2
- package/components/form/ColorInput.vue +1 -0
- package/components/form/KeyValue.vue +11 -12
- package/components/form/LabeledSelect.vue +15 -3
- package/components/form/Labels.vue +8 -1
- package/components/form/Members/MembershipEditor.vue +230 -222
- package/components/form/Members/__tests__/MembershipEditor.test.ts +62 -0
- package/components/form/Password.vue +3 -0
- package/components/form/ProjectMemberEditor.vue +6 -3
- package/components/form/ResourceTabs/index.vue +15 -13
- package/components/form/SSHKnownHosts/KnownHostsEditDialog.vue +5 -4
- package/components/form/SchedulingCustomization.vue +85 -0
- package/components/form/Select.vue +3 -2
- package/components/form/SelectOrCreateAuthSecret.vue +2 -1
- package/components/form/UnitInput.vue +3 -4
- package/components/form/__tests__/ArrayList.test.ts +9 -6
- package/components/form/__tests__/LabeledSelect.test.ts +37 -0
- package/components/form/__tests__/SelectOrCreateAuthSecret.test.ts +34 -0
- package/components/form/__tests__/UnitInput.test.ts +4 -5
- package/components/formatter/LiveDate.vue +3 -1
- package/components/formatter/ServiceType.vue +12 -4
- package/components/formatter/WorkloadHealthScale.vue +2 -1
- package/components/nav/Header.vue +35 -2
- package/components/nav/HeaderPageActionMenu.vue +11 -40
- package/components/nav/Jump.vue +8 -2
- package/components/nav/NamespaceFilter.vue +5 -4
- package/components/nav/Pinned.vue +1 -1
- package/components/nav/TopLevelMenu.helper.ts +5 -5
- package/components/nav/TopLevelMenu.vue +1 -12
- package/components/nav/WindowManager/ContainerLogs.vue +96 -58
- package/components/nav/WindowManager/ContainerShell.vue +99 -18
- package/components/nav/WindowManager/index.vue +74 -6
- package/components/nav/__tests__/TopLevelMenu.test.ts +0 -40
- package/components/templates/default.vue +2 -47
- package/config/features.js +1 -0
- package/config/labels-annotations.js +11 -1
- package/config/router/navigation-guards/index.js +2 -1
- package/config/router/navigation-guards/record-last-route.js +24 -0
- package/config/settings.ts +66 -98
- package/config/version.js +1 -1
- package/core/types-provisioning.ts +7 -0
- package/detail/fleet.cattle.io.bundle.vue +7 -0
- package/detail/fleet.cattle.io.cluster.vue +0 -3
- package/detail/fleet.cattle.io.gitrepo.vue +8 -15
- package/detail/provisioning.cattle.io.cluster.vue +8 -2
- package/dialog/DeactivateDriverDialog.vue +5 -5
- package/dialog/GitRepoForceUpdateDialog.vue +132 -0
- package/directives/strip-html-aria-label.js +19 -0
- package/edit/__tests__/cis.cattle.io.clusterscan.test.ts +87 -0
- package/edit/__tests__/fleet.cattle.io.gitrepo.test.ts +217 -37
- package/edit/auth/__tests__/oidc.test.ts +60 -12
- package/edit/auth/ldap/__tests__/config.test.ts +40 -0
- package/edit/auth/ldap/config.vue +67 -89
- package/edit/auth/oidc.vue +16 -2
- package/edit/catalog.cattle.io.clusterrepo.vue +12 -8
- package/edit/cis.cattle.io.clusterscan.vue +13 -1
- package/edit/fleet.cattle.io.gitrepo.vue +198 -72
- package/edit/logging-flow/Match.vue +0 -21
- package/edit/management.cattle.io.project.vue +1 -1
- package/edit/monitoring.coreos.com.prometheusrule/AlertingRule.vue +10 -3
- package/edit/monitoring.coreos.com.prometheusrule/RecordingRule.vue +5 -1
- package/edit/monitoring.coreos.com.prometheusrule/index.vue +5 -2
- package/edit/provisioning.cattle.io.cluster/CustomCommand.vue +8 -1
- package/edit/provisioning.cattle.io.cluster/SelectCredential.vue +2 -0
- package/edit/provisioning.cattle.io.cluster/__tests__/Advanced.test.ts +0 -2
- package/edit/provisioning.cattle.io.cluster/__tests__/CustomCommand.test.ts +55 -15
- package/edit/provisioning.cattle.io.cluster/index.vue +28 -30
- package/edit/provisioning.cattle.io.cluster/rke2.vue +64 -13
- package/edit/provisioning.cattle.io.cluster/tabs/AgentConfiguration.vue +37 -2
- package/edit/provisioning.cattle.io.cluster/tabs/etcd/index.vue +3 -2
- package/edit/resources.cattle.io.backup.vue +150 -15
- package/edit/secret/__tests__/ssh.test.ts +79 -0
- package/edit/secret/ssh.vue +7 -1
- package/edit/service.vue +0 -3
- package/edit/workload/Job.vue +8 -8
- package/edit/workload/__tests__/Job.test.ts +0 -1
- package/edit/workload/index.vue +3 -1
- package/initialize/install-directives.js +2 -0
- package/initialize/install-plugins.js +6 -1
- package/list/catalog.cattle.io.app.vue +21 -4
- package/list/fleet.cattle.io.bundle.vue +1 -1
- package/list/management.cattle.io.setting.vue +34 -132
- package/list/provisioning.cattle.io.cluster.vue +11 -3
- package/machine-config/vmwarevsphere.vue +15 -8
- package/mixins/__tests__/auth-config.test.ts +74 -0
- package/mixins/__tests__/chart.test.ts +5 -4
- package/mixins/__tests__/create-edit-view.test.ts +38 -0
- package/mixins/auth-config.js +8 -0
- package/mixins/chart.js +2 -2
- package/mixins/create-edit-view/impl.js +4 -1
- package/mixins/vue-select-overrides.js +10 -0
- package/models/__tests__/catalog.cattle.io.app.test.ts +148 -0
- package/models/__tests__/fleet.cattle.io.gitrepo.test.ts +157 -0
- package/models/__tests__/secret.test.ts +56 -13
- package/models/catalog.cattle.io.app.js +112 -37
- package/models/cluster.js +11 -0
- package/models/fleet.cattle.io.bundle.js +40 -2
- package/models/fleet.cattle.io.gitrepo.js +169 -109
- package/models/management.cattle.io.fleetworkspace.js +4 -0
- package/models/management.cattle.io.kontainerdriver.js +7 -0
- package/models/nodedriver.js +4 -1
- package/models/provisioning.cattle.io.cluster.js +24 -0
- package/models/secret.js +1 -1
- package/package.json +5 -5
- package/pages/auth/login.vue +5 -11
- package/pages/auth/verify.vue +11 -1
- package/pages/c/_cluster/apps/charts/index.vue +6 -4
- package/pages/c/_cluster/apps/charts/install.vue +1 -1
- package/pages/c/_cluster/explorer/ConfigBadge.vue +3 -5
- package/pages/c/_cluster/explorer/EventsTable.vue +3 -2
- package/pages/c/_cluster/explorer/__tests__/index.test.ts +9 -9
- package/pages/c/_cluster/explorer/index.vue +33 -35
- package/pages/c/_cluster/explorer/tools/index.vue +3 -3
- package/pages/c/_cluster/fleet/index.vue +0 -5
- package/pages/c/_cluster/legacy/project/index.vue +1 -1
- package/pages/c/_cluster/settings/performance.vue +52 -53
- package/pages/c/_cluster/uiplugins/index.vue +19 -22
- package/pages/home.vue +17 -12
- package/pages/prefs.vue +5 -1
- package/plugins/shortkey.js +10 -1
- package/plugins/steve/steve-pagination-utils.ts +58 -8
- package/promptRemove/management.cattle.io.fleetworkspace.vue +98 -0
- package/promptRemove/management.cattle.io.globalrole.vue +1 -1
- package/promptRemove/management.cattle.io.project.vue +2 -8
- package/promptRemove/management.cattle.io.roletemplate.vue +1 -1
- package/promptRemove/mixin/roleDeletionCheck.js +1 -7
- package/promptRemove/pod.vue +7 -28
- package/rancher-components/Card/Card.vue +9 -1
- package/rancher-components/Form/Checkbox/Checkbox.vue +42 -6
- package/rancher-components/Form/LabeledInput/LabeledInput.vue +30 -3
- package/rancher-components/Form/Radio/RadioButton.vue +18 -3
- package/rancher-components/Form/Radio/RadioGroup.vue +39 -5
- package/rancher-components/LabeledTooltip/LabeledTooltip.vue +13 -1
- package/rancher-components/RcButton/RcButton.test.ts +97 -0
- package/rancher-components/RcButton/RcButton.vue +14 -9
- package/rancher-components/RcDropdown/RcDropdown.vue +3 -1
- package/rancher-components/RcDropdown/RcDropdownItem.vue +8 -2
- package/rancher-components/RcDropdown/RcDropdownMenu.vue +66 -0
- package/rancher-components/RcDropdown/index.ts +1 -0
- package/rancher-components/RcDropdown/types.ts +27 -0
- package/rancher-components/RcDropdown/useDropdownContext.ts +5 -2
- package/scripts/extension/helm/charts/ui-plugin-server/templates/_helpers.tpl +2 -2
- package/scripts/typegen.sh +1 -0
- package/store/__tests__/auth.test.ts +120 -0
- package/store/action-menu.js +13 -3
- package/store/auth.js +14 -9
- package/store/aws.js +9 -2
- package/store/catalog.js +14 -7
- package/store/features.js +1 -0
- package/store/prefs.js +9 -28
- package/store/type-map.utils.ts +4 -0
- package/types/resources/settings.d.ts +27 -20
- package/types/shell/index.d.ts +18 -12
- package/utils/__tests__/array.test.ts +13 -1
- package/utils/__tests__/string.test.ts +80 -1
- package/utils/array.ts +13 -0
- package/utils/auth.js +4 -0
- package/utils/banners.js +0 -45
- package/utils/cluster.js +1 -1
- package/{edit/monitoring.coreos.com.prometheusrule → utils}/duration.js +5 -3
- package/utils/object.js +0 -3
- package/utils/pagination-utils.ts +15 -2
- package/utils/string.js +31 -7
- package/utils/validators/formRules/__tests__/index.test.ts +27 -0
- package/utils/validators/formRules/index.ts +16 -0
- package/edit/provisioning.cattle.io.cluster/import.vue +0 -198
|
@@ -19,13 +19,18 @@ import NameNsDescription from '@shell/components/form/NameNsDescription';
|
|
|
19
19
|
import YamlEditor from '@shell/components/YamlEditor';
|
|
20
20
|
import { base64Decode, base64Encode } from '@shell/utils/crypto';
|
|
21
21
|
import SelectOrCreateAuthSecret from '@shell/components/form/SelectOrCreateAuthSecret';
|
|
22
|
-
import { _CREATE } from '@shell/config/query-params';
|
|
22
|
+
import { _CREATE, _EDIT, _VIEW } from '@shell/config/query-params';
|
|
23
23
|
import { isHarvesterCluster } from '@shell/utils/cluster';
|
|
24
24
|
import { CAPI, CATALOG, FLEET as FLEET_LABELS } from '@shell/config/labels-annotations';
|
|
25
25
|
import { SECRET_TYPES } from '@shell/config/secret';
|
|
26
26
|
import { checkSchemasForFindAllHash } from '@shell/utils/auth';
|
|
27
27
|
import Checkbox from '@components/Form/Checkbox/Checkbox.vue';
|
|
28
28
|
import FormValidation from '@shell/mixins/form-validation';
|
|
29
|
+
import UnitInput from '@shell/components/form/UnitInput';
|
|
30
|
+
import { toSeconds } from '@shell/utils/duration';
|
|
31
|
+
|
|
32
|
+
const MINIMUM_POLLING_INTERVAL = 15;
|
|
33
|
+
const DEFAULT_POLLING_INTERVAL = 60;
|
|
29
34
|
|
|
30
35
|
const _VERIFY = 'verify';
|
|
31
36
|
const _SKIP = 'skip';
|
|
@@ -51,6 +56,7 @@ export default {
|
|
|
51
56
|
NameNsDescription,
|
|
52
57
|
YamlEditor,
|
|
53
58
|
SelectOrCreateAuthSecret,
|
|
59
|
+
UnitInput,
|
|
54
60
|
},
|
|
55
61
|
|
|
56
62
|
mixins: [CreateEditView, FormValidation],
|
|
@@ -92,6 +98,16 @@ export default {
|
|
|
92
98
|
},
|
|
93
99
|
|
|
94
100
|
data() {
|
|
101
|
+
let pollingInterval = toSeconds(this.value.spec.pollingInterval) || this.value.spec.pollingInterval;
|
|
102
|
+
|
|
103
|
+
if (!pollingInterval) {
|
|
104
|
+
if (this.realMode === _CREATE) {
|
|
105
|
+
pollingInterval = DEFAULT_POLLING_INTERVAL;
|
|
106
|
+
} else if (this.realMode === _EDIT || this.realMode === _VIEW) {
|
|
107
|
+
pollingInterval = MINIMUM_POLLING_INTERVAL;
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
|
|
95
111
|
const targetInfo = this.value.targetInfo;
|
|
96
112
|
const targetCluster = targetInfo.cluster;
|
|
97
113
|
const targetClusterGroup = targetInfo.clusterGroup;
|
|
@@ -110,26 +126,6 @@ export default {
|
|
|
110
126
|
targetMode = `group://${ targetClusterGroup }`;
|
|
111
127
|
}
|
|
112
128
|
|
|
113
|
-
const stepRepoInfo = {
|
|
114
|
-
name: 'stepRepoInfo',
|
|
115
|
-
title: this.t('fleet.gitRepo.add.steps.repoInfo.title'),
|
|
116
|
-
label: this.t('fleet.gitRepo.add.steps.repoInfo.label'),
|
|
117
|
-
subtext: this.t('fleet.gitRepo.add.steps.repoInfo.subtext'),
|
|
118
|
-
descriptionKey: 'fleet.gitRepo.add.steps.repoInfo.description',
|
|
119
|
-
ready: false,
|
|
120
|
-
weight: 1
|
|
121
|
-
};
|
|
122
|
-
|
|
123
|
-
const stepTargetInfo = {
|
|
124
|
-
name: 'stepTargetInfo',
|
|
125
|
-
title: this.t('fleet.gitRepo.add.steps.targetInfo.title'),
|
|
126
|
-
label: this.t('fleet.gitRepo.add.steps.targetInfo.label'),
|
|
127
|
-
subtext: this.t('fleet.gitRepo.add.steps.targetInfo.subtext'),
|
|
128
|
-
descriptionKey: 'fleet.gitRepo.steps.add.targetInfo.description',
|
|
129
|
-
ready: true,
|
|
130
|
-
weight: 1
|
|
131
|
-
};
|
|
132
|
-
|
|
133
129
|
return {
|
|
134
130
|
allClusters: [],
|
|
135
131
|
allClusterGroups: [],
|
|
@@ -144,14 +140,13 @@ export default {
|
|
|
144
140
|
correctDriftEnabled: false,
|
|
145
141
|
targetAdvancedErrors: null,
|
|
146
142
|
matchingClusters: null,
|
|
143
|
+
pollingInterval,
|
|
147
144
|
ref,
|
|
148
145
|
refValue,
|
|
149
146
|
targetMode,
|
|
150
147
|
targetCluster,
|
|
151
148
|
targetClusterGroup,
|
|
152
149
|
targetAdvanced,
|
|
153
|
-
stepRepoInfo,
|
|
154
|
-
stepTargetInfo,
|
|
155
150
|
displayHelmRepoURLRegex: false,
|
|
156
151
|
fvFormRuleSets: [{
|
|
157
152
|
path: 'spec.repo',
|
|
@@ -172,8 +167,42 @@ export default {
|
|
|
172
167
|
|
|
173
168
|
steps() {
|
|
174
169
|
return [
|
|
175
|
-
|
|
176
|
-
|
|
170
|
+
{
|
|
171
|
+
name: 'stepMetadata',
|
|
172
|
+
title: this.t('fleet.gitRepo.add.steps.metadata.title'),
|
|
173
|
+
label: this.t('fleet.gitRepo.add.steps.metadata.label'),
|
|
174
|
+
subtext: this.t('fleet.gitRepo.add.steps.metadata.subtext'),
|
|
175
|
+
descriptionKey: 'fleet.gitRepo.add.steps.metadata.description',
|
|
176
|
+
ready: this.isView || !!this.value.metadata.name,
|
|
177
|
+
weight: 1
|
|
178
|
+
},
|
|
179
|
+
{
|
|
180
|
+
name: 'stepRepo',
|
|
181
|
+
title: this.t('fleet.gitRepo.add.steps.repo.title'),
|
|
182
|
+
label: this.t('fleet.gitRepo.add.steps.repo.label'),
|
|
183
|
+
subtext: this.t('fleet.gitRepo.add.steps.repo.subtext'),
|
|
184
|
+
descriptionKey: 'fleet.gitRepo.add.steps.repo.description',
|
|
185
|
+
ready: this.isView || (!!this.refValue && !!this.fvFormIsValid),
|
|
186
|
+
weight: 1
|
|
187
|
+
},
|
|
188
|
+
{
|
|
189
|
+
name: 'stepTarget',
|
|
190
|
+
title: this.t('fleet.gitRepo.add.steps.targetInfo.title'),
|
|
191
|
+
label: this.t('fleet.gitRepo.add.steps.targetInfo.label'),
|
|
192
|
+
subtext: this.t('fleet.gitRepo.add.steps.targetInfo.subtext'),
|
|
193
|
+
descriptionKey: 'fleet.gitRepo.steps.add.targetInfo.description',
|
|
194
|
+
ready: this.isView || !!this.fvFormIsValid,
|
|
195
|
+
weight: 1
|
|
196
|
+
},
|
|
197
|
+
{
|
|
198
|
+
name: 'stepAdvanced',
|
|
199
|
+
title: this.t('fleet.gitRepo.add.steps.advanced.title'),
|
|
200
|
+
label: this.t('fleet.gitRepo.add.steps.advanced.label'),
|
|
201
|
+
subtext: this.t('fleet.gitRepo.add.steps.advanced.subtext'),
|
|
202
|
+
descriptionKey: 'fleet.gitRepo.add.steps.advanced.description',
|
|
203
|
+
ready: !!this.fvFormIsValid,
|
|
204
|
+
weight: 1,
|
|
205
|
+
},
|
|
177
206
|
];
|
|
178
207
|
},
|
|
179
208
|
|
|
@@ -185,6 +214,14 @@ export default {
|
|
|
185
214
|
return !(this.value?.spec?.repo || '').startsWith('http://');
|
|
186
215
|
},
|
|
187
216
|
|
|
217
|
+
isPollingEnabled() {
|
|
218
|
+
return !this.value.spec.disablePolling;
|
|
219
|
+
},
|
|
220
|
+
|
|
221
|
+
isWebhookConfigured() {
|
|
222
|
+
return !!this.value.status?.webhookCommit;
|
|
223
|
+
},
|
|
224
|
+
|
|
188
225
|
targetOptions() {
|
|
189
226
|
const out = [
|
|
190
227
|
{
|
|
@@ -265,8 +302,8 @@ export default {
|
|
|
265
302
|
];
|
|
266
303
|
},
|
|
267
304
|
|
|
268
|
-
|
|
269
|
-
return
|
|
305
|
+
showPollingIntervalWarning() {
|
|
306
|
+
return !this.isView && this.isPollingEnabled && this.pollingInterval < MINIMUM_POLLING_INTERVAL;
|
|
270
307
|
},
|
|
271
308
|
},
|
|
272
309
|
|
|
@@ -278,8 +315,6 @@ export default {
|
|
|
278
315
|
targetAdvanced: 'updateTargets',
|
|
279
316
|
tlsMode: 'updateTls',
|
|
280
317
|
caBundle: 'updateTls',
|
|
281
|
-
'value.metadata.name': 'stepOneReady',
|
|
282
|
-
'value.spec.repo': 'stepOneReady',
|
|
283
318
|
|
|
284
319
|
workspace(neu) {
|
|
285
320
|
if ( this.isCreate ) {
|
|
@@ -291,6 +326,7 @@ export default {
|
|
|
291
326
|
created() {
|
|
292
327
|
this.registerBeforeHook(this.cleanTLS, 'cleanTLS');
|
|
293
328
|
this.registerBeforeHook(this.doCreateSecrets, `registerAuthSecrets${ new Date().getTime() }`, 99);
|
|
329
|
+
this.registerBeforeHook(this.updateBeforeSave);
|
|
294
330
|
},
|
|
295
331
|
|
|
296
332
|
methods: {
|
|
@@ -377,8 +413,6 @@ export default {
|
|
|
377
413
|
} else {
|
|
378
414
|
spec.targets = [];
|
|
379
415
|
}
|
|
380
|
-
|
|
381
|
-
this.stepOneReady();
|
|
382
416
|
},
|
|
383
417
|
|
|
384
418
|
changeRef({ text, selected }) {
|
|
@@ -393,8 +427,6 @@ export default {
|
|
|
393
427
|
delete spec.branch;
|
|
394
428
|
spec.revision = text;
|
|
395
429
|
}
|
|
396
|
-
|
|
397
|
-
this.stepOneReady();
|
|
398
430
|
},
|
|
399
431
|
|
|
400
432
|
async doCreateSecrets() {
|
|
@@ -481,10 +513,6 @@ export default {
|
|
|
481
513
|
this.tlsMode = event;
|
|
482
514
|
},
|
|
483
515
|
|
|
484
|
-
stepOneReady() {
|
|
485
|
-
this.stepRepoInfo['ready'] = this.stepOneRequires;
|
|
486
|
-
},
|
|
487
|
-
|
|
488
516
|
updateTls() {
|
|
489
517
|
const spec = this.value.spec;
|
|
490
518
|
|
|
@@ -512,10 +540,46 @@ export default {
|
|
|
512
540
|
}
|
|
513
541
|
},
|
|
514
542
|
|
|
515
|
-
|
|
543
|
+
enablePolling(value) {
|
|
544
|
+
if (value) {
|
|
545
|
+
delete this.value.spec.disablePolling;
|
|
546
|
+
} else {
|
|
547
|
+
this.value.spec.disablePolling = true;
|
|
548
|
+
}
|
|
549
|
+
},
|
|
550
|
+
|
|
551
|
+
updatePollingInterval(value) {
|
|
552
|
+
if (!value) {
|
|
553
|
+
this.pollingInterval = DEFAULT_POLLING_INTERVAL;
|
|
554
|
+
this.value.spec.pollingInterval = this.durationSeconds(DEFAULT_POLLING_INTERVAL);
|
|
555
|
+
} else if (value === MINIMUM_POLLING_INTERVAL) {
|
|
556
|
+
delete this.value.spec.pollingInterval;
|
|
557
|
+
} else {
|
|
558
|
+
this.value.spec.pollingInterval = this.durationSeconds(value);
|
|
559
|
+
}
|
|
560
|
+
},
|
|
561
|
+
|
|
562
|
+
scrollToBottom() {
|
|
563
|
+
this.$nextTick(() => {
|
|
564
|
+
const scrollable = document.getElementsByTagName('main')[0];
|
|
565
|
+
|
|
566
|
+
if (scrollable) {
|
|
567
|
+
scrollable.scrollTop = scrollable.scrollHeight;
|
|
568
|
+
}
|
|
569
|
+
});
|
|
570
|
+
},
|
|
571
|
+
|
|
572
|
+
updateBeforeSave() {
|
|
516
573
|
this.value.spec['correctDrift'] = { enabled: this.correctDriftEnabled };
|
|
517
574
|
|
|
518
|
-
this.
|
|
575
|
+
if (this.mode === _CREATE) {
|
|
576
|
+
this.value.metadata.labels[FLEET_LABELS.CREATED_BY_USER_ID] = this.value.currentUser.id;
|
|
577
|
+
this.value.metadata.labels[FLEET_LABELS.CREATED_BY_USER_NAME] = this.value.currentUser.username;
|
|
578
|
+
}
|
|
579
|
+
},
|
|
580
|
+
|
|
581
|
+
durationSeconds(value) {
|
|
582
|
+
return `${ value }s`;
|
|
519
583
|
}
|
|
520
584
|
}
|
|
521
585
|
};
|
|
@@ -537,17 +601,9 @@ export default {
|
|
|
537
601
|
class="wizard"
|
|
538
602
|
@cancel="done"
|
|
539
603
|
@error="e=>errors = e"
|
|
540
|
-
@finish="
|
|
604
|
+
@finish="save"
|
|
541
605
|
>
|
|
542
|
-
<template #
|
|
543
|
-
<Banner
|
|
544
|
-
v-if="isLocal && mode === 'create'"
|
|
545
|
-
color="info"
|
|
546
|
-
>
|
|
547
|
-
{{ t('fleet.gitRepo.createLocalBanner') }}
|
|
548
|
-
</Banner>
|
|
549
|
-
</template>
|
|
550
|
-
<template #stepRepoInfo>
|
|
606
|
+
<template #stepMetadata>
|
|
551
607
|
<NameNsDescription
|
|
552
608
|
v-if="!isView"
|
|
553
609
|
:value="value"
|
|
@@ -555,10 +611,17 @@ export default {
|
|
|
555
611
|
:mode="mode"
|
|
556
612
|
@update:value="$emit('input', $event)"
|
|
557
613
|
/>
|
|
558
|
-
|
|
614
|
+
<Labels
|
|
615
|
+
:value="value"
|
|
616
|
+
:mode="mode"
|
|
617
|
+
:display-side-by-side="false"
|
|
618
|
+
:add-icon="'icon-plus'"
|
|
619
|
+
/>
|
|
620
|
+
</template>
|
|
621
|
+
<template #stepRepo>
|
|
559
622
|
<h2 v-t="'fleet.gitRepo.repo.title'" />
|
|
560
623
|
<div
|
|
561
|
-
class="row"
|
|
624
|
+
class="row mb-20"
|
|
562
625
|
:class="{'mt-20': isView}"
|
|
563
626
|
>
|
|
564
627
|
<div class="col span-6">
|
|
@@ -587,10 +650,31 @@ export default {
|
|
|
587
650
|
</div>
|
|
588
651
|
</div>
|
|
589
652
|
|
|
590
|
-
<
|
|
653
|
+
<ArrayList
|
|
654
|
+
v-model:value="value.spec.paths"
|
|
655
|
+
data-testid="gitRepo-paths"
|
|
656
|
+
:title="t('fleet.gitRepo.paths.label')"
|
|
657
|
+
:mode="mode"
|
|
658
|
+
:initial-empty-row="false"
|
|
659
|
+
:value-placeholder="t('fleet.gitRepo.paths.placeholder')"
|
|
660
|
+
:add-label="t('fleet.gitRepo.paths.addLabel')"
|
|
661
|
+
:add-icon="'icon-plus'"
|
|
662
|
+
:protip="t('fleet.gitRepo.paths.empty')"
|
|
663
|
+
/>
|
|
664
|
+
</template>
|
|
665
|
+
|
|
666
|
+
<template #stepAdvanced>
|
|
667
|
+
<Banner
|
|
668
|
+
v-if="!isView"
|
|
669
|
+
color="info"
|
|
670
|
+
label-key="fleet.gitRepo.add.steps.advanced.info"
|
|
671
|
+
data-testid="gitrepo-advanced-info"
|
|
672
|
+
/>
|
|
673
|
+
|
|
591
674
|
<h2 v-t="'fleet.gitRepo.auth.title'" />
|
|
592
675
|
|
|
593
676
|
<SelectOrCreateAuthSecret
|
|
677
|
+
data-testid="gitrepo-git-auth"
|
|
594
678
|
:value="value.spec.clientSecretName"
|
|
595
679
|
:register-before-hook="registerBeforeHook"
|
|
596
680
|
:namespace="value.metadata.namespace"
|
|
@@ -601,6 +685,7 @@ export default {
|
|
|
601
685
|
generate-name="gitrepo-auth-"
|
|
602
686
|
label-key="fleet.gitRepo.auth.git"
|
|
603
687
|
:cache-secrets="true"
|
|
688
|
+
:show-ssh-known-hosts="true"
|
|
604
689
|
@update:value="updateAuth($event, 'clientSecretName')"
|
|
605
690
|
@inputauthval="updateCachedAuthVal($event, 'clientSecretName')"
|
|
606
691
|
/>
|
|
@@ -616,6 +701,7 @@ export default {
|
|
|
616
701
|
label-key="fleet.gitRepo.auth.helm"
|
|
617
702
|
:pre-select="tempCachedValues.helmSecretName"
|
|
618
703
|
:cache-secrets="true"
|
|
704
|
+
:show-ssh-known-hosts="true"
|
|
619
705
|
@update:value="updateAuth($event, 'helmSecretName')"
|
|
620
706
|
@inputauthval="updateCachedAuthVal($event, 'helmSecretName')"
|
|
621
707
|
/>
|
|
@@ -667,7 +753,7 @@ export default {
|
|
|
667
753
|
<Checkbox
|
|
668
754
|
v-model:value="correctDriftEnabled"
|
|
669
755
|
:tooltip="t('fleet.gitRepo.resources.correctDriftTooltip')"
|
|
670
|
-
data-testid="
|
|
756
|
+
data-testid="gitRepo-correctDrift-checkbox"
|
|
671
757
|
class="check"
|
|
672
758
|
type="checkbox"
|
|
673
759
|
label-key="fleet.gitRepo.resources.correctDrift"
|
|
@@ -676,26 +762,60 @@ export default {
|
|
|
676
762
|
<Checkbox
|
|
677
763
|
v-model:value="value.spec.keepResources"
|
|
678
764
|
:tooltip="t('fleet.gitRepo.resources.keepResourcesTooltip')"
|
|
679
|
-
data-testid="
|
|
765
|
+
data-testid="gitRepo-keepResources-checkbox"
|
|
680
766
|
class="check"
|
|
681
767
|
type="checkbox"
|
|
682
768
|
label-key="fleet.gitRepo.resources.keepResources"
|
|
683
769
|
:mode="mode"
|
|
684
770
|
/>
|
|
685
771
|
</div>
|
|
772
|
+
|
|
686
773
|
<div class="spacer" />
|
|
687
|
-
<
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
774
|
+
<h2 v-t="'fleet.gitRepo.polling.label'" />
|
|
775
|
+
<div class="row polling">
|
|
776
|
+
<div class="col span-6">
|
|
777
|
+
<Checkbox
|
|
778
|
+
v-model:value="isPollingEnabled"
|
|
779
|
+
data-testid="gitRepo-enablePolling-checkbox"
|
|
780
|
+
class="check"
|
|
781
|
+
type="checkbox"
|
|
782
|
+
label-key="fleet.gitRepo.polling.enable"
|
|
783
|
+
:mode="mode"
|
|
784
|
+
@update:value="enablePolling"
|
|
785
|
+
/>
|
|
786
|
+
</div>
|
|
787
|
+
<template v-if="isPollingEnabled">
|
|
788
|
+
<div class="col">
|
|
789
|
+
<Banner
|
|
790
|
+
v-if="showPollingIntervalWarning"
|
|
791
|
+
color="warning"
|
|
792
|
+
label-key="fleet.gitRepo.polling.pollingInterval.minimumValuewarning"
|
|
793
|
+
data-testid="gitRepo-pollingInterval-minimumValueWarning"
|
|
794
|
+
/>
|
|
795
|
+
<Banner
|
|
796
|
+
v-if="isWebhookConfigured"
|
|
797
|
+
color="warning"
|
|
798
|
+
label-key="fleet.gitRepo.polling.pollingInterval.webhookWarning"
|
|
799
|
+
data-testid="gitRepo-pollingInterval-webhookWarning"
|
|
800
|
+
/>
|
|
801
|
+
</div>
|
|
802
|
+
<div class="col span-6">
|
|
803
|
+
<UnitInput
|
|
804
|
+
v-model:value="pollingInterval"
|
|
805
|
+
data-testid="gitRepo-pollingInterval-input"
|
|
806
|
+
min="1"
|
|
807
|
+
:suffix="t('suffix.seconds', { count: pollingInterval })"
|
|
808
|
+
:label="t('fleet.gitRepo.polling.pollingInterval.label')"
|
|
809
|
+
:mode="mode"
|
|
810
|
+
tooltip-key="fleet.gitRepo.polling.pollingInterval.tooltip"
|
|
811
|
+
@update:value="updatePollingInterval"
|
|
812
|
+
/>
|
|
813
|
+
</div>
|
|
814
|
+
</template>
|
|
815
|
+
</div>
|
|
697
816
|
</template>
|
|
698
|
-
|
|
817
|
+
|
|
818
|
+
<template #stepTarget>
|
|
699
819
|
<h2 v-t="isLocal ? 'fleet.gitRepo.target.labelLocal' : 'fleet.gitRepo.target.label'" />
|
|
700
820
|
|
|
701
821
|
<template v-if="!isLocal">
|
|
@@ -760,25 +880,31 @@ export default {
|
|
|
760
880
|
/>
|
|
761
881
|
</div>
|
|
762
882
|
</div>
|
|
763
|
-
<div class="spacer" />
|
|
764
|
-
<Labels
|
|
765
|
-
:value="value"
|
|
766
|
-
:mode="mode"
|
|
767
|
-
:display-side-by-side="false"
|
|
768
|
-
/>
|
|
769
883
|
</template>
|
|
770
884
|
</CruResource>
|
|
771
885
|
</template>
|
|
772
886
|
|
|
773
887
|
<style lang="scss" scoped>
|
|
888
|
+
.spacer {
|
|
889
|
+
padding: 30px 0 0 0;
|
|
890
|
+
}
|
|
774
891
|
:deep() .select-or-create-auth-secret {
|
|
775
892
|
.row {
|
|
776
893
|
margin-top: 10px !important;
|
|
777
894
|
}
|
|
778
895
|
}
|
|
896
|
+
:deep() .input-container .in-input.labeled-select {
|
|
897
|
+
min-width: 110px;
|
|
898
|
+
width: 20%;
|
|
899
|
+
}
|
|
779
900
|
.resource-handling {
|
|
780
901
|
display: flex;
|
|
781
902
|
flex-direction: column;
|
|
782
|
-
gap: 5px
|
|
903
|
+
gap: 5px;
|
|
904
|
+
}
|
|
905
|
+
.polling {
|
|
906
|
+
display: flex;
|
|
907
|
+
flex-direction: column;
|
|
908
|
+
gap: 5px;
|
|
783
909
|
}
|
|
784
910
|
</style>
|
|
@@ -117,27 +117,6 @@ export default {
|
|
|
117
117
|
</div>
|
|
118
118
|
</div>
|
|
119
119
|
<div v-if="isClusterFlow">
|
|
120
|
-
<div class="spacer" />
|
|
121
|
-
<h3>
|
|
122
|
-
{{ value.select ? t('logging.flow.matches.containerNames.title.include') : t('logging.flow.matches.containerNames.title.exclude') }}
|
|
123
|
-
</h3>
|
|
124
|
-
<div class="row">
|
|
125
|
-
<div class="col span-12">
|
|
126
|
-
<Select
|
|
127
|
-
v-model:value="value.namespaces"
|
|
128
|
-
class="lg"
|
|
129
|
-
:options="namespaces"
|
|
130
|
-
:placeholder="t('logging.flow.matches.namespaces.placeholder')"
|
|
131
|
-
:multiple="true"
|
|
132
|
-
:taggable="true"
|
|
133
|
-
:clearable="true"
|
|
134
|
-
:searchable="true"
|
|
135
|
-
:close-on-select="false"
|
|
136
|
-
no-options-label-key="logging.flow.matches.containerNames.enter"
|
|
137
|
-
placement="top"
|
|
138
|
-
/>
|
|
139
|
-
</div>
|
|
140
|
-
</div>
|
|
141
120
|
<div class="spacer" />
|
|
142
121
|
<h3>
|
|
143
122
|
{{ value.select ? t('logging.flow.matches.namespaces.title.include') : t('logging.flow.matches.namespaces.title.exclude') }}
|
|
@@ -132,7 +132,7 @@ export default {
|
|
|
132
132
|
});
|
|
133
133
|
}
|
|
134
134
|
|
|
135
|
-
//
|
|
135
|
+
// We allow users with permissions for projectroletemplatebindings to be able to manage members on projects
|
|
136
136
|
if (this.membershipUpdate.save) {
|
|
137
137
|
const norman = await this.value.norman;
|
|
138
138
|
|
|
@@ -11,7 +11,7 @@ import { LabeledInput } from '@components/Form/LabeledInput';
|
|
|
11
11
|
import LabeledSelect from '@shell/components/form/LabeledSelect';
|
|
12
12
|
import UnitInput from '@shell/components/form/UnitInput';
|
|
13
13
|
import { _VIEW } from '@shell/config/query-params';
|
|
14
|
-
import {
|
|
14
|
+
import { toSeconds } from '@shell/utils/duration';
|
|
15
15
|
|
|
16
16
|
const IGNORED_ANNOTATIONS = [
|
|
17
17
|
'summary',
|
|
@@ -207,7 +207,10 @@ export default {
|
|
|
207
207
|
waitToFireFor: {
|
|
208
208
|
get() {
|
|
209
209
|
if (![null, undefined].includes(this.value.for)) {
|
|
210
|
-
|
|
210
|
+
// see:
|
|
211
|
+
// https://prometheus.io/docs/prometheus/latest/configuration/recording_rules/#rule
|
|
212
|
+
// https://prometheus.io/docs/prometheus/latest/configuration/configuration/#duration
|
|
213
|
+
return toSeconds(this.value.for);
|
|
211
214
|
}
|
|
212
215
|
|
|
213
216
|
return undefined;
|
|
@@ -308,7 +311,7 @@ export default {
|
|
|
308
311
|
>
|
|
309
312
|
<template #field>
|
|
310
313
|
<CodeMirror
|
|
311
|
-
class="mt-20"
|
|
314
|
+
class="mt-20 promql-input"
|
|
312
315
|
:value="value.expr"
|
|
313
316
|
:options="{
|
|
314
317
|
mode: null,
|
|
@@ -524,4 +527,8 @@ export default {
|
|
|
524
527
|
top: 0;
|
|
525
528
|
right: 5px;
|
|
526
529
|
}
|
|
530
|
+
|
|
531
|
+
.promql-input {
|
|
532
|
+
width: 100%;
|
|
533
|
+
}
|
|
527
534
|
</style>
|
|
@@ -71,7 +71,7 @@ export default {
|
|
|
71
71
|
>
|
|
72
72
|
<template #field>
|
|
73
73
|
<CodeMirror
|
|
74
|
-
class="mt-20"
|
|
74
|
+
class="mt-20 promql-input"
|
|
75
75
|
:value="value.expr"
|
|
76
76
|
:options="{
|
|
77
77
|
mode: null,
|
|
@@ -105,4 +105,8 @@ export default {
|
|
|
105
105
|
.row {
|
|
106
106
|
margin: 20px 0;
|
|
107
107
|
}
|
|
108
|
+
|
|
109
|
+
.promql-input {
|
|
110
|
+
width: 100%;
|
|
111
|
+
}
|
|
108
112
|
</style>
|
|
@@ -13,7 +13,7 @@ import { _CREATE, _VIEW } from '@shell/config/query-params';
|
|
|
13
13
|
import isString from 'lodash/isString';
|
|
14
14
|
import isEmpty from 'lodash/isEmpty';
|
|
15
15
|
import GroupRules from './GroupRules';
|
|
16
|
-
import {
|
|
16
|
+
import { toSeconds } from '@shell/utils/duration';
|
|
17
17
|
|
|
18
18
|
export default {
|
|
19
19
|
components: {
|
|
@@ -118,7 +118,10 @@ export default {
|
|
|
118
118
|
|
|
119
119
|
getGroupInterval(interval) {
|
|
120
120
|
if (![null, undefined].includes(interval)) {
|
|
121
|
-
|
|
121
|
+
// see:
|
|
122
|
+
// https://prometheus.io/docs/prometheus/latest/configuration/recording_rules/#rule
|
|
123
|
+
// https://prometheus.io/docs/prometheus/latest/configuration/configuration/#duration
|
|
124
|
+
return toSeconds(interval);
|
|
122
125
|
}
|
|
123
126
|
}
|
|
124
127
|
},
|
|
@@ -262,6 +262,12 @@ export default {
|
|
|
262
262
|
<template v-if="cluster.supportsWindows">
|
|
263
263
|
<hr class="mt-20 mb-20">
|
|
264
264
|
<h4 v-t="'cluster.custom.registrationCommand.windowsDetail'" />
|
|
265
|
+
<Banner
|
|
266
|
+
v-if="readyForWindows"
|
|
267
|
+
color="info"
|
|
268
|
+
label-key="cluster.custom.registrationCommand.windowsWorkersOnly"
|
|
269
|
+
data-testid="ready-for-windows"
|
|
270
|
+
/>
|
|
265
271
|
<Banner
|
|
266
272
|
v-if="cluster.isRke1"
|
|
267
273
|
color="warning"
|
|
@@ -288,7 +294,8 @@ export default {
|
|
|
288
294
|
<Banner
|
|
289
295
|
v-else
|
|
290
296
|
color="info"
|
|
291
|
-
|
|
297
|
+
label-key="cluster.custom.registrationCommand.windowsNotReady"
|
|
298
|
+
data-testid="windows-not-ready"
|
|
292
299
|
/>
|
|
293
300
|
</template>
|
|
294
301
|
</InfoBox>
|