{points.map((point, i) => {
+ point = mapHaystack(point);
return (
}>
diff --git a/alfalfa_web/components/Sites/Sites.js b/alfalfa_web/components/Sites/Sites.js
index 8c016ea2..d1e7a276 100644
--- a/alfalfa_web/components/Sites/Sites.js
+++ b/alfalfa_web/components/Sites/Sites.js
@@ -104,22 +104,14 @@ class Sites extends React.Component {
};
isStartButtonDisabled = () => {
- const readyItem = this.selectedSites().some((item) => {
- return item.simStatus === "READY";
- });
+ const readyItem = this.selectedSites().some((item) => item.simStatus === "READY");
return !readyItem;
};
isStopButtonDisabled = () => {
const runningItem = this.selectedSites().some((item) => {
- return (
- item.simStatus === "RUNNING" ||
- item.simStatus == "PREPROCESSING" ||
- item.simStatus == "STARTING" ||
- item.simStatus == "STARTED" ||
- item.simStatus == "STOPPING"
- );
+ return ["RUNNING", "PREPROCESSING", "STARTING", "STARTED", "STOPPING"].includes(item.simStatus);
});
return !runningItem;
@@ -127,7 +119,7 @@ class Sites extends React.Component {
isRemoveButtonDisabled = () => {
const stoppedItem = this.selectedSites().some((item) => {
- return item.simStatus === "READY" || item.simStatus == "COMPLETE" || item.simStatus == "ERROR";
+ return ["READY", "COMPLETE", "ERROR"].includes(item.simStatus);
});
return !stoppedItem;
@@ -153,9 +145,7 @@ class Sites extends React.Component {
selectedSites = () => {
return this.props.data.viewer.sites.filter((site) => {
- return this.state.selected.some((siteRef) => {
- return siteRef === site.siteRef;
- });
+ return this.state.selected.some((siteRef) => siteRef === site.siteRef);
});
};
@@ -168,19 +158,10 @@ class Sites extends React.Component {
this.setState({ showSite: null });
};
- showSiteRef = () => {
- if (this.state.showSite) {
- return this.state.showSite.siteRef;
- } else {
- return "";
- }
- };
-
- render = (props) => {
+ render = () => {
const { classes } = this.props;
- if (this.props.data.networkStatus === 1) {
- // 1 for loading https://www.apollographql.com/docs/react/api/react-apollo.html#graphql-query-data-networkStatus
+ if (this.props.data.loading) {
return null;
} else {
const isStartDisabled = this.isStartButtonDisabled();
@@ -209,6 +190,7 @@ class Sites extends React.Component {
this.handleRowClick(event, site.siteRef)}>
@@ -229,7 +211,12 @@ class Sites extends React.Component {
-
+
({
marginLeft: 16
},
button: {
- margin: theme.spacing(1)
+ margin: `${theme.spacing(1)}!important`
}
});
const sitesQL = gql`
query QueueQuery {
viewer {
- username
sites {
name
datetime
diff --git a/alfalfa_web/components/StartDialog/StartDialog.js b/alfalfa_web/components/StartDialog/StartDialog.js
index c37de468..81617d9f 100644
--- a/alfalfa_web/components/StartDialog/StartDialog.js
+++ b/alfalfa_web/components/StartDialog/StartDialog.js
@@ -23,7 +23,7 @@
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
***********************************************************************************************************************/
-import { DateTimePicker } from "@mui/lab";
+import { DateTimePicker } from "@mui/x-date-pickers";
import {
Button,
Dialog,
@@ -44,7 +44,7 @@ const styles = (theme) => ({
whiteSpace: "nowrap"
},
button: {
- margin: theme.spacing(1)
+ margin: `${theme.spacing(1)}!important`
}
});
@@ -135,8 +135,6 @@ class StartDialog extends React.Component {
} = this.state;
const { classes, disabled, type } = this.props;
- console.log(`startDialogType: ${type}`);
-
let start;
let stop;
if (type === "osm") {
@@ -199,7 +197,7 @@ class StartDialog extends React.Component {