Commit 43665687 by John Doe

added javascript plugins hook

parent 9cbd712e
......@@ -12,3 +12,132 @@
border: 1px solid;
border-radius: 4px;
}
/* Bootstrap table styling */
table {
background-color: transparent;
}
caption {
padding-top: 8px;
padding-bottom: 8px;
color: #777777;
text-align: left;
}
th {
text-align: left;
}
.table {
width: 100%;
max-width: 100%;
margin-bottom: 20px;
}
.table>thead>tr>th, .table>tbody>tr>th, .table>tfoot>tr>th, .table>thead>tr>td, .table>tbody>tr>td, .table>tfoot>tr>td {
padding: 8px;
line-height: 1.42857143;
vertical-align: top;
border-top: 1px solid #ddd;
}
.table>thead>tr>th {
vertical-align: bottom;
border-bottom: 2px solid #ddd;
}
.table>caption+thead>tr:first-child>th, .table>colgroup+thead>tr:first-child>th, .table>thead:first-child>tr:first-child>th, .table>caption+thead>tr:first-child>td, .table>colgroup+thead>tr:first-child>td, .table>thead:first-child>tr:first-child>td {
border-top: 0;
}
.table>tbody+tbody {
border-top: 2px solid #ddd;
}
.table .table {
background-color: #fff;
}
.table-condensed>thead>tr>th, .table-condensed>tbody>tr>th, .table-condensed>tfoot>tr>th, .table-condensed>thead>tr>td, .table-condensed>tbody>tr>td, .table-condensed>tfoot>tr>td {
padding: 5px;
}
.table-bordered {
border: 1px solid #ddd;
}
.table-bordered>thead>tr>th, .table-bordered>tbody>tr>th, .table-bordered>tfoot>tr>th, .table-bordered>thead>tr>td, .table-bordered>tbody>tr>td, .table-bordered>tfoot>tr>td {
border: 1px solid #ddd;
}
.table-bordered>thead>tr>th, .table-bordered>thead>tr>td {
border-bottom-width: 2px;
}
.table-striped>tbody>tr:nth-of-type(odd) {
background-color: #f9f9f9;
}
.table-hover>tbody>tr:hover {
background-color: #f5f5f5;
}
table col[class*="col-"] {
position: static;
float: none;
display: table-column;
}
table td[class*="col-"], table th[class*="col-"] {
position: static;
float: none;
display: table-cell;
}
.table>thead>tr>td.active, .table>tbody>tr>td.active, .table>tfoot>tr>td.active, .table>thead>tr>th.active, .table>tbody>tr>th.active, .table>tfoot>tr>th.active, .table>thead>tr.active>td, .table>tbody>tr.active>td, .table>tfoot>tr.active>td, .table>thead>tr.active>th, .table>tbody>tr.active>th, .table>tfoot>tr.active>th {
background-color: #f5f5f5;
}
.table-hover>tbody>tr>td.active:hover, .table-hover>tbody>tr>th.active:hover, .table-hover>tbody>tr.active:hover>td, .table-hover>tbody>tr:hover>.active, .table-hover>tbody>tr.active:hover>th {
background-color: #e8e8e8;
}
.table>thead>tr>td.success, .table>tbody>tr>td.success, .table>tfoot>tr>td.success, .table>thead>tr>th.success, .table>tbody>tr>th.success, .table>tfoot>tr>th.success, .table>thead>tr.success>td, .table>tbody>tr.success>td, .table>tfoot>tr.success>td, .table>thead>tr.success>th, .table>tbody>tr.success>th, .table>tfoot>tr.success>th {
background-color: #dff0d8;
}
.table-hover>tbody>tr>td.success:hover, .table-hover>tbody>tr>th.success:hover, .table-hover>tbody>tr.success:hover>td, .table-hover>tbody>tr:hover>.success, .table-hover>tbody>tr.success:hover>th {
background-color: #d0e9c6;
}
.table>thead>tr>td.info, .table>tbody>tr>td.info, .table>tfoot>tr>td.info, .table>thead>tr>th.info, .table>tbody>tr>th.info, .table>tfoot>tr>th.info, .table>thead>tr.info>td, .table>tbody>tr.info>td, .table>tfoot>tr.info>td, .table>thead>tr.info>th, .table>tbody>tr.info>th, .table>tfoot>tr.info>th {
background-color: #d9edf7;
}
.table-hover>tbody>tr>td.info:hover, .table-hover>tbody>tr>th.info:hover, .table-hover>tbody>tr.info:hover>td, .table-hover>tbody>tr:hover>.info, .table-hover>tbody>tr.info:hover>th {
background-color: #c4e3f3;
}
.table>thead>tr>td.warning, .table>tbody>tr>td.warning, .table>tfoot>tr>td.warning, .table>thead>tr>th.warning, .table>tbody>tr>th.warning, .table>tfoot>tr>th.warning, .table>thead>tr.warning>td, .table>tbody>tr.warning>td, .table>tfoot>tr.warning>td, .table>thead>tr.warning>th, .table>tbody>tr.warning>th, .table>tfoot>tr.warning>th {
background-color: #fcf8e3;
}
.table-hover>tbody>tr>td.warning:hover, .table-hover>tbody>tr>th.warning:hover, .table-hover>tbody>tr.warning:hover>td, .table-hover>tbody>tr:hover>.warning, .table-hover>tbody>tr.warning:hover>th {
background-color: #faf2cc;
}
.table>thead>tr>td.danger, .table>tbody>tr>td.danger, .table>tfoot>tr>td.danger, .table>thead>tr>th.danger, .table>tbody>tr>th.danger, .table>tfoot>tr>th.danger, .table>thead>tr.danger>td, .table>tbody>tr.danger>td, .table>tfoot>tr.danger>td, .table>thead>tr.danger>th, .table>tbody>tr.danger>th, .table>tfoot>tr.danger>th {
background-color: #f2dede;
}
.table-hover>tbody>tr>td.danger:hover, .table-hover>tbody>tr>th.danger:hover, .table-hover>tbody>tr.danger:hover>td, .table-hover>tbody>tr:hover>.danger, .table-hover>tbody>tr.danger:hover>th {
background-color: #ebcccc;
}
.table-responsive {
overflow-x: auto;
min-height: 0.01%;
}
# append plugins to the list below, separate entries with commas
# name, description, documentation_folder
#LabJack, Acquire data from UE9 devices, labjack
#NILM, Non-Intrusive Load Monitoring, nilm
#SmartEE, Connect to Smart Plugs, smartee
......@@ -14,6 +14,24 @@ The Wattsworth Project
See <a href="/web">Web</a> for information on the frontend user interface
</div>
Active Plugins
--------------
The following plugins are active on this machine.
Click the name of a plugin to view the documentation.
.. raw:: html
<table class="table">
<thead>
<tr><th>Name</th><th>Description</th></tr>
</thead>
<tbody id="plugins-table">
</tbody>
</table>
.. raw:: html
Installing the Software
-----------------------
......@@ -58,21 +76,6 @@ root partition is on ``/dev/sda2``:
$> sudo tune2fs -o journal_data /dev/sda2
Joule Plugins
--------------
Plugins provide additional joule modules. Links to centrally managed plugins
are listed below:
* Non-Instrusive Load Monitor (NILM)
* LabJack
Documentation
-------------
*Joule*: modular data processing framework
*Web Interface*: frontend interface for interacting with joule modules
.. toctree::
:maxdepth: 2
:caption: Contents:
......@@ -88,3 +91,33 @@ Indices and tables
.. _web: /web
.. _joule: /joule
.. raw:: html
<script type="text/javascript">
//hide the plugins section by default (in case plugins.txt is missing)
$("#active-plugins").hide();
var plugins="";
var nonce=new Date().getTime(); //so we force the browser to get new data
$.ajax({url: `_static/plugins.txt?nonce=${nonce}`, success:
function(result){
plugins = result.split('\n')
.reduce(function(acc,line){
if(line==""||line[0]=="#")
return acc;
acc.push(line.split(',').map(function(x){return x.trim()}));
return acc;
},[])
if(plugins.length>0)
$("#active-plugins").show();
plugins.map(function(plugin){
var link = plugin[2];
var name=`<a href="/${link}">${plugin[0]}</a>`;
var desc = plugin[1];
$("#plugins-table").append(`<tr><td>${name}</td><td>${desc}</td></tr>`)
})
}});
</script>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment