GUI2 implementation of device/flow/port/group/meter/host/link/tunnel view

Review comments incorporated.

Change-Id: I45dd6570961cc3e0f4ffddb7acbf02cd7d860de5
diff --git a/web/gui2/src/main/webapp/app/view/group/group-routing.module.ts b/web/gui2/src/main/webapp/app/view/group/group-routing.module.ts
new file mode 100644
index 0000000..9ce3153
--- /dev/null
+++ b/web/gui2/src/main/webapp/app/view/group/group-routing.module.ts
@@ -0,0 +1,36 @@
+/*
+ * Copyright 2018-present Open Networking Foundation
+ *
+ * Licensed 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 { NgModule } from '@angular/core';
+import { Routes, RouterModule } from '@angular/router';
+import { GroupComponent } from './group/group.component';
+
+const routes: Routes = [
+  {
+    path: '',
+    component: GroupComponent
+  }
+];
+
+/**
+ * ONOS GUI -- Groups Tabular View Feature Routing Module - allows it to be lazy loaded
+ *
+ * See https://angular.io/guide/lazy-loading-ngmodules
+ */
+@NgModule({
+  imports: [RouterModule.forChild(routes)],
+  exports: [RouterModule]
+})
+export class GroupRoutingModule { }
diff --git a/web/gui2/src/main/webapp/app/view/group/group.module.ts b/web/gui2/src/main/webapp/app/view/group/group.module.ts
new file mode 100644
index 0000000..343a971
--- /dev/null
+++ b/web/gui2/src/main/webapp/app/view/group/group.module.ts
@@ -0,0 +1,38 @@
+/*
+ * Copyright 2018-present Open Networking Foundation
+ *
+ * Licensed 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 { NgModule } from '@angular/core';
+import { CommonModule } from '@angular/common';
+
+import { GroupRoutingModule } from './group-routing.module';
+import { GroupComponent } from './group/group.component';
+import { SvgModule } from '../../fw/svg/svg.module';
+import { WidgetModule } from '../../fw/widget/widget.module';
+import { FormsModule } from '@angular/forms';
+import { RouterModule } from '@angular/router';
+
+@NgModule({
+  imports: [
+    CommonModule,
+    GroupRoutingModule,
+    SvgModule,
+    WidgetModule,
+    FormsModule,
+    RouterModule
+  ],
+  declarations: [GroupComponent],
+  exports: [GroupComponent]
+})
+export class GroupModule { }
diff --git a/web/gui2/src/main/webapp/app/view/group/group/group.component.css b/web/gui2/src/main/webapp/app/view/group/group/group.component.css
new file mode 100644
index 0000000..fbf19de
--- /dev/null
+++ b/web/gui2/src/main/webapp/app/view/group/group/group.component.css
@@ -0,0 +1,101 @@
+/*
+ * Copyright 2018-present Open Networking Foundation
+ *
+ * Licensed 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.
+ */
+/*
+ ONOS GUI -- Group View (layout) -- CSS file
+ */
+
+#ov-group h2 {
+    display: inline-block;
+}
+
+#ov-group div.ctrl-btns {
+}
+
+#ov-group td {
+    text-align: center;
+}
+#ov-group td.right {
+    text-align: right;
+}
+#ov-group td.buckets {
+    text-align: left;
+    padding-left: 36px;
+}
+
+#ov-group .tabular-header {
+    text-align: left;
+}
+#ov-group div.summary-list .table-header td {
+    font-weight: bold;
+    font-variant: small-caps;
+    text-transform: uppercase;
+    font-size: 10pt;
+    padding-top: 8px;
+    padding-bottom: 8px;
+    letter-spacing: 0.02em;
+    cursor: pointer;
+    background-color: #e5e5e6;
+    color: #3c3a3a;
+}
+
+/* More in generic panel.css */
+
+#group-details-panel.floatpanel {
+    z-index: 0;
+}
+
+
+#group-details-panel .container {
+    padding: 8px 12px;
+}
+
+#group-details-panel .close-btn {
+    position: absolute;
+    right: 12px;
+    top: 12px;
+    cursor: pointer;
+}
+
+#group-details-panel .dev-icon {
+    display: inline-block;
+    padding: 0 6px 0 0;
+    vertical-align: middle;
+}
+
+#group-details-panel h2 {
+    display: inline-block;
+    margin: 8px 0;
+    font-size: 16pt;
+    font-weight: lighter;
+}
+
+#group-details-panel h3 {
+    display: inline-block;
+    margin: 8px 0;
+    font-size: 11pt;
+    font-variant: small-caps;
+    text-transform: uppercase;
+}
+
+#group-details-panel .top-content table {
+    font-size: 10pt;
+}
+
+#group-details-panel td.label {
+    font-weight: bold;
+    text-align: right;
+    padding-right: 6px;
+}
\ No newline at end of file
diff --git a/web/gui2/src/main/webapp/app/view/group/group/group.component.html b/web/gui2/src/main/webapp/app/view/group/group/group.component.html
new file mode 100644
index 0000000..4b0afbb
--- /dev/null
+++ b/web/gui2/src/main/webapp/app/view/group/group/group.component.html
@@ -0,0 +1,124 @@
+<!--
+~ Copyright 2018-present Open Networking Foundation
+~
+~ Licensed 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.
+-->
+<div id="ov-group" xmlns="http://www.w3.org/1999/html">
+    <div class="tabular-header">
+        <h2>
+            Groups for Device {{id}} ({{tableData.length}} total)
+        </h2>
+        <div class="ctrl-btns">
+            <div class="refresh" (click)="toggleRefresh()">
+                <!-- See icon.theme.css for the defintions of the classes active and refresh-->
+                <onos-icon classes="{{ autoRefresh?'active refresh':'refresh' }}" iconId="refresh" iconSize="42" toolTip="{{ autoRefreshTip }}"></onos-icon>
+            </div>
+            <div class="separator"></div>
+            <span *ngIf="brief" (click)="briefToggle()">
+                <div>
+                    <onos-icon classes="{{ id ? 'active-rect' :undefined}}" iconId="plus" iconSize="42" toolTip="{{detailTip}}"></onos-icon>
+                </div>
+            </span>
+
+            <span *ngIf="!brief" (click)="briefToggle()">
+                <div>
+                    <onos-icon classes="{{ id ? 'active-rect' :undefined}}" iconId="minus" iconSize="42" toolTip="{{briefTip}}"></onos-icon>
+                </div>
+            </span>
+            <div class="separator"></div>
+            <div routerLink="/device" [queryParams]="{ devId: id }" routerLinkActive="active">
+                <onos-icon classes="{{ id ? 'active-rect':undefined }}" iconId="deviceTable" iconSize="42" toolTip="{{deviceTip}}"></onos-icon>
+            </div>
+
+            <div routerLink="/flow" [queryParams]="{ devId: id }" routerLinkActive="active">
+                <onos-icon classes="{{ id ? 'active-rect' :undefined}}" iconId="flowTable" iconSize="42" toolTip="{{ flowTip }}"></onos-icon>
+            </div>
+
+            <div routerLink="/port" [queryParams]="{ devId: id }" routerLinkActive="active">
+                <onos-icon classes="{{ id ? 'active-rect' :undefined}}" iconId="portTable" iconSize="42" toolTip="{{ portTip }}"></onos-icon>
+            </div>
+
+            <div>
+                <onos-icon classes="{{ id ? 'current-view' :undefined}}" iconId="groupTable" iconSize="42"></onos-icon>
+            </div>
+
+            <div routerLink="/meter" [queryParams]="{ devId: id }" routerLinkActive="active">
+                <onos-icon classes="{{ id ? 'active-rect' :undefined}}" iconId="meterTable" iconSize="42" toolTip="{{ meterTip }}"></onos-icon>
+            </div>
+
+            <div routerLink="/pipeconf" [queryParams]="{ devId: id }" routerLinkActive="active">
+                <onos-icon classes="{{ id ? 'active-rect' :undefined}}" iconId="pipeconfTable" iconSize="42" toolTip="{{ pipeconfTip }}"></onos-icon>
+            </div>
+        </div>
+
+        <div class="search">
+            <input id="searchinput" [(ngModel)]="tableDataFilter.queryStr" type="search" #search placeholder="Search" />
+            <select [(ngModel)]="tableDataFilter.queryBy">
+                <option value="" disabled>Search By</option>
+                <option value="$">All Fields</option>
+                <option value="id">Group Id</option>
+                <option value="app_id">App Id</option>
+                <option value="state">State</option>
+                <option value="type">Type</option>
+            </select>
+        </div>
+    </div>
+
+    <div class="summary-list" onosTableResize>
+        <div class="table-header">
+            <table>
+                <tr>
+                    <td colId="id" (click)="onSort('id')">Group Id
+                        <onos-icon classes="active-sort" [iconSize]="10" [iconId]="sortIcon('id')"></onos-icon>
+                    </td>
+                    <td colId="app_id" (click)="onSort('app_id')">App Id
+                        <onos-icon classes="active-sort" [iconSize]="10" [iconId]="sortIcon('app_id')"></onos-icon>
+                    </td>
+                    <td colId="state" (click)="onSort('state')">State
+                        <onos-icon classes="active-sort" [iconSize]="10" [iconId]="sortIcon('state')"></onos-icon>
+                    </td>
+                    <td colId="type" (click)="onSort('type')">Type
+                        <onos-icon classes="active-sort" [iconSize]="10" [iconId]="sortIcon('type')"></onos-icon>
+                    </td>
+                    <td colId="packets" (click)="onSort('packets')">Packets
+                        <onos-icon classes="active-sort" [iconSize]="10" [iconId]="sortIcon('packets')"></onos-icon>
+                    </td>
+                    <td colId="bytes" (click)="onSort('bytes')">Bytes
+                        <onos-icon classes="active-sort" [iconSize]="10" [iconId]="sortIcon('bytes')"></onos-icon>
+                    </td>
+                </tr>
+            </table>
+        </div>
+
+        <div class="table-body">
+            <table>
+                <tr class="no-data" *ngIf="tableData.length === 0">
+                    <td colspan="6">{{ annots.noRowsMsg }}</td>
+                </tr>
+                <ng-template ngFor let-group [ngForOf]="tableData | filter : tableDataFilter">
+                    <tr [ngClass]="{'data-change': isChanged(group.id)}">
+                        <td>{{group.id}}</td>
+                        <td>{{group.app_id}}</td>
+                        <td>{{group.state}}</td>
+                        <td>{{group.type}}</td>
+                        <td>{{group.packets}}</td>
+                        <td>{{group.bytes}}</td>
+                    </tr>
+                    <tr (click)="selectCallback($event, group)" [hidden]="brief" [ngClass]="{'data-change': isChanged(group.id)}">
+                        <td class="buckets" colspan="6" [innerHTML]="group.buckets"></td>
+                    </tr>
+                </ng-template>
+            </table>
+        </div>
+    </div>
+</div>
\ No newline at end of file
diff --git a/web/gui2/src/main/webapp/app/view/group/group/group.component.spec.ts b/web/gui2/src/main/webapp/app/view/group/group/group.component.spec.ts
new file mode 100644
index 0000000..bcf0ca2
--- /dev/null
+++ b/web/gui2/src/main/webapp/app/view/group/group/group.component.spec.ts
@@ -0,0 +1,175 @@
+/*
+ * Copyright 2018-present Open Networking Foundation
+ *
+ * Licensed 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 { async, ComponentFixture, TestBed } from '@angular/core/testing';
+
+import { GroupComponent } from './group.component';
+import { LogService } from '../../../log.service';
+import { ConsoleLoggerService } from '../../../consolelogger.service';
+import { IconComponent } from '../../../fw/svg/icon/icon.component';
+import { DialogService } from '../../../fw/layer/dialog.service';
+import { FnService } from '../../../fw/util/fn.service';
+import { IconService } from '../../../fw/svg/icon.service';
+import { KeyService } from '../../../fw/util/key.service';
+import { LoadingService } from '../../../fw/layer/loading.service';
+import { ThemeService } from '../../../fw/util/theme.service';
+import { UrlFnService } from '../../../fw/remote/urlfn.service';
+import { WebSocketService } from '../../../fw/remote/websocket.service';
+import { ActivatedRoute, Params } from '@angular/router';
+import { of } from 'rxjs';
+import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
+import { FormsModule } from '@angular/forms';
+import { TableFilterPipe } from '../../../fw/widget/tablefilter.pipe';
+import { RouterTestingModule } from '@angular/router/testing';
+import { DebugElement } from '@angular/core';
+import { By } from '@angular/platform-browser';
+
+class MockActivatedRoute extends ActivatedRoute {
+    constructor(params: Params) {
+        super();
+        this.queryParams = of(params);
+    }
+}
+
+class MockDialogService { }
+
+class MockFnService { }
+
+class MockIconService {
+    loadIconDef() { }
+}
+
+class MockKeyService { }
+
+class MockLoadingService {
+    startAnim() { }
+    stop() { }
+    waiting() { }
+}
+
+class MockThemeService { }
+
+class MockUrlFnService { }
+
+class MockWebSocketService {
+    createWebSocket() { }
+    isConnected() { return false; }
+    unbindHandlers() { }
+    bindHandlers() { }
+}
+
+/**
+ * ONOS GUI -- Group View Module - Unit Tests
+ */
+describe('GroupComponent', () => {
+    let component: GroupComponent;
+    let fixture: ComponentFixture<GroupComponent>;
+    let log: LogService;
+    let fs: FnService;
+    let ar: MockActivatedRoute;
+    let windowMock: Window;
+    const bundleObj = {
+        'core.view.Group': {
+            test: 'test1',
+            tt_help: 'Help!'
+        }
+    };
+    const mockLion = (key) => {
+        return bundleObj[key] || '%' + key + '%';
+    };
+
+    beforeEach(async(() => {
+        log = new ConsoleLoggerService();
+        ar = new MockActivatedRoute({ 'debug': 'txrx' });
+
+        windowMock = <any>{
+            location: <any>{
+                hostname: 'foo',
+                host: 'foo',
+                port: '80',
+                protocol: 'http',
+                search: { debug: 'true' },
+                href: 'ws://foo:123/onos/ui/websock/path',
+                absUrl: 'ws://foo:123/onos/ui/websock/path'
+            }
+        };
+        fs = new FnService(ar, log, windowMock);
+
+        TestBed.configureTestingModule({
+            imports: [BrowserAnimationsModule, FormsModule, RouterTestingModule],
+            declarations: [GroupComponent, IconComponent, TableFilterPipe],
+            providers: [
+                { provide: DialogService, useClass: MockDialogService },
+                { provide: FnService, useValue: fs },
+                { provide: IconService, useClass: MockIconService },
+                { provide: KeyService, useClass: MockKeyService },
+                { provide: LoadingService, useClass: MockLoadingService },
+                { provide: LogService, useValue: log },
+                { provide: ThemeService, useClass: MockThemeService },
+                { provide: UrlFnService, useClass: MockUrlFnService },
+                { provide: WebSocketService, useClass: MockWebSocketService },
+                { provide: 'Window', useValue: windowMock },
+            ]
+        })
+            .compileComponents();
+    }));
+
+    beforeEach(() => {
+        fixture = TestBed.createComponent(GroupComponent);
+        component = fixture.componentInstance;
+        fixture.detectChanges();
+    });
+
+    it('should create', () => {
+        expect(component).toBeTruthy();
+    });
+
+    it('should have a div.tabular-header inside a div#ov-group', () => {
+        const groupDe: DebugElement = fixture.debugElement;
+        const divDe = groupDe.query(By.css('div#ov-group div.tabular-header'));
+        expect(divDe).toBeTruthy();
+    });
+
+    it('should have a h2 inside the div.tabular-header', () => {
+        const groupDe: DebugElement = fixture.debugElement;
+        const divDe = groupDe.query(By.css('div#ov-group div.tabular-header h2'));
+        const div: HTMLElement = divDe.nativeElement;
+        expect(div.textContent).toEqual(' Groups for Device  (0 total) ');
+    });
+
+    it('should have a refresh button inside the div.tabular-header', () => {
+        const groupDe: DebugElement = fixture.debugElement;
+        const divDe = groupDe.query(By.css('div#ov-group div.tabular-header div.ctrl-btns div.refresh'));
+        expect(divDe).toBeTruthy();
+    });
+
+    it('should have a div.summary-list inside a div#ov-group', () => {
+        const groupDe: DebugElement = fixture.debugElement;
+        const divDe = groupDe.query(By.css('div#ov-group div.summary-list'));
+        expect(divDe).toBeTruthy();
+    });
+
+    it('should have a div.table-header inside a div.summary-list inside a div#ov-group', () => {
+        const groupDe: DebugElement = fixture.debugElement;
+        const divDe = groupDe.query(By.css('div#ov-group div.summary-list div.table-header'));
+        expect(divDe).toBeTruthy();
+    });
+
+    it('should have a div.table-body inside a div.summary-list inside a div#ov-group', () => {
+        const groupDe: DebugElement = fixture.debugElement;
+        const divDe = groupDe.query(By.css('div#ov-group div.summary-list div.table-body'));
+        expect(divDe).toBeTruthy();
+    });
+});
diff --git a/web/gui2/src/main/webapp/app/view/group/group/group.component.ts b/web/gui2/src/main/webapp/app/view/group/group/group.component.ts
new file mode 100644
index 0000000..fc6e9bd
--- /dev/null
+++ b/web/gui2/src/main/webapp/app/view/group/group/group.component.ts
@@ -0,0 +1,109 @@
+/*
+ * Copyright 2018-present Open Networking Foundation
+ *
+ * Licensed 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, OnInit, OnDestroy } from '@angular/core';
+import { LogService } from '../../../log.service';
+import { FnService } from '../../../fw/util/fn.service';
+import { LoadingService } from '../../../fw/layer/loading.service';
+import { WebSocketService } from '../../../fw/remote/websocket.service';
+import { ActivatedRoute } from '@angular/router';
+import { TableResponse, TableBaseImpl, SortDir } from '../../../fw/widget/table.base';
+
+/**
+ * Model of the response from WebSocket
+ */
+interface GroupTableResponse extends TableResponse {
+    groups: Group[];
+}
+
+/**
+ * Model of the flows returned from the WebSocket
+ */
+interface Group {
+    id: string;
+    app_id: string;
+    state: string;
+    type: string;
+    packets: string;
+    bytes: string;
+}
+
+/**
+ * ONOS GUI -- Group View Component
+ */
+@Component({
+    selector: 'onos-group',
+    templateUrl: './group.component.html',
+    styleUrls: ['./group.component.css', './group.theme.css', '../../../fw/widget/table.css', '../../../fw/widget/table.theme.css']
+})
+export class GroupComponent extends TableBaseImpl implements OnInit, OnDestroy {
+    id: string;
+    brief: boolean;
+
+    // TODO: Update for LION
+    deviceTip = 'Show device table';
+    detailTip = 'Switch to detailed view';
+    briefTip = 'Switch to brief view';
+    flowTip = 'Show flow view for selected device';
+    portTip = 'Show port view for selected device';
+    meterTip = 'Show meter view for selected device';
+    pipeconfTip = 'Show pipeconf view for selected device';
+
+    constructor(
+        protected log: LogService,
+        protected fs: FnService,
+        protected ls: LoadingService,
+        protected wss: WebSocketService,
+        protected ar: ActivatedRoute,
+    ) {
+        super(fs, ls, log, wss, 'group');
+        this.ar.queryParams.subscribe(params => {
+            this.id = params['devId'];
+        });
+        this.brief = true;
+
+        this.payloadParams = {
+            devId: this.id
+        };
+
+        this.responseCallback = this.groupResponseCb;
+
+        this.sortParams = {
+            firstCol: 'id',
+            firstDir: SortDir.desc,
+            secondCol: 'app_id',
+            secondDir: SortDir.asc,
+        };
+    }
+
+    ngOnInit() {
+        this.init();
+        this.log.info('GroupComponent initialized');
+    }
+
+    ngOnDestroy() {
+        this.destroy();
+        this.log.info('GroupComponent destroyed');
+    }
+
+    groupResponseCb(data: GroupTableResponse) {
+        this.log.debug('Group response received for ', data.groups.length, 'group');
+    }
+
+    briefToggle() {
+        this.brief = !this.brief;
+    }
+
+}
diff --git a/web/gui2/src/main/webapp/app/view/group/group/group.theme.css b/web/gui2/src/main/webapp/app/view/group/group/group.theme.css
new file mode 100644
index 0000000..f90556c
--- /dev/null
+++ b/web/gui2/src/main/webapp/app/view/group/group/group.theme.css
@@ -0,0 +1,71 @@
+/*
+ * Copyright 2018-present Open Networking Foundation
+ *
+ * Licensed 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.
+ */
+
+/*
+ ONOS GUI -- Group View (theme) -- CSS file
+ */
+
+/* a "logical" row is made up of 2 "physical" rows -- color as such */
+#ov-group tr:nth-child(4n + 1),
+#ov-group tr:nth-child(4n + 2) {
+    background-color: #fbfbfb;
+}
+#ov-group tr:nth-child(4n + 3),
+#ov-group tr:nth-child(4n) {
+    background-color: #f4f4f4;
+}
+
+/* highlighted color */
+#ov-group tr:nth-child(4n + 1).data-change,
+#ov-group tr:nth-child(4n + 2).data-change,
+#ov-group tr:nth-child(4n + 3).data-change,
+#ov-group tr:nth-child(4n).data-change {
+    background-color: #FDFFDC;
+}
+
+#ov-group td.selector,
+#ov-group td.treatment {
+    opacity: 0.65;
+}
+
+/* ========== DARK Theme ========== */
+
+.dark #ov-group tr:nth-child(4n + 1),
+.dark #ov-group tr:nth-child(4n + 2) {
+    background-color: #333333;
+}
+.dark #ov-group tr:nth-child(4n + 3),
+.dark #ov-group tr:nth-child(4n) {
+    background-color: #3a3a3a;
+}
+
+.dark #ov-group tr:nth-child(4n + 1).data-change,
+.dark #ov-group tr:nth-child(4n + 2).data-change,
+.dark #ov-group tr:nth-child(4n + 3).data-change,
+.dark #ov-group tr:nth-child(4n).data-change {
+    background-color: #423708;
+}
+
+.light #group-details-panel .bottom th {
+    background-color: #e5e5e6;
+}
+
+.light #group-details-panel .bottom tr:nth-child(odd) {
+    background-color: #fbfbfb;
+}
+.light #group-details-panel .bottom tr:nth-child(even) {
+    background-color: #f4f4f4;
+}