@rancher/shell 3.0.12-rc.5 → 3.0.12-rc.7

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 (116) hide show
  1. package/apis/intf/resources-api/resource-base.ts +42 -2
  2. package/apis/intf/resources-api/resource-instance.ts +101 -0
  3. package/apis/intf/resources-api/resources-api.ts +177 -23
  4. package/apis/intf/resources.ts +8 -6
  5. package/apis/intf/shell-api/slide-in.ts +46 -17
  6. package/apis/resources/__tests__/resources-api-class.test.ts +309 -28
  7. package/apis/resources/resources-api-class.ts +232 -43
  8. package/apis/shell/__tests__/slide-in.test.ts +83 -2
  9. package/apis/shell/slide-in.ts +20 -0
  10. package/assets/images/providers/traefik.png +0 -0
  11. package/assets/translations/en-us.yaml +10 -4
  12. package/chart/__tests__/rancher-monitoring-dashboards-index.test.ts +269 -0
  13. package/chart/rancher-monitoring-dashboards/index.vue +155 -0
  14. package/cloud-credential/__tests__/generic.test.ts +132 -0
  15. package/cloud-credential/generic.vue +33 -3
  16. package/components/EtcdInfoBanner.vue +2 -12
  17. package/components/ExplorerProjectsNamespaces.vue +2 -2
  18. package/components/GrafanaDashboard.vue +2 -8
  19. package/components/Resource/Detail/Masthead/__tests__/index.test.ts +68 -14
  20. package/components/Resource/Detail/Masthead/index.vue +8 -3
  21. package/components/Resource/Detail/Metadata/IdentifyingInformation/__tests__/identifying-fields.test.ts +9 -0
  22. package/components/Resource/Detail/Metadata/IdentifyingInformation/identifying-fields.ts +5 -1
  23. package/components/SlideInPanelManager.vue +103 -25
  24. package/components/__tests__/SlideInPanelManager.spec.ts +153 -10
  25. package/components/auth/AuthBanner.vue +1 -1
  26. package/components/form/Security.vue +1 -1
  27. package/components/formatter/Translate.vue +22 -1
  28. package/components/nav/Group.vue +5 -10
  29. package/components/nav/TopLevelMenu.vue +1 -30
  30. package/components/nav/__tests__/Group.test.ts +61 -0
  31. package/config/labels-annotations.js +1 -0
  32. package/config/table-headers.js +5 -2
  33. package/core/__tests__/plugin-products-apply.test.ts +787 -0
  34. package/core/__tests__/plugin-products-extend.test.ts +189 -0
  35. package/core/__tests__/plugin-products-helpers.test.ts +81 -78
  36. package/core/__tests__/plugin-products-new.test.ts +389 -0
  37. package/core/__tests__/plugin-products-scenarios.test.ts +980 -0
  38. package/core/__tests__/plugin-products-side-menu.test.ts +1935 -0
  39. package/core/plugin-products-base.ts +201 -93
  40. package/core/plugin-products-extending.ts +1 -1
  41. package/core/plugin-products-external.ts +380 -0
  42. package/core/plugin-products-helpers.ts +28 -24
  43. package/core/plugin-products-internal.ts +207 -0
  44. package/core/plugin-products-top-level.ts +10 -5
  45. package/core/plugin-products-type-guards.ts +17 -6
  46. package/core/plugin-products.ts +5 -7
  47. package/core/plugin-types.ts +1 -389
  48. package/core/plugin.ts +10 -11
  49. package/core/plugins-loader.js +2 -0
  50. package/core/types.ts +6 -202
  51. package/detail/__tests__/provisioning.cattle.io.cluster.test.ts +52 -0
  52. package/detail/pod.vue +1 -1
  53. package/detail/provisioning.cattle.io.cluster.vue +0 -2
  54. package/edit/auth/AuthProviderWarningBanners.vue +12 -0
  55. package/edit/auth/__tests__/AuthProviderWarningBanners.test.ts +10 -1
  56. package/edit/auth/__tests__/azuread.test.ts +1 -0
  57. package/edit/auth/__tests__/github.test.ts +1 -0
  58. package/edit/auth/__tests__/oidc.test.ts +1 -0
  59. package/edit/auth/__tests__/saml.test.ts +1 -0
  60. package/edit/auth/ldap/__tests__/index.test.ts +1 -0
  61. package/edit/provisioning.cattle.io.cluster/index.vue +1 -1
  62. package/edit/provisioning.cattle.io.cluster/rke2.vue +1 -1
  63. package/edit/provisioning.cattle.io.cluster/tabs/networking/index.vue +2 -2
  64. package/list/management.cattle.io.user.vue +24 -5
  65. package/list/utils/management.cattle.io.cluster.utils.ts +1 -1
  66. package/machine-config/__tests__/generic.test.ts +163 -0
  67. package/machine-config/components/EC2Networking.vue +31 -7
  68. package/machine-config/components/__tests__/EC2Networking.test.ts +38 -15
  69. package/machine-config/generic.vue +32 -5
  70. package/mixins/resource-fetch.js +1 -1
  71. package/models/__tests__/namespace.test.ts +133 -8
  72. package/models/__tests__/provisioning.cattle.io.cluster.test.ts +57 -1
  73. package/models/__tests__/rke-machine.cattle.io.vmwarevspheremachinetemplate.test.ts +22 -0
  74. package/models/namespace.js +34 -2
  75. package/models/pod.js +12 -10
  76. package/models/provisioning.cattle.io.cluster.js +20 -13
  77. package/models/rke-machine.cattle.io.vmwarevspheremachinetemplate.js +9 -0
  78. package/package.json +1 -1
  79. package/pages/auth/login.vue +1 -1
  80. package/pages/c/_cluster/apps/charts/__tests__/install.test.ts +110 -0
  81. package/pages/c/_cluster/apps/charts/install.vue +29 -0
  82. package/pages/c/_cluster/auth/config/index.vue +11 -4
  83. package/pages/c/_cluster/explorer/workload-dashboard/__tests__/composable.test.ts +136 -1
  84. package/pages/c/_cluster/explorer/workload-dashboard/composable.ts +69 -1
  85. package/pages/c/_cluster/fleet/index.vue +5 -9
  86. package/pages/c/_cluster/monitoring/index.vue +6 -1
  87. package/pkg/vue.config.js +4 -3
  88. package/plugins/codemirror.js +2 -0
  89. package/plugins/dashboard-store/resource-class.js +13 -9
  90. package/plugins/steve/__tests__/steve-class-resource-api.test.ts +147 -0
  91. package/plugins/steve/steve-class.js +43 -0
  92. package/plugins/steve/subscribe.js +11 -0
  93. package/rancher-components/Form/LabeledInput/LabeledInput.test.ts +115 -0
  94. package/rancher-components/Form/LabeledInput/LabeledInput.vue +83 -3
  95. package/store/__tests__/action-menu.test.ts +622 -0
  96. package/store/__tests__/auth.test.ts +18 -0
  97. package/store/__tests__/notifications.test.ts +466 -1
  98. package/store/__tests__/slideInPanel.test.ts +143 -43
  99. package/store/__tests__/ui-context.test.ts +255 -0
  100. package/store/__tests__/wm.test.ts +503 -0
  101. package/store/auth.js +11 -1
  102. package/store/aws.js +19 -4
  103. package/store/features.js +1 -0
  104. package/store/plugins.js +6 -0
  105. package/store/slideInPanel.ts +15 -3
  106. package/types/rancher/steve.api.ts +2 -2
  107. package/types/shell/index.d.ts +84 -2
  108. package/types/store/dashboard-store.types.ts +2 -2
  109. package/types/store/type-map.ts +262 -1
  110. package/utils/__tests__/fleet-appco.test.ts +23 -0
  111. package/utils/async.ts +2 -0
  112. package/utils/fleet-appco.ts +6 -1
  113. package/utils/grafana.js +2 -17
  114. package/utils/monitoring.js +38 -1
  115. package/utils/sort.js +1 -1
  116. package/core/__tests__/plugin-products.test.ts +0 -4694
@@ -384,14 +384,12 @@ export default {
384
384
  user-select: none;
385
385
  text-transform: none;
386
386
  font-size: 14px;
387
+ height: 100%;
388
+ padding: 8px 0 8px 16px;
389
+ display: inline-flex;
390
+ align-items: center;
387
391
  }
388
392
 
389
- > H6 {
390
- text-transform: none;
391
- height: 100%;
392
- padding: 8px 0 8px 16px;
393
- }
394
-
395
393
  > A {
396
394
  display: block;
397
395
  box-sizing:border-box;
@@ -403,10 +401,6 @@ export default {
403
401
  &:focus{
404
402
  outline:none;
405
403
  }
406
- > H6 {
407
- text-transform: none;
408
- padding: 8px 0 8px 16px;
409
- }
410
404
  }
411
405
  }
412
406
 
@@ -574,6 +568,7 @@ export default {
574
568
  padding-left: 24px;
575
569
  display: flex;
576
570
  justify-content: space-between;
571
+ align-items: center;
577
572
  }
578
573
 
579
574
  A:focus {
@@ -955,19 +955,6 @@ export default {
955
955
  <div
956
956
  class="footer"
957
957
  >
958
- <div
959
- v-if="canEditSettings"
960
- class="support"
961
- @click="hide()"
962
- >
963
- <router-link
964
- :to="{name: 'support'}"
965
- role="link"
966
- :aria-label="t('nav.ariaLabel.support')"
967
- >
968
- {{ t('nav.support', {hasSupport}) }}
969
- </router-link>
970
- </div>
971
958
  <div
972
959
  class="version"
973
960
  :class="{'version-small': largeAboutText}"
@@ -1574,10 +1561,6 @@ export default {
1574
1561
  margin: 20px 10px;
1575
1562
  width: 50px;
1576
1563
 
1577
- .support {
1578
- display: none;
1579
- }
1580
-
1581
1564
  .version{
1582
1565
  text-align: center;
1583
1566
 
@@ -1597,19 +1580,7 @@ export default {
1597
1580
  > * {
1598
1581
  flex: 1;
1599
1582
  color: var(--link);
1600
-
1601
- &:first-child {
1602
- text-align: left;
1603
- }
1604
- &:last-child {
1605
- text-align: right;
1606
- }
1607
- text-align: center;
1608
- }
1609
-
1610
- .support a:focus-visible {
1611
- @include focus-outline;
1612
- outline-offset: 4px;
1583
+ text-align: left;
1613
1584
  }
1614
1585
 
1615
1586
  .version {
@@ -64,4 +64,65 @@ describe('component: Group', () => {
64
64
 
65
65
  expect((wrapper.vm as any).hasActiveRoute()).toBe(true);
66
66
  });
67
+
68
+ describe('group header label', () => {
69
+ const mountGroup = (group: any) => shallowMount(Group as any, {
70
+ props: {
71
+ group, canCollapse: true, idPrefix: ''
72
+ },
73
+ global: {
74
+ stubs: { 'router-link': { template: '<a><slot /></a>' } },
75
+ mocks: {
76
+ $route: {
77
+ params: {}, path: '/test/route', fullPath: '/test/route', matched: []
78
+ },
79
+ $router: {
80
+ resolve: jest.fn().mockReturnValue({ path: '/test/route', fullPath: '/test/route' }),
81
+ getRoutes: jest.fn().mockReturnValue([])
82
+ },
83
+ t: (key: string) => key
84
+ }
85
+ }
86
+ });
87
+
88
+ it('renders the label in an h6 for a non-linked group header', () => {
89
+ const group = {
90
+ name: 'test',
91
+ label: 'My Group',
92
+ children: [
93
+ { route: { name: 'child-route', params: {} } }
94
+ ]
95
+ };
96
+
97
+ const wrapper = mountGroup(group);
98
+ const header = wrapper.find('.header');
99
+ const h6 = header.find('h6');
100
+
101
+ // Non-linked header: the label sits in a bare h6, not wrapped in a router-link
102
+ expect(header.find('a').exists()).toBe(false);
103
+ expect(h6.exists()).toBe(true);
104
+ expect(h6.find('span').html()).toContain('My Group');
105
+ });
106
+
107
+ it('renders the label in an h6 wrapped in a router-link for a group header with overview', () => {
108
+ const group = {
109
+ name: 'test',
110
+ label: 'My Group',
111
+ children: [
112
+ {
113
+ route: { name: 'overview-route' }, overview: true, exact: true
114
+ }
115
+ ]
116
+ };
117
+
118
+ const wrapper = mountGroup(group);
119
+ const link = wrapper.find('.header a');
120
+ const h6 = link.find('h6');
121
+
122
+ // Linked header: the same h6 label markup is wrapped in a router-link
123
+ expect(link.exists()).toBe(true);
124
+ expect(h6.exists()).toBe(true);
125
+ expect(h6.find('span').html()).toContain('My Group');
126
+ });
127
+ });
67
128
  });
@@ -20,6 +20,7 @@ export const IMPORTED_CLUSTER_VERSION_MANAGEMENT = 'rancher.io/imported-cluster-
20
20
  export const UI_PROJECT_SECRET = 'management.cattle.io/project-scoped-secret';
21
21
  export const UI_PROJECT_SECRET_COPY = 'management.cattle.io/project-scoped-secret-copy';
22
22
  export const SERVICE_LINKS = 'ui.rancher/service-links';
23
+ export const NODE_DRIVER_FIELD_HINTS = 'io.cattle.nodedriver/ui-field-hints';
23
24
 
24
25
  export const KUBERNETES = {
25
26
  SERVICE_ACCOUNT_UID: 'kubernetes.io/service-account.uid',
@@ -1072,11 +1072,14 @@ export const ROLE = {
1072
1072
  export const FEATURE_DESCRIPTION = {
1073
1073
  name: 'description',
1074
1074
  labelKey: 'tableHeaders.description',
1075
- value: 'status.description',
1075
+ value: 'id',
1076
1076
  align: 'left',
1077
1077
  sort: ['status.description'],
1078
1078
  formatter: 'Translate',
1079
- formatterOpts: { prefix: 'featureFlags.description' },
1079
+ formatterOpts: {
1080
+ prefix: 'featureFlags.description',
1081
+ fallbackPath: 'status.description'
1082
+ },
1080
1083
  };
1081
1084
 
1082
1085
  export const STATE_NORMAN = {