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 | |
parent | d7db41d8edbc3548df569e9e3da45bf761267ec4 (diff) | |
download | sonarqube-ed92f9d0d05ea12d91176dcbe8c63a8f7eb685e6.tar.gz sonarqube-ed92f9d0d05ea12d91176dcbe8c63a8f7eb685e6.zip |
SONAR-7919 apply feedback
5 files changed, 12 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); }; diff --git a/sonar-core/src/main/resources/org/sonar/l10n/core.properties b/sonar-core/src/main/resources/org/sonar/l10n/core.properties index 24c54a1633e..2fe6894a9fb 100644 --- a/sonar-core/src/main/resources/org/sonar/l10n/core.properties +++ b/sonar-core/src/main/resources/org/sonar/l10n/core.properties @@ -1606,6 +1606,7 @@ update_key.fine_grained_key_update=Fine-grained Update update_key.old_key=Old Key update_key.new_key=New Key update_key.key_updated=The key has successfully been updated for all required resources. +update_key.key_updated.reload=The key has successfully been updated for all required resources. This page will be reloaded shortly. update_key.bulk_change_description=The bulk update allows to replace a part of the current key(s) by another string on the current project and all its submodules - if applicable. update_key.current_key_for_project_x_is_x=The key of the "{0}" project is currently "{1}". update_key.replace=Replace |