mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-20 03:06:00 +00:00
import export- cancelable, better design
This commit is contained in:
@@ -6,6 +6,7 @@ import TableControl, { TableColumn } from '../utility/TableControl';
|
||||
import formatFileSize from '../utility/formatFileSize';
|
||||
import resolveApi from '../utility/resolveApi';
|
||||
import getElectron from '../utility/getElectron';
|
||||
import ErrorInfo from '../widgets/ErrorInfo';
|
||||
|
||||
export default function RunnerOutputFiles({ runnerId, executeNumber }) {
|
||||
const socket = useSocket();
|
||||
@@ -31,6 +32,10 @@ export default function RunnerOutputFiles({ runnerId, executeNumber }) {
|
||||
|
||||
const electron = getElectron();
|
||||
|
||||
if (!files || files.length == 0) {
|
||||
return <ErrorInfo message="No output files" icon="img alert" />;
|
||||
}
|
||||
|
||||
return (
|
||||
<TableControl rows={files}>
|
||||
<TableColumn fieldName="name" header="Name" />
|
||||
|
||||
@@ -2,6 +2,7 @@ import _ from 'lodash';
|
||||
import React from 'react';
|
||||
import MessagesView from './MessagesView';
|
||||
import useSocket from '../utility/SocketProvider';
|
||||
import ErrorInfo from '../widgets/ErrorInfo';
|
||||
|
||||
export default function SocketMessagesView({
|
||||
eventName,
|
||||
@@ -41,6 +42,10 @@ export default function SocketMessagesView({
|
||||
}
|
||||
}, [eventName, socket]);
|
||||
|
||||
if (!displayedMessages || displayedMessages.length == 0) {
|
||||
return <ErrorInfo message="No messages" icon="img alert" />;
|
||||
}
|
||||
|
||||
return (
|
||||
<MessagesView
|
||||
items={displayedMessages}
|
||||
|
||||
Reference in New Issue
Block a user