]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-9482 Rename api getQualityProfiles to seachQualityProfiles
authorGrégoire Aubert <gregoire.aubert@sonarsource.com>
Thu, 29 Jun 2017 09:45:36 +0000 (11:45 +0200)
committerJulien Lancelot <julien.lancelot@sonarsource.com>
Tue, 4 Jul 2017 14:29:36 +0000 (16:29 +0200)
server/sonar-web/src/main/js/api/quality-profiles.js
server/sonar-web/src/main/js/apps/project-admin/store/actions.js
server/sonar-web/src/main/js/apps/quality-profiles/components/App.js

index ec31557c1c5de715ebbfe908fa7f6f6630f3dbf6..950c2c68c3ac1fed999ca40389d4f614e4148b29 100644 (file)
 // @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')
index 8fa84ac1d978bdb3e17d143707f79331b8144555..d5a5cf222ec7dde9f51db35bc29aa469c33f1b3f 100644 (file)
@@ -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));
index e60087cd0fc4475fbfbb8d6f0073f5125745e8c2..81cb730053ab1b7e4b0134d45626f66d88c0853e 100644 (file)
@@ -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() {