aboutsummaryrefslogtreecommitdiffstats
path: root/server
diff options
context:
space:
mode:
authorGrégoire Aubert <gregoire.aubert@sonarsource.com>2017-06-29 11:45:36 +0200
committerJulien Lancelot <julien.lancelot@sonarsource.com>2017-07-04 16:29:36 +0200
commitc4355a61e7b28be2f78a75f724733fca86bcfe07 (patch)
treeb740a9b3a68cccb1c6fd605ca60b118a97125da9 /server
parent1308b6801babb7d64bec4ffe2e619ea0e4c5cdef (diff)
downloadsonarqube-c4355a61e7b28be2f78a75f724733fca86bcfe07.tar.gz
sonarqube-c4355a61e7b28be2f78a75f724733fca86bcfe07.zip
SONAR-9482 Rename api getQualityProfiles to seachQualityProfiles
Diffstat (limited to 'server')
-rw-r--r--server/sonar-web/src/main/js/api/quality-profiles.js7
-rw-r--r--server/sonar-web/src/main/js/apps/project-admin/store/actions.js8
-rw-r--r--server/sonar-web/src/main/js/apps/quality-profiles/components/App.js4
3 files changed, 12 insertions, 7 deletions
diff --git a/server/sonar-web/src/main/js/api/quality-profiles.js b/server/sonar-web/src/main/js/api/quality-profiles.js
index ec31557c1c5..950c2c68c3a 100644
--- a/server/sonar-web/src/main/js/api/quality-profiles.js
+++ b/server/sonar-web/src/main/js/api/quality-profiles.js
@@ -20,11 +20,16 @@
// @flow
import { request, checkStatus, parseJSON, getJSON, post, postJSON } from '../helpers/request';
-export function getQualityProfiles(data: { organization?: string, projectKey?: string }) {
+export function searchQualityProfiles(data: { organization?: string, projectKey?: string }) {
const url = '/api/qualityprofiles/search';
return getJSON(url, data).then(r => r.profiles);
}
+export function getQualityProfiles(data: { compareToSonarWay?: boolean, profile: string }) {
+ const url = '/api/qualityprofiles/show';
+ return getJSON(url, data);
+}
+
export function createQualityProfile(data: Object) {
return request('/api/qualityprofiles/create')
.setMethod('post')
diff --git a/server/sonar-web/src/main/js/apps/project-admin/store/actions.js b/server/sonar-web/src/main/js/apps/project-admin/store/actions.js
index 8fa84ac1d97..d5a5cf222ec 100644
--- a/server/sonar-web/src/main/js/apps/project-admin/store/actions.js
+++ b/server/sonar-web/src/main/js/apps/project-admin/store/actions.js
@@ -18,7 +18,7 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
import {
- getQualityProfiles,
+ searchQualityProfiles,
associateProject,
dissociateProject
} from '../../../api/quality-profiles';
@@ -49,10 +49,10 @@ export const receiveProjectProfiles = (projectKey, profiles) => ({
export const fetchProjectProfiles = (projectKey, organization) => dispatch => {
Promise.all([
- organization ? getQualityProfiles({ organization }) : getQualityProfiles(),
+ organization ? searchQualityProfiles({ organization }) : searchQualityProfiles(),
organization
- ? getQualityProfiles({ organization, projectKey })
- : getQualityProfiles({ projectKey })
+ ? searchQualityProfiles({ organization, projectKey })
+ : searchQualityProfiles({ projectKey })
]).then(responses => {
const [allProfiles, projectProfiles] = responses;
dispatch(receiveProfiles(allProfiles));
diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/components/App.js b/server/sonar-web/src/main/js/apps/quality-profiles/components/App.js
index e60087cd0fc..81cb730053a 100644
--- a/server/sonar-web/src/main/js/apps/quality-profiles/components/App.js
+++ b/server/sonar-web/src/main/js/apps/quality-profiles/components/App.js
@@ -19,7 +19,7 @@
*/
// @flow
import React from 'react';
-import { getQualityProfiles, getExporters } from '../../../api/quality-profiles';
+import { searchQualityProfiles, getExporters } from '../../../api/quality-profiles';
import { sortProfiles } from '../utils';
import { translate } from '../../../helpers/l10n';
import OrganizationHelmet from '../../../components/common/OrganizationHelmet';
@@ -68,7 +68,7 @@ export default class App extends React.PureComponent {
fetchProfiles() {
const { organization } = this.props;
const data = organization ? { organization: organization.key } : {};
- return getQualityProfiles(data);
+ return searchQualityProfiles(data);
}
loadData() {