Commit d4d896ad by Patrick O'Carroll

replaced style with class for links

parent 4b8ec4e3
...@@ -214,15 +214,15 @@ export class TableRenderer { ...@@ -214,15 +214,15 @@ export class TableRenderer {
var style = ''; var style = '';
var cellClasses = []; var cellClasses = [];
var cellClass = ''; var cellClass = '';
var linkStyle = ''; var linkClass = '';
if (this.colorState.row) { if (this.colorState.row) {
linkStyle = ' style="color: white"'; linkClass = 'table-panel-link';
} }
if (this.colorState.cell) { if (this.colorState.cell) {
style = ' style="background-color:' + this.colorState.cell + ';color: white"'; style = ' style="background-color:' + this.colorState.cell + ';color: white"';
linkStyle = ' style="color: white;"'; linkClass = 'table-panel-link';
this.colorState.cell = null; this.colorState.cell = null;
} else if (this.colorState.value) { } else if (this.colorState.value) {
style = ' style="color:' + this.colorState.value + '"'; style = ' style="color:' + this.colorState.value + '"';
...@@ -258,7 +258,12 @@ export class TableRenderer { ...@@ -258,7 +258,12 @@ export class TableRenderer {
cellClasses.push('table-panel-cell-link'); cellClasses.push('table-panel-cell-link');
columnHtml += ` columnHtml += `
<a href="${cellLink}" target="${cellTarget}" data-link-tooltip data-original-title="${cellLinkTooltip}" data-placement="right"${linkStyle}> <a href="${cellLink}"
target="${cellTarget}"
data-link-tooltip
data-original-title="${cellLinkTooltip}"
data-placement="right"
class="${linkClass}">
${value} ${value}
</a> </a>
`; `;
......
...@@ -268,7 +268,7 @@ describe('when rendering table', () => { ...@@ -268,7 +268,7 @@ describe('when rendering table', () => {
var expectedHtml = ` var expectedHtml = `
<td class="table-panel-cell-link"> <td class="table-panel-cell-link">
<a href="/dashboard?param=host1&param_1=1230&param_2=40" <a href="/dashboard?param=host1&param_1=1230&param_2=40"
target="_blank" data-link-tooltip data-original-title="host1 1230 my.host.com" data-placement="right"> target="_blank" data-link-tooltip data-original-title="host1 1230 my.host.com" data-placement="right" class="">
host1 host1
</a> </a>
</td> </td>
......
...@@ -133,3 +133,7 @@ ...@@ -133,3 +133,7 @@
height: 0px; height: 0px;
line-height: 0px; line-height: 0px;
} }
.table-panel-link {
color: white;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment