]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
mgr/dashboard_v2: decrease max-line-length to 100
authorTiago Melo <tmelo@suse.com>
Tue, 6 Feb 2018 16:24:19 +0000 (16:24 +0000)
committerRicardo Dias <rdias@suse.com>
Mon, 5 Mar 2018 13:07:06 +0000 (13:07 +0000)
Signed-off-by: Tiago Melo <tmelo@suse.com>
src/pybind/mgr/dashboard_v2/frontend/src/app/shared/components/table/table.component.ts
src/pybind/mgr/dashboard_v2/frontend/tslint.json

index 20bc2bda8751455c3ba4fbbdb1c84020187acc96..2b4dfd5a6db5c4fdef8a0980a2a81bffb1f290cc 100644 (file)
@@ -1,10 +1,18 @@
 import {
-  Component, ComponentFactoryResolver, EventEmitter, Input, OnChanges, OnInit, Output, Type, ViewChild
+  Component,
+  ComponentFactoryResolver,
+  EventEmitter,
+  Input,
+  OnChanges,
+  OnInit,
+  Output,
+  Type,
+  ViewChild
 } from '@angular/core';
 
-import {DatatableComponent, TableColumn} from '@swimlane/ngx-datatable';
+import { DatatableComponent, TableColumn } from '@swimlane/ngx-datatable';
 
-import {TableDetailsDirective} from './table-details.directive';
+import { TableDetailsDirective } from './table-details.directive';
 
 @Component({
   selector: 'cd-table',
@@ -15,12 +23,16 @@ export class TableComponent implements OnInit, OnChanges {
   @ViewChild(DatatableComponent) table: DatatableComponent;
   @ViewChild(TableDetailsDirective) detailTemplate: TableDetailsDirective;
 
-  @Input() data: any[]; // This is the array with the items to be shown
-  @Input() columns: TableColumn[]; // each item -> { prop: 'attribute name', name: 'display name' }
-  @Input() detailsComponent?: string; // name of the component fe 'TableDetailsComponent'
-  @Input() header ? = true;
+  // This is the array with the items to be shown
+  @Input() data: any[];
+  // each item -> { prop: 'attribute name', name: 'display name' }
+  @Input() columns: TableColumn[];
+  // name of the component fe 'TableDetailsComponent'
+  @Input() detailsComponent?: string;
+  @Input() header ?= true;
 
-  @Output() fetchData = new EventEmitter(); // Should be the function that will update the input data
+  // Should be the function that will update the input data
+  @Output() fetchData = new EventEmitter();
 
   selectable: String = undefined;
   search = '';
@@ -34,7 +46,7 @@ export class TableComponent implements OnInit, OnChanges {
   };
   limit = 10;
 
-  constructor(private componentFactoryResolver: ComponentFactoryResolver) {}
+  constructor(private componentFactoryResolver: ComponentFactoryResolver) { }
 
   ngOnInit() {
     this.reloadData();
@@ -91,7 +103,7 @@ export class TableComponent implements OnInit, OnChanges {
     this.rows = this.data.filter(function (d) {
       return columns.filter((c) => {
         return (typeof d[c.prop] === 'string' || typeof d[c.prop] === 'number')
-               && (d[c.prop] + '').toLowerCase().indexOf(val) !== -1;
+          && (d[c.prop] + '').toLowerCase().indexOf(val) !== -1;
       }).length > 0;
     });
     // Whenever the filter changes, always go back to the first page
index bc9d7feef8c75f4587365d70ae66b07fb1e12a6e..94df37e2138b25ad7cfd00d97481eb41ff2acd32 100644 (file)
@@ -31,7 +31,7 @@
     "label-position": true,
     "max-line-length": [
       true,
-      140
+      100
     ],
     "member-access": false,
     "member-ordering": [