Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
plants-of-cse
Manage
Activity
Members
Labels
Plan
Issues
4
Issue boards
Milestones
Wiki
Code
Merge requests
1
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Levi Coffman
plants-of-cse
Merge requests
!1
Icons
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Icons
icons
into
master
Overview
0
Commits
5
Pipelines
0
Changes
10
Merged
Levi Coffman
requested to merge
icons
into
master
5 years ago
Overview
0
Commits
5
Pipelines
0
Changes
4
Expand
👍
0
👎
0
Merge request reports
Viewing commit
54e3f8ad
Prev
Next
Show latest version
4 files
+
64
−
59
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
4
Search (e.g. *.vue) (Ctrl+P)
54e3f8ad
got status updates to be sent in real time.
· 54e3f8ad
Levi Coffman
authored
5 years ago
webpage/src/App.js
+
22
−
16
Options
@@ -8,6 +8,12 @@ import {Button} from "@material-ui/core";
export
const
ServerURL
=
"
http://localhost:8080
"
.
toString
();
class
App
extends
Component
{
constructor
(
props
)
{
super
(
props
);
this
.
sse
=
new
EventSource
(
`
${
ServerURL
}
/api/plant-status`
);
}
click
=
()
=>
{
fetch
(
`
${
ServerURL
}
/test`
)
.
then
(
console
.
log
,
console
.
error
);
@@ -19,52 +25,52 @@ class App extends Component {
<
Button
onClick
=
{
this
.
click
}
>
Update
<
/Button
>
<
Grid
container
alignContent
=
"
center
"
>
<
Grid
item
>
<
Icon
plantName
=
{
"
Kroak the oak
"
}
plantID
=
{
4567
}
/
>
<
Icon
plantName
=
{
"
Kroak the oak
"
}
plantID
=
{
4567
}
sse
=
{
this
.
sse
}
/
>
<
/Grid
>
<
Grid
item
>
<
Icon
plantName
=
{
"
Woofy!
"
}
plantID
=
{
1234
}
/
>
<
Icon
plantName
=
{
"
Woofy!
"
}
plantID
=
{
1234
}
sse
=
{
this
.
sse
}
/
>
<
/Grid
>
<
Grid
item
>
<
Icon
plantName
=
{
"
Kroak the oak
"
}
plantID
=
{
4567
}
/
>
<
Icon
plantName
=
{
"
Kroak the oak
"
}
plantID
=
{
4567
}
sse
=
{
this
.
sse
}
/
>
<
/Grid
>
<
Grid
item
>
<
Icon
plantName
=
{
"
Woofy!
"
}
plantID
=
{
1234
}
/
>
<
Icon
plantName
=
{
"
Woofy!
"
}
plantID
=
{
1234
}
sse
=
{
this
.
sse
}
/
>
<
/Grid
>
<
Grid
item
>
<
Icon
plantName
=
{
"
Kroak the oak
"
}
plantID
=
{
4567
}
/
>
<
Icon
plantName
=
{
"
Kroak the oak
"
}
plantID
=
{
4567
}
sse
=
{
this
.
sse
}
/
>
<
/Grid
>
<
Grid
item
>
<
Icon
plantName
=
{
"
Woofy!
"
}
plantID
=
{
1234
}
/
>
<
Icon
plantName
=
{
"
Woofy!
"
}
plantID
=
{
1234
}
sse
=
{
this
.
sse
}
/
>
<
/Grid
>
<
Grid
item
>
<
Icon
plantName
=
{
"
Kroak the oak
"
}
plantID
=
{
4567
}
/
>
<
Icon
plantName
=
{
"
Kroak the oak
"
}
plantID
=
{
4567
}
sse
=
{
this
.
sse
}
/
>
<
/Grid
>
<
Grid
item
>
<
Icon
plantName
=
{
"
Woofy!
"
}
plantID
=
{
1234
}
/
>
<
Icon
plantName
=
{
"
Woofy!
"
}
plantID
=
{
1234
}
sse
=
{
this
.
sse
}
/
>
<
/Grid
>
<
Grid
item
>
<
Icon
plantName
=
{
"
Kroak the oak
"
}
plantID
=
{
4567
}
/
>
<
Icon
plantName
=
{
"
Kroak the oak
"
}
plantID
=
{
4567
}
sse
=
{
this
.
sse
}
/
>
<
/Grid
>
<
Grid
item
>
<
Icon
plantName
=
{
"
Woofy!
"
}
plantID
=
{
1234
}
/
>
<
Icon
plantName
=
{
"
Woofy!
"
}
plantID
=
{
1234
}
sse
=
{
this
.
sse
}
/
>
<
/Grid
>
<
Grid
item
>
<
Icon
plantName
=
{
"
Kroak the oak
"
}
plantID
=
{
4567
}
/
>
<
Icon
plantName
=
{
"
Kroak the oak
"
}
plantID
=
{
4567
}
sse
=
{
this
.
sse
}
/
>
<
/Grid
>
<
Grid
item
>
<
Icon
plantName
=
{
"
Woofy!
"
}
plantID
=
{
1234
}
/
>
<
Icon
plantName
=
{
"
Woofy!
"
}
plantID
=
{
1234
}
sse
=
{
this
.
sse
}
/
>
<
/Grid
>
<
Grid
item
>
<
Icon
plantName
=
{
"
Kroak the oak
"
}
plantID
=
{
4567
}
/
>
<
Icon
plantName
=
{
"
Kroak the oak
"
}
plantID
=
{
4567
}
sse
=
{
this
.
sse
}
/
>
<
/Grid
>
<
Grid
item
>
<
Icon
plantName
=
{
"
Woofy!
"
}
plantID
=
{
1234
}
/
>
<
Icon
plantName
=
{
"
Woofy!
"
}
plantID
=
{
1234
}
sse
=
{
this
.
sse
}
/
>
<
/Grid
>
<
Grid
item
>
<
Icon
plantName
=
{
"
Kroak the oak
"
}
plantID
=
{
4567
}
/
>
<
Icon
plantName
=
{
"
Kroak the oak
"
}
plantID
=
{
4567
}
sse
=
{
this
.
sse
}
/
>
<
/Grid
>
<
Grid
item
>
<
Icon
plantName
=
{
"
Woofy!
"
}
plantID
=
{
1234
}
/
>
<
Icon
plantName
=
{
"
Woofy!
"
}
plantID
=
{
1234
}
sse
=
{
this
.
sse
}
/
>
<
/Grid
>
<
/Grid
>
<
/div
>
Loading