Skip to content
Snippets Groups Projects
Commit d22a826e authored by Skander Hatira's avatar Skander Hatira
Browse files

alert for non linux machines

parent 752d9d0b
No related branches found
No related tags found
No related merge requests found
......@@ -24,10 +24,10 @@ const spawnServer = async (sock) => {
// console.log(`stdout: ${stdout}`);
// }
// );
// const options = {
// slient: false,
// detached: false,
// };
const options = {
slient: false,
detached: false,
};
// const child = spawn(
// "node",
// [path.join(__dirname, "backend/server.js"), sock],
......
......@@ -18,10 +18,17 @@ import { Link } from "react-router-dom";
import SettingsIcon from "@material-ui/icons/Settings";
import LibraryBooksIcon from "@material-ui/icons/LibraryBooks";
import { useConfig } from "../../hooks/useConfig";
import Alert from "@material-ui/lab/Alert";
const drawerWidth = 240;
const useStyles = makeStyles((theme) => ({
alert: {
width: "100%",
"& > * + *": {
marginTop: theme.spacing(2),
},
},
root: {
display: "flex",
},
......@@ -199,7 +206,17 @@ const DashLayout = ({ Filling }) => {
""
)}
</Toolbar>
{sessionStorage.Platform == "linux" ? (
""
) : (
<Alert severity="warning">
Pipeline execution is only supported on linux systems. You can,
however, add remote linux machines to execute your pipeline onto and
access data locally
</Alert>
)}
</AppBar>
<Drawer
variant="permanent"
classes={{
......@@ -215,6 +232,7 @@ const DashLayout = ({ Filling }) => {
<ChevronLeftIcon />
</IconButton>
</div>
<Divider />
<List>{mainListItems}</List>
<Divider />
......
......@@ -13,6 +13,15 @@ import { Link } from "react-router-dom";
export const mainListItems = (
<div>
{sessionStorage.Platform == "linux" ? (
""
) : (
<>
<ListItem></ListItem>
<ListItem></ListItem>
</>
)}
<ListItem component={Link} to="/alignment" button>
<ListItemIcon>
<DashboardIcon />
......
......@@ -2,10 +2,13 @@ import React, { useEffect } from "react";
import ReactDOM from "react-dom";
import "./index.css";
import App from "./App";
const electron = window.require("electron");
const remote = electron.remote;
sessionStorage.setItem("Sock", remote.getGlobal("sharedObj").prop1);
sessionStorage.setItem("Conda", remote.getGlobal("sharedObj").conda);
sessionStorage.setItem("Platform", remote.getGlobal("sharedObj").platform);
console.log(sessionStorage);
function render() {
ReactDOM.render(
......
......@@ -33,16 +33,28 @@ process.platform == "darwin" || process.platform == "linux"
(error, stdout, stderr) => {
if (error) {
console.log(`error: ${error.message}`);
return (global.sharedObj = { conda: false, prop1: sock });
return (global.sharedObj = {
platform: process.platform,
conda: false,
prop1: sock,
});
}
if (stderr) {
console.log(`stderr: ${stderr}`);
return (global.sharedObj = { conda: false, prop1: sock });
return (global.sharedObj = {
platform: process.platform,
conda: false,
prop1: sock,
});
}
console.log(`stdout: ${stdout}`);
return (global.sharedObj = { conda: true, prop1: sock });
return (global.sharedObj = {
platform: process.platform,
conda: true,
prop1: sock,
});
}
)
: "";
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment