aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-web/src/main/js/apps/update-center/plugin.js
diff options
context:
space:
mode:
authorStas Vilchik <stas-vilchik@users.noreply.github.com>2017-03-17 09:10:48 +0100
committerGitHub <noreply@github.com>2017-03-17 09:10:48 +0100
commitde4365079bad2df3bdee2133576dc913ffbf1ab2 (patch)
treea522ccb952f0d37f454e8188e13b3dec3f731912 /server/sonar-web/src/main/js/apps/update-center/plugin.js
parent6a03df65cc0c91a26150ea172a2c480e07326ea1 (diff)
downloadsonarqube-de4365079bad2df3bdee2133576dc913ffbf1ab2.tar.gz
sonarqube-de4365079bad2df3bdee2133576dc913ffbf1ab2.zip
format code using prettier (#1774)
Diffstat (limited to 'server/sonar-web/src/main/js/apps/update-center/plugin.js')
-rw-r--r--server/sonar-web/src/main/js/apps/update-center/plugin.js27
1 files changed, 13 insertions, 14 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 cebb6bf216b..c4b6fac39dd 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
@@ -27,27 +27,27 @@ export default Backbone.Model.extend({
_system: false
},
- _matchAttribute (attr, query) {
+ _matchAttribute(attr, query) {
const value = this.get(attr) || '';
return value.toLowerCase().includes(query.toLowerCase());
},
- match (query) {
+ match(query) {
return this._matchAttribute('name', query) ||
- this._matchAttribute('category', query) ||
- this._matchAttribute('description', query);
+ this._matchAttribute('category', query) ||
+ this._matchAttribute('description', query);
},
- _action (options) {
+ _action(options) {
const that = this;
const opts = {
...options,
type: 'POST',
data: { key: this.id },
- success () {
+ success() {
options.success(that);
},
- error (jqXHR) {
+ error(jqXHR) {
that.set({ _status: 'failed', _errors: jqXHR.responseJSON.errors });
}
};
@@ -56,31 +56,30 @@ export default Backbone.Model.extend({
return xhr;
},
- install () {
+ install() {
return this._action({
url: window.baseUrl + '/api/plugins/install',
- success (model) {
+ success(model) {
model.set({ _status: 'installing' });
}
});
},
- update () {
+ update() {
return this._action({
url: window.baseUrl + '/api/plugins/update',
- success (model) {
+ success(model) {
model.set({ _status: 'updating' });
}
});
},
- uninstall () {
+ uninstall() {
return this._action({
url: window.baseUrl + '/api/plugins/uninstall',
- success (model) {
+ success(model) {
model.set({ _status: 'uninstalling' });
}
});
}
});
-