dashboard-shell-shell 1.0.113 → 1.0.115

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 (119) hide show
  1. package/components/ActionDropdown.vue +1 -1
  2. package/components/ActionMenu.vue +2 -2
  3. package/components/ActionMenuShell.vue +0 -1
  4. package/components/AppModal.vue +6 -78
  5. package/components/AssignTo.vue +11 -25
  6. package/components/AsyncButton.vue +7 -24
  7. package/components/BannerGraphic.vue +0 -1
  8. package/components/ButtonDropdown.vue +4 -26
  9. package/components/ButtonGroup.vue +0 -4
  10. package/components/ButtonMultiAction.vue +0 -1
  11. package/components/CommunityLinks.vue +3 -3
  12. package/components/ConsumptionGauge.vue +5 -24
  13. package/components/CopyToClipboardText.vue +1 -2
  14. package/components/CruResource.vue +7 -12
  15. package/components/CruResourceFooter.vue +2 -2
  16. package/components/DashboardOptions.vue +15 -21
  17. package/components/DetailText.vue +0 -5
  18. package/components/DisableAuthProviderModal.vue +0 -1
  19. package/components/ExplorerMembers.vue +1 -1
  20. package/components/ExplorerProjectsNamespaces.vue +14 -56
  21. package/components/FixedBanner.vue +12 -19
  22. package/components/GlobalRoleBindings.vue +1 -5
  23. package/components/GrafanaDashboard.vue +4 -4
  24. package/components/GrowlManager.vue +1 -4
  25. package/components/HardwareResourceGauge.vue +3 -39
  26. package/components/InfoBox.vue +3 -3
  27. package/components/InputOrDisplay.vue +2 -28
  28. package/components/LabelValue.vue +1 -16
  29. package/components/LandingPagePreference.vue +3 -5
  30. package/components/LocaleSelector.vue +93 -39
  31. package/components/ModalWithCard.vue +0 -2
  32. package/components/MoveModal.vue +0 -1
  33. package/components/PromptChangePassword.vue +1 -1
  34. package/components/PromptModal.vue +2 -15
  35. package/components/PromptRemove.vue +8 -28
  36. package/components/PromptRestore.vue +0 -1
  37. package/components/ResourceCancelModal.vue +0 -1
  38. package/components/ResourceDetail/Masthead.vue +43 -188
  39. package/components/ResourceDetail/__tests__/Masthead.test.ts +1 -5
  40. package/components/ResourceDetail/index.vue +14 -49
  41. package/components/ResourceList/Masthead.vue +18 -80
  42. package/components/ResourceTable.vue +8 -3
  43. package/components/SideNav.vue +3 -2
  44. package/components/SortableTable/THead.vue +4 -10
  45. package/components/SortableTable/actions.js +1 -1
  46. package/components/SortableTable/index.vue +537 -637
  47. package/components/SortableTable/selection.js +11 -0
  48. package/components/Tabbed/Tab.vue +3 -3
  49. package/components/Tabbed/index.vue +26 -44
  50. package/components/Wizard.vue +2 -2
  51. package/components/__tests__/AsyncButton.test.ts +2 -2
  52. package/components/__tests__/FixedBanner.test.ts +3 -3
  53. package/components/auth/Principal.vue +3 -10
  54. package/components/auth/__tests__/RoleDetailEdit.test.ts +2 -3
  55. package/components/form/ArrayList.vue +85 -123
  56. package/components/form/ArrayListGrouped.vue +2 -10
  57. package/components/form/Command.vue +15 -6
  58. package/components/form/EnvVars.vue +8 -16
  59. package/components/form/Footer.vue +5 -8
  60. package/components/form/HealthCheck.vue +3 -3
  61. package/components/form/HookOption.vue +16 -11
  62. package/components/form/KeyValue.vue +7 -16
  63. package/components/form/LabeledSelect.vue +76 -59
  64. package/components/form/LifecycleHooks.vue +3 -3
  65. package/components/form/MatchExpressions.vue +12 -35
  66. package/components/form/NameNsDescription.vue +115 -147
  67. package/components/form/Networking.vue +12 -20
  68. package/components/form/NodeAffinity.vue +23 -31
  69. package/components/form/NodeScheduling.vue +3 -13
  70. package/components/form/Password.vue +5 -11
  71. package/components/form/PodAffinity.vue +44 -43
  72. package/components/form/Probe.vue +66 -68
  73. package/components/form/ResourceQuota/Project.vue +1 -5
  74. package/components/form/ResourceSelector.vue +9 -7
  75. package/components/form/SSHKnownHosts/KnownHostsEditDialog.vue +3 -6
  76. package/components/form/SSHKnownHosts/__tests__/KnownHostsEditDialog.test.ts +1 -12
  77. package/components/form/SSHKnownHosts/index.vue +2 -16
  78. package/components/form/Security.vue +56 -54
  79. package/components/form/Select.vue +7 -41
  80. package/components/form/ShellInput.vue +1 -5
  81. package/components/form/Tolerations.vue +1 -5
  82. package/components/form/UnitInput.vue +2 -2
  83. package/components/form/ValueFromResource.vue +121 -134
  84. package/components/form/WorkloadPorts.vue +18 -18
  85. package/components/form/__tests__/ArrayList.test.ts +2 -5
  86. package/components/form/__tests__/MatchExpressions.test.ts +12 -12
  87. package/components/form/__tests__/NameNsDescription.test.ts +14 -115
  88. package/components/form/__tests__/Probe.test.ts +8 -12
  89. package/components/form/__tests__/SSHKnownHosts.test.ts +0 -11
  90. package/components/form/__tests__/Select.test.ts +0 -37
  91. package/components/form/__tests__/UnitInput.test.ts +5 -4
  92. package/components/formatter/BadgeStateFormatter.vue +5 -8
  93. package/components/formatter/ExtensionCache.vue +74 -0
  94. package/components/formatter/InternalExternalIP.vue +0 -2
  95. package/components/formatter/Port.vue +24 -0
  96. package/components/formatter/SecretData.vue +7 -20
  97. package/components/formatter/SecretType.vue +41 -0
  98. package/components/nav/Favorite.vue +1 -5
  99. package/components/nav/Group.vue +3 -16
  100. package/components/nav/Header.vue +13 -39
  101. package/components/nav/Jump.vue +0 -7
  102. package/components/nav/NamespaceFilter.vue +8 -14
  103. package/components/nav/Pinned.vue +1 -1
  104. package/components/nav/TopLevelMenu.vue +17 -5
  105. package/components/nav/Type.vue +1 -14
  106. package/components/nav/__tests__/TopLevelMenu.test.ts +40 -0
  107. package/components/templates/blank.vue +1 -4
  108. package/components/templates/default.vue +0 -8
  109. package/components/templates/home.vue +1 -10
  110. package/components/templates/plain.vue +1 -10
  111. package/package.json +1 -1
  112. package/public/index.html +3 -3
  113. package/components/ActionDropdownShell.vue +0 -71
  114. package/components/DotState.vue +0 -84
  115. package/components/ModalManager.vue +0 -55
  116. package/components/SlideInPanelManager.vue +0 -126
  117. package/components/StatusBadge.vue +0 -77
  118. package/components/__tests__/ModalManager.spec.ts +0 -176
  119. package/components/__tests__/SlideInPanelManager.spec.ts +0 -166
@@ -95,12 +95,10 @@ export default {
95
95
  query: { [AS]: _YAML },
96
96
  };
97
97
 
98
- const tabList = ['集群配置'];
99
98
  return {
100
99
  formRoute,
101
100
  yamlRoute,
102
101
  hasEditComponent,
103
- tabList,
104
102
  };
105
103
  },
106
104
 
@@ -127,28 +125,6 @@ export default {
127
125
 
128
126
  return this.$store.getters['type-map/labelFor'](this.schema, 99);
129
127
  },
130
- _descriptionDisplay() {
131
- const key = this.$route.path.split('/').pop();
132
-
133
- return this.$store.getters['i18n/t'](`typeDescription."${ key.toLowerCase() }"`);
134
- },
135
- demoDisplay() {
136
- const product = this.$store.getters['productId'];
137
- const productId = this.$store.getters['type-map/groupForBasicType'](this.$store.getters['productId'], this._createLocation.params.resource);
138
- const parts = productId?.split('::');
139
- const newString = 'root';
140
-
141
- if (!parts.includes(newString)) {
142
- parts.unshift(newString); // 将字符串添加到数组第一位
143
- }
144
-
145
- const partsEn = parts.map((item) => {
146
- return this.$store.getters['i18n/t'](`typeLabel."${ item.toLowerCase() }"`);
147
- });
148
-
149
- return partsEn;
150
- // return this.$store.getters['i18n/t'](`typeLabel."${ productId.toLowerCase() }"`)
151
- },
152
128
 
153
129
  _isYamlCreatable() {
154
130
  if ( this.isYamlCreatable !== null) {
@@ -189,30 +165,16 @@ export default {
189
165
 
190
166
  <template>
191
167
  <header class="with-subheader">
192
- <!-- <slot name="typeDescription">
168
+ <slot name="typeDescription">
193
169
  <TypeDescription :resource="resource" />
194
- </slot> -->
170
+ </slot>
195
171
  <div class="title">
196
- <div class="excram-list">
197
- <span
198
- v-for="(item,index) in demoDisplay"
199
- :key="index"
200
- >
201
- <span>{{ item }}</span>
202
- <span>/</span>
203
- </span>
204
- <span class="excram-last-name">{{ _typeDisplay }}</span>
205
- </div>
206
- <h1 class="m-0 descrip-name">
172
+ <h1 class="m-0">
207
173
  <TabTitle>{{ _typeDisplay }}</TabTitle> <Favorite
208
174
  v-if="isExplorer"
209
175
  :resource="favoriteResource || resource"
210
176
  />
211
177
  </h1>
212
- <!-- 描述 -->
213
- <div class="masthod-title-description">
214
- {{ _descriptionDisplay }}
215
- </div>
216
178
  <ResourceLoadingIndicator
217
179
  v-if="showIncrementalLoadingIndicator"
218
180
  :resources="loadResources"
@@ -224,15 +186,7 @@ export default {
224
186
  <!--Slot content-->
225
187
  </slot>
226
188
  </div>
227
- <div
228
- v-if="!(tabList.includes(_typeDisplay))"
229
- style="width: 110%;height: 1px;background-color: #D7D7D7;margin-top: 10px;margin-bottom: 20px;margin-left: -20px;margin-right: -20px;"
230
- />
231
- <div
232
- v-if="!(tabList.includes(_typeDisplay))"
233
- class="actions-container"
234
- style="width: 100%;min-height: 32px;text-align: left"
235
- >
189
+ <div class="actions-container">
236
190
  <slot name="actions">
237
191
  <div class="actions">
238
192
  <slot name="extraActions" />
@@ -246,14 +200,14 @@ export default {
246
200
  >
247
201
  {{ _createButtonlabel }}
248
202
  </router-link>
249
- <!-- <router-link
203
+ <router-link
250
204
  v-else-if="_isYamlCreatable"
251
205
  :to="_yamlCreateLocation"
252
206
  class="btn role-primary"
253
207
  :data-testid="componentTestid+'-create-yaml'"
254
208
  >
255
209
  {{ t("resourceList.head.createFromYaml") }}
256
- </router-link> -->
210
+ </router-link>
257
211
  </slot>
258
212
  </div>
259
213
  </slot>
@@ -263,46 +217,30 @@ export default {
263
217
 
264
218
  <style lang="scss" scoped>
265
219
  .title {
266
- /* align-items: center;
267
- display: flex; */
220
+ align-items: center;
221
+ display: flex;
268
222
  h1 {
269
223
  margin: 0;
270
224
  }
271
225
  }
272
226
 
273
227
  header {
274
- /* margin-bottom: 20px; */
228
+ margin-bottom: 20px;
275
229
  }
276
230
 
277
231
  header.with-subheader {
278
- /* grid-template-areas:
232
+ grid-template-areas:
279
233
  'type-banner type-banner'
280
234
  'title actions'
281
235
  'sub-header sub-header'
282
- 'state-banner state-banner'; */
283
- position: relative;
284
- display: unset;
236
+ 'state-banner state-banner';
285
237
  }
286
- .excram-list{
287
- font-size: 14px;
288
- line-height: 22px;
289
- margin-bottom: 20px;
290
- font-family: 'Microsoft YaHei';
291
- }
292
- .excram-last-name{
293
- color: var(--primary);
294
- }
295
- .descrip-name{
296
- font-size: 26px;
297
- font-family: 'Microsoft YaHei';
298
- }
299
- .masthod-title-description{
300
- font-family: 'Microsoft YaHei';
301
- margin: 20px 0px;
302
- }
303
- .actions-container{
304
- /* display: flex; */
305
- /* margin-left: 0px; */
306
- position: absolute;
238
+
239
+ .sub-header {
240
+ grid-area: sub-header;
241
+
242
+ a {
243
+ display: inline-block;
244
+ }
307
245
  }
308
246
  </style>
@@ -207,7 +207,11 @@ export default {
207
207
  type: Number,
208
208
  default: null, // Default comes from the user preference
209
209
  },
210
-
210
+ searchPlaceholder: {
211
+ // search框内的输入提示
212
+ type: String,
213
+ default: '名称'
214
+ },
211
215
  },
212
216
 
213
217
  data() {
@@ -607,6 +611,7 @@ export default {
607
611
  :headers="_headers"
608
612
  :rows="filteredRows"
609
613
  :loading="loading"
614
+ :search-placeholder="searchPlaceholder"
610
615
  :alt-loading="altLoading"
611
616
  :group-by="computedGroupBy"
612
617
  :group="group"
@@ -680,11 +685,11 @@ export default {
680
685
  class="hide"
681
686
  @shortkey="keyAction('edit')"
682
687
  />
683
- <button
688
+ <!-- <button
684
689
  v-shortkey.once="['y']"
685
690
  class="hide"
686
691
  @shortkey="keyAction('yaml')"
687
- />
692
+ /> -->
688
693
  <button
689
694
  v-if="_showBulkActions"
690
695
  v-shortkey.once="['del']"
@@ -20,6 +20,7 @@ import { TYPE_MODES } from '@shell/store/type-map';
20
20
  import { NAME as NAVLINKS } from '@shell/config/product/navlinks';
21
21
  import Group from '@shell/components/nav/Group';
22
22
  import LocaleSelector from '@shell/components/LocaleSelector';
23
+ import { cloud2harvesterhci, harvester2cloud } from '@shell/utils/router';
23
24
 
24
25
  export default {
25
26
  name: 'SideNav',
@@ -154,7 +155,7 @@ export default {
154
155
  },
155
156
 
156
157
  isVirtualProduct() {
157
- return this.rootProduct.name === HARVESTER;
158
+ return this.rootProduct.name === harvester2cloud(HARVESTER);
158
159
  },
159
160
 
160
161
  allNavLinks() {
@@ -236,7 +237,7 @@ export default {
236
237
 
237
238
  getProductsGroups(out, loadProducts, namespaceMode, productMap) {
238
239
  const clusterId = this.$store.getters['clusterId'];
239
- const currentType = this.$route.params.resource || '';
240
+ const currentType = cloud2harvesterhci(this.$route.params.resource) || '';
240
241
 
241
242
  for ( const productId of loadProducts ) {
242
243
  const modes = [TYPE_MODES.BASIC];
@@ -273,13 +273,10 @@ export default {
273
273
  v-clean-tooltip="tooltip(col)"
274
274
  class="content"
275
275
  >
276
- <span
277
- v-clean-html="labelFor(col)"
278
- class="text-no-break"
279
- />
276
+ <span v-clean-html="labelFor(col)" />
280
277
  <span
281
278
  v-if="col.subLabel"
282
- class="text-muted text-no-break"
279
+ class="text-muted"
283
280
  >
284
281
  {{ col.subLabel }}
285
282
  </span>
@@ -299,12 +296,10 @@ export default {
299
296
  <i
300
297
  v-if="isCurrent(col) && !descending"
301
298
  class="icon icon-sort-down icon-stack-1x"
302
- :alt="t('sortableTable.alt.sortingIconDesc')"
303
299
  />
304
300
  <i
305
301
  v-if="isCurrent(col) && descending"
306
302
  class="icon icon-sort-up icon-stack-1x"
307
- :alt="t('sortableTable.alt.sortingIconAsc')"
308
303
  />
309
304
  </span>
310
305
  </div>
@@ -313,7 +308,6 @@ export default {
313
308
  <th
314
309
  v-if="rowActions && hasAdvancedFiltering && tableColsOptions.length"
315
310
  :width="rowActionsWidth"
316
- :align="'left'"
317
311
  >
318
312
  <div
319
313
  ref="table-options"
@@ -462,7 +456,7 @@ export default {
462
456
  }
463
457
 
464
458
  th {
465
- padding: 16.5px 5px;
459
+ padding: 8px 5px;
466
460
  font-weight: normal;
467
461
  border: 0;
468
462
  color: var(--body-text);
@@ -502,7 +496,7 @@ export default {
502
496
  &:last-child {
503
497
  padding-right: 10px;
504
498
  padding-left: 12px;
505
- width: 200px;
499
+
506
500
  }
507
501
 
508
502
  &:not(.sortable) > SPAN {
@@ -1,7 +1,7 @@
1
1
  import debounce from 'lodash/debounce';
2
2
 
3
3
  // Use a visible display type to reduce flickering
4
- const displayType = 'inline-flex';
4
+ const displayType = 'inline-block';
5
5
 
6
6
  export default {
7
7