Skip to content

Commit

Permalink
feat(fe2/server): add automation function run name and logo (#1834)
Browse files Browse the repository at this point in the history
  • Loading branch information
gjedlicska authored Oct 25, 2023
1 parent 767ec88 commit 8aa261c
Show file tree
Hide file tree
Showing 14 changed files with 90 additions and 43 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@ import {
// eslint-disable-next-line @typescript-eslint/no-unused-vars
type RemoveOnceBEIsHappy = AutomationFunctionRun & {
logo?: string // NOTE: this is a backend TODO
functionName?: string // NOTE: this is a backend TODO
results: { values: { blobIds: string[] } }
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,8 @@ graphql(`
functionRuns {
id
functionId
functionName
functionLogo
elapsed
status
statusMessage
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,8 @@ graphql(`
functionRuns {
id
functionId
functionName
functionLogo
elapsed
status
statusMessage
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,16 @@
<div
class="bg-blue-500/10 text-primary font-bold h-4 w-4 rounded-md shrink-0 flex justify-center text-center items-center overflow-hidden"
>
<img v-if="functionRun.logo" :src="functionRun.logo" alt="function logo" />
<img
v-if="functionRun.functionLogo"
:src="functionRun.functionLogo"
alt="function logo"
/>
<span v-else class="text-xs">λ</span>
</div>

<div class="font-bold text-sm truncate">
{{ automationName ? automationName + ' / ' : ''
}}{{ functionRun.functionName || 'Majestic ' + functionRun.functionId }}
{{ automationName ? automationName + ' / ' : '' }}{{ functionRun.functionName }}
</div>
<div
v-if="
Expand Down Expand Up @@ -65,8 +68,6 @@ import { resolveStatusMetadata } from '~~/lib/automations/helpers/resolveStatusM
const props = defineProps<{
automationName?: string
functionRun: AutomationFunctionRun & {
logo?: string // NOTE: this is a backend TODO
functionName?: string // NOTE: this is a backend TODO
results: { values: { blobIds: string[] } }
}
}>()
Expand Down
4 changes: 2 additions & 2 deletions packages/frontend-2/lib/common/generated/gql/gql.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ const documents = {
"\n fragment ProjectPageModelsCardProject on Project {\n id\n role\n }\n": types.ProjectPageModelsCardProjectFragmentDoc,
"\n fragment ModelPreview on Model {\n previewUrl\n }\n": types.ModelPreviewFragmentDoc,
"\n fragment SingleLevelModelTreeItem on ModelsTreeItem {\n id\n name\n fullName\n model {\n ...ProjectPageLatestItemsModelItem\n }\n hasChildren\n updatedAt\n }\n": types.SingleLevelModelTreeItemFragmentDoc,
"\n fragment ModelCardAutomationStatus_AutomationsStatus on AutomationsStatus {\n id\n status\n statusMessage\n automationRuns {\n id\n automationId\n automationName\n createdAt\n status\n functionRuns {\n id\n functionId\n elapsed\n status\n statusMessage\n contextView\n results\n resultVersions {\n id\n }\n }\n }\n }\n": types.ModelCardAutomationStatus_AutomationsStatusFragmentDoc,
"\n fragment ModelCardAutomationStatus_AutomationsStatus on AutomationsStatus {\n id\n status\n statusMessage\n automationRuns {\n id\n automationId\n automationName\n createdAt\n status\n functionRuns {\n id\n functionId\n functionName\n functionLogo\n elapsed\n status\n statusMessage\n contextView\n results\n resultVersions {\n id\n }\n }\n }\n }\n": types.ModelCardAutomationStatus_AutomationsStatusFragmentDoc,
"\n fragment ModelCardAutomationStatus_Model on Model {\n id\n displayName\n automationStatus {\n ...ModelCardAutomationStatus_AutomationsStatus\n }\n }\n": types.ModelCardAutomationStatus_ModelFragmentDoc,
"\n fragment ModelCardAutomationStatus_Version on Version {\n id\n automationStatus {\n ...ModelCardAutomationStatus_AutomationsStatus\n }\n }\n": types.ModelCardAutomationStatus_VersionFragmentDoc,
"\n fragment ProjectPageModelsCardDeleteDialog on Model {\n id\n name\n }\n": types.ProjectPageModelsCardDeleteDialogFragmentDoc,
Expand Down Expand Up @@ -283,7 +283,7 @@ export function graphql(source: "\n fragment SingleLevelModelTreeItem on Models
/**
* The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
*/
export function graphql(source: "\n fragment ModelCardAutomationStatus_AutomationsStatus on AutomationsStatus {\n id\n status\n statusMessage\n automationRuns {\n id\n automationId\n automationName\n createdAt\n status\n functionRuns {\n id\n functionId\n elapsed\n status\n statusMessage\n contextView\n results\n resultVersions {\n id\n }\n }\n }\n }\n"): (typeof documents)["\n fragment ModelCardAutomationStatus_AutomationsStatus on AutomationsStatus {\n id\n status\n statusMessage\n automationRuns {\n id\n automationId\n automationName\n createdAt\n status\n functionRuns {\n id\n functionId\n elapsed\n status\n statusMessage\n contextView\n results\n resultVersions {\n id\n }\n }\n }\n }\n"];
export function graphql(source: "\n fragment ModelCardAutomationStatus_AutomationsStatus on AutomationsStatus {\n id\n status\n statusMessage\n automationRuns {\n id\n automationId\n automationName\n createdAt\n status\n functionRuns {\n id\n functionId\n functionName\n functionLogo\n elapsed\n status\n statusMessage\n contextView\n results\n resultVersions {\n id\n }\n }\n }\n }\n"): (typeof documents)["\n fragment ModelCardAutomationStatus_AutomationsStatus on AutomationsStatus {\n id\n status\n statusMessage\n automationRuns {\n id\n automationId\n automationName\n createdAt\n status\n functionRuns {\n id\n functionId\n functionName\n functionLogo\n elapsed\n status\n statusMessage\n contextView\n results\n resultVersions {\n id\n }\n }\n }\n }\n"];
/**
* The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
*/
Expand Down
Loading

0 comments on commit 8aa261c

Please sign in to comment.