Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,9 @@ import LiveView from '../LiveView/LiveView'
import SessionData, { createSessionData } from '../../models/session-data'

function descendingComparator<T> (a: T, b: T, orderBy: keyof T): number {
if (orderBy === 'sessionDurationMillis') {
return Number(b[orderBy]) - Number(a[orderBy])
}
if (b[orderBy] < a[orderBy]) {
return -1
}
Expand Down Expand Up @@ -94,7 +97,7 @@ const headCells: HeadCell[] = [
{ id: 'id', numeric: false, label: 'Session' },
{ id: 'capabilities', numeric: false, label: 'Capabilities' },
{ id: 'startTime', numeric: false, label: 'Start time' },
{ id: 'sessionDurationMillis', numeric: false, label: 'Duration' },
{ id: 'sessionDurationMillis', numeric: true, label: 'Duration' },
{ id: 'nodeUri', numeric: false, label: 'Node URI' }
]

Expand Down Expand Up @@ -170,7 +173,7 @@ function RunningSessions (props) {
const [rowOpen, setRowOpen] = useState('')
const [rowLiveViewOpen, setRowLiveViewOpen] = useState('')
const [order, setOrder] = useState<Order>('asc')
const [orderBy, setOrderBy] = useState<keyof SessionData>('startTime')
const [orderBy, setOrderBy] = useState<keyof SessionData>('sessionDurationMillis')
const [selected, setSelected] = useState<string[]>([])
const [page, setPage] = useState(0)
const [dense, setDense] = useState(false)
Expand Down
Loading