aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-web/src/main/js
diff options
context:
space:
mode:
authorStas Vilchik <vilchiks@gmail.com>2015-07-28 14:52:07 +0200
committerStas Vilchik <vilchiks@gmail.com>2015-07-28 14:53:22 +0200
commit7cb72d02dc84f620447d80b96cd518d8b7f54e9a (patch)
treec9e9d40cd648ab1f6b4476d50d38bbc893702324 /server/sonar-web/src/main/js
parent66891750657e78d6af52650c94141c2e0a62cdde (diff)
downloadsonarqube-7cb72d02dc84f620447d80b96cd518d8b7f54e9a.tar.gz
sonarqube-7cb72d02dc84f620447d80b96cd518d8b7f54e9a.zip
SONAR-6381 show an error message when a plugin cannot be installed
Diffstat (limited to 'server/sonar-web/src/main/js')
-rw-r--r--server/sonar-web/src/main/js/apps/update-center/plugin.js3
-rw-r--r--server/sonar-web/src/main/js/apps/update-center/templates/update-center-plugin.hbs8
2 files changed, 11 insertions, 0 deletions
diff --git a/server/sonar-web/src/main/js/apps/update-center/plugin.js b/server/sonar-web/src/main/js/apps/update-center/plugin.js
index e5d4f254d78..697979e4ed0 100644
--- a/server/sonar-web/src/main/js/apps/update-center/plugin.js
+++ b/server/sonar-web/src/main/js/apps/update-center/plugin.js
@@ -29,6 +29,9 @@ define(function () {
},
success: function () {
options.success(that);
+ },
+ error: function (jqXHR) {
+ that.set({ _status: 'failed', _errors: jqXHR.responseJSON.errors });
}
});
var xhr = Backbone.ajax(opts);
diff --git a/server/sonar-web/src/main/js/apps/update-center/templates/update-center-plugin.hbs b/server/sonar-web/src/main/js/apps/update-center/templates/update-center-plugin.hbs
index e8c8aab5cc2..2f4622a5127 100644
--- a/server/sonar-web/src/main/js/apps/update-center/templates/update-center-plugin.hbs
+++ b/server/sonar-web/src/main/js/apps/update-center/templates/update-center-plugin.hbs
@@ -101,6 +101,14 @@
<p class="text-danger">Uninstall Pending</p>
{{/eq}}
+ {{#eq _status 'failed'}}
+ <span class="text-danger">
+ {{#each _errors}}
+ {{msg}}
+ {{/each}}
+ </span>
+ {{/eq}}
+
{{#unless _status}}
<i class="js-spinner spinner hidden"></i>
{{> '_update-center-plugin-actions'}}