@rancher/shell 0.3.11 → 0.3.13

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.
Files changed (95) hide show
  1. package/assets/translations/en-us.yaml +51 -5
  2. package/chart/monitoring/StorageClassSelector.vue +1 -0
  3. package/chart/monitoring/index.vue +4 -0
  4. package/chart/monitoring/prometheus/index.vue +6 -3
  5. package/components/ActionMenu.vue +1 -1
  6. package/components/DetailTop.vue +0 -2
  7. package/components/ExplorerMembers.vue +22 -10
  8. package/components/ExplorerProjectsNamespaces.vue +1 -0
  9. package/components/GrafanaDashboard.vue +2 -2
  10. package/components/Inactivity.vue +1 -0
  11. package/components/ModalWithCard.vue +1 -0
  12. package/components/Tabbed/index.vue +2 -0
  13. package/components/Wizard.vue +4 -3
  14. package/components/form/KeyValue.vue +12 -7
  15. package/components/form/NodeAffinity.vue +29 -7
  16. package/components/form/PodAffinity.vue +27 -7
  17. package/components/form/Taints.vue +6 -0
  18. package/components/formatter/ExtensionCache.vue +74 -0
  19. package/components/nav/Header.vue +1 -0
  20. package/components/nav/WindowManager/ContainerShell.vue +10 -0
  21. package/components/nav/WindowManager/index.vue +1 -0
  22. package/config/product/explorer.js +1 -10
  23. package/config/product/monitoring.js +2 -1
  24. package/config/router.js +3 -3
  25. package/config/table-headers.js +32 -24
  26. package/config/uiplugins.js +11 -0
  27. package/config/workload.ts +1 -0
  28. package/core/types.ts +25 -7
  29. package/creators/pkg/files/.github/workflows/build-container.yml +64 -0
  30. package/creators/pkg/init +13 -6
  31. package/detail/node.vue +2 -2
  32. package/detail/workload/index.vue +1 -1
  33. package/edit/__tests__/management.cattle.io.setting.test.ts +1 -1
  34. package/edit/__tests__/namespace.test.ts +46 -0
  35. package/edit/autoscaling.horizontalpodautoscaler/metric-target.vue +0 -2
  36. package/edit/logging.banzaicloud.io.output/__tests__/logging.banzaicloud.io.output.test.ts +43 -0
  37. package/edit/logging.banzaicloud.io.output/index.vue +8 -5
  38. package/edit/logging.banzaicloud.io.output/providers/__tests__/loki.test.ts +13 -0
  39. package/edit/logging.banzaicloud.io.output/providers/loki.vue +1 -0
  40. package/edit/monitoring.coreos.com.alertmanagerconfig/receiverConfig.vue +0 -2
  41. package/edit/monitoring.coreos.com.receiver/index.vue +32 -1
  42. package/edit/monitoring.coreos.com.receiver/types/email.vue +12 -4
  43. package/edit/namespace.vue +2 -1
  44. package/edit/provisioning.cattle.io.cluster/MachinePool.vue +36 -6
  45. package/edit/provisioning.cattle.io.cluster/__tests__/rke2.test.ts +2 -2
  46. package/edit/provisioning.cattle.io.cluster/rke2.vue +58 -13
  47. package/middleware/authenticated.js +1 -0
  48. package/models/__tests__/batch.cronjob.test.ts +88 -0
  49. package/models/cluster/node.js +8 -0
  50. package/models/management.cattle.io.clusterroletemplatebinding.js +5 -1
  51. package/models/projectroletemplatebinding.js +9 -1
  52. package/models/workload.js +1 -1
  53. package/package.json +1 -1
  54. package/pages/__tests__/prefs.test.ts +96 -0
  55. package/pages/auth/setup.vue +13 -13
  56. package/pages/c/_cluster/apps/charts/chart.vue +1 -1
  57. package/pages/c/_cluster/apps/charts/install.vue +5 -2
  58. package/pages/c/_cluster/monitoring/index.vue +10 -5
  59. package/pages/c/_cluster/settings/performance.vue +2 -0
  60. package/pages/c/_cluster/uiplugins/CatalogList/CatalogLoadDialog.vue +601 -0
  61. package/pages/c/_cluster/uiplugins/CatalogList/index.vue +183 -0
  62. package/pages/c/_cluster/uiplugins/UninstallDialog.vue +50 -9
  63. package/pages/c/_cluster/uiplugins/index.vue +329 -224
  64. package/pages/fail-whale.vue +1 -1
  65. package/pages/home.vue +11 -0
  66. package/pages/prefs.vue +20 -1
  67. package/plugins/plugin.js +1 -1
  68. package/public/index.html +6 -1
  69. package/rancher-components/components/Card/Card.vue +1 -0
  70. package/rancher-components/components/Form/Radio/RadioGroup.vue +1 -0
  71. package/scripts/extension/bundle +20 -4
  72. package/scripts/extension/helm/charts/ui-plugin-server/.helmignore +23 -0
  73. package/scripts/extension/helm/charts/ui-plugin-server/Chart.yaml +20 -0
  74. package/scripts/extension/helm/charts/ui-plugin-server/templates/_helpers.tpl +52 -0
  75. package/scripts/extension/helm/charts/ui-plugin-server/templates/cr.yaml +12 -0
  76. package/scripts/extension/helm/charts/ui-plugin-server/values.yaml +6 -0
  77. package/scripts/extension/helm/package/Dockerfile +27 -0
  78. package/scripts/extension/helm/package/nginx.conf +17 -0
  79. package/scripts/extension/helm/scripts/package +23 -0
  80. package/scripts/extension/helm/scripts/patch +101 -0
  81. package/scripts/extension/helm/scripts/version +31 -0
  82. package/scripts/extension/helmpatch +3 -25
  83. package/scripts/extension/publish +50 -33
  84. package/types/shell/index.d.ts +39 -33
  85. package/utils/__tests__/grafana.test.ts +2 -2
  86. package/utils/error.js +11 -0
  87. package/utils/grafana.js +5 -4
  88. package/vue.config.js +3 -17
  89. package/components/.DS_Store +0 -0
  90. package/components/__tests__/.DS_Store +0 -0
  91. package/creators/pkg/package-lock.json +0 -37
  92. package/rancher-components/StringList/StringList.test.ts +0 -80
  93. package/rancher-components/StringList/StringList.vue +0 -593
  94. package/rancher-components/StringList/index.ts +0 -1
  95. package/yarn-error.log +0 -196
@@ -116,7 +116,6 @@ export default {
116
116
  <Loading v-if="$fetchState.pending" />
117
117
  <div v-else>
118
118
  <TypeDescription resource="chart" />
119
-
120
119
  <div
121
120
  v-if="chart"
122
121
  class="chart-header"
@@ -139,6 +138,7 @@ export default {
139
138
  <button
140
139
  v-if="!requires.length"
141
140
  type="button"
141
+ data-testid="btn-chart-install"
142
142
  class="btn role-primary"
143
143
  @click.prevent="install"
144
144
  >
@@ -1120,6 +1120,7 @@ export default {
1120
1120
  Refer to the developer docs at docs/developer/helm-chart-apps.md
1121
1121
  for details on what values are injected and where they come from.
1122
1122
  */
1123
+
1123
1124
  this.addGlobalValuesTo(values);
1124
1125
 
1125
1126
  const form = JSON.parse(JSON.stringify(this.value));
@@ -1510,6 +1511,7 @@ export default {
1510
1511
  <div class="step__values__controls">
1511
1512
  <ButtonGroup
1512
1513
  v-model="preFormYamlOption"
1514
+ data-testid="btn-group-options-view"
1513
1515
  :options="formYamlOptions"
1514
1516
  inactive-class="bg-disabled btn-sm"
1515
1517
  active-class="bg-primary btn-sm"
@@ -1979,7 +1981,7 @@ export default {
1979
1981
  display: flex;
1980
1982
  flex-direction: column;
1981
1983
  padding: 0;
1982
- height: calc(100% - 112px);
1984
+ overflow: auto;
1983
1985
  }
1984
1986
 
1985
1987
  .header {
@@ -2052,10 +2054,11 @@ export default {
2052
2054
  }
2053
2055
 
2054
2056
  .os-label {
2055
- position: absolute;
2057
+ position: relative;
2056
2058
  background-color: var(--warning-banner-bg);
2057
2059
  color:var(--warning);
2058
2060
  margin-top: 5px;
2061
+ top: 21px;
2059
2062
  }
2060
2063
 
2061
2064
  </style>
@@ -4,10 +4,10 @@ import isEmpty from 'lodash/isEmpty';
4
4
  import InstallRedirect from '@shell/utils/install-redirect';
5
5
  import AlertTable from '@shell/components/AlertTable';
6
6
  import { NAME, CHART_NAME } from '@shell/config/product/monitoring';
7
- import { ENDPOINTS, MONITORING } from '@shell/config/types';
7
+ import { CATALOG, ENDPOINTS, MONITORING } from '@shell/config/types';
8
8
  import { allHash } from '@shell/utils/promise';
9
9
  import { findBy } from '@shell/utils/array';
10
-
10
+ import { getClusterPrefix } from '@shell/utils/grafana';
11
11
  import { Banner } from '@components/Banner';
12
12
  import LazyImage from '@shell/components/LazyImage';
13
13
  import SimpleBox from '@shell/components/SimpleBox';
@@ -58,7 +58,7 @@ export default {
58
58
  iconSrc: grafanaSrc,
59
59
  label: 'monitoring.overview.linkedList.grafana.label',
60
60
  description: 'monitoring.overview.linkedList.grafana.description',
61
- link: `/k8s/clusters/${ currentCluster.id }/api/v1/namespaces/cattle-monitoring-system/services/http:rancher-monitoring-grafana:80/proxy`,
61
+ link: '',
62
62
  },
63
63
  {
64
64
  enabled: false,
@@ -94,10 +94,13 @@ export default {
94
94
  methods: {
95
95
  async fetchDeps() {
96
96
  const { $store, externalLinks } = this;
97
+ const currentCluster = this.$store.getters['currentCluster'];
97
98
 
98
99
  this.v1Installed = await haveV1MonitoringWorkloads($store);
99
-
100
- const hash = await allHash({ endpoints: $store.dispatch('cluster/findAll', { type: ENDPOINTS }) });
100
+ const hash = await allHash({
101
+ endpoints: $store.dispatch('cluster/findAll', { type: ENDPOINTS }),
102
+ app: $store.dispatch(`cluster/find`, { type: CATALOG.APP, id: 'cattle-monitoring-system/rancher-monitoring' })
103
+ });
101
104
 
102
105
  if (!isEmpty(hash.endpoints)) {
103
106
  const amMatch = findBy(externalLinks, 'group', 'alertmanager');
@@ -105,6 +108,8 @@ export default {
105
108
  const promeMatch = externalLinks.filter(
106
109
  el => el.group === 'prometheus'
107
110
  );
111
+
112
+ grafanaMatch.link = `${ getClusterPrefix(hash.app?.currentVersion || '', currentCluster.id) }/api/v1/namespaces/cattle-monitoring-system/services/http:rancher-monitoring-grafana:80/proxy/`;
108
113
  const alertmanager = findBy(
109
114
  hash.endpoints,
110
115
  'id',
@@ -174,6 +174,7 @@ export default {
174
174
  <div class="ml-20">
175
175
  <LabeledInput
176
176
  v-model="value.inactivity.threshold"
177
+ data-testid="inactivity-threshold"
177
178
  :mode="mode"
178
179
  :label="t('performance.inactivity.inputLabel')"
179
180
  :disabled="!value.inactivity.enabled"
@@ -382,6 +383,7 @@ export default {
382
383
  </template>
383
384
  <div v-if="mode === 'edit'">
384
385
  <AsyncButton
386
+ data-testid="performance__save-btn"
385
387
  class="pull-right mt-20"
386
388
  mode="apply"
387
389
  :disabled="!canSave"