highlight entire row on hover

This commit is contained in:
Jake McDermott
2018-11-05 20:04:16 -05:00
parent 0c2b1b7747
commit 76e887f46d
2 changed files with 16 additions and 12 deletions

View File

@@ -72,11 +72,19 @@
&-row { &-row {
display: flex; display: flex;
&:hover {
background-color: white;
}
&:hover div { &:hover div {
background-color: white; background-color: white;
} }
} }
&-row--clickable {
cursor: pointer;
}
&-toggle { &-toggle {
background-color: @at-gray-eb; background-color: @at-gray-eb;
color: @at-gray-848992; color: @at-gray-848992;
@@ -112,12 +120,6 @@
.at-mixin-event(); .at-mixin-event();
} }
&-event--host {
.at-mixin-event();
cursor: pointer;
}
&-time { &-time {
padding-right: 2ch; padding-right: 2ch;
font-size: 12px; font-size: 12px;

View File

@@ -347,6 +347,7 @@ function JobRenderService ($q, $compile, $sce, $window) {
let tdToggle = ''; let tdToggle = '';
let tdEvent = ''; let tdEvent = '';
let classList = ''; let classList = '';
let directives = '';
if (record.isMissing) { if (record.isMissing) {
return `<div id="${record.uuid}" class="at-Stdout-row"> return `<div id="${record.uuid}" class="at-Stdout-row">
@@ -373,10 +374,6 @@ function JobRenderService ($q, $compile, $sce, $window) {
tdToggle = `<div class="at-Stdout-toggle" ng-click="vm.toggleCollapse('${id}')"><i class="fa ${icon} can-toggle"></i></div>`; tdToggle = `<div class="at-Stdout-toggle" ng-click="vm.toggleCollapse('${id}')"><i class="fa ${icon} can-toggle"></i></div>`;
} }
if (record.isClickable) {
tdEvent = `<div class="at-Stdout-event--host" ng-click="vm.showHostDetails('${record.id}', '${record.uuid}')"><span ng-non-bindable>${content}</span></div>`;
}
if (record.time && record.line === ln) { if (record.time && record.line === ln) {
timestamp = `<span>${record.time}</span>`; timestamp = `<span>${record.time}</span>`;
} }
@@ -404,11 +401,16 @@ function JobRenderService ($q, $compile, $sce, $window) {
} }
} }
if (record && record.isClickable) {
classList += ' at-Stdout-row--clickable';
directives = `ng-click="vm.showHostDetails('${record.id}', '${record.uuid}')"`;
}
return ` return `
<div id="${id}" class="at-Stdout-row ${classList}"> <div id="${id}" class="at-Stdout-row ${classList}" ${directives}>
${tdToggle} ${tdToggle}
<div class="at-Stdout-line">${ln}</div> <div class="at-Stdout-line">${ln}</div>
${tdEvent} <div class="at-Stdout-event"><span ng-non-bindable>${content}</span></div>
<div class="at-Stdout-time">${timestamp}</div> <div class="at-Stdout-time">${timestamp}</div>
</div>`; </div>`;
}; };