From d4d896ade829300fa306bac82798d746a85e9693 Mon Sep 17 00:00:00 2001 From: Patrick O'Carroll Date: Wed, 1 Aug 2018 09:08:17 +0200 Subject: [PATCH] replaced style with class for links --- public/app/plugins/panel/table/renderer.ts | 13 +++++++++---- .../app/plugins/panel/table/specs/renderer.jest.ts | 2 +- public/sass/components/_panel_table.scss | 4 ++++ 3 files changed, 14 insertions(+), 5 deletions(-) diff --git a/public/app/plugins/panel/table/renderer.ts b/public/app/plugins/panel/table/renderer.ts index c1e4e6243f9..474e9c89493 100644 --- a/public/app/plugins/panel/table/renderer.ts +++ b/public/app/plugins/panel/table/renderer.ts @@ -214,15 +214,15 @@ export class TableRenderer { var style = ''; var cellClasses = []; var cellClass = ''; - var linkStyle = ''; + var linkClass = ''; if (this.colorState.row) { - linkStyle = ' style="color: white"'; + linkClass = 'table-panel-link'; } if (this.colorState.cell) { style = ' style="background-color:' + this.colorState.cell + ';color: white"'; - linkStyle = ' style="color: white;"'; + linkClass = 'table-panel-link'; this.colorState.cell = null; } else if (this.colorState.value) { style = ' style="color:' + this.colorState.value + '"'; @@ -258,7 +258,12 @@ export class TableRenderer { cellClasses.push('table-panel-cell-link'); columnHtml += ` - + ${value} `; diff --git a/public/app/plugins/panel/table/specs/renderer.jest.ts b/public/app/plugins/panel/table/specs/renderer.jest.ts index 22957d1aa66..f1a686fb739 100644 --- a/public/app/plugins/panel/table/specs/renderer.jest.ts +++ b/public/app/plugins/panel/table/specs/renderer.jest.ts @@ -268,7 +268,7 @@ describe('when rendering table', () => { var expectedHtml = ` + target="_blank" data-link-tooltip data-original-title="host1 1230 my.host.com" data-placement="right" class=""> host1 diff --git a/public/sass/components/_panel_table.scss b/public/sass/components/_panel_table.scss index 8e0ecf15896..99e91f8ff67 100644 --- a/public/sass/components/_panel_table.scss +++ b/public/sass/components/_panel_table.scss @@ -133,3 +133,7 @@ height: 0px; line-height: 0px; } + +.table-panel-link { + color: white; +}