-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a99cc1c
commit 312dd28
Showing
18 changed files
with
579 additions
and
504 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,26 @@ | ||
import React from 'react'; | ||
import { Tag } from 'antd'; | ||
import { JobStatus } from '../helpers/utils'; | ||
|
||
export const ImportStatusTag = ({ statusString }: { statusString: JobStatus }) => { | ||
const tagStatusColor = getStatusColor(statusString) | ||
return (<Tag color={tagStatusColor}> | ||
{statusString} | ||
</Tag>) | ||
} | ||
|
||
type JobStatus = | ||
| 'completed' | ||
| 'waiting' | ||
| 'active' | ||
| 'delayed' | ||
| 'failed' | ||
| 'paused'; | ||
const tagStatusColor = getStatusColor(statusString); | ||
return <Tag color={tagStatusColor}>{statusString}</Tag>; | ||
}; | ||
|
||
/** | ||
* @param statusString - get tag status color for a job status | ||
*/ | ||
export function getStatusColor(statusString: JobStatus) { | ||
switch (statusString) { | ||
case "completed": | ||
return "success" | ||
case "active": | ||
return "processing" | ||
case "failed": | ||
return "error" | ||
case "paused": | ||
return "warning" | ||
default: | ||
return "default" | ||
} | ||
switch (statusString) { | ||
case 'completed': | ||
return 'success'; | ||
case 'active': | ||
return 'processing'; | ||
case 'failed': | ||
return 'error'; | ||
case 'paused': | ||
return 'warning'; | ||
default: | ||
return 'default'; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,18 @@ | ||
export const DATA_IMPORT_LIST_URL = "/import" | ||
export const DATA_IMPORT_DETAIL_URL = "/importDetail" | ||
export const DATA_IMPORT_CREATE_URL = "/importCreate" | ||
export const DATA_IMPORT_LIST_URL = '/import'; | ||
export const DATA_IMPORT_DETAIL_URL = '/importDetail'; | ||
export const DATA_IMPORT_CREATE_URL = '/importCreate'; | ||
|
||
export const IMPORT_ENDPOINT = "/$import" | ||
export const IMPORT_DOMAIN_URI="" | ||
export const IMPORT_TEMPLATE_ENDPOINT = `${IMPORT_ENDPOINT}/templates` | ||
export const IMPORT_ENDPOINT = '/$import'; | ||
export const IMPORT_DOMAIN_URI = ''; | ||
export const IMPORT_TEMPLATE_ENDPOINT = `${IMPORT_ENDPOINT}/templates`; | ||
|
||
|
||
export const dataImportRQueryKey = "dataImport" | ||
export const locations = "locations" as const | ||
export const users = "users" as const | ||
export const organizations = "organizations" as const | ||
export const careteams = "careteams" as const | ||
export const inventories = "inventories" as const | ||
export const orgToLocationAssignment = "orgToLocationAssignment" as const | ||
export const userToOrganizationAssignment = "userToOrganizationAssignment" as const | ||
export const products = "products" as const | ||
export const productImages = "productImages" as const | ||
export const dataImportRQueryKey = 'dataImport'; | ||
export const locations = 'locations' as const; | ||
export const users = 'users' as const; | ||
export const organizations = 'organizations' as const; | ||
export const careteams = 'careteams' as const; | ||
export const inventories = 'inventories' as const; | ||
export const orgToLocationAssignment = 'orgToLocationAssignment' as const; | ||
export const userToOrganizationAssignment = 'userToOrganizationAssignment' as const; | ||
export const products = 'products' as const; | ||
export const productImages = 'productImages' as const; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 15 additions & 12 deletions
27
packages/fhir-import/src/containers/ImportListView/tests/fixtures.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,16 @@ | ||
export const workflows = [ { | ||
"workflowId": "26aae779-0e6f-482d-82c3-a0fad1fd3689_orgToLocationAssignment", | ||
"status": "completed", | ||
"workflowType": "orgToLocationAssignment", | ||
"dateCreated": 1720096011433, | ||
"dateStarted": 1720096011435, | ||
"dateEnded": 1720096013898, | ||
"statusReason": { | ||
"stdout": "Progress::Reading csv \n", | ||
"stderr": "Start time: 15:26:53\nStarting csv import...\nReading csv file\nReturning records from csv file\nUnsupported request!\n{ \"final-response\": }\nEnd time: 15:26:53\nTotal time: 0.002815 seconds\n" | ||
export const workflows = [ | ||
{ | ||
workflowId: '26aae779-0e6f-482d-82c3-a0fad1fd3689_orgToLocationAssignment', | ||
status: 'completed', | ||
workflowType: 'orgToLocationAssignment', | ||
dateCreated: 1720096011433, | ||
dateStarted: 1720096011435, | ||
dateEnded: 1720096013898, | ||
statusReason: { | ||
stdout: 'Progress::Reading csv \n', | ||
stderr: | ||
'Start time: 15:26:53\nStarting csv import...\nReading csv file\nReturning records from csv file\nUnsupported request!\n{ "final-response": }\nEnd time: 15:26:53\nTotal time: 0.002815 seconds\n', | ||
}, | ||
filename: 'organizations_locations.csv', | ||
}, | ||
"filename": "organizations_locations.csv" | ||
}] | ||
]; |
Oops, something went wrong.