import { Fragment } from 'inferno'; import { useBackend } from '../backend'; import { Button, LabeledList, NoticeBox, Section, Tabs, Input } from '../components'; export const TeleLogBrowser = props => { const { act, data } = useBackend(props); const { notice, network = "NULL", servers, selected = null, selected_logs, } = data; const operational = (selected && selected.status); return ( {!!notice && ( {notice} )}
act('network', { 'value': value, })} />
{(servers && servers.length) ? ( {servers.map(server => { return ( act('viewmachine', { 'value': server.id, })} /> )}> {`${server.name} (${server.id})`} ); })} ) : ( '404 Servers not found. Have you tried scanning the network?' )}
{(operational && selected_logs) ? ( selected_logs.map(logs => { return (
act('delete', { 'value': logs.ref, })} /> )}> {logs.name} {logs.input_type} {logs.source && ( {`[${logs.source.name}] (Job: [${logs.source.job}])`} )} {logs.race && ( {logs.race} )} {logs.message}
); }) ) : ( "No server selected!" )}
); };