Skip to content

Commit 9d89c55

Browse files
committed
Fixed: Fix the issue of k8s missing the assistant tool
1 parent 16bf77b commit 9d89c55

5 files changed

Lines changed: 16 additions & 13 deletions

File tree

src/app/elements/asset-tree/asset-tree.component.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -238,9 +238,9 @@ export class ElementAssetTreeComponent implements OnInit {
238238
return;
239239
}
240240

241-
// if (treeNode.meta.data.platform_type === 'k8s') {
242-
// return connectOnNewPage(treeNode, 'auto');
243-
// }
241+
if (treeNode.meta.data.platform_type === 'k8s') {
242+
return connectOnNewPage(treeNode, 'auto');
243+
}
244244

245245
if (this.isOpenNewWindow) {
246246
connectOnNewPage(treeNode, 'auto');

src/app/elements/chat/chat.component.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,8 @@ export class ElementChatComponent implements OnInit, OnDestroy, AfterViewInit {
5555
get isShowSetting() {
5656
const connectMethods = ['koko', 'lion', 'tinker', 'panda'];
5757

58-
// sftp 不展示设置按钮
59-
if (this.currentView.protocol === 'sftp') {
58+
// sftp 或 k8s 不展示设置按钮
59+
if (this.currentView.protocol === 'sftp' || this.currentView.protocol === 'k8s') {
6060
return false;
6161
}
6262

src/app/elements/connect/connect.component.ts

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -153,11 +153,12 @@ export class ElementConnectComponent implements OnInit, OnDestroy {
153153
return;
154154
}
155155

156-
if (connToken.protocol === 'k8s') {
157-
const url = `${window.location.protocol}//${window.location.host}/luna/k8s/${connToken.id}?asset=${asset.id}`;
158-
window.open(url);
159-
return;
160-
}
156+
// if (connToken.protocol === 'k8s') {
157+
// const url = `${window.location.protocol}//${window.location.host}/luna/k8s/${connToken.id}?asset=${asset.id}`;
158+
// window.open(url);
159+
// return;
160+
// console.log('k8s', this.viewSrv)
161+
// }
161162

162163
// 分屏连接
163164
if (splitConnect) {
@@ -168,7 +169,9 @@ export class ElementConnectComponent implements OnInit, OnDestroy {
168169
if (connectMethod.value.endsWith('_guide')) {
169170
return this.createWebView(asset, connectInfo, connToken);
170171
}
172+
171173
let appletConnectMethod = connectOption ? connectOption['appletConnectMethod'] : 'web';
174+
172175
if (!this._settingSvc.hasXPack()) {
173176
appletConnectMethod = 'web';
174177
}

src/app/pages/connect/connect.component.html

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1-
<div #contentWindow *ngIf="isDirect">
2-
<app-face-monitor></app-face-monitor>
1+
<app-face-monitor></app-face-monitor>
2+
<elements-chat></elements-chat>
33

4+
<div #contentWindow *ngIf="isDirect">
45
<div class="terminal-connect" *ngIf="view && view.connectMethod?.component === 'koko'">
56
<div *ngIf="view.connectMethod?.value === 'web_sftp'" style="height: 100%; width: 100%">
67
<elements-content-window *ngIf="view" [view]="view"></elements-content-window>

src/app/pages/connect/connect.component.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -328,7 +328,6 @@ export class PagesConnectComponent implements OnInit, OnDestroy {
328328
'node'
329329
);
330330
} else if (view) {
331-
// 普通模式接收视图
332331
this.view = view;
333332
this.view.active = true;
334333
}

0 commit comments

Comments
 (0)