Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Scheduler stylesheet #2

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
141 changes: 141 additions & 0 deletions distributed/bokeh/templates/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,141 @@
/* Resets */
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed,
figure, figcaption, footer, header, hgroup,
menu, nav, output, ruby, section, summary,
time, mark, audio, video {
margin: 0;
padding: 0;
border: 0;
vertical-align: baseline;
}
html {
-ms-text-size-adjust: 100%;
-webkit-text-size-adjust: 100%;
}
body {
margin: 0;
font: normal 16px/1.4 Helvetica, Arial, sans-serif;
}
pre {
overflow: auto;
}
code, kbd, pre, samp {
font-family: monospace, monospace;
font-size: 1em;
}
hr {
box-sizing: content-box;
height: 0;
}

ol, ul {
list-style-position: inside;
}

p {
margin-bottom: 15px;
}

input {
line-height: normal;
}
input[type="checkbox"], input[type="radio"] {
box-sizing: border-box;
padding: 0;
}

button, input, optgroup, select, textarea {
color: inherit;
font: inherit;
margin: 0;
}
button {
overflow: visible;
}
button, select {
text-transform: none;
}
button, html input[type="button"], input[type="reset"], input[type="submit"] {
-webkit-appearance: button;
cursor: pointer;
}
button[disabled], html input[disabled] {
cursor: default;
}
button::-moz-focus-inner, input::-moz-focus-inner {
border: 0;
padding: 0;
}

table {
width: 100%;
border-collapse: collapse;
border-spacing: 0;
}
table tr:not(:last-of-type) {
border-bottom: 1px solid #ddd;
}
table td, table th {
border: 1px solid #ddd;
padding: 0.65em;
padding: 0.65em;
text-align: left;
}
table th {
background: #ececec;
color: #414042;
}
table tr td:first-child {
border-left: 1px solid #ddd;
}
table tr td {
border-left: none;
}

/* Main Content */
.container {
width: 98%;
max-width: 960px;
margin: 0 auto;
}
.container > .section {
margin: 20px 0;
}

/* Main Heading */
h2.task-heading {
margin-top: 10px;
}

/* Dependencies & Dependents */
#dependencies-dependents:after {
display: block;
content: '';
clear: both;
}
#dependencies-dependents ul,
#holds ul,
#requests ul {
border: 1px solid #ddd;
padding: 20px;
border-radius: 3px;
font-size: 14px;
}
@media all and (min-width: 768px) {
#dependencies-dependents > div {
width: 50%;
float: left;
}
#dependencies-dependents > div ul {
width: 90%;
}
}
106 changes: 106 additions & 0 deletions distributed/bokeh/templates/task.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
<html lang="en">
<head>

<meta charset="utf-8" />
<title> {{title}} </title>
<link rel="stylesheet" href="style.css" media="all" />

</head>
<body>
<div class="container">

<h2 class="task-heading"> {{ Task }}: {{ task_state[Task] }} </h2>

<div id="stats" class="section">
<table>
<tr>
<th> Status </th>
<td> {{ task_state[Task] }} </td>
</tr>
<tr>
<th> Processing on </th>
<td> {{ rprocessing.get(Task) }} </td>
</tr>
<tr>
<th> Bytes in memory </th>
<td> {{ nbytes.get(Task) }} </td>
</tr>
</table>
</div><!-- #stats -->

<div id="dependencies-dependents" class="section">
<div id="dependencies">
<h3> Dependencies </h3>
<ul>
{% for task in dependencies.get(Task, ()) %}
<li> <a href="/scheduler/task/{{ url_escape(Task) }}.html">{{task}}</a></li>
{% end %}
</ul>
</div><!-- #dependencies -->

<div id="dependents">
<h3> Dependents </h3>
<ul>
{% for task in dependents.get(Task, ()) %}
<li> <a href="/scheduler/task/{{ url_escape(Task) }}.html">{{task}}</a></li>
{% end %}
</ul>
</div><!-- #dependents -->
</div><!-- #dependencies-dependents -->

<div id="holds" class="section">
<h3> Holds in Memory</h3>
<ul>
{% for worker in who_has.get(Task, ()) %}
<li> <a href="/scheduler/worker/{{ url_escape(worker) }}.html">{{worker}}</a></li>
{% end %}
</ul>
</div><!-- #holds -->

<div id="requests" class="section">
<h3> Requested by </h3>
<ul>
{% for client in who_wants.get(Task, ()) %}
<li> <a href="/scheduler/client/{{ url_escape(client) }}.html">{{client}}</a></li>
{% end %}
</ul>
</div><!-- #requests -->

<div id="transition-log" class="section">
<h2> Transition Log </h2>
<table>
<tr>
<th> Index </th>
<th> Key </th>
<th> Start </th>
<th> Finish </th>
<th> Recommend Key </th>
<th> Recommend State </th>
</tr>

{% for key, start, finish, recommendations, counter in server.story(Task) %}
<tr>
<td> {{ counter }} </td>
<td> <a href="/scheduler/task/{{ url_escape(key) }}.html">{{key}}</a> </td>
<td> {{ start }} </td>
<td> {{ finish }} </td>
<td> </td>
<td> </td>
</tr>
{% for key2, rec in recommendations.items() %}
<tr>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> <a href="/scheduler/task/{{ url_escape(key2) }}.html">{{key2}}</a> </td>
<td> {{ rec }} </td>
</tr>
{% end %}
{% end %}
</table>
</div><!-- #transition-log -->

</div><!-- .container -->
</body>
</html>