aboutsummaryrefslogtreecommitdiffstats
path: root/ui-react/src/components/dialogs/Loop
diff options
context:
space:
mode:
authorxuegao <xg353y@intl.att.com>2020-04-06 13:13:52 +0200
committerxuegao <xg353y@intl.att.com>2020-04-06 13:13:52 +0200
commitcc5fe51690dc1f780c6b7cd1168e59dedc3b245f (patch)
tree7e980becaa09c546bd9119b6cd3248adbf217788 /ui-react/src/components/dialogs/Loop
parent9768ccd8a3aed74b01d5646373f64b78880a7058 (diff)
Update suc alert color
Update the back groud color for succesful alert messages. Issue-ID: CLAMP-815 Change-Id: I97a621e31f2eb850eae30da3754afd3cd4ddb34a Signed-off-by: xuegao <xg353y@intl.att.com>
Diffstat (limited to 'ui-react/src/components/dialogs/Loop')
-rw-r--r--ui-react/src/components/dialogs/Loop/DeployLoopModal.js6
-rw-r--r--ui-react/src/components/dialogs/Loop/DeployLoopModal.test.js5
2 files changed, 6 insertions, 5 deletions
diff --git a/ui-react/src/components/dialogs/Loop/DeployLoopModal.js b/ui-react/src/components/dialogs/Loop/DeployLoopModal.js
index d034ee5d7..5dacad13b 100644
--- a/ui-react/src/components/dialogs/Loop/DeployLoopModal.js
+++ b/ui-react/src/components/dialogs/Loop/DeployLoopModal.js
@@ -84,12 +84,12 @@ export default class DeployLoopModal extends React.Component {
// save the global propserties
LoopService.updateGlobalProperties(loopName, this.state.temporaryPropertiesJson).then(resp => {
LoopActionService.performAction(loopName, "deploy").then(pars => {
- this.props.showAlert("Action deploy successfully performed");
+ this.props.showSucAlert("Action deploy successfully performed");
// refresh status and update loop logs
this.refreshStatus(loopName);
})
.catch(error => {
- this.props.showAlert("Action deploy failed");
+ this.props.showFailAlert("Action deploy failed");
// refresh status and update loop logs
this.refreshStatus(loopName);
});
@@ -103,7 +103,7 @@ export default class DeployLoopModal extends React.Component {
this.props.updateLoopFunction(data);
})
.catch(error => {
- this.props.showAlert("Refresh status failed");
+ this.props.showFailAlert("Refresh status failed");
});
}
handleChange(event) {
diff --git a/ui-react/src/components/dialogs/Loop/DeployLoopModal.test.js b/ui-react/src/components/dialogs/Loop/DeployLoopModal.test.js
index 5f1dcd5fc..84dbfd1f6 100644
--- a/ui-react/src/components/dialogs/Loop/DeployLoopModal.test.js
+++ b/ui-react/src/components/dialogs/Loop/DeployLoopModal.test.js
@@ -63,7 +63,8 @@ describe('Verify DeployLoopModal', () => {
const flushPromises = () => new Promise(setImmediate);
const historyMock = { push: jest.fn() };
const updateLoopFunction = jest.fn();
- const showAlert = jest.fn();
+ const showSucAlert = jest.fn();
+ const showFailAlert = jest.fn();
const handleSave = jest.spyOn(DeployLoopModal.prototype,'handleSave');
LoopService.updateGlobalProperties = jest.fn().mockImplementation(() => {
return Promise.resolve({
@@ -88,7 +89,7 @@ describe('Verify DeployLoopModal', () => {
});
const component = shallow(<DeployLoopModal history={historyMock}
- loopCache={loopCache} updateLoopFunction={updateLoopFunction} showAlert={showAlert} />)
+ loopCache={loopCache} updateLoopFunction={updateLoopFunction} showSucAlert={showSucAlert} showFailAlert={showFailAlert} />)
component.find('[variant="primary"]').prop('onClick')();
await flushPromises();