Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 21 additions & 14 deletions web/src/views/analyze_sleep/waiting_for_server/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
import React, { useEffect, useState } from 'react';
import { Container, Row, Col, Spinner } from 'reactstrap';
import { Container, Row, Col, Alert, ListGroup, ListGroupItem } from 'reactstrap';

import { getLatestServerReleaseAssets } from 'requests/latest_release';
import { ListGroup, ListGroupItem } from 'reactstrap';

import './style.css';

const WaitingForServer = () => {
const [assets, setAssets] = useState([]);
Expand All @@ -11,27 +13,32 @@ const WaitingForServer = () => {
}, [setAssets]);

return (
<Container>
<h3 className="mb-4">Waiting for local server to be running...</h3>
<Container className="my-6">
<Alert color="warning" className="lead mb-5 mr-3">
<i className="fas fa-server fa-lg mr-3" />
<strong className="waiting_alert__text">Waiting for local server to be running</strong>
</Alert>

<h3>Download latest server release</h3>
<h3 className="mb-4">Download latest server release</h3>
<Row>
<Col className="text-center mb-4">
<ListGroup>
<Col md="6">
<p>
In order to upload your sleep file, we ask you to install our local server. This server will proceed to the
preprocessing, feature extraction and classification of your sleep EEG. Your data is processed locally since
we, at PolyCortex, believe that you should have full control over your data and its privacy.
</p>
</Col>
<Col md="6" className="text-center mb-4">
<ListGroup flush>
{assets.map((asset) => (
<ListGroupItem key={asset.name} active={asset.currentOs} tag="a" href={asset.url}>
{asset.name}
<i class="fas fa-download fa-lg mr-3" />
<span>{asset.name}</span>
</ListGroupItem>
))}
</ListGroup>
</Col>
</Row>

<Row>
<Col className="text-center mb-4">
<Spinner style={{ width: '3rem', height: '3rem' }} />
</Col>
</Row>
</Container>
);
};
Expand Down
23 changes: 23 additions & 0 deletions web/src/views/analyze_sleep/waiting_for_server/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
.waiting_alert__text:after {
content: ' .';
animation: dots 1s steps(5, end) infinite;
}

@keyframes dots {
0%,
20% {
color: rgba(0, 0, 0, 0);
text-shadow: 0.25em 0 0 rgba(0, 0, 0, 0), 0.5em 0 0 rgba(0, 0, 0, 0);
}
40% {
color: white;
text-shadow: 0.25em 0 0 rgba(0, 0, 0, 0), 0.5em 0 0 rgba(0, 0, 0, 0);
}
60% {
text-shadow: 0.25em 0 0 white, 0.5em 0 0 rgba(0, 0, 0, 0);
}
80%,
100% {
text-shadow: 0.25em 0 0 white, 0.5em 0 0 white;
}
}