Skip to content

Commit

Permalink
hide force update link
Browse files Browse the repository at this point in the history
  • Loading branch information
Dmitriy Borzenko committed Sep 10, 2024
1 parent 71eac95 commit bfbd0f4
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 24 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -86,12 +86,13 @@
"
></div>
&nbsp;
<a
<!--//TODO: Uncomment with new API -->
<!-- <a
*ngIf="showForceUpdateLink(element)"
class="text-small text-primary d-inline-block"
(click)="onForceUpdate(element)"
>force update</a
>
> -->
</div>
</div>
</div>
Expand Down
11 changes: 4 additions & 7 deletions src/app/common/components/flows-table/flows-table.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -197,13 +197,10 @@ export class FlowsTableComponent extends BaseComponent implements OnInit, OnChan
node.description.__typename === "FlowDescriptionDatasetPollingIngest" &&
node.description.ingestResult?.__typename === "FlowDescriptionUpdateResultUpToDate" &&
node.configSnapshot?.__typename === "FlowConfigurationIngest" &&
!node.configSnapshot.fetchUncacheable &&
// TODO: Remove this condition
Boolean(node.configSnapshot)
node.description.ingestResult.uncacheable &&
((node.configSnapshot?.__typename === "FlowConfigurationIngest" && !node.configSnapshot.fetchUncacheable) ||
!node.configSnapshot)
);
// TODO: Replace when will be new API
// ||
// !node.configSnapshot)
}

public onForceUpdate(node: FlowSummaryDataFragment): void {
Expand All @@ -222,7 +219,7 @@ export class FlowsTableComponent extends BaseComponent implements OnInit, OnChan
.pipe(takeUntilDestroyed(this.destroyRef))
.subscribe((result: boolean) => {
if (result) {
this.toastrService.success("Success");
this.toastrService.success("Force update started");
}
});
} else {
Expand Down
11 changes: 4 additions & 7 deletions src/app/common/components/flows-table/flows-table.helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,14 +97,11 @@ export class DatasetFlowTableHelpers {
: element.description.ingestResult?.__typename ===
"FlowDescriptionUpdateResultUpToDate" &&
element.description.ingestResult.uncacheable &&
element.configSnapshot?.__typename === "FlowConfigurationIngest" &&
!element.configSnapshot.fetchUncacheable &&
// TODO: Remove this condition
element.configSnapshot
((element.configSnapshot?.__typename === "FlowConfigurationIngest" &&
!element.configSnapshot.fetchUncacheable) ||
!element.configSnapshot)
? // TODO: Replace when will be new API
// ||
// !node.configSnapshot)
`Source is uncacheable: to re-scan the data, use`
`Source is uncacheable: to re-scan the data, use force update`
: "Dataset is up-to-date";

case "FlowDescriptionDatasetExecuteTransform":
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -140,14 +140,11 @@ export class DatasetFlowDetailsHelpers {
: flowDetails.description.ingestResult?.__typename ===
"FlowDescriptionUpdateResultUpToDate" &&
flowDetails.description.ingestResult.uncacheable &&
flowDetails.configSnapshot?.__typename === "FlowConfigurationIngest" &&
!flowDetails.configSnapshot.fetchUncacheable &&
// TODO: Remove this condition
flowDetails.configSnapshot
? // TODO: Replace when will be new API
// ||
// !flowDetails.configSnapshot)
"Source is uncacheable: to re-scan the data, use force update"
((flowDetails.configSnapshot?.__typename ===
"FlowConfigurationIngest" &&
!flowDetails.configSnapshot.fetchUncacheable) ||
!flowDetails.configSnapshot)
? "Source is uncacheable: to re-scan the data, use force update"
: "Dataset is up-to-date";

case "FlowDescriptionDatasetExecuteTransform":
Expand Down

0 comments on commit bfbd0f4

Please sign in to comment.