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