diff --git a/frontend/src/environments/EnvironmentList.tsx b/frontend/src/environments/EnvironmentList.tsx
index 50ae938..db55a9b 100644
--- a/frontend/src/environments/EnvironmentList.tsx
+++ b/frontend/src/environments/EnvironmentList.tsx
@@ -1,12 +1,13 @@
-// import { IconButton } from '@mui/material';
+import { IconButton } from '@mui/material';
import { DataGrid, GridColDef } from '@mui/x-data-grid';
import { IEnvironmentData } from './types';
import { memo, useMemo } from 'react';
-// import CheckIcon from '@mui/icons-material/Check';
+import CheckIcon from '@mui/icons-material/Check';
import { Box } from '@mui/system';
import { RemoveEnvironmentButton } from './RemoveEnvironmentButton';
import { EnvironmentLogButton } from './LogDialog';
+
const columns: GridColDef[] = [
{
field: 'display_name',
@@ -52,13 +53,9 @@ const columns: GridColDef[] = [
hideSortIcons: true,
renderCell: params => {
return params.value === 'built' ? (
- //
- //
- //
-
+
+
+
) : params.value === 'building' ? (
{
- const terminal = new Terminal();
+ const terminal = new Terminal({ convertEol: true, disableStdin: true });
const fitAddon = new FitAddon();
terminal.loadAddon(fitAddon);
return { terminal, fitAddon };
};
-function _EnvironmentLogButton(props: IRemoveEnvironmentButton) {
+function _EnvironmentLogButton(props: IEnvironmentLogButton) {
const [open, setOpen] = useState(false);
+ const [built, setBuilt] = useState(false);
const divRef = useRef(null);
const terminalRef = useRef<{ terminal: Terminal; fitAddon: FitAddon }>(
terminalFactory()
@@ -55,11 +58,11 @@ function _EnvironmentLogButton(props: IRemoveEnvironmentButton) {
};
eventSource.onmessage = event => {
- var data = JSON.parse(event.data);
- console.log('data', data);
-
+ const data = JSON.parse(event.data);
+
if (data.phase === 'built') {
eventSource.close();
+ setBuilt(true);
return;
}
terminalRef.current.terminal.write(data.message);
@@ -84,28 +87,34 @@ function _EnvironmentLogButton(props: IRemoveEnvironmentButton) {
return (
-
-
+
-
-
+ }}
+ htmlColor="orange"
+ />
+
+ )}
+ {built && (
+
+
+
+ )}