dashboard-shell-shell 0.0.1000000000001128 → 0.0.1000000000001130

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.
@@ -147,9 +147,7 @@
147
147
  }
148
148
 
149
149
  .v-popper__popper.v-popper--theme-dropdown {
150
- border-radius: 4px;
151
150
  z-index: z-index('tooltip');
152
- border: 1px solid #d9d9d9 !important;
153
151
 
154
152
  &.containerLogsDropdown, &.fleet-summary-tooltip{
155
153
  .v-popper__arrow-container {
@@ -206,8 +204,4 @@
206
204
  .v-popper__inner {
207
205
  padding: 0px;
208
206
  }
209
- }
210
-
211
- // .v-popper__arrow-container {
212
- // display: none;
213
- // }
207
+ }
@@ -80,18 +80,13 @@ export default {
80
80
 
81
81
  pathToBrandedImage() {
82
82
 
83
- console.log(this.fileName, ' this.fileName;')
84
-
85
83
  if (this.fileName === 'rancher-logo.svg' || this.supportCustomLogo) {
86
84
  if (this.theme === 'dark' && this.uiLogoDark) {
87
85
 
88
- console.log(this.uiLogoDark, ' this.uiLogoDark;')
89
-
90
86
  return this.uiLogoDark;
91
87
  }
92
88
 
93
89
  if (this.uiLogoLight) {
94
- console.log(this.uiLogoLight, ' this.uiLogoLight;')
95
90
 
96
91
  return this.uiLogoLight;
97
92
  }
@@ -99,13 +94,11 @@ export default {
99
94
 
100
95
  if (this.fileName === 'banner.svg') {
101
96
  if (this.theme === 'dark' && this.uiBannerDark) {
102
- console.log(this.uiBannerDark, ' this.uiBannerDark;')
103
97
 
104
98
  return this.uiBannerDark;
105
99
  }
106
100
 
107
101
  if (this.uiBannerLight) {
108
- console.log(this.uiBannerLight, ' this.uiBannerLight;')
109
102
 
110
103
  return this.uiBannerLight;
111
104
  }
@@ -113,13 +106,11 @@ export default {
113
106
 
114
107
  if (this.fileName === 'login-landscape.svg') {
115
108
  if (this.theme === 'dark' && this.uiLoginBackgroundDark) {
116
- console.log(this.uiLoginBackgroundDark, ' this.uiLoginBackgroundDark;')
117
109
 
118
110
  return this.uiLoginBackgroundDark;
119
111
  }
120
112
 
121
113
  if (this.uiLoginBackgroundLight) {
122
- console.log(this.uiLoginBackgroundLight, ' this.uiLoginBackgroundLight;')
123
114
 
124
115
  return this.uiLoginBackgroundLight;
125
116
  }
@@ -127,8 +118,6 @@ export default {
127
118
 
128
119
  if (!this.brand) {
129
120
 
130
- console.log(this.defaultPathToBrandedImage, ' this.defaultPathToBrandedImage;')
131
-
132
121
  return this.defaultPathToBrandedImage;
133
122
  } else {
134
123
  if (this.theme === 'dark' || this.dark) {
@@ -140,8 +129,6 @@ export default {
140
129
  return require(`~shell/assets/brand/${ this.brand }/${ this.fileName }`);
141
130
  } catch {}
142
131
 
143
- console.log(this.defaultPathToBrandedImage, ' this.defaultPathToBrandedImage;')
144
-
145
132
  return this.defaultPathToBrandedImage;
146
133
  }
147
134
  },
@@ -441,6 +441,7 @@ export default {
441
441
  </router-link>
442
442
  </template>
443
443
  </Masthead>
444
+ <!-- harvester------------------------------------------------------3 -->
444
445
  <!-- Extensions area -->
445
446
  <ExtensionPanel
446
447
  :resource="{}"
@@ -494,167 +494,245 @@ export default {
494
494
  {{ (realMode === 'view'? '查看': realMode === 'edit' ? '编辑':'创建') + parent.displayName }}
495
495
  </span>
496
496
  </div>
497
-
498
- <header>
499
- <div class="title">
500
- <div class="primaryheader">
501
- <span class="primary-title">
502
-
503
- <!-- 图标区 -->
504
- <span v-if="menuIcon && !(parentRouteOverride === 'account' && resource=== 'token')" class="detailIcon-span">
505
- <!-- 如果是账户 API token,则显示图片,否则显示 icon -->
506
- <img
507
- v-if="parentRouteOverride === 'account' && resource=== 'token'"
508
- :src="Svg"
509
- style="margin-top: 4px; margin-left: 5px;"
510
- >
511
- <i
512
- v-else
513
- :class="'icon-'+ menuIcon + ' detailIcon'"
514
- />
515
- </span>
516
-
517
- <!-- 资源标题(创建时只显示“创建+名称”,否则显示“名称:”) -->
518
- <span class="detailIcon-span-title">{{ realMode=== 'create'? '创建': '' }}{{ parent.displayName }}{{ realMode=== 'create'? '': '名称:' }}</span>
519
-
520
- <!-- 如果不是创建模式,显示操作描述 -->
521
- <span v-if="realMode !== 'create'">
522
-
523
- <!-- 如果有覆盖方法,优先显示覆盖内容 -->
524
- <span v-if="value.detailPageHeaderActionOverride && value.detailPageHeaderActionOverride(realMode)">{{ value.detailPageHeaderActionOverride(realMode) }}</span>
525
-
526
- <!-- 否则用 t 组件国际化显示 -->
527
- <t
528
- v-else
529
- :k="'resourceDetail.header.' + realMode"
530
- :subtype="resourceSubtype"
531
- :name="displayName"
532
- :escapehtml="false"
533
- />
534
- </span>
535
-
536
- <!-- 状态点(DotState 组件) -->
537
- <DotState
538
- v-if="!isCreate && parent.showState"
539
- class="masthead-state"
540
- :value="value"
541
- />
542
-
543
- <!-- Istio 注入状态 -->
544
- <span
545
- v-if="!isCreate && value.injectionEnabled"
546
- class="masthead-istio"
497
+ <header>
498
+ <div class="title">
499
+ <div class="primaryheader">
500
+ <span class="primary-title">
501
+ <!-- <nuxt-link
502
+ v-if="location"
503
+ :to="location"
504
+ >
505
+ {{ parent.displayName }}:
506
+ </nuxt-link> -->
507
+ <span class="detailIcon-span">
508
+ <img
509
+ v-if="parentRouteOverride === 'account' && resource=== 'token'"
510
+ :src="Svg"
511
+ style="margin-top: 4px; margin-left: 5px;"
547
512
  >
548
- <i
549
- v-clean-tooltip="t('projectNamespaces.isIstioInjectionEnabled')"
550
- class="icon icon-sm icon-istio"
551
- />
552
- </span>
513
+ <i
514
+ v-else
515
+ :class="'icon-'+ menuIcon + ' detailIcon'"
516
+ />
553
517
  </span>
554
-
555
- <!-- 如果有返回路径,显示分隔符和“返回”链接 -->
518
+ <span class="detailIcon-span-title">{{ realMode=== 'create'? '创建': '' }}{{ parent.displayName }}{{ realMode=== 'create'? '': '名称:' }}</span>
519
+ <span v-if="realMode !== 'create'">
520
+ <span v-if="value.detailPageHeaderActionOverride && value.detailPageHeaderActionOverride(realMode)">{{ value.detailPageHeaderActionOverride(realMode) }}</span>
521
+ <t
522
+ v-else
523
+ :k="'resourceDetail.header.' + realMode"
524
+ :subtype="resourceSubtype"
525
+ :name="displayName"
526
+ :escapehtml="false"
527
+ />
528
+ </span>
529
+ <DotState
530
+ v-if="!isCreate && parent.showState"
531
+ class="masthead-state"
532
+ :value="value"
533
+ />
556
534
  <span
557
- v-if="location"
558
- class="valid"
559
- >|</span>
560
- <router-link
561
- v-if="location"
562
- :to="location"
535
+ v-if="!isCreate && value.injectionEnabled"
536
+ class="masthead-istio"
563
537
  >
564
- 返回
565
- </router-link>
566
- </div>
538
+ <i
539
+ v-clean-tooltip="t('projectNamespaces.isIstioInjectionEnabled')"
540
+ class="icon icon-sm icon-istio"
541
+ />
542
+ </span>
543
+ </span>
544
+ <span
545
+ v-if="location"
546
+ class="valid"
547
+ >|</span>
548
+ <router-link
549
+ v-if="location"
550
+ :to="location"
551
+ >
552
+ 返回
553
+ </router-link>
554
+ <!-- <h1>
555
+ <TabTitle
556
+ v-if="isCreate"
557
+ :showChild="false"
558
+ >
559
+ {{ parent.displayName }}
560
+ </TabTitle>
561
+ <TabTitle
562
+ v-else
563
+ :showChild="false"
564
+ >
565
+ {{ displayName }}
566
+ </TabTitle>
567
+ <router-link
568
+ v-if="location"
569
+ :to="location"
570
+ role="link"
571
+ class="masthead-resource-list-link"
572
+ :aria-label="parent.displayName"
573
+ >
574
+ {{ parent.displayName }}:
575
+ </router-link>
576
+ <span v-else>{{ parent.displayName }}:</span>
577
+ <span v-if="value?.detailPageHeaderActionOverride && value?.detailPageHeaderActionOverride(realMode)">{{ value?.detailPageHeaderActionOverride(realMode) }}</span>
578
+ <t
579
+ v-else
580
+ class="masthead-resource-title"
581
+ :k="'resourceDetail.header.' + realMode"
582
+ :subtype="resourceSubtype"
583
+ :name="displayName"
584
+ :escapehtml="false"
585
+ />
586
+ <BadgeState
587
+ v-if="!isCreate && parent.showState"
588
+ class="masthead-state"
589
+ :value="value"
590
+ />
591
+ <span
592
+ v-if="!isCreate && value.injectionEnabled"
593
+ class="masthead-istio"
594
+ >
595
+ <i
596
+ v-clean-tooltip="t('projectNamespaces.isIstioInjectionEnabled')"
597
+ class="icon icon-sm icon-istio"
598
+ />
599
+ </span>
600
+ <a
601
+ v-if="dev && !!resourceExternalLink"
602
+ v-clean-tooltip="t(resourceExternalLink.tipsKey || 'generic.resourceExternalLinkTips')"
603
+ class="resource-external"
604
+ rel="nofollow noopener noreferrer"
605
+ target="_blank"
606
+ :href="resourceExternalLink.url"
607
+ >
608
+ <i class="icon icon-external-link" />
609
+ </a>
610
+ </h1> -->
567
611
  </div>
568
-
569
- <!-- 右侧操作按钮区域(支持通过 slot 覆盖) -->
570
- <slot name="right">
571
- <div class="actions-container align-start" style="padding-right: 15px;">
572
- <div class="actions">
573
-
574
- <!-- 详情模式下的主操作按钮 -->
612
+ <!-- <div
613
+ v-if="!isCreate"
614
+ class="subheader"
615
+ >
616
+ <span v-if="isNamespace && project">{{ t("resourceDetail.masthead.project") }}: <router-link :to="project.detailLocation">{{ project.nameDisplay }}</router-link></span>
617
+ <span v-else-if="isWorkspace">{{ t("resourceDetail.masthead.workspace") }}: <router-link :to="workspaceLocation">{{ namespace }}</router-link></span>
618
+ <span v-else-if="namespace && !hasMultipleNamespaces">
619
+ {{ t("resourceDetail.masthead.namespace") }}:
620
+ <router-link
621
+ v-if="!hideNamespaceLocation"
622
+ :to="namespaceLocation"
623
+ data-testid="masthead-subheader-namespace"
624
+ >
625
+ {{ namespace }}
626
+ </router-link>
627
+ <span v-else>
628
+ {{ namespace }}
629
+ </span>
630
+ </span>
631
+ <span v-if="parent.showAge">
632
+ {{ t("resourceDetail.masthead.age") }}:
633
+ <LiveDate
634
+ class="live-date"
635
+ :value="value.creationTimestamp"
636
+ />
637
+ </span>
638
+ <span
639
+ v-if="value.showCreatedBy"
640
+ data-testid="masthead-subheader-createdBy"
641
+ >
642
+ {{ t("resourceDetail.masthead.createdBy") }}:
643
+ <router-link
644
+ v-if="value.createdBy.location"
645
+ :to="value.createdBy.location"
646
+ data-testid="masthead-subheader-createdBy-link"
647
+ >
648
+ {{ value.createdBy.displayName }}
649
+ </router-link>
650
+ <span
651
+ v-else
652
+ data-testid="masthead-subheader-createdBy_plain-text"
653
+ >
654
+ {{ value.createdBy.displayName }}
655
+ </span>
656
+ </span>
657
+ <span v-if="value.showPodRestarts">{{ t("resourceDetail.masthead.restartCount") }}:<span class="live-data"> {{ value.restartCount }}</span></span>
658
+ </div> -->
659
+ </div>
660
+ <slot name="right">
661
+ <div class="actions-container align-start">
662
+ <div class="actions">
663
+ <button
664
+ v-if="detailsAction && currentView === DETAIL_VIEW && isView"
665
+ type="button"
666
+ class="btn role-primary actions mr-10"
667
+ :disabled="!detailsAction.enabled"
668
+ @click="invokeDetailsAction"
669
+ >
670
+ {{ detailsAction.label }}
671
+ </button>
672
+ <ButtonGroup
673
+ v-if="showSensitiveToggle"
674
+ :value="!!hideSensitiveData"
675
+ icon-size="lg"
676
+ :options="sensitiveOptions"
677
+ class="mr-10"
678
+ @update:value="toggleSensitiveData"
679
+ />
680
+
681
+ <ButtonGroup
682
+ v-if="viewOptions && isView"
683
+ v-model:value="currentView"
684
+ :options="viewOptions"
685
+ class="mr-10"
686
+ />
687
+
688
+ <template v-if="featureDropdownMenu">
689
+ <ActionMenu
690
+ v-if="isView"
691
+ button-role="multiAction"
692
+ button-size="compact"
693
+ :resource="value"
694
+ data-testid="masthead-action-menu"
695
+ />
696
+ </template>
697
+ <template v-else>
575
698
  <button
576
- v-if="detailsAction && currentView === DETAIL_VIEW && isView"
699
+ v-if="isView"
700
+ ref="actions"
701
+ data-testid="masthead-action-menu"
702
+ aria-haspopup="true"
577
703
  type="button"
578
- class="btn role-primary actions mr-10"
579
- :disabled="!detailsAction.enabled"
580
- @click="invokeDetailsAction"
704
+ class="btn role-multi-action actions"
705
+ @click="showActions"
581
706
  >
582
- {{ detailsAction.label }}
707
+ <i class="icon icon-actions" />
583
708
  </button>
584
-
585
- <!-- 敏感信息显示/隐藏切换 -->
586
- <ButtonGroup
587
- v-if="showSensitiveToggle"
588
- :value="!!hideSensitiveData"
589
- icon-size="lg"
590
- :options="sensitiveOptions"
591
- class="mr-10"
592
- @update:value="toggleSensitiveData"
593
- />
594
-
595
- <!-- 视图切换按钮 -->
596
- <ButtonGroup
597
- v-if="viewOptions && isView"
598
- v-model:value="currentView"
599
- :options="viewOptions"
600
- class="mr-10"
601
- />
602
-
603
- <!-- 功能菜单:优先使用 ActionMenu 组件 -->
604
- <template v-if="featureDropdownMenu">
605
- <ActionMenu
606
- v-if="isView"
607
- button-role="multiAction"
608
- button-size="compact"
609
- :resource="value"
610
- data-testid="masthead-action-menu"
611
- />
612
- </template>
613
-
614
- <!-- 如果没有 featureDropdownMenu,则使用普通的多操作按钮 -->
615
- <template v-else>
616
- <button
617
- v-if="isView"
618
- ref="actions"
619
- data-testid="masthead-action-menu"
620
- aria-haspopup="true"
621
- type="button"
622
- class="btn role-multi-action actions"
623
- @click="showActions"
624
- >
625
- <i class="icon icon-actions" />
626
- </button>
627
- </template>
628
- </div>
709
+ </template>
629
710
  </div>
630
- </slot>
631
- </header>
632
-
633
- <!-- 扩展区域 -->
634
- <ExtensionPanel
635
- :resource="value"
636
- :type="extensionType"
637
- :location="extensionLocation"
638
- />
639
-
640
- <!-- 顶部状态 Banner -->
641
- <Banner
642
- v-if="banner && isView && !parent.hideBanner"
643
- class="state-banner mb-10"
644
- :color="banner.color"
645
- :label="banner.message"
646
- />
647
-
648
- <!-- 管理警告 Banner -->
649
- <Banner
650
- v-if="managedWarning.show"
651
- color="warning"
652
- class="mb-20"
653
- :label="t('resourceDetail.masthead.managedWarning', managedWarning)"
654
- />
655
-
656
- <!-- 内容插槽 -->
657
- <slot />
711
+ </div>
712
+ </slot>
713
+ </header>
714
+
715
+ <!-- Extension area -->
716
+ <ExtensionPanel
717
+ :resource="value"
718
+ :type="extensionType"
719
+ :location="extensionLocation"
720
+ />
721
+
722
+ <Banner
723
+ v-if="banner && isView && !parent.hideBanner"
724
+ class="state-banner mb-10"
725
+ :color="banner.color"
726
+ :label="banner.message"
727
+ />
728
+ <Banner
729
+ v-if="managedWarning.show"
730
+ color="warning"
731
+ class="mb-20"
732
+ :label="t('resourceDetail.masthead.managedWarning', managedWarning)"
733
+ />
734
+
735
+ <slot />
658
736
  </div>
659
737
  </div>
660
738
  </template>
@@ -82,12 +82,6 @@ export default {
82
82
  query: { [AS]: _YAML },
83
83
  };
84
84
 
85
- console.log(schema, ' schema-----------------------------------------2');
86
-
87
- console.log(_typeDisplay, ' _typeDisplay-------------------------------------2');
88
-
89
- console.log(_isCreatable, ' _isCreatable----------------------------------2');
90
-
91
85
  const tabList = ['集群配置'];
92
86
  return {
93
87
  formRoute,