reformat
This commit is contained in:
parent
b27dad1cc4
commit
a461024f82
@ -105,7 +105,9 @@ export default function RootLayout({
|
||||
<AppContext.Consumer>
|
||||
{(appState) => {
|
||||
const showSidebarDerived = Boolean(
|
||||
showSidebar && !appState.isLoading && appState.data.isJoined
|
||||
showSidebar &&
|
||||
!appState.isLoading &&
|
||||
appState.data.isJoined,
|
||||
);
|
||||
return (
|
||||
<>
|
||||
|
@ -43,9 +43,3 @@ export default function Background() {
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
// position: fixed;
|
||||
// height: 100vh;
|
||||
// width: 100vw;
|
||||
// overflow: hidden;
|
||||
// z-index: -1;
|
||||
|
@ -54,7 +54,7 @@ export function CustomConfig(props: FormStepContentProps) {
|
||||
}
|
||||
return acc;
|
||||
}, {}),
|
||||
[schema]
|
||||
[schema],
|
||||
);
|
||||
|
||||
return isLoading ? (
|
||||
@ -124,7 +124,7 @@ function PureCustomConfig(props: PureCustomConfigProps) {
|
||||
message: "invalid config",
|
||||
});
|
||||
toast.error(
|
||||
"Configuration is invalid. Please check the highlighted fields for details."
|
||||
"Configuration is invalid. Please check the highlighted fields for details.",
|
||||
);
|
||||
} else {
|
||||
formHooks.clearErrors("config");
|
||||
|
@ -62,7 +62,7 @@ export const MachineContextProvider = (props: MachineContextProviderProps) => {
|
||||
if (!isLoading && !error && !isValidating && rawData) {
|
||||
const { machines } = rawData.data;
|
||||
return machines.filter((m) =>
|
||||
filters.every((f) => m[f.name] === f.value)
|
||||
filters.every((f) => m[f.name] === f.value),
|
||||
);
|
||||
}
|
||||
return [];
|
||||
|
@ -90,10 +90,14 @@ export const ConfigureVM = (props: VmDetailsProps) => {
|
||||
render={({ field }) => (
|
||||
<Select
|
||||
{...field}
|
||||
required
|
||||
variant="standard"
|
||||
fullWidth
|
||||
disabled={isLoading}
|
||||
>
|
||||
{!data?.data.flake_attrs.includes("default") && (
|
||||
<MenuItem value={"default"}>default</MenuItem>
|
||||
)}
|
||||
{data?.data.flake_attrs.map((attr) => (
|
||||
<MenuItem value={attr} key={attr}>
|
||||
{attr}
|
||||
|
@ -15,7 +15,7 @@ export type NodeStatusKeys = (typeof NodeStatus)[keyof typeof NodeStatus];
|
||||
function createData(
|
||||
name: string,
|
||||
status: NodeStatusKeys,
|
||||
last_seen: number
|
||||
last_seen: number,
|
||||
): TableData {
|
||||
if (status == NodeStatus.Online) {
|
||||
last_seen = 0;
|
||||
@ -96,61 +96,61 @@ export const tableData = [
|
||||
"Matchbox",
|
||||
|
||||
NodeStatus.Pending,
|
||||
0
|
||||
0,
|
||||
),
|
||||
createData(
|
||||
"Ahorn",
|
||||
|
||||
NodeStatus.Online,
|
||||
0
|
||||
0,
|
||||
),
|
||||
createData(
|
||||
"Yellow",
|
||||
|
||||
NodeStatus.Offline,
|
||||
16.0
|
||||
16.0,
|
||||
),
|
||||
createData(
|
||||
"Rauter",
|
||||
|
||||
NodeStatus.Offline,
|
||||
6.0
|
||||
6.0,
|
||||
),
|
||||
createData(
|
||||
"Porree",
|
||||
|
||||
NodeStatus.Offline,
|
||||
13
|
||||
13,
|
||||
),
|
||||
createData(
|
||||
"Helsinki",
|
||||
|
||||
NodeStatus.Online,
|
||||
0
|
||||
0,
|
||||
),
|
||||
createData(
|
||||
"Kelle",
|
||||
|
||||
NodeStatus.Online,
|
||||
0
|
||||
0,
|
||||
),
|
||||
createData(
|
||||
"Shodan",
|
||||
|
||||
NodeStatus.Online,
|
||||
0.0
|
||||
0.0,
|
||||
),
|
||||
createData(
|
||||
"Qubasa",
|
||||
|
||||
NodeStatus.Offline,
|
||||
7.0
|
||||
7.0,
|
||||
),
|
||||
createData(
|
||||
"Green",
|
||||
|
||||
NodeStatus.Offline,
|
||||
2
|
||||
2,
|
||||
),
|
||||
createData("Gum", NodeStatus.Offline, 0),
|
||||
createData("Xu", NodeStatus.Online, 0),
|
||||
@ -158,7 +158,7 @@ export const tableData = [
|
||||
"Zaatar",
|
||||
|
||||
NodeStatus.Online,
|
||||
0
|
||||
0,
|
||||
),
|
||||
];
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user