betodealmeida commented on code in PR #31421:
URL: https://github.com/apache/superset/pull/31421#discussion_r1927667721
##########
superset-frontend/src/pages/SavedQueryList/index.tsx:
##########
@@ -233,16 +232,31 @@ function SavedQueryList({
};
const copyQueryLink = useCallback(
- (id: number) => {
- copyTextToClipboard(() =>
- Promise.resolve(`${window.location.origin}/sqllab?savedQueryId=${id}`),
- )
- .then(() => {
- addSuccessToast(t('Link Copied!'));
- })
- .catch(() => {
- addDangerToast(t('Sorry, your browser does not support copying.'));
+ async (savedQuery: SavedQueryObject) => {
+ try {
+ const payload = {
+ dbId: savedQuery.db_id,
+ name: savedQuery.label,
+ schema: savedQuery.schema,
Review Comment:
OK, I tested and it you add `catalog` to
`superset-frontend/src/views/CRUD/types.ts` it will be populated automatically
by the hook, so you just need to add:
```js
catalog: string | null;
```
to `SavedQueryObject`.
Also, it needs to be added to the Schemas and Types as well, because if a
database supports multiple catalogs (like BigQuery or Trino) the query with
just the schema is not enough information.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]