aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-web/src/main/js/apps/project-admin/key
diff options
context:
space:
mode:
Diffstat (limited to 'server/sonar-web/src/main/js/apps/project-admin/key')
-rw-r--r--server/sonar-web/src/main/js/apps/project-admin/key/BulkUpdate.js4
-rw-r--r--server/sonar-web/src/main/js/apps/project-admin/key/BulkUpdateResults.js4
-rw-r--r--server/sonar-web/src/main/js/apps/project-admin/key/Key.js7
-rw-r--r--server/sonar-web/src/main/js/apps/project-admin/key/utils.js2
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);
};