-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Moved custom deliveries to separate file naively and import naively Signed-off-by: Aaron Chong <aaronchongth@gmail.com> * Moved patrol Signed-off-by: Aaron Chong <aaronchongth@gmail.com> * Moved custom-compose Signed-off-by: Aaron Chong <aaronchongth@gmail.com> * Added clean and delivery Signed-off-by: Aaron Chong <aaronchongth@gmail.com> * Added delivery, renamed to SimpleDelivery Signed-off-by: Aaron Chong <aaronchongth@gmail.com> * Clean task added Signed-off-by: Aaron Chong <aaronchongth@gmail.com> * Moved delivery-custom tests, added return type for forms Signed-off-by: Aaron Chong <aaronchongth@gmail.com> * Configurable supported tasks and name remapping Signed-off-by: Aaron Chong <aaronchongth@gmail.com> * Changed directory to types, since it doesn't just handle descriptions Signed-off-by: Aaron Chong <aaronchongth@gmail.com> * Fix test imports Signed-off-by: Aaron Chong <aaronchongth@gmail.com> * Using temporary task definition Signed-off-by: Aaron Chong <aaronchongth@gmail.com> * Refactoring new rename changes Signed-off-by: Aaron Chong <aaronchongth@gmail.com> * Clean up Signed-off-by: Aaron Chong <aaronchongth@gmail.com> * Removed problematic and unsused component and test Signed-off-by: Aaron Chong <aaronchongth@gmail.com> * Lint Signed-off-by: Aaron Chong <aaronchongth@gmail.com> * Updating pnpm version in github workflow Signed-off-by: Aaron Chong <aaronchongth@gmail.com> * Reverting update to pnpm version Signed-off-by: Aaron Chong <aaronchongth@gmail.com> * Fix build now that we use key value strings for labels Signed-off-by: Aaron Chong <aaronchongth@gmail.com> * Refactored last parts of hard coding categories and rendering forms Signed-off-by: Aaron Chong <aaronchongth@gmail.com> * Refactor callback names and error handling for misconfigs Signed-off-by: Aaron Chong <aaronchongth@gmail.com> * Display error as well Signed-off-by: Aaron Chong <aaronchongth@gmail.com> * Fixed more checks and failures Signed-off-by: Aaron Chong <aaronchongth@gmail.com> * Split configuration and definition, only handle configurations in resource manager level Signed-off-by: Aaron Chong <aaronchongth@gmail.com> * Lint Signed-off-by: Aaron Chong <aaronchongth@gmail.com> * Not using object as a type Signed-off-by: Aaron Chong <aaronchongth@gmail.com> * Address feedback Signed-off-by: Aaron Chong <aaronchongth@gmail.com> * Render using validTasks instead Signed-off-by: Aaron Chong <aaronchongth@gmail.com> * Use useMemo Signed-off-by: Aaron Chong <aaronchongth@gmail.com> --------- Signed-off-by: Aaron Chong <aaronchongth@gmail.com>
- Loading branch information
1 parent
d2e56f3
commit 105628b
Showing
20 changed files
with
2,049 additions
and
1,300 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
import { getDefaultTaskDefinition, TaskDefinition } from 'react-components'; | ||
|
||
export interface TaskResource { | ||
task_definition_id: string; | ||
display_name?: string; | ||
} | ||
|
||
export class TaskResourceManager { | ||
tasks: TaskDefinition[]; | ||
|
||
constructor(taskResources: TaskResource[]) { | ||
this.tasks = []; | ||
for (const taskResource of taskResources) { | ||
const defaultTaskDefinition = getDefaultTaskDefinition(taskResource.task_definition_id); | ||
if (!defaultTaskDefinition) { | ||
console.error( | ||
`Invalid tasks configured for dashboard: [${taskResource.task_definition_id}]`, | ||
); | ||
continue; | ||
} | ||
|
||
if (taskResource.display_name !== undefined) { | ||
this.tasks.push({ | ||
...defaultTaskDefinition, | ||
taskDisplayName: taskResource.display_name, | ||
}); | ||
} else { | ||
this.tasks.push(defaultTaskDefinition); | ||
} | ||
} | ||
} | ||
} |
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 was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.