Skip to content
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

[Improvement-16947][UI] Task instance log details should always stay at the bottom #16947

Open
wants to merge 9 commits into
base: dev
Choose a base branch
from

Conversation

imizao
Copy link
Contributor

@imizao imizao commented Jan 7, 2025

Purpose of the pull request

Task instance log details should always stay at the bottom.

close #16975

Brief change log

The log details area for task instances should always remain scrolled to the bottom, allowing users to view the latest log output in real-time.

Final effect 1
12.gif

Final effect 2
123.gif

Verify this pull request

This pull request is code cleanup without any test coverage.

Pull Request Notice

Pull Request Notice

If your pull request contains incompatible change, you should also add it to docs/docs/en/guide/upgrade/incompatible.md

@github-actions github-actions bot added the UI ui and front end related label Jan 7, 2025
@imizao imizao changed the title [Improvement][UI] Task instance log details should always stay at the… [Improvement][UI] Task instance log details should always stay at the bottom Jan 7, 2025
Copy link
Member

@SbloodyS SbloodyS left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please follow the pull request notice first.

Copy link
Member

@SbloodyS SbloodyS left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this feature needs disscussion. No all users needs this when the log is very large and refresh very fast.

@SbloodyS SbloodyS added the discussion discussion label Jan 8, 2025
@imizao
Copy link
Contributor Author

imizao commented Jan 8, 2025

Please follow the pull request notice first.

Well, should I use it like this? [Improvement-16947][UI] Task instance log details should always stay at the bottom

@imizao
Copy link
Contributor Author

imizao commented Jan 8, 2025

I think this feature needs disscussion. No all users needs this when the log is very large and refresh very fast.

Add a button that allows the user to manually control whether to scroll to the bottom, without forcing automatic scrolling. Would that work?

@imizao imizao changed the title [Improvement][UI] Task instance log details should always stay at the bottom [Improvement-16947][UI] Task instance log details should always stay at the bottom Jan 8, 2025
@imizao
Copy link
Contributor Author

imizao commented Jan 8, 2025

I think this feature needs disscussion. No all users needs this when the log is very large and refresh very fast.

Add a button that allows the user to manually control whether to scroll to the bottom, without forcing automatic scrolling. Would that work?

Like this.
12345.gif

@SbloodyS
Copy link
Member

SbloodyS commented Jan 9, 2025

Please follow the pull request notice first.

Well, should I use it like this? [Improvement-16947][UI] Task instance log details should always stay at the bottom

You can take a look at https://github.com/apache/dolphinscheduler/blob/dev/docs/docs/en/contribute/join/pull-request.md

@SbloodyS
Copy link
Member

SbloodyS commented Jan 9, 2025

Add a button that allows the user to manually control whether to scroll to the bottom, without forcing automatic scrolling. Would that work?

I think it's a good idea.

@imizao
Copy link
Contributor Author

imizao commented Jan 13, 2025

Add a button that allows the user to manually control whether to scroll to the bottom, without forcing automatic scrolling. Would that work?

I think it's a good idea.

The code has been submitted

@SbloodyS SbloodyS added the improvement make more easy to user or prompt friendly label Jan 21, 2025
@SbloodyS SbloodyS added this to the 3.3.0 milestone Jan 21, 2025
Copy link
Member

@SbloodyS SbloodyS left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Generally LGTM. Just some NIT.

dolphinscheduler-ui/src/locales/en_US/project.ts Outdated Show resolved Hide resolved
dolphinscheduler-ui/src/locales/zh_CN/project.ts Outdated Show resolved Hide resolved
@SbloodyS
Copy link
Member

SbloodyS commented Jan 21, 2025

You didn't create a new improvement issue and link to this PR. @imizao

@imizao
Copy link
Contributor Author

imizao commented Jan 22, 2025

Generally LGTM. Just some NIT.

Fixed the NITs, thanks for the suggestions!

@imizao
Copy link
Contributor Author

imizao commented Jan 22, 2025

You didn't create a new improvement issue and link to this PR. @imizao

This PR addresses #16975

dolphinscheduler-ui/src/components/log-modal/index.tsx Outdated Show resolved Hide resolved
@@ -67,8 +71,12 @@ export default defineComponent({
const { t } = useI18n()

const variables = reactive({
isFullscreen: false
isFullscreen: false,
autoScrollToBottom: true // New state variable
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we set to autoScrollToBottom to true by default. We should increase batch query log line num to 100000. This can significantly reduce the number of requests and improve the user experience.


Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the suggestion! In normal cases, a limit of 1000 is sufficient for most scenarios. The GIF I provided was an exceptional example to demonstrate the auto-scroll-to-bottom functionality, but it doesn't reflect the typical usage. Therefore, I believe keeping the limit at 1000 is appropriate for now. If we encounter performance issues or higher demand in the future, we can revisit this setting.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the production environment, 1000 is not enough for automatic refresh. It will cause great performance pressure on both frontend and backend. And we should avoid repeated execution and set a delay for it.

Copy link

@ruanwenjun
Copy link
Member

ruanwenjun commented Jan 24, 2025

The Final effect 1 and Final effect 2 is strange, shouldn't show the response over and over again, there is no log content here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discussion discussion improvement make more easy to user or prompt friendly UI ui and front end related
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Improvement][UI] Task instance log details should always stay at the bottom.
3 participants