Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
dinky
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wangpeng
dinky
Commits
a0fb72a1
Unverified
Commit
a0fb72a1
authored
Apr 11, 2023
by
Licho
Committed by
GitHub
Apr 11, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: improve websocket connection and subcrib opportunity. (#1871)
parent
2ea701a4
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
7 deletions
+3
-7
index.tsx
.../src/components/Studio/StudioConsole/StudioData/index.tsx
+2
-6
stompClientUtil.ts
dlink-web/src/utils/stompClientUtil.ts
+1
-1
No files found.
dlink-web/src/components/Studio/StudioConsole/StudioData/index.tsx
View file @
a0fb72a1
...
...
@@ -54,11 +54,10 @@ const DatePage = (props: any) => {
useEffect
(()
=>
{
return
()
=>
{
unRegisterWatchTable
({
id
,
table
:
tableName
}).
then
(
res
=>
{
console
.
log
(
"unsubscribe: "
+
tableName
)
subScription
?.
unsubscribe
();
});
}
},
[]);
},
[
subScription
]);
const
editorDidMountHandle
=
(
editor
:
any
,
monaco
:
any
)
=>
{
onSearchName
(
title
);
...
...
@@ -83,7 +82,7 @@ const DatePage = (props: any) => {
};
const
StudioData
=
(
props
:
any
)
=>
{
const
{
height
,
isActive
,
current
}
=
props
;
const
{
height
,
current
}
=
props
;
const
[
panes
,
setPanes
]
=
useState
<
[{
title
:
string
,
key
:
string
,
content
:
Component
}]
>
([]);
const
addTab
=
async
()
=>
{
...
...
@@ -117,9 +116,6 @@ const StudioData = (props: any) => {
useEffect
(()
=>
{
stompClientUtil
.
connect
();
},
[
isActive
])
useEffect
(()
=>
{
return
()
=>
{
stompClientUtil
.
disconnect
();
}
...
...
dlink-web/src/utils/stompClientUtil.ts
View file @
a0fb72a1
import
Stomp
,
{
Subscription
}
from
"stompjs"
;
import
Stomp
from
"stompjs"
;
class
StompClientUtil
{
stompClient
:
Stomp
.
Client
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment