Skip to content

Commit

Permalink
fix(QueryTracker): redirect to yt operations from running yql queries [
Browse files Browse the repository at this point in the history
  • Loading branch information
vitshev committed Jul 25, 2024
1 parent 002cafa commit 2a91613
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
3 changes: 3 additions & 0 deletions packages/ui/src/ui/pages/query-tracker/Plan/models/yql/yql.ts
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,9 @@ export interface definitions {
running?: number;
total?: number;
stages?: definitions['EntryStringInstant'];
remoteData?: {
cluster_name?: string;
};
};
OperationErrorDto: {
file?: string;
Expand Down
14 changes: 10 additions & 4 deletions packages/ui/src/ui/pages/query-tracker/Plan/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -596,12 +596,18 @@ export function usePrepareNode(operationIdToCluster: Map<string, string>) {
} else if (node.progress?.remoteId) {
const id = node.progress?.remoteId.split('/').pop();

if (id && operationIdToCluster.has(id)) {
const cluster = operationIdToCluster.get(id)!;
if (!id) {
node.url = getOperationUrl(node);

return node;
}

const cluster = operationIdToCluster.has(id)
? operationIdToCluster.get(id)
: node.progress?.remoteData?.cluster_name;

if (cluster) {
node.url = buildOperationUrl(cluster, id);
} else {
node.url = getOperationUrl(node);
}
}

Expand Down

0 comments on commit 2a91613

Please # to comment.