Skip to content
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

Realtime Cards #70

Draft
wants to merge 13 commits into
base: master
Choose a base branch
from
Draft

Realtime Cards #70

wants to merge 13 commits into from

Conversation

valayDave
Copy link
Owner

No description provided.

@valayDave valayDave force-pushed the valay/real-time-cards branch 2 times, most recently from cdd6fb1 to 1be4ab0 Compare September 26, 2023 23:11
Copy link
Collaborator

@seethroughdev seethroughdev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, just want to confirm removing reactivity of those vars is a good idea or not.

legend: {
display: false,
const createChart = () => {
const { config, data, labels } = componentData;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this better than leaving it reactive above? Since the json loading is async, i'm not entirely sure this is ideal.

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When i tried runnning it without this code change then the charts were not getting updated. Didn't know why so I tried something like this.

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In lines that follow, there is a $ function handling some updates (Is that incorrectly done ?) I don't know the exact syntax.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if it works, i would leave as is!

the next version of svelte will solve for this problem entirely anyway.

@valayDave valayDave force-pushed the valay/real-time-cards branch from 8911806 to cf4cd58 Compare October 11, 2023 18:53
@valayDave valayDave force-pushed the valay/real-time-cards branch 13 times, most recently from 068db2f to 1b73af4 Compare October 25, 2023 18:22
@valayDave valayDave force-pushed the valay/real-time-cards branch from 1b73af4 to 38fea65 Compare October 31, 2023 19:32
@valayDave valayDave force-pushed the valay/real-time-cards branch 6 times, most recently from 6b19add to 853d640 Compare November 21, 2023 07:03
- cleanup the ui component code and add naive progress-bar
- Chart support within tables and anywhere across the page
- Chart mutation done based on spec/data changes.
@valayDave valayDave force-pushed the valay/real-time-cards branch from 853d640 to 12abd7f Compare December 5, 2023 20:45
@valayDave valayDave force-pushed the valay/real-time-cards branch from 12abd7f to 7192efd Compare December 8, 2023 08:29
seethroughdev and others added 9 commits December 19, 2023 01:04
…vior

- Markdown and Artifact Component made realtime.
- default/blank cards made realtime
- default component ids to realtime-updatable UserComponents
- Add a variable in the HTML template to enable/disable `metaflow_card_update` function
- Set options that allows disabling realtime updates for components that may have lots of data like `Image` / `Table`. This can be useful when we are calling refresh often and don't want to update data which maybe static.
- Image.update supports multi-type object
- remove `disable_updates` from public api
- Server helps view realtime updates
- Added a card viewer html file
- Created a simple HTTP based card server that will help showcase the realtime cards from querying the server
- The API response contains the task status for the data api
- reload on run change : A background thread checks if there are new runs created via the latest_run file.
- Cleanup HTML template
- Handles edge case where no runs are available
- Shows errors when things are not working
@valayDave valayDave force-pushed the valay/real-time-cards branch from 7192efd to 36613dc Compare December 20, 2023 10:59
* Setup a new card and start the watcher
*/
function handleLoadCard(name, value) {
document.getElementsByTagName("title").innerHTML = name;

Check warning

Code scanning / CodeQL

DOM text reinterpreted as HTML Medium

DOM text
is reinterpreted as HTML without escaping meta-characters.
function handleLoadCard(name, value) {
document.getElementsByTagName("title").innerHTML = name;
const iframe = document.getElementById("card-frame");
iframe.src = `/card/${value}`;

Check warning

Code scanning / CodeQL

DOM text reinterpreted as HTML Medium

DOM text
is reinterpreted as HTML without escaping meta-characters.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants