X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=ui-react%2Fsrc%2FLoopUI.js;fp=ui-react%2Fsrc%2FLoopUI.js;h=ad970d811c174dcd4837bbc67d02e1a8a7c14166;hb=0efeb6b141cb4abe84af8eb38e26d5ed1ab73bb0;hp=b6dd0cb075f6f4418033e89fda700a002c69e721;hpb=52432d6512d2477ad16d46f5ab31a8f77e9f77bd;p=clamp.git
diff --git a/ui-react/src/LoopUI.js b/ui-react/src/LoopUI.js
index b6dd0cb0..ad970d81 100644
--- a/ui-react/src/LoopUI.js
+++ b/ui-react/src/LoopUI.js
@@ -44,6 +44,7 @@ import LoopService from './api/LoopService';
import PerformAction from './components/dialogs/PerformActions';
import RefreshStatus from './components/dialogs/RefreshStatus';
import DeployLoop from './components/dialogs/DeployLoop';
+import Alert from 'react-bootstrap/Alert';
import { Link } from 'react-router-dom';
@@ -100,7 +101,8 @@ export default class LoopUI extends React.Component {
state = {
userName: null,
loopName: LoopUI.defaultLoopName,
- loopCache: new LoopCache({})
+ loopCache: new LoopCache({}),
+ showAlert: false
};
constructor() {
@@ -110,6 +112,8 @@ export default class LoopUI extends React.Component {
this.updateLoopCache = this.updateLoopCache.bind(this);
this.loadLoop = this.loadLoop.bind(this);
this.closeLoop = this.closeLoop.bind(this);
+ this.showAlert = this.showAlert.bind(this);
+ this.disableAlert = this.disableAlert.bind(this);
}
componentWillMount() {
@@ -155,6 +159,14 @@ export default class LoopUI extends React.Component {
);
}
+ renderAlertBar() {
+ return (
+
+ {this.state.showMessage}
+
+ );
+ }
+
renderNavBar() {
return (
@@ -204,6 +216,14 @@ export default class LoopUI extends React.Component {
console.info(this.state.loopName+" loop loaded successfully");
}
+ showAlert(message) {
+ this.setState ({ showAlert: true, showMessage:message });
+ }
+
+ disableAlert() {
+ this.setState ({ showAlert: false });
+ }
+
loadLoop(loopName) {
LoopService.getLoop(loopName).then(loop => {
console.debug("Updating loopCache");
@@ -220,21 +240,22 @@ export default class LoopUI extends React.Component {
return (
()} />
+ render={(routeProps) => ()} />
()} />
()} />
()} />
()} />
- ()} />
- ()} />
- ()} />
- ()} />
- ()} />
- ()} />
- ()} />
+ ()} />
+ ()} />
+ ()} />
+ ()} />
+ ()} />
+ ()} />
+ ()} />
+ {this.renderAlertBar()}
{this.renderNavBar()}
{this.renderLoopViewer()}