You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@submarine.apache.org by pi...@apache.org on 2021/08/08 14:06:34 UTC
[submarine] branch master updated: SUBMARINE-939. Fix Auto Reload
Checkbox Not To Continuously Reset
This is an automated email from the ASF dual-hosted git repository.
pingsutw pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/submarine.git
The following commit(s) were added to refs/heads/master by this push:
new 802f8eb SUBMARINE-939. Fix Auto Reload Checkbox Not To Continuously Reset
802f8eb is described below
commit 802f8eb41a87ddde9dac177674d51cc489174bd4
Author: noidname01 <ti...@gmail.com>
AuthorDate: Mon Jul 19 13:58:30 2021 +0800
SUBMARINE-939. Fix Auto Reload Checkbox Not To Continuously Reset
### What is this PR for?
Fix Auto Reload Checkbox Not To Continuously Reset
### What type of PR is it?
[Bug Fix]
### Todos
None
### What is the Jira issue?
https://issues.apache.org/jira/projects/SUBMARINE/issues/SUBMARINE-939
### How should this be tested?
You can create an experiment and check the checkbox, then see whether the checkbox is not reload together with other components.
### Screenshots (if appropriate)
https://user-images.githubusercontent.com/55401762/125742649-f57b4c3c-4de4-4721-9982-a2cd8110875d.mp4
### Questions:
* Do the license files need updating? No
* Are there breaking changes for older versions? No
* Does this need new documentation? No
Author: noidname01 <ti...@gmail.com>
Signed-off-by: Kevin <pi...@apache.org>
Closes #680 from noidname01/SUBMARINE-939 and squashes the following commits:
51b4e88b [noidname01] rename variable and add comment
2628a6ec [noidname01] fix auto reload checkbox
---
.../experiment-home/experiment-home.component.ts | 17 ++++++++++-------
1 file changed, 10 insertions(+), 7 deletions(-)
diff --git a/submarine-workbench/workbench-web/src/app/pages/workbench/experiment/experiment-home/experiment-home.component.ts b/submarine-workbench/workbench-web/src/app/pages/workbench/experiment/experiment-home/experiment-home.component.ts
index e6acc49..4646538 100644
--- a/submarine-workbench/workbench-web/src/app/pages/workbench/experiment/experiment-home/experiment-home.component.ts
+++ b/submarine-workbench/workbench-web/src/app/pages/workbench/experiment/experiment-home/experiment-home.component.ts
@@ -67,7 +67,7 @@ export class ExperimentHomeComponent implements OnInit {
ngOnInit() {
this.experimentFormService.fetchListService.subscribe(() => {
- this.fetchExperimentList();
+ this.fetchExperimentList(false);
});
this.experimentService.emitInfo(null);
@@ -76,7 +76,7 @@ export class ExperimentHomeComponent implements OnInit {
this.onSwitchAutoReload();
}
- fetchExperimentList() {
+ fetchExperimentList(isAutoReload: boolean) {
this.experimentService.fetchExperimentList().subscribe(
(list) => {
this.isListLoading = false;
@@ -94,9 +94,12 @@ export class ExperimentHomeComponent implements OnInit {
item.duration = this.experimentService.durationHandle(result);
}
});
- this.checkedList = [];
- for (let i = 0; i < this.experimentList.length; i++) {
- this.checkedList.push(false);
+ if(!isAutoReload){
+ // If it is auto-reloading, we do not want to change the state of checkbox.
+ this.checkedList = [];
+ for (let i = 0; i < this.experimentList.length; i++) {
+ this.checkedList.push(false);
+ }
}
},
(error) => {
@@ -111,7 +114,7 @@ export class ExperimentHomeComponent implements OnInit {
if (onMessage === true) {
this.nzMessageService.success('Delete Experiment Successfully!');
}
- this.fetchExperimentList();
+ this.fetchExperimentList(true);
},
(err) => {
if (onMessage === true) {
@@ -138,7 +141,7 @@ export class ExperimentHomeComponent implements OnInit {
console.log(this.switchValue);
if (this.switchValue) {
this.reloadSub = this.reloadInterval.subscribe((res) => {
- this.fetchExperimentList();
+ this.fetchExperimentList(true);
});
} else {
if (this.reloadSub) {
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@submarine.apache.org
For additional commands, e-mail: dev-help@submarine.apache.org