You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by ab...@apache.org on 2018/02/05 15:43:28 UTC

[ambari] branch trunk updated: AMBARI-22911 Log Search UI: move Capture button to top menu

This is an automated email from the ASF dual-hosted git repository.

ababiichuk pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/ambari.git


The following commit(s) were added to refs/heads/trunk by this push:
     new ef801ac  AMBARI-22911 Log Search UI: move Capture button to top menu
ef801ac is described below

commit ef801acbb290657760ced9917055fbb6250c95d4
Author: ababiichuk <ab...@hortonworks.com>
AuthorDate: Mon Feb 5 16:04:17 2018 +0200

    AMBARI-22911 Log Search UI: move Capture button to top menu
---
 .../app/components/action-menu/action-menu.component.html    |  4 ++++
 .../app/components/action-menu/action-menu.component.less    |  5 +++++
 .../app/components/action-menu/action-menu.component.spec.ts |  4 +++-
 .../src/app/components/action-menu/action-menu.component.ts  | 12 ++++++++++++
 .../components/filters-panel/filters-panel.component.html    |  4 ----
 .../components/filters-panel/filters-panel.component.less    |  4 ----
 .../components/filters-panel/filters-panel.component.spec.ts |  4 +---
 .../app/components/filters-panel/filters-panel.component.ts  | 12 ------------
 8 files changed, 25 insertions(+), 24 deletions(-)

diff --git a/ambari-logsearch/ambari-logsearch-web/src/app/components/action-menu/action-menu.component.html b/ambari-logsearch/ambari-logsearch-web/src/app/components/action-menu/action-menu.component.html
index 78fb277..b2bf90f 100644
--- a/ambari-logsearch/ambari-logsearch-web/src/app/components/action-menu/action-menu.component.html
+++ b/ambari-logsearch/ambari-logsearch-web/src/app/components/action-menu/action-menu.component.html
@@ -25,6 +25,10 @@
              additionalLabelComponentSetter="getHistoryItemIcons"></menu-button>
 <menu-button label="{{'topMenu.filter' | translate}}" iconClass="fa fa-filter"
              (buttonClick)="openLogIndexFilter()"></menu-button>
+<menu-button *ngIf="!captureSeconds" label="{{'filter.capture' | translate}}" iconClass="fa fa-caret-right"
+             (buttonClick)="startCapture()"></menu-button>
+<menu-button *ngIf="captureSeconds" label="{{captureSeconds | timerSeconds}}" iconClass="fa fa-stop stop-icon"
+             (buttonClick)="stopCapture()"></menu-button>
 <menu-button label="{{'topMenu.refresh' | translate}}" iconClass="fa fa-refresh"
              (buttonClick)="refresh()"></menu-button>
 <modal *ngIf="isLogIndexFilterDisplayed" (submit)="saveLogIndexFilter()" (cancel)="closeLogIndexFilter()"
diff --git a/ambari-logsearch/ambari-logsearch-web/src/app/components/action-menu/action-menu.component.less b/ambari-logsearch/ambari-logsearch-web/src/app/components/action-menu/action-menu.component.less
index fff57df..b87f447 100644
--- a/ambari-logsearch/ambari-logsearch-web/src/app/components/action-menu/action-menu.component.less
+++ b/ambari-logsearch/ambari-logsearch-web/src/app/components/action-menu/action-menu.component.less
@@ -15,10 +15,15 @@
  * limitations under the License.
  */
 
+@import '../variables';
+
 :host {
   display: block;
   margin-left: auto;
   menu-button {
     margin: 0 1em;
+    /deep/ .stop-icon {
+      color: @exclude-color;
+    }
   }
 }
diff --git a/ambari-logsearch/ambari-logsearch-web/src/app/components/action-menu/action-menu.component.spec.ts b/ambari-logsearch/ambari-logsearch-web/src/app/components/action-menu/action-menu.component.spec.ts
index 71676ac..3ec5429 100644
--- a/ambari-logsearch/ambari-logsearch-web/src/app/components/action-menu/action-menu.component.spec.ts
+++ b/ambari-logsearch/ambari-logsearch-web/src/app/components/action-menu/action-menu.component.spec.ts
@@ -42,6 +42,7 @@ import {LogsContainerService} from '@app/services/logs-container.service';
 import {UserSettingsService} from '@app/services/user-settings.service';
 import {UtilsService} from '@app/services/utils.service';
 import {ModalComponent} from '@app/components/modal/modal.component';
+import {TimerSecondsPipe} from '@app/pipes/timer-seconds.pipe';
 
 import {ActionMenuComponent} from './action-menu.component';
 
@@ -81,7 +82,8 @@ describe('ActionMenuComponent', () => {
       ],
       declarations: [
         ActionMenuComponent,
-        ModalComponent
+        ModalComponent,
+        TimerSecondsPipe
       ],
       providers: [
         {
diff --git a/ambari-logsearch/ambari-logsearch-web/src/app/components/action-menu/action-menu.component.ts b/ambari-logsearch/ambari-logsearch-web/src/app/components/action-menu/action-menu.component.ts
index 21ce307..6b02843 100644
--- a/ambari-logsearch/ambari-logsearch-web/src/app/components/action-menu/action-menu.component.ts
+++ b/ambari-logsearch/ambari-logsearch-web/src/app/components/action-menu/action-menu.component.ts
@@ -48,6 +48,10 @@ export class ActionMenuComponent {
     return this.historyManager.activeHistory;
   }
 
+  get captureSeconds(): number {
+    return this.logsContainer.captureSeconds;
+  }
+
   isLogIndexFilterDisplayed: boolean = false;
 
   settingsForm: FormGroup = this.settings.settingsFormGroup;
@@ -91,4 +95,12 @@ export class ActionMenuComponent {
     this.settings.saveIndexFilterConfig();
   }
 
+  startCapture(): void {
+    this.logsContainer.startCaptureTimer();
+  }
+
+  stopCapture(): void {
+    this.logsContainer.stopCaptureTimer();
+  }
+
 }
diff --git a/ambari-logsearch/ambari-logsearch-web/src/app/components/filters-panel/filters-panel.component.html b/ambari-logsearch/ambari-logsearch-web/src/app/components/filters-panel/filters-panel.component.html
index db1cb3e..9b0ac41 100644
--- a/ambari-logsearch/ambari-logsearch-web/src/app/components/filters-panel/filters-panel.component.html
+++ b/ambari-logsearch/ambari-logsearch-web/src/app/components/filters-panel/filters-panel.component.html
@@ -46,9 +46,5 @@
     <filter-button *ngIf="isFilterConditionDisplayed('levels')" formControlName="levels"
                    label="{{filters.levels.label | translate}}" [iconClass]="filters.levels.iconClass"
                    [subItems]="filters.levels.options" [isMultipleChoice]="true" [isRightAlign]="true"></filter-button>
-    <menu-button *ngIf="!captureSeconds" label="{{'filter.capture' | translate}}" iconClass="fa fa-caret-right"
-                 (buttonClick)="startCapture()"></menu-button>
-    <menu-button *ngIf="captureSeconds" label="{{captureSeconds | timerSeconds}}" iconClass="fa fa-stop stop-icon"
-                 (buttonClick)="stopCapture()"></menu-button>
   </div>
 </form>
diff --git a/ambari-logsearch/ambari-logsearch-web/src/app/components/filters-panel/filters-panel.component.less b/ambari-logsearch/ambari-logsearch-web/src/app/components/filters-panel/filters-panel.component.less
index e2f9a1e..94bd1db 100644
--- a/ambari-logsearch/ambari-logsearch-web/src/app/components/filters-panel/filters-panel.component.less
+++ b/ambari-logsearch/ambari-logsearch-web/src/app/components/filters-panel/filters-panel.component.less
@@ -68,10 +68,6 @@
     }
   }
 
-  /deep/ .stop-icon {
-    color: @exclude-color;
-  }
-
   .filter-buttons {
     .default-flex;
   }
diff --git a/ambari-logsearch/ambari-logsearch-web/src/app/components/filters-panel/filters-panel.component.spec.ts b/ambari-logsearch/ambari-logsearch-web/src/app/components/filters-panel/filters-panel.component.spec.ts
index 8df1d54..29cac93 100644
--- a/ambari-logsearch/ambari-logsearch-web/src/app/components/filters-panel/filters-panel.component.spec.ts
+++ b/ambari-logsearch/ambari-logsearch-web/src/app/components/filters-panel/filters-panel.component.spec.ts
@@ -39,7 +39,6 @@ import {TabsService, tabs} from '@app/services/storage/tabs.service';
 import {HttpClientService} from '@app/services/http-client.service';
 import {UtilsService} from '@app/services/utils.service';
 import {LogsContainerService} from '@app/services/logs-container.service';
-import {TimerSecondsPipe} from '@app/pipes/timer-seconds.pipe';
 
 import {FiltersPanelComponent} from './filters-panel.component';
 
@@ -58,8 +57,7 @@ describe('FiltersPanelComponent', () => {
     };
     TestBed.configureTestingModule({
       declarations: [
-        FiltersPanelComponent,
-        TimerSecondsPipe
+        FiltersPanelComponent
       ],
       imports: [
         StoreModule.provideStore({
diff --git a/ambari-logsearch/ambari-logsearch-web/src/app/components/filters-panel/filters-panel.component.ts b/ambari-logsearch/ambari-logsearch-web/src/app/components/filters-panel/filters-panel.component.ts
index fe60671..b233847 100644
--- a/ambari-logsearch/ambari-logsearch-web/src/app/components/filters-panel/filters-panel.component.ts
+++ b/ambari-logsearch/ambari-logsearch-web/src/app/components/filters-panel/filters-panel.component.ts
@@ -95,10 +95,6 @@ export class FiltersPanelComponent implements OnChanges {
     return this.logsContainer.queryParameterAdd;
   }
 
-  get captureSeconds(): number {
-    return this.logsContainer.captureSeconds;
-  }
-
   searchBoxValueUpdate: Subject<void> = new Subject();
 
   isFilterConditionDisplayed(key: string): boolean {
@@ -109,14 +105,6 @@ export class FiltersPanelComponent implements OnChanges {
     this.searchBoxValueUpdate.next();
   }
 
-  startCapture(): void {
-    this.logsContainer.startCaptureTimer();
-  }
-
-  stopCapture(): void {
-    this.logsContainer.stopCaptureTimer();
-  }
-
   proceedWithExclude(item: string): void {
     this.queryParameterNameChange.next({
       item: {

-- 
To stop receiving notification emails like this one, please contact
ababiichuk@apache.org.