forked from hpcc-systems/HPCC-Platform
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathActivitiesCards.tsx
More file actions
49 lines (46 loc) · 1.91 KB
/
Copy pathActivitiesCards.tsx
File metadata and controls
49 lines (46 loc) · 1.91 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
import * as React from "react";
import { Toolbar, ToolbarButton, Divider } from "@fluentui/react-components";
import { ArrowClockwise20Regular } from "@fluentui/react-icons";
import nlsHPCC from "src/nlsHPCC";
import { QueueCards } from "./cards/QueueCard";
import { HolyGrail } from "../layouts/HolyGrail";
import { SizeMe } from "../layouts/SizeMe";
import { useBuildInfo } from "../hooks/platform";
import { DiskUsageCards } from "./cards/DiskUsageCard";
interface ActivitiesProps {
}
export const Activities: React.FunctionComponent<ActivitiesProps> = ({
}) => {
const [, { isContainer }] = useBuildInfo();
const [refreshToken, setRefreshToken] = React.useState(0);
return <HolyGrail
header={
<Toolbar>
<ToolbarButton appearance="subtle" icon={<ArrowClockwise20Regular />} aria-label={nlsHPCC.Refresh} onClick={() => setRefreshToken(t => t + 1)}>
{nlsHPCC.Refresh}
</ToolbarButton>
</Toolbar>
}
main={
<SizeMe>{({ size }) => {
return <div style={{ position: "relative", width: "100%", height: "100%" }}>
<div style={{ position: "absolute", width: "100%", height: `${size.height}px`, overflowY: "auto" }}>
{
!isContainer ?
<>
<Divider>{nlsHPCC.DiskUsage}</Divider>
<DiskUsageCards refreshToken={refreshToken} />
</> :
<>
</>
}
<>
<Divider>{nlsHPCC.Activities}</Divider>
<QueueCards refreshToken={refreshToken} />
</>
</div>
</div>;
}}</SizeMe>
}
/>;
};