Commit a427fab6 by Őry Máté

*: remove crlf line endings

parent a5871282
This source diff could not be displayed because it is too large. You can view the blob instead.
var cloud = (function(cloud) { var cloud = (function(cloud) {
function getCookie(name) { function getCookie(name) {
var cookieValue = null; var cookieValue = null;
if(document.cookie && document.cookie != '') { if(document.cookie && document.cookie != '') {
var cookies = document.cookie.split(';'); var cookies = document.cookie.split(';');
for(var i = 0; i < cookies.length; i++) { for(var i = 0; i < cookies.length; i++) {
var cookie = jQuery.trim(cookies[i]); var cookie = jQuery.trim(cookies[i]);
if(cookie.substring(0, name.length + 1) == (name + '=')) { if(cookie.substring(0, name.length + 1) == (name + '=')) {
cookieValue = decodeURIComponent(cookie.substring(name.length + 1)); cookieValue = decodeURIComponent(cookie.substring(name.length + 1));
break; break;
} }
} }
} }
return cookieValue; return cookieValue;
} }
var csrftoken = getCookie('csrftoken'); var csrftoken = getCookie('csrftoken');
function csrfSafeMethod(method) { function csrfSafeMethod(method) {
return(/^(GET|HEAD|OPTIONS|TRACE)$/.test(method)); return(/^(GET|HEAD|OPTIONS|TRACE)$/.test(method));
} }
$.ajaxSetup({ $.ajaxSetup({
crossDomain: false, crossDomain: false,
beforeSend: function(xhr, settings) { beforeSend: function(xhr, settings) {
if(!csrfSafeMethod(settings.type)) { if(!csrfSafeMethod(settings.type)) {
xhr.setRequestHeader("X-CSRFToken", csrftoken); xhr.setRequestHeader("X-CSRFToken", csrftoken);
} }
} }
}); });
/** /**
* Convert bytes to human readable format * Convert bytes to human readable format
*/ */
cloud.convert = function(n, skip, precision) { cloud.convert = function(n, skip, precision) {
skip = skip | 0; skip = skip | 0;
precision = precision | 2; precision = precision | 2;
var suffix = 'B KB MB GB'.split(' '); var suffix = 'B KB MB GB'.split(' ');
for(var i = skip; n > 1024; i++) { for(var i = skip; n > 1024; i++) {
n /= 1024; n /= 1024;
} }
return n.toFixed(precision) + ' ' + suffix[i]; return n.toFixed(precision) + ' ' + suffix[i];
} }
/** /**
* Returns throttled function * Returns throttled function
*/ */
cloud.throttle = function(f) { cloud.throttle = function(f) {
var disabled = false; var disabled = false;
return function() { return function() {
if(disabled) { if(disabled) {
return return
}; };
disabled = true; disabled = true;
setTimeout(function() { setTimeout(function() {
disabled = false; disabled = false;
}, 700); }, 700);
f.apply(this, arguments); f.apply(this, arguments);
} }
} }
/** /**
* Delay the function call for `f` until `g` evaluates true * Delay the function call for `f` until `g` evaluates true
* Default check interval is 1 sec * Default check interval is 1 sec
*/ */
cloud.delayUntil = function(f, g, timeout) { cloud.delayUntil = function(f, g, timeout) {
var timeout = timeout || 1000; var timeout = timeout || 1000;
function check() { function check() {
var o = arguments; var o = arguments;
if(!g()) { if(!g()) {
setTimeout(function() { setTimeout(function() {
check.apply(null, o) check.apply(null, o)
}, timeout); }, timeout);
return; return;
} }
f.apply(null, o); f.apply(null, o);
} }
return function() { return function() {
check.apply(null, arguments); check.apply(null, arguments);
} }
} }
return cloud; return cloud;
})(cloud || {}); })(cloud || {});
#header { #header {
height:80px; height:80px;
background-color:#072c61; background-color:#072c61;
background-image:url(/static/image/bme_feher2.png); background-image:url(/static/image/bme_feher2.png);
background-repeat:no-repeat; background-repeat:no-repeat;
background-position:20px 18px; background-position:20px 18px;
border-bottom:3px solid #0B4599; border-bottom:3px solid #0B4599;
box-shadow:0 0 30px rgba(0,0,0,0.4); box-shadow:0 0 30px rgba(0,0,0,0.4);
margin:0; margin:0;
padding:0 0 0 200px; padding:0 0 0 200px;
h1 { h1 {
font-size:2em; font-size:2em;
line-height:80px; line-height:80px;
float:left; float:left;
margin:0; margin:0;
padding:0 1em; padding:0 1em;
a { a {
color: #fff; color: #fff;
text-decoration: none; text-decoration: none;
} }
} }
} }
#loginblock { #loginblock {
position:absolute; position:absolute;
right:0; right:0;
top:0; top:0;
background-color:#000; background-color:#000;
background-image:url(/static/image/hexabar.png); background-image:url(/static/image/hexabar.png);
background-position:center center; background-position:center center;
border-radius:0 0 0 10px; border-radius:0 0 0 10px;
color:#fff; color:#fff;
font-weight:700; font-weight:700;
margin:0; margin:0;
padding:7px; padding:7px;
a { a {
color: #fff; color: #fff;
text-decoration: underline; text-decoration: underline;
&:hover { &:hover {
color: #aaa; color: #aaa;
} }
} }
} }
@import "base"; @import "base";
@import "head"; @import "head";
@import "box"; @import "box";
@import "wizard"; @import "wizard";
* { * {
margin:0;padding:0; margin:0;padding:0;
} }
.clear { .clear {
clear: both; clear: both;
} }
abbr { abbr {
border-bottom: 1px dotted #666; border-bottom: 1px dotted #666;
} }
a:link,a:visited { a:link,a:visited {
color:black; color:black;
} }
#modal{ #modal{
top: 0; top: 0;
position: absolute; position: absolute;
width: 100%; width: 100%;
height: 100%; height: 100%;
z-index: 999; z-index: 999;
} }
#shadow{ #shadow{
position: fixed; position: fixed;
height: 100%; height: 100%;
width: 100%; width: 100%;
background-color: rgba(0,0,0,0.6); background-color: rgba(0,0,0,0.6);
} }
#modal-container{ #modal-container{
min-width: 500px; min-width: 500px;
position: fixed; position: fixed;
left:50%; left:50%;
top:100px; top:100px;
margin-left: -270px; margin-left: -270px;
margin-top: 0; margin-top: 0;
min-height: 50px; min-height: 50px;
background-color: #fff; background-color: #fff;
border-radius: 4px; border-radius: 4px;
padding: 20px; padding: 20px;
box-shadow: 0 0 30px rgba(0,0,0,0.4); box-shadow: 0 0 30px rgba(0,0,0,0.4);
border: 1px solid #333; border: 1px solid #333;
max-height: 60%; max-height: 60%;
overflow: auto; overflow: auto;
.container{ .container{
max-height: 400px; max-height: 400px;
overflow: auto; overflow: auto;
border-radius: 2px; border-radius: 2px;
border: 1px solid #888; border: 1px solid #888;
background-color: #ccc; background-color: #ccc;
} }
ul{ ul{
list-style: none; list-style: none;
li:first-child .summary { li:first-child .summary {
border: none; border: none;
} }
} }
} }
.wizard{ .wizard{
li{ li{
border-bottom: 1px dotted #999; border-bottom: 1px dotted #999;
} }
label{ label{
display: inline-block; display: inline-block;
padding: 3px; padding: 3px;
margin: 10px 5px; margin: 10px 5px;
} }
h2{ h2{
margin: 10px 0; margin: 10px 0;
} }
.progress{ .progress{
text-align: center; text-align: center;
position: relative; position: relative;
width: 100%; width: 100%;
height: 15px; height: 15px;
.bar{ .bar{
height: 20px; height: 20px;
background-color: rgb(102, 196, 0); background-color: rgb(102, 196, 0);
border-right: 1px solid rgb(70, 134, 0); border-right: 1px solid rgb(70, 134, 0);
} }
.bar-container{ .bar-container{
border: 1px solid #666; border: 1px solid #666;
box-shadow: 0 0 20px rgba(0,0,0,0.2); box-shadow: 0 0 20px rgba(0,0,0,0.2);
border-radius: 4px; border-radius: 4px;
height: 20px; height: 20px;
position: absolute; position: absolute;
width: 500px; width: 500px;
} }
h3 { h3 {
width: 100%; width: 100%;
position: absolute; position: absolute;
} }
} }
input[type=text], input[type=number], select { input[type=text], input[type=number], select {
display: block; display: block;
float: right; float: right;
margin-top: 8px; margin-top: 8px;
} }
input[type=number] { input[type=number] {
width: 4em; width: 4em;
} }
textarea{ textarea{
float: right; float: right;
text-align: right; text-align: right;
} }
nav{ nav{
margin-top: 15px; margin-top: 15px;
a{ a{
text-decoration: underline; text-decoration: underline;
display: block; display: block;
} }
.prev{ .prev{
float: left; float: left;
} }
.next{ .next{
float: right; float: right;
} }
} }
ul.radio{ ul.radio{
float: right; float: right;
label { label {
float: left; float: left;
margin: 0; margin: 0;
} }
} }
.radio{ .radio{
li{ li{
float: left; float: left;
padding: 5px; padding: 5px;
margin: 5px 3px; margin: 5px 3px;
border-bottom: none !important; border-bottom: none !important;
} }
} }
.size-summary { .size-summary {
margin: 10px; margin: 10px;
} }
} }
#new-template-name { #new-template-name {
input { input {
margin: 10px 5px; margin: 10px 5px;
} }
} }
<div class="contentblock"> <div class="contentblock">
<h2>{% block boxhelp %}{% endblock %}{% block title %}Doboz címe (cseréld le){% endblock title %}</h2> <h2>{% block boxhelp %}{% endblock %}{% block title %}Doboz címe (cseréld le){% endblock title %}</h2>
<div class="content"> <div class="content">
{% block content %} {% block content %}
Doboz tartalma (cseréld le) Doboz tartalma (cseréld le)
{% endblock content %} {% endblock content %}
</div> </div>
</div> </div>
{% block content %} {% block content %}
{% block summary %}{% endblock summary %} {% block summary %}{% endblock summary %}
<div class="details"> <div class="details">
<div class="details-container"> <div class="details-container">
{% block details %}{% endblock details %} {% block details %}{% endblock details %}
</div> </div>
</div> </div>
{% endblock content %} {% endblock content %}
{% block content %} {% block content %}
{% block name %}{% endblock %} {% block name %}{% endblock %}
<div class="status"> <div class="status">
{% block status %}{% endblock status %} {% block status %}{% endblock status %}
</div> </div>
<div class="actions"> <div class="actions">
{% block actions %}{% endblock actions %} {% block actions %}{% endblock actions %}
</div> </div>
<div class="clear"></div> <div class="clear"></div>
{% endblock content %} {% endblock content %}
{% extends "box/base/entry.html" %} {% extends "box/base/entry.html" %}
{% load i18n %} {% load i18n %}
{% get_current_language as LANGUAGE_CODE %} {% get_current_language as LANGUAGE_CODE %}
{% block summary %} {% block summary %}
<div class="summary" data-bind="click: clickHandler"> <div class="summary" data-bind="click: clickHandler">
<div class="name" data-bind="text: name, attr: {class: getTypeClass, title: originalName}"></div> <div class="name" data-bind="text: name, attr: {class: getTypeClass, title: originalName}"></div>
<div class="info" data-bind="text: size"></div> <div class="info" data-bind="text: size"></div>
<div class="actions"> <div class="actions">
<a href="#" data-bind="click: $parent.rename, clickBubble: false"> <a href="#" data-bind="click: $parent.rename, clickBubble: false">
<img src="/static/icons/pencil.png" alt="{% trans "rename" %}" /> <img src="/static/icons/pencil.png" alt="{% trans "rename" %}" />
</a> </a>
<a href="#" data-bind="click: $parent.delete, clickBubble: false"> <a href="#" data-bind="click: $parent.delete, clickBubble: false">
<img src="/static/icons/minus-circle.png" alt="{% trans "remove" %}" /> <img src="/static/icons/minus-circle.png" alt="{% trans "remove" %}" />
</a> </a>
<a href="#" data-bind="click: $parent.download, clickBubble: false"> <a href="#" data-bind="click: $parent.download, clickBubble: false">
<img src="/static/icons/download-cloud.png" alt="{% trans "download" %}" /> <img src="/static/icons/download-cloud.png" alt="{% trans "download" %}" />
</a> </a>
</div> </div>
<div class="clear"></div> <div class="clear"></div>
</div> </div>
{% endblock summary %} {% endblock summary %}
{% block details %} {% block details %}
<ul> <ul>
<li class="date"> <li class="date">
{% trans "Last modification" %}: {% trans "Last modification" %}:
<small class="value" data-bind="text: mTime"></small> <small class="value" data-bind="text: mTime"></small>
</li> </li>
<li class="filetype-text"> <li class="filetype-text">
{% trans "Type" %}: {% trans "Type" %}:
<span class="value" data-bind="text: type"></span> <span class="value" data-bind="text: type"></span>
</li> </li>
</ul> </ul>
{% endblock details %} {% endblock details %}
{% extends "box/base/entry.html" %} {% extends "box/base/entry.html" %}
{% load i18n %} {% load i18n %}
{% get_current_language as LANGUAGE_CODE %} {% get_current_language as LANGUAGE_CODE %}
{% block content %} {% block content %}
<li class="entry key" id="key-{{key.id}}" style="display: none"> <li class="entry key" id="key-{{key.id}}" style="display: none">
{{block.super}} {{block.super}}
</li> </li>
{% endblock content %} {% endblock content %}
{% block summary %} {% block summary %}
<div class="summary"> <div class="summary">
<div class="name"> <div class="name">
{{key}} {{key}}
</div> </div>
<div class="actions"> <div class="actions">
<a href="#" class="remove delete-key" data-id="{{key.id}}"> <a href="#" class="remove delete-key" data-id="{{key.id}}">
<img src="/static/icons/minus-circle.png" alt="{% trans 'Remove' %}" /> <img src="/static/icons/minus-circle.png" alt="{% trans 'Remove' %}" />
</a> </a>
</div> </div>
<div class="clear"></div> <div class="clear"></div>
</div> </div>
{% endblock summary %} {% endblock summary %}
{% block details %} {% block details %}
<textarea>{{key.key}}</textarea> <textarea>{{key.key}}</textarea>
{% endblock details %} {% endblock details %}
{% extends "box/base/entry.html" %} {% extends "box/base/entry.html" %}
{% load i18n %} {% load i18n %}
{% get_current_language as LANGUAGE_CODE %} {% get_current_language as LANGUAGE_CODE %}
{% block content %} {% block content %}
<li class="entry" id="t{{t.id }}"> <li class="entry" id="t{{t.id }}">
{{ block.super }} {{ block.super }}
</li> </li>
{% endblock content %} {% endblock content %}
{% block summary %} {% block summary %}
{% include "box/template/summary.html" %} {% include "box/template/summary.html" %}
{% endblock summary %} {% endblock summary %}
{% block details %} {% block details %}
<ul> <ul>
<li class="name"> <li class="name">
{% trans "System" %}: {% trans "System" %}:
<span class="value">{{t.system}}</span> <span class="value">{{t.system}}</span>
<div class="clear"></div> <div class="clear"></div>
</li> </li>
<li class="type"> <li class="type">
{% trans "Size" %}: {% trans "Size" %}:
<span class="value"> <span class="value">
{{t.instance_type}}: {{t.instance_type}}:
<span class="cpu">{{t.instance_type.CPU}}</span> <span class="cpu">{{t.instance_type.CPU}}</span>
<span class="memory">{{t.instance_type.RAM}}</span> <span class="memory">{{t.instance_type.RAM}}</span>
<span class="credit">{{t.instance_type.credit}}</span> <span class="credit">{{t.instance_type.credit}}</span>
</span> </span>
</li> </li>
<li class="description"> <li class="description">
{% trans "Description" %}: {% trans "Description" %}:
<span class="value">{{t.description}}</span> <span class="value">{{t.description}}</span>
<div class="clear"></div> <div class="clear"></div>
</li> </li>
<li class="date" > <li class="date" >
{% trans "Created at" %}: {% trans "Created at" %}:
<span class="value">{{t.created_at}} ({{t.owner.get_profile}})</span> <span class="value">{{t.created_at}} ({{t.owner.get_profile}})</span>
<div class="clear"></div> <div class="clear"></div>
</li> </li>
<li class="count"> <li class="count">
{% trans "Running instances" %}: {% trans "Running instances" %}:
<span class="value">{{ t.running_instances }}</span> <span class="value">{{ t.running_instances }}</span>
</li> </li>
</ul> </ul>
{% endblock details %} {% endblock details %}
{% extends "box/base/summary.html" %} {% extends "box/base/summary.html" %}
{% load i18n %} {% load i18n %}
{% load l10n %} {% load l10n %}
{% get_current_language as LANGUAGE_CODE %} {% get_current_language as LANGUAGE_CODE %}
{% block content %} {% block content %}
<div class="summary {% if t.state == 'NEW' or t.state == 'SAVING'%}unfinished{% endif %}"> <div class="summary {% if t.state == 'NEW' or t.state == 'SAVING'%}unfinished{% endif %}">
{{ block.super }} {{ block.super }}
{% if t.myshares %} {% if t.myshares %}
<ul class="shares"> <ul class="shares">
{% for i in t.myshares %} {% for i in t.myshares %}
<li> <li>
<div class="quota"> <div class="quota">
<div class="used" style="width: {{ i.get_instance_pc|unlocalize }}%"></div> <div class="used" style="width: {{ i.get_instance_pc|unlocalize }}%"></div>
</div> </div>
<form action="/vm/unshare/{{i.id}}/" method="post"> <form action="/vm/unshare/{{i.id}}/" method="post">
<span title="{{i.name}}">{{i.name|truncatechars:20}}</span> <span title="{{i.name}}">{{i.name|truncatechars:20}}</span>
({{i.get_running}}/{{i.instance_limit}}) ({{i.get_running}}/{{i.instance_limit}})
{% csrf_token %} {% csrf_token %}
<input class="template-unshare" type="submit" value="{% trans "Delete" %}" style="float: right"/> <input class="template-unshare" type="submit" value="{% trans "Delete" %}" style="float: right"/>
</form> </form>
<div class="clear"></div> <div class="clear"></div>
</li> </li>
{% endfor %} {% endfor %}
</ul> </ul>
{% endif %} {% endif %}
</div> </div>
{% endblock content %} {% endblock content %}
{% block name %} {% block name %}
<div class="name">{{t.name}}</div> <div class="name">{{t.name}}</div>
{% endblock %} {% endblock %}
{% block status %} {% block status %}
{{vm.state}} {{vm.state}}
{% endblock status %} {% endblock status %}
{% block actions %} {% block actions %}
{% if t.state == 'READY' %} {% if t.state == 'READY' %}
<a href="#" class="try-template" data-id="{{t.id}}" title="{% trans "Try" %}"> <a href="#" class="try-template" data-id="{{t.id}}" title="{% trans "Try" %}">
<img src="/static/icons/control.png" alt="{% trans "Start" %}"/> <img src="/static/icons/control.png" alt="{% trans "Start" %}"/>
</a> </a>
<!--<a href="#" title="{% trans "Edit" %}"> <!--<a href="#" title="{% trans "Edit" %}">
<img src="/static/icons/pencil.png" alt="{% trans "Edit" %}" /> <img src="/static/icons/pencil.png" alt="{% trans "Edit" %}" />
</a>--> </a>-->
<a href="#" class="template-share" data-id="{{t.id}}" data-gid="{{group.id}}" title="{% trans "Share" %}"> <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" %}" /> <img src="/static/icons/user-share.png" alt="{% trans "Share" %}" />
</a> </a>
{% endif %} {% endif %}
<a href="#" class="delete-template" data-id="{{ t.id }}" data-name="{{ t.name }}" title="{% trans "Remove" %}"> <a href="#" class="delete-template" data-id="{{ t.id }}" data-name="{{ t.name }}" title="{% trans "Remove" %}">
<img src="/static/icons/minus-circle.png" alt="{% trans "Remove" %}" /> <img src="/static/icons/minus-circle.png" alt="{% trans "Remove" %}" />
</a> </a>
<!--<a href="#" class="edit-template" data-id="{{ t.id }}" title="{% trans "Edit" %}"> <!--<a href="#" class="edit-template" data-id="{{ t.id }}" title="{% trans "Edit" %}">
<img src="/static/icons/pencil.png" alt="{% trans "Edit" %}" /> <img src="/static/icons/pencil.png" alt="{% trans "Edit" %}" />
</a>--> </a>-->
{% endblock actions %} {% endblock actions %}
{% extends "box/base/entry.html" %} {% extends "box/base/entry.html" %}
{% load i18n %} {% load i18n %}
{% get_current_language as LANGUAGE_CODE %} {% get_current_language as LANGUAGE_CODE %}
{% block content %} {% block content %}
<li class="entry {% if id == vm.id %}opened{% endif %}"> <li class="entry {% if id == vm.id %}opened{% endif %}">
{{block.super }} {{block.super }}
</li> </li>
{% endblock content %} {% endblock content %}
{% block summary %} {% block summary %}
{% include "box/vm/summary.html" %} {% include "box/vm/summary.html" %}
{% endblock summary %} {% endblock summary %}
{% block details %} {% block details %}
<ul> <ul>
<li class="name"> <li class="name">
{% trans "Hostname" %}: {% trans "Hostname" %}:
<span class="value">{{vm.name}}</span> <span class="value">{{vm.name}}</span>
<div class="clear"></div> <div class="clear"></div>
</li> </li>
<li class="os-{{vm.template.os_type}}"> <li class="os-{{vm.template.os_type}}">
{% trans "System" %}: {% trans "System" %}:
<span class="value">{{vm.template.system}}</span> <span class="value">{{vm.template.system}}</span>
<div class="clear"></div> <div class="clear"></div>
</li> </li>
<li class="template"> <li class="template">
{% trans "Type" %}: {% trans "Type" %}:
<span class="value">{{vm.share.type}}</span> <span class="value">{{vm.share.type}}</span>
<div class="clear"></div> <div class="clear"></div>
</li> </li>
<li class="template"> <li class="template">
{% trans "Share" %}: {% trans "Share" %}:
<span class="value">{{vm.share.name}}</span> <span class="value">{{vm.share.name}}</span>
<div class="clear"></div> <div class="clear"></div>
</li> </li>
<li class="template"> <li class="template">
{% trans "Template" %}: {% trans "Template" %}:
<span class="value">{{vm.template.name}}</span> <span class="value">{{vm.template.name}}</span>
<div class="clear"></div> <div class="clear"></div>
</li> </li>
<li class="type"> <li class="type">
{% trans "Size" %}: {% trans "Size" %}:
<span class="value"> <span class="value">
{{vm.template.instance_type.name}}: {{vm.template.instance_type.name}}:
<span class="cpu">{{vm.template.instance_type.CPU}}</span> <span class="cpu">{{vm.template.instance_type.CPU}}</span>
<span class="memory">{{vm.template.instance_type.RAM}}</span> <span class="memory">{{vm.template.instance_type.RAM}}</span>
<span class="credit">{{vm.template.instance_type.credit}}</span> <span class="credit">{{vm.template.instance_type.credit}}</span>
</span> </span>
</li> </li>
<li class="date"> <li class="date">
{% trans "Created at" %}: {% trans "Created at" %}:
<span class="value">{{vm.created_at}}</span> <span class="value">{{vm.created_at}}</span>
</li> </li>
{% if vm.time_of_suspend %} {% if vm.time_of_suspend %}
<li class="date"> <li class="date">
{% trans "time of suspend"|capfirst %}: {% trans "time of suspend"|capfirst %}:
<span class="value"> <abbr title="{{vm.time_of_suspend}}">{{vm.time_of_suspend|timeuntil}}</abbr> <span class="value"> <abbr title="{{vm.time_of_suspend}}">{{vm.time_of_suspend|timeuntil}}</abbr>
<a href="#" class="renew-vm renew-suspend-vm" data-id="{{ vm.id }}" title="{% trans "Renew suspend time" %}"> <a href="#" class="renew-vm renew-suspend-vm" data-id="{{ vm.id }}" title="{% trans "Renew suspend time" %}">
<img src="/static/icons/control-double.png" alt="{% trans "Renew suspend time" %}" /> <img src="/static/icons/control-double.png" alt="{% trans "Renew suspend time" %}" />
</a> </a>
</span> </span>
</li> </li>
{% endif %} {% endif %}
{% if vm.time_of_delete %} {% if vm.time_of_delete %}
<li class="date"> <li class="date">
{% trans "time of delete"|capfirst %}: {% trans "time of delete"|capfirst %}:
<span class="value"> <abbr title="{{vm.time_of_delete}}">{{vm.time_of_delete|timeuntil}}</abbr> <span class="value"> <abbr title="{{vm.time_of_delete}}">{{vm.time_of_delete|timeuntil}}</abbr>
<a href="#" class="renew-vm renew-delete-vm" data-id="{{ vm.id }}" title="{% trans "Renew deletion time" %}"> <a href="#" class="renew-vm renew-delete-vm" data-id="{{ vm.id }}" title="{% trans "Renew deletion time" %}">
<img src="/static/icons/control-double.png" alt="{% trans "Renew deletion time" %}" /> <img src="/static/icons/control-double.png" alt="{% trans "Renew deletion time" %}" />
</a> </a>
</span> </span>
</li> </li>
{% endif %} {% endif %}
<li> <li>
&nbsp; &nbsp;
<span class="value"> <span class="value">
<a href="/vm/show/{{vm.id}}/" title="{{vm.name}}">{% trans "More details" %}</a> <a href="/vm/show/{{vm.id}}/" title="{{vm.name}}">{% trans "More details" %}</a>
</span> </span>
</li> </li>
</ul> </ul>
{% endblock details %} {% endblock details %}
{% extends "box/base/summary.html" %} {% extends "box/base/summary.html" %}
{% load i18n %} {% load i18n %}
{% get_current_language as LANGUAGE_CODE %} {% get_current_language as LANGUAGE_CODE %}
{% block content %} {% block content %}
<div class="summary {% if id == vm.id %}selected-summary{% endif %} {% if vm.template.state == "NEW" %}unfinished{% endif %}"> <div class="summary {% if id == vm.id %}selected-summary{% endif %} {% if vm.template.state == "NEW" %}unfinished{% endif %}">
{{ block.super }} {{ block.super }}
</div> </div>
{% endblock content %} {% endblock content %}
{% block name %} {% block name %}
<div class="name {% if vm.state == 'ACTIVE' %}vm-on{% else %}vm-off{% endif %}"> <div class="name {% if vm.state == 'ACTIVE' %}vm-on{% else %}vm-off{% endif %}">
<span id="vm-{{vm.id}}-name">{{vm.name|truncatechars:20}}</span> <span id="vm-{{vm.id}}-name">{{vm.name|truncatechars:20}}</span>
<small id="vm-{{vm.id}}-name-details" class="details"> <small id="vm-{{vm.id}}-name-details" class="details">
(<a href="/vm/show/{{vm.id}}/" title="{{vm.name}}">{% trans "More details" %}</a>) (<a href="/vm/show/{{vm.id}}/" title="{{vm.name}}">{% trans "More details" %}</a>)
</small> </small>
</div> </div>
{% endblock %} {% endblock %}
{% block status %} {% block status %}
{{vm.state}} {{vm.state}}
{% endblock status %} {% endblock status %}
{% block actions %} {% block actions %}
<a href="#" class="rename-vm" data-name="{{ vm.name }}" data-id="{{ vm.id }}" title="{% trans "Edit name" %}"> <a href="#" class="rename-vm" data-name="{{ vm.name }}" data-id="{{ vm.id }}" title="{% trans "Edit name" %}">
<img src="/static/icons/pencil.png" alt="{% trans "Edit name" %}" /> <img src="/static/icons/pencil.png" alt="{% trans "Edit name" %}" />
</a> </a>
{% if vm.waiting %} {% if vm.waiting %}
<a href="#"> <a href="#">
<img src="/static/image/load.gif" /> <img src="/static/image/load.gif" />
</a> </a>
{% elif vm.state == 'ACTIVE' %} {% elif vm.state == 'ACTIVE' %}
<a href="{{vm.get_connect_uri}}" data-id="{{ vm.id }}" class="connect-vm" title="{% trans "Connect" %}"> <a href="{{vm.get_connect_uri}}" data-id="{{ vm.id }}" class="connect-vm" title="{% trans "Connect" %}">
<img src="/static/icons/plug.png" alt="{% trans "Connect" %}" /> <img src="/static/icons/plug.png" alt="{% trans "Connect" %}" />
</a> </a>
<a href="#" class="stop-vm" data-name="{{ vm.name }}" data-id="{{ vm.id }}" title="{% trans "Pause" %}"> <a href="#" class="stop-vm" data-name="{{ vm.name }}" data-id="{{ vm.id }}" title="{% trans "Pause" %}">
<img src="/static/icons/control-pause.png" alt="{% trans "Pause" %}" /> <img src="/static/icons/control-pause.png" alt="{% trans "Pause" %}" />
</a> </a>
<a href="#" class="delete-vm" data-name="{{ vm.name }}" data-id="{{ vm.id }}" title="{% trans "Delete" %}"> <a href="#" class="delete-vm" data-name="{{ vm.name }}" data-id="{{ vm.id }}" title="{% trans "Delete" %}">
<img src="/static/icons/minus-circle.png" alt="{% trans "Delete" %}" /> <img src="/static/icons/minus-circle.png" alt="{% trans "Delete" %}" />
</a> </a>
<a href="#" class="restart-vm" data-name="{{ vm.name }}" data-id="{{ vm.id }}" title="{% trans "Restart" %}"> <a href="#" class="restart-vm" data-name="{{ vm.name }}" data-id="{{ vm.id }}" title="{% trans "Restart" %}">
<img src="/static/icons/arrow-circle-double.png" alt="↺" /> <img src="/static/icons/arrow-circle-double.png" alt="↺" />
</a> </a>
{% elif vm.state == 'PENDING' %} {% elif vm.state == 'PENDING' %}
<a href="#"> <a href="#">
<img src="/static/image/load.gif" /> <img src="/static/image/load.gif" />
</a> </a>
<a style="float: right" href="#" class="delete-vm" data-name="{{ vm.name }}" data-id="{{ vm.id }}" title="{% trans "Delete" %}"> <a style="float: right" href="#" class="delete-vm" data-name="{{ vm.name }}" data-id="{{ vm.id }}" title="{% trans "Delete" %}">
<img src="/static/icons/minus-circle.png" alt="{% trans "Delete" %}" /> <img src="/static/icons/minus-circle.png" alt="{% trans "Delete" %}" />
</a> </a>
{% elif vm.state == 'STOPPED' %} {% elif vm.state == 'STOPPED' %}
<a href="#" class="resume-vm" data-name="{{ vm.name }}" data-id="{{ vm.id }}" title="{% trans "Resume" %}"> <a href="#" class="resume-vm" data-name="{{ vm.name }}" data-id="{{ vm.id }}" title="{% trans "Resume" %}">
<img src="/static/icons/control.png" alt="{% trans "Resume" %}" /> <img src="/static/icons/control.png" alt="{% trans "Resume" %}" />
</a> </a>
<a href="#" class="delete-vm" data-name="{{ vm.name }}" data-id="{{ vm.id }}" title="{% trans "Delete" %}"> <a href="#" class="delete-vm" data-name="{{ vm.name }}" data-id="{{ vm.id }}" title="{% trans "Delete" %}">
<img src="/static/icons/minus-circle.png" alt="{% trans "Delete" %}" /> <img src="/static/icons/minus-circle.png" alt="{% trans "Delete" %}" />
</a> </a>
{% elif vm.state == 'FAILED' %} {% elif vm.state == 'FAILED' %}
<a href="#" class="delete-vm" data-name="{{ vm.name }}" data-id="{{ vm.id }}" title="{% trans "Delete" %}"> <a href="#" class="delete-vm" data-name="{{ vm.name }}" data-id="{{ vm.id }}" title="{% trans "Delete" %}">
<img src="/static/icons/minus-circle.png" alt="{% trans "Delete" %}" /> <img src="/static/icons/minus-circle.png" alt="{% trans "Delete" %}" />
</a> </a>
{% endif %} {% endif %}
{% endblock actions %} {% endblock actions %}
{% extends "box/base/box.html" %} {% extends "box/base/box.html" %}
{% load i18n %} {% load i18n %}
{% load l10n %} {% load l10n %}
{% get_current_language as LANGUAGE_CODE %} {% get_current_language as LANGUAGE_CODE %}
{% block title %} {% block title %}
{% trans "My Groups" %} {% trans "My Groups" %}
{% endblock title %} {% endblock title %}
{% block content %} {% block content %}
<ul class="vm-list entry-list" id="groups"> <ul class="vm-list entry-list" id="groups">
{% if groups %} {% if groups %}
{% for group in groups %} {% for group in groups %}
{% include "box/group/entry.html" %} {% include "box/group/entry.html" %}
{% endfor %} {% endfor %}
{% else %} {% else %}
<div class="tooltip"> <div class="tooltip">
<div class="container"> <div class="container">
<p>{% trans "You have no groups." %}</p> <p>{% trans "You have no groups." %}</p>
<p> <p>
{% trans "Create a new one, and add your students to the new group." %} {% trans "Create a new one, and add your students to the new group." %}
</p> </p>
<div class="tail"></div> <div class="tail"></div>
</div> </div>
</div> </div>
{% endif %} {% endif %}
<li id="show-hidden-groups" class="entry small-row"> <li id="show-hidden-groups" class="entry small-row">
<div class="summary"> <div class="summary">
<div class="name">{% trans "Show hidden groups" %}</div> <div class="name">{% trans "Show hidden groups" %}</div>
<div class="clear"></div> <div class="clear"></div>
</div> </div>
</li> </li>
<li class="entry small-row" id="new-group"> <li class="entry small-row" id="new-group">
<div class="summary"> <div class="summary">
<div class="name">{% trans "Create new group" %}</div> <div class="name">{% trans "Create new group" %}</div>
<div class="clear"></div> <div class="clear"></div>
</div> </div>
<div id="new-group-wizard" style="display: none"> <div id="new-group-wizard" style="display: none">
<form action="/group/new/" method="POST" class="wizard"> <form action="/group/new/" method="POST" class="wizard">
{% csrf_token %} {% csrf_token %}
<h3>{% trans "Create new group" %}</h3> <h3>{% trans "Create new group" %}</h3>
<ul> <ul>
<li> <li>
<label for="new-group-name">{% trans "Group name" %}</label> <label for="new-group-name">{% trans "Group name" %}</label>
<input type="text" name="name" id="new-group-name" /> <input type="text" name="name" id="new-group-name" />
</li> </li>
<li> <li>
<label for="new-group-semester">{% trans "Semester" %}</label> <label for="new-group-semester">{% trans "Semester" %}</label>
<select name="semester" id="new-group-semester"> <select name="semester" id="new-group-semester">
{% for semester in semesters %} {% for semester in semesters %}
<option value="{{semester.id}}">{{semester.name}}</option> <option value="{{semester.id}}">{{semester.name}}</option>
{% endfor %} {% endfor %}
</select> </select>
</li> </li>
<li> <li>
<label for="new-group-members">{% trans "Members" %}</label> <label for="new-group-members">{% trans "Members" %}</label>
<textarea name="members" placeholder="{% trans 'Student NEPTUN codes, one per line' %}" id="new-group-members"></textarea> <textarea name="members" placeholder="{% trans 'Student NEPTUN codes, one per line' %}" id="new-group-members"></textarea>
<div class="clear"></div> <div class="clear"></div>
</li> </li>
</ul> </ul>
<nav> <nav>
<input type="reset" class="prev" value="{% trans "Cancel" %}" /> <input type="reset" class="prev" value="{% trans "Cancel" %}" />
<input type="submit" class="next" value="{% trans "Done" %}" /> <input type="submit" class="next" value="{% trans "Done" %}" />
<div class="clear"></div> <div class="clear"></div>
</nav> </nav>
</form> </form>
</div> </div>
</li> </li>
</ul> </ul>
{% endblock content %} {% endblock content %}
{% extends "box/base/entry.html" %} {% extends "box/base/entry.html" %}
{% load i18n %} {% load i18n %}
{% get_current_language as LANGUAGE_CODE %} {% get_current_language as LANGUAGE_CODE %}
{% block content %} {% block content %}
<li class="entry" id="group-{{group.id}}"> <li class="entry" id="group-{{group.id}}">
{{ block.super }} {{ block.super }}
</li> </li>
{% endblock content %} {% endblock content %}
{% block summary %} {% block summary %}
<div class="summary"> <div class="summary">
<div class="name"> <div class="name">
{{ group.name }} {{ group.name }}
<small class="details">(<a href="/group/show/{{group.id}}">{% trans "More details" %}</a>)</small> <small class="details">(<a href="/group/show/{{group.id}}">{% trans "More details" %}</a>)</small>
</div> </div>
<div class="actions"> <div class="actions">
<a href="#" class="delete" data-id="{{group.id}}" data-name="{{group.name}}"> <a href="#" class="delete" data-id="{{group.id}}" data-name="{{group.name}}">
<img src="/static/icons/minus-circle.png" alt="{% trans "Delete" %}" title="{% trans "Delete" %}" /> <img src="/static/icons/minus-circle.png" alt="{% trans "Delete" %}" title="{% trans "Delete" %}" />
</a> </a>
<a href="#" class="hide-group" data-id="{{group.id}}"> <a href="#" class="hide-group" data-id="{{group.id}}">
<img src="/static/icons/eye-half.png" alt="{% trans "Hide" %}" title="{% trans "Hide" %}" /> <img src="/static/icons/eye-half.png" alt="{% trans "Hide" %}" title="{% trans "Hide" %}" />
</a> </a>
</div> </div>
<div class="clear"></div> <div class="clear"></div>
</div> </div>
{% endblock summary %} {% endblock summary %}
{% block details %} {% block details %}
<ul> <ul>
<li> <li>
{% trans "Course" %}: {% trans "Course" %}:
<span class="value"> <span class="value">
{% if group.course %} {% if group.course %}
{{group.course.name}} {{group.course.name}}
{% else %} {% else %}
{% trans "Not assigned" %} {% trans "Not assigned" %}
{% endif %} {% endif %}
</span> </span>
</li> </li>
<li> <li>
{% trans "Semester" %}: {% trans "Semester" %}:
<span class="value">{{group.semester.name}}</span> <span class="value">{{group.semester.name}}</span>
</li> </li>
<li> <li>
{% trans "Owner(s)" %}: {% trans "Owner(s)" %}:
<span class="value">{{group.owner_list}}</span> <span class="value">{{group.owner_list}}</span>
</li> </li>
<li> <li>
{% trans "Member count" %}: {% trans "Member count" %}:
<span class="value">{{group.member_count}}</span> <span class="value">{{group.member_count}}</span>
</li> </li>
<li> <li>
&nbsp; &nbsp;
<span class="value"> <span class="value">
<a href="/group/show/{{group.id}}">{% trans "More details" %}</a> <a href="/group/show/{{group.id}}">{% trans "More details" %}</a>
</span> </span>
</li> </li>
</ul> </ul>
{% endblock details %} {% endblock details %}
{% extends "box/base/box.html" %} {% extends "box/base/box.html" %}
{% load i18n %} {% load i18n %}
{% load l10n %} {% load l10n %}
{% get_current_language as LANGUAGE_CODE %} {% get_current_language as LANGUAGE_CODE %}
{% block title %} {% block title %}
{% trans "Members of" %}: {{group.name}} {% trans "Members of" %}: {{group.name}}
{% endblock title %} {% endblock title %}
{% block content %} {% block content %}
<ul class="entry-list" id="group-members"> <ul class="entry-list" id="group-members">
{% for member in members %} {% for member in members %}
{% include "box/person/entry.html" %} {% include "box/person/entry.html" %}
{% endfor %} {% endfor %}
<li class="entry small-row"> <li class="entry small-row">
<div class="summary" id="new-member"> <div class="summary" id="new-member">
<div class="name">{% trans "Add user" %}</div> <div class="name">{% trans "Add user" %}</div>
<div id="new-member-form"> <div id="new-member-form">
<input type="text" placeholder="{% trans "User NEPTUN code" %}" /> <input type="text" placeholder="{% trans "User NEPTUN code" %}" />
<input type="submit" value="{% trans "Add user" %}" data-id="{{group.id}}"/> <input type="submit" value="{% trans "Add user" %}" data-id="{{group.id}}"/>
</div> </div>
<div class="clear"></div> <div class="clear"></div>
</div> </div>
</li> </li>
</ul> </ul>
{% endblock content %} {% endblock content %}
{% extends "box/base/entry.html" %} {% extends "box/base/entry.html" %}
{% load i18n %} {% load i18n %}
{% get_current_language as LANGUAGE_CODE %} {% get_current_language as LANGUAGE_CODE %}
{% block content %} {% block content %}
<li class="entry small-row" id="member-{{member.code}}"> <li class="entry small-row" id="member-{{member.code}}">
{{block.super}} {{block.super}}
</li> </li>
{% endblock content %} {% endblock content %}
{% block summary %} {% block summary %}
<div class="summary"> <div class="summary">
<div class="name"> <div class="name">
{% if not member.user %} {% if not member.user %}
{{member.code}} {{member.code}}
{% else %} {% else %}
{{member}} ({{member.code}}) {{member}} ({{member.code}})
{% endif %} {% endif %}
</div> </div>
<div class="actions"> <div class="actions">
<a href="#" class="remove" data-gid="{{group.id}}" data-neptun="{{member.code}}"> <a href="#" class="remove" data-gid="{{group.id}}" data-neptun="{{member.code}}">
<img src="/static/icons/minus-circle.png" alt="{% trans 'Remove' %}" /> <img src="/static/icons/minus-circle.png" alt="{% trans 'Remove' %}" />
</a> </a>
</div> </div>
<div class="clear"></div> <div class="clear"></div>
</div> </div>
{% endblock summary %} {% endblock summary %}
{% block details %} {% block details %}
{% if not member.user %} {% if not member.user %}
{% trans "This user never logged in, no data available" %} {% trans "This user never logged in, no data available" %}
{% else %} {% else %}
<ul> <ul>
<li> <li>
{% trans "Name" %}<span class="value">{{member}}</span> {% trans "Name" %}<span class="value">{{member}}</span>
</li> </li>
<li> <li>
{% trans "NEPTUN" %}<span class="value">{{member.code}}</span> {% trans "NEPTUN" %}<span class="value">{{member.code}}</span>
</li> </li>
<li> <li>
E-mail:<span class="value"><a href="mailto:{{member.user.email}}">{{member.user.email}}</a></span> E-mail:<span class="value"><a href="mailto:{{member.user.email}}">{{member.user.email}}</a></span>
</li> </li>
</ul> </ul>
{% endif %} {% endif %}
{% endblock details %} {% endblock details %}
{% extends "base.html" %} {% extends "base.html" %}
{% load i18n %} {% load i18n %}
{% get_current_language as LANGUAGE_CODE %} {% get_current_language as LANGUAGE_CODE %}
{% block content %} {% block content %}
<div class="boxes"> <div class="boxes">
{% include "box/person/box.html" %} {% include "box/person/box.html" %}
<div class="contentblock" id="group-owners"> <div class="contentblock" id="group-owners">
<h2>{% trans "Owners of" %}: {{group.name}}</h2> <h2>{% trans "Owners of" %}: {{group.name}}</h2>
<ul class="entry-list"> <ul class="entry-list">
{% for owner in owners %} {% for owner in owners %}
<li class="entry small-row"> <li class="entry small-row">
<div class="summary"> <div class="summary">
<div class="name"> <div class="name">
{% if not owner.user %} {% if not owner.user %}
{{owner.code}} {{owner.code}}
{% else %} {% else %}
{{owner}} ({{owner.code}}) {{owner}} ({{owner.code}})
{% endif %} {% endif %}
</div> </div>
<!--<div class="actions"> <!--<div class="actions">
<a href="#" class="remove" data-gid="{{group.id}}" data-neptun="{{owner.code}}"> <a href="#" class="remove" data-gid="{{group.id}}" data-neptun="{{owner.code}}">
<img src="/static/icons/minus-circle.png" alt="{% trans 'Remove' %}" /> <img src="/static/icons/minus-circle.png" alt="{% trans 'Remove' %}" />
</a> </a>
</div>--> </div>-->
<div class="clear"></div> <div class="clear"></div>
</div> </div>
<div class="details"> <div class="details">
<div class="container"> <div class="container">
{% if not owner.user %} {% if not owner.user %}
{% trans "This user never logged in, no data available" %} {% trans "This user never logged in, no data available" %}
{% else %} {% else %}
<ul> <ul>
<li> <li>
{% trans "Name" %}<span class="value">{{owner}}</span> {% trans "Name" %}<span class="value">{{owner}}</span>
</li> </li>
<li> <li>
{% trans "NEPTUN" %}<span class="value">{{owner.code}}</span> {% trans "NEPTUN" %}<span class="value">{{owner.code}}</span>
</li> </li>
<li> <li>
E-mail:<span class="value"><a href="mailto:{{owner.user.email}}">{{owner.user.email}}</a></span> E-mail:<span class="value"><a href="mailto:{{owner.user.email}}">{{owner.user.email}}</a></span>
</li> </li>
</ul> </ul>
{% endif %} {% endif %}
</div> </div>
</div> </div>
</li> </li>
{% endfor %} {% endfor %}
<li class="entry small-row"> <li class="entry small-row">
<div class="summary" id="new-owner" data-gid="{{group.id}}"> <div class="summary" id="new-owner" data-gid="{{group.id}}">
<div class="name">{% trans "Add owner" %}</div> <div class="name">{% trans "Add owner" %}</div>
<div class="clear"></div> <div class="clear"></div>
</div> </div>
<div class="details" id="new-owner-form"> <div class="details" id="new-owner-form">
<div class="container"> <div class="container">
<input type="text" placeholder="{% trans "Owner name/NEPTUN" %}" /> <input type="text" placeholder="{% trans "Owner name/NEPTUN" %}" />
<div id="new-owner-autocomplete"></div> <div id="new-owner-autocomplete"></div>
</div> </div>
</div> </div>
</li> </li>
</ul> </ul>
</div> </div>
</div> </div>
<div class="boxes"> <div class="boxes">
{% if noshare %} {% if noshare %}
<div class="tooltip" style="position:absolute"> <div class="tooltip" style="position:absolute">
<div class="container"> <div class="container">
<p> <p>
{% trans "This group has no shared templates." %} {% trans "This group has no shared templates." %}
</p> </p>
<p> <p>
{% trans "Share one, and the group members can start their own virtual machine." %} {% trans "Share one, and the group members can start their own virtual machine." %}
</p> </p>
<div class="tail"></div> <div class="tail"></div>
</div> </div>
</div> </div>
{% endif %} {% endif %}
{% include "box/template/box.html" %} {% include "box/template/box.html" %}
</div> </div>
{% endblock %} {% 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