Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion spa/src/app/config/_ngrx/config.state.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export class ConfigState {
public static getDefaultState() {

return new ConfigState(
new Config("", "", "", "", "", ""));
new Config("", "", "", "", "", "", ""));
}

/**
Expand Down
7 changes: 6 additions & 1 deletion spa/src/app/config/config.model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,26 +13,31 @@ export class Config {
public readonly portalURL: string;
public readonly deployment: string;
public readonly projectMetaURL: string;
public readonly version: string;

/**
* @param {string} dataURL
* @param {string} dcpHealthCheckUrl
* @param {string} deployment
* @param {string} matrixURL
* @param {string} portalURL
* @param {string} projectMetaURL
* @param {string} version
*/
constructor(dataURL: string,
dcpHealthCheckUrl: string,
deployment: string,
matrixURL: string,
portalURL: string,
projectMetaURL: string,
deployment: string) {
version: string) {

this.dataURL = dataURL;
this.dcpHealthCheckUrl = dcpHealthCheckUrl;
this.matrixURL = matrixURL;
this.deployment = deployment;
this.portalURL = portalURL;
this.projectMetaURL = projectMetaURL;
this.version = version;
}
}
12 changes: 12 additions & 0 deletions spa/src/app/config/config.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ export class ConfigService {
private deployment: string;
private projectMetaURL: string;
private store: Store<AppState>;
private version: string;

/**
* @param store {Store<AppState>}
Expand Down Expand Up @@ -171,6 +172,16 @@ export class ConfigService {
return this.deployment === "ux-dev";
}

/**
* Returns true if the current environment is a version 2.0 environment.
*
* @returns {boolean}
*/
public isV2(): boolean {

return this.version === "2.0";
}

/**
* Save the data URL as a local variable ogetAPIURLn this instance, and update the corresponding config value in the store.
*
Expand All @@ -184,6 +195,7 @@ export class ConfigService {
this.deployment = config.deployment;
this.portalURL = config.portalURL;
this.projectMetaURL = config.projectMetaURL;
this.version = config.version;
this.store.dispatch(new FetchConfigRequestSuccessAction(config));
}
}
3 changes: 2 additions & 1 deletion spa/src/environments/environment.cgl-dev.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,6 @@ export const environment = {
matrixURL: "https://matrix.data.humancellatlas.org/v0/matrix",
portalURL: "https://dev.singlecell.gi.ucsc.edu",
projectMetaURL: "https://dev.singlecell.gi.ucsc.edu",
deployment: "cgl-dev"
deployment: "cgl-dev",
version: "2.0"
};
3 changes: 2 additions & 1 deletion spa/src/environments/environment.develop.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,6 @@ export const environment = {
matrixURL: "https://matrix.staging.data.humancellatlas.org/v0/matrix",
portalURL: "https://dev.data.humancellatlas.org",
projectMetaURL: "https://dev.data.humancellatlas.org",
deployment: "develop"
deployment: "develop",
version: "1.0"
};
3 changes: 2 additions & 1 deletion spa/src/environments/environment.integration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,6 @@ export const environment = {
matrixURL: "https://matrix.integration.data.humancellatlas.org/v0/matrix",
portalURL: "https://integration.data.humancellatlas.org",
projectMetaURL: "https://integration.data.humancellatlas.org",
deployment: "integration"
deployment: "integration",
version: "1.0"
};
3 changes: 2 additions & 1 deletion spa/src/environments/environment.prod.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,6 @@ export const environment = {
matrixURL: "https://matrix.data.humancellatlas.org/v0/matrix",
portalURL: "https://data.humancellatlas.org",
projectMetaURL: "https://data.humancellatlas.org",
deployment: "prod"
deployment: "prod",
version: "1.0"
};
3 changes: 2 additions & 1 deletion spa/src/environments/environment.staging.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,6 @@ export const environment = {
matrixURL: "https://matrix.staging.data.humancellatlas.org/v0/matrix",
portalURL: "https://staging.data.humancellatlas.org",
projectMetaURL: "https://staging.data.humancellatlas.org",
deployment: "staging"
deployment: "staging",
version: "1.0"
};
3 changes: 2 additions & 1 deletion spa/src/environments/environment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,6 @@ export const environment = {
matrixURL: "https://matrix.staging.data.humancellatlas.org/v0/matrix",
portalURL: "https://dev.data.humancellatlas.org",
projectMetaURL: "https://dev.data.humancellatlas.org",
deployment: "local"
deployment: "local",
version: "1.0"
};
3 changes: 2 additions & 1 deletion spa/src/environments/environment.ux-dev.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,6 @@ export const environment = {
matrixURL: "https://matrix.data.humancellatlas.org/v0/matrix",
portalURL: "https://ux-dev.data.humancellatlas.org",
projectMetaURL: "https://data.humancellatlas.org",
deployment: "ux-dev"
deployment: "ux-dev",
version: "1.0"
};