dashboard-shell-shell 3.0.5-test.5 → 3.0.5-test.6

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 (212) hide show
  1. package/assets/brand/harvester/favicon.png +0 -0
  2. package/assets/brand/suse/favicon.png +0 -0
  3. package/assets/images/pl/half-logo.svg +23 -2
  4. package/assets/images/pl/harvester.png +0 -0
  5. package/assets/styles/app.scss +0 -4
  6. package/assets/styles/base/_basic.scss +2 -2
  7. package/assets/styles/base/_mixins.scss +1 -1
  8. package/assets/styles/base/_typography.scss +1 -2
  9. package/assets/styles/base/_variables.scss +4 -11
  10. package/assets/styles/global/_button.scss +25 -43
  11. package/assets/styles/global/_columns.scss +1 -3
  12. package/assets/styles/global/_form.scss +13 -45
  13. package/assets/styles/global/_labeled-input.scss +26 -54
  14. package/assets/styles/global/_layout.scss +3 -8
  15. package/assets/styles/global/_select.scss +17 -25
  16. package/assets/styles/global/_table.scss +1 -7
  17. package/assets/styles/global/_tooltip.scss +8 -56
  18. package/assets/styles/themes/_dark.scss +0 -3
  19. package/assets/styles/themes/_light.scss +43 -66
  20. package/assets/styles/vendor/vue-select.scss +9 -22
  21. package/assets/translations/en-us.yaml +4 -28
  22. package/assets/translations/zh-hans.yaml +189 -452
  23. package/components/ActionDropdown.vue +1 -2
  24. package/components/ActionMenu.vue +2 -2
  25. package/components/ActionMenuShell.vue +0 -2
  26. package/components/AppModal.vue +5 -46
  27. package/components/BrandImage.vue +0 -1
  28. package/components/ButtonDropdown.vue +4 -26
  29. package/components/ButtonMultiAction.vue +0 -1
  30. package/components/ClusterIconMenu.vue +1 -1
  31. package/components/CodeMirror.vue +6 -20
  32. package/components/ConsumptionGauge.vue +5 -24
  33. package/components/CopyToClipboard.vue +0 -15
  34. package/components/CruResource.vue +8 -9
  35. package/components/CruResourceFooter.vue +2 -2
  36. package/components/DashboardOptions.vue +17 -29
  37. package/components/Drawer/Chrome.vue +2 -2
  38. package/components/Drawer/ResourceDetailDrawer/ConfigTab.vue +23 -23
  39. package/components/Drawer/ResourceDetailDrawer/index.vue +2 -2
  40. package/components/ExplorerMembers.vue +3 -18
  41. package/components/ExplorerProjectsNamespaces.vue +5 -19
  42. package/components/GlobalRoleBindings.vue +48 -112
  43. package/components/GrafanaDashboard.vue +4 -4
  44. package/components/GrowlManager.vue +1 -3
  45. package/components/HardwareResourceGauge.vue +3 -39
  46. package/components/IndentedPanel.vue +10 -4
  47. package/components/InfoBox.vue +3 -3
  48. package/components/InputOrDisplay.vue +2 -28
  49. package/components/LabelValue.vue +1 -20
  50. package/components/ModalWithCard.vue +3 -12
  51. package/components/PodSecurityAdmission.vue +1 -1
  52. package/components/PromptModal.vue +1 -1
  53. package/components/PromptRemove.vue +11 -30
  54. package/components/Resource/Detail/Metadata/IdentifyingInformation/index.vue +3 -1
  55. package/components/Resource/Detail/Metadata/KeyValue.vue +4 -8
  56. package/components/Resource/Detail/Metadata/index.vue +1 -2
  57. package/components/Resource/Detail/TitleBar/Title.vue +3 -4
  58. package/components/Resource/Detail/TitleBar/index.vue +24 -103
  59. package/components/ResourceDetail/Masthead/legacy.vue +38 -181
  60. package/components/ResourceDetail/legacy.vue +14 -32
  61. package/components/ResourceList/Masthead.vue +54 -226
  62. package/components/ResourceList/ResourceLoadingIndicator.vue +2 -5
  63. package/components/ResourceTable.vue +2 -24
  64. package/components/SideNav.vue +20 -74
  65. package/components/SortableTable/THead.vue +3 -33
  66. package/components/SortableTable/index.vue +464 -1017
  67. package/components/SortableTable/paging.js +16 -26
  68. package/components/SortableTable/selection.js +2 -2
  69. package/components/Tabbed/Tab.vue +3 -3
  70. package/components/Tabbed/index.vue +30 -48
  71. package/components/YamlEditor.vue +1 -0
  72. package/components/auth/Principal.vue +13 -37
  73. package/components/auth/RoleDetailEdit.vue +7 -58
  74. package/components/auth/SelectPrincipal.vue +0 -1
  75. package/components/form/ArrayList.vue +33 -41
  76. package/components/form/ArrayListGrouped.vue +2 -10
  77. package/components/form/ArrayListSelect.vue +1 -1
  78. package/components/form/BannerSettings.vue +59 -64
  79. package/components/form/ChangePassword.vue +4 -4
  80. package/components/form/ColorInput.vue +8 -32
  81. package/components/form/Footer.vue +8 -11
  82. package/components/form/InputWithSelect.vue +5 -8
  83. package/components/form/KeyValue.vue +7 -47
  84. package/components/form/LabeledSelect.vue +242 -214
  85. package/components/form/Labels.vue +3 -3
  86. package/components/form/MatchExpressions.vue +7 -24
  87. package/components/form/Members/ClusterPermissionsEditor.vue +2 -1
  88. package/components/form/Members/MembershipEditor.vue +1 -1
  89. package/components/form/NameNsDescription.vue +20 -59
  90. package/components/form/Password.vue +7 -16
  91. package/components/form/PodAffinity.vue +5 -4
  92. package/components/form/ResourceQuota/Namespace.vue +4 -4
  93. package/components/form/ResourceQuota/NamespaceRow.vue +17 -18
  94. package/components/form/ResourceQuota/Project.vue +4 -4
  95. package/components/form/ResourceQuota/ProjectRow.vue +6 -3
  96. package/components/form/Select.vue +2 -5
  97. package/components/form/SimpleSecretSelector.vue +9 -29
  98. package/components/form/Taints.vue +1 -2
  99. package/components/form/UnitInput.vue +3 -8
  100. package/components/form/WorkloadPorts.vue +123 -143
  101. package/components/formatter/BadgeStateFormatter.vue +5 -8
  102. package/components/formatter/LiveDate.vue +3 -3
  103. package/components/nav/Favorite.vue +1 -5
  104. package/components/nav/Group.vue +99 -132
  105. package/components/nav/Header.vue +27 -124
  106. package/components/nav/HeaderPageActionMenu.vue +0 -1
  107. package/components/nav/NamespaceFilter.vue +15 -19
  108. package/components/nav/TopLevelMenu.vue +119 -182
  109. package/components/nav/Type.vue +41 -63
  110. package/composables/useClickOutside.ts +1 -1
  111. package/config/private-label.js +11 -15
  112. package/config/product/auth.js +7 -17
  113. package/config/product/settings.js +9 -19
  114. package/config/settings.ts +0 -28
  115. package/config/table-headers.js +2 -3
  116. package/dialog/ForceMachineRemoveDialog.vue +2 -2
  117. package/dialog/ScalePoolDownDialog.vue +2 -2
  118. package/edit/management.cattle.io.user.vue +4 -17
  119. package/edit/monitoring.coreos.com.alertmanagerconfig/auth.vue +19 -19
  120. package/edit/monitoring.coreos.com.alertmanagerconfig/receiverConfig.vue +31 -31
  121. package/edit/monitoring.coreos.com.alertmanagerconfig/routeConfig.vue +12 -36
  122. package/edit/monitoring.coreos.com.alertmanagerconfig/types/email.vue +6 -6
  123. package/edit/monitoring.coreos.com.alertmanagerconfig/types/opsgenie.vue +10 -10
  124. package/edit/monitoring.coreos.com.alertmanagerconfig/types/pagerduty.vue +4 -4
  125. package/edit/monitoring.coreos.com.alertmanagerconfig/types/slack.vue +4 -4
  126. package/edit/monitoring.coreos.com.alertmanagerconfig/types/webhook.vue +1 -1
  127. package/edit/monitoring.coreos.com.receiver/types/email.vue +6 -6
  128. package/edit/monitoring.coreos.com.receiver/types/opsgenie.vue +10 -10
  129. package/edit/monitoring.coreos.com.receiver/types/pagerduty.vue +5 -5
  130. package/edit/monitoring.coreos.com.receiver/types/slack.vue +4 -4
  131. package/edit/namespace.vue +2 -1
  132. package/edit/token.vue +12 -31
  133. package/edit/workload/index.vue +4 -4
  134. package/list/management.cattle.io.setting.vue +13 -22
  135. package/list/management.cattle.io.user.vue +3 -7
  136. package/list/namespace.vue +0 -3
  137. package/list/provisioning.cattle.io.cluster.vue +7 -6
  138. package/mixins/brand.js +0 -17
  139. package/package.json +1 -1
  140. package/pages/account/index.vue +25 -79
  141. package/pages/auth/login.vue +52 -220
  142. package/pages/auth/setup.vue +19 -142
  143. package/pages/c/_cluster/_product/namespaces.vue +5 -5
  144. package/pages/c/_cluster/auth/roles/index.vue +1 -19
  145. package/pages/c/_cluster/monitoring/monitor/index.vue +2 -2
  146. package/pages/c/_cluster/settings/banners.vue +102 -174
  147. package/pages/c/_cluster/settings/brand.vue +302 -350
  148. package/pages/c/_cluster/settings/performance.vue +38 -61
  149. package/pages/home.vue +30 -70
  150. package/pages/prefs.vue +25 -27
  151. package/promptRemove/mixin/roleDeletionCheck.js +2 -2
  152. package/public/index.html +4 -4
  153. package/rancher-components/BadgeState/BadgeState.vue +55 -38
  154. package/rancher-components/Banner/Banner.vue +8 -12
  155. package/rancher-components/Card/Card.vue +8 -7
  156. package/rancher-components/Form/Checkbox/Checkbox.vue +0 -4
  157. package/rancher-components/Form/LabeledInput/LabeledInput.vue +3 -42
  158. package/rancher-components/Form/Radio/RadioButton.vue +11 -35
  159. package/rancher-components/Form/Radio/RadioGroup.vue +5 -13
  160. package/rancher-components/Form/TextArea/TextAreaAutoGrow.vue +3 -3
  161. package/rancher-components/Form/ToggleSwitch/ToggleSwitch.vue +0 -1
  162. package/rancher-components/LabeledTooltip/LabeledTooltip.vue +4 -12
  163. package/rancher-components/RcDropdown/RcDropdown.vue +7 -35
  164. package/rancher-components/RcDropdown/RcDropdownItem.vue +2 -2
  165. package/rancher-components/RcDropdown/RcDropdownMenu.vue +6 -12
  166. package/rancher-components/RcDropdown/types.ts +0 -1
  167. package/rancher-components/StringList/StringList.vue +1 -1
  168. package/static/favicon.ico +0 -0
  169. package/static/favicon.png +0 -0
  170. package/static/loading-indicator.html +3 -3
  171. package/store/i18n.js +2 -5
  172. package/store/modal.ts +3 -3
  173. package/store/prefs.js +4 -11
  174. package/store/type-map.js +2 -32
  175. package/types/shell/index.d.ts +67 -74
  176. package/utils/error.js +8 -87
  177. package/utils/router.js +0 -21
  178. package/utils/select.js +3 -26
  179. package/utils/string.js +5 -8
  180. package/utils/title.ts +1 -1
  181. package/assets/icons/demo.css +0 -539
  182. package/assets/icons/demo.css:Zone.Identifier +0 -0
  183. package/assets/icons/demo_index.html +0 -1131
  184. package/assets/icons/demo_index.html:Zone.Identifier +0 -0
  185. package/assets/icons/iconfont.css +0 -216
  186. package/assets/icons/iconfont.css:Zone.Identifier +0 -0
  187. package/assets/icons/iconfont.js +0 -1
  188. package/assets/icons/iconfont.js:Zone.Identifier +0 -0
  189. package/assets/icons/iconfont.json +0 -324
  190. package/assets/icons/iconfont.json:Zone.Identifier +0 -0
  191. package/assets/icons/iconfont.ttf +0 -0
  192. package/assets/icons/iconfont.ttf:Zone.Identifier +0 -0
  193. package/assets/icons/iconfont.woff +0 -0
  194. package/assets/icons/iconfont.woff2 +0 -0
  195. package/assets/icons/iconfont.woff2:Zone.Identifier +0 -0
  196. package/assets/icons/iconfont.woff:Zone.Identifier +0 -0
  197. package/assets/images/API.svg +0 -3
  198. package/assets/images/action.svg +0 -6
  199. package/assets/images/login/password.svg +0 -20
  200. package/assets/images/login/user.svg +0 -6
  201. package/assets/images/login-bg.png +0 -0
  202. package/assets/images/login-left.png +0 -0
  203. package/assets/images/login-logo.svg +0 -19
  204. package/assets/images/logo.png +0 -0
  205. package/assets/images/pl/logo.png +0 -0
  206. package/assets/images/promp-yellow.svg +0 -5
  207. package/assets/images/user.png +0 -0
  208. package/assets/styles/all.scss +0 -63
  209. package/components/DotState.vue +0 -84
  210. package/components/breadcrumb/index.vue +0 -340
  211. package/pages/account/pri.vue +0 -229
  212. package/utils/errorTranslate.json +0 -1336
@@ -15,8 +15,7 @@ export default {
15
15
  },
16
16
 
17
17
  indexTo() {
18
- // return Math.min(this.totalRows, this.indexFrom + this.perPage - 1);
19
- return Math.min(this.totalRows, this.indexFrom + Number(this.perPage) - 1);
18
+ return Math.min(this.totalRows, this.indexFrom + this.perPage - 1);
20
19
  },
21
20
 
22
21
  totalPages() {
@@ -24,18 +23,17 @@ export default {
24
23
  },
25
24
 
26
25
  showPaging() {
27
- // if (!this.paging) {
28
- // return false;
29
- // }
26
+ if (!this.paging) {
27
+ return false;
28
+ }
30
29
 
31
- // const havePages = this.totalPages > 1;
30
+ const havePages = this.totalPages > 1;
32
31
 
33
- // if (this.altLoading) {
34
- // return havePages;
35
- // }
32
+ if (this.altLoading) {
33
+ return havePages;
34
+ }
36
35
 
37
- // return !this.loading && havePages;
38
- return !this.loading && this.paging && this.totalPages >= 1;
36
+ return !this.loading && havePages;
39
37
  },
40
38
 
41
39
  pagingDisplay() {
@@ -78,9 +76,7 @@ export default {
78
76
  },
79
77
 
80
78
  data() {
81
- // const perPage = this.getPerPage();
82
-
83
- return { page: 1, perPage:10 };
79
+ return { page: 1 };
84
80
  },
85
81
 
86
82
  watch: {
@@ -95,23 +91,17 @@ export default {
95
91
  }
96
92
  },
97
93
 
98
- // page() {
99
- // this.debouncedPaginationChanged();
100
- // },
94
+ page() {
95
+ this.debouncedPaginationChanged();
96
+ },
101
97
 
102
- // perPage() {
103
- // this.debouncedPaginationChanged();
104
- // },
98
+ perPage() {
99
+ this.debouncedPaginationChanged();
100
+ },
105
101
 
106
102
  },
107
103
 
108
104
  methods: {
109
-
110
- setgetPerPage(num) {
111
- this.setPage(1);
112
- this.perPage = num;
113
- },
114
-
115
105
  setPage(num) {
116
106
  if (this.page === num) {
117
107
  return;
@@ -10,7 +10,7 @@ export const NONE = 'none';
10
10
 
11
11
  export default {
12
12
  mounted() {
13
- const table = this.$el && this.$el.querySelector('TABLE');
13
+ const table = this.$el.querySelector('TABLE');
14
14
 
15
15
  this._onRowClickBound = this.onRowClick.bind(this);
16
16
  this._onRowMousedownBound = this.onRowMousedown.bind(this);
@@ -22,7 +22,7 @@ export default {
22
22
  },
23
23
 
24
24
  beforeUnmount() {
25
- const table = this.$el && this.$el.querySelector('TABLE');
25
+ const table = this.$el.querySelector('TABLE');
26
26
 
27
27
  table.removeEventListener('click', this._onRowClickBound);
28
28
  table.removeEventListener('mousedown', this._onRowMousedownBound);
@@ -100,14 +100,14 @@ export default {
100
100
  v-if="shouldShowHeader"
101
101
  class="tab-header"
102
102
  >
103
- <!-- <h2>
103
+ <h2>
104
104
  {{ labelDisplay }}
105
105
  <i
106
106
  v-if="tooltip"
107
107
  v-clean-tooltip="tooltip"
108
108
  class="icon icon-info icon-lg"
109
109
  />
110
- </h2> -->
110
+ </h2>
111
111
  <slot name="tab-header-right" />
112
112
  </div>
113
113
  <slot v-bind="{active}" />
@@ -118,7 +118,7 @@ export default {
118
118
  .tab-header {
119
119
  display: flex;
120
120
  justify-content: space-between;
121
- /* margin-bottom: 15px; */
121
+ margin-bottom: 15px;
122
122
  align-items: center;
123
123
 
124
124
  h2 {
@@ -285,15 +285,15 @@ export default {
285
285
  :data-testid="tab.name"
286
286
  :class="{tab: true, active: tab.active, disabled: tab.disabled, error: (tab.error)}"
287
287
  role="presentation"
288
- @click.prevent="select(tab.name, $event)"
289
- @keyup.enter.space="select(tab.name, $event)"
290
288
  >
291
289
  <a
292
290
  :data-testid="`btn-${tab.name}`"
293
291
  :aria-controls="tab.name"
294
292
  :aria-selected="tab.active"
295
293
  :aria-label="tab.labelDisplay || ''"
296
- role="tab"
294
+ role="tab"
295
+ @click.prevent="select(tab.name, $event)"
296
+ @keyup.enter.space="select(tab.name, $event)"
297
297
  >
298
298
  <span>{{ tab.labelDisplay }}</span>
299
299
  <span
@@ -382,6 +382,15 @@ export default {
382
382
  margin: 0;
383
383
  padding: 0;
384
384
 
385
+ &:focus-visible {
386
+ outline: none;
387
+
388
+ .tab.active {
389
+ @include focus-outline;
390
+ outline-offset: -2px;
391
+ }
392
+ }
393
+
385
394
  &.horizontal {
386
395
  border: solid thin var(--border);
387
396
  border-bottom: 0;
@@ -389,7 +398,7 @@ export default {
389
398
  flex-direction: row;
390
399
 
391
400
  + .tab-container {
392
- // border: solid thin var(--border);
401
+ border: solid thin var(--border);
393
402
  }
394
403
 
395
404
  .tab.active {
@@ -397,12 +406,8 @@ export default {
397
406
  }
398
407
  }
399
408
 
400
- &:focus {
401
- outline: none;
402
-
403
- & .tab.active a span {
404
- text-decoration: none;
405
- }
409
+ &:focus .tab.active a span {
410
+ text-decoration: underline;
406
411
  }
407
412
 
408
413
  .tab {
@@ -419,7 +424,7 @@ export default {
419
424
  &:hover {
420
425
  text-decoration: none;
421
426
  span {
422
- text-decoration: none;
427
+ text-decoration: underline;
423
428
  }
424
429
  }
425
430
  }
@@ -489,68 +494,45 @@ export default {
489
494
 
490
495
  .side-tabs {
491
496
  display: flex;
492
- flex-direction: column;
493
- /* box-shadow: 0 0 20px var(--shadow);
497
+ box-shadow: 0 0 20px var(--shadow);
494
498
  border-radius: calc(var(--border-radius) * 2);
495
- background-color: var(--tabbed-sidebar-bg); */
496
- margin: 0px -20px;
499
+ background-color: var(--tabbed-sidebar-bg);
500
+
497
501
  .tab-container {
498
502
  padding: 20px;
499
503
  }
500
504
 
501
505
  & .tabs {
502
- /* width: $sideways-tabs-width; */
503
- /* min-width: $sideways-tabs-width; */
506
+ width: $sideways-tabs-width;
507
+ min-width: $sideways-tabs-width;
504
508
  display: flex;
505
- border-bottom:1px solid #d7d7d7;
506
- padding: 0 0 0 20px;
507
- /* flex: 1 0; */
508
- /* flex-direction: column; */
509
+ flex: 1 0;
510
+ flex-direction: column;
509
511
 
510
512
  // &.vertical {
511
513
  // .tab.active {
512
514
  // background-color: var(--tabbed-container-bg);
513
515
  // }
514
516
  // }
517
+
515
518
  & .tab {
516
- /* width: 100%; */
517
- min-width: 120px;
518
- height: 36px;
519
- /* border-top: solid 5px transparent; */
520
- display: flex;
521
- justify-content: center;
522
- padding: 8px 16px;
523
- box-sizing: border-box;
524
- border: 1px solid #d7d7d7;
525
- border-bottom: 0px;
526
- margin-right: 5px;
527
- border-radius: 2px;
519
+ width: 100%;
520
+ border-left: solid 5px transparent;
528
521
 
529
522
  &.toggle A {
530
523
  color: var(--primary);
531
- padding: 0px;
532
524
  }
533
525
 
534
526
  A {
535
- color: var(--input-label);
536
- padding: 0px;
527
+ color: var(--primary);
537
528
  }
538
529
 
539
530
  &.active {
540
531
  background-color: var(--body-bg);
541
- border-top: solid 2px var(--primary);
542
- position: relative;
543
- &.active::before{
544
- position: absolute;
545
- right: 0;
546
- left: 0;
547
- top: 34px;
548
- border-bottom: 1px solid #fff;
549
- content: '';
532
+ border-left: solid 5px var(--primary);
550
533
 
551
- }
552
534
  & A {
553
- color: var(--primary);
535
+ color: var(--input-label);
554
536
  }
555
537
  }
556
538
 
@@ -594,7 +576,7 @@ margin: 0px -20px;
594
576
  &
595
577
 
596
578
  .tab-container {
597
- /* width: calc(100% - #{$sideways-tabs-width}); */
579
+ width: calc(100% - #{$sideways-tabs-width});
598
580
  flex-grow: 1;
599
581
  background-color: var(--body-bg);
600
582
  }
@@ -247,6 +247,7 @@ export default {
247
247
  @onInput="onInput"
248
248
  @onReady="onReady"
249
249
  @onChanges="onChanges"
250
+ @validationChanged="$emit('validationChanged', $event)"
250
251
  />
251
252
  <FileDiff
252
253
  v-else
@@ -16,10 +16,6 @@ export default {
16
16
  showLabels: {
17
17
  type: Boolean,
18
18
  default: false,
19
- },
20
- isShowPass: {
21
- type: Boolean,
22
- default: false,
23
19
  }
24
20
  },
25
21
 
@@ -92,7 +88,7 @@ export default {
92
88
  <template v-else-if="principal">
93
89
  <div class="avatar">
94
90
  <img
95
- src="@shell/assets/images/user.png"
91
+ :src="principal.avatarSrc"
96
92
  :class="{'round': principal.roundAvatar}"
97
93
  :alt="t('principal.alt.avatar')"
98
94
  >
@@ -102,19 +98,11 @@ export default {
102
98
  class="name"
103
99
  >
104
100
  <table>
105
- <tr class="mb-10">
106
- <td>{{ t('principal.name') }}: </td><td>{{ principal.name || principal.loginName }}</td>
107
- </tr>
108
- <tr class="mb-10">
109
- <td>{{ t('principal.loginName') }}: </td><td>{{ principal.loginName }}</td>
110
- </tr>
111
- <tr
112
- v-if="isShowPass"
113
- class="mb-10"
114
- >
115
- <td>修改密码: </td><td>****** <slot name="edit" /></td>
116
- </tr>
117
- <tr><td>{{ t('principal.type') }}: </td><td>{{ principal.displayType }}</td></tr>
101
+ <tbody>
102
+ <tr><th>{{ t('principal.name') }}: </th><td>{{ principal.name || principal.loginName }}</td></tr>
103
+ <tr><th>{{ t('principal.loginName') }}: </th><td>{{ principal.loginName }}</td></tr>
104
+ <tr><th>{{ t('principal.type') }}: </th><td>{{ principal.displayType }}</td></tr>
105
+ </tbody>
118
106
  </table>
119
107
  </div>
120
108
  <template v-else>
@@ -166,7 +154,7 @@ export default {
166
154
  </template>
167
155
 
168
156
  <style lang="scss" scoped>
169
- $size: 20px;
157
+ $size: 40px;
170
158
 
171
159
  .principal {
172
160
  display: grid;
@@ -174,7 +162,7 @@ export default {
174
162
  "avatar name"
175
163
  "avatar description";
176
164
  grid-template-columns: $size auto;
177
- // grid-template-rows: auto math.div($size, 2);
165
+ grid-template-rows: auto math.div($size, 2);
178
166
  column-gap: 10px;
179
167
 
180
168
  th {
@@ -184,35 +172,23 @@ export default {
184
172
  }
185
173
 
186
174
  &.showLabels {
187
- /* grid-template-areas:
175
+ grid-template-areas:
188
176
  "avatar name";
189
177
  grid-template-columns: 60px auto;
190
178
  grid-template-rows: 60px;
191
- column-gap: 0; */
192
- display: flex;
193
- column-gap:0;
179
+ column-gap: 0;
194
180
  .name {
195
- display: flex;
196
181
  line-height: unset;
197
182
  }
198
- table tr {
199
- display: block;
200
- }
183
+
201
184
  table tr td:not(:first-of-type) {
202
185
  padding-left: 10px;
203
186
  }
204
- table tr td:not(:last-of-type) {
205
- width: 100px;
206
- }
207
187
  }
208
188
 
209
189
  .avatar {
210
- /* grid-area: avatar;
211
- text-align: center; */
212
- width: 287px;
213
- display: flex;
214
- justify-content: center;
215
- align-items: center;
190
+ grid-area: avatar;
191
+ text-align: center;
216
192
 
217
193
  DIV.empty {
218
194
  border: 1px solid var(--border);
@@ -333,7 +333,7 @@ export default {
333
333
  return this.value.listLocation;
334
334
  },
335
335
  ruleClass() {
336
- return `ruleCls col ${ this.isNamespaced ? 'span-3' : 'span-3' }`;
336
+ return `col ${ this.isNamespaced ? 'span-4' : 'span-3' }`;
337
337
  },
338
338
  // Detail View
339
339
  rules() {
@@ -546,11 +546,7 @@ export default {
546
546
  </script>
547
547
 
548
548
  <template>
549
-
550
- <!-- 加载状态下显示 Loading 组件 -->
551
549
  <Loading v-if="$fetchState.pending" />
552
-
553
- <!-- 主表单容器,基于 CruResource 封装 -->
554
550
  <CruResource
555
551
  v-else
556
552
  class="receiver"
@@ -564,10 +560,7 @@ export default {
564
560
  @finish="save"
565
561
  @cancel="cancel"
566
562
  >
567
- <!-- ========== 详情模式显示规则表 ========== -->
568
563
  <template v-if="isDetail">
569
-
570
- <!-- 当前规则列表 -->
571
564
  <SortableTable
572
565
  key-field="index"
573
566
  :rows="rules"
@@ -618,11 +611,7 @@ export default {
618
611
  />
619
612
  </div>
620
613
  </template>
621
-
622
- <!-- ========== 表单编辑/创建模式 ========== -->
623
614
  <template v-else>
624
-
625
- <!-- 名称 & 命名空间 & 描述输入 -->
626
615
  <NameNsDescription
627
616
  :value="value"
628
617
  :namespaced="isNamespaced"
@@ -633,15 +622,11 @@ export default {
633
622
  :rules="{ name: fvGetAndReportPathRules('displayName') }"
634
623
  @update:value="$emit('input', $event)"
635
624
  />
636
-
637
- <!-- Rancher 相关的默认选项设置 -->
638
625
  <div
639
626
  v-if="isRancherType"
640
627
  class="row"
641
628
  >
642
629
  <div class="col span-6">
643
-
644
- <!-- 默认角色选项 -->
645
630
  <RadioGroup
646
631
  v-model:value="defaultValue"
647
632
  name="storageSource"
@@ -652,8 +637,6 @@ export default {
652
637
  :mode="mode"
653
638
  />
654
639
  </div>
655
-
656
- <!-- 锁定角色模板选项 -->
657
640
  <div
658
641
  v-if="isRancherRoleTemplate"
659
642
  class="col span-6"
@@ -670,25 +653,17 @@ export default {
670
653
  </div>
671
654
  </div>
672
655
  <div class="spacer" />
673
-
674
- <!-- ========== 选项卡容器 ========== -->
675
656
  <Tabbed :side-tabs="true">
676
-
677
- <!-- ---------- 授权资源 Tab ---------- -->
678
657
  <Tab
679
658
  name="grant-resources"
680
659
  :label="t('rbac.roletemplate.tabs.grantResources.label')"
681
660
  :weight="1"
682
661
  >
683
-
684
- <!-- 校验错误展示 -->
685
662
  <Error
686
663
  :value="value.rules"
687
664
  :rules="fvGetAndReportPathRules('rules')"
688
665
  as-banner
689
666
  />
690
-
691
- <!-- 规则编辑列表 -->
692
667
  <ArrayList
693
668
  v-model:value="value.rules"
694
669
  label="Resources"
@@ -698,11 +673,9 @@ export default {
698
673
  :default-add-value="defaultRule"
699
674
  :initial-empty-row="true"
700
675
  :show-header="true"
701
- add-label="添加资源"
676
+ add-label="Add Resource"
702
677
  :mode="mode"
703
678
  >
704
-
705
- <!-- 列表头部 -->
706
679
  <template #column-headers>
707
680
  <div class="column-headers row">
708
681
  <div :class="ruleClass">
@@ -734,12 +707,8 @@ export default {
734
707
  </div>
735
708
  </div>
736
709
  </template>
737
-
738
- <!-- 列内容渲染 -->
739
710
  <template #columns="props">
740
711
  <div class="columns row mr-20">
741
-
742
- <!-- 动作(verbs)选择 -->
743
712
  <div :class="ruleClass">
744
713
  <!-- Select verbs -->
745
714
  <Select
@@ -756,11 +725,8 @@ export default {
756
725
  @update:value="updateSelectValue(props.row.value, 'verbs', $event)"
757
726
  />
758
727
  </div>
759
-
760
- <!-- 资源(resources)选择 -->
761
728
  <div :class="ruleClass">
762
729
  <Select
763
- style="width: auto;"
764
730
  :value="getRule('resources', props.row.value)"
765
731
  :disabled="isBuiltin"
766
732
  :options="resourceOptions"
@@ -774,8 +740,6 @@ export default {
774
740
  @createdListItem="setRule('resources', props.row.value, $event)"
775
741
  />
776
742
  </div>
777
-
778
- <!-- API Groups 输入 -->
779
743
  <div :class="ruleClass">
780
744
  <LabeledInput
781
745
  :value="getRule('apiGroups', props.row.value)"
@@ -785,8 +749,6 @@ export default {
785
749
  @input="setRule('apiGroups', props.row.value, $event.target.value)"
786
750
  />
787
751
  </div>
788
-
789
- <!-- 非命名空间 URL 输入(仅非命名空间模式显示) -->
790
752
  <div
791
753
  v-if="!isNamespaced"
792
754
  :class="ruleClass"
@@ -814,12 +776,10 @@ export default {
814
776
  </template>
815
777
  </ArrayList>
816
778
  </Tab>
817
-
818
- <!-- ---------- 继承角色模板 Tab(仅 Rancher 角色模板可用) ---------- -->
819
779
  <Tab
820
780
  v-if="isRancherRoleTemplate"
821
781
  name="inherit-from"
822
- label="继承表单"
782
+ label="Inherit From"
823
783
  :weight="0"
824
784
  >
825
785
  <ArrayList
@@ -828,7 +788,7 @@ export default {
828
788
  :remove-allowed="!isBuiltin"
829
789
  :add-allowed="!isBuiltin"
830
790
  label="Resources"
831
- add-label="添加资源"
791
+ add-label="Add Resource"
832
792
  :mode="mode"
833
793
  >
834
794
  <template #columns="props">
@@ -859,16 +819,13 @@ export default {
859
819
  </template>
860
820
 
861
821
  <style lang="scss" scoped>
862
- .ruleCls {
863
- margin-right: 10px;
864
- }
865
822
  .required {
866
823
  color: var(--error);
867
824
  }
868
825
 
869
826
  :deep() {
870
827
  .column-headers {
871
- margin-right: 95px;
828
+ margin-right: 75px;
872
829
  margin-bottom: 5px;
873
830
  }
874
831
 
@@ -878,6 +835,7 @@ export default {
878
835
  .remove {
879
836
  display: flex;
880
837
  flex-direction: column;
838
+ justify-content: center;
881
839
  align-items: flex-end;
882
840
  }
883
841
  }
@@ -885,17 +843,8 @@ export default {
885
843
  .columns {
886
844
  .col > .unlabeled-select:not(.taggable) {
887
845
  // override the odd padding-top from shell/assets/styles/global/_select.scss
888
- /* padding: $unlabaled-select-padding */
889
- }
890
- }
891
- }
892
-
893
- .columns {
894
- :deep() {
895
- .unlabeled-select {
896
- width: auto;
846
+ padding: $unlabaled-select-padding
897
847
  }
898
848
  }
899
-
900
849
  }
901
850
  </style>
@@ -212,7 +212,6 @@ export default {
212
212
  <Principal
213
213
  :value="option.label"
214
214
  :use-muted="false"
215
- style="padding-top: 6px;"
216
215
  />
217
216
  </template>
218
217