parent
6d504394ef
commit
e71d656d0e
@ -1,7 +1,10 @@
|
||||
internal_saves
|
||||
media
|
||||
*.sage.py
|
||||
venv
|
||||
venv*
|
||||
.idea
|
||||
__pycache__
|
||||
static_old
|
||||
build
|
||||
data
|
||||
*.egg-info
|
||||
|
@ -0,0 +1,8 @@
|
||||
FROM python:3.10.12
|
||||
ADD . /stark-web
|
||||
WORKDIR /stark-web
|
||||
RUN pip install --upgrade pip
|
||||
RUN pip install waitress
|
||||
RUN pip install .
|
||||
|
||||
CMD ["waitress-serve", "--call", "app:app"]
|
@ -0,0 +1,23 @@
|
||||
import re
|
||||
from os import path
|
||||
|
||||
from setuptools import setup, find_packages
|
||||
|
||||
here = path.abspath(path.dirname(__file__))
|
||||
|
||||
# read the version from classla/_version.py
|
||||
VERSION = '0.0.1'
|
||||
|
||||
setup(name='stark-api',
|
||||
version=VERSION,
|
||||
description=u"Stark web application",
|
||||
author='CLARIN.SI',
|
||||
author_email='info@clarin.si',
|
||||
license='Apache 2',
|
||||
packages=find_packages(),
|
||||
install_requires=[
|
||||
'Flask>=3.0.0',
|
||||
'requests>=2.31.0',
|
||||
'stark @ git+https://github.com/clarinsi/STARK@master'
|
||||
],
|
||||
)
|
@ -0,0 +1,52 @@
|
||||
function addOrUpdateUrlParameter(url, key, value) {
|
||||
var urlObject = new URL(url);
|
||||
urlObject.searchParams.set(key, value);
|
||||
return urlObject.href;
|
||||
}
|
||||
function getUrlParameters() {
|
||||
var searchParams = new URLSearchParams(window.location.search);
|
||||
var params = {};
|
||||
|
||||
// Iterate over each parameter and add to the 'params' object
|
||||
searchParams.forEach(function(value, key) {
|
||||
params[key] = value;
|
||||
});
|
||||
|
||||
return params;
|
||||
}
|
||||
|
||||
$(document).ready(function() {
|
||||
var params = getUrlParameters();
|
||||
// Make table rows clickable
|
||||
$(".table-wrapper tbody tr").click(function() {
|
||||
var url = $(this).data("href");
|
||||
if (url) {
|
||||
window.location.href = url;
|
||||
}
|
||||
});
|
||||
$(".th-desc").hide();
|
||||
$(".th-asc").hide();
|
||||
if ('order_by' in params) {
|
||||
if ('order_type' in params && params.order_type == 'desc') {
|
||||
$('th:contains(' + params.order_by + ') .th-desc').show();
|
||||
} else {
|
||||
$('th:contains(' + params.order_by + ') .th-asc').show();
|
||||
}
|
||||
}
|
||||
// Make table rows clickable
|
||||
$(".table-wrapper thead th").click(function(e) {
|
||||
var column_name = $(this).find('span:first').text();
|
||||
|
||||
var newUrl = addOrUpdateUrlParameter(window.location.href, 'order_by', column_name);
|
||||
if ('order_by' in params && 'order_type' in params && params.order_by == column_name && params.order_type == 'desc') {
|
||||
newUrl = addOrUpdateUrlParameter(newUrl, 'order_type', 'asc');
|
||||
} else {
|
||||
newUrl = addOrUpdateUrlParameter(newUrl, 'order_type', 'desc');
|
||||
}
|
||||
|
||||
|
||||
|
||||
// Redirect to the modified URL
|
||||
window.location.href = newUrl;
|
||||
});
|
||||
});
|
@ -0,0 +1,146 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1.0"/>
|
||||
<title>Starter Template - Materialize</title>
|
||||
|
||||
<!-- CSS -->
|
||||
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
|
||||
<link href="/static/css/materialize.css" type="text/css" rel="stylesheet" media="screen,projection"/>
|
||||
<link href="/static/css/nouislider.css" type="text/css" rel="stylesheet" media="screen,projection"/>
|
||||
<link href="/static/css/style.css" type="text/css" rel="stylesheet" media="screen,projection"/>
|
||||
</head>
|
||||
<body>
|
||||
<nav class="grey darken-2" role="navigation">
|
||||
<div class="nav-wrapper container"><a id="logo-container" href="#" class="brand-logo">STARK</a>
|
||||
<!-- <ul class="right hide-on-med-and-down">-->
|
||||
<!-- <li><a href="#">Navbar Link</a></li>-->
|
||||
<!-- </ul>-->
|
||||
|
||||
<!-- <ul id="nav-mobile" class="sidenav">-->
|
||||
<!-- <li><a href="#">Navbar Link</a></li>-->
|
||||
<!-- </ul>-->
|
||||
<!-- <a href="#" data-target="nav-mobile" class="sidenav-trigger"><i class="material-icons">menu</i></a>-->
|
||||
<ul id="nav-mobile" class="right hide-on-med-and-down">
|
||||
<li><a href="/">Processing</a></li>
|
||||
<li><a href="/about">About</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</nav>
|
||||
<div class="section no-pad-bot" id="index-banner">
|
||||
<div class="container">
|
||||
<!-- <br><br>-->
|
||||
<!-- <h1 class="header center orange-text">Starter Template</h1>-->
|
||||
<!-- <div class="row center">-->
|
||||
<!-- <h5 class="header col s12 light">A modern responsive front-end framework based on Material Design</h5>-->
|
||||
<!-- </div>-->
|
||||
<!-- <div class="row center">-->
|
||||
<!-- <a href="http://materializecss.com/getting-started.html" id="download-button" class="btn-large waves-effect waves-light orange">Get Started</a>-->
|
||||
<!-- </div>-->
|
||||
<!-- <br><br>-->
|
||||
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
|
||||
|
||||
<!-- <div class="container">-->
|
||||
<!-- <div class="section">-->
|
||||
|
||||
<!-- <!– Icon Section –>-->
|
||||
<!-- <div class="row">-->
|
||||
<!-- <div class="col s12 m4">-->
|
||||
<!-- <div class="icon-block">-->
|
||||
<!-- <h2 class="center light-blue-text"><i class="material-icons">flash_on</i></h2>-->
|
||||
<!-- <h5 class="center">Speeds up development</h5>-->
|
||||
|
||||
<!-- <p class="light">We did most of the heavy lifting for you to provide a default stylings that incorporate our custom components. Additionally, we refined animations and transitions to provide a smoother experience for developers.</p>-->
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
|
||||
<!-- <div class="col s12 m4">-->
|
||||
<!-- <div class="icon-block">-->
|
||||
<!-- <h2 class="center light-blue-text"><i class="material-icons">group</i></h2>-->
|
||||
<!-- <h5 class="center">User Experience Focused</h5>-->
|
||||
|
||||
<!-- <p class="light">By utilizing elements and principles of Material Design, we were able to create a framework that incorporates components and animations that provide more feedback to users. Additionally, a single underlying responsive system across all platforms allow for a more unified user experience.</p>-->
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
|
||||
<!-- <div class="col s12 m4">-->
|
||||
<!-- <div class="icon-block">-->
|
||||
<!-- <h2 class="center light-blue-text"><i class="material-icons">settings</i></h2>-->
|
||||
<!-- <h5 class="center">Easy to work with</h5>-->
|
||||
|
||||
<!-- <p class="light">We have provided detailed documentation as well as specific code examples to help new users get started. We are also always open to feedback and can answer any questions a user may have about Materialize.</p>-->
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<!-- <br><br>-->
|
||||
<div class="container">
|
||||
<br>
|
||||
<div class="row">
|
||||
<div class="col s12">
|
||||
<form action="{{ url_for('result', result_id=request.view_args['result_id']) }}" method="POST" enctype="multipart/form-data" id="submit-form">
|
||||
<button class="btn waves-effect waves-light btn-large" type="submit" name="action">Download complete results
|
||||
<i class="material-icons right">download</i>
|
||||
</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Your table with many columns -->
|
||||
<div class="table-wrapper">
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
{% for head in head_row %}
|
||||
{% if not head == 'Grew-match URL' %}
|
||||
<th><span>{{ head }} </span><span class="th-desc">▾</span><span class="th-asc">▴</span></th>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for i in range(content['Tree']|length) %}
|
||||
<tr {% if 'Grew-match URL' in content %} class="tr-link" data-href={{ content['Grew-match URL'][i] }} {% endif %}>
|
||||
{% for col in content %}
|
||||
{% if not col == 'Grew-match URL' %}
|
||||
<td>{{ content[col][i] }}</td>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<footer class="page-footer light-blue">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col l6 s12">
|
||||
<h5 class="white-text">Credits</h5>
|
||||
<p class="grey-text text-lighten-4">Add some logos here?</p>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="footer-copyright">
|
||||
<div class="container">
|
||||
Made by <a class="orange-text text-lighten-3" href="http://materializecss.com">Materialize</a>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
|
||||
<!-- Scripts-->
|
||||
<script src="https://code.jquery.com/jquery-2.1.1.min.js"></script>
|
||||
<script src="/static/js/materialize.js"></script>
|
||||
<script src="/static/js/wNumb.js"></script>
|
||||
<script src="/static/js/result.js"></script>
|
||||
</body>
|
||||
</html>
|
Loading…
Reference in new issue