-
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 <[email protected]> * Moved patrol Signed-off-by: Aaron Chong <[email protected]> * Moved custom-compose Signed-off-by: Aaron Chong <[email protected]> * Added clean and delivery Signed-off-by: Aaron Chong <[email protected]> * Added delivery, renamed to SimpleDelivery Signed-off-by: Aaron Chong <[email protected]> * Clean task added Signed-off-by: Aaron Chong <[email protected]> * Moved delivery-custom tests, added return type for forms Signed-off-by: Aaron Chong <[email protected]> * Configurable supported tasks and name remapping Signed-off-by: Aaron Chong <[email protected]> * Changed directory to types, since it doesn't just handle descriptions Signed-off-by: Aaron Chong <[email protected]> * Fix test imports Signed-off-by: Aaron Chong <[email protected]> * Using temporary task definition Signed-off-by: Aaron Chong <[email protected]> * Refactoring new rename changes Signed-off-by: Aaron Chong <[email protected]> * Clean up Signed-off-by: Aaron Chong <[email protected]> * Removed problematic and unsused component and test Signed-off-by: Aaron Chong <[email protected]> * Lint Signed-off-by: Aaron Chong <[email protected]> * Updating pnpm version in github workflow Signed-off-by: Aaron Chong <[email protected]> * Reverting update to pnpm version Signed-off-by: Aaron Chong <[email protected]> * Fix build now that we use key value strings for labels Signed-off-by: Aaron Chong <[email protected]> * Refactored last parts of hard coding categories and rendering forms Signed-off-by: Aaron Chong <[email protected]> * Refactor callback names and error handling for misconfigs Signed-off-by: Aaron Chong <[email protected]> * Display error as well Signed-off-by: Aaron Chong <[email protected]> * Fixed more checks and failures Signed-off-by: Aaron Chong <[email protected]> * Split configuration and definition, only handle configurations in resource manager level Signed-off-by: Aaron Chong <[email protected]> * Lint Signed-off-by: Aaron Chong <[email protected]> * Not using object as a type Signed-off-by: Aaron Chong <[email protected]> * Address feedback Signed-off-by: Aaron Chong <[email protected]> * Render using validTasks instead Signed-off-by: Aaron Chong <[email protected]> * Use useMemo Signed-off-by: Aaron Chong <[email protected]> --------- Signed-off-by: Aaron Chong <[email protected]> (cherry picked from commit 105628b) Signed-off-by: Aaron Chong <[email protected]>
- Loading branch information
1 parent
d2e56f3
commit 24a2c5c
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.