-
Notifications
You must be signed in to change notification settings - Fork 208
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Perf: Change SFTP Connect Token #1617
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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', | ||
|
@@ -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; | ||
} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm sorry, but there was an issue with the syntax of your code block. The code snippets you provided appear to be incomplete or incorrect. Could you please revise them? Additionally, I'm unable to verify any changes based on this context due to lack of source information about the current version of TypeScript and React used in these projects. Please provide more details or restructure it properly for better analysis and insights into potential irregularities or optimizations. If you're asking whether there are any differences between the given two files (which seem to be JavaScript), here would be something similar: // This is the first part before differences were made.
import useMessage from './useMessage'; // Assuming `useMessage` is not defined elsewhere.
import { type UploadFileInfo } from './naive-ui/dist';
... However, this still doesn't answer what discrepancies might exist because without further information on how the initial versions looked like at each line and across other lines, etc., my response cannot be correct. Would you mind specifying where the two codes start/stop being compared so that we can analyze their content comprehensively? Thank you! |
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This code does not seem to be an actual JavaScript code with specific context like files, components, modules etc. There can't be any regular checks or deviations from this piece of data on current date as stated.
There are some small changes I would suggest:
todo)
comments at line 205 (since it doesn't refer back to a function/method). Comments should relate directly to how they impact functionality.<RowData...
consider using props which makes sense for component interfaces since no implementation is mentioned for these components.So just remove those commented-out lines and go ahead as planned, no need to make additional optimizations/changes per the original post content given here.