@rancher/shell 3.0.1-rc.4 → 3.0.2-rc.1

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 (131) hide show
  1. package/assets/data/aws-regions.json +1 -0
  2. package/assets/styles/base/_basic.scss +22 -5
  3. package/assets/styles/base/_mixins.scss +10 -1
  4. package/assets/styles/global/_button.scss +15 -0
  5. package/assets/styles/global/_form.scss +2 -2
  6. package/assets/styles/themes/_dark.scss +2 -0
  7. package/assets/styles/themes/_light.scss +2 -0
  8. package/assets/translations/en-us.yaml +60 -16
  9. package/assets/translations/zh-hans.yaml +2 -2
  10. package/chart/monitoring/StorageClassSelector.vue +1 -1
  11. package/components/ActionMenu.vue +8 -0
  12. package/components/AssignTo.vue +1 -0
  13. package/components/AsyncButton.vue +9 -2
  14. package/components/BackLink.vue +8 -2
  15. package/components/BannerGraphic.vue +10 -0
  16. package/components/ButtonGroup.vue +2 -0
  17. package/components/ButtonMultiAction.vue +6 -0
  18. package/components/ClusterIconMenu.vue +1 -1
  19. package/components/CodeMirror.vue +28 -1
  20. package/components/CommunityLinks.vue +13 -0
  21. package/components/CruResource.vue +6 -0
  22. package/components/GrowlManager.vue +14 -4
  23. package/components/LocaleSelector.vue +49 -5
  24. package/components/PaginatedResourceTable.vue +136 -0
  25. package/components/ResourceDetail/Masthead.vue +11 -4
  26. package/components/ResourceList/index.vue +5 -4
  27. package/components/ResourceTable.vue +7 -2
  28. package/components/SortableTable/THead.vue +19 -4
  29. package/components/SortableTable/index.vue +21 -15
  30. package/components/SortableTable/selection.js +19 -5
  31. package/components/Tabbed/index.vue +35 -2
  32. package/components/YamlEditor.vue +2 -1
  33. package/components/auth/SelectPrincipal.vue +1 -1
  34. package/components/fleet/FleetBundles.vue +2 -1
  35. package/components/form/LabeledSelect.vue +20 -7
  36. package/components/form/NodeScheduling.vue +5 -1
  37. package/components/form/Password.vue +23 -13
  38. package/components/form/ResourceLabeledSelect.vue +3 -3
  39. package/components/form/ResourceTabs/index.vue +0 -23
  40. package/components/form/Select.vue +28 -6
  41. package/components/form/SelectOrCreateAuthSecret.vue +39 -11
  42. package/components/form/Taints.vue +1 -1
  43. package/components/form/__tests__/NodeScheduling.test.ts +44 -0
  44. package/components/formatter/Endpoints.vue +1 -1
  45. package/components/formatter/LiveExpiryDate.vue +5 -1
  46. package/components/formatter/ServiceTargets.vue +1 -1
  47. package/components/formatter/ServiceType.vue +19 -17
  48. package/components/nav/Pinned.vue +6 -1
  49. package/components/nav/TopLevelMenu.helper.ts +562 -0
  50. package/components/nav/TopLevelMenu.vue +268 -168
  51. package/components/nav/__tests__/TopLevelMenu.test.ts +338 -326
  52. package/config/pagination-table-headers.js +13 -5
  53. package/config/product/apps.js +63 -30
  54. package/config/product/explorer.js +184 -17
  55. package/config/product/settings.js +9 -1
  56. package/config/router/routes.js +1 -2
  57. package/config/settings.ts +32 -2
  58. package/config/table-headers.js +23 -15
  59. package/config/types.js +2 -1
  60. package/core/plugin.ts +8 -1
  61. package/core/types-provisioning.ts +5 -0
  62. package/core/types.ts +26 -1
  63. package/dialog/DrainNode.vue +6 -6
  64. package/edit/__tests__/fleet.cattle.io.gitrepo.test.ts +12 -3
  65. package/edit/catalog.cattle.io.clusterrepo.vue +95 -52
  66. package/edit/fleet.cattle.io.gitrepo.vue +40 -33
  67. package/edit/provisioning.cattle.io.cluster/index.vue +8 -3
  68. package/edit/provisioning.cattle.io.cluster/rke2.vue +13 -2
  69. package/edit/provisioning.cattle.io.cluster/tabs/AddOnConfig.vue +10 -2
  70. package/edit/provisioning.cattle.io.cluster/tabs/registries/RegistryConfigs.vue +8 -2
  71. package/edit/provisioning.cattle.io.cluster/tabs/registries/__tests__/RegistryConfigs.test.ts +6 -3
  72. package/edit/workload/mixins/workload.js +15 -7
  73. package/list/catalog.cattle.io.app.vue +4 -11
  74. package/list/catalog.cattle.io.clusterrepo.vue +59 -25
  75. package/list/fleet.cattle.io.bundle.vue +2 -2
  76. package/list/management.cattle.io.feature.vue +12 -5
  77. package/list/management.cattle.io.setting.vue +30 -19
  78. package/list/namespace.vue +4 -1
  79. package/list/networking.k8s.io.ingress.vue +14 -11
  80. package/list/node.vue +72 -67
  81. package/list/persistentvolume.vue +55 -20
  82. package/list/persistentvolumeclaim.vue +3 -15
  83. package/list/service.vue +16 -21
  84. package/list/workload.vue +35 -49
  85. package/mixins/resource-fetch-api-pagination.js +40 -5
  86. package/mixins/resource-fetch.js +56 -6
  87. package/mixins/vue-select-overrides.js +10 -16
  88. package/models/management.cattle.io.cluster.js +6 -1
  89. package/models/management.cattle.io.nodepool.js +5 -4
  90. package/models/persistentvolume.js +1 -3
  91. package/models/provisioning.cattle.io.cluster.js +2 -10
  92. package/models/storage.k8s.io.storageclass.js +4 -0
  93. package/package.json +32 -33
  94. package/pages/about.vue +22 -0
  95. package/pages/c/_cluster/explorer/EventsTable.vue +58 -16
  96. package/pages/c/_cluster/explorer/__tests__/index.test.ts +36 -24
  97. package/pages/c/_cluster/explorer/index.vue +103 -75
  98. package/pages/c/_cluster/settings/performance.vue +49 -23
  99. package/pages/home.vue +331 -125
  100. package/pages/support/index.vue +1 -1
  101. package/plugins/dashboard-store/__tests__/mutations.test.ts +2 -0
  102. package/plugins/dashboard-store/actions.js +29 -19
  103. package/plugins/dashboard-store/getters.js +5 -2
  104. package/plugins/dashboard-store/mutations.js +4 -2
  105. package/plugins/floating-vue.js +1 -1
  106. package/plugins/steve/__tests__/mutations.test.ts +2 -1
  107. package/plugins/steve/steve-pagination-utils.ts +107 -14
  108. package/plugins/steve/subscribe.js +22 -8
  109. package/rancher-components/Banner/Banner.vue +12 -0
  110. package/rancher-components/Form/Checkbox/Checkbox.vue +27 -5
  111. package/rancher-components/Form/Radio/RadioButton.vue +0 -6
  112. package/rancher-components/Form/Radio/RadioGroup.vue +5 -1
  113. package/scripts/.gitlab/workflows/build-extension-catalog.gitlab-ci.yml +2 -2
  114. package/scripts/extension/parse-tag-name +2 -0
  115. package/scripts/test-plugins-build.sh +21 -5
  116. package/scripts/typegen.sh +1 -0
  117. package/store/index.js +47 -9
  118. package/store/type-map.utils.ts +14 -1
  119. package/tsconfig.json +7 -1
  120. package/types/resources/settings.d.ts +1 -1
  121. package/types/shell/index.d.ts +1403 -1523
  122. package/types/store/dashboard-store.types.ts +4 -0
  123. package/types/store/pagination.types.ts +13 -0
  124. package/types/store/vuex.d.ts +9 -1
  125. package/types/vue-shim.d.ts +3 -34
  126. package/utils/cluster.js +92 -1
  127. package/utils/pagination-utils.ts +17 -8
  128. package/utils/pagination-wrapper.ts +70 -0
  129. package/utils/string.js +6 -0
  130. package/utils/uiplugins.ts +18 -4
  131. package/vue.config.js +3 -4
@@ -10,6 +10,7 @@
10
10
  "ap-southeast-2",
11
11
  "ap-southeast-3",
12
12
  "ap-southeast-4",
13
+ "ap-southeast-5",
13
14
  "ca-central-1",
14
15
  "ca-west-1",
15
16
  "cn-north-1",
@@ -62,12 +62,24 @@ INPUT,
62
62
  SELECT,
63
63
  TEXTAREA,
64
64
  .labeled-input,
65
- .labeled-select,
66
- .unlabeled-select,
67
- .checkbox-custom,
68
- .radio-custom {
65
+ .checkbox-custom {
69
66
  &:focus, &.focused {
70
- @include form-focus
67
+ @include form-focus;
68
+ }
69
+ }
70
+
71
+ .radio-custom,
72
+ .labeled-select,
73
+ .unlabeled-select {
74
+ &:focus-visible, &.focused {
75
+ @include focus-outline;
76
+ }
77
+ }
78
+
79
+ .labeled-select,
80
+ .unlabeled-select {
81
+ &.focused {
82
+ border-color: var(--outline);
71
83
  }
72
84
  }
73
85
 
@@ -89,6 +101,11 @@ A {
89
101
  text-decoration: underline;
90
102
  color: var(--body-text);
91
103
  }
104
+
105
+ &:focus-visible {
106
+ @include focus-outline;
107
+ outline-offset: 2px;
108
+ }
92
109
  }
93
110
 
94
111
  HR {
@@ -147,8 +147,17 @@
147
147
  }
148
148
  }
149
149
 
150
+ // -------------------------------------------------------------------------------------------------
151
+ // Focus styles
152
+
150
153
  @mixin form-focus {
151
154
  // Focus for form like elements (not to be confused with basic :focus style)
152
155
  outline: none;
153
156
  border-color: var(--outline);
154
- }
157
+ }
158
+
159
+ @mixin focus-outline {
160
+ // Focus for form like elements (not to be confused with basic :focus style)
161
+ // we need to use !important because it needs to superseed other classes that might impact outlines
162
+ outline: 2px solid var(--primary-keyboard-focus);
163
+ }
@@ -77,6 +77,11 @@ button,
77
77
  background-color: var(--primary-hover-bg);
78
78
  color: var(--primary-text);
79
79
  }
80
+
81
+ &:focus-visible {
82
+ @include focus-outline;
83
+ outline-offset: 2px;
84
+ }
80
85
  }
81
86
 
82
87
  .role-secondary {
@@ -101,6 +106,11 @@ button,
101
106
  border: 0;
102
107
  }
103
108
  }
109
+
110
+ &:focus-visible {
111
+ @include focus-outline;
112
+ outline-offset: 2px;
113
+ }
104
114
  }
105
115
 
106
116
  .role-tertiary {
@@ -175,6 +185,11 @@ fieldset[disabled] .btn {
175
185
  z-index: 1;
176
186
  }
177
187
 
188
+ &:focus-visible {
189
+ z-index: 1;
190
+ @include focus-outline;
191
+ }
192
+
178
193
  &.active {
179
194
  @extend .bg-primary;
180
195
  }
@@ -27,8 +27,8 @@ TEXTAREA,
27
27
 
28
28
  @include input-status-color;
29
29
 
30
- &:focus, &.focused {
31
- @include form-focus
30
+ &:focus:not(.unlabeled-select):not(.labeled-select), &.focused:not(.unlabeled-select):not(.labeled-select) {
31
+ @include form-focus;
32
32
  }
33
33
 
34
34
  LABEL {
@@ -21,6 +21,7 @@
21
21
 
22
22
  // dark main text
23
23
  $lightest: #ffffff;
24
+ $keyboard-focus: #00ddff;
24
25
 
25
26
  // menu cluster description active+hover
26
27
  $desc-light: #EEEFF4;
@@ -45,6 +46,7 @@
45
46
  --default-light-bg : #{rgba($dark, 0.05)};
46
47
  --slider-light-bg : #{rgba($darker, 1)};
47
48
  --slider-light-bg-right : #{rgba($darker, 0)};
49
+ --primary-keyboard-focus : #{$keyboard-focus};
48
50
 
49
51
  --muted : #{$disabled};
50
52
 
@@ -26,6 +26,7 @@ $disabled : $medium;
26
26
  $primary : #3D98D3;
27
27
  $secondary : $darker;
28
28
  $link : #3D98D3;
29
+ $keyboard-focus : #3300ff;
29
30
 
30
31
  // Status colors
31
32
  $success : #5D995D;
@@ -53,6 +54,7 @@ BODY, .theme-light {
53
54
  --primary-border : #{$primary};
54
55
  --primary-banner-bg : #{rgba($primary, 0.15)};
55
56
  --primary-light-bg : #{rgba($primary, 0.05)};
57
+ --primary-keyboard-focus : #{$keyboard-focus};
56
58
 
57
59
 
58
60
  .text-primary {
@@ -4,6 +4,7 @@
4
4
  generic:
5
5
  add: Add
6
6
  all: All
7
+ ascending: ascending
7
8
  and: ' and '
8
9
  back: Back
9
10
  cancel: Cancel
@@ -19,6 +20,7 @@ generic:
19
20
  customize: Customize
20
21
  dashboard: Dashboard
21
22
  default: Default
23
+ descending: descending
22
24
  disabled: Disabled
23
25
  done: Done
24
26
  enabled: Enabled
@@ -115,11 +117,27 @@ generic:
115
117
  basic: Basic
116
118
 
117
119
  locale:
120
+ menu: Locale selector menu
118
121
  en-us: English
119
122
  zh-hans: 简体中文
120
123
  none: (None)
121
124
 
122
125
  nav:
126
+ ariaLabel:
127
+ topLevelMenu: Main menu
128
+ homePage: Home page navigation menu
129
+ cluster: Cluster menu item
130
+ harvesterCluster: Harvester cluster menu item
131
+ seeAll: See all clusters menu item
132
+ multiClusterApps: Main menu multi cluster app menu item
133
+ configurationApps: Main menu configuration app menu item
134
+ support: Support page link
135
+ about: About page link
136
+ pinCluster: Pin/Unpin cluster
137
+ alt:
138
+ mainMenuIcon: Main menu icon
139
+ mainMenuRancherLogo: Main menu Rancher logo
140
+ expandCollapseAppBar: Expand/Collapse the Application Bar
123
141
  harvesterDashboard: Harvester Dashboard
124
142
  backToRancher: Cluster Manager
125
143
  tools: Tools
@@ -195,6 +213,7 @@ nav:
195
213
  placeholder: Filter clusters by...
196
214
  noResults: No matching clusters
197
215
  clusters: clusters
216
+ ariaLabel: Filter clusters on main menu
198
217
  resourceSearch:
199
218
  label: Resource Search
200
219
  toolTip: Resource Search {key}
@@ -273,6 +292,9 @@ suffix:
273
292
  about:
274
293
  title: About
275
294
  versions:
295
+ downloadImages: "Download {listName} images list"
296
+ downloadCli: "Download CLI for {os}"
297
+ githubRepo: "Open GitHub repository for the {name} component"
276
298
  title: Versions
277
299
  component: Component
278
300
  version: Version
@@ -1079,14 +1101,17 @@ catalog:
1079
1101
  exponentialBackOff:
1080
1102
  label: Exponential Back Off
1081
1103
  minWait:
1082
- label: Min Wait Time (in Seconds)
1083
- placeholder: 1 (default)
1104
+ label: Min Wait Time
1105
+ placeholder: 'default: 1'
1084
1106
  maxWait:
1085
- label: Max Wait Time (in Seconds)
1086
- placeholder: 5 (default)
1107
+ label: Max Wait Time
1108
+ placeholder: 'default: 5'
1087
1109
  maxRetries:
1088
1110
  label: Max Number of Retries
1089
- placeholder: 5 (default)
1111
+ placeholder: 'default: 5'
1112
+ refreshInterval:
1113
+ label: Refresh Interval
1114
+ placeholder: 'default: {hours}'
1090
1115
  tools:
1091
1116
  header: Cluster Tools
1092
1117
  noTools: "No Cluster Tools found"
@@ -1921,7 +1946,7 @@ cluster:
1921
1946
  header: Registry for Rancher System Container Images
1922
1947
  label: Enable cluster scoped container registry for Rancher system container images
1923
1948
  description: "If enabled, Rancher will pull container images from this registry during cluster provisioning. By default, Rancher will also use this registry when installing Rancher's official Helm chart apps. If the cluster scoped registry is disabled, system images are pulled from the System Default Registry in the global settings."
1924
- docsLinkRke2: "For help configuring private registry mirrors, see the RKE2 <a href=\"https://docs.rke2.io/install/containerd_registry_configuration\" target=\"_blank\">documentation.</a>"
1949
+ docsLinkRke2: "For help configuring private registry mirrors, see the RKE2 <a href=\"https://docs.rke2.io/install/private_registry\" target=\"_blank\">documentation.</a>"
1925
1950
  docsLinkK3s: "For help configuring private registry mirrors, see the K3s <a href=\"https://docs.k3s.io/installation/private-registry\" target=\"_blank\">documentation.</a>"
1926
1951
  provider:
1927
1952
  aliyunecs: Aliyun ECS
@@ -2198,11 +2223,20 @@ clusterIndexPage:
2198
2223
  label: Unhealthy Nodes
2199
2224
  noRows: There are no unhealthy nodes to show.
2200
2225
  componentStatus:
2201
- etcd: Etcd
2202
- scheduler: Scheduler
2203
- controller-manager: Controller Manager
2204
- cattle: Cattle
2205
- fleet: Fleet
2226
+ component:
2227
+ etcd:
2228
+ label: Etcd
2229
+ scheduler:
2230
+ label: Scheduler
2231
+ controller-manager:
2232
+ label: Controller Manager
2233
+ cattle:
2234
+ label: Cattle
2235
+ fleet:
2236
+ label: Fleet
2237
+ tooltip:
2238
+ disconnected: Agent disconnected
2239
+ unavailableReplicas: Replicas not available
2206
2240
  certs:
2207
2241
  label: Certificates
2208
2242
 
@@ -5153,11 +5187,14 @@ selectOrCreateAuthSecret:
5153
5187
  basic:
5154
5188
  username: Username
5155
5189
  password: Password
5190
+ rke:
5191
+ info: "An RKE Auth Config secret contains the username and password concatenated and base64 encoded into the secret's 'auth' key"
5156
5192
  namespaceGroup: "Namespace: {name}"
5157
5193
  chooseExisting: "Choose an existing secret:"
5158
- createSsh: Create a SSH Key Secret
5159
- createBasic: Create a HTTP Basic Auth Secret
5160
- createS3: Create a S3-Compatible Auth Secret
5194
+ createSsh: Create an SSH Key Secret
5195
+ createBasic: Create an HTTP Basic Auth Secret
5196
+ createS3: Create an S3-Compatible Auth Secret
5197
+ createRKE: Create an RKE Auth Config Secret
5161
5198
 
5162
5199
  serviceAccount:
5163
5200
  automount: Automount Service Account Token
@@ -5727,6 +5764,7 @@ tableHeaders:
5727
5764
  lastSchedule: Last Schedule
5728
5765
  lastSeen: Last Seen
5729
5766
  lastSeenTooltip: The time at which the most recent occurrence of this event was recorded
5767
+ lastUsed: Last Used
5730
5768
  loggingOutputProviders: Provider
5731
5769
  machines: Machines
5732
5770
  machineNodeName: Node
@@ -5802,6 +5840,7 @@ tableHeaders:
5802
5840
  resourcesReady: Resources Ready
5803
5841
  restarts: Restarts
5804
5842
  restart: Restart Required
5843
+ restartSystem: Restart { vendor }
5805
5844
  restore: Restore
5806
5845
  role: Role
5807
5846
  roles: Roles
@@ -7393,6 +7432,8 @@ registryConfig:
7393
7432
  ##############################
7394
7433
 
7395
7434
  advancedSettings:
7435
+ setEnv: Set by Environment Variable
7436
+ hideShow: Hide/show setting
7396
7437
  label: Settings
7397
7438
  subtext: Typical users will not need to change these. Proceed with caution, incorrect values can break your {appName} installation. Settings which have been customized from default settings are tagged 'Modified'.
7398
7439
  show: Show
@@ -7464,6 +7505,7 @@ advancedSettings:
7464
7505
 
7465
7506
  featureFlags:
7466
7507
  label: Feature Flags
7508
+ title: "Are you sure?"
7467
7509
  warning: |-
7468
7510
  Feature flags allow {vendor} to gate certain features behind flags.
7469
7511
  Features that are off by default should be considered experimental functionality.
@@ -7471,7 +7513,7 @@ featureFlags:
7471
7513
  This will result in a short outage of the API and UI, but not affect running clusters or workloads.
7472
7514
  promptActivate: Please confirm that you want to activate the feature flag "{flag}"
7473
7515
  promptDeactivate: Please confirm that you want to deactivate the feature flag "{flag}"
7474
- restartRequired: "Note: Updating this feature flag requires a restart"
7516
+ restartRequired: "Note: Updating this feature flag will restart {vendor}"
7475
7517
  restart:
7476
7518
  title: Waiting for Restart
7477
7519
  wait: This may take a few moments
@@ -7480,6 +7522,7 @@ performance:
7480
7522
  label: UI Performance Settings
7481
7523
  settingName: Performance
7482
7524
  experimental: This setting is experimental and may be removed or updated in future versions.
7525
+ deprecatedForSSP: The <i class="mr-5">"{setting}"</i> setting is now deprecated and will be removed in a future release. Please use the <a href="#ssp-setting" class="ml-5 mr-5">Server-side Pagination</a> setting instead.
7483
7526
  incrementalLoad:
7484
7527
  label: Incremental Loading
7485
7528
  setting: You can configure the threshold above which incremental loading will be used.
@@ -7549,6 +7592,7 @@ performance:
7549
7592
  resources:
7550
7593
  generic: most resources in the cluster's 'More Resources' section
7551
7594
  all: All Resources
7595
+ populateDefaults: Populate with latest pagination defaults
7552
7596
  banner:
7553
7597
  label: Fixed Banners
7554
7598
  settingName: Banners
@@ -7743,7 +7787,7 @@ support:
7743
7787
  text: Run SUSE Rancher products with confidence, knowing that the developers who built them are available to quickly resolve issues.
7744
7788
  three:
7745
7789
  title: Troubleshooting
7746
- text: We focus on uncovering the root cause of any issue, whether it is related to Rancher Labs products, Kubernetes, Docker or your underlying infrastructure.
7790
+ text: We focus on uncovering the root cause of any issue, whether it is related to SUSE products, Kubernetes, Docker or your underlying infrastructure.
7747
7791
  four:
7748
7792
  title: Innovate with Freedom
7749
7793
  text: Take advantage of our certified compatibility with a wide range of Kubernetes providers, operating systems, and open source software.
@@ -1751,7 +1751,7 @@ cluster:
1751
1751
  privateRegistry:
1752
1752
  label: 为 Rancher 系统容器镜像启用集群级别的容器镜像仓库
1753
1753
  description: "如果启用,Rancher 将在集群配置期间从该镜像仓库中拉取容器镜像。默认情况下,Rancher 在安装 Rancher 的官方 Helm Chart 应用程序时也会使用此镜像仓库。如果集群级别的镜像仓库被禁用,将从全局设置中的系统默认镜像仓库中拉取系统镜像。"
1754
- docsLinkRke2: "如需配置私有镜像仓库 mirror 的帮助,请参阅 RKE2 <a href=\"https://docs.rke2.io/install/containerd_registry_configuration\" target=\"_blank\">文档</a>。"
1754
+ docsLinkRke2: "如需配置私有镜像仓库 mirror 的帮助,请参阅 RKE2 <a href=\"https://docs.rke2.io/install/private_registry\" target=\"_blank\">文档</a>。"
1755
1755
  docsLinkK3s: "如需配置私有镜像仓库 mirror 的帮助,请参阅 K3s <a href=\"https://docs.k3s.io/installation/private-registry\" target=\"_blank\">文档</a>。"
1756
1756
  provider:
1757
1757
  aliyunecs: Aliyun ECS
@@ -7310,7 +7310,7 @@ support:
7310
7310
  text: 我们的开发人员会快速解决问题,因此你可以放心使用 SUSE Rancher 的产品。
7311
7311
  three:
7312
7312
  title: 故障排除
7313
- text: 无论你使用的 Rancher Labs 产品、Kubernetes、Docker 还是底层基础架构出现问题,我们都会努力找到问题的根本原因。
7313
+ text: 无论你使用的 SUSE 产品、Kubernetes、Docker 还是底层基础架构出现问题,我们都会努力找到问题的根本原因。
7314
7314
  four:
7315
7315
  title: 自由创新
7316
7316
  text: 基于我们与众多 Kubernetes 供应商、操作系统和开源软件认证的兼容性,实现自主创新。
@@ -44,6 +44,6 @@ export default {
44
44
  :options="options"
45
45
  :push-tags="true"
46
46
  :taggable="true"
47
- @input="updateName"
47
+ @update:value="updateName"
48
48
  />
49
49
  </template>
@@ -264,7 +264,10 @@ export default {
264
264
  :disabled="opt.disabled ? true : null"
265
265
  :class="{divider: opt.divider}"
266
266
  :data-testid="componentTestid + '-' + i + '-item'"
267
+ :tabindex="opt.divider ? -1 : 0"
267
268
  @click="execute(opt, $event)"
269
+ @keyup.enter="execute(opt, $event)"
270
+ @keyup.space="execute(opt, $event)"
268
271
  >
269
272
  <IconOrSvg
270
273
  v-if="opt.icon || opt.svg"
@@ -311,6 +314,11 @@ export default {
311
314
  padding: 8px 10px;
312
315
  margin: 0;
313
316
 
317
+ &:focus-visible {
318
+ @include focus-outline;
319
+ outline-offset: -2px;
320
+ }
321
+
314
322
  &[disabled] {
315
323
  cursor: not-allowed !important;
316
324
  color: var(--disabled-text);
@@ -132,6 +132,7 @@ export default {
132
132
  <form>
133
133
  <LabeledSelect
134
134
  v-model:value="moveTo"
135
+ data-testid="workspace_options"
135
136
  :label="t('assignTo.workspace')"
136
137
  :options="workspaceOptions"
137
138
  placement="bottom"
@@ -208,6 +208,10 @@ export default defineComponent({
208
208
  return this.disabled || this.phase === ASYNC_BUTTON_STATES.WAITING;
209
209
  },
210
210
 
211
+ isManualRefresh() {
212
+ return this.mode === 'manual-refresh';
213
+ },
214
+
211
215
  tooltip(): { content: string, hideOnTargetClick: boolean} | null {
212
216
  if ( this.labelAs === TOOLTIP ) {
213
217
  return {
@@ -283,11 +287,14 @@ export default defineComponent({
283
287
  :data-testid="componentTestid + '-async-button'"
284
288
  @click="clicked"
285
289
  >
286
- <span v-if="mode === 'manual-refresh'">{{ t('action.refresh') }}</span>
290
+ <span
291
+ v-if="isManualRefresh"
292
+ :class="{'mr-10': displayIcon && size !== 'sm', 'mr-5': displayIcon && size === 'sm'}"
293
+ >{{ t('action.refresh') }}</span>
287
294
  <i
288
295
  v-if="displayIcon"
289
296
  v-clean-tooltip="tooltip"
290
- :class="{icon: true, 'icon-lg': true, [displayIcon]: true}"
297
+ :class="{icon: true, 'icon-lg': true, [displayIcon]: true, 'mr-0': isManualRefresh}"
291
298
  />
292
299
  <span
293
300
  v-if="labelAs === 'text' && displayLabel"
@@ -13,6 +13,8 @@ export default {
13
13
  v-if="link && link.name"
14
14
  :to="link"
15
15
  class="back-link"
16
+ role="link"
17
+ :aria-label="t('generic.back')"
16
18
  >
17
19
  <i class="icon icon-chevron-left" /> {{ t('generic.back') }}
18
20
  </router-link>
@@ -20,6 +22,7 @@ export default {
20
22
  v-else
21
23
  to="/"
22
24
  class="back-link"
25
+ :aria-label="t('nav.home')"
23
26
  >
24
27
  <i class="icon icon-chevron-left" /> {{ t('nav.home') }}
25
28
  </router-link>
@@ -30,9 +33,12 @@ export default {
30
33
  align-items: center;
31
34
  display: flex;
32
35
  font-size: 16px;
33
- margin-bottom: 10px;
36
+ margin: 10px 0 20px 0;
34
37
  outline: 0;
35
- padding: 10px 0;
36
38
  width: fit-content;
39
+
40
+ &:focus-visible {
41
+ @include focus-outline;
42
+ }
37
43
  }
38
44
  </style>
@@ -55,7 +55,12 @@ export default {
55
55
  v-if="pref"
56
56
  class="close-button"
57
57
  data-testid="graphic-banner-close"
58
+ tabindex="0"
59
+ :aria-label="t('generic.close')"
60
+ role="button"
58
61
  @click="hide()"
62
+ @keyup.enter="hide()"
63
+ @keyup.space="hide()"
59
64
  >
60
65
  <i class="icon icon-close" />
61
66
  </div>
@@ -72,6 +77,11 @@ export default {
72
77
  .close-button {
73
78
  position: absolute;
74
79
  visibility: hidden;
80
+
81
+ &:focus-visible {
82
+ @include focus-outline;
83
+ outline-offset: 2px;
84
+ }
75
85
  }
76
86
 
77
87
  &:hover .close-button {
@@ -82,6 +82,8 @@ export default {
82
82
  type="button"
83
83
  :class="opt.class"
84
84
  :disabled="disabled || opt.disabled"
85
+ role="button"
86
+ :aria-label="opt.labelKey ? t(opt.labelKey) : opt.label"
85
87
  @click="change(opt.value)"
86
88
  >
87
89
  <slot
@@ -33,6 +33,12 @@ const buttonClass = computed(() => {
33
33
  .borderless {
34
34
  background-color: transparent;
35
35
  border: none;
36
+
37
+ &:focus-visible {
38
+ @include focus-outline;
39
+ outline-offset: -2px;
40
+ }
41
+
36
42
  &:hover, &:focus {
37
43
  background-color: var(--accent-btn);
38
44
  box-shadow: none;
@@ -25,7 +25,7 @@ export default {
25
25
  },
26
26
 
27
27
  customColor() {
28
- return !this.cluster.removePreviewColor && this.cluster.badge?.iconText ? this.cluster.badge?.color : '';
28
+ return this.cluster.iconColor || '';
29
29
  },
30
30
  },
31
31
 
@@ -5,7 +5,7 @@ import { _EDIT, _VIEW } from '@shell/config/query-params';
5
5
  export default {
6
6
  name: 'CodeMirror',
7
7
 
8
- emits: ['onReady', 'onInput', 'onChanges', 'onFocus'],
8
+ emits: ['onReady', 'onInput', 'onChanges', 'onFocus', 'validationChanged'],
9
9
 
10
10
  props: {
11
11
  /**
@@ -39,6 +39,7 @@ export default {
39
39
  codeMirrorRef: null,
40
40
  loaded: false,
41
41
  removeKeyMapBox: false,
42
+ hasLintErrors: false,
42
43
  };
43
44
  },
44
45
 
@@ -65,6 +66,7 @@ export default {
65
66
  foldGutter: true,
66
67
  styleSelectedText: true,
67
68
  showCursorWhenSelecting: true,
69
+ autocorrect: false,
68
70
  };
69
71
 
70
72
  if (this.asTextArea) {
@@ -76,6 +78,11 @@ export default {
76
78
 
77
79
  Object.assign(out, this.options);
78
80
 
81
+ // parent components control lint with a boolean; if linting is enabled, we need to override that boolean with a custom error handler to wire lint errors into dashboard validation
82
+ if (this.options?.lint) {
83
+ out.lint = { onUpdateLinting: this.handleLintErrors };
84
+ }
85
+
79
86
  return out;
80
87
  },
81
88
 
@@ -104,7 +111,25 @@ export default {
104
111
  }
105
112
  },
106
113
 
114
+ watch: {
115
+ hasLintErrors(neu) {
116
+ this.$emit('validationChanged', !neu);
117
+ }
118
+ },
119
+
107
120
  methods: {
121
+ /**
122
+ * Codemirror yaml linting uses js-yaml parse
123
+ * it does not distinguish between warnings and errors so we will treat all yaml lint messages as errors
124
+ * other codemirror linters (eg json) will report from, to, severity where severity may be 'warning' or 'error'
125
+ * only 'error' level linting will trigger a validation event from this component
126
+ */
127
+ handleLintErrors(diagnostics = []) {
128
+ const hasLintErrors = diagnostics.filter((d) => !d.severity || d.severity === 'error').length > 0;
129
+
130
+ this.hasLintErrors = hasLintErrors;
131
+ },
132
+
108
133
  focus() {
109
134
  if ( this.$refs.codeMirrorRef ) {
110
135
  this.$refs.codeMirrorRef.cminstance.focus();
@@ -118,6 +143,8 @@ export default {
118
143
  },
119
144
 
120
145
  onReady(codeMirrorRef) {
146
+ this.$emit('validationChanged', true);
147
+
121
148
  this.$nextTick(() => {
122
149
  codeMirrorRef.refresh();
123
150
  this.codeMirrorRef = codeMirrorRef;
@@ -110,6 +110,8 @@ export default {
110
110
  <router-link
111
111
  v-if="link.value.startsWith('/') "
112
112
  :to="link.value"
113
+ role="link"
114
+ :aria-label="link.label"
113
115
  >
114
116
  {{ link.label }}
115
117
  </router-link>
@@ -118,6 +120,8 @@ export default {
118
120
  :href="link.value"
119
121
  rel="noopener noreferrer nofollow"
120
122
  target="_blank"
123
+ role="link"
124
+ :aria-label="link.label"
121
125
  > {{ link.label }} </a>
122
126
  </div>
123
127
  <slot />
@@ -127,7 +131,11 @@ export default {
127
131
  >
128
132
  <a
129
133
  class="link"
134
+ tabindex="0"
135
+ :aria-label="t('footer.wechat.title')"
136
+ role="link"
130
137
  @click="show"
138
+ @keyup.enter="show"
131
139
  >
132
140
  {{ t('footer.wechat.title') }}
133
141
  </a>
@@ -147,7 +155,12 @@ export default {
147
155
  <div>
148
156
  <button
149
157
  class="btn role-primary"
158
+ tabindex="0"
159
+ :aria-label="t('generic.close')"
160
+ role="button"
150
161
  @click="close"
162
+ @keyup.enter="close"
163
+ @keyup.space="close"
151
164
  >
152
165
  {{ t('generic.close') }}
153
166
  </button>
@@ -120,6 +120,11 @@ export default {
120
120
  default: () => []
121
121
  },
122
122
 
123
+ stepsOptions: {
124
+ type: Object,
125
+ default: () => ({ editFirstStep: true })
126
+ },
127
+
123
128
  // The set of labels to display for the finish AsyncButton
124
129
  finishMode: {
125
130
  type: String,
@@ -562,6 +567,7 @@ export default {
562
567
  ref="Wizard"
563
568
  :header-mode="mode"
564
569
  :steps="steps"
570
+ :edit-first-step="stepsOptions.editFirstStep"
565
571
  :errors="errors"
566
572
  :finish-mode="finishMode"
567
573
  class="wizard"