@rancher/shell 0.3.8 → 0.3.10
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/translations/en-us.yaml +47 -26
- package/assets/translations/zh-hans.yaml +82 -16
- package/babel.config.js +17 -4
- package/chart/istio.vue +11 -11
- package/chart/rancher-backup/S3.vue +1 -1
- package/components/AsyncButton.vue +2 -2
- package/components/ButtonGroup.vue +1 -1
- package/components/CodeMirror.vue +146 -14
- package/components/CompoundStatusBadge.vue +1 -1
- package/components/ContainerResourceLimit.vue +14 -1
- package/components/CopyCode.vue +1 -1
- package/components/CruResource.vue +21 -5
- package/components/DetailTop.vue +1 -1
- package/components/ExplorerProjectsNamespaces.vue +8 -4
- package/components/GlobalRoleBindings.vue +1 -1
- package/components/GroupPanel.vue +57 -0
- package/components/HarvesterServiceAddOnConfig.vue +2 -117
- package/components/ResourceDetail/Masthead.vue +1 -1
- package/components/ResourceList/Masthead.vue +0 -6
- package/components/ResourceList/ResourceLoadingIndicator.vue +1 -9
- package/components/ResourceList/index.vue +7 -6
- package/components/ResourceTable.vue +13 -3
- package/components/SortableTable/THead.vue +3 -3
- package/components/SortableTable/index.vue +3 -3
- package/components/Tabbed/Tab.vue +1 -1
- package/components/Tabbed/index.vue +1 -1
- package/components/Wizard.vue +9 -6
- package/components/YamlEditor.vue +2 -2
- package/components/__tests__/NamespaceFilter.test.ts +26 -7
- package/components/auth/RoleDetailEdit.vue +1 -1
- package/components/auth/SelectPrincipal.vue +1 -1
- package/components/fleet/FleetRepos.vue +1 -1
- package/components/form/ArrayList.vue +2 -2
- package/components/form/KeyValue.vue +37 -3
- package/components/form/Labels.vue +34 -14
- package/components/form/MatchExpressions.vue +120 -21
- package/components/form/Members/ClusterPermissionsEditor.vue +1 -1
- package/components/form/NameNsDescription.vue +1 -1
- package/components/form/NodeAffinity.vue +54 -4
- package/components/form/PlusMinus.vue +2 -2
- package/components/form/PodAffinity.vue +160 -47
- package/components/form/Probe.vue +1 -1
- package/components/form/ProjectMemberEditor.vue +8 -4
- package/components/form/ResourceQuota/NamespaceRow.vue +1 -1
- package/components/form/ServicePorts.vue +2 -2
- package/components/form/Tolerations.vue +70 -7
- package/components/form/WorkloadPorts.vue +2 -1
- package/components/form/__tests__/ArrayList.test.ts +3 -3
- package/components/form/__tests__/KeyValue.test.ts +17 -0
- package/components/form/__tests__/MatchExpressions.test.ts +1 -1
- package/components/formatter/ClusterLink.vue +3 -3
- package/components/formatter/LiveDate.vue +1 -1
- package/components/formatter/PodImages.vue +1 -1
- package/components/formatter/RKETemplateName.vue +1 -1
- package/components/formatter/Shortened.vue +1 -1
- package/components/nav/Header.vue +9 -7
- package/components/nav/NamespaceFilter.vue +103 -54
- package/config/labels-annotations.js +8 -5
- package/config/settings.ts +8 -6
- package/config/types.js +6 -4
- package/core/plugin-routes.ts +26 -7
- package/detail/provisioning.cattle.io.cluster.vue +4 -4
- package/edit/cis.cattle.io.clusterscan.vue +1 -1
- package/edit/configmap.vue +33 -6
- package/edit/k8s.cni.cncf.io.networkattachmentdefinition.vue +19 -149
- package/edit/logging-flow/index.vue +2 -2
- package/edit/logging.banzaicloud.io.output/providers/elasticsearch.vue +12 -0
- package/edit/logging.banzaicloud.io.output/providers/opensearch.vue +12 -0
- package/edit/management.cattle.io.project.vue +7 -0
- package/edit/monitoring.coreos.com.alertmanagerconfig/index.vue +1 -1
- package/edit/monitoring.coreos.com.alertmanagerconfig/routeConfig.vue +2 -2
- package/edit/monitoring.coreos.com.prometheusrule/GroupRules.vue +11 -8
- package/edit/networking.k8s.io.networkpolicy/PolicyRule.vue +2 -2
- package/edit/networking.k8s.io.networkpolicy/PolicyRuleTarget.vue +12 -4
- package/edit/networking.k8s.io.networkpolicy/__tests__/PolicyRuleTarget.spec.ts +140 -0
- package/edit/networking.k8s.io.networkpolicy/__tests__/utils/mock.json +158 -0
- package/edit/networking.k8s.io.networkpolicy/__tests__/utils/selectors.ts +45 -0
- package/edit/networking.k8s.io.networkpolicy/index.vue +1 -1
- package/edit/provisioning.cattle.io.cluster/AgentConfiguration.vue +326 -0
- package/edit/provisioning.cattle.io.cluster/MachinePool.vue +1 -1
- package/edit/provisioning.cattle.io.cluster/RegistryConfigs.vue +1 -1
- package/edit/provisioning.cattle.io.cluster/RegistryMirrors.vue +2 -2
- package/edit/provisioning.cattle.io.cluster/__tests__/rke2.test.ts +143 -169
- package/edit/provisioning.cattle.io.cluster/index.vue +1 -0
- package/edit/provisioning.cattle.io.cluster/rke2.vue +75 -6
- package/edit/resources.cattle.io.restore.vue +2 -2
- package/edit/service.vue +22 -3
- package/edit/storage.k8s.io.storageclass/index.vue +1 -1
- package/edit/workload/Job.vue +2 -2
- package/edit/workload/index.vue +1 -1
- package/edit/workload/mixins/workload.js +7 -1
- package/edit/workload/storage/__tests__/Storage.test.ts +84 -5
- package/initialize/index.js +1 -0
- package/layouts/default.vue +1 -1
- package/mixins/chart.js +1 -1
- package/mixins/resource-fetch-namespaced.js +19 -27
- package/mixins/resource-fetch.js +0 -5
- package/models/__tests__/namespace.test.ts +125 -0
- package/models/batch.cronjob.js +18 -3
- package/models/management.cattle.io.project.js +6 -1
- package/models/persistentvolume.js +1 -1
- package/models/workload.js +1 -1
- package/models/workload.service.js +22 -7
- package/package.json +17 -6
- package/pages/auth/login.vue +47 -49
- package/pages/c/_cluster/apps/charts/chart.vue +1 -1
- package/pages/c/_cluster/apps/charts/install.vue +42 -51
- package/pages/c/_cluster/explorer/index.vue +1 -1
- package/pages/c/_cluster/monitoring/index.vue +1 -1
- package/pages/c/_cluster/settings/performance.vue +53 -18
- package/pages/c/_cluster/uiplugins/PluginInfoPanel.vue +1 -1
- package/pages/c/_cluster/uiplugins/index.vue +16 -5
- package/pages/home.vue +1 -1
- package/pages/prefs.vue +18 -2
- package/plugins/clean-html-directive.js +1 -1
- package/plugins/clean-tooltip-directive.js +33 -0
- package/plugins/codemirror.js +158 -0
- package/plugins/dashboard-store/actions.js +4 -2
- package/plugins/dashboard-store/getters.js +6 -0
- package/plugins/dashboard-store/mutations.js +2 -2
- package/plugins/plugin.js +6 -1
- package/plugins/steve/actions.js +1 -1
- package/plugins/steve/getters.js +14 -3
- package/plugins/steve/resourceWatcher.js +36 -62
- package/plugins/steve/subscribe.js +137 -21
- package/plugins/steve/worker/index.js +7 -1
- package/plugins/steve/worker/web-worker.advanced.js +26 -8
- package/plugins/steve/worker/web-worker.basic.js +23 -4
- package/public/index.html +1 -1
- package/rancher-components/components/Form/Checkbox/Checkbox.vue +2 -2
- package/rancher-components/components/Form/Radio/RadioGroup.vue +2 -2
- package/rancher-components/components/LabeledTooltip/LabeledTooltip.vue +1 -1
- package/store/index.js +16 -61
- package/store/store-types.js +5 -0
- package/store/type-map.js +1 -1
- package/types/shell/index.d.ts +42 -7
- package/utils/__tests__/create-yaml.test.ts +63 -0
- package/utils/array.ts +4 -0
- package/utils/create-yaml.js +105 -8
- package/utils/namespace-filter.js +17 -5
- package/utils/projectAndNamespaceFiltering.utils.ts +62 -0
- package/utils/selector.js +6 -5
- package/utils/settings.ts +17 -7
- package/vue.config.js +2 -2
- package/models/k8s.cni.cncf.io.networkattachmentdefinition.js +0 -93
package/pages/auth/login.vue
CHANGED
|
@@ -303,6 +303,7 @@ export default {
|
|
|
303
303
|
</h1>
|
|
304
304
|
<div
|
|
305
305
|
class="login-messages"
|
|
306
|
+
data-testid="login__messages"
|
|
306
307
|
:class="{'login-messages--hasContent': hasLoginMessage}"
|
|
307
308
|
>
|
|
308
309
|
<Banner
|
|
@@ -325,60 +326,59 @@ export default {
|
|
|
325
326
|
</div>
|
|
326
327
|
<div
|
|
327
328
|
v-if="firstLogin"
|
|
328
|
-
class="first-login-message"
|
|
329
|
+
class="first-login-message pl-10 pr-10"
|
|
330
|
+
:class="{'mt-30': !hasLoginMessage}"
|
|
329
331
|
data-testid="first-login-message"
|
|
330
332
|
>
|
|
331
|
-
<
|
|
333
|
+
<t
|
|
334
|
+
k="setup.defaultPassword.intro"
|
|
335
|
+
:raw="true"
|
|
336
|
+
/>
|
|
337
|
+
|
|
338
|
+
<div>
|
|
332
339
|
<t
|
|
333
|
-
k="setup.defaultPassword.
|
|
340
|
+
k="setup.defaultPassword.dockerPrefix"
|
|
334
341
|
:raw="true"
|
|
335
342
|
/>
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
k="setup.defaultPassword.dockerPrefix"
|
|
340
|
-
:raw="true"
|
|
341
|
-
/>
|
|
342
|
-
</div>
|
|
343
|
-
<ul>
|
|
344
|
-
<li>
|
|
345
|
-
<t
|
|
346
|
-
k="setup.defaultPassword.dockerPs"
|
|
347
|
-
:raw="true"
|
|
348
|
-
/>
|
|
349
|
-
</li>
|
|
350
|
-
<li>
|
|
351
|
-
<CopyCode>
|
|
352
|
-
docker logs <u>container-id</u> 2>&1 | grep "Bootstrap Password:"
|
|
353
|
-
</CopyCode>
|
|
354
|
-
</li>
|
|
355
|
-
</ul>
|
|
356
|
-
<div>
|
|
343
|
+
</div>
|
|
344
|
+
<ul>
|
|
345
|
+
<li>
|
|
357
346
|
<t
|
|
358
|
-
k="setup.defaultPassword.
|
|
347
|
+
k="setup.defaultPassword.dockerPs"
|
|
359
348
|
:raw="true"
|
|
360
349
|
/>
|
|
361
|
-
</
|
|
350
|
+
</li>
|
|
351
|
+
<li>
|
|
352
|
+
<CopyCode>
|
|
353
|
+
docker logs <u>container-id</u> 2>&1 | grep "Bootstrap Password:"
|
|
354
|
+
</CopyCode>
|
|
355
|
+
</li>
|
|
356
|
+
</ul>
|
|
357
|
+
<div>
|
|
358
|
+
<t
|
|
359
|
+
k="setup.defaultPassword.dockerSuffix"
|
|
360
|
+
:raw="true"
|
|
361
|
+
/>
|
|
362
|
+
</div>
|
|
362
363
|
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
</InfoBox>
|
|
364
|
+
<br>
|
|
365
|
+
<div>
|
|
366
|
+
<t
|
|
367
|
+
k="setup.defaultPassword.helmPrefix"
|
|
368
|
+
:raw="true"
|
|
369
|
+
/>
|
|
370
|
+
</div>
|
|
371
|
+
<br>
|
|
372
|
+
<CopyCode>
|
|
373
|
+
{{ kubectlCmd }}
|
|
374
|
+
</CopyCode>
|
|
375
|
+
<br>
|
|
376
|
+
<div>
|
|
377
|
+
<t
|
|
378
|
+
k="setup.defaultPassword.helmSuffix"
|
|
379
|
+
:raw="true"
|
|
380
|
+
/>
|
|
381
|
+
</div>
|
|
382
382
|
</div>
|
|
383
383
|
|
|
384
384
|
<div
|
|
@@ -507,6 +507,8 @@ export default {
|
|
|
507
507
|
}
|
|
508
508
|
|
|
509
509
|
.login-messages {
|
|
510
|
+
display: flex;
|
|
511
|
+
justify-content: center;
|
|
510
512
|
align-items: center;
|
|
511
513
|
|
|
512
514
|
.banner {
|
|
@@ -518,11 +520,7 @@ export default {
|
|
|
518
520
|
&--hasContent {
|
|
519
521
|
min-height: 70px;
|
|
520
522
|
}
|
|
521
|
-
}
|
|
522
523
|
|
|
523
|
-
.login-messages, .first-login-message {
|
|
524
|
-
display: flex;
|
|
525
|
-
justify-content: center;
|
|
526
524
|
.text-error, .banner {
|
|
527
525
|
max-width: 80%;
|
|
528
526
|
}
|
|
@@ -224,7 +224,7 @@ export default {
|
|
|
224
224
|
<b v-if="vers.originalVersion === version.version">{{ vers.originalVersion === currentVersion ? t('catalog.install.versions.current', { ver: currentVersion }): vers.shortLabel }}</b>
|
|
225
225
|
<a
|
|
226
226
|
v-else
|
|
227
|
-
v-tooltip="vers.label.length > 16 ? vers.label : null"
|
|
227
|
+
v-clean-tooltip="vers.label.length > 16 ? vers.label : null"
|
|
228
228
|
@click.prevent="selectVersion(vers)"
|
|
229
229
|
>
|
|
230
230
|
{{ vers.originalVersion === currentVersion ? t('catalog.install.versions.current', { ver: currentVersion }): vers.shortLabel }}
|
|
@@ -1500,46 +1500,45 @@ export default {
|
|
|
1500
1500
|
</div>
|
|
1501
1501
|
</template>
|
|
1502
1502
|
<template #helmValues>
|
|
1503
|
-
<
|
|
1504
|
-
|
|
1505
|
-
|
|
1506
|
-
|
|
1507
|
-
|
|
1503
|
+
<Banner
|
|
1504
|
+
v-if="step2Description"
|
|
1505
|
+
color="info"
|
|
1506
|
+
class="description"
|
|
1507
|
+
>
|
|
1508
|
+
{{ step2Description }}
|
|
1509
|
+
</Banner>
|
|
1510
|
+
<div class="step__values__controls">
|
|
1511
|
+
<ButtonGroup
|
|
1512
|
+
v-model="preFormYamlOption"
|
|
1513
|
+
:options="formYamlOptions"
|
|
1514
|
+
inactive-class="bg-disabled btn-sm"
|
|
1515
|
+
active-class="bg-primary btn-sm"
|
|
1516
|
+
:disabled="preFormYamlOption != formYamlOption"
|
|
1517
|
+
/>
|
|
1518
|
+
<div class="step__values__controls--spacer">
|
|
1519
|
+
|
|
1520
|
+
</div>
|
|
1521
|
+
<ButtonGroup
|
|
1522
|
+
v-if="showDiff"
|
|
1523
|
+
v-model="diffMode"
|
|
1524
|
+
:options="yamlDiffModeOptions"
|
|
1525
|
+
inactive-class="bg-disabled btn-sm"
|
|
1526
|
+
active-class="bg-primary btn-sm"
|
|
1527
|
+
/>
|
|
1528
|
+
<div
|
|
1529
|
+
v-if="hasReadme && !showingReadmeWindow"
|
|
1530
|
+
class="btn-group"
|
|
1508
1531
|
>
|
|
1509
|
-
|
|
1510
|
-
|
|
1511
|
-
|
|
1512
|
-
|
|
1513
|
-
v-model="preFormYamlOption"
|
|
1514
|
-
:options="formYamlOptions"
|
|
1515
|
-
inactive-class="bg-disabled btn-sm"
|
|
1516
|
-
active-class="bg-primary btn-sm"
|
|
1517
|
-
:disabled="preFormYamlOption != formYamlOption"
|
|
1518
|
-
/>
|
|
1519
|
-
<div class="step__values__controls--spacer">
|
|
1520
|
-
|
|
1521
|
-
</div>
|
|
1522
|
-
<ButtonGroup
|
|
1523
|
-
v-if="showDiff"
|
|
1524
|
-
v-model="diffMode"
|
|
1525
|
-
:options="yamlDiffModeOptions"
|
|
1526
|
-
inactive-class="bg-disabled btn-sm"
|
|
1527
|
-
active-class="bg-primary btn-sm"
|
|
1528
|
-
/>
|
|
1529
|
-
<div
|
|
1530
|
-
v-if="hasReadme && !showingReadmeWindow"
|
|
1531
|
-
class="btn-group"
|
|
1532
|
+
<button
|
|
1533
|
+
type="button"
|
|
1534
|
+
class="btn bg-primary btn-sm"
|
|
1535
|
+
@click="showSlideIn = !showSlideIn"
|
|
1532
1536
|
>
|
|
1533
|
-
|
|
1534
|
-
|
|
1535
|
-
class="btn bg-primary btn-sm"
|
|
1536
|
-
@click="showSlideIn = !showSlideIn"
|
|
1537
|
-
>
|
|
1538
|
-
{{ t('catalog.install.steps.helmValues.chartInfo.button') }}
|
|
1539
|
-
</button>
|
|
1540
|
-
</div>
|
|
1537
|
+
{{ t('catalog.install.steps.helmValues.chartInfo.button') }}
|
|
1538
|
+
</button>
|
|
1541
1539
|
</div>
|
|
1542
1540
|
</div>
|
|
1541
|
+
|
|
1543
1542
|
<div class="scroll__container">
|
|
1544
1543
|
<div class="scroll__content">
|
|
1545
1544
|
<!-- Values (as Custom Component in ./shell/charts/) -->
|
|
@@ -1726,7 +1725,7 @@ export default {
|
|
|
1726
1725
|
{{ t('catalog.install.steps.helmValues.chartInfo.label') }}
|
|
1727
1726
|
<div class="slideIn__header__buttons">
|
|
1728
1727
|
<div
|
|
1729
|
-
v-tooltip="t('catalog.install.slideIn.dock')"
|
|
1728
|
+
v-clean-tooltip="t('catalog.install.slideIn.dock')"
|
|
1730
1729
|
class="slideIn__header__button"
|
|
1731
1730
|
@click="showSlideIn = false; showReadmeWindow()"
|
|
1732
1731
|
>
|
|
@@ -1782,7 +1781,6 @@ export default {
|
|
|
1782
1781
|
</div>
|
|
1783
1782
|
</div>
|
|
1784
1783
|
</div>
|
|
1785
|
-
|
|
1786
1784
|
<Banner
|
|
1787
1785
|
color="warning"
|
|
1788
1786
|
class="description"
|
|
@@ -1816,7 +1814,7 @@ export default {
|
|
|
1816
1814
|
|
|
1817
1815
|
.install-steps {
|
|
1818
1816
|
padding-top: 0;
|
|
1819
|
-
|
|
1817
|
+
height: 0;
|
|
1820
1818
|
position: relative;
|
|
1821
1819
|
overflow: hidden;
|
|
1822
1820
|
|
|
@@ -1961,14 +1959,16 @@ export default {
|
|
|
1961
1959
|
&__container {
|
|
1962
1960
|
$yaml-height: 200px;
|
|
1963
1961
|
min-height: $yaml-height;
|
|
1964
|
-
|
|
1962
|
+
margin-bottom: 60px;
|
|
1963
|
+
overflow: auto;
|
|
1964
|
+
display: flex;
|
|
1965
|
+
flex: 1;
|
|
1965
1966
|
}
|
|
1966
1967
|
&__content {
|
|
1967
1968
|
display: flex;
|
|
1968
1969
|
flex: 1;
|
|
1969
1970
|
overflow: auto;
|
|
1970
1971
|
}
|
|
1971
|
-
|
|
1972
1972
|
}
|
|
1973
1973
|
|
|
1974
1974
|
::v-deep .yaml-editor {
|
|
@@ -1978,8 +1978,8 @@ export default {
|
|
|
1978
1978
|
.outer-container {
|
|
1979
1979
|
display: flex;
|
|
1980
1980
|
flex-direction: column;
|
|
1981
|
-
flex: 1;
|
|
1982
1981
|
padding: 0;
|
|
1982
|
+
height: calc(100% - 112px);
|
|
1983
1983
|
}
|
|
1984
1984
|
|
|
1985
1985
|
.header {
|
|
@@ -2058,13 +2058,4 @@ export default {
|
|
|
2058
2058
|
margin-top: 5px;
|
|
2059
2059
|
}
|
|
2060
2060
|
|
|
2061
|
-
.sticky-header {
|
|
2062
|
-
position: sticky;
|
|
2063
|
-
top: 0;
|
|
2064
|
-
z-index: 10;
|
|
2065
|
-
display: flex;
|
|
2066
|
-
flex-direction: column;
|
|
2067
|
-
background: var(--primary-text);
|
|
2068
|
-
}
|
|
2069
|
-
|
|
2070
2061
|
</style>
|
|
@@ -459,7 +459,7 @@ export default {
|
|
|
459
459
|
</div>
|
|
460
460
|
<p
|
|
461
461
|
v-if="displayPspDeprecationBanner && hidePspDeprecationBanner"
|
|
462
|
-
v-tooltip="t('landing.deprecatedPsp')"
|
|
462
|
+
v-clean-tooltip="t('landing.deprecatedPsp')"
|
|
463
463
|
class="alt-psp-deprecation-info"
|
|
464
464
|
>
|
|
465
465
|
<span>{{ t('landing.psps') }}</span>
|
|
@@ -9,6 +9,18 @@ import { DEFAULT_PERF_SETTING, SETTING } from '@shell/config/settings';
|
|
|
9
9
|
import { _EDIT, _VIEW } from '@shell/config/query-params';
|
|
10
10
|
import UnitInput from '@shell/components/form/UnitInput';
|
|
11
11
|
|
|
12
|
+
const incompatible = {
|
|
13
|
+
incrementalLoading: ['forceNsFilterV2'],
|
|
14
|
+
manualRefresh: ['forceNsFilterV2'],
|
|
15
|
+
forceNsFilterV2: ['incrementalLoading', 'manualRefresh'],
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
const l10n = {
|
|
19
|
+
incrementalLoading: 'incrementalLoad',
|
|
20
|
+
manualRefresh: 'manualRefresh',
|
|
21
|
+
forceNsFilterV2: 'nsFiltering',
|
|
22
|
+
};
|
|
23
|
+
|
|
12
24
|
export default {
|
|
13
25
|
layout: 'authenticated',
|
|
14
26
|
components: {
|
|
@@ -102,8 +114,42 @@ export default {
|
|
|
102
114
|
this.errors.push(err);
|
|
103
115
|
btnCB(false);
|
|
104
116
|
}
|
|
117
|
+
},
|
|
118
|
+
|
|
119
|
+
compatibleWarning(property, enabled) {
|
|
120
|
+
if (!enabled) {
|
|
121
|
+
// Disabling a preference won't automatically turn on an incompatible one, so just set and exit
|
|
122
|
+
this.value[property].enabled = false;
|
|
123
|
+
|
|
124
|
+
return;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
// We're enabling a preference. Are there any incomaptible preferences?
|
|
128
|
+
if ((incompatible[property] || []).every(p => !this.value[p].enabled)) {
|
|
129
|
+
// No, just set and exit
|
|
130
|
+
this.value[property].enabled = true;
|
|
131
|
+
|
|
132
|
+
return;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
// Incompatible preferences found, so confirm with user before applying
|
|
136
|
+
this.$store.dispatch('cluster/promptModal', {
|
|
137
|
+
component: 'GenericPrompt',
|
|
138
|
+
componentProps: {
|
|
139
|
+
applyMode: 'enable',
|
|
140
|
+
applyAction: (buttonDone) => {
|
|
141
|
+
this.value[property].enabled = true;
|
|
142
|
+
(incompatible[property] || []).forEach((incompatible) => {
|
|
143
|
+
this.value[incompatible].enabled = false;
|
|
144
|
+
});
|
|
145
|
+
buttonDone(true);
|
|
146
|
+
},
|
|
147
|
+
title: this.t('promptRemove.title', {}, true),
|
|
148
|
+
body: this.t(`performance.${ l10n[property] }.incompatibleDescription`, {}, true),
|
|
149
|
+
},
|
|
150
|
+
});
|
|
105
151
|
}
|
|
106
|
-
}
|
|
152
|
+
},
|
|
107
153
|
};
|
|
108
154
|
</script>
|
|
109
155
|
<template>
|
|
@@ -159,11 +205,12 @@ export default {
|
|
|
159
205
|
<h2>{{ t('performance.incrementalLoad.label') }}</h2>
|
|
160
206
|
<p>{{ t('performance.incrementalLoad.description') }}</p>
|
|
161
207
|
<Checkbox
|
|
162
|
-
|
|
208
|
+
:value="value.incrementalLoading.enabled"
|
|
163
209
|
:mode="mode"
|
|
164
210
|
:label="t('performance.incrementalLoad.checkboxLabel')"
|
|
165
211
|
class="mt-10 mb-20"
|
|
166
212
|
:primary="true"
|
|
213
|
+
@input="compatibleWarning('incrementalLoading', $event)"
|
|
167
214
|
/>
|
|
168
215
|
<div class="ml-20">
|
|
169
216
|
<p :class="{ 'text-muted': !value.incrementalLoading.enabled }">
|
|
@@ -189,11 +236,12 @@ export default {
|
|
|
189
236
|
label-key="performance.experimental"
|
|
190
237
|
/>
|
|
191
238
|
<Checkbox
|
|
192
|
-
|
|
239
|
+
:value="value.manualRefresh.enabled"
|
|
193
240
|
:mode="mode"
|
|
194
241
|
:label="t('performance.manualRefresh.checkboxLabel')"
|
|
195
242
|
class="mt-10 mb-20"
|
|
196
243
|
:primary="true"
|
|
244
|
+
@input="compatibleWarning('manualRefresh', $event)"
|
|
197
245
|
/>
|
|
198
246
|
<div class="ml-20">
|
|
199
247
|
<p :class="{ 'text-muted': !value.manualRefresh.enabled }">
|
|
@@ -299,26 +347,13 @@ export default {
|
|
|
299
347
|
label-key="performance.experimental"
|
|
300
348
|
/>
|
|
301
349
|
<Checkbox
|
|
302
|
-
|
|
350
|
+
:value="value.forceNsFilterV2.enabled"
|
|
303
351
|
:mode="mode"
|
|
304
352
|
:label="t('performance.nsFiltering.checkboxLabel')"
|
|
305
353
|
class="mt-10 mb-20"
|
|
306
354
|
:primary="true"
|
|
355
|
+
@input="compatibleWarning('forceNsFilterV2', $event)"
|
|
307
356
|
/>
|
|
308
|
-
<div class="ml-20">
|
|
309
|
-
<p :class="{ 'text-muted': !value.forceNsFilter.enabled }">
|
|
310
|
-
{{ t('performance.nsFiltering.count.description') }}
|
|
311
|
-
</p>
|
|
312
|
-
<LabeledInput
|
|
313
|
-
v-model="value.forceNsFilter.threshold"
|
|
314
|
-
:mode="mode"
|
|
315
|
-
:label="t('performance.nsFiltering.count.inputLabel')"
|
|
316
|
-
:disabled="!value.forceNsFilter.enabled"
|
|
317
|
-
class="input"
|
|
318
|
-
type="number"
|
|
319
|
-
min="0"
|
|
320
|
-
/>
|
|
321
|
-
</div>
|
|
322
357
|
</div>
|
|
323
358
|
<!-- Advanced Websocket Worker -->
|
|
324
359
|
<div class="mt-40">
|
|
@@ -206,7 +206,7 @@ export default {
|
|
|
206
206
|
:key="v.version"
|
|
207
207
|
>
|
|
208
208
|
<a
|
|
209
|
-
v-tooltip="v.requiredUiVersion ? t('plugins.info.requiresVersion', { version: v.requiredUiVersion }) : ''"
|
|
209
|
+
v-clean-tooltip="v.requiredUiVersion ? t('plugins.info.requiresVersion', { version: v.requiredUiVersion }) : ''"
|
|
210
210
|
class="version-link"
|
|
211
211
|
:class="{'version-active': v.version === infoVersion, 'disabled': !v.isCompatibleWithUi}"
|
|
212
212
|
@click="loadPluginVersionInfo(v.version)"
|
|
@@ -400,6 +400,13 @@ export default {
|
|
|
400
400
|
},
|
|
401
401
|
|
|
402
402
|
methods: {
|
|
403
|
+
async refreshCharts() {
|
|
404
|
+
await this.$store.dispatch('catalog/load');
|
|
405
|
+
const c = this.$store.getters['catalog/rawCharts'];
|
|
406
|
+
|
|
407
|
+
this.charts = Object.values(c);
|
|
408
|
+
},
|
|
409
|
+
|
|
403
410
|
async updateInstallStatus() {
|
|
404
411
|
let hasService;
|
|
405
412
|
|
|
@@ -415,6 +422,10 @@ export default {
|
|
|
415
422
|
hasService = false;
|
|
416
423
|
}
|
|
417
424
|
|
|
425
|
+
if (hasService) {
|
|
426
|
+
this.refreshCharts();
|
|
427
|
+
}
|
|
428
|
+
|
|
418
429
|
Vue.set(this, 'hasService', hasService);
|
|
419
430
|
|
|
420
431
|
return hasService;
|
|
@@ -671,7 +682,7 @@ export default {
|
|
|
671
682
|
<span>{{ plugin.displayVersion }}</span>
|
|
672
683
|
<span
|
|
673
684
|
v-if="plugin.upgrade"
|
|
674
|
-
v-tooltip="t('plugins.upgradeAvailable')"
|
|
685
|
+
v-clean-tooltip="t('plugins.upgradeAvailable')"
|
|
675
686
|
> -> {{ plugin.upgrade }}</span>
|
|
676
687
|
<p
|
|
677
688
|
v-if="plugin.incompatibleDisclaimer"
|
|
@@ -694,13 +705,13 @@ export default {
|
|
|
694
705
|
>
|
|
695
706
|
<div
|
|
696
707
|
v-if="!plugin.certified"
|
|
697
|
-
v-tooltip="t('plugins.descriptions.third-party')"
|
|
708
|
+
v-clean-tooltip="t('plugins.descriptions.third-party')"
|
|
698
709
|
>
|
|
699
710
|
{{ t('plugins.labels.third-party') }}
|
|
700
711
|
</div>
|
|
701
712
|
<div
|
|
702
713
|
v-if="plugin.experimental"
|
|
703
|
-
v-tooltip="t('plugins.descriptions.experimental')"
|
|
714
|
+
v-clean-tooltip="t('plugins.descriptions.experimental')"
|
|
704
715
|
>
|
|
705
716
|
{{ t('plugins.labels.experimental') }}
|
|
706
717
|
</div>
|
|
@@ -710,7 +721,7 @@ export default {
|
|
|
710
721
|
<div class="plugin-actions">
|
|
711
722
|
<template v-if="plugin.error">
|
|
712
723
|
<div
|
|
713
|
-
v-tooltip="plugin.error"
|
|
724
|
+
v-clean-tooltip="plugin.error"
|
|
714
725
|
class="plugin-error"
|
|
715
726
|
>
|
|
716
727
|
<i class="icon icon-warning" />
|
|
@@ -719,7 +730,7 @@ export default {
|
|
|
719
730
|
<!-- plugin status -->
|
|
720
731
|
<div
|
|
721
732
|
v-if="plugin.helmError"
|
|
722
|
-
v-tooltip="t('plugins.helmError')"
|
|
733
|
+
v-clean-tooltip="t('plugins.helmError')"
|
|
723
734
|
class="plugin-error"
|
|
724
735
|
>
|
|
725
736
|
<i class="icon icon-warning" />
|
package/pages/home.vue
CHANGED
package/pages/prefs.vue
CHANGED
|
@@ -163,7 +163,9 @@ export default {
|
|
|
163
163
|
<h4 v-t="'prefs.language'" />
|
|
164
164
|
<div class="row">
|
|
165
165
|
<div class="col span-4">
|
|
166
|
-
<LocaleSelector
|
|
166
|
+
<LocaleSelector
|
|
167
|
+
data-testid="prefs__languageSelector"
|
|
168
|
+
/>
|
|
167
169
|
</div>
|
|
168
170
|
</div>
|
|
169
171
|
</div>
|
|
@@ -173,6 +175,7 @@ export default {
|
|
|
173
175
|
<h4 v-t="'prefs.theme.label'" />
|
|
174
176
|
<ButtonGroup
|
|
175
177
|
v-model="theme"
|
|
178
|
+
data-testid="prefs__themeOptions"
|
|
176
179
|
:options="themeOptions"
|
|
177
180
|
/>
|
|
178
181
|
<div class="mt-10">
|
|
@@ -190,7 +193,9 @@ export default {
|
|
|
190
193
|
>
|
|
191
194
|
<hr>
|
|
192
195
|
<h4 v-t="'prefs.landing.label'" />
|
|
193
|
-
<LandingPagePreference
|
|
196
|
+
<LandingPagePreference
|
|
197
|
+
data-testid="prefs__landingPagePreference"
|
|
198
|
+
/>
|
|
194
199
|
</div>
|
|
195
200
|
<!-- Display Settings -->
|
|
196
201
|
<div class="mt-10 mb-10">
|
|
@@ -203,6 +208,7 @@ export default {
|
|
|
203
208
|
<div class="col span-4">
|
|
204
209
|
<LabeledSelect
|
|
205
210
|
v-model="dateFormat"
|
|
211
|
+
data-testid="prefs__displaySetting__dateFormat"
|
|
206
212
|
:label="t('prefs.dateFormat.label')"
|
|
207
213
|
:options="dateOptions"
|
|
208
214
|
/>
|
|
@@ -210,6 +216,7 @@ export default {
|
|
|
210
216
|
<div class="col span-4">
|
|
211
217
|
<LabeledSelect
|
|
212
218
|
v-model="timeFormat"
|
|
219
|
+
data-testid="prefs__displaySetting__timeFormat"
|
|
213
220
|
:label="t('prefs.timeFormat.label')"
|
|
214
221
|
:options="timeOptions"
|
|
215
222
|
/>
|
|
@@ -220,6 +227,7 @@ export default {
|
|
|
220
227
|
<div class="col span-4">
|
|
221
228
|
<LabeledSelect
|
|
222
229
|
v-model.number="perPage"
|
|
230
|
+
data-testid="prefs__displaySetting__perPage"
|
|
223
231
|
:label="t('prefs.perPage.label')"
|
|
224
232
|
:options="perPageOptions"
|
|
225
233
|
option-key="value"
|
|
@@ -230,6 +238,7 @@ export default {
|
|
|
230
238
|
<div class="col span-4">
|
|
231
239
|
<LabeledSelect
|
|
232
240
|
v-model.number="menuMaxClusters"
|
|
241
|
+
data-testid="prefs__displaySetting__menuMaxClusters"
|
|
233
242
|
:label="t('prefs.clusterToShow.label')"
|
|
234
243
|
:options="menuClusterOptions"
|
|
235
244
|
option-key="value"
|
|
@@ -245,6 +254,7 @@ export default {
|
|
|
245
254
|
<h4 v-t="'prefs.confirmationSetting.title'" />
|
|
246
255
|
<Checkbox
|
|
247
256
|
v-model="scalingDownPrompt"
|
|
257
|
+
data-testid="prefs__scalingDownPrompt"
|
|
248
258
|
:label="t('prefs.confirmationSetting.scalingDownPrompt')"
|
|
249
259
|
class="mt-10"
|
|
250
260
|
/>
|
|
@@ -255,18 +265,21 @@ export default {
|
|
|
255
265
|
<h4 v-t="'prefs.advFeatures.title'" />
|
|
256
266
|
<Checkbox
|
|
257
267
|
v-model="viewInApi"
|
|
268
|
+
data-testid="prefs__viewInApi"
|
|
258
269
|
:label="t('prefs.advFeatures.viewInApi', {}, true)"
|
|
259
270
|
class="mt-10"
|
|
260
271
|
/>
|
|
261
272
|
<br>
|
|
262
273
|
<Checkbox
|
|
263
274
|
v-model="allNamespaces"
|
|
275
|
+
data-testid="prefs__allNamespaces"
|
|
264
276
|
:label="t('prefs.advFeatures.allNamespaces', {}, true)"
|
|
265
277
|
class="mt-20"
|
|
266
278
|
/>
|
|
267
279
|
<br>
|
|
268
280
|
<Checkbox
|
|
269
281
|
v-model="themeShortcut"
|
|
282
|
+
data-testid="prefs__themeShortcut"
|
|
270
283
|
:label="t('prefs.advFeatures.themeShortcut', {}, true)"
|
|
271
284
|
class="mt-20"
|
|
272
285
|
/>
|
|
@@ -274,6 +287,7 @@ export default {
|
|
|
274
287
|
<Checkbox
|
|
275
288
|
v-if="!isSingleProduct"
|
|
276
289
|
v-model="hideDescriptions"
|
|
290
|
+
data-testid="prefs__hideDescriptions"
|
|
277
291
|
:label="t('prefs.hideDesc.label')"
|
|
278
292
|
class="mt-20"
|
|
279
293
|
/>
|
|
@@ -292,6 +306,7 @@ export default {
|
|
|
292
306
|
<h4 v-t="'prefs.keymap.label'" />
|
|
293
307
|
<ButtonGroup
|
|
294
308
|
v-model="keymap"
|
|
309
|
+
data-testid="prefs__keymapOptions"
|
|
295
310
|
:options="keymapOptions"
|
|
296
311
|
/>
|
|
297
312
|
</div>
|
|
@@ -304,6 +319,7 @@ export default {
|
|
|
304
319
|
<h4 v-t="'prefs.helm.label'" />
|
|
305
320
|
<ButtonGroup
|
|
306
321
|
v-model="showPreRelease"
|
|
322
|
+
data-testid="prefs__helmOptions"
|
|
307
323
|
:options="helmOptions"
|
|
308
324
|
/>
|
|
309
325
|
</div>
|
|
@@ -17,7 +17,7 @@ const ALLOWED_TAGS = [
|
|
|
17
17
|
'strong',
|
|
18
18
|
];
|
|
19
19
|
|
|
20
|
-
const purifyHTML = value => DOMPurify.sanitize(value, { ALLOWED_TAGS });
|
|
20
|
+
export const purifyHTML = value => DOMPurify.sanitize(value, { ALLOWED_TAGS });
|
|
21
21
|
|
|
22
22
|
export const cleanHtmlDirective = {
|
|
23
23
|
inserted(el, binding) {
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import Vue from 'vue';
|
|
2
|
+
import { VTooltip } from 'v-tooltip';
|
|
3
|
+
import { purifyHTML } from './clean-html-directive';
|
|
4
|
+
|
|
5
|
+
function purifyContent(value) {
|
|
6
|
+
const type = typeof value;
|
|
7
|
+
|
|
8
|
+
if (type === 'string') {
|
|
9
|
+
return purifyHTML(value);
|
|
10
|
+
} else if (value && type === 'object' && typeof value.content === 'string') {
|
|
11
|
+
return { ...value, content: purifyHTML(value.content) };
|
|
12
|
+
} else {
|
|
13
|
+
return value;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
function bind(el, { value, oldValue, modifiers }) {
|
|
18
|
+
const purifiedValue = purifyContent(value);
|
|
19
|
+
|
|
20
|
+
VTooltip.bind(
|
|
21
|
+
el,
|
|
22
|
+
{
|
|
23
|
+
value: purifiedValue, oldValue, modifiers
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
const VCleanTooltip = {
|
|
28
|
+
...VTooltip,
|
|
29
|
+
bind,
|
|
30
|
+
update: bind,
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
Vue.directive('clean-tooltip', VCleanTooltip);
|