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

Feature: VariablesTable, VariablesDelete, filters, bulk and count routes #1296

Merged
merged 5 commits into from
Mar 31, 2023

Conversation

znicholasbrown
Copy link
Contributor

This PR introduces:

  • VariablesTable component - primary variables display, a paginated table
  • VariablesDelete 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
  • variables filters - same as above, WIP but safe to merge

@netlify
Copy link

netlify bot commented Mar 31, 2023

Deploy Preview for prefect-ui-library ready!

Name Link
🔨 Latest commit e9c3e19
🔍 Latest deploy log https://app.netlify.com/sites/prefect-ui-library/deploys/64270309dd44f600083d57b1
😎 Deploy Preview https://deploy-preview-1296--prefect-ui-library.netlify.app/
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@znicholasbrown
Copy link
Contributor Author

Closes: #1290
Closes: #1291

Comment on lines +33 to +34
const variableDeletePromises = variableIds.map(api.variables.deleteVariable)
await Promise.all(variableDeletePromises)
Copy link
Collaborator

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?

Copy link
Contributor Author

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

Comment on lines +128 to +143
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)
},
})
Copy link
Collaborator

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.

Copy link
Contributor Author

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 👍🏻

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@znicholasbrown znicholasbrown merged commit 379d50d into main Mar 31, 2023
@znicholasbrown znicholasbrown deleted the feature-variables-table-2023-03-31 branch March 31, 2023 16:17
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