You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by to...@apache.org on 2018/07/20 09:20:19 UTC
[ambari] branch branch-2.7 updated: [AMBARI-23890] [Logsearch UI]
Column headers are missing in service logs tabular view (#1781)
This is an automated email from the ASF dual-hosted git repository.
tobiasistvan pushed a commit to branch branch-2.7
in repository https://gitbox.apache.org/repos/asf/ambari.git
The following commit(s) were added to refs/heads/branch-2.7 by this push:
new 8c6667a [AMBARI-23890] [Logsearch UI] Column headers are missing in service logs tabular view (#1781)
8c6667a is described below
commit 8c6667ae31ef099d87afe7330e17f557ccd0c262
Author: Istvan Tobias <to...@gmail.com>
AuthorDate: Fri Jul 20 11:20:16 2018 +0200
[AMBARI-23890] [Logsearch UI] Column headers are missing in service logs tabular view (#1781)
* [AMBARI-23890] [Logsearch UI] Column headers are missing in service logs tabular view
(cherry picked from commit b328b483080a842b73cda00e00da07675a0dd7b0)
* [AMBARI-23890] [Logsearch UI] Column headers are missing in service logs tabular view
(cherry picked from commit fae6289cddb91f0e6d33a4caa39d6128e6a3f53a)
---
.../service-logs-table.component.html | 13 ++++
.../service-logs-table.component.less | 69 ++++++++++++----------
.../service-logs-table.component.ts | 4 +-
3 files changed, 52 insertions(+), 34 deletions(-)
diff --git a/ambari-logsearch/ambari-logsearch-web/src/app/components/service-logs-table/service-logs-table.component.html b/ambari-logsearch/ambari-logsearch-web/src/app/components/service-logs-table/service-logs-table.component.html
index 26ec1df..cacee46 100644
--- a/ambari-logsearch/ambari-logsearch-web/src/app/components/service-logs-table/service-logs-table.component.html
+++ b/ambari-logsearch/ambari-logsearch-web/src/app/components/service-logs-table/service-logs-table.component.html
@@ -58,6 +58,19 @@
<col *ngIf="isColumnDisplayed('path')" class="log-path">
<col *ngIf="isColumnDisplayed('log_message')" class="log-message">
</colgroup>
+ <thead>
+ <tr>
+ <th class="log-action"></th>
+ <th *ngIf="isColumnDisplayed('logtime')">{{getLabelForField('logtime') | translate}}</th>
+ <th *ngIf="isColumnDisplayed('level')">{{getLabelForField('level') | translate}}</th>
+ <th *ngIf="isColumnDisplayed('type')">{{getLabelForField('type') | translate}}</th>
+ <ng-container *ngFor="let column of displayedColumns">
+ <th *ngIf="customStyledColumns.indexOf(column.value) === -1">{{getLabelForField(column.value) | translate}}</th>
+ </ng-container>
+ <th *ngIf="isColumnDisplayed('path')">{{getLabelForField('path') | translate}}</th>
+ <th *ngIf="isColumnDisplayed('log_message')">{{getLabelForField('log_message') | translate}}</th>
+ </tr>
+ </thead>
<tbody>
<ng-container *ngFor="let log of logs; let i = index">
<tr *ngIf="i === 0 || isDifferentDates(log.logtime, logs[i - 1].logtime)" class="log-date-row">
diff --git a/ambari-logsearch/ambari-logsearch-web/src/app/components/service-logs-table/service-logs-table.component.less b/ambari-logsearch/ambari-logsearch-web/src/app/components/service-logs-table/service-logs-table.component.less
index fe69a90..5d13bac 100644
--- a/ambari-logsearch/ambari-logsearch-web/src/app/components/service-logs-table/service-logs-table.component.less
+++ b/ambari-logsearch/ambari-logsearch-web/src/app/components/service-logs-table/service-logs-table.component.less
@@ -110,40 +110,45 @@
background: none transparent;
}
- table td {
- text-overflow: ellipsis;
- overflow: hidden;
- word-wrap: break-word;
- &.log-action {
- overflow: visible;
- padding-left: .25em;
- padding-right: 0;
- width: 1em;
- /deep/ .btn, /deep/ .filter-label {
- font-size: 1em;
- height: auto;
- line-height: 1em;
- padding: 0;
- }
- }
- &.log-time {
- min-width: 7em;
- padding-left: 0;
- text-align: right;
- }
- &.log-level {
+ table {
+ thead th {
text-transform: uppercase;
- min-width: 8em;
- .log-colors;
- }
- &.log-type {
- color: @link-color;
}
- &.log-message {
- width: 100%;
- }
- &.log-event_count {
- width: 3em;
+ td {
+ text-overflow: ellipsis;
+ overflow: hidden;
+ word-wrap: break-word;
+ &.log-action {
+ overflow: visible;
+ padding-left: .25em;
+ padding-right: 0;
+ width: 1em;
+ /deep/ .btn, /deep/ .filter-label {
+ font-size: 1em;
+ height: auto;
+ line-height: 1em;
+ padding: 0;
+ }
+ }
+ &.log-time {
+ min-width: 7em;
+ padding-left: 0;
+ text-align: right;
+ }
+ &.log-level {
+ text-transform: uppercase;
+ min-width: 8em;
+ .log-colors;
+ }
+ &.log-type {
+ color: @link-color;
+ }
+ &.log-message {
+ width: 100%;
+ }
+ &.log-event_count {
+ width: 3em;
+ }
}
}
diff --git a/ambari-logsearch/ambari-logsearch-web/src/app/components/service-logs-table/service-logs-table.component.ts b/ambari-logsearch/ambari-logsearch-web/src/app/components/service-logs-table/service-logs-table.component.ts
index 7a5e94a..7dfb9af 100644
--- a/ambari-logsearch/ambari-logsearch-web/src/app/components/service-logs-table/service-logs-table.component.ts
+++ b/ambari-logsearch/ambari-logsearch-web/src/app/components/service-logs-table/service-logs-table.component.ts
@@ -303,8 +303,8 @@ export class ServiceLogsTableComponent extends LogsTableComponent implements Aft
* @returns {string}
*/
private getLabelForField(field: string): string {
- const column: ListItem = this.columns.find(column => column.value === field);
- return column && column.label;
+ const column: ListItem = this.columns.find(currentColumn => currentColumn.value === field);
+ return column && (column.label || column.value);
}
/**