import export- cancelable, better design

This commit is contained in:
Jan Prochazka
2020-11-15 18:55:42 +01:00
parent eaf45d8768
commit 801bf05a31
5 changed files with 110 additions and 43 deletions

View File

@@ -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" />

View File

@@ -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}