// @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')
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
import {
- getQualityProfiles,
+ searchQualityProfiles,
associateProject,
dissociateProject
} from '../../../api/quality-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));
*/
// @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';
fetchProfiles() {
const { organization } = this.props;
const data = organization ? { organization: organization.key } : {};
- return getQualityProfiles(data);
+ return searchQualityProfiles(data);
}
loadData() {