diff options
author | Grégoire Aubert <gregoire.aubert@sonarsource.com> | 2018-07-20 16:57:23 +0200 |
---|---|---|
committer | SonarTech <sonartech@sonarsource.com> | 2018-08-10 20:21:28 +0200 |
commit | b08814f7807c1443592af65cd68c2a51dfd4ee37 (patch) | |
tree | d7bbaf30c5c0633cd212a30e52db073945ba61ea /server/sonar-web/src/main/js/api/components.ts | |
parent | 3a39b4fa08b15912c928af35fb7b77cd4b85ab64 (diff) | |
download | sonarqube-b08814f7807c1443592af65cd68c2a51dfd4ee37.tar.gz sonarqube-b08814f7807c1443592af65cd68c2a51dfd4ee37.zip |
SONAR-11036 Install integration with GitHub or BitBucket Cloud
* SONAR-11040 Update tutorial choices modal
* SONAR-11041 Migrate manual installation tab
* SONAR-11041 Rename button to start new project tutorial
* SONAR-11041 Rework sonarcloud tabbed page styling
* SONAR-11042 Add alm app install buttons in create project page
* Make start script compatible with ALM integration
Diffstat (limited to 'server/sonar-web/src/main/js/api/components.ts')
-rw-r--r-- | server/sonar-web/src/main/js/api/components.ts | 29 |
1 files changed, 15 insertions, 14 deletions
diff --git a/server/sonar-web/src/main/js/api/components.ts b/server/sonar-web/src/main/js/api/components.ts index a069c38b17e..c917f8a4460 100644 --- a/server/sonar-web/src/main/js/api/components.ts +++ b/server/sonar-web/src/main/js/api/components.ts @@ -17,8 +17,8 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { getJSON, postJSON, post, RequestData } from '../helpers/request'; import throwGlobalError from '../app/utils/throwGlobalError'; +import { getJSON, postJSON, post, RequestData } from '../helpers/request'; import { Paging, Visibility, BranchParameters, MyProject } from '../app/types'; export interface BaseSearchProjectsParameters { @@ -31,29 +31,30 @@ export interface BaseSearchProjectsParameters { visibility?: Visibility; } -export interface SearchProjectsParameters extends BaseSearchProjectsParameters { - p?: number; - ps?: number; +export interface ProjectBase { + key: string; + name: string; + qualifier: string; + visibility: Visibility; } -export interface SearchProjectsResponseComponent { +export interface Project extends ProjectBase { id: string; - key: string; lastAnalysisDate?: string; - name: string; organization: string; - qualifier: string; - visibility: Visibility; } -export interface SearchProjectsResponse { - components: SearchProjectsResponseComponent[]; - paging: Paging; +export interface SearchProjectsParameters extends BaseSearchProjectsParameters { + p?: number; + ps?: number; } export function getComponents( parameters: SearchProjectsParameters -): Promise<SearchProjectsResponse> { +): Promise<{ + components: Project[]; + paging: Paging; +}> { return getJSON('/api/projects/search', parameters); } @@ -75,7 +76,7 @@ export function createProject(data: { name: string; project: string; organization?: string; -}): Promise<any> { +}): Promise<{ project: ProjectBase }> { return postJSON('/api/projects/create', data).catch(throwGlobalError); } |