-
Notifications
You must be signed in to change notification settings - Fork 2
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
Create foundation for a controller status history view #1402
Create foundation for a controller status history view #1402
Conversation
{intl.formatMessage({ id: headerMessageId })} | ||
</Typography> | ||
|
||
{Hydrating ?? children} |
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.
Whenever there is a capitalized props like Hydrating
I assume it takes in a functional component and used like
<Hydrating {...whatever props you might need}/>
In this scenario it looks like all 3 uses of this are passing in a skeleton with different sizes. I think we should just pass in the sizing they want and then this component itself can handle checking hydration.
accessToken: string, | ||
catalogName: string | ||
): Promise<EntityStatusResponse[]> => | ||
client(`${entityStatusBaseEndpoint}?name=${catalogName}`, {}, accessToken); |
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.
I think probably best to do it here - but we need to make sure catalogName
is safe / escaped. Normally we have used escapeReservedCharacters
but that is really for PostgREST so not 100% sure what we wanna do here.
src/components/shared/Entity/Details/Logs/Status/Overview/AutoDiscoveryStatus.tsx
Show resolved
Hide resolved
timestamp: `${lastUpdated.toLocaleString({ | ||
hour: '2-digit', | ||
minute: '2-digit', | ||
second: '2-digit', | ||
timeZoneName: 'short', | ||
})}, ${lastUpdated.toLocaleString({ | ||
day: '2-digit', | ||
month: '2-digit', | ||
year: 'numeric', | ||
})}`, |
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.
Can we split out the settings used to "translate" these so they can be shared?
defaultLanguage="json" | ||
height={EDITOR_HEIGHT} | ||
onMount={( | ||
editor: monacoEditor.editor.IStandaloneCodeEditor | ||
) => { | ||
logRocketConsole('handlers:mount'); | ||
editorRef.current = editor; | ||
}} | ||
options={{ | ||
readOnly: true, | ||
minimap: { | ||
enabled: false, | ||
}, | ||
}} | ||
path={ | ||
hasLength(response.catalog_name) | ||
? response.catalog_name | ||
: 'preset_status_path' | ||
} | ||
saveViewState={false} | ||
theme={theme.palette.mode === 'light' ? 'vs' : 'vs-dark'} | ||
value={stringifyJSON(response)} | ||
/> |
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.
Sometime we should make a shard "default props" kinda thing for editor
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.
Agreed. I had a similar thought when I created this component.
{row.detail ? ( | ||
<ControllerStatus detail={row.detail} status={row.result} /> | ||
) : ( | ||
<TableCell /> | ||
)} | ||
|
||
{row.created ? ( | ||
<TimeStamp enableExact time={row.created} /> | ||
) : ( | ||
<TableCell /> | ||
)} | ||
|
||
{row.completed ? ( | ||
<TimeStamp enableExact time={row.completed} /> | ||
) : ( | ||
<TableCell /> | ||
)} |
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.
This is really interesting... our tables (and all the "helper" functions/components) really are focused on tables with data that is always there.
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.
The desired entity status UI and UX is still largely up-in-the-air. Nevertheless, it is worth noting that this status indicator component resembles that used in the entity status overview cards. There is a chance the latter may diverge widely enough that is does not make sense to try to share code but, presently, I believe that is unlikely.
src/context/Theme.tsx
Outdated
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.
This file has grown to a point where it would be worthwhile to reassess its organization and whether it should be broken apart.
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.
The component and broad UX is, effectively, temporary. It was the fastest means to surface the errors that correspond to an individual controller event presented in the table.
src/components/shared/Entity/Details/Logs/Status/Overview/AutoDiscoveryStatus.tsx
Show resolved
Hide resolved
src/utils/env-utils.ts
Outdated
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.
Adding this new URL brings me a thought... we should eventually review all the env props and make a decision on which ones are mandatory.
I know people are not running Estuary on their own but it would be nice to have that all set up just in case.
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.
lgtm
left some notes and comments but do not see anything that is a blocker.
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.
lgtm
Issues
The issues directly below are advanced by this PR:
#1377
Changes
1377
The following features are included in this PR:
Create an environment variable for the base
/status
endpoint URL.Add a declaration file for control-plane types relevant to the
/status
endpoint.Add a Status section to the Logs tab of the Details page which serves as the foundation for comprehensive entity status view.
Update the shared
CardWrapper
component to support a headerless display.Tests
Manually tested
Automated tests
Playwright tests ran locally
Screenshots
Initialization
Hydration failed | Error returned by
/status
endpointPost-Initialization
Dashboard view
Code view
No controller status history returned by
/status
endpointUpdating the view via the Refresh CTA | Table View