You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dolphinscheduler.apache.org by GitBox <gi...@apache.org> on 2020/12/04 10:53:21 UTC
[GitHub] [incubator-dolphinscheduler] chengshiwen opened a new pull request #4162: [Fix][UI]: fix re-login problem in new tab
chengshiwen opened a new pull request #4162:
URL: https://github.com/apache/incubator-dolphinscheduler/pull/4162
## *Tips*
- *Thanks very much for contributing to Apache DolphinScheduler.*
- *Please review https://dolphinscheduler.apache.org/en-us/community/index.html before opening a pull request.*
## What is the purpose of the pull request
*fix re-login problem in new tab*
## Brief change log
*fix re-login conditional logic in dolphinscheduler-ui/src/js/module/io/index.js*
the new re-login condition is `(!sIdCookie || (sessionId && sessionId !== sIdCookie)) && requstUrl !== 'login'`
assume `requstUrl !== 'login'`:
- `sIdCookie` is `undefined` or `null`: require re-login
- `sessionId && sessionId !== sIdCookie`: require re-login when sessionId changed
- attention that `sessionId` may be `null` but `sIdCookie` is non-empty
## Verify this pull request
*(Please pick either of the following options)*
This change added tests and can be verified as follows:
**Before fix**:

**After fix**:

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-dolphinscheduler] break60 commented on pull request #4162: [Fix][UI]: fix re-login problem in new tab
Posted by GitBox <gi...@apache.org>.
break60 commented on pull request #4162:
URL: https://github.com/apache/incubator-dolphinscheduler/pull/4162#issuecomment-742310089
> The action to require re-login in new tab for logged-in user is not a good user interaction experience, so I submit this pr to solve the problem.
>
> For the state synchronization in multiple tabs, this problem appears in most front-end projects. In essence, each tab is independent of each other, and http request is also stateless. To solve this problem, listening event of `localStorage` may be possible. Specifically,
>
> * Chage `localStorage` when some state changed in a certain tab
> * Add event listener for key `storage` in another tab
>
> * This means that you can trigger a page refresh, or whatever you want to do
>
> The sample code is as follow:
Very good, can it be added to the current pr
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-dolphinscheduler] sonarcloud[bot] removed a comment on pull request #4162: [Fix][UI]: fix re-login problem in new tab and state synchronization problem in multiple tabs
Posted by GitBox <gi...@apache.org>.
sonarcloud[bot] removed a comment on pull request #4162:
URL: https://github.com/apache/incubator-dolphinscheduler/pull/4162#issuecomment-738724286
Kudos, SonarCloud Quality Gate passed!
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug.png' alt='Bug' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=4162&resolved=false&types=BUG) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=4162&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=4162&resolved=false&types=BUG)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability.png' alt='Vulnerability' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=4162&resolved=false&types=VULNERABILITY) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=4162&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=4162&resolved=false&types=VULNERABILITY)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot.png' alt='Security Hotspot' width='16' height='16' />](https://sonarcloud.io/project/security_hotspots?id=apache-dolphinscheduler&pullRequest=4162&resolved=false&types=SECURITY_HOTSPOT) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/security_hotspots?id=apache-dolphinscheduler&pullRequest=4162&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache-dolphinscheduler&pullRequest=4162&resolved=false&types=SECURITY_HOTSPOT)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell.png' alt='Code Smell' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=4162&resolved=false&types=CODE_SMELL) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=4162&resolved=false&types=CODE_SMELL) [0 Code Smells](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=4162&resolved=false&types=CODE_SMELL)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/NoCoverageInfo.png' alt='No Coverage information' width='16' height='16' />](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=4162&metric=coverage&view=list) No Coverage information
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3.png' alt='0.0%' width='16' height='16' />](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=4162&metric=new_duplicated_lines_density&view=list) [0.0% Duplication](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=4162&metric=new_duplicated_lines_density&view=list)
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-dolphinscheduler] sonarcloud[bot] commented on pull request #4162: [Fix][UI]: fix re-login problem in new tab and state synchronization problem in multiple tabs
Posted by GitBox <gi...@apache.org>.
sonarcloud[bot] commented on pull request #4162:
URL: https://github.com/apache/incubator-dolphinscheduler/pull/4162#issuecomment-744376424
Kudos, SonarCloud Quality Gate passed!
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug.png' alt='Bug' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=4162&resolved=false&types=BUG) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=4162&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=4162&resolved=false&types=BUG)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability.png' alt='Vulnerability' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=4162&resolved=false&types=VULNERABILITY) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=4162&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=4162&resolved=false&types=VULNERABILITY)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot.png' alt='Security Hotspot' width='16' height='16' />](https://sonarcloud.io/project/security_hotspots?id=apache-dolphinscheduler&pullRequest=4162&resolved=false&types=SECURITY_HOTSPOT) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/security_hotspots?id=apache-dolphinscheduler&pullRequest=4162&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache-dolphinscheduler&pullRequest=4162&resolved=false&types=SECURITY_HOTSPOT)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell.png' alt='Code Smell' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=4162&resolved=false&types=CODE_SMELL) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=4162&resolved=false&types=CODE_SMELL) [0 Code Smells](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=4162&resolved=false&types=CODE_SMELL)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/NoCoverageInfo.png' alt='No Coverage information' width='16' height='16' />](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=4162&metric=coverage&view=list) No Coverage information
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3.png' alt='0.0%' width='16' height='16' />](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=4162&metric=new_duplicated_lines_density&view=list) [0.0% Duplication](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=4162&metric=new_duplicated_lines_density&view=list)
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-dolphinscheduler] sonarcloud[bot] commented on pull request #4162: [Fix][UI]: fix re-login problem in new tab
Posted by GitBox <gi...@apache.org>.
sonarcloud[bot] commented on pull request #4162:
URL: https://github.com/apache/incubator-dolphinscheduler/pull/4162#issuecomment-738724286
Kudos, SonarCloud Quality Gate passed!
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug.png' alt='Bug' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=4162&resolved=false&types=BUG) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=4162&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=4162&resolved=false&types=BUG)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability.png' alt='Vulnerability' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=4162&resolved=false&types=VULNERABILITY) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=4162&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=4162&resolved=false&types=VULNERABILITY)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot.png' alt='Security Hotspot' width='16' height='16' />](https://sonarcloud.io/project/security_hotspots?id=apache-dolphinscheduler&pullRequest=4162&resolved=false&types=SECURITY_HOTSPOT) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/security_hotspots?id=apache-dolphinscheduler&pullRequest=4162&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache-dolphinscheduler&pullRequest=4162&resolved=false&types=SECURITY_HOTSPOT)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell.png' alt='Code Smell' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=4162&resolved=false&types=CODE_SMELL) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=4162&resolved=false&types=CODE_SMELL) [0 Code Smells](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=4162&resolved=false&types=CODE_SMELL)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/NoCoverageInfo.png' alt='No Coverage information' width='16' height='16' />](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=4162&metric=coverage&view=list) No Coverage information
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3.png' alt='0.0%' width='16' height='16' />](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=4162&metric=new_duplicated_lines_density&view=list) [0.0% Duplication](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=4162&metric=new_duplicated_lines_density&view=list)
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-dolphinscheduler] geosmart commented on pull request #4162: [Fix][UI]: fix re-login problem in new tab and state synchronization problem in multiple tabs
Posted by GitBox <gi...@apache.org>.
geosmart commented on pull request #4162:
URL: https://github.com/apache/incubator-dolphinscheduler/pull/4162#issuecomment-749884811
this pr make a new problem!!!
when you edit dag node , update a sql and click ok(not save the dag)
switch tab to copy a sql, and switch back,
the sql change is lost !
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-dolphinscheduler] sonarcloud[bot] commented on pull request #4162: [Fix][UI]: fix re-login problem in new tab and state synchronization problem in multiple tabs
Posted by GitBox <gi...@apache.org>.
sonarcloud[bot] commented on pull request #4162:
URL: https://github.com/apache/incubator-dolphinscheduler/pull/4162#issuecomment-744542096
Kudos, SonarCloud Quality Gate passed!
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug.png' alt='Bug' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=4162&resolved=false&types=BUG) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=4162&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=4162&resolved=false&types=BUG)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability.png' alt='Vulnerability' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=4162&resolved=false&types=VULNERABILITY) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=4162&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=4162&resolved=false&types=VULNERABILITY)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot.png' alt='Security Hotspot' width='16' height='16' />](https://sonarcloud.io/project/security_hotspots?id=apache-dolphinscheduler&pullRequest=4162&resolved=false&types=SECURITY_HOTSPOT) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/security_hotspots?id=apache-dolphinscheduler&pullRequest=4162&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache-dolphinscheduler&pullRequest=4162&resolved=false&types=SECURITY_HOTSPOT)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell.png' alt='Code Smell' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=4162&resolved=false&types=CODE_SMELL) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=4162&resolved=false&types=CODE_SMELL) [0 Code Smells](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=4162&resolved=false&types=CODE_SMELL)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/NoCoverageInfo.png' alt='No Coverage information' width='16' height='16' />](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=4162&metric=coverage&view=list) No Coverage information
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3.png' alt='0.0%' width='16' height='16' />](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=4162&metric=new_duplicated_lines_density&view=list) [0.0% Duplication](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=4162&metric=new_duplicated_lines_density&view=list)
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-dolphinscheduler] codecov-io commented on pull request #4162: [Fix][UI]: fix re-login problem in new tab
Posted by GitBox <gi...@apache.org>.
codecov-io commented on pull request #4162:
URL: https://github.com/apache/incubator-dolphinscheduler/pull/4162#issuecomment-738722176
# [Codecov](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/4162?src=pr&el=h1) Report
> Merging [#4162](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/4162?src=pr&el=desc) (06fbccb) into [dev](https://codecov.io/gh/apache/incubator-dolphinscheduler/commit/62c2e852521e66b1995d6327c70c3b6f38144e81?el=desc) (62c2e85) will **decrease** coverage by `0.03%`.
> The diff coverage is `n/a`.
[](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/4162?src=pr&el=tree)
```diff
@@ Coverage Diff @@
## dev #4162 +/- ##
============================================
- Coverage 41.37% 41.33% -0.04%
+ Complexity 3115 3111 -4
============================================
Files 467 467
Lines 22168 22168
Branches 2720 2720
============================================
- Hits 9172 9164 -8
- Misses 12113 12122 +9
+ Partials 883 882 -1
```
| [Impacted Files](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/4162?src=pr&el=tree) | Coverage Δ | Complexity Δ | |
|---|---|---|---|
| [...inscheduler/service/zk/CuratorZookeeperClient.java](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/4162/diff?src=pr&el=tree#diff-ZG9scGhpbnNjaGVkdWxlci1zZXJ2aWNlL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kb2xwaGluc2NoZWR1bGVyL3NlcnZpY2UvemsvQ3VyYXRvclpvb2tlZXBlckNsaWVudC5qYXZh) | `56.09% <0.00%> (-7.32%)` | `6.00% <0.00%> (-1.00%)` | |
| [...e/dolphinscheduler/remote/NettyRemotingClient.java](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/4162/diff?src=pr&el=tree#diff-ZG9scGhpbnNjaGVkdWxlci1yZW1vdGUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2RvbHBoaW5zY2hlZHVsZXIvcmVtb3RlL05ldHR5UmVtb3RpbmdDbGllbnQuamF2YQ==) | `50.00% <0.00%> (-2.78%)` | `9.00% <0.00%> (-2.00%)` | |
| [...dolphinscheduler/remote/future/ResponseFuture.java](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/4162/diff?src=pr&el=tree#diff-ZG9scGhpbnNjaGVkdWxlci1yZW1vdGUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2RvbHBoaW5zY2hlZHVsZXIvcmVtb3RlL2Z1dHVyZS9SZXNwb25zZUZ1dHVyZS5qYXZh) | `81.35% <0.00%> (-1.70%)` | `18.00% <0.00%> (-1.00%)` | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/4162?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/4162?src=pr&el=footer). Last update [62c2e85...06fbccb](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/4162?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-dolphinscheduler] sonarcloud[bot] removed a comment on pull request #4162: [Fix][UI]: fix re-login problem in new tab and state synchronization problem in multiple tabs
Posted by GitBox <gi...@apache.org>.
sonarcloud[bot] removed a comment on pull request #4162:
URL: https://github.com/apache/incubator-dolphinscheduler/pull/4162#issuecomment-744376424
Kudos, SonarCloud Quality Gate passed!
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug.png' alt='Bug' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=4162&resolved=false&types=BUG) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=4162&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=4162&resolved=false&types=BUG)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability.png' alt='Vulnerability' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=4162&resolved=false&types=VULNERABILITY) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=4162&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=4162&resolved=false&types=VULNERABILITY)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot.png' alt='Security Hotspot' width='16' height='16' />](https://sonarcloud.io/project/security_hotspots?id=apache-dolphinscheduler&pullRequest=4162&resolved=false&types=SECURITY_HOTSPOT) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/security_hotspots?id=apache-dolphinscheduler&pullRequest=4162&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache-dolphinscheduler&pullRequest=4162&resolved=false&types=SECURITY_HOTSPOT)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell.png' alt='Code Smell' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=4162&resolved=false&types=CODE_SMELL) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=4162&resolved=false&types=CODE_SMELL) [0 Code Smells](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=4162&resolved=false&types=CODE_SMELL)
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/NoCoverageInfo.png' alt='No Coverage information' width='16' height='16' />](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=4162&metric=coverage&view=list) No Coverage information
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3.png' alt='0.0%' width='16' height='16' />](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=4162&metric=new_duplicated_lines_density&view=list) [0.0% Duplication](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=4162&metric=new_duplicated_lines_density&view=list)
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-dolphinscheduler] codecov-io edited a comment on pull request #4162: [Fix][UI]: fix re-login problem in new tab and state synchronization problem in multiple tabs
Posted by GitBox <gi...@apache.org>.
codecov-io edited a comment on pull request #4162:
URL: https://github.com/apache/incubator-dolphinscheduler/pull/4162#issuecomment-738722176
# [Codecov](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/4162?src=pr&el=h1) Report
> Merging [#4162](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/4162?src=pr&el=desc) (479ff78) into [dev](https://codecov.io/gh/apache/incubator-dolphinscheduler/commit/95d320d7da4671a68ed312f6ec2f77cb79b1ed5a?el=desc) (95d320d) will **decrease** coverage by `0.00%`.
> The diff coverage is `n/a`.
[](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/4162?src=pr&el=tree)
```diff
@@ Coverage Diff @@
## dev #4162 +/- ##
============================================
- Coverage 42.93% 42.93% -0.01%
Complexity 3134 3134
============================================
Files 464 464
Lines 21614 21614
Branches 2612 2612
============================================
- Hits 9281 9280 -1
- Misses 11442 11444 +2
+ Partials 891 890 -1
```
| [Impacted Files](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/4162?src=pr&el=tree) | Coverage Δ | Complexity Δ | |
|---|---|---|---|
| [...inscheduler/service/zk/CuratorZookeeperClient.java](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/4162/diff?src=pr&el=tree#diff-ZG9scGhpbnNjaGVkdWxlci1zZXJ2aWNlL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kb2xwaGluc2NoZWR1bGVyL3NlcnZpY2UvemsvQ3VyYXRvclpvb2tlZXBlckNsaWVudC5qYXZh) | `60.97% <0.00%> (-2.44%)` | `7.00% <0.00%> (ø%)` | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/4162?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/4162?src=pr&el=footer). Last update [95d320d...479ff78](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/4162?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-dolphinscheduler] break60 commented on pull request #4162: [Fix][UI]: fix re-login problem in new tab
Posted by GitBox <gi...@apache.org>.
break60 commented on pull request #4162:
URL: https://github.com/apache/incubator-dolphinscheduler/pull/4162#issuecomment-741595567
In the past, the same browser can open multiple tabs, but there will be a problem. For example, the task of a certain tab is changed, and the task of another tab will not be updated synchronously. Is there a better way to support multiple tabs? And if a certain tab is changed, other tabs can be updated simultaneously
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-dolphinscheduler] chengshiwen commented on pull request #4162: [Fix][UI]: fix re-login problem in new tab and state synchronization problem in multiple tabs
Posted by GitBox <gi...@apache.org>.
chengshiwen commented on pull request #4162:
URL: https://github.com/apache/incubator-dolphinscheduler/pull/4162#issuecomment-749893947
This merged pr is based on `visibilitychange `
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-dolphinscheduler] CalvinKirs merged pull request #4162: [Fix][UI]: fix re-login problem in new tab and state synchronization problem in multiple tabs
Posted by GitBox <gi...@apache.org>.
CalvinKirs merged pull request #4162:
URL: https://github.com/apache/incubator-dolphinscheduler/pull/4162
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-dolphinscheduler] CalvinKirs commented on pull request #4162: [Fix][UI]: fix re-login problem in new tab and state synchronization problem in multiple tabs
Posted by GitBox <gi...@apache.org>.
CalvinKirs commented on pull request #4162:
URL: https://github.com/apache/incubator-dolphinscheduler/pull/4162#issuecomment-749885459
> this pr make a new problem!!!
> when you edit dag node ,
> eg:
>
> 1. update a sql and click ok(not save the dag)
> 2. switch tab to copy something
> 3. switch to ds dag edit tab
> now open the node param ,found that the sql change is lost !
Can you create a new issue?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-dolphinscheduler] chengshiwen edited a comment on pull request #4162: [Fix][UI]: fix re-login problem in new tab and state synchronization problem in multiple tabs
Posted by GitBox <gi...@apache.org>.
chengshiwen edited a comment on pull request #4162:
URL: https://github.com/apache/incubator-dolphinscheduler/pull/4162#issuecomment-742573312
I will add it later
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-dolphinscheduler] geosmart commented on pull request #4162: [Fix][UI]: fix re-login problem in new tab and state synchronization problem in multiple tabs
Posted by GitBox <gi...@apache.org>.
geosmart commented on pull request #4162:
URL: https://github.com/apache/incubator-dolphinscheduler/pull/4162#issuecomment-749888340
> @geosmart @break60
> This is a problem caused by state synchronization in new tab. For state synchronization, we will refresh page in new opened page.
> If we don't do this, the issue **the task of a certain tab is changed, and the task of another tab will not be updated synchronously** referenced by @break60 will occur.
I know the visibilitychange can fix the sync problem
but the scenario of dag editor can not refresh to make the data loss
the dag design is usauly need to switch tab
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-dolphinscheduler] chengshiwen commented on pull request #4162: [Fix][UI]: fix re-login problem in new tab
Posted by GitBox <gi...@apache.org>.
chengshiwen commented on pull request #4162:
URL: https://github.com/apache/incubator-dolphinscheduler/pull/4162#issuecomment-742292282
@break60 Thanks for reply.
The action to require re-login in new tab for logged-in user is not a good user interaction experience, so I submit this pr to solve the problem.
For the state synchronization in multiple tabs, this problem appears in most front-end projects. In essence, each tab is independent of each other, and http request is also stateless. To solve this problem, listening event of `localStorage` may be possible. Specifically,
- Chage `localStorage` when some state changed in a certain tab
- Add event listener for key `storage` in another tab
- This means that you can trigger a page refresh, or whatever you want to do
The sample code is as follow:

The example effect is as follow:

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-dolphinscheduler] chengshiwen commented on pull request #4162: [Fix][UI]: fix re-login problem in new tab and state synchronization problem in multiple tabs
Posted by GitBox <gi...@apache.org>.
chengshiwen commented on pull request #4162:
URL: https://github.com/apache/incubator-dolphinscheduler/pull/4162#issuecomment-749887463
@geosmart @break60
This is a problem caused by state synchronization in new tab. For state synchronization, we will refresh page in new opened page.
If we don't do this, the issue **the task of a certain tab is changed, and the task of another tab will not be updated synchronously** referenced by @break60 will occur.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-dolphinscheduler] chengshiwen commented on pull request #4162: [Fix][UI]: fix re-login problem in new tab
Posted by GitBox <gi...@apache.org>.
chengshiwen commented on pull request #4162:
URL: https://github.com/apache/incubator-dolphinscheduler/pull/4162#issuecomment-742573312
I will add it tomorrow
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-dolphinscheduler] geosmart edited a comment on pull request #4162: [Fix][UI]: fix re-login problem in new tab and state synchronization problem in multiple tabs
Posted by GitBox <gi...@apache.org>.
geosmart edited a comment on pull request #4162:
URL: https://github.com/apache/incubator-dolphinscheduler/pull/4162#issuecomment-749884811
this pr make a new problem!!!
when you edit dag node ,
eg:
1. update a sql and click ok(not save the dag)
2. switch tab to copy something
3. switch to ds dag edit tab
now open the node param ,found that the sql change is lost !
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-dolphinscheduler] geosmart edited a comment on pull request #4162: [Fix][UI]: fix re-login problem in new tab and state synchronization problem in multiple tabs
Posted by GitBox <gi...@apache.org>.
geosmart edited a comment on pull request #4162:
URL: https://github.com/apache/incubator-dolphinscheduler/pull/4162#issuecomment-749888340
> @geosmart @break60
> This is a problem caused by state synchronization in new tab. For state synchronization, we will refresh page in new opened page.
> If we don't do this, the issue **the task of a certain tab is changed, and the task of another tab will not be updated synchronously** referenced by @break60 will occur.
I know the visibilitychange can fix the sync problem
but the scenario of dag editor can not refresh to make the data loss
the dag design is usually need to switch tab ,eg. copy a sql snippet
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-dolphinscheduler] geosmart edited a comment on pull request #4162: [Fix][UI]: fix re-login problem in new tab and state synchronization problem in multiple tabs
Posted by GitBox <gi...@apache.org>.
geosmart edited a comment on pull request #4162:
URL: https://github.com/apache/incubator-dolphinscheduler/pull/4162#issuecomment-749884811
this pr make a new problem!!!
when you edit dag node ,
eg:
1. update a sql and click ok(not save the dag)
2. switch tab to copy something
3. switch to ds dag edit tab
now open the node param ,found that the sql change is lost !
that means,i have to save the dag with any small change!
that will make the dag version boom...
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org