[jira] [Commented] (AMBARI-25012) Log Search UI: cannot save filters + select all selecting the ovirrides as well

2018-12-07 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/AMBARI-25012?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16712837#comment-16712837
 ] 

ASF GitHub Bot commented on AMBARI-25012:
-

tobias-istvan closed pull request #57: [AMBARI-25012] Log Search UI: cannot 
save filters + select all selecting the ovirrides as well
URL: https://github.com/apache/ambari-logsearch/pull/57
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git 
a/ambari-logsearch-web/src/app/components/action-menu/action-menu.component.html
 
b/ambari-logsearch-web/src/app/components/action-menu/action-menu.component.html
index f8c65de82c..acd6504140 100644
--- 
a/ambari-logsearch-web/src/app/components/action-menu/action-menu.component.html
+++ 
b/ambari-logsearch-web/src/app/components/action-menu/action-menu.component.html
@@ -31,7 +31,7 @@
   title="{{'logIndexFilter.title' | translate}}">
   
   
+  label="{{'logIndexFilter.selectCluster' | translate}}" 
buttonClass="btn-link" (selectItem)="onSelectCluster($event)">
   
   
 {{'logIndexFilter.caption' | translate}}
@@ -41,7 +41,7 @@
   
   
 {{'modal.cancel' | translate}}
-
+
   {{'modal.save' | translate}}
 
   
diff --git 
a/ambari-logsearch-web/src/app/components/action-menu/action-menu.component.ts 
b/ambari-logsearch-web/src/app/components/action-menu/action-menu.component.ts
index cbc35f1dc4..f00eb2d930 100644
--- 
a/ambari-logsearch-web/src/app/components/action-menu/action-menu.component.ts
+++ 
b/ambari-logsearch-web/src/app/components/action-menu/action-menu.component.ts
@@ -46,8 +46,6 @@ export class ActionMenuComponent  implements OnInit, 
OnDestroy {
 
   settingsForm: FormGroup = this.settings.settingsFormGroup;
 
-  isModalSubmitDisabled = true;
-
   clustersListItems$: Observable = this.clustersService.getAll()
 .map((clusterNames: string[]): ListItem[] => 
clusterNames.map(this.utilsService.getListItemFromString))
 .map((clusters: ListItem[]) => {
@@ -58,6 +56,7 @@ export class ActionMenuComponent  implements OnInit, 
OnDestroy {
 });
 
   selectedClusterName$: BehaviorSubject = new BehaviorSubject('');
+  isModalSubmitDisabled$: Observable = 
this.selectedClusterName$.map(cluster => !cluster);
 
   destroyed$ = new Subject();
 
@@ -72,10 +71,7 @@ export class ActionMenuComponent  implements OnInit, 
OnDestroy {
   }
 
   ngOnInit() {
-this.selectedClusterName$.takeUntil(this.destroyed$).subscribe(
-  (clusterName: string) => this.setModalSubmitDisabled(!clusterName)
-);
-this.clustersListItems$.filter((items: ListItem[]) => items.some((item: 
ListItem) => item.isChecked)).first()
+this.clustersListItems$.filter((items: ListItem[]) => items.some((item: 
ListItem) => item.isChecked)).take(1)
   .map((items: ListItem[]) => items.find((item: ListItem) => 
item.isChecked))
   .subscribe((item) => this.selectedClusterName$.next(item.value));
   }
@@ -88,10 +84,6 @@ export class ActionMenuComponent  implements OnInit, 
OnDestroy {
 return this.logsContainerService.captureSeconds;
   }
 
-  setModalSubmitDisabled(isDisabled: boolean): void {
-this.isModalSubmitDisabled = isDisabled;
-  }
-
   refresh(): void {
 this.logsContainerService.loadLogs();
   }
diff --git 
a/ambari-logsearch-web/src/app/components/log-index-filter/log-index-filter.component.ts
 
b/ambari-logsearch-web/src/app/components/log-index-filter/log-index-filter.component.ts
index 5ea0803bbd..02e16798c3 100644
--- 
a/ambari-logsearch-web/src/app/components/log-index-filter/log-index-filter.component.ts
+++ 
b/ambari-logsearch-web/src/app/components/log-index-filter/log-index-filter.component.ts
@@ -143,7 +143,7 @@ export class LogIndexFilterComponent implements OnInit, 
OnDestroy, OnChanges, Co
   processAllComponentsForLevel(levelName: LogLevel, isChecked: boolean): void {
 this.activeClusterConfigs.forEach((component: 
LogIndexFilterComponentConfig): void => {
   component[levelName].defaults = isChecked;
-  component[levelName].overrides = isChecked;
+  component[levelName].overrides = component.hasOverrides && isChecked;
 });
 this.updateValue();
   }


 


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Log Search UI: cannot save filters + select all selecting the ovirrides as 
> well
> ---
>
> Key: AMBARI-25012
> URL: 

[jira] [Commented] (AMBARI-25012) Log Search UI: cannot save filters + select all selecting the ovirrides as well

2018-12-07 Thread Hudson (JIRA)


[ 
https://issues.apache.org/jira/browse/AMBARI-25012?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16712844#comment-16712844
 ] 

Hudson commented on AMBARI-25012:
-

SUCCESS: Integrated in Jenkins build Ambari-LogSearch-master-Commit #73 (See 
[https://builds.apache.org/job/Ambari-LogSearch-master-Commit/73/])
[AMBARI-25012] Log Search UI: cannot save filters + select all selecting 
(github: 
[https://gitbox.apache.org/repos/asf?p=ambari-logsearch.git=commit=b21991615d744a983799af24631d64c4d0640e5c])
* (edit) 
ambari-logsearch-web/src/app/components/action-menu/action-menu.component.html
* (edit) 
ambari-logsearch-web/src/app/components/action-menu/action-menu.component.ts
* (edit) 
ambari-logsearch-web/src/app/components/log-index-filter/log-index-filter.component.ts


> Log Search UI: cannot save filters + select all selecting the ovirrides as 
> well
> ---
>
> Key: AMBARI-25012
> URL: https://issues.apache.org/jira/browse/AMBARI-25012
> Project: Ambari
>  Issue Type: Improvement
>  Components: ambari-logsearch, logsearch
>Affects Versions: 2.7.3
>Reporter: Istvan Tobias
>Assignee: Istvan Tobias
>Priority: Blocker
>  Labels: pull-request-available
>   Original Estimate: 2h
>  Remaining Estimate: 2h
>
> Clicking out a log level from debug to nothing, save button was still 
> disabled.
> Also clicking select all selected the overrides rows as well (as no hostname 
> set there or anything, not sure what is expected there, hopefully we would 
> not save that with filled empty hostname but with one debug log level)



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (AMBARI-25012) Log Search UI: cannot save filters + select all selecting the ovirrides as well

2018-12-06 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/AMBARI-25012?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16712230#comment-16712230
 ] 

ASF GitHub Bot commented on AMBARI-25012:
-

asfgit commented on issue #57: [AMBARI-25012] Log Search UI: cannot save 
filters + select all selecting the ovirrides as well
URL: https://github.com/apache/ambari-logsearch/pull/57#issuecomment-445092344
 
 
   
   Refer to this link for build results (access rights to CI server needed): 
   https://builds.apache.org/job/Ambari-LogSearch-Github-PR-Builder/115/
   Test PASSed.
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Log Search UI: cannot save filters + select all selecting the ovirrides as 
> well
> ---
>
> Key: AMBARI-25012
> URL: https://issues.apache.org/jira/browse/AMBARI-25012
> Project: Ambari
>  Issue Type: Improvement
>  Components: ambari-logsearch, logsearch
>Affects Versions: 2.7.3
>Reporter: Istvan Tobias
>Assignee: Istvan Tobias
>Priority: Blocker
>  Labels: pull-request-available
>   Original Estimate: 2h
>  Remaining Estimate: 2h
>
> Clicking out a log level from debug to nothing, save button was still 
> disabled.
> Also clicking select all selected the overrides rows as well (as no hostname 
> set there or anything, not sure what is expected there, hopefully we would 
> not save that with filled empty hostname but with one debug log level)



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (AMBARI-25012) Log Search UI: cannot save filters + select all selecting the ovirrides as well

2018-12-06 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/AMBARI-25012?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=1671#comment-1671
 ] 

ASF GitHub Bot commented on AMBARI-25012:
-

tobias-istvan opened a new pull request #57: [AMBARI-25012] Log Search UI: 
cannot save filters + select all selecting the ovirrides as well
URL: https://github.com/apache/ambari-logsearch/pull/57
 
 
   # What changes were proposed in this pull request?
   
   Save button state: Changing the enable/disable condition to a more direct 
one.
   Overrides checking with "select all": checking the component hasOverrides 
prop too.
   
   ## How was this patch tested?
   
   It was tested manually and by unit tests:
   ```
   PhantomJS 2.1.1 (Mac OS X 0.0.0): Executed 295 of 295 SUCCESS (11.208 secs / 
11.037 secs)
   ✨  Done in 40.82s.
   ```
   
   Please review [Ambari Contributing 
Guide](https://cwiki.apache.org/confluence/display/AMBARI/How+to+Contribute) 
before opening a pull request.
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Log Search UI: cannot save filters + select all selecting the ovirrides as 
> well
> ---
>
> Key: AMBARI-25012
> URL: https://issues.apache.org/jira/browse/AMBARI-25012
> Project: Ambari
>  Issue Type: Improvement
>  Components: ambari-logsearch, logsearch
>Affects Versions: 2.7.3
>Reporter: Istvan Tobias
>Assignee: Istvan Tobias
>Priority: Blocker
>  Labels: pull-request-available
>   Original Estimate: 2h
>  Remaining Estimate: 2h
>
> Clicking out a log level from debug to nothing, save button was still 
> disabled.
> Also clicking select all selected the overrides rows as well (as no hostname 
> set there or anything, not sure what is expected there, hopefully we would 
> not save that with filled empty hostname but with one debug log level)



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)