summaryrefslogtreecommitdiffstats
path: root/ui-react/src/components/dialogs/RefreshStatus.js
diff options
context:
space:
mode:
authorxuegao <xg353y@intl.att.com>2019-10-07 14:36:34 +0200
committerxuegao <xg353y@intl.att.com>2019-10-07 14:36:34 +0200
commit0efeb6b141cb4abe84af8eb38e26d5ed1ab73bb0 (patch)
tree8c716d7b22828b13a796aa924b1e156a51b9e420 /ui-react/src/components/dialogs/RefreshStatus.js
parent52432d6512d2477ad16d46f5ab31a8f77e9f77bd (diff)
Fix Sonar vulnerabilities
Fix the vulnerabilities reported by Sonar. Issue-ID: CLAMP-530 Change-Id: I9f6a7fe9ce042045085c371ef3777188b11ffb36 Signed-off-by: xuegao <xg353y@intl.att.com>
Diffstat (limited to 'ui-react/src/components/dialogs/RefreshStatus.js')
-rw-r--r--ui-react/src/components/dialogs/RefreshStatus.js7
1 files changed, 3 insertions, 4 deletions
diff --git a/ui-react/src/components/dialogs/RefreshStatus.js b/ui-react/src/components/dialogs/RefreshStatus.js
index cf08655ee..64b35d99b 100644
--- a/ui-react/src/components/dialogs/RefreshStatus.js
+++ b/ui-react/src/components/dialogs/RefreshStatus.js
@@ -22,7 +22,7 @@
*/
import React from 'react';
import LoopActionService from '../../api/LoopActionService';
-import Spinner from 'react-bootstrap/Spinner'
+import Spinner from 'react-bootstrap/Spinner';
import styled from 'styled-components';
const StyledSpinnerDiv = styled.div`
@@ -42,15 +42,14 @@ export default class RefreshStatus extends React.Component {
}
componentDidMount() {
- console.log("Refresh status for: " + this.state.loopName);
// refresh status and update loop logs
LoopActionService.refreshStatus(this.state.loopName).then(data => {
- alert("Status successfully refreshed")
+ this.props.showAlert("Status successfully refreshed");
this.props.updateLoopFunction(data);
this.props.history.push('/');
})
.catch(error => {
- alert("Status refreshing failed");
+ this.props.showAlert("Status refreshing failed");
this.props.history.push('/');
});
}