aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-web/src/main/js
diff options
context:
space:
mode:
authorStas Vilchik <vilchiks@gmail.com>2015-08-19 10:42:10 +0200
committerStas Vilchik <vilchiks@gmail.com>2015-08-19 11:22:30 +0200
commit2f2e45e676f3939fcbfe986c40a8b2b60454d79d (patch)
tree6c3bea2bb881ff4195f629138c89dc74588aec13 /server/sonar-web/src/main/js
parentfbe7bb0346177a5bf4b9bdfc054db411604c6a5c (diff)
downloadsonarqube-2f2e45e676f3939fcbfe986c40a8b2b60454d79d.tar.gz
sonarqube-2f2e45e676f3939fcbfe986c40a8b2b60454d79d.zip
do not use /api/issues/show
Diffstat (limited to 'server/sonar-web/src/main/js')
-rw-r--r--server/sonar-web/src/main/js/components/issue/models/issue.js14
1 files changed, 9 insertions, 5 deletions
diff --git a/server/sonar-web/src/main/js/components/issue/models/issue.js b/server/sonar-web/src/main/js/components/issue/models/issue.js
index 31f268c958a..c29abed0973 100644
--- a/server/sonar-web/src/main/js/components/issue/models/issue.js
+++ b/server/sonar-web/src/main/js/components/issue/models/issue.js
@@ -11,7 +11,7 @@ define(function () {
},
url: function () {
- return baseUrl + '/api/issues/show?key=' + this.get('key');
+ return baseUrl + '/api/issues';
},
urlRoot: function () {
@@ -19,8 +19,9 @@ define(function () {
},
parse: function (r) {
- if (r.issue) {
- var issue = this._injectRelational(r.issue, r.components, 'component', 'key');
+ var issue = _.size(r.issues) > 0 ? r.issues[0] : r.issue;
+ if (issue) {
+ issue = this._injectRelational(issue, r.components, 'component', 'key');
issue = this._injectRelational(issue, r.components, 'project', 'key');
issue = this._injectRelational(issue, r.components, 'subProject', 'key');
issue = this._injectRelational(issue, r.rules, 'rule', 'key');
@@ -65,8 +66,11 @@ define(function () {
if (method === 'read') {
_.extend(opts, {
type: 'GET',
- url: this.urlRoot() + '/show',
- data: { key: model.id }
+ url: this.urlRoot() + '/search',
+ data: {
+ issues: model.id,
+ additionalFields: '_all'
+ }
});
}
if (method === 'create') {