1
0
mirror of https://github.com/ohwgiles/laminar.git synced 2024-10-27 20:34:20 +00:00

Output log "skinning"

Not definely best solution, but there will be no need to patch/recompile
app to just switch colors of log output.
This commit is contained in:
Václav Valíček 2017-12-28 15:54:12 +01:00
parent e1a0c7bd0b
commit 13bc22b1f3
No known key found for this signature in database
GPG Key ID: 7CF44871CEA75938
2 changed files with 10 additions and 5 deletions

View File

@ -193,6 +193,7 @@ void Laminar::sendStatus(LaminarClient* client) {
}); });
} }
j.set("latestNum", int(buildNums[client->scope.job])); j.set("latestNum", int(buildNums[client->scope.job]));
j.set("skin", getenv("LAMINAR_SKIN") ?: "");
j.startArray("artifacts"); j.startArray("artifacts");
populateArtifacts(j, client->scope.job, client->scope.num); populateArtifacts(j, client->scope.job, client->scope.num);
j.EndArray(); j.EndArray();

View File

@ -44,6 +44,10 @@
right: 10px; right: 10px;
padding: 20px; padding: 20px;
} }
pre.black {
background-color: black;
color: white;
}
</style> </style>
</head> </head>
<body> <body>
@ -211,7 +215,7 @@
<div class="row"><div class="col-xs-12"> <div class="row"><div class="col-xs-12">
<button type="button" class="btn btn-default btn-xs pull-right" :class="{'active':autoscroll}" v-on:click="autoscroll = !autoscroll" style="margin-top:10px">Autoscroll</button> <button type="button" class="btn btn-default btn-xs pull-right" :class="{'active':autoscroll}" v-on:click="autoscroll = !autoscroll" style="margin-top:10px">Autoscroll</button>
<h4>Console output</h4> <h4>Console output</h4>
<pre v-html="log"></pre> <pre :class="job.skin" v-html="log"></pre>
</div></div> </div></div>
</div> </div>
</div></template> </div></template>