diff options
author | Stas Vilchik <stas.vilchik@sonarsource.com> | 2017-08-21 09:23:52 +0200 |
---|---|---|
committer | Stas Vilchik <stas.vilchik@sonarsource.com> | 2017-08-21 10:29:05 +0200 |
commit | e4a2b37268212b232c7aea22445a5bbbf0acd050 (patch) | |
tree | 81fb4aae7716d1403f740993b1ed4e4eec3f5fd7 /server/sonar-web/src/main/js/api | |
parent | b6f7557b705bee15f1b86d325b58dbc539a22245 (diff) | |
download | sonarqube-e4a2b37268212b232c7aea22445a5bbbf0acd050.tar.gz sonarqube-e4a2b37268212b232c7aea22445a5bbbf0acd050.zip |
remove I prefix from interfaces
Diffstat (limited to 'server/sonar-web/src/main/js/api')
5 files changed, 15 insertions, 15 deletions
diff --git a/server/sonar-web/src/main/js/api/application.ts b/server/sonar-web/src/main/js/api/application.ts index c6bce86fbd6..11cab631512 100644 --- a/server/sonar-web/src/main/js/api/application.ts +++ b/server/sonar-web/src/main/js/api/application.ts @@ -20,12 +20,12 @@ import { getJSON } from '../helpers/request'; import throwGlobalError from '../app/utils/throwGlobalError'; -export interface IApplicationLeak { +export interface ApplicationLeak { date: string; project: string; projectName: string; } -export function getApplicationLeak(application: string): Promise<Array<IApplicationLeak>> { +export function getApplicationLeak(application: string): Promise<Array<ApplicationLeak>> { return getJSON('/api/views/show_leak', { application }).then(r => r.leaks, throwGlobalError); } diff --git a/server/sonar-web/src/main/js/api/components.ts b/server/sonar-web/src/main/js/api/components.ts index 5cd527da6ad..168f41d4a32 100644 --- a/server/sonar-web/src/main/js/api/components.ts +++ b/server/sonar-web/src/main/js/api/components.ts @@ -157,7 +157,7 @@ export function bulkChangeKey( return postJSON(url, data); } -export interface ISuggestionsResponse { +export interface SuggestionsResponse { organizations: Array<{ key: string; name: string }>; projects: Array<{ key: string; name: string }>; results: Array<{ @@ -180,7 +180,7 @@ export function getSuggestions( query?: string, recentlyBrowsed?: string[], more?: string -): Promise<ISuggestionsResponse> { +): Promise<SuggestionsResponse> { const data: RequestData = {}; if (query) { data.s = query; diff --git a/server/sonar-web/src/main/js/api/notifications.ts b/server/sonar-web/src/main/js/api/notifications.ts index a95def188f3..51d258c59b9 100644 --- a/server/sonar-web/src/main/js/api/notifications.ts +++ b/server/sonar-web/src/main/js/api/notifications.ts @@ -19,7 +19,7 @@ */ import { getJSON, post, RequestData } from '../helpers/request'; -export interface IGetNotificationsResponse { +export interface GetNotificationsResponse { notifications: Array<{ channel: string; type: string; @@ -32,7 +32,7 @@ export interface IGetNotificationsResponse { perProjectTypes: Array<string>; } -export function getNotifications(): Promise<IGetNotificationsResponse> { +export function getNotifications(): Promise<GetNotificationsResponse> { return getJSON('/api/notifications/list'); } diff --git a/server/sonar-web/src/main/js/api/projectActivity.ts b/server/sonar-web/src/main/js/api/projectActivity.ts index 6edd9732081..b2dddd8c890 100644 --- a/server/sonar-web/src/main/js/api/projectActivity.ts +++ b/server/sonar-web/src/main/js/api/projectActivity.ts @@ -20,7 +20,7 @@ import { getJSON, postJSON, post, RequestData } from '../helpers/request'; import throwGlobalError from '../app/utils/throwGlobalError'; -interface IGetProjectActivityResponse { +interface GetProjectActivityResponse { analyses: any[]; paging: { total: number; @@ -34,11 +34,11 @@ export function getProjectActivity(data: { category?: string; p?: number; ps?: number; -}): Promise<IGetProjectActivityResponse> { +}): Promise<GetProjectActivityResponse> { return getJSON('/api/project_analyses/search', data).catch(throwGlobalError); } -interface ICreateEventResponse { +interface CreateEventResponse { analysis: string; key: string; name: string; @@ -51,7 +51,7 @@ export function createEvent( name: string, category?: string, description?: string -): Promise<ICreateEventResponse> { +): Promise<CreateEventResponse> { const data: RequestData = { analysis, name }; if (category) { data.category = category; @@ -70,7 +70,7 @@ export function changeEvent( event: string, name?: string, description?: string -): Promise<ICreateEventResponse> { +): Promise<CreateEventResponse> { const data: RequestData = { event }; if (name) { data.name = name; diff --git a/server/sonar-web/src/main/js/api/time-machine.ts b/server/sonar-web/src/main/js/api/time-machine.ts index 643b3fb9848..4423d563c8c 100644 --- a/server/sonar-web/src/main/js/api/time-machine.ts +++ b/server/sonar-web/src/main/js/api/time-machine.ts @@ -19,7 +19,7 @@ */ import { getJSON } from '../helpers/request'; -interface ITimeMachineResponse { +interface TimeMachineResponse { measures: Array<{ metric: string; history: Array<{ date: string; value: string }>; @@ -31,7 +31,7 @@ export function getTimeMachineData( component: string, metrics: string[], other?: { p?: number; ps?: number; from?: string; to?: string } -): Promise<ITimeMachineResponse> { +): Promise<TimeMachineResponse> { return getJSON('/api/measures/search_history', { component, metrics: metrics.join(), @@ -44,8 +44,8 @@ export function getAllTimeMachineData( component: string, metrics: Array<string>, other?: { p?: number; from?: string; to?: string }, - prev?: ITimeMachineResponse -): Promise<ITimeMachineResponse> { + prev?: TimeMachineResponse +): Promise<TimeMachineResponse> { return getTimeMachineData(component, metrics, { ...other, ps: 1000 }).then(r => { const result = prev ? { |