code refactoring
This commit is contained in:
@@ -99,10 +99,18 @@ const LiveStreamMonitorView: React.FC = () => {
|
|||||||
{mapStatusToChip(progress[k].Status)}
|
{mapStatusToChip(progress[k].Status)}
|
||||||
</TableCell>
|
</TableCell>
|
||||||
<TableCell align='right'>
|
<TableCell align='right'>
|
||||||
{formatMicro(Number(progress[k].WaitTime))}
|
{/* TODO: change to enum */}
|
||||||
|
{progress[k].Status === 0
|
||||||
|
? formatMicro(Number(progress[k].WaitTime))
|
||||||
|
: "-"
|
||||||
|
}
|
||||||
</TableCell>
|
</TableCell>
|
||||||
<TableCell align='right'>
|
<TableCell align='right'>
|
||||||
{new Date(progress[k].LiveDate).toLocaleString()}
|
{/* TODO: change to enum */}
|
||||||
|
{progress[k].Status === 0
|
||||||
|
? new Date(progress[k].LiveDate).toLocaleString()
|
||||||
|
: "-"
|
||||||
|
}
|
||||||
</TableCell>
|
</TableCell>
|
||||||
<TableCell align='right'>
|
<TableCell align='right'>
|
||||||
<Button variant='contained' size='small' onClick={() => stop(k)}>
|
<Button variant='contained' size='small' onClick={() => stop(k)}>
|
||||||
|
|||||||
@@ -152,7 +152,6 @@ func (l *LiveStream) monitorStartTime(r io.Reader, doneWait chan struct{}) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const TRIES = 5
|
const TRIES = 5
|
||||||
|
|
||||||
/*
|
/*
|
||||||
if it's waiting a livestream the 5th line will indicate the time to live
|
if it's waiting a livestream the 5th line will indicate the time to live
|
||||||
its a dumb and not robust method.
|
its a dumb and not robust method.
|
||||||
|
|||||||
Reference in New Issue
Block a user