Commit 7ac58060 authored by Louis's avatar Louis
Browse files

Merge branch 'master' into unknowncolumn

parents d310093e 84993ece
Pipeline #7389 failed with stage
in 5 seconds
......@@ -2,7 +2,7 @@
- [ ] Add package name in chart tooltips
- [ ] Add generation date and "built using XXX" to html page
- [ ] Add errors
- [ ] Add favicon
- [x] Add favicon
- [ ] Validate the HTML output
- Core
......
/*******************************************************************************
* TOOLTIPS
******************************************************************************/
/* Tooltip container */
.tooltip {
position: relative;
display: inline-block;
border-bottom: 1px dotted black; /* If you want dots under the hoverable text */
}
/* Tooltip text */
.tooltip .tooltiptext {
visibility: hidden;
width: 120px;
background-color: black;
color: #fff;
text-align: center;
padding: 5px 0;
border-radius: 6px;
/* Position the tooltip text - see examples below! */
position: absolute;
z-index: 1;
}
/* Show the tooltip text when you mouse over the tooltip container */
.tooltip:hover .tooltiptext {
visibility: visible;
}
......@@ -7,38 +7,14 @@
<title>Pypi statistics</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.0.1/Chart.bundle.js"></script>
<script src="http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
{% if form != none %}
<link rel="stylesheet" type="text/css" href="{{ form.rooturl }}/style.css">
<link rel="icon" href="{{ form.rooturl }}/favicon.png" />
{% endif %}
</head>
<body>
{% if form != none %}
<style>
/* Tooltip container */
.tooltip {
position: relative;
display: inline-block;
border-bottom: 1px dotted black; /* If you want dots under the hoverable text */
}
/* Tooltip text */
.tooltip .tooltiptext {
visibility: hidden;
width: 120px;
background-color: black;
color: #fff;
text-align: center;
padding: 5px 0;
border-radius: 6px;
/* Position the tooltip text - see examples below! */
position: absolute;
z-index: 1;
}
/* Show the tooltip text when you mouse over the tooltip container */
.tooltip:hover .tooltiptext {
visibility: visible;
}
</style>
<form action="{{ form.index }}" method="get">
<form action="{{ form.rooturl }}" method="get">
<span class="tooltip">Packages <div class="tooltiptext">Comma separated list of packages to monitor.</div></span>: <input type="text" name="pkg" value="{{ form.pkg }}">
<span class="tooltip">Users <div class="tooltiptext">Comma separated list of users to monitor.</div></span>: <input type="text" name="user" value="{{ form.user }}">
<span class="tooltip">Columns <div class="tooltiptext">Comma separated list of columns to display.</div></span>: <input type="text" name="col" value="{{ form.col }}">
......
......@@ -41,7 +41,7 @@ class HttpHandler(http.server.SimpleHTTPRequestHandler):
'pkg': querydict.get('pkg', []),
'col': querydict.get('col', []),
'user': querydict.get('user', []),
'index': '',
'rooturl': '',
}
).render(), "utf-8"))
elif self._find_yaml(path):
......@@ -50,7 +50,7 @@ class HttpHandler(http.server.SimpleHTTPRequestHandler):
self.end_headers()
self.wfile.write(bytes(pypimonitor.Renderer.from_yaml(
self._find_yaml(path),
form={'index': "/".join(".."*len(path.split("/")))},
form={'rooturl': "/".join(".."*len(path.split("/")))},
).render(), "utf-8"))
else:
super().do_GET()
......
Supports Markdown
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