Skip to content

Commit

Permalink
Perf: Change SFTP Connect Token
Browse files Browse the repository at this point in the history
  • Loading branch information
ZhaoJiSen committed Dec 31, 2024
1 parent 426e714 commit f99fc7b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
3 changes: 1 addition & 2 deletions ui/src/components/pamFileList/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -203,8 +203,7 @@ const { t } = useI18n();
const fileManageStore = useFileManageStore();
const isLoaded = ref(false);
// todo)) 还原为 false
const isShowList = ref(true);
const isShowList = ref(false);
const settingDrawer = ref(false);
const tabDefaultValue = ref('fileManage');
const tableData = ref<RowData[]>([]);
Expand Down
6 changes: 3 additions & 3 deletions ui/src/hooks/useFileManage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@ import { type UploadFileInfo, useMessage } from 'naive-ui';
import { useWebSocket } from '@vueuse/core';
import { useFileManageStore } from '@/store/modules/fileManage.ts';

import { v4 as uuid } from 'uuid';
import { BASE_WS_URL } from '@/config';

import mittBus from '@/utils/mittBus.ts';
import { v4 as uuid } from 'uuid';

import type { Ref } from 'vue';
import type { RouteRecordNameGeneric } from 'vue-router';
import type { MessageApiInjection } from 'naive-ui/es/message/src/MessageProvider';
import type { IFileManage, IFileManageConnectData, IFileManageSftpFileItem } from '@/hooks/interface';
import { Ref } from 'vue';

export enum MessageType {
CONNECT = 'CONNECT',
Expand Down Expand Up @@ -42,7 +42,7 @@ const getFileManageUrl = () => {
let fileConnectionUrl: string = '';

if (routeName === 'Terminal') {
fileConnectionUrl = urlParams ? `${BASE_WS_URL}/koko/ws/sftp/?${urlParams.toString()}` : '';
fileConnectionUrl = urlParams ? `${BASE_WS_URL}/koko/ws/sftp/?token=${urlParams.toString().split('&')[1].split('=')[1]}` : '';

return fileConnectionUrl;
}
Expand Down

0 comments on commit f99fc7b

Please sign in to comment.