Source

brightway2-ui / bw2ui / web / templates / index.html

{% extends "base.html" %}

{% block extrahead %}
<link rel="stylesheet" href="{{ url_for('static', filename="css/index.css") }}" type="text/css" media="screen, projection">
{% endblock %}

{% block body %}
<div class="span-11 colborder">
    <h2>Installed databases</h2>
    <div id="databases-table"></div>
</div>
<div class="span-12 last">
    <p>Data directory is <i>{{ config.udir }}</i></p>
</div>
<div class="span-6">
    <a href="/lca"><button>Calculate LCA</button></a><br>
    <a href="/settings"><button>Change settings</button></a><br>
    <a href="https://brightway2.readthedocs.org/en/latest/"><button>Documentation</button></a>
</div>
<div class="span-6 last">
    <a href="/import/database"><button>Import database</button></a><br>
    <!-- <a href="/export/database"><button>Export database</button></a><br> -->
    <button>Export database</button><br>
    <a href="/import/method"><button>Import LCIA method</button></a>
</div>
<hr>
<h2>Installed LCIA methods</h2>
<div id="methods-table"></div>

<script type="text/javascript">
var methodColumns = [{
    name: "name",
    label: "Name",
    cell: "string",
    editable: false
}, {
    name: "unit",
    label: "Unit",
    cell: "string",
    editable: false
}, {
    name: "num_cfs",
    label: "Number of CFs",
    cell: "integer",
    editable: false
}];

var databasesColumns = [{
    name: "name",
    label: "Name",
    cell: "string",
    editable: false
}, {
    name: "version",
    label: "Version number",
    cell: "integer",
    editable: false
}, {
    name: "number",
    label: "Number of activities",
    cell: "integer",
    editable: false
}];

var methodData = {{ methods|safe }};
var databasesData = {{ databases|safe }};

BackgridTable(methodData, methodColumns, "#methods-table", ['name'], "Filter by name", 20);
BackgridTable(databasesData, databasesColumns, "#databases-table", ['name'], "Filter by name", 10);
</script>
{% endblock %}