Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id CD116200D36 for ; Mon, 6 Nov 2017 19:27:57 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id CB57C160BEC; Mon, 6 Nov 2017 18:27:57 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 74F00160BD5 for ; Mon, 6 Nov 2017 19:27:56 +0100 (CET) Received: (qmail 56433 invoked by uid 500); 6 Nov 2017 18:27:55 -0000 Mailing-List: contact commits-help@ambari.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: ambari-dev@ambari.apache.org Delivered-To: mailing list commits@ambari.apache.org Received: (qmail 56424 invoked by uid 99); 6 Nov 2017 18:27:55 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 06 Nov 2017 18:27:55 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 85628DFCBC; Mon, 6 Nov 2017 18:27:55 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: ababiichuk@apache.org To: commits@ambari.apache.org Message-Id: <3f38dac141a54a0d97873cf24684e4c8@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: ambari git commit: AMBARI-22368 Log Search UI: move top menu down. (Istvan Tobias via ababiichuk) Date: Mon, 6 Nov 2017 18:27:55 +0000 (UTC) archived-at: Mon, 06 Nov 2017 18:27:58 -0000 Repository: ambari Updated Branches: refs/heads/trunk 1afee6096 -> 976153f96 AMBARI-22368 Log Search UI: move top menu down. (Istvan Tobias via ababiichuk) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/976153f9 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/976153f9 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/976153f9 Branch: refs/heads/trunk Commit: 976153f96bc333ad6f50196edba0ce2edb8e9078 Parents: 1afee60 Author: Istvan Tobias Authored: Mon Nov 6 19:14:42 2017 +0200 Committer: ababiichuk Committed: Mon Nov 6 19:19:15 2017 +0200 ---------------------------------------------------------------------- .../ambari-logsearch-web/src/app/app.module.ts | 2 + .../action-menu/action-menu.component.html | 20 ++++ .../action-menu/action-menu.component.less | 27 +++++ .../action-menu/action-menu.component.spec.ts | 47 +++++++++ .../action-menu/action-menu.component.ts | 105 +++++++++++++++++++ .../src/app/components/app.component.html | 4 +- .../src/app/components/app.component.less | 5 +- .../logs-container.component.html | 58 +++++----- .../logs-container.component.less | 3 + .../main-container.component.html | 2 +- .../src/app/components/mixins.less | 5 + .../components/top-menu/top-menu.component.html | 10 +- .../components/top-menu/top-menu.component.less | 1 + .../components/top-menu/top-menu.component.ts | 83 +-------------- .../src/app/components/variables.less | 3 + 15 files changed, 261 insertions(+), 114 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ambari/blob/976153f9/ambari-logsearch/ambari-logsearch-web/src/app/app.module.ts ---------------------------------------------------------------------- diff --git a/ambari-logsearch/ambari-logsearch-web/src/app/app.module.ts b/ambari-logsearch/ambari-logsearch-web/src/app/app.module.ts index 37cd869..488437e 100644 --- a/ambari-logsearch/ambari-logsearch-web/src/app/app.module.ts +++ b/ambari-logsearch/ambari-logsearch-web/src/app/app.module.ts @@ -73,6 +73,7 @@ import {PaginationComponent} from '@app/components/pagination/pagination.compone import {PaginationControlsComponent} from '@app/components/pagination-controls/pagination-controls.component'; import {TimeHistogramComponent} from '@app/components/time-histogram/time-histogram.component'; import {LogsContainerComponent} from '@app/components/logs-container/logs-container.component'; +import {ActionMenuComponent} from "@app/components/action-menu/action-menu.component"; import {ModalComponent} from '@app/components/modal/modal.component'; import {TimeZonePickerComponent} from '@app/components/timezone-picker/timezone-picker.component'; import {NodeBarComponent} from '@app/components/node-bar/node-bar.component'; @@ -125,6 +126,7 @@ export function getXHRBackend(injector: Injector, browser: BrowserXhr, xsrf: XSR PaginationControlsComponent, TimeHistogramComponent, LogsContainerComponent, + ActionMenuComponent, ModalComponent, TimeZonePickerComponent, NodeBarComponent, http://git-wip-us.apache.org/repos/asf/ambari/blob/976153f9/ambari-logsearch/ambari-logsearch-web/src/app/components/action-menu/action-menu.component.html ---------------------------------------------------------------------- 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 new file mode 100644 index 0000000..ab6326a --- /dev/null +++ b/ambari-logsearch/ambari-logsearch-web/src/app/components/action-menu/action-menu.component.html @@ -0,0 +1,20 @@ + + + http://git-wip-us.apache.org/repos/asf/ambari/blob/976153f9/ambari-logsearch/ambari-logsearch-web/src/app/components/action-menu/action-menu.component.less ---------------------------------------------------------------------- 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 new file mode 100644 index 0000000..880a97b --- /dev/null +++ b/ambari-logsearch/ambari-logsearch-web/src/app/components/action-menu/action-menu.component.less @@ -0,0 +1,27 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@import '../variables'; + +:host { + display: block; + margin-left: auto; + menu-button { + margin: 0 1em; + color: @table-border-color; + } +} http://git-wip-us.apache.org/repos/asf/ambari/blob/976153f9/ambari-logsearch/ambari-logsearch-web/src/app/components/action-menu/action-menu.component.spec.ts ---------------------------------------------------------------------- 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 new file mode 100644 index 0000000..081304e --- /dev/null +++ b/ambari-logsearch/ambari-logsearch-web/src/app/components/action-menu/action-menu.component.spec.ts @@ -0,0 +1,47 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import {CUSTOM_ELEMENTS_SCHEMA} from '@angular/core'; +import {async, ComponentFixture, TestBed} from '@angular/core/testing'; +import {TranslationModules} from '@app/test-config.spec'; + +import {ActionMenuComponent} from './action-menu.component'; + +describe('ActionMenuComponent', () => { + let component: ActionMenuComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + imports: TranslationModules, + declarations: [ActionMenuComponent], + schemas: [CUSTOM_ELEMENTS_SCHEMA] + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(ActionMenuComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create component', () => { + expect(component).toBeTruthy(); + }); +}); http://git-wip-us.apache.org/repos/asf/ambari/blob/976153f9/ambari-logsearch/ambari-logsearch-web/src/app/components/action-menu/action-menu.component.ts ---------------------------------------------------------------------- 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 new file mode 100644 index 0000000..58e0025 --- /dev/null +++ b/ambari-logsearch/ambari-logsearch-web/src/app/components/action-menu/action-menu.component.ts @@ -0,0 +1,105 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import {Component} from '@angular/core'; + +@Component({ + selector: 'action-menu', + templateUrl: './action-menu.component.html', + styleUrls: ['./action-menu.component.less'] +}) +export class ActionMenuComponent { + + //TODO implement loading of real data into subItems + readonly items = [ + { + iconClass: 'fa fa-arrow-left', + label: 'topMenu.undo', + labelClass: 'unstyled-link', + action: 'undo', + subItems: [ + { + label: 'Apply \'Last week\' filter' + }, + { + label: 'Clear all filters' + }, + { + label: 'Apply \'HDFS\' filter' + }, + { + label: 'Apply \'Errors\' filter' + } + ] + }, + { + iconClass: 'fa fa-arrow-right', + label: 'topMenu.redo', + labelClass: 'unstyled-link', + action: 'redo', + subItems: [ + { + label: 'Apply \'Warnings\' filter' + }, + { + label: 'Switch to graph mode' + }, + { + label: 'Apply \'Custom Date\' filter' + } + ] + }, + { + iconClass: 'fa fa-refresh', + label: 'topMenu.refresh', + labelClass: 'unstyled-link', + action: 'refresh' + }, + { + iconClass: 'fa fa-history', + label: 'topMenu.history', + labelClass: 'unstyled-link', + action: 'openHistory', + isRightAlign: true, + subItems: [ + { + label: 'Apply \'Custom Date\' filter' + }, + { + label: 'Switch to graph mode' + }, + { + label: 'Apply \'Warnings\' filter' + }, + { + label: 'Apply \'Last week\' filter' + }, + { + label: 'Clear all filters' + }, + { + label: 'Apply \'HDFS\' filter' + }, + { + label: 'Apply \'Errors\' filter' + } + ] + } + ]; + +} http://git-wip-us.apache.org/repos/asf/ambari/blob/976153f9/ambari-logsearch/ambari-logsearch-web/src/app/components/app.component.html ---------------------------------------------------------------------- diff --git a/ambari-logsearch/ambari-logsearch-web/src/app/components/app.component.html b/ambari-logsearch/ambari-logsearch-web/src/app/components/app.component.html index a0444c9..833f43f 100644 --- a/ambari-logsearch/ambari-logsearch-web/src/app/components/app.component.html +++ b/ambari-logsearch/ambari-logsearch-web/src/app/components/app.component.html @@ -18,8 +18,8 @@
http://git-wip-us.apache.org/repos/asf/ambari/blob/976153f9/ambari-logsearch/ambari-logsearch-web/src/app/components/app.component.less ---------------------------------------------------------------------- diff --git a/ambari-logsearch/ambari-logsearch-web/src/app/components/app.component.less b/ambari-logsearch/ambari-logsearch-web/src/app/components/app.component.less index 8731582..f0fecfc 100644 --- a/ambari-logsearch/ambari-logsearch-web/src/app/components/app.component.less +++ b/ambari-logsearch/ambari-logsearch-web/src/app/components/app.component.less @@ -31,11 +31,10 @@ color: #fff; .container-fluid { - .default-flex; + .stretch-flex; } h1 { - flex-basis: 70%; margin-bottom: @h1-vertical-margin; text-transform: uppercase; @@ -45,7 +44,7 @@ } /deep/ top-menu { - flex-basis: 30%; + margin-left: auto; } } } http://git-wip-us.apache.org/repos/asf/ambari/blob/976153f9/ambari-logsearch/ambari-logsearch-web/src/app/components/logs-container/logs-container.component.html ---------------------------------------------------------------------- diff --git a/ambari-logsearch/ambari-logsearch-web/src/app/components/logs-container/logs-container.component.html b/ambari-logsearch/ambari-logsearch-web/src/app/components/logs-container/logs-container.component.html index 70150a5..2c3a3b9 100644 --- a/ambari-logsearch/ambari-logsearch-web/src/app/components/logs-container/logs-container.component.html +++ b/ambari-logsearch/ambari-logsearch-web/src/app/components/logs-container/logs-container.component.html @@ -15,30 +15,40 @@ limitations under the License. --> -
- +
+
+
+ + +
+
- -
-
- {{'filter.capture.triggeringRefresh' | translate: autoRefreshMessageParams}} +
+ +
+
+
+ {{'filter.capture.triggeringRefresh' | translate: autoRefreshMessageParams}} +
+
+ + +
{{ + (!totalEventsFoundMessageParams.totalCount ? 'logs.noEventFound' : + (totalEventsFoundMessageParams.totalCount === 1 ? 'logs.oneEventFound' : 'logs.totalEventFound')) + | translate: totalEventsFoundMessageParams + }}
+ + + + + +
- -
{{ - (!totalEventsFoundMessageParams.totalCount ? 'logs.noEventFound' : - (totalEventsFoundMessageParams.totalCount === 1 ? 'logs.oneEventFound' : 'logs.totalEventFound')) - | translate: totalEventsFoundMessageParams -}}
- - - - - - http://git-wip-us.apache.org/repos/asf/ambari/blob/976153f9/ambari-logsearch/ambari-logsearch-web/src/app/components/logs-container/logs-container.component.less ---------------------------------------------------------------------- diff --git a/ambari-logsearch/ambari-logsearch-web/src/app/components/logs-container/logs-container.component.less b/ambari-logsearch/ambari-logsearch-web/src/app/components/logs-container/logs-container.component.less index 23d5f92..9902b79 100644 --- a/ambari-logsearch/ambari-logsearch-web/src/app/components/logs-container/logs-container.component.less +++ b/ambari-logsearch/ambari-logsearch-web/src/app/components/logs-container/logs-container.component.less @@ -25,6 +25,9 @@ .tabs-container, .auto-refresh-message { background-color: @filters-panel-background-color; } + .tabs-container { + border-bottom: 1px solid @table-border-color; + } filters-panel { margin-bottom: @block-margin-top; http://git-wip-us.apache.org/repos/asf/ambari/blob/976153f9/ambari-logsearch/ambari-logsearch-web/src/app/components/main-container/main-container.component.html ---------------------------------------------------------------------- diff --git a/ambari-logsearch/ambari-logsearch-web/src/app/components/main-container/main-container.component.html b/ambari-logsearch/ambari-logsearch-web/src/app/components/main-container/main-container.component.html index 2061582..95dd238 100644 --- a/ambari-logsearch/ambari-logsearch-web/src/app/components/main-container/main-container.component.html +++ b/ambari-logsearch/ambari-logsearch-web/src/app/components/main-container/main-container.component.html @@ -20,4 +20,4 @@
- + http://git-wip-us.apache.org/repos/asf/ambari/blob/976153f9/ambari-logsearch/ambari-logsearch-web/src/app/components/mixins.less ---------------------------------------------------------------------- diff --git a/ambari-logsearch/ambari-logsearch-web/src/app/components/mixins.less b/ambari-logsearch/ambari-logsearch-web/src/app/components/mixins.less index 2e46213..5fa265b 100644 --- a/ambari-logsearch/ambari-logsearch-web/src/app/components/mixins.less +++ b/ambari-logsearch/ambari-logsearch-web/src/app/components/mixins.less @@ -28,6 +28,11 @@ justify-content: space-between; } +.stretch-flex { + align-items: stretch; + display: flex; +} + .common-hexagon(@side, @color) { display: block; position: absolute; http://git-wip-us.apache.org/repos/asf/ambari/blob/976153f9/ambari-logsearch/ambari-logsearch-web/src/app/components/top-menu/top-menu.component.html ---------------------------------------------------------------------- diff --git a/ambari-logsearch/ambari-logsearch-web/src/app/components/top-menu/top-menu.component.html b/ambari-logsearch/ambari-logsearch-web/src/app/components/top-menu/top-menu.component.html index a7858a5..369ddd4 100644 --- a/ambari-logsearch/ambari-logsearch-web/src/app/components/top-menu/top-menu.component.html +++ b/ambari-logsearch/ambari-logsearch-web/src/app/components/top-menu/top-menu.component.html @@ -15,7 +15,9 @@ limitations under the License. --> - - +
+ + +
http://git-wip-us.apache.org/repos/asf/ambari/blob/976153f9/ambari-logsearch/ambari-logsearch-web/src/app/components/top-menu/top-menu.component.less ---------------------------------------------------------------------- diff --git a/ambari-logsearch/ambari-logsearch-web/src/app/components/top-menu/top-menu.component.less b/ambari-logsearch/ambari-logsearch-web/src/app/components/top-menu/top-menu.component.less index 4fe899a..32d1beb 100644 --- a/ambari-logsearch/ambari-logsearch-web/src/app/components/top-menu/top-menu.component.less +++ b/ambari-logsearch/ambari-logsearch-web/src/app/components/top-menu/top-menu.component.less @@ -19,4 +19,5 @@ :host { .default-flex; + margin-right: 0; } http://git-wip-us.apache.org/repos/asf/ambari/blob/976153f9/ambari-logsearch/ambari-logsearch-web/src/app/components/top-menu/top-menu.component.ts ---------------------------------------------------------------------- diff --git a/ambari-logsearch/ambari-logsearch-web/src/app/components/top-menu/top-menu.component.ts b/ambari-logsearch/ambari-logsearch-web/src/app/components/top-menu/top-menu.component.ts index 73b6131..05c1a62 100644 --- a/ambari-logsearch/ambari-logsearch-web/src/app/components/top-menu/top-menu.component.ts +++ b/ambari-logsearch/ambari-logsearch-web/src/app/components/top-menu/top-menu.component.ts @@ -16,98 +16,21 @@ * limitations under the License. */ -import {Component, OnInit} from '@angular/core'; +import {Component} from '@angular/core'; @Component({ selector: 'top-menu', templateUrl: './top-menu.component.html', styleUrls: ['./top-menu.component.less'] }) -export class TopMenuComponent implements OnInit { - - constructor() { - } - - ngOnInit() { - } +export class TopMenuComponent { //TODO implement loading of real data into subItems readonly items = [ { - iconClass: 'fa fa-arrow-left', - label: 'topMenu.undo', - labelClass: 'unstyled-link', - action: 'undo', - subItems: [ - { - label: 'Apply \'Last week\' filter' - }, - { - label: 'Clear all filters' - }, - { - label: 'Apply \'HDFS\' filter' - }, - { - label: 'Apply \'Errors\' filter' - } - ] - }, - { - iconClass: 'fa fa-arrow-right', - label: 'topMenu.redo', - labelClass: 'unstyled-link', - action: 'redo', - subItems: [ - { - label: 'Apply \'Warnings\' filter' - }, - { - label: 'Switch to graph mode' - }, - { - label: 'Apply \'Custom Date\' filter' - } - ] - }, - { - iconClass: 'fa fa-refresh', - label: 'topMenu.refresh', - labelClass: 'unstyled-link', - action: 'refresh' - }, - { - iconClass: 'fa fa-history', - label: 'topMenu.history', - labelClass: 'unstyled-link', - action: 'openHistory', - subItems: [ - { - label: 'Apply \'Custom Date\' filter' - }, - { - label: 'Switch to graph mode' - }, - { - label: 'Apply \'Warnings\' filter' - }, - { - label: 'Apply \'Last week\' filter' - }, - { - label: 'Clear all filters' - }, - { - label: 'Apply \'HDFS\' filter' - }, - { - label: 'Apply \'Errors\' filter' - } - ] - }, - { iconClass: 'fa fa-user unstyled-link', hideCaret: true, + isRightAlign: true, subItems: [ { label: 'Options' http://git-wip-us.apache.org/repos/asf/ambari/blob/976153f9/ambari-logsearch/ambari-logsearch-web/src/app/components/variables.less ---------------------------------------------------------------------- diff --git a/ambari-logsearch/ambari-logsearch-web/src/app/components/variables.less b/ambari-logsearch/ambari-logsearch-web/src/app/components/variables.less index 150ac56..7b7fcae 100644 --- a/ambari-logsearch/ambari-logsearch-web/src/app/components/variables.less +++ b/ambari-logsearch/ambari-logsearch-web/src/app/components/variables.less @@ -61,3 +61,6 @@ // Icon @icon-padding: 5px; + +// Table +@table-border-color: #EEEEEE;