-
Notifications
You must be signed in to change notification settings - Fork 398
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
Cb 4270 row counter add cancel button for big tables #2545
Merged
Wroud
merged 41 commits into
devel
from
CB-4270-row-counter-add-cancel-button-for-big-tables
Apr 23, 2024
Merged
Changes from 1 commit
Commits
Show all changes
41 commits
Select commit
Hold shift + click to select a range
d4b5296
CB-4270 adds cancel option for load total count of rows in table
sergeyteleshev a6da7c5
CB-4270 adds ui for load total count of rows in table
sergeyteleshev de7c6e4
CB-4270 fix: task cancels in a true way
sergeyteleshev bfcfaa0
CB-4270 cleanup
sergeyteleshev 7c424c6
CB-4270 cancel load total count on close table tab
sergeyteleshev 110c1d8
CB-4270 cancel load total count on close sql editor tab
sergeyteleshev d58b80c
CB-4270 fix: cancel close only task if it is not already cancelled
sergeyteleshev 9eea88c
CB-4270 chore: tasks -> cancelLoadTotalCountTasks
sergeyteleshev 9ddb968
CB-4270 stops counting rows when tab closes
sergeyteleshev bcc43ce
CB-4270 reverts incorrect calls of cancelLoadTotalCount
sergeyteleshev 064a737
CB-4270 reverts ToolsActions unneeded props
sergeyteleshev 2e5f4f8
CB-4270 pr fixes
sergeyteleshev 96f4ea0
СB-4270 cancel load total count for refresh action
sergeyteleshev 8417093
CB-4270 fix: place cancelLoadTotalCount to DatabaseDataSource
sergeyteleshev 13f3eae
CB-4270 fix: cancel load rows in refresh data in data source
sergeyteleshev 62d282f
CB-4270 cancels load on close result set tab
sergeyteleshev 10623ce
CB-4270 refactor: move cancelLoadTotalCount to resultsetdatasource
sergeyteleshev 1fbb20c
CB-4270 cancel load total count execute only for resultsetdatasource
sergeyteleshev c96508e
CB-4270 adds constraint for TableFooterRowCount
sergeyteleshev 12c3d99
CB-4270 fix: do not load new value if cancelled rows loading
sergeyteleshev f8bffa2
CB-4270 cleanup
sergeyteleshev 24f2e12
Revert "CB-4270 cleanup"
sergeyteleshev 95fa2ed
CB-4270 pr fixes
sergeyteleshev 8acd987
Merge branch 'devel' into CB-4270-row-counter-add-cancel-button-for-b…
sergeyteleshev dee0295
CB-4270 pr fixes
sergeyteleshev 708d658
CB-4270 deletes cross icon icon
sergeyteleshev 4a3445e
CB-4270 DataSources has correct tree of calls for cancel and dispose …
sergeyteleshev 815cd26
CB-4270 cleanup
sergeyteleshev 8b185d5
chore: add experimental cancellable promise implementation
Wroud 46b89da
CB-4270 pr fixes: remove unneeded disposes + close results in close r…
sergeyteleshev c665a13
CB-4270 removes closeResults abstraction leak in ResultSetDataSource …
sergeyteleshev a37d332
CB-4270 removes unused context in data sources
sergeyteleshev a35fa39
Merge branch 'devel' into CB-4270-row-counter-add-cancel-button-for-b…
dariamarutkina 44c8f5a
Merge branch 'devel' into CB-4270-row-counter-add-cancel-button-for-b…
dariamarutkina 6581fa4
Merge branch 'devel' into CB-4270-row-counter-add-cancel-button-for-b…
sergeyteleshev 6f4482d
CB-4270 adds loader for CancelTotalCountAction on cancel task action
sergeyteleshev d894010
CB-4270 cancel row count job fix
yagudin10 f7b9328
CB-4270 cancel row counter with notification
sergeyteleshev ea2a1cf
CB-4270 pr fixes
sergeyteleshev 8e7f48b
CB-4270 pr fixes
sergeyteleshev c37cd9f
Merge branch 'devel' into CB-4270-row-counter-add-cancel-button-for-b…
dariamarutkina File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,3 +21,7 @@ | |
font-weight: 700; | ||
font-size: 12px; | ||
} | ||
|
||
.loader { | ||
margin-right: 8px !important; | ||
} |
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 |
---|---|---|
|
@@ -7,21 +7,40 @@ | |
*/ | ||
import { observer } from 'mobx-react-lite'; | ||
|
||
import { Container, IconButton, useTranslate } from '@cloudbeaver/core-blocks'; | ||
import { Container, IconButton, Loader, s, useS, useTranslate } from '@cloudbeaver/core-blocks'; | ||
|
||
import styles from './CancelTotalCountAction.m.css'; | ||
|
||
interface Props { | ||
onClick: VoidFunction; | ||
loading: boolean; | ||
} | ||
|
||
export const CancelTotalCountAction = observer(function CancelTotalCountAction({ onClick }: Props) { | ||
export const CancelTotalCountAction = observer(function CancelTotalCountAction({ onClick, loading }: Props) { | ||
const translate = useTranslate(); | ||
const style = useS(styles); | ||
|
||
function handleClick() { | ||
if (loading) { | ||
return; | ||
} | ||
|
||
onClick(); | ||
} | ||
|
||
return ( | ||
<Container className={styles.action} title={translate('ui_processing_cancel')} noWrap center zeroBasis keepSize onClick={onClick}> | ||
<IconButton className={styles.icon} name="cross" title={translate('ui_processing_cancel')} viewBox="0 0 32 32" /> | ||
<span className={styles.cancelText}>{translate('ui_processing_cancel')}</span> | ||
<Container | ||
className={s(style, { action: true })} | ||
title={loading ? translate('ui_processing_canceling') : translate('ui_processing_cancel')} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. translate(loading ? 'ui_processing_canceling' : 'ui_processing_cancel') |
||
noWrap | ||
center | ||
zeroBasis | ||
keepSize | ||
onClick={handleClick} | ||
> | ||
{loading && <Loader className={s(style, { loader: true })} small />} | ||
{!loading && <IconButton disabled={loading} className={s(style, { icon: true })} name="cross" viewBox="0 0 32 32" />} | ||
<span className={s(style, { cancelText: true })}>{translate('ui_processing_cancel')}</span> | ||
</Container> | ||
); | ||
}); |
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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
please use
observer<Props>