Commit 2a68ca5e by Dányi Bence

webui: remove unused templates

parent 332db824
{% load i18n %}
{% get_current_language as LANGUAGE_CODE %}
<div class="boxes">
<div class="contentblock">
<h2>{% trans "Data store" %}</h2>
<ul class="file-list">
<li class="entry small" id="current-location">
<div class="summary">
<div class="sort">
<select data-bind="value: sortBy">
<option value="name">Név szerint</option>
<option value="date">Dátum szerint</option>
<option value="size">Méret szerint</option>
</select>
</div>
<div class="name">
<small>
Jelenlegi hely:
<span data-bind="text: currentPath"></span>
</small>
</div>
<div class="clear"></div>
</div>
</li>
</ul>
<ul class="file-list" id="file-list">
<li class="entry real" data-bind="visible: notInRoot, click: jumpUp">
<div class="summary">
<div class="name filetype-jump-out">..</div>
<div class="clear"></div>
</div>
</li>
<li class="entry small real" data-bind="visible: files().length == 0">
<div class="summary">
<div class="name">{% trans "No files." %}</div>
<div class="clear"></div>
</div>
</li>
<!-- ko foreach: {data:files,afterAdd:fadeIn,beforeRemove:fadeOutFile} -->
<li class="entry real">
<div class="summary" data-bind="click: clickHandler">
<div class="name" data-bind="text: name, attr: {class: getTypeClass, title: originalName}"></div>
<div class="info" data-bind="text: size"></div>
<div class="actions">
<a href="#" data-bind="click: $parent.rename, clickBubble: false">
<img src="/static/icons/pencil.png" alt="{% trans "rename" %}" />
</a>
<a href="#" data-bind="click: $parent.delete, clickBubble: false">
<img src="/static/icons/minus-circle.png" alt="{% trans "remove" %}" />
</a>
<a href="#" data-bind="click: $parent.download, clickBubble: false">
<img src="/static/icons/download-cloud.png" alt="{% trans "download" %}" />
</a>
</div>
<div class="clear"></div>
</div>
<div class="details">
<div class="details-container">
<ul>
<li class="date">
{% trans "Last modification" %}:
<small class="value" data-bind="text: mTime"></small>
</li>
<li class="filetype-text">
{% trans "Type" %}:
<span class="value" data-bind="text: type"></span>
</li>
</ul>
</div>
</div>
</li>
<!-- /ko --> </ul>
<ul class="file-list">
<li class="entry small-row">
<div class="summary" id="new-folder">
<div class="name filetype-new-folder">{% trans "Create folder" %}</div>
<div id="new-folder-form">
<input type="text" placeholder="{% trans "Name of new folder" %}" data-bind="value: newFolderName, click: function(m,e){console.log(arguments); e.preventDefault(); e.stopPropagation(); return false;}" />
<input type="submit" data-bind="click: newFolder, clickBubble: false" value="Létrehozás" />
</div>
<div class="clear"></div>
</div>
</li>
<li class="file-upload entry small-row">
<div class="summary" data-bind="click: getUploadURL">
<div class="quota">
<div id="upload-progress" class="used" style="background-color: rgba(0,255,0,0.2);" data-bind="style: {width: uploadProgress}"></div>
</div>
<div class="name filetype-up">{% trans "File upload" %}</div>
<div class="clear"></div>
</div>
<div class="details">
<div class="container">
<div id="upload-zone" class="upload-zone">
<p>{% trans "Drag and drop files here to start uploading." %}</p>
<p>
{% trans 'You can also use the <a href="#" id="old-upload">the traditional upload form</a>.' %}
</p>
<p>{% trans 'Upload limit is 1GB per file!' %}</p>
</div>
<div style="display: none" id="upload-progress-text" class="upload-zone"></div>
<div style="display: none" id="upload-error" class="upload-zone">
<p id="upload-error-size" style="display: none">{% trans "Error: File is bigger than 1GB!" %}</p>
<p id="upload-error-server" style="display: none">{% trans "Error: Upload server is not available!" %}</p>
<p id="upload-error-overwrite" style="display: none">{% trans "Error: File already exists!" %}</p>
<p id="upload-error-unknown" style="display: none"></p>
</div>
<div style="display: none" class="upload-zone" id="old-upload-form">
<form action="/" method="POST" data-bind="attr: {action: uploadURL}" enctype="multipart/form-data">
<input type="file" name="data" />
<input type="submit" value="Feltöltés" />
</form>
</div>
</div>
</div>
</li>
<li class="entry small">
<div class="summary">
<div class="quota">
<div class="used" style="background-color: rgba(0,255,0,0.2)" data-bind="style: {width: quota.usedBar}"></div>
<div class="softLimit" data-bind="style: {left: quota.softPos}"></div>
</div>
<div class="name">
{% trans "File quota" %}: <abbr data-bind="text: quota.used" title="{% trans "Used space" %}"></abbr>
/ <abbr data-bind="text: quota.soft" title="{% trans "soft limit" %}"></abbr>
(
<abbr title="{% trans "hard limit" %}" data-bind="text: quota.hard"></abbr>
)
</div>
<div class="clear"></div>
</div>
</li>
</ul>
</div>
</div>
{% load i18n %}
{% get_current_language as LANGUAGE_CODE %}
<div class="boxes" id="groups">
<div class="contentblock">
<h2>{% trans "My Groups" %}</h2>
<div class="content">
<ul class="vm-list entry-list">
{% if groups %}
{% for group in groups %}
<li class="entry">
<div class="summary">
<div class="name">{{ group.name }}</div>
<div class="actions">
<a href="#" class="delete" data-id="{{group.id}}" data-name="{{group.name}}">
<img src="/static/icons/minus-circle.png" alt="{% trans "Delete" %}" />
</a>
</div>
<div class="clear"></div>
</div>
<div class="details">
<ul>
<li>
{% trans "Course" %}:
<span class="value">
{% if group.course %}
{{group.course.name}}
{% else %}
{% trans "Not assigned" %}
{% endif %}
</span>
</li>
<li>
{% trans "Semester" %}:
<span class="value">{{group.semester.name}}</span>
</li>
<li>
{% trans "Owner(s)" %}:
<span class="value">{{group.owner_list}}</span>
</li>
<li>
{% trans "Member count" %}:
<span class="value">{{group.member_count}}</span>
</li>
<li>
&nbsp;
<span class="value">
<a href="/group/show/{{group.id}}">{% trans "More details" %}</a>
</span>
</li>
</ul>
</div>
</li>
{% endfor %}
{% else %}
<div class="tooltip">
<div class="container">
<p>{% trans "You have no groups." %}</p>
<p>
{% trans "Create a new one, and add your students to the new group." %}
</p>
<div class="tail"></div>
</div>
</div>
{% endif %}
<li class="entry" id="new-group">
<div class="summary">
<div class="name">{% trans "Create new group" %}</div>
<div class="clear"></div>
</div>
<div id="new-group-wizard" style="display: none">
<form action="/group/new/" method="POST" class="wizard">
{% csrf_token %}
<h3>{% trans "Create new group" %}</h3>
<ul>
<li>
<label for="new-group-name">{% trans "Group name" %}</label>
<input type="text" name="name" id="new-group-name" />
</li>
<li>
<label for="new-group-semester">{% trans "Semester" %}</label>
<select name="semester" id="new-group-semester">
{% for semester in semesters %}
<option value="{{semester.id}}">{{semester.name}}</option>
{% endfor %}
</select>
</li>
<li>
<label for="new-group-members">{% trans "Members" %}</label>
<textarea name="members" placeholder="{% trans 'Student NEPTUN codes, one per line' %}" id="new-group-members"></textarea>
<div class="clear"></div>
</li>
</ul>
<nav>
<input type="reset" class="prev" value="{% trans "Cancel" %}" />
<input type="submit" class="next" value="{% trans "Done" %}" />
<div class="clear"></div>
</nav>
</form>
</div>
</li>
</ul>
</div>
</div>
</div>
{% load i18n %}
{% load l10n %}
{% get_current_language as LANGUAGE_CODE %}
<div class="contentblock" id="template">
<h2>{% trans "Templates" %}</h2>
<ul class="vm-list entry-list">
{% for t in mytemplates %}
<li class="entry" id="t{{t.id }}">
<div class="summary {% if t.state == 'NEW' or t.state == 'SAVING'%}unfinished{% endif %}">
<div class="name">{{t.name}}</div>
<div class="status">{{t.state}}</div>
<div class="actions">
{% if t.state == 'READY' %}
<a href="#" class="try-template-button" data-id="{{t.id}}" title="{% trans "Try" %}">
<img src="/static/icons/control.png" alt="{% trans "Start" %}"/>
</a>
<a href="#" title="{% trans "Edit" %}">
<img src="/static/icons/pencil.png" alt="{% trans "Edit" %}" />
</a>
<a href="#" class="template-share" data-id="{{t.id}}" data-gid="{{group.id}}" title="{% trans "Share" %}">
<img src="/static/icons/user-share.png" alt="{% trans "Share" %}" />
</a>
{% endif %}
<a href="#" class="delete-template-button" data-id="{{ t.id }}" data-name="{{ t.name }}" title="{% trans "Remove" %}">
<img src="/static/icons/minus-circle.png" alt="{% trans "Remove" %}" />
</a>
</div>
<div class="clear"></div>
{% if t.myshares %}
<ul class="shares">
{% for i in t.myshares %}
<li>
<div class="quota">
<div class="used" style="width: {{ i.get_instance_pc|unlocalize }}%"></div>
</div>
<form action="/vm/unshare/{{i.id}}/" method="post">
<span title="{{i.name}}">{{i.name|truncatechars:20}}</span>
({{i.get_running}}/{{i.instance_limit}})
{% csrf_token %}
<input class="unshare" type="submit" value="{% trans "Delete" %}" style="float: right"/>
</form>
<div class="clear"></div>
</li>
{% endfor %}
</ul>
{% endif %}
</div>
<div class="details">
<ul>
<li class="name">
{% trans "System" %}:
<span class="value">{{t.system}}</span>
<div class="clear"></div>
</li>
<li class="type">
{% trans "Size" %}:
<span class="value">
{{t.instance_type}}:
<span class="cpu">{{t.instance_type.CPU}}</span>
<span class="memory">{{t.instance_type.RAM}}</span>
<span class="credit">{{t.instance_type.credit}}</span>
</span>
</li>
<li class="description">
{% trans "Description" %}:
<span class="value">{{t.description}}</span>
<div class="clear"></div>
</li>
<li class="date" >
{% trans "Created at" %}:
<span class="value">{{t.created_at}} ({{t.owner.get_profile}})</span>
<div class="clear"></div>
</li>
<li class="count">
{% trans "Running instances" %}:
<span class="value">{{ t.running_instances }}</span>
</li>
</ul>
</div>
</li>
{% endfor %}
{% if not mytemplates and not group %}
<div class="tooltip">
<div class="container">
<p>{% trans "You have no own templates." %}</p>
<p>
{% trans "Create a new one, and share it with your students. Or you can also use a common one." %}
</p>
<div class="tail"></div>
</div>
</div>
{% endif %}
{% if not group %}
<li id="new-template-button" class="entry new">
<div class="summary">
<div class="name">Új Sablon</div>
<div class="clear"></div>
</div>
</li>
{% endif %}
{% if publictemplates %}
{% for t in publictemplates %}
<li class="entry" id="t{{t.id }}">
<div class="summary public-template">
<div class="name">
{{t.name}}
<img src="/static/icons/lock-small.png" alt="{% trans "locked" %}"
title="{% trans "This is a shared template." %}" />
</div>
<div class="status">{{t.state}}</div>
<div class="actions">
{% if t.state == 'READY' %}
<a href="#" class="try-template-button" data-id="{{t.id}}" title="{% trans "Try" %}">
<img src="/static/icons/control.png" alt="{% trans "Start" %}"/>
</a>
<a href="#" class="template-share" data-id="{{t.id}}" data-gid="{{group.id}}" title="{% trans "Share" %}">
<img src="/static/icons/user-share.png" alt="{% trans "Share" %}" />
</a>
{% endif %}
</div>
<div class="clear"></div>
{% if t.myshares %}
<ul class="shares">
{% for i in t.myshares %}
<li>
<div class="quota">
<div class="used" style="width: {{ i.get_instance_pc|unlocalize }}%"></div>
</div>
<form action="/vm/unshare/{{i.id}}/" method="post">
<span title="{{i.name}}">{{i.name|truncatechars:20}}</span>
({{i.get_running}}/{{i.instance_limit}})
{% csrf_token %}
<input type="submit" value="{% trans "Delete" %}" style="float: right"/>
</form>
<div class="clear"></div>
</li>
{% endfor %}
</ul>
{% endif %}
</div>
<div class="details">
<ul>
<li class="name">
{% trans "System" %}:
<span class="value">{{t.system}}</span>
<div class="clear"></div>
</li>
<li class="type">
{% trans "Size" %}:
<span class="value">
{{t.instance_type}}:
<span class="cpu">{{t.instance_type.CPU}}</span>
<span class="memory">{{t.instance_type.RAM}}</span>
<span class="credit">{{t.instance_type.credit}}</span>
</span>
</li>
<li class="description">
{% trans "Description" %}:
<span class="value">{{t.description}}</span>
<div class="clear"></div>
</li>
<li class="date" >
{% trans "Created at" %}:
<span class="value">{{t.created_at}} ({{t.owner.get_profile}})</span>
<div class="clear"></div>
</li>
<li class="count">
{% trans "Running instances" %}:
<span class="value">{{t.running_instances}}</span>
</li>
</ul>
</div>
</li>
{% endfor %}
{% endif %}
<li class="entry small">
<div class="summary">
<div class="quota">
<div class="used" style="background-color: rgba(0,255,0,0.2); width: {{userdetails.get_share_pc|unlocalize}}%"></div>
</div>
<div class="name">
{% blocktrans with used=userdetails.get_weighted_share_count all=userdetails.share_quota %}Share quota: {{used}}/{{all}}{% endblocktrans %}
</div>
<div class="clear"></div>
</div>
</li>
</ul>
</div>
{% load i18n %}
{% get_current_language as LANGUAGE_CODE %}
{% if instances %}
{% for i in instances %}
<li class="wm {% if id == i.id %}opened{% endif %}">
<div class="summary {% if id == i.id %}selected-summary{% endif %} {% if i.template.state == "NEW" %}unfinished{% endif %}">
<div class="name {% if i.state == 'ACTIVE' %}wm-on{% else %}wm-off{% endif %}">{{i.name|truncatechars:20}}</div>
<div class="status">{{i.state}}</div>
<div class="actions">
{% if i.waiting %}
<img src="/static/load.gif" />
{% elif i.state == 'ACTIVE' %}
<a href="{{i.get_connect_uri}}" data-id="{{ i.id }}" class="connect-vm-button" title="{% trans "Connect" %}">
<img src="/static/icons/plug.png" alt="{% trans "Connect" %}" />
</a>
<a href="#" class="stop-vm-button" data-name="{{ i.name}}" data-id="{{ i.id }}" title="{% trans "Pause" %}">
<img src="/static/icons/control-pause.png" alt="{% trans "Pause" %}" />
</a>
<a href="#" class="delete-vm-button" data-name="{{ i.name}}" data-id="{{ i.id }}" title="{% trans "Delete" %}">
<img src="/static/icons/minus-circle.png" alt="{% trans "Delete" %}" />
</a>
<a href="#" class="restart-vm-button" data-name="{{ i.name}}" data-id="{{ i.id }}" title="{% trans "Restart" %}">
<img src="/static/icons/arrow-circle-double.png" alt="↺" />
</a>
{% elif i.state == 'PENDING' %}
<img src="/static/load.gif" />
{% trans "starting…" %}
{% elif i.state == 'STOPPED' %}
<a href="#" class="resume-vm-button" data-name="{{ i.name}}" data-id="{{ i.id }}" title="{% trans "Resume" %}">
<img src="/static/icons/control.png" alt="{% trans "Resume" %}" />
</a>
<a href="#" class="delete-vm-button" data-name="{{ i.name}}" data-id="{{ i.id }}" title="{% trans "Delete" %}">
<img src="/static/icons/minus-circle.png" alt="{% trans "Delete" %}" />
</a>
{% elif i.state == 'FAILED' %}
<a href="#" class="delete-vm-button" data-name="{{ i.name}}" data-id="{{ i.id }}" title="{% trans "Delete" %}">
<img src="/static/icons/minus-circle.png" alt="{% trans "Delete" %}" />
</a>
{% endif %}
</div>
<div class="clear"></div>
</div>
<div class="details">
<div class="details-container">
<ul>
<li class="name">
{% trans "Hostname" %}:
<span class="value">{{i.name}}</span>
<div class="clear"></div>
</li>
<li class="os-{{i.template.os_type}}">
{% trans "System" %}:
<span class="value">{{i.template.system}}</span>
<div class="clear"></div>
</li>
<li class="template">
{% trans "Type" %}:
<span class="value">{{i.share.type}}</span>
<div class="clear"></div>
</li>
<li class="template">
{% trans "Share" %}:
<span class="value">{{i.share.name}}</span>
<div class="clear"></div>
</li>
<li class="template">
{% trans "Template" %}:
<span class="value">{{i.template.name}}</span>
<div class="clear"></div>
</li>
<li class="type">
{% trans "Size" %}:
<span class="value">
{{i.template.instance_type.name}}:
<span class="cpu">{{i.template.instance_type.CPU}}</span>
<span class="memory">{{i.template.instance_type.RAM}}</span>
<span class="credit">{{i.template.instance_type.credit}}</span>
</span>
</li>
<li class="date">
{% trans "Created at" %}:
<span class="value">{{i.created_at}}</span>
</li>
{% if i.time_of_suspend %}
<li class="date">
{% trans "time of suspend"|capfirst %}:
<span class="value"> <abbr title="{{i.time_of_suspend}}">{{i.time_of_suspend|timeuntil}}</abbr>
<a href="#" class="renew-vm-button renew-suspend-vm-button" data-id="{{ i.id }}" title="{% trans "Renew suspend time" %}">
<img src="/static/icons/control-double.png" alt="{% trans "Renew suspend time" %}" />
</a>
</span>
</li>
{% endif %}
{% if i.time_of_delete %}
<li class="date">
{% trans "time of delete"|capfirst %}:
<span class="value"> <abbr title="{{i.time_of_delete}}">{{i.time_of_delete|timeuntil}}</abbr>
<a href="#" class="renew-vm-button renew-delete-vm-button" data-id="{{ i.id }}" title="{% trans "Renew deletion time" %}">
<img src="/static/icons/control-double.png" alt="{% trans "Renew deletion time" %}" />
</a>
</span>
</li>
{% endif %}
<li>
&nbsp;
<span class="value">
<a href="/vm/show/{{i.id}}/" title="{{i.name}}">{% trans "More details" %}</a>
</span>
</li>
</ul>
</div>
</div>
</li>
{% endfor %}
{% else %}
<div class="tooltip">
<div class="container">
<p>{% trans "You have not started any machines yet." %}</p>
<p>
{% trans "Choose a template, and you can use the system in a minute." %}
</p>
<div class="tail"></div>
</div>
</div>
{% endif %}
{% extends "base.html" %}
{% load i18n %}
{% block content %}
<div class="boxes">
<div class="contentblock" id="state">
<h2>{% trans "Remove machine" %}</h2>
<div class="content">
<form action="{% url vm_delete i.id %}" method="post">
{% csrf_token %}
<p>
{% trans "Are you sure?" %}
<input type="submit" value="{% trans "Remove" %}" />
</p>
</form>
</div>
</div>
</div>
{% endblock %}
{% extends "base.html" %}
{% load i18n %}
{% block content %}
<div class="boxes">
<div class="contentblock" id="project_closed">
<h2>Bejelentkezés</h2>
<div class="content">
<p>
A tesztüzem alatt a felhasználók belépése és azonosítása "önbevallásos" alapon működik (a jövőben
<a href="http://login.bme.hu/">EduID-s</a>
bejelentkezésre lesz lehetőség):
</p>
<form action="/login/" method="POST">
{% csrf_token %}
<p>
<label>
NEPTUN-kód:
<input maxlength="8" size="8" type="text" name="neptun" required pattern="[A-Z][A-Z0-9]{5}" onkeyup="javascript:this.value=this.value.toUpperCase();"/>
</label>
</p>
<p>
<label>
Jelszó:
<input maxlength="8" size="8" type="password" name="pw" required />
</label>
</p>
<p>
<input type="hidden" name="next" value="{{nex}}"/>
<input type="submit" value="Bejelentkezés"/>
</p>
</form>
</div>
</div>
</div>
</div>
{% endblock %}
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