diff --git a/src/app/app.routing.ts b/src/app/app.routing.ts index a6eac64..f6398d0 100644 --- a/src/app/app.routing.ts +++ b/src/app/app.routing.ts @@ -9,8 +9,8 @@ import { StableReleaseComponent } from "./stable-release/stable-release.componen const routes: Routes = [ //routes without header and footer - { path: "", component: TableComponent }, - { path: "stable-release", component: StableReleaseComponent }, + { path: "development", component: TableComponent }, + { path: "", component: StableReleaseComponent }, { path: "workload-dashboard", component: WorkloadDashboardComponent }, { path: "mongo-jiva", component: WorkloadsComponent }, { path: "mongo-cstor", component: WorkloadsComponent }, diff --git a/src/app/services/ci-dashboard.service.ts b/src/app/services/ci-dashboard.service.ts index 65a42d9..5bb45a1 100644 --- a/src/app/services/ci-dashboard.service.ts +++ b/src/app/services/ci-dashboard.service.ts @@ -1,44 +1,38 @@ import { Injectable } from "@angular/core"; import { HttpClient } from "@angular/common/http"; import { map } from "rxjs/operators"; -import { Meta,Title } from '@angular/platform-browser'; +import { Meta, Title } from '@angular/platform-browser'; @Injectable() export class DashboardData { private apiurl: string; host: any; - constructor(private http: HttpClient, private meta:Meta,private titleService: Title) { + constructor(private http: HttpClient, private meta: Meta, private titleService: Title) { this.host = window.location.host; if ((this.host.toString().indexOf("localhost") + 1) && this.host.toString().indexOf(":")) { - this.apiurl = "http://localhost:3000"; - } else if (this.host == "openebs.ci" || this.host == "wwww.openebs.ci" ) { + this.apiurl = "http://localhost:3000"; + } else if (this.host == "openebs.ci" || this.host == "wwww.openebs.ci") { this.apiurl = "https://openebs.ci/api"; } else { - this.apiurl = "https://staging.openebs.ci/api"; + this.apiurl = "https://staging.openebs.ci/api"; } } - - getPacketv15Details() { - return this.http.get(this.apiurl + "/packet/v15"); - } - - getPacketv14Details() { - return this.http.get(this.apiurl + "/packet/v14"); - } - - getPacketv13Details() { - return this.http.get(this.apiurl + "/packet/v13"); - } - getKonvoyDetails() { - return this.http.get(this.apiurl + "/konvoy"); - } - - getBuildDetails() { - return this.http.get(this.apiurl + "/build"); - } - - getOpenshiftReleaseDetails() { - return this.http.get(this.apiurl + "/openshift/release"); + getEndPointData(platform) { + switch (platform) { + case "packet-ultimate": + return this.http.get(this.apiurl + "/packet/ultimate"); + case "packet-penultimate": + return this.http.get(this.apiurl + "/packet/penultimate"); + case "packet-antepenultimate": + return this.http.get(this.apiurl + "/packet/antepenultimate"); + case "konvoy": + return this.http.get(this.apiurl + "/konvoy"); + case "openshift": + return this.http.get(this.apiurl + "/openshift/release"); + default: + console.log('Unable To Find Platform'); + break; + } } } diff --git a/src/app/sidebar/sidebar.component.html b/src/app/sidebar/sidebar.component.html index 81f9147..4e01f72 100644 --- a/src/app/sidebar/sidebar.component.html +++ b/src/app/sidebar/sidebar.component.html @@ -11,13 +11,13 @@