Licenseserver
This commit is contained in:
@@ -0,0 +1,64 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
{% block title %}<title>Gabriel's DRM</title>{% endblock %}
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.5.3/dist/css/bootstrap.min.css" integrity="sha384-TX8t27EcRE3e/ihU7zmQxVncDAy5uIKz4rEkgIXeMed4M0jlfIDPvg6uqKI2xXr2" crossorigin="anonymous">
|
||||
{% load static %}
|
||||
<link rel="stylesheet" href="{% static 'css/styles.css' %}">
|
||||
<link rel="shortcut icon" type="image/png" href="{% static 'favicon.png' %}"/>
|
||||
<style>
|
||||
{% load static %}
|
||||
body {
|
||||
background-image: url('{% static "images/wall.jpg" %}');
|
||||
color: black;
|
||||
}
|
||||
.col-sm-5{
|
||||
margin-top: 20px;
|
||||
border-radius: 25px;
|
||||
padding: 20px;
|
||||
box-shadow: 0 10px 20px rgba(0, 0, 0, .7);
|
||||
backdrop-filter: blur(6px);
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-sm-2">
|
||||
{% block sidebar %}
|
||||
<ul class="sidebar-nav">
|
||||
<li><a href="{% url 'index' %}">Home</a></li>
|
||||
{% if user.is_authenticated %}
|
||||
<li> Username: </li>
|
||||
<li id="username">{{ user.get_username }}</li>
|
||||
<li> Folder ID: {{ user.folderinfo }}</li>
|
||||
<li><a href="{% url 'create-license' user.folderinfo.id %}">Create License</a></li>
|
||||
<li><a href="{% url 'given-licenses' %}">Given Licenses</a></li>
|
||||
<li><a href="{% url 'my-licenses' %}">My Licenses</a></li>
|
||||
<li><a href="{% url 'logout'%}?next={{request.path}}">Logout</a></li>
|
||||
{% else %}
|
||||
<li><a href="{% url 'login'%}?next={{request.path}}">Login</a></li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
{% endblock %}
|
||||
</div>
|
||||
<div class="col-sm-5">{% block content %}{% endblock %}</div>
|
||||
{% if "license/show" in request.path %}
|
||||
<div class="col-sm-5" style="visibility: hidden" id="license_content">
|
||||
<div class="row">
|
||||
<div class="col-sm-3">
|
||||
<div id="part_buttons"></div>
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<div id="content_parts"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
<script src="{% static 'frontend/main.js' %}"></script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,13 @@
|
||||
{% extends "base_generic.html" %}
|
||||
|
||||
{% block content %}
|
||||
<h1>Creating Process...</h1>
|
||||
<form id="application" action="" method="post">
|
||||
{% csrf_token %}
|
||||
<table>
|
||||
{{ form.as_p }}
|
||||
</table>
|
||||
<input type="submit" style="margin: 10px" value="Submit" id="submit_button_license"/>
|
||||
</form>
|
||||
<div id="create_available"/>
|
||||
{% endblock %}
|
||||
@@ -0,0 +1,76 @@
|
||||
{% extends "base_generic.html" %}
|
||||
|
||||
{% block content %}
|
||||
{% if "create" in request.path %}
|
||||
{% if serversign %}
|
||||
<h1>Licensezertificate now:</h1>
|
||||
{% else %}
|
||||
<h1>License now:</h1>
|
||||
{% endif %}
|
||||
{% else %}
|
||||
{% if serversign %}
|
||||
<h1>Licensezertificate:</h1>
|
||||
{% else %}
|
||||
<h1>License:</h1>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
<div class="topic" > Patient: </div>
|
||||
<div class="content" id="id_patient">{{patient}}</div>
|
||||
<div class="topic"> Justified: </div>
|
||||
<div class="content" id="id_justified">{{justified}}</div>
|
||||
<div class="topic"> License Creator: </div>
|
||||
<div class="content" id="id_license_creator">{{license_creator}}</div>
|
||||
<div class="topic"> Expiration date: </div>
|
||||
<div class="content" id="id_exp_date">{{exp_date}}</div>
|
||||
<div class="topic"> Permission: </div>
|
||||
<div class="content" id="id_permission">{{permission}}</div>
|
||||
<div class="topic"> Folder Parts: </div>
|
||||
<div class="content" id="id_folder_parts">{{folderparts}}</div>
|
||||
<div class="topic"> Signature: </div>
|
||||
<div class="content" id="id_signature">
|
||||
{{signature.0}}
|
||||
{{signature.1}}
|
||||
{{signature.2}}
|
||||
{{signature.3}}
|
||||
</div>
|
||||
<div class="topic">
|
||||
{% if new_folder %}
|
||||
New Content Key:
|
||||
{% else %}
|
||||
Content Key:
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="content" id="id_content_key">
|
||||
{{key_split.0}}
|
||||
{{key_split.1}}
|
||||
{{key_split.2}}
|
||||
{{key_split.3}}
|
||||
</div>
|
||||
{% if serversign %}
|
||||
<div class="topic">
|
||||
Licenseserver signature:
|
||||
</div>
|
||||
<div class="content" id="licenseserver_sign">
|
||||
{{serversign.0}}
|
||||
{{serversign.1}}
|
||||
{{serversign.2}}
|
||||
{{serversign.3}}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if "given" in request.path %}
|
||||
<a href="{% url 'delete_license' %}"><button type="button" id="delete">Delete it</button></a>
|
||||
{% elif "own" in request.path %}
|
||||
<div id="use_license"></div>
|
||||
{% else %}
|
||||
{% if new_folder == True %}
|
||||
|
||||
<div id="create_patientfolder"></div>
|
||||
{% else %}
|
||||
<div id="call_api_button"></div>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% if "show" in request.path %}
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
{% extends "base_generic.html" %}
|
||||
|
||||
{% block content %}
|
||||
<h1>Licenses</h1>
|
||||
{% if license_list %}
|
||||
<ul>
|
||||
{% for license in license_list %}
|
||||
<li>
|
||||
{% if "givenlicenses" in request.path %}
|
||||
<a href="{% url 'license-detail-given' license.pk %}">{{ license.patient }}</a> ({{license.justified}})
|
||||
{% else %}
|
||||
<a href="{% url 'license-detail-own' license.pk %}">{{ license.patient }}</a> ({{license.justified}})
|
||||
{% endif %}
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% else %}
|
||||
<p>There are no Licenses.</p>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
@@ -0,0 +1,14 @@
|
||||
{% extends "base_generic.html" %}
|
||||
{% block title %}
|
||||
<title>Gabriel's DRM</title>
|
||||
{% endblock %}
|
||||
{% block content %}
|
||||
<h1>Local Health View</h1>
|
||||
<p>Welcome to <em>Gabriel Kaufmann's </em>DRM System!</p>
|
||||
<h2>Dynamic content</h2>
|
||||
<p>The System has the following record counts:</p>
|
||||
<ul>
|
||||
<li><strong>User: </strong> {{ num_user }}</li>
|
||||
<li><strong>Licenses:</strong> {{ num_licenses }}</li>
|
||||
</ul>
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user