2019-07-04 09:59:52 +00:00
|
|
|
|
<!DOCTYPE html>
|
|
|
|
|
<html lang="en">
|
|
|
|
|
<head>
|
|
|
|
|
<meta charset="UTF-8">
|
|
|
|
|
{% if title %}
|
|
|
|
|
<title>Opaque – {{ title }}</title>
|
|
|
|
|
{% else %}
|
|
|
|
|
<title>Opaque</title>
|
|
|
|
|
{% endif %}
|
|
|
|
|
<link href="{{ url_for('static', filename='images/favicon.png') }}" rel="icon" type="image/png">
|
2019-07-05 09:04:45 +00:00
|
|
|
|
<link type="text/css" rel="stylesheet" href="{{ url_for('static', filename='fonts/material-icons/material-icons.css') }}">
|
2019-07-04 12:59:23 +00:00
|
|
|
|
<link type="text/css" rel="stylesheet" href="{{ url_for('static', filename='css/materialize.min.css') }}" media="screen,projection"/>
|
|
|
|
|
<link type="text/css" rel="stylesheet" href="{{ url_for('static', filename='css/opaque.css') }}" media="screen,projection"/>
|
2019-11-08 11:21:59 +00:00
|
|
|
|
<script src="{{ url_for('static', filename='js/add_job.js') }}"></script>
|
2019-08-29 13:12:08 +00:00
|
|
|
|
<script src="{{ url_for('static', filename='js/jsonpatch.min.js') }}"></script>
|
2019-08-30 11:31:00 +00:00
|
|
|
|
<script src="{{ url_for('static', filename='js/socket.io.js') }}"></script>
|
2019-08-23 13:05:01 +00:00
|
|
|
|
<script src="{{ url_for('static', filename='js/list.js') }}"></script>
|
|
|
|
|
<script src="{{ url_for('static', filename='js/list.utils.js') }}"></script>
|
2019-08-20 09:24:52 +00:00
|
|
|
|
<script src="{{ url_for('static', filename='js/CorpusList.js') }}"></script>
|
|
|
|
|
<script src="{{ url_for('static', filename='js/JobList.js') }}"></script>
|
2019-10-09 14:10:30 +00:00
|
|
|
|
<script src="{{ url_for('static', filename='js/darkreader.js') }}"></script>
|
|
|
|
|
<script>
|
|
|
|
|
{% if current_user.is_dark == True %}
|
|
|
|
|
DarkReader.enable({
|
|
|
|
|
brightness: 100,
|
2019-10-24 11:13:34 +00:00
|
|
|
|
contrast: 100,
|
|
|
|
|
sepia: 0
|
2019-10-09 14:10:30 +00:00
|
|
|
|
});
|
|
|
|
|
{% else %}
|
|
|
|
|
DarkReader.disable();
|
|
|
|
|
{% endif %}
|
|
|
|
|
</script>
|
2019-08-23 13:05:01 +00:00
|
|
|
|
<script>
|
|
|
|
|
var corpora;
|
|
|
|
|
var corporaSubscribers = [];
|
|
|
|
|
var jobs;
|
|
|
|
|
var jobsSubscribers = [];
|
|
|
|
|
var socket = io();
|
|
|
|
|
|
2019-11-07 09:44:02 +00:00
|
|
|
|
socket.emit('subscribe_user_ressources');
|
2019-08-28 15:27:43 +00:00
|
|
|
|
socket.on('init-corpora', function(msg) {
|
2019-08-29 09:37:00 +00:00
|
|
|
|
corpora = JSON.parse(msg);
|
2019-11-07 09:44:02 +00:00
|
|
|
|
for (let subscriber of corporaSubscribers) {subscriber._init(corpora);}
|
2019-08-23 13:05:01 +00:00
|
|
|
|
});
|
2019-08-28 15:27:43 +00:00
|
|
|
|
socket.on('init-jobs', function(msg) {
|
2019-08-29 09:37:00 +00:00
|
|
|
|
jobs = JSON.parse(msg);
|
2019-11-07 09:44:02 +00:00
|
|
|
|
for (let subscriber of jobsSubscribers) {subscriber._init(jobs);}
|
2019-08-23 13:05:01 +00:00
|
|
|
|
});
|
2019-08-29 09:37:00 +00:00
|
|
|
|
socket.on('update-corpora', function(msg) {
|
2019-11-07 09:44:02 +00:00
|
|
|
|
var patch;
|
2019-08-29 13:12:08 +00:00
|
|
|
|
|
|
|
|
|
patch = JSON.parse(msg);
|
2019-08-30 11:31:00 +00:00
|
|
|
|
corpora = jsonpatch.apply_patch(corpora, patch);
|
2019-11-07 09:44:02 +00:00
|
|
|
|
for (let subscriber of corporaSubscribers) {subscriber._update(patch);}
|
2019-08-29 09:37:00 +00:00
|
|
|
|
});
|
|
|
|
|
socket.on('update-jobs', function(msg) {
|
2019-11-07 09:44:02 +00:00
|
|
|
|
var patch;
|
2019-08-29 13:12:08 +00:00
|
|
|
|
|
|
|
|
|
patch = JSON.parse(msg);
|
2019-08-30 11:31:00 +00:00
|
|
|
|
jobs = jsonpatch.apply_patch(jobs, patch);
|
2019-11-07 09:44:02 +00:00
|
|
|
|
for (let subscriber of jobsSubscribers) {subscriber._update(patch);}
|
2019-08-29 09:37:00 +00:00
|
|
|
|
});
|
2019-08-28 15:27:43 +00:00
|
|
|
|
socket.on('message', function(msg) {
|
|
|
|
|
console.log(msg);
|
|
|
|
|
});
|
2019-08-23 13:05:01 +00:00
|
|
|
|
</script>
|
2019-09-18 09:33:06 +00:00
|
|
|
|
<script>
|
|
|
|
|
var foreignCorpora;
|
|
|
|
|
var foreignCorporaSubscribers = [];
|
|
|
|
|
var foreignJobs;
|
|
|
|
|
var foreignJobsSubscribers = [];
|
|
|
|
|
|
|
|
|
|
socket.on('init-foreign-corpora', function(msg) {
|
|
|
|
|
foreignCorpora = JSON.parse(msg);
|
2019-11-07 09:44:02 +00:00
|
|
|
|
for (let subscriber of foreignCorporaSubscribers) {subscriber._init(foreignCorpora);}
|
2019-09-18 09:33:06 +00:00
|
|
|
|
});
|
|
|
|
|
socket.on('init-foreign-jobs', function(msg) {
|
|
|
|
|
foreignJobs = JSON.parse(msg);
|
2019-11-07 09:44:02 +00:00
|
|
|
|
for (let subscriber of foreignJobsSubscribers) {subscriber._init(foreignJobs);}
|
2019-09-18 09:33:06 +00:00
|
|
|
|
});
|
|
|
|
|
socket.on('update-foreign-corpora', function(msg) {
|
2019-11-07 09:44:02 +00:00
|
|
|
|
var patch;
|
2019-09-18 09:33:06 +00:00
|
|
|
|
|
|
|
|
|
patch = JSON.parse(msg);
|
|
|
|
|
foreignCorpora = jsonpatch.apply_patch(foreignCorpora, patch);
|
2019-11-07 09:44:02 +00:00
|
|
|
|
for (let subscriber of foreignCorporaSubscribers) {subscriber._update(patch);}
|
2019-09-18 09:33:06 +00:00
|
|
|
|
});
|
|
|
|
|
socket.on('update-foreign-jobs', function(msg) {
|
2019-11-07 09:44:02 +00:00
|
|
|
|
var patch;
|
2019-09-18 09:33:06 +00:00
|
|
|
|
|
|
|
|
|
patch = JSON.parse(msg);
|
|
|
|
|
foreignJobs = jsonpatch.apply_patch(foreignJobs, patch);
|
2019-11-07 09:44:02 +00:00
|
|
|
|
for (let subscriber of foreignJobsSubscribers) {subscriber._update(patch);}
|
2019-09-18 09:33:06 +00:00
|
|
|
|
});
|
|
|
|
|
</script>
|
2019-07-04 09:59:52 +00:00
|
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
|
|
|
|
|
</head>
|
|
|
|
|
<body>
|
2019-07-05 12:47:35 +00:00
|
|
|
|
<header>
|
2019-07-08 08:07:26 +00:00
|
|
|
|
<div id="nav-notifications-dropdown" class="dropdown-content grey-text text-darken-4">
|
2019-07-05 12:47:35 +00:00
|
|
|
|
<p>Notifications</p>
|
|
|
|
|
</div>
|
2019-07-08 08:07:26 +00:00
|
|
|
|
<ul id="nav-account-dropdown" class="dropdown-content">
|
|
|
|
|
{% if current_user.is_authenticated %}
|
2019-09-23 14:11:01 +00:00
|
|
|
|
<li><a href="{{ url_for('profile.index') }}"><i class="material-icons">settings</i>Settings</a></li>
|
2019-09-10 13:10:16 +00:00
|
|
|
|
<li><a href="{{ url_for('auth.logout') }}"><i class="material-icons">power_settings_new</i>Log out</a></li>
|
2019-07-08 08:07:26 +00:00
|
|
|
|
{% else %}
|
2019-09-10 13:10:16 +00:00
|
|
|
|
<li><a href="{{ url_for('auth.login') }}"><i class="material-icons">person</i>Log in</a></li>
|
|
|
|
|
<li><a href="{{ url_for('auth.register') }}"><i class="material-icons">person_add</i>Register</a></li>
|
2019-07-08 08:07:26 +00:00
|
|
|
|
{% endif %}
|
|
|
|
|
</ul>
|
2019-07-19 13:16:20 +00:00
|
|
|
|
<div class="navbar-fixed">
|
|
|
|
|
<nav>
|
|
|
|
|
<div class="nav-wrapper">
|
2019-09-04 11:51:21 +00:00
|
|
|
|
<a href="{{ url_for('main.index') }}" class="brand-logo center"><i class="material-icons">opacity</i>Opaque</a>
|
2019-07-19 13:16:20 +00:00
|
|
|
|
<a href="#" data-target="slide-out" class="sidenav-trigger"><i class="material-icons">menu</i></a>
|
|
|
|
|
<ul class="right hide-on-med-and-down">
|
2019-08-02 13:15:02 +00:00
|
|
|
|
<li><a id="nav-notifications" class="dropdown-trigger no-autoinit" href="#!" data-target="nav-notifications-dropdown"><i class="material-icons">notifications</i></a></li>
|
2019-09-04 11:51:21 +00:00
|
|
|
|
<li>
|
|
|
|
|
<a id="nav-account" class="dropdown-trigger no-autoinit" href="#!" data-target="nav-account-dropdown">
|
|
|
|
|
{% if current_user.is_authenticated %}
|
|
|
|
|
{{ current_user.username }}<i class="material-icons right">account_circle</i>
|
|
|
|
|
{% else %}
|
|
|
|
|
<i class="material-icons">account_circle</i>
|
|
|
|
|
{% endif %}
|
|
|
|
|
</a>
|
|
|
|
|
</li>
|
2019-07-19 13:16:20 +00:00
|
|
|
|
</ul>
|
|
|
|
|
</div>
|
|
|
|
|
</nav>
|
|
|
|
|
</div>
|
2019-07-05 12:47:35 +00:00
|
|
|
|
|
|
|
|
|
<ul id="slide-out" class="sidenav sidenav-fixed">
|
2019-08-02 11:24:52 +00:00
|
|
|
|
<li><a href="{{ url_for('main.index') }}"><i class="material-icons">opacity</i>Opaque</a></li>
|
2019-09-11 08:00:52 +00:00
|
|
|
|
<li><a href="#"><i class="material-icons">linear_scale</i>Workflow</a></li>
|
2019-08-01 08:33:05 +00:00
|
|
|
|
<li><a href="{{ url_for('main.dashboard') }}"><i class="material-icons">dashboard</i>Dashboard</a></li>
|
2019-07-12 15:21:04 +00:00
|
|
|
|
<li><div class="divider"></div></li>
|
2019-09-04 11:51:21 +00:00
|
|
|
|
<li><a class="subheader">Services</a></li>
|
2019-11-08 11:21:59 +00:00
|
|
|
|
<li><a href="{{ url_for('services.service', service='nlp') }}"><i class="material-icons">format_textdirection_l_to_r</i>NLP</a></li>
|
|
|
|
|
<li><a href="{{ url_for('services.service', service='ocr') }}"><i class="material-icons">find_in_page</i>OCR</a></li>
|
2019-09-04 11:51:21 +00:00
|
|
|
|
{% if current_user.is_administrator() %}
|
|
|
|
|
<li><div class="divider"></div></li>
|
|
|
|
|
<li><a class="subheader">Administration</a></li>
|
|
|
|
|
<li><a href="{{ url_for('admin.for_admins_only') }}"><i class="material-icons">build</i>Administration tools</a></li>
|
2019-07-10 12:36:31 +00:00
|
|
|
|
{% endif %}
|
2019-09-10 13:10:16 +00:00
|
|
|
|
<div class="hide-on-large-only">
|
|
|
|
|
<li><div class="divider"></div></li>
|
|
|
|
|
<li><a class="subheader">Account</a></li>
|
|
|
|
|
{% if current_user.is_authenticated %}
|
2019-09-23 14:11:01 +00:00
|
|
|
|
<li><a href="{{ url_for('profile.index') }}"><i class="material-icons">settings</i>Settings</a></li>
|
2019-09-10 13:10:16 +00:00
|
|
|
|
<li><a href="{{ url_for('auth.logout') }}"><i class="material-icons">power_settings_new</i>Log out</a></li>
|
|
|
|
|
{% else %}
|
|
|
|
|
<li><a href="{{ url_for('auth.login') }}"><i class="material-icons">person</i>Log in</a></li>
|
|
|
|
|
<li><a href="{{ url_for('auth.register') }}"><i class="material-icons">person_add</i>Register</a></li>
|
|
|
|
|
{% endif %}
|
|
|
|
|
</div>
|
2019-07-05 12:47:35 +00:00
|
|
|
|
</ul>
|
|
|
|
|
</header>
|
2019-07-04 09:36:23 +00:00
|
|
|
|
|
2019-07-05 09:04:45 +00:00
|
|
|
|
<main class="grey lighten-5">
|
2019-11-11 14:57:55 +00:00
|
|
|
|
{% block main_block %}{% endblock %}
|
2019-07-04 10:23:09 +00:00
|
|
|
|
</main>
|
2019-07-04 08:40:23 +00:00
|
|
|
|
|
2019-07-05 12:47:35 +00:00
|
|
|
|
<footer class="page-footer">
|
|
|
|
|
<div class="footer-copyright">
|
|
|
|
|
<div class="container">
|
|
|
|
|
© 2019 Bielefeld University
|
|
|
|
|
<a class="grey-text text-lighten-4 right" href="#!">Impress</a>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</footer>
|
2019-07-05 09:04:45 +00:00
|
|
|
|
|
2019-07-04 09:59:52 +00:00
|
|
|
|
<script type="text/javascript" src="{{ url_for('static', filename='js/materialize.min.js') }}"></script>
|
|
|
|
|
<script>
|
|
|
|
|
M.AutoInit();
|
2019-09-12 09:12:59 +00:00
|
|
|
|
M.CharacterCounter.init(document.querySelectorAll('input[data-length][type="text"]'))
|
2019-07-04 12:59:23 +00:00
|
|
|
|
M.Dropdown.init(
|
2019-07-05 09:04:45 +00:00
|
|
|
|
document.getElementById("nav-notifications"),
|
|
|
|
|
{"alignment": "right", "constrainWidth": false, "coverTrigger": false}
|
2019-07-04 12:59:23 +00:00
|
|
|
|
);
|
2019-07-08 08:07:26 +00:00
|
|
|
|
M.Dropdown.init(
|
|
|
|
|
document.getElementById("nav-account"),
|
|
|
|
|
{"alignment": "right", "constrainWidth": false, "coverTrigger": false}
|
|
|
|
|
);
|
2019-07-04 12:59:23 +00:00
|
|
|
|
M.Dropdown.init(
|
2019-08-02 13:15:02 +00:00
|
|
|
|
document.getElementById("new-job"),
|
|
|
|
|
{"coverTrigger": false}
|
2019-07-04 12:59:23 +00:00
|
|
|
|
);
|
2019-11-11 14:57:55 +00:00
|
|
|
|
var loadingModal = document.getElementById("loading-modal");
|
|
|
|
|
console.log(loadingModal);
|
|
|
|
|
M.Modal.init(loadingModal, {"dismissible": false});
|
|
|
|
|
M.Modal.getInstance(loadingModal).open();
|
2019-09-10 14:09:35 +00:00
|
|
|
|
var entry;
|
|
|
|
|
for (entry of document.querySelectorAll("#slide-out a:not(.subheader)")) {
|
|
|
|
|
if (entry.href === window.location.href) {
|
|
|
|
|
entry.parentNode.classList.add("active");
|
|
|
|
|
}
|
|
|
|
|
}
|
2019-07-08 07:05:59 +00:00
|
|
|
|
{% for message in get_flashed_messages() %}
|
|
|
|
|
M.toast({html: '{{ message }}'})
|
|
|
|
|
{% endfor %}
|
2019-07-04 09:59:52 +00:00
|
|
|
|
</script>
|
|
|
|
|
</body>
|
2019-07-04 08:40:23 +00:00
|
|
|
|
</html>
|