Commit a8bc5968 by Dányi Bence

webui: template reindent

parent 30e712c1
......@@ -6,60 +6,55 @@
<title>{% block title %}IK Cloud{% endblock %}</title>
<link href="https://fonts.googleapis.com/css?family=Titillium+Web&amp;subset=latin,latin-ext" rel="stylesheet" type="text/css">
<link rel="icon" type="image/png" href="/static/favicon.png" />
<link rel="icon" type="image/png" href="one/static/favicon.png">
<link rel="stylesheet/less" href="/static/style.less" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<script src="/static/jquery.min.js"></script>
<script type="text/javascript" src="{% url django.views.i18n.javascript_catalog %}"></script>
<script type="text/javascript">
/*less = {
env: 'developement'
};*/
window.localStorage.clear();
</script>
<script src="/static/less.min.js"></script>
<script src="/static/knockout.min.js"></script>
<script type="text/javascript" src="/static/cloud.js"></script>
{{ form.media }}
{% block js %}{% endblock %}
</head>
<body>
<div id="header">
{% block login %}
<div id="loginblock"><p>
{% if user.is_authenticated %}
Bejelentkezve: {{ user.username }}.
<a href="/logout/">Kijelentkezés</a>.
{% if user.is_staff %}
<a href="/admin/">Admin</a>.
{% endif %}
{% else %}
<a href="/login/">Bejelentkezés</a>.
{% endif %}
{% if lang == 'hu' %}
<a href="/language/en/">In English</a>.
{% else %}
<a href="/language/hu/">Magyarul</a>.
{% endif %}
</p>
</div>
<div id="loginblock"><p>
{% if user.is_authenticated %}
Bejelentkezve: {{ user.username }}.
<a href="/logout/">Kijelentkezés</a>.
{% if user.is_staff %}
<a href="/admin/">Admin</a>.
{% endif %}
{% else %}
<a href="/login/">Bejelentkezés</a>.
{% endif %}
{% if lang == 'hu' %}
<a href="/language/en/">In English</a>.
{% else %}
<a href="/language/hu/">Magyarul</a>.
{% endif %}
</p>
</div>
{% endblock %}
{% block header %}
{% block header_title %}
<h1><a href="/">IK Cloud</a></h1>
{% endblock %}
{% block header_title %}
<h1><a href="/">IK Cloud</a></h1>
{% endblock %}
{% endblock %}
</div>
{% block messages %}
{% if messages %}
<ul class="messagelist">{% for message in messages %}
<li{% if message.tags %} class="{{ message.tags }}"{% endif %}>{{ message }}</li>
{% endfor %}</ul>
{% endif %}
{% if messages %}
<ul class="messagelist">
{% for message in messages %}
<li{% if message.tags %} class="{{ message.tags }}"{% endif %}>{{ message }}</li>
{% endfor %}
</ul>
{% endif %}
{% endblock messages %}
<div id="content">
{% block content %}{% endblock %}
<div class="clear"></div>
......
......@@ -2,9 +2,7 @@
{% get_current_language as LANGUAGE_CODE %}
<div class="boxes">
<div class="contentblock">
<h2>
{% trans "Data store" %}
</h2>
<h2>{% trans "Data store" %}</h2>
<div class="content">
<ul class="file-list">
<li class="wm small" id="current-location">
......@@ -16,7 +14,12 @@
<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="name">
<small>
Jelenlegi hely:
<span data-bind="text: currentPath"></span>
</small>
</div>
<div class="clear"></div>
</div>
</li>
......@@ -24,9 +27,7 @@
<ul class="file-list" id="file-list">
<li class="wm real" data-bind="visible: notInRoot, click: jumpUp">
<div class="summary">
<div class="name filetype-jump-out">
..
</div>
<div class="name filetype-jump-out">..</div>
<div class="clear"></div>
</div>
</li>
......@@ -57,14 +58,19 @@
<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>
<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>
<!-- /ko --> </ul>
<ul class="file-list">
<li class="wm small-row">
<div class="summary" id="new-folder">
......@@ -88,7 +94,11 @@
<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 '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>
......@@ -114,8 +124,11 @@
<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>)
{% 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>
......
......@@ -2,9 +2,7 @@
{% get_current_language as LANGUAGE_CODE %}
<div class="boxes" id="groups">
<div class="contentblock">
<h2>
{% trans "My Groups" %}
</h2>
<h2>{% trans "My Groups" %}</h2>
<div class="content">
<ul class="wm-list">
{% if groups %}
......@@ -45,7 +43,9 @@
</li>
<li>
&nbsp;
<span class="value"><a href="/group/show/{{group.id}}">{% trans "More details" %}</a></span>
<span class="value">
<a href="/group/show/{{group.id}}">{% trans "More details" %}</a>
</span>
</li>
</ul>
</div>
......@@ -54,9 +54,7 @@
{% else %}
<div id="new-wm-tooltip">
<div id="new-wm-tooltip-container">
<p>
{% trans "You have no groups." %}
</p>
<p>{% trans "You have no groups." %}</p>
<p>
{% trans "Create a new one, and add your students to the new group." %}
</p>
......@@ -89,19 +87,23 @@
<textarea name="members" placeholder="{% trans 'Student NEPTUN codes, one per line' %}" id="new-group-members"></textarea>
</p>
<!--<h4>{% trans "Summary" %}</h4>
<p>
<strong>{% trans "Group name" %}:</strong> <span id="new-group-summary-name"></span><br />
<strong>{% trans "Semester" %}:</strong> <span id="new-group-summary-semester"></span><br />
<strong>{% trans "Member count" %}:</strong> <span id="new-group-summary-count"></span><br />
</p>-->
<p>
{% csrf_token %}
<input type="submit" value="{% trans "Done" %}">
</p>
</form>
</div>
</li>
</ul>
</div>
<p> <strong>{% trans "Group name" %}:</strong>
<span id="new-group-summary-name"></span>
<br /> <strong>{% trans "Semester" %}:</strong>
<span id="new-group-summary-semester"></span>
<br />
<strong>{% trans "Member count" %}:</strong>
<span id="new-group-summary-count"></span>
<br />
</p>
-->
<p>
{% csrf_token %}
<input type="submit" value="{% trans "Done" %}"></p>
</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="wm-list">
{% for t in mytemplates %}
<li class="wm" 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="contentblock" id="template">
<h2>{% trans "Templates" %}</h2>
<ul class="wm-list">
{% for t in mytemplates %}
<li class="wm" 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}} = {{i.get_instance_pc}}%)
{% csrf_token %}
<input type="submit" value="{% trans "Delete" %}" style="float: right"/>
</form>
<div class="clear"></div>
</li>
{% endfor %}
</ul>
<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="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}}:
<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}} = {{i.get_instance_pc}}%)
{% 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 %}
</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 id="new-wm-tooltip">
<div id="new-wm-tooltip-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 id="new-wm-tooltip-tail"></div>
</div>
</div>
{% endif %}
<div id="new-wm-tooltip">
<div id="new-wm-tooltip-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 id="new-wm-tooltip-tail"></div>
</div>
</div>
{% endif %}
{% if not group %}
<li id="new-template-button" class="wm new">
<div class="summary">
<div class="name">Új Sablon</div>
<div class="clear"></div>
</div>
</li>
{% endif %}
<li id="new-template-button" class="wm 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="wm" id="t{{t.id }}">
<div class="summary public-template">
<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="#" 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}} = {{i.get_instance_pc}}%)
{% csrf_token %}
<input type="submit" value="{% trans "Delete" %}" style="float: right"/>
</form>
<div class="clear"></div>
</li>
{% endfor %}
</ul>
<li class="wm" id="t{{t.id }}">
<div class="summary public-template">
<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="#" 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="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}}:
<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}} = {{i.get_instance_pc}}%)
{% 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 %}
</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="wm 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>
<li class="wm 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>
</li>
</ul>
</div>
<div class="clear"></div>
</div>
</li>
</ul>
</div>
......@@ -3,84 +3,120 @@
{% 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="id"></div>-->
<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.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" %}" />
</span>
<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>
{% endif %}
<div class="summary {% if id == i.id %}selected-summary{% endif %} {% if i.template.state == "NEW" %}unfinished{% endif %}">
<!--<div class="id"></div>
-->
<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.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" %}" />
</span>
<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>
{% endif %}
{% if i.state == 'PENDING' %}
<img src="/static/load.gif" /> {% trans "starting…" %}
<img src="/static/load.gif" />
{% trans "starting…" %}
{% endif %}
{% if 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" %}" />
</span>
<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 %}
<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" %}" />
</span>
<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 %}
{% if 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>
<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="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}}:
<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></span></li>
{% endif %}
</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>
</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></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>
<li class="date">
{% trans "time of delete"|capfirst %}:
<span class="value"> <abbr title="{{i.time_of_delete}}">{{i.time_of_delete|timeuntil}}</abbr>
</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 id="new-wm-tooltip">
<div id="new-wm-tooltip-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 id="new-wm-tooltip-tail"></div>
</div>
<div id="new-wm-tooltip-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 id="new-wm-tooltip-tail"></div>
</div>
</div>
{% endif %}
......@@ -7,7 +7,10 @@
<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>
<p>
{% trans "Are you sure?" %}
<input type="submit" value="{% trans "Remove" %}" />
</p>
</form>
</div>
</div>
......
......@@ -2,8 +2,6 @@
{% load i18n %}
{% load l10n %}
{% get_current_language as LANGUAGE_CODE %}
{% block content %}
<div class="boxes">
<div class="contentblock" id="state">
......@@ -17,9 +15,9 @@
</div>
</li>
<li id="new-wm" style="display: none">
<h2>{% trans "Available shares" %}</h2>
<h2>{% trans "Available shares" %}</h2>
<p>
{% trans "Choose one of the following shared templates to launch." %}
{% trans "Choose one of the following shared templates to launch." %}
</p>
<div class="container">
<ul class="wm-list modal">
......@@ -27,29 +25,52 @@
<li class="wm">
<div class="summary">
<div class="quota">
<div class="used" style="width:{% if s.running_shared >= s.per_user_limit %}100%{% else %}{{ s.get_instance_pc|unlocalize }}%{% endif %}"/></div>
<div class="used" style="width:{% if s.running_shared >= s.per_user_limit %}100%{% else %}{{ s.get_instance_pc|unlocalize }}%{% endif %}"/>
</div>
</div>
<div class="name wm-on">{{s.name}} - {{ s.group.name }} ({{ s.running_shared }}/{{ s.per_user_limit }})</div>
<div class="status">
{{s.get_running}}/{{s.instance_limit}}
<div class="name wm-on">
{{s.name}} - {{ s.group.name }} ({{ s.running_shared }}/{{ s.per_user_limit }})
</div>
<div class="status">{{s.get_running}}/{{s.instance_limit}}</div>
<div class="clear"></div>
</div>
<div class="details">
<div class="details-container">
<ul>
<li class="os-{{s.template.os_type}}">{% trans "System" %}: <span class="value">{{s.template.system}}</span><div class="clear"></div></li>
<li class="type">{% trans "Size" %}: <span class="value">{{s.template.instance_type.name}}</span></li>
<li class="share-type">{% trans "Type" %}: <span class="value">{{s.type }}</span></li>
<li class="memory">{% trans "Memory" %}:
<span class="value">{% blocktrans with m=s.template.instance_type.RAM %}{{m}} MiB{% endblocktrans %}</span></li>
<li class="cpu">{% trans "CPU cores" %}: <span class="value">{{s.template.instance_type.CPU}}</span></li>
<li class="description">{% trans "Description" %}:<span class="value">{{s.description}}</span><div class="clear"></div></li>
<li class="os-{{s.template.os_type}}">
{% trans "System" %}:
<span class="value">{{s.template.system}}</span>
<div class="clear"></div>
</li>
<li class="type">
{% trans "Size" %}:
<span class="value">{{s.template.instance_type.name}}</span>
</li>
<li class="share-type">
{% trans "Type" %}:
<span class="value">{{s.type }}</span>
</li>
<li class="memory">
{% trans "Memory" %}:
<span class="value">
{% blocktrans with m=s.template.instance_type.RAM %}{{m}} MiB{% endblocktrans %}
</span>
</li>
<li class="cpu">
{% trans "CPU cores" %}:
<span class="value">{{s.template.instance_type.CPU}}</span>
</li>
<li class="description">
{% trans "Description" %}:
<span class="value">{{s.description}}</span>
<div class="clear"></div>
</li>
<li>
&nbsp;
<span class="value">
<form method="POST" action="/vm/new/s{{s.pk}}/">{% csrf_token %}
<input {% if s.running_shared >= s.per_user_limit or s.get_running >= s.instance_limit%}disabled{% endif %} type="submit" value="{% trans "Launch" %}"/>
<form method="POST" action="/vm/new/s{{s.pk}}/">
{% csrf_token %}
<input {% if s.running_shared >= s.per_user_limit or s.get_running >= s.nstance_limit%}disabled{% endif %} type="submit" value="{% trans "Launch" %}"/>
</form>
</span>
<div class="clear"></div>
......@@ -67,7 +88,9 @@
<div class="quota">
<div class="used" style="background-color: rgba(0,255,0,0.2); width: {{userdetails.get_instance_pc|unlocalize}}%"></div>
</div>
<div class="name">{% blocktrans with used=userdetails.get_weighted_instance_count all=userdetails.instance_quota %}Personal quota: {{used}}/{{all}}{% endblocktrans %}</div>
<div class="name">
{% blocktrans with used=userdetails.get_weighted_instance_count all=userdetails.instance_quota %}Personal quota: {{used}}/{{all}}{% endblocktrans %}
</div>
<div class="clear"></div>
</div>
</li>
......@@ -75,12 +98,10 @@
</div>
{% for box in boxes %}
{% if forloop.counter0|divisibleby:2 %}
<div class="contentblock">
<h2>{{ box.title }}</h2>
<div class="content">
{{ box.text|safe }}
</div>
</div>
<div class="contentblock">
<h2>{{ box.title }}</h2>
<div class="content">{{ box.text|safe }}</div>
</div>
{% endif %}
{% endfor %}
{% include "box-templatelist.html" %}
......
{% 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"/></label></p>
</div>
<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 %}
{% load i18n %}
{% get_current_language as LANGUAGE_CODE %}
<form action="/ajax/share/{{base.id}}/" method="post" id="template-wizard">{% csrf_token %}
<form action="/ajax/share/{{base.id}}/" method="post" id="template-wizard">
{% csrf_token %}
<div id="new-share" class="wizard">
<h2>{% blocktrans with t=base.name%}Sharing template: {{t}}{% endblocktrans %}</h2>
<h2>
{% blocktrans with t=base.name%}Sharing template: {{t}}{% endblocktrans %}
</h2>
{% if not group %}
<div class="hilight">
<p style="margin: 5px">{% trans "Choose a group" %}</p>
......@@ -14,7 +17,9 @@
<label for="share-group">{% trans "Group" %}</label>
<select id="share-group-select" name="group"{% if not groups %} disabled=""{%endif%}>
<option value="" selected="" class="dummy">--</option>
{%for i in groups%}<option value="{{i.id}}">{{i.name}} ({{i.members.count}})</option>{%endfor%}
{%for i in groups%}
<option value="{{i.id}}">{{i.name}} ({{i.members.count}})</option>
{%endfor%}
</select>
<div class="clear"></div>
</li>
......@@ -27,38 +32,37 @@
<p>{% trans "Change the parameters as needed." %}</p>
<ul>
<li>
<label for="share-name">{% trans "Name of share" %}</label>
<label for="share-name">{% trans "Name of share" %}</label>
<input type="text" name="name" id="share-name" value="{{base.name}}" />
<div class="clear"></div>
</li>
<li class="li-share-type">
<label for="share-type">{% trans "Type" %}</label>
<ul class="radio">
{% for s in types %}
<li>
<label>
<input type="radio" name="type" value="{{s.id}}" id="share-type-{{s.id}}"
<label for="share-type">{% trans "Type" %}</label>
<ul class="radio">
{% for s in types %}
<li>
<label>
<input type="radio" name="type" value="{{s.id}}" id="share-type-{{s.id}}"
{% if s.default %}checked="checked"{% endif %} />
{{s.verbose_name}}
</label>
</li>
{% endfor %}
</ul>
{% for s in types %}
<p id="share-type-summary-{{s.id}}" class="type-summary clear"
{{s.verbose_name}}
</label>
</li>
{% endfor %}
</ul>
{% for s in types %}
<p id="share-type-summary-{{s.id}}" class="type-summary clear"
{% if not s.default %}style="display:none"{% endif %}>
{{s.help_text}}
{{s.help_text}}
({% if s.suspend %}
<span class="suspend"
title="{% blocktrans with time=s.suspend %}Suspend after {{time}}.{%endblocktrans%}">
{{s.suspendx|timeuntil}}
</span>
{%endif%}{% if s.delete %}<span class="delete"
title="{% blocktrans with time=s.delete %}Delete after {{time}}.{%endblocktrans%}">
{{s.deletex|timeuntil}}</span>{%endif%})
</p>
{% endfor %}
<div class="clear"></div>
<span class="suspend"
title="{% blocktrans with time=s.suspend %}Suspend after {{time}}.{%endblocktrans%}">{{s.suspendx|timeuntil}}</span>
{%endif%}{% if s.delete %}
<span class="delete"
title="{% blocktrans with time=s.delete %}Delete after {{time}}.{%endblocktrans%}">{{s.deletex|timeuntil}}</span>
{%endif%})
</p>
{% endfor %}
<div class="clear"></div>
</li>
<li>
<label for="share-instance-limit">{% trans "Maximal count of instances" %}</label>
......
{% load i18n %}
{% get_current_language as LANGUAGE_CODE %}
<form action="/ajax/templateWizard" method="post" id="template-wizard">{% csrf_token %}
<form action="/ajax/templateWizard" method="post" id="template-wizard">
{% csrf_token %}
<div id="new-template-step-1" class="wizard">
<div class="progress">
<div class="bar-container">
<div class="bar" style="width: 33%"></div>
</div>
<h3>{% blocktrans with step=1 all=3 %}{{step}}/{{all}}{% endblocktrans %}</h3>
<h3>
{% blocktrans with step=1 all=3 %}{{step}}/{{all}}{% endblocktrans %}
</h3>
</div>
<h2>{% blocktrans with step=1 %}Step {{step}}{% endblocktrans %}</h2>
<p class="help">{% trans "Please choose the base system you want to customize." %}</p>
<p class="help">
{% trans "Please choose the base system you want to customize." %}
</p>
<div class="container">
<ul class="tpl-list modal">
{% if not templates %}
......@@ -18,7 +23,12 @@
{% for m in templates %}
<li class="tpl">
<div class="summary">
<div class="name tpl os-{{m.os_type}}" title="{{m.description}}"><label><input type="radio" name="base" value="{{m.id}}" /> {{m.name}}</label></div>
<div class="name tpl os-{{m.os_type}}" title="{{m.description}}">
<label>
<input type="radio" name="base" value="{{m.id}}" />
{{m.name}}
</label>
</div>
<div class="clear"></div>
</div>
</li>
......@@ -56,5 +66,5 @@
})
</script>
</div>
</div>
</div>
</form>
{% load i18n %}
{% get_current_language as LANGUAGE_CODE %}
<form action="/vm/new/{{base.id}}/" method="post" id="template-wizard">{% csrf_token %}
<form action="/vm/new/{{base.id}}/" method="post" id="template-wizard">
{% csrf_token %}
<div id="new-template-step-2" class="wizard">
<div class="progress">
<div class="bar-container">
<div class="bar" style="width: 66%"></div>
</div>
<h3>{% blocktrans with step=2 all=3 %}{{step}}/{{all}}{% endblocktrans %}</h3>
<h3>
{% blocktrans with step=2 all=3 %}{{step}}/{{all}}{% endblocktrans %}
</h3>
</div>
<h2>{% blocktrans with step=2 %}Step {{step}}{% endblocktrans %}</h2>
<p>{% trans "Change the parameters as needed." %}</p>
<ul>
<li>
<label for="new-template-name">{% trans "Name" %}</label>
<label for="new-template-name">{% trans "Name" %}</label>
<input type="text" name="name" id="new-template-name" value="{{base.name}}"
class="error validated" title="{% trans "Please choose a different name." %}" />
<div class="clear"></div>
......@@ -33,7 +36,9 @@
{% for s in sizes %}
<p id="new-template-size-summary-{{s.id}}" class="size-summary clear"
{% if s != base.instance_type %}style="display:none"{% endif %}>
<span class="cpu">{% blocktrans count n=s.CPU %}{{n}} core{% plural %}{{n}} cores{% endblocktrans %}</span>
<span class="cpu">
{% blocktrans count n=s.CPU %}{{n}} core{% plural %}{{n}} cores{% endblocktrans %}
</span>
<span class="memory">{{s.RAM}} MiB</span>
<span class="credit">{{s.credit}}</span>
</p>
......@@ -47,12 +52,13 @@
</li>
</ul>
<nav>
<!-- <a href="#" class="prev">{% trans "&laquo; Cancel" %}</a> -->
<input type="reset" class="prev" value="{% trans "Cancel" %}" />
<input type="submit" class="next" value="{% trans "Launch master instance" %}" />
<div class="clear"></div>
</nav>
<script type="text/javascript">
<!-- <a href="#" class="prev">{% trans "&laquo; Cancel" %}</a>
-->
<input type="reset" class="prev" value="{% trans "Cancel" %}" />
<input type="submit" class="next" value="{% trans "Launch master instance" %}" />
<div class="clear"></div>
</nav>
<script type="text/javascript">
$(function(){
$('#new-template-step-2 nav .prev').click(function(){
$('#modal').hide();
......@@ -85,5 +91,5 @@
});
})
</script>
</div>
</div>
</form>
......@@ -24,57 +24,61 @@
{% if i.template.state != "READY" %}
<div class="contentblock wide note big">
<p>{% blocktrans %}This is a master image for your new template.{% endblocktrans %}</p>
<form action="{% url one.views.vm_saveas id %}" method="POST">{% csrf_token %}
<p>
{% blocktrans %}This is a master image for your new template.{% endblocktrans %}
</p>
<form action="{% url one.views.vm_saveas id %}" method="POST">
{% csrf_token %}
{% if i.template.state == "NEW" %}
<p style="float: right; margin-top:2em;margin-right:1em;">
<input type="submit" value="{% trans "Save" %}" class="big" style="background-color:rgba(102, 255, 0, 0.4)" />
</p>
<p style="float: right; margin-top:2em;margin-right:1em;">
<input type="submit" value="{% trans "Save" %}" class="big" style="background-color:rgba(102, 255, 0, 0.4)" />
</p>
{% endif %}
</form>
<ol>
<li{% if i.template.state == "SAVING" %} class="done"{%endif%}>{% blocktrans %}Connect to the machine.{% endblocktrans %}</li>
<li{% if i.template.state == "SAVING" %} class="done"{%endif%}>{% blocktrans %}Do all the needed installation/customization.{% endblocktrans %}</li>
<li{% if i.template.state == "SAVING" %} class="done"{%endif%}>{% blocktrans %}Log off (keep the machine running).{% endblocktrans %}</li>
<li{% if i.template.state == "SAVING" %} class="done"{%endif%}>{% blocktrans %}Click on the "save" button on the right.{% endblocktrans %}</li>
<li>{% blocktrans %}The machine will be shut down and its disk saved.{% endblocktrans %}</li>
<li>{% blocktrans %}You can share the template with your groups.{% endblocktrans %}</li>
<li{% if i.template.state == "SAVING" %} class="done"{%endif%}>
{% blocktrans %}Do all the needed installation/customization.{% endblocktrans %}
</li>
<li{% if i.template.state == "SAVING" %} class="done"{%endif%}>
{% blocktrans %}Log off (keep the machine running).{% endblocktrans %}
</li>
<li{% if i.template.state == "SAVING" %} class="done"{%endif%}>
{% blocktrans %}Click on the "save" button on the right.{% endblocktrans %}
</li>
<li>
{% blocktrans %}The machine will be shut down and its disk saved.{% endblocktrans %}
</li>
<li>
{% blocktrans %}You can share the template with your groups.{% endblocktrans %}
</li>
</ol>
</div>
{% endif %}
<div class="boxes">
<div class="contentblock wm" id="state">
<h2>{{name}}</h2>
<div class="content">
{% if state == "PENDING" or state == "ACTIVE" and booting %}
{% if state == "PENDING" or state == "ACTIVE" and booting %}
<p style="font-size:25px; line-height:2em;text-align:center;">
<img src="/static/load.gif" />
{% trans "Starting..." %}
</p>
{% elif state == "ACTIVE" and not booting %}
{% elif state == "ACTIVE" and not booting %}
<p id="connect" style="display:block; font-size:25px; line-height:2em;text-align:center;">
<a href="{{uri}}" class="button" onclick="return connectbutton();">
<img src="/static/load.gif" id="connecting" style="display:none;" />
{% trans "Running" %}
</a>
</p>
{% elif state == "STOPPED" %}
<p style="font-size:25px; line-height:2em;text-align:center;">
{% trans "Stopped" %}
</p>
{% endif %}
{% elif state == "STOPPED" %}
<p style="font-size:25px; line-height:2em;text-align:center;">{% trans "Stopped" %}</p>
{% endif %}
{% if state == "DONE" %}
<p style="font-size:25px; line-height:2em;text-align:center;">
{% trans "Deleted" %}
</p>
{% endif %}
<p style="font-size:25px; line-height:2em;text-align:center;">{% trans "Deleted" %}</p>
{% endif %}
{% if state == "FAILED" %}
<p style="font-size:25px; line-height:2em;text-align:center;">
{% trans "Unexpected error occured" %}
</p>
<p style="font-size:25px; line-height:2em;text-align:center;">{% trans "Unexpected error occured" %}</p>
{% endif %}
</div>
</div>
......
{% load i18n %}
{% get_current_language as LANGUAGE_CODE %}
<div class="content">
<table>
<tr>
<th>{% trans "Protocol" %}:</th>
<td>{{i.template.access_type|upper}}</td>
</tr>
<tr>
<th>{% trans "IP" %}:</th>
<td>{{ i.firewall_host.pub_ipv4 }}</td>
</tr>
<tr>
<th>{% trans "Port" %}:</th>
<td>{{ i.get_port}}</td>
</tr>
<tr>
<th>{% trans "Username" %}:</th>
<td>cloud</td>
</tr>
<tr>
<th>{% trans "Password" %}:</th>
<td>{{ i.pw }}</td>
</tr>
</table>
</div>
<div class="content">
<table>
<tr>
<th>{% trans "Protocol" %}:</th>
<td>{{i.template.access_type|upper}}</td>
</tr>
<tr>
<th>{% trans "IP" %}:</th>
<td>{{ i.firewall_host.pub_ipv4 }}</td>
</tr>
<tr>
<th>{% trans "Port" %}:</th>
<td>{{ i.get_port}}</td>
</tr>
<tr>
<th>{% trans "Username" %}:</th>
<td>cloud</td>
</tr>
<tr>
<th>{% trans "Password" %}:</th>
<td>{{ i.pw }}</td>
</tr>
</table>
</div>
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