-
Notifications
You must be signed in to change notification settings - Fork 125
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Connectors: query invalidations (#5014)
* Correctly invalidate the Tables list when a Connector changes * Fix accidental query cancellation * Invalidate `AnalyzeConnectors` when a Connector changes
- Loading branch information
1 parent
e81a68d
commit 1802181
Showing
3 changed files
with
43 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import { V1Resource } from "../../runtime-client"; | ||
import { ResourceKind } from "../entity-management/resource-selectors"; | ||
|
||
export function getConnectorNameForResource(resource: V1Resource): string { | ||
if (!resource.meta?.name?.kind || !resource.meta?.name?.name) return ""; | ||
|
||
if (resource.meta.name.kind === ResourceKind.Connector.toString()) { | ||
return resource.meta.name.name; | ||
} else if (resource.meta.name.kind === ResourceKind.Source.toString()) { | ||
return resource?.source?.spec?.sinkConnector ?? ""; | ||
} else if (resource.meta.name.kind === ResourceKind.Model.toString()) { | ||
return resource?.model?.spec?.outputConnector ?? ""; | ||
} | ||
|
||
return ""; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1802181
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.
🎉 Published on https://ui.rilldata.io as production
🚀 Deployed on https://665f8d356f35fe5dbfc3d181--rill-ui-stage.netlify.app
1802181
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.
🎉 Published on https://ui.rilldata.com as production
🚀 Deployed on https://665f9f1c86974f6d508295ad--rill-ui.netlify.app