mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-20 05:26:00 +00:00
query fixes
This commit is contained in:
@@ -75,6 +75,7 @@ export default function MessagesView({ items, onMessageClick }) {
|
||||
<StyledHeader>Message</StyledHeader>
|
||||
<StyledHeader>Time</StyledHeader>
|
||||
<StyledHeader>Delta</StyledHeader>
|
||||
<StyledHeader>Duration</StyledHeader>
|
||||
<StyledHeader>Procedure</StyledHeader>
|
||||
<StyledHeader>Line</StyledHeader>
|
||||
</tr>
|
||||
@@ -85,6 +86,11 @@ export default function MessagesView({ items, onMessageClick }) {
|
||||
<StyledCell>{row.message}</StyledCell>
|
||||
<StyledCell>{moment(row.time).format('HH:mm:ss')}</StyledCell>
|
||||
<StyledCell>{formatDuration(new Date(row.time).getTime() - time0)}</StyledCell>
|
||||
<StyledCell>
|
||||
{index > 0
|
||||
? formatDuration(new Date(row.time).getTime() - new Date(items[index - 1].time).getTime())
|
||||
: 'n/a'}
|
||||
</StyledCell>
|
||||
<StyledCell>{row.procedure}</StyledCell>
|
||||
<StyledCell>{row.line}</StyledCell>
|
||||
</StyledRow>
|
||||
|
||||
@@ -2,12 +2,16 @@ import React from 'react';
|
||||
import MessagesView from './MessagesView';
|
||||
import useSocket from '../utility/SocketProvider';
|
||||
|
||||
export default function SessionMessagesView({ sessionId, onMessageClick }) {
|
||||
export default function SessionMessagesView({ sessionId, onMessageClick, executeNumber }) {
|
||||
const [messages, setMessages] = React.useState([]);
|
||||
const socket = useSocket();
|
||||
|
||||
const handleInfo = React.useCallback((info) => setMessages((items) => [...items, info]), []);
|
||||
|
||||
React.useEffect(() => {
|
||||
setMessages([]);
|
||||
}, [executeNumber]);
|
||||
|
||||
React.useEffect(() => {
|
||||
if (sessionId && socket) {
|
||||
socket.on(`session-info-${sessionId}`, handleInfo);
|
||||
|
||||
Reference in New Issue
Block a user