diff options
author | Stas Vilchik <vilchiks@gmail.com> | 2016-08-12 16:57:25 +0200 |
---|---|---|
committer | Stas Vilchik <vilchiks@gmail.com> | 2016-08-12 16:57:25 +0200 |
commit | ed92f9d0d05ea12d91176dcbe8c63a8f7eb685e6 (patch) | |
tree | 98e35b8a93a21d88edb1991c4024a9688e772607 /server/sonar-web/src/main/js/apps/project-admin/key | |
parent | d7db41d8edbc3548df569e9e3da45bf761267ec4 (diff) | |
download | sonarqube-ed92f9d0d05ea12d91176dcbe8c63a8f7eb685e6.tar.gz sonarqube-ed92f9d0d05ea12d91176dcbe8c63a8f7eb685e6.zip |
SONAR-7919 apply feedback
Diffstat (limited to 'server/sonar-web/src/main/js/apps/project-admin/key')
4 files changed, 11 insertions, 6 deletions
diff --git a/server/sonar-web/src/main/js/apps/project-admin/key/BulkUpdate.js b/server/sonar-web/src/main/js/apps/project-admin/key/BulkUpdate.js index e872b567c58..315dc4b17f2 100644 --- a/server/sonar-web/src/main/js/apps/project-admin/key/BulkUpdate.js +++ b/server/sonar-web/src/main/js/apps/project-admin/key/BulkUpdate.js @@ -64,7 +64,8 @@ class BulkUpdate extends React.Component { RecentHistory.remove(component.key); } - this.props.addGlobalSuccessMessage(translate('update_key.key_updated')); + this.props.addGlobalSuccessMessage( + translate('update_key.key_updated.reload')); this.setState({ updating: false }); reloadUpdateKeyPage(newComponentKey); }).catch(e => { @@ -79,6 +80,7 @@ class BulkUpdate extends React.Component { this.setState({ results: r.keys, replace, by }); this.props.closeAllGlobalMessages(); }).catch(e => { + this.setState({ results: null }); parseError(e).then(message => this.props.addGlobalErrorMessage(message)); }); } diff --git a/server/sonar-web/src/main/js/apps/project-admin/key/BulkUpdateResults.js b/server/sonar-web/src/main/js/apps/project-admin/key/BulkUpdateResults.js index 56f5531875b..2f1832ec174 100644 --- a/server/sonar-web/src/main/js/apps/project-admin/key/BulkUpdateResults.js +++ b/server/sonar-web/src/main/js/apps/project-admin/key/BulkUpdateResults.js @@ -42,7 +42,7 @@ export default class BulkUpdateResults extends React.Component { return ( <div id="bulk-update-simulation" className="big-spacer-top"> {isEmpty && ( - <div id="bulk-update-nothing" className="alert alert-warning"> + <div id="bulk-update-nothing" className="spacer-bottom"> {translateWithParameters( 'update_key.no_key_to_update', replace @@ -51,7 +51,7 @@ export default class BulkUpdateResults extends React.Component { )} {hasDuplications && ( - <div id="bulk-update-duplicate" className="alert alert-danger"> + <div id="bulk-update-duplicate" className="spacer-bottom"> {translateWithParameters( 'update_key.cant_update_because_duplicate_keys', replace, diff --git a/server/sonar-web/src/main/js/apps/project-admin/key/Key.js b/server/sonar-web/src/main/js/apps/project-admin/key/Key.js index 609e192b08a..019cde640df 100644 --- a/server/sonar-web/src/main/js/apps/project-admin/key/Key.js +++ b/server/sonar-web/src/main/js/apps/project-admin/key/Key.js @@ -61,11 +61,14 @@ class Key extends React.Component { handleChangeKey (key, newKey) { return this.props.changeKey(key, newKey).then(() => { - this.props.addGlobalSuccessMessage(translate('update_key.key_updated')); - if (key === this.props.component.key) { + this.props.addGlobalSuccessMessage( + translate('update_key.key_updated.reload')); RecentHistory.remove(key); reloadUpdateKeyPage(newKey); + } else { + this.props.addGlobalSuccessMessage( + translate('update_key.key_updated')); } }).catch(e => { parseError(e).then(this.props.addGlobalErrorMessage); diff --git a/server/sonar-web/src/main/js/apps/project-admin/key/utils.js b/server/sonar-web/src/main/js/apps/project-admin/key/utils.js index a17481bed35..dbae2a9a612 100644 --- a/server/sonar-web/src/main/js/apps/project-admin/key/utils.js +++ b/server/sonar-web/src/main/js/apps/project-admin/key/utils.js @@ -21,5 +21,5 @@ export const reloadUpdateKeyPage = componentKey => { setTimeout(() => { window.location = window.baseUrl + '/project/key?id=' + encodeURIComponent(componentKey); - }, 1000); + }, 3000); }; |