-
Notifications
You must be signed in to change notification settings - Fork 19
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
Feature: VariablesTable
, VariablesDelete
, filters, bulk and count routes
#1296
Conversation
✅ Deploy Preview for prefect-ui-library ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
const variableDeletePromises = variableIds.map(api.variables.deleteVariable) | ||
await Promise.all(variableDeletePromises) |
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.
Since this feature is being actively built. Any chance we can get an api endpoint for this?
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.
@jakekaplan and i talked about this yesterday (great minds etc) - we can but we don't really need it since there's a fairly low cap on the number of variables one can create
const selectedVariables = ref<string[]>([]) | ||
const selectAllVariables = (allVariablesSelected: CheckboxModel): string[] => { | ||
if (allVariablesSelected) { | ||
return selectedVariables.value = [...variables.value.map(variable => variable.id)] | ||
} | ||
return selectedVariables.value = [] | ||
} | ||
|
||
const model = computed({ | ||
get() { | ||
return selectedVariables.value.length === variables.value.length | ||
}, | ||
set(value: boolean) { | ||
selectAllVariables(value) | ||
}, | ||
}) |
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.
We should make a select all component for this. Takes an array v-model and an array of all the possible values.
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.
Oh yea good thought, we're doing this in a few places. I'll open a ticket 👍🏻
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 PR introduces:
VariablesTable
component - primary variables display, a paginated tableVariablesDelete
component - used for handling bulk deletes by passing a list of variable ids/filter
and/count
api services - both WIP, no backend work has been merged for these yet (though I believe it's begun); these are based on chats with @jakekaplan