aboutsummaryrefslogtreecommitdiff
path: root/frontend/src/views
diff options
context:
space:
mode:
Diffstat (limited to 'frontend/src/views')
-rw-r--r--frontend/src/views/App.js9
-rw-r--r--frontend/src/views/Config.js9
-rw-r--r--frontend/src/views/Services.js10
3 files changed, 14 insertions, 14 deletions
diff --git a/frontend/src/views/App.js b/frontend/src/views/App.js
index 229eaed..5b49045 100644
--- a/frontend/src/views/App.js
+++ b/frontend/src/views/App.js
@@ -18,6 +18,15 @@ class App extends Component {
rulesWindowOpen: false,
configWindowOpen: false
};
+
+ fetch('/api/services')
+ .then(response => {
+ if( response.status === 503){
+ this.setState({configWindowOpen: true});
+ }
+ });
+
+
}
render() {
diff --git a/frontend/src/views/Config.js b/frontend/src/views/Config.js
index 438e2d6..9b220d9 100644
--- a/frontend/src/views/Config.js
+++ b/frontend/src/views/Config.js
@@ -4,7 +4,6 @@ import {
import React, {Component, useState} from 'react';
import './Config.scss';
import {Button, ButtonGroup, ToggleButton, Col, Container, Form, FormControl, InputGroup, Modal, Row, Table} from "react-bootstrap";
-import axios from 'axios'
import {createCurlCommand} from '../utils';
class Config extends Component {
@@ -74,9 +73,11 @@ class Config extends Component {
fetch('/setup', requestOptions)
- .then(function(response){
- console.log(response.status);
- console.log(response);
+ .then(response => {
+ if (response.status === 202 ){
+ //this.setState({showConfig:false});
+ this.props.onHide();
+ }
}
);
diff --git a/frontend/src/views/Services.js b/frontend/src/views/Services.js
index 9f0fbd2..0de021f 100644
--- a/frontend/src/views/Services.js
+++ b/frontend/src/views/Services.js
@@ -82,16 +82,6 @@ class Services extends Component {
}
);
- /*
- axios.put("/api/services", {
- name: this.state.name,
- port: this.state.port,
- color: this.state.color,
- notes: this.state.notes
- });
- */
-
-
this.newService();
this.loadServices();
}