The Overview will display a bar chart of daily runs, categorized by report status (changed, unchanged, failed). The chart data is loaded asynchronously from JSON so it doesn't provoke a delay in the page load. The data is JSON enconded. This feature was in the original Puppet Dashboard. The change was proposed and discussed in issue #308 . Application changes: - app.py: New view daily_reports_chart to serve the chart data as JSON. - dailychart.py: Submodule to query and format the chart data. Template changes: - layout.html: New block to add more elements to the HTML header. - index.html, node.html: Add C3 CSS in header block, add DIV placeholder for the chart in content block, add dailychart.js (and dependencies) in script block. Settings: - DAILY_REPORTS_CHART_ENABLED: New setting to turn off the charts. By default is on. - DAILY_REPORTS_CHART_DAYS: Changes the range of days to display in the charts. Javascript changes: - dailychart.js: New script that loads the JSON data for the chart and calls C3 to generate a bar chart. CSS changes: - puppetboard.css: Set fixed height to the chart container to avoid a page resize after the chart is loaded.
201 lines
3.1 KiB
CSS
201 lines
3.1 KiB
CSS
body {
|
|
margin: 0;
|
|
font-family: "Open Sans", sans-serif;
|
|
font-size: 1.2rem;
|
|
}
|
|
|
|
a {
|
|
color: #2E5D8C;
|
|
text-decoration: none;
|
|
}
|
|
|
|
h1.ui.header.no-margin-bottom {
|
|
margin-bottom: 0;
|
|
}
|
|
|
|
.tablesorter-header-inner {
|
|
float: left;
|
|
}
|
|
|
|
th.tablesorter-headerAsc::after {
|
|
content: '\25b4' !important;
|
|
float: right;
|
|
}
|
|
|
|
th.tablesorter-headerDesc::after {
|
|
content: '\25be' !important;
|
|
float: right;
|
|
}
|
|
|
|
.ui.grid.padding-bottom {
|
|
padding-bottom: 40px !important;
|
|
}
|
|
|
|
.status {
|
|
width: 13.2em;
|
|
text-align: center;
|
|
display: block;
|
|
}
|
|
|
|
.ui.table[class*="very compact"] td {
|
|
padding: 0.15em 0.1em;
|
|
}
|
|
|
|
.factlist li {
|
|
word-wrap: break-word;
|
|
}
|
|
|
|
.ui.table.wrapped td {
|
|
word-wrap: break-word;
|
|
}
|
|
|
|
.ui.label.status {
|
|
color: white;
|
|
text-shadow: 0 0 1px;
|
|
}
|
|
|
|
.ui.header.failed, .ui.line.failed {
|
|
color: #AA4643;
|
|
}
|
|
|
|
.ui.label.failed {
|
|
background-color: #AA4643;
|
|
}
|
|
|
|
.ui.header.changed, .ui.line.changed {
|
|
color: #4572A7;
|
|
}
|
|
|
|
.ui.label.changed {
|
|
background-color: #4572A7;
|
|
}
|
|
|
|
.ui.header.unreported {
|
|
color: #3D96AE;
|
|
}
|
|
|
|
.ui.label.unreported {
|
|
background-color: #3D96AE;
|
|
}
|
|
|
|
.ui.header.noop {
|
|
color: #DB843D;
|
|
}
|
|
|
|
.ui.label.noop {
|
|
background-color: #DB843D;
|
|
}
|
|
|
|
.ui.label.unchanged {
|
|
background-color: #89A54E;
|
|
}
|
|
|
|
.ui.line.skipped {
|
|
color: orange;
|
|
}
|
|
|
|
.ui.label.skipped {
|
|
background-color: orange;
|
|
}
|
|
|
|
.count {
|
|
width: 4em;
|
|
text-align: center;
|
|
display: block;
|
|
}
|
|
|
|
.absolute {
|
|
position: fixed;
|
|
bottom: 0;
|
|
width: 100%;
|
|
background: #E8E8E8;
|
|
}
|
|
|
|
.absolute div {
|
|
padding: 1em;
|
|
}
|
|
|
|
.ui.menu.darkblue {
|
|
background-color: #2C3E50;
|
|
}
|
|
|
|
.ui.darkblue.header, i.darkblue {
|
|
color: #2C3E50;
|
|
}
|
|
|
|
.ui.labels .darkblue.label::before, .ui.darkblue.labels .label::before, .ui.darkblue.label::before {
|
|
background-color: #2C3E50;
|
|
}
|
|
|
|
.ui.darkblue.labels .label, .ui.darkblue.label {
|
|
background-color: #2C3E50;
|
|
border-color: #2C3E50;
|
|
color: #FFF;
|
|
}
|
|
|
|
.ui.menu.yellow {
|
|
background-color: #F0E965;
|
|
}
|
|
|
|
.ui.yellow.header, i.yellow {
|
|
color: #F0E965;
|
|
}
|
|
|
|
.ui.labels .yellow.label::before, .ui.yellow.labels .label::before, .ui.yellow.label::before {
|
|
background-color: #F0E965;
|
|
}
|
|
|
|
.ui.yellow.labels .label, .ui.yellow.label {
|
|
background-color: #F0E965;
|
|
border-color: #F0E965;
|
|
}
|
|
|
|
#scroll-btn-top {
|
|
position: fixed;
|
|
overflow: hidden;
|
|
z-index: 99999999;
|
|
opacity: 0;
|
|
visibility: hidden;
|
|
width: 50px;
|
|
height: 48px;
|
|
line-height: 48px;
|
|
right: 30px;
|
|
bottom: 85px;
|
|
padding-top: 2px;
|
|
background-color: #777777;
|
|
text-align: center;
|
|
color: #EEE;
|
|
border-top-left-radius: 10px;
|
|
border-top-right-radius: 10px;
|
|
border-bottom-right-radius: 10px;
|
|
border-bottom-left-radius: 10px;
|
|
-webkit-transition: all 0.5s ease-in-out;
|
|
-moz-transition: all 0.5s ease-in-out;
|
|
-ms-transition: all 0.5s ease-in-out;
|
|
-o-transition: all 0.5s ease-in-out;
|
|
transition: all 0.5s ease-in-out;
|
|
}
|
|
|
|
#scroll-btn-top:hover {
|
|
background-color: #888;
|
|
}
|
|
|
|
#scroll-btn-top.show {
|
|
visibility: visible;
|
|
cursor: pointer;
|
|
opacity: 1.0;
|
|
}
|
|
|
|
#scroll-btn-top i {
|
|
position: absolute;
|
|
top: 50%;
|
|
left: 50%;
|
|
margin: 0;
|
|
margin-right: -50%;
|
|
transform: translate(-50%, -50%)
|
|
}
|
|
|
|
#dailyReportsChartContainer {
|
|
height: 160px;
|
|
}
|