Skip to content

Commit

Permalink
Add dashboard generation script
Browse files Browse the repository at this point in the history
  • Loading branch information
asdil12 authored and okurz committed Sep 23, 2016
1 parent a23a281 commit 1e277b1
Show file tree
Hide file tree
Showing 7 changed files with 10,925 additions and 0 deletions.
41 changes: 41 additions & 0 deletions dashboard.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
#!/bin/bash

TPL="dashboard_files/dashboard.html.in"
OUT="dashboard.html"
if which openqa-review >/dev/null 2>&1 ; then
OPENQA_REVIEW="openqa-review"
else
OPENQA_REVIEW="./openqa_review/openqa_review.py"
fi

cache=$(mktemp -d)

GLOBAL_PARAMS="--host https://openqa.suse.de/ --no-empty-sections -R $@"

closed_html=$($OPENQA_REVIEW $GLOBAL_PARAMS --save --save-dir="$cache" -f closed | sed 's/^#\s/#### /' | markdown)
unassigned_html=$($OPENQA_REVIEW $GLOBAL_PARAMS --load --load-dir="$cache" -f unassigned | sed 's/^#\s/#### /' | markdown)

sed '/TPL_OPENQA_CONTENT/q' $TPL | head -n -1 > $OUT
cat >> $OUT <<EOF
<div class="panel panel-default" id="closed_box">
<div class="panel-heading" style="font-weight: bold;">
Closed Bugs
</div>
<div class="panel-body">
${closed_html}
</div>
</div>
<div class="panel panel-default" id="unassigned_box">
<div class="panel-heading" style="font-weight: bold;">
Unassigned Bugs
</div>
<div class="panel-body">
${unassigned_html}
</div>
</div>
EOF

sed '1,/TPL_OPENQA_CONTENT/d' $TPL >> $OUT

rm -r "$cache"
6,655 changes: 6,655 additions & 0 deletions dashboard_files/bootstrap.css

Large diffs are not rendered by default.

3,534 changes: 3,534 additions & 0 deletions dashboard_files/bootstrap.js

Large diffs are not rendered by default.

97 changes: 97 additions & 0 deletions dashboard_files/dashboard.html.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
<!DOCTYPE html>
<html lang="en"><head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<!-- Meta, title, CSS, favicons, etc. -->
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="openQA is a testing framework mainly for distributions">
<meta name="keywords" content="Testing, Linux, Qemu">
<meta name="author" content="openQA contributors">
<title>openQA</title>

<!-- Bootstrap core CSS -->
<link href="dashboard_files/bootstrap.css" rel="stylesheet">
<script src="dashboard_files/bootstrap.js"></script>

<link rel="icon" type="image/png" sizes="16x16" href="https://openqa.suse.de/asset/5caa45a06e/logo-16.png">
<link rel="icon" href="dashboard_files/logo.svg" sizes="any" type="image/svg+xml">

<style type="text/css">
hr + h4 {
margin-top: -18px;
padding-top: 18px;
border-top: 1px solid #eee;
}
</style>

</head>
<body>
<nav class="navbar navbar-static-top navbar-default">
<div class="container">
<!-- Brand and toggle get grouped for better mobile display -->
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar-collapse-1" aria-expanded="false">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="https://openqa.suse.de/"><img src="dashboard_files/logo.svg" alt="openQA"></a>
</div>
<!-- Collect the nav links, forms, and other content for toggling -->
<div class="collapse navbar-collapse" id="navbar-collapse-1">
<ul class="nav navbar-nav">

<li>
<a href="https://openqa.suse.de/tests">All Tests</a>
</li>

</ul>
<ul class="nav navbar-nav navbar-right">
<li id="user-action">
<a href="https://openqa.suse.de/login">Login</a>
</li>
</ul>
</div><!-- /.navbar-collapse -->
</div>
</nav>
<div class="container" id="content">

<div class="jumbotron">
<div class="container">
<div class="col-md-10">
<h2>openQA review report for openqa.suse.de</h2>

<p><a href="#closed_box">» Closed bugs</a></p>
<p><a href="#unassigned_box">» Unassigned bugs</a></p>

</div>

<div class="col-md-2 hidden-sm hidden-xs">
<div class="text-right" id="sponsorbox">
<a href="http://www.suse.com/" title="SUSE">
<img alt="sponsor_suse" class="icons-sponsor_suse" src="dashboard_files/suse.png">
</a>
</div>

</div>
</div>
</div>

TPL_OPENQA_CONTENT

</div>

<footer class="footer">
<div class="container">
<div id="footer-legal" class="text-center">
openQA is licensed
<a href="https://github.com/os-autoinst/openQA">GPL-2.0</a>
</div>
</div>
</footer>



</body></html>
Binary file added dashboard_files/fontawesome-webfont_v_4_6_3.woff2
Binary file not shown.
Loading

0 comments on commit 1e277b1

Please sign in to comment.