-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feature/refactor-environment #339
Changes from 3 commits
4f4e570
cf02d0b
8c60c6f
07a2715
ccca39f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -53,14 +53,10 @@ describe("<DirectoryTree />", () => { | |
type: "Text", | ||
}); | ||
|
||
const baseUrl = "http://test-aics.corp.alleninstitute.org"; | ||
const baseDisplayAnnotations = TOP_LEVEL_FILE_ANNOTATIONS.filter( | ||
(a) => a.name === AnnotationName.FILE_NAME | ||
); | ||
const state = mergeState(initialState, { | ||
interaction: { | ||
fileExplorerServiceBaseUrl: baseUrl, | ||
}, | ||
selection: { | ||
annotationHierarchy: [fooAnnotation.name, barAnnotation.name], | ||
displayAnnotations: [...baseDisplayAnnotations, fooAnnotation, barAnnotation], | ||
|
@@ -188,9 +184,13 @@ describe("<DirectoryTree />", () => { | |
}, | ||
]; | ||
const mockHttpClient = createMockHttpClient(responseStubs); | ||
const annotationService = new HttpAnnotationService({ baseUrl, httpClient: mockHttpClient }); | ||
const fileExplorerServiceBaseUrl = "http://test.int.allencell.org"; | ||
const annotationService = new HttpAnnotationService({ | ||
fileExplorerServiceBaseUrl: fileExplorerServiceBaseUrl, | ||
httpClient: mockHttpClient, | ||
}); | ||
const fileService = new HttpFileService({ | ||
baseUrl, | ||
fileExplorerServiceBaseUrl: fileExplorerServiceBaseUrl, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. if you want to be extra javascripty, this and line 189 could just be There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is it bad to say I don't want to be? I kept moving around variables and stuff broke. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. fair enough! just noted since elsewhere in file sometimes (or used to?) use this pattern |
||
httpClient: mockHttpClient, | ||
downloadService: new FileDownloadServiceNoop(), | ||
}); | ||
|
@@ -353,9 +353,6 @@ describe("<DirectoryTree />", () => { | |
|
||
it("only includes one filter value per annotation for an annotation within the hierarchy", async () => { | ||
const oneAnnotationDeepState = mergeState(initialState, { | ||
interaction: { | ||
fileExplorerServiceBaseUrl: baseUrl, | ||
}, | ||
selection: { | ||
annotationHierarchy: [fooAnnotation.name], | ||
displayAnnotations: [...baseDisplayAnnotations, fooAnnotation, barAnnotation], | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,17 +5,12 @@ import { AnnotationType } from "../entity/AnnotationFormatter"; | |
export const APP_ID = "fms-file-explorer-core"; | ||
|
||
// Refer to packages/fms-file-explorer-electron/src/main/menu | ||
export enum FileExplorerServiceBaseUrl { | ||
LOCALHOST = "http://localhost:9081", | ||
STAGING = "https://staging.int.allencell.org", | ||
PRODUCTION = "https://production.int.allencell.org", | ||
} | ||
|
||
export enum AicsLoadBalancerBaseUrl { | ||
LOCALHOST = "http://localhost:8080", | ||
STAGING = "http://stg-aics.corp.alleninstitute.org", | ||
PRODUCTION = "http://aics.corp.alleninstitute.org", | ||
} | ||
export const Environment = { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This might be better as an enum There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. resolved in 07a2715 |
||
LOCALHOST: "LOCALHOST", | ||
STAGING: "STAGING", | ||
PRODUCTION: "PRODUCTION", | ||
TEST: "TEST", | ||
} as const; | ||
|
||
export const TOP_LEVEL_FILE_ANNOTATIONS = [ | ||
new Annotation({ | ||
|
@@ -65,3 +60,24 @@ export const THUMBNAIL_SIZE_TO_NUM_COLUMNS = { | |
}; | ||
|
||
export const AICS_FMS_DATA_SOURCE_NAME = "AICS FMS"; | ||
|
||
export const FESBaseUrlMap = { | ||
LOCALHOST: "http://localhost:9081", | ||
STAGING: "https://staging.int.allencell.org", | ||
PRODUCTION: "https://production.int.allencell.org", | ||
TEST: "http://test.int.allencell.org", | ||
}; | ||
|
||
export const MMSBaseUrlMap = { | ||
LOCALHOST: "http://localhost:9060", | ||
STAGING: "http://stg-aics-api", | ||
PRODUCTION: "http://prod-aics-api", | ||
TEST: "http://test-aics-api", | ||
}; | ||
|
||
export const LoadBalancerBaseUrlMap = { | ||
BrianWhitneyAI marked this conversation as resolved.
Show resolved
Hide resolved
|
||
LOCALHOST: "http://localhost:8080", | ||
STAGING: "http://stg-aics.corp.alleninstitute.org", | ||
PRODUCTION: "http://aics.corp.alleninstitute.org", | ||
TEST: "http://test-aics.corp.alleninstitute.org", | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can use the enum as the type value here (
Environment
)There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
resolved in 07a2715