+++ /dev/null
-// Copyright 2009 FriendFeed
-//
-// Licensed under the Apache License, Version 2.0 (the "License"); you may
-// not use this file except in compliance with the License. You may obtain
-// a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
-// License for the specific language governing permissions and limitations
-// under the License.
-
-$(document).ready(function() {
- if (!window.console) window.console = {};
- if (!window.console.log) window.console.log = function() {};
-
- $("#messageform").live("submit", function() {
- newMessage($(this));
- return false;
- });
- $("#messageform").live("keypress", function(e) {
- if (e.keyCode == 13) {
- newMessage($(this));
- return false;
- }
- });
- $("#message").select();
- updater.start();
- updater.poll();
-});
-
-function newMessage(form) {
- var message = form.formToDict();
- var disabled = form.find("input[type=submit]");
- disabled.disable();
- $.postJSON("/poll/a/message/new", message, function(response) {
- updater.showMessage(response);
- if (message.id) {
- form.parent().remove();
- } else {
- form.find("input[type=text]").val("").select();
- disabled.enable();
- }
- });
-}
-
-function getCookie(name) {
- var r = document.cookie.match("\\b" + name + "=([^;]*)\\b");
- return r ? r[1] : undefined;
-}
-
-jQuery.postJSON = function(url, args, callback) {
- args._xsrf = getCookie("_xsrf");
- $.ajax({url: url, data: $.param(args), dataType: "text", type: "POST",
- success: function(response) {
- if (callback) callback(eval("(" + response + ")"));
- }, error: function(response) {
- console.log("ERROR:", response)
- }});
-};
-
-jQuery.fn.formToDict = function() {
- var fields = this.serializeArray();
- var json = {}
- for (var i = 0; i < fields.length; i++) {
- json[fields[i].name] = fields[i].value;
- }
- if (json.next) delete json.next;
- return json;
-};
-
-jQuery.fn.disable = function() {
- this.enable(false);
- return this;
-};
-
-jQuery.fn.enable = function(opt_enable) {
- if (arguments.length && !opt_enable) {
- this.attr("disabled", "disabled");
- } else {
- this.removeAttr("disabled");
- }
- return this;
-};
-
-var updater = {
- errorSleepTime: 500,
- cursor: null,
-
- start: function() {
- var args = {"_xsrf": getCookie("_xsrf")};
- if (updater.cursor) args.cursor = updater.cursor;
- $.ajax({url: "/poll/a/message/existing", type: "POST", dataType: "text",
- data: $.param(args), success: updater.onFetchExisting,
- error: updater.onError});
- },
-
- poll: function() {
- var args = {"_xsrf": getCookie("_xsrf")};
- if (updater.cursor) args.cursor = updater.cursor;
- $.ajax({url: "/poll/a/message/updates", type: "POST", dataType: "text",
- data: $.param(args), success: updater.onSuccess,
- error: updater.onError});
- },
-
- onSuccess: function(response) {
- try {
- updater.newMessages(eval("(" + response + ")"));
- } catch (e) {
- updater.onError();
- return;
- }
- updater.errorSleepTime = 500;
- window.setTimeout(updater.poll, 0);
- },
-
- onFetchExisting: function(response) {
- try {
- updater.existingMessages(eval("(" + response + ")"));
- } catch (e) {
-// updater.onError();
- return;
- }
- },
-
- onError: function(response) {
- updater.errorSleepTime *= 2;
- console.log("Poll error; sleeping for", updater.errorSleepTime, "ms");
- window.setTimeout(updater.poll, updater.errorSleepTime);
- },
-
- newMessages: function(response) {
- if (!response.messages) return;
- updater.cursor = response.cursor;
- var messages = response.messages;
- updater.cursor = messages[messages.length - 1].id;
- console.log(messages.length, "new messages, cursor:", updater.cursor);
-
- for (var i = 0; i < messages.length; i++) {
- updater.showMessage(messages[i]);
- }
- if (($('#console').dialog('isOpen')) == false){
- blink("#consolebutton");
- }
- },
-
- existingMessages: function(response) {
- if (!response.messages) return;
- updater.cursor = response.cursor;
- var messages = response.messages;
- updater.cursor = messages[messages.length - 1].id;
- for (var i = 0; i < messages.length; i++) {
- updater.showMessage(messages[i]);
- }
- },
-
- showMessage: function(message) {
- var existing = $("#m" + message.id);
- if (existing.length > 0) return;
- var node = $(message.html);
- node.hide();
-// $('#inbox').val($('#inbox').val()+message.text);
- $("#inbox").append(node);
- node.slideDown();
- }
-};
-
-function blink(selector){
- $(selector).animate({ color: "red" }, 500, function(){
- $(this).animate({ color: "#555555" }, 500, function(){
- blink(this);
- });
- });
-}
-
+++ /dev/null
-{% extends "base.html" %}
-{% block extrahead %}
-<script type="text/javascript" src="/static/js/jquery.dataTables.js"></script>
-<script type="text/javascript">
- $(document).ready( function(){
- $('#vm_instance_table').dataTable( {
- "bJQueryUI": true,
- "oLanguage": {
- "sLengthMenu": 'Display <select><option value="25">25</option><option value="50">50</option><option value="-1">All</option></select> instances'
- },
- "iDisplayLength": 25,
- } );
- });
-</script>
-{% endblock %}
-{% block title %}{{ object.hostname|safe }}{% endblock %}
-{% block content %}
-
-<h3>Cluster {{ object.hostname }}</h3>
-
-<table class="display" width="100%" id="vm_instance_table">
-<thead>
-<tr><th>Name</th><th>Primary node</th>
-<th>Memory</th><th>Current memory</th><th>Status</th></tr>
-</thead>
-<tbody>
-{% for instance in object.get_instances %}
-{% for myuser in instance.users %}
-{% ifequal myuser user %}
-
-<tr {% if instance.admin_state %} class="GradeA" {% else %} class="GradeX" {% endif %}><td><a href="{% url instance-detail object.slug instance.name %}">{{ instance.name }}</a></td>
-<td>{{ instance.pnode }}</td><td>{{ instance.beparams.memory }}</td><td>{{ instance.oper_ram }}</td>
-<td>{% ifequal instance.admin_state instance.oper_state %}
-{{ instance.admin_state|yesno:"Running,Stopped" }}
-{% else %}
-{{ instance.oper_state|yesno:"Running,Stopped" }}, should be {{ instance.admin_state|yesno:"running,stopped" }}
-{% endifequal %}
-</td></tr>
-
-{% endifequal %}
-{% endfor %}
-{% endfor %}
-</tbody>
-</table>
-{% with object.get_cluster_info as info %}
-<table class="instances_table" width="35%">
-<tr><th class="table_top_header" colspan=2>Cluster Details</th></tr>
-<tr><td class="table_title">Architecture</td><td>{{ info.architecture.0 }}</td></tr>
-<tr><td class="table_title">Default hypervisor</td><td>{{ info.default_hypervisor }}</td></tr>
-<tr><td class="table_title">Available hypervisors</td><td>{{ info.enabled_hypervisors|join:", " }}</td></tr>
-<tr><td class="table_title">Master node</td><td>{{ info.master }}</td></tr>
-<tr><td class="table_title">Created</td><td>{% if info.ctime %}{{ info.ctime|date }}{% else %}<em>unknown</em>{% endif %}</td></tr>
-<tr><td class="table_title">Last modified</td><td>{{ info.mtime|date }}</td></tr>
-</table>
-{% endwith %}
-
-{% endblock %}
+++ /dev/null
-{% extends "base.html" %}
-{% block title %}Overview{% endblock %}
-{% block extrahead %}
-<script type="text/javascript" src="/static/js/jquery.dataTables.js"></script>
-<script type="text/javascript">
- $(document).ready( function(){
- $('#cluster_overview_table').dataTable( {
- "bJQueryUI": true,
- "oLanguage": {
- "sLengthMenu": 'Display <select><option value="25">25</option><option value="50">50</option><option value="-1">All</option></select> clusters'
- },
- "iDisplayLength": 25,
- } );
- });
-</script>
-{% endblock %}
-{% block content %}
-<h3>Clusters Overview</h3>
-<table class="display" width="100%" id="cluster_overview_table">
- <thead>
- <tr>
- <th>Cluster</th>
- <th>Nodes</th>
- <th>Hypervisors</th>
- <th>Default hypervisor</th>
- <th>Master node</th>
- <th>Ganeti version</th>
- </tr>
- </thead>
- <tbody>
-{% for cluster in object_list %}
- <tr class="GradeA">
- <td>
- <a href="{% url cluster_detail cluster.slug %}">{{ cluster.hostname }}</a>
- </td>
- <td>
- {% with cluster.get_cluster_nodes as nodes %}
- <!--{{ nodes|length }} node{{ nodes|pluralize }}-->
-
- {% for node in nodes %}
- <div>{{ node.id }}</div>
- {% endfor %}
-
- {% endwith %}
- </td>
-
- {% with cluster.get_cluster_info as info %}
- <td>{{ info.enabled_hypervisors|join:", " }}</td>
- <td>{{ info.default_hypervisor }}</td>
- <td>{{ info.master }}</td>
- <td>{{ info.software_version }}</td>
- {% endwith %}
-
- </tr>
-
-{% endfor %}
-</tbody>
-</table>
-
-{% endblock %}
+++ /dev/null
-{% extends "base.html" %}
-{% load i18n %}
-{% block title %}{{ instance.name }} on {{ instance.cluster.description }}{% endblock %}
-{% block extrahead %}
-<style type="text/css">
- #toolbar {
- padding: 10px 4px;
- }
-
-</style>
-<script type="text/javascript">
-var polltimer;
-var timer = 2500;
-var load_data = function () {
- $.ajax({
- type: 'GET',
- url: '{% url instance-poll cluster.slug instance.name %}',
- dataType: 'html',
- success: function(data) {
- $('#actions_container').html(data);
- if ($('#show_no_actions').size()==1){
- $('#conf_form').hide();
- }else if ($('#show_no_actions').size()==0){
- $('#conf_form').show();
- }
- $("#status").html($("#instance_status").html());
- polltimer = setTimeout(load_data, timer);
- }
- });
- }
-$(function() {
- load_data();
-});
-
-</script>
-{% endblock %}
-
-{% block breadcrumbs %}:: {{ instance.name }} {% endblock %}
-
-{% block content %}
-{% load disksizes %}
-
-
-<h3>{{ instance.name }}</h3>
-<div id="fl_l">
-<table class="instance_det_table">
-<tr><th class="table_top_header" colspan=2>{% trans "Details" %}</th></tr>
-<tr><td class="table_title">{% trans "Status" %}</td><td id="status"></td></tr>
-<tr><td class="table_title">{% trans "Cluster" %}</td><td>{{ instance.cluster.description }}</td></tr>
-<tr><td class="table_title">{% trans "Memory" %}</td><td>{{ instance.beparams.memory|memsize }}</td></tr>
-<tr><td class="table_title">{% trans "CPUs" %}</td><td>{{ instance.beparams.vcpus }}</td></tr>
-<tr><td class="table_title">Hard disk{{ instance.disk_sizes|pluralize }}</td><td>{{ instance.disk_sizes|disksizes|join:", " }}</td></tr>
-<tr><td class="table_title">{% trans "Network cards" %}</td><td>{{ instance.nic_macs|length }}</td></tr>
-<tr><td class="table_title">MAC address{{ instance.nic_macs|pluralize:"es" }}</td><td>{{ instance.nic_macs|join:", " }}</td></tr>
-{% if instance.nic_ips %}
-<tr><td class="table_title">IP address{{ instance.nic_ips|pluralize:"es" }}</td><td>{{ instance.nic_ips|join:", " }}</td></tr>
-{% endif %}
-<tr><td class="table_title">{% trans "Created on" %}</td><td>{{ instance.ctime|date }}</td></tr>
-<tr><td class="table_title">{% trans "Last modified" %}</td><td>{{ instance.mtime|date }}</td></tr>
-</table>
-</div>
-
-
-<div id="configuration">
-
-<form method="post" align="center" id="conf_form">
-{% csrf_token %}
-<table class="conf_table">
- <tr><th colspan="2" style="text-align:center;" class="table_topper_header">{% trans "Configuration" %}</th></tr>
-{{ configform.as_table }}
-<tr><td colspan="2" style="text-align:center; padding: 5px;" ><input style="font-size: 12px;" id="update" type="Submit" value="Update" /></td></tr>
-
-</table>
-
-</form>
-
-<table class="actions_table">
-<tr><th class="table_top_header" colspan=3 style="text-align: center;">{% trans "Actions" %}</th></tr>
-<tr>
- <td id="actions_container"> </td>
- <!-- Here a setTimeout jquery script populates the instance control every 5 seconds -->
-</tr>
-</table>
-</div>
-
-{% endblock %}
+++ /dev/null
-<script type="text/javascript">
- $(function(){
- $( "#start" )
- .button({
- icons: {
- secondary: "ui-icon-play"
- }
- });
-
- $( "#shutdown" )
- .button({
- icons: {
- secondary: "ui-icon-power"
- }
- });
-
- $( "#reboot" )
- .button({
- icons: {
- secondary: "ui-icon-arrowrefresh-1-s"
- }
- });
-
-
- $( "#console" )
- .button({
- icons: {
- secondary: "ui-icon-image"
- }
- });
- $( "#update" )
- .button({
- icons: {
- secondary: "ui-icon-check"
- }
- });
-
- $( "#start" )
- .click(function() {
- clearTimeout(polltimer);
- $.ajax({
- type: 'POST',
- url: "{% url instance-startup cluster.slug instance.name %}",
- dataType: 'json',
- success: function(data) {
- $("#actions_container_inner").empty();
- $("#actions_container_inner").html("<td>"+data.action+"<td>");
- setTimeout(load_data, 0);
-
- }
- });
- return false; });
-
- $( "#shutdown" )
- .click(function() {
- clearTimeout(polltimer);
- $.ajax({
- type: 'POST',
- url: "{% url instance-shutdown cluster.slug instance.name %}",
- dataType: 'json',
- success: function(data) {
- $("#actions_container_inner").empty();
- $("#actions_container_inner").html("<td>"+data.action+"<td>");
- setTimeout(load_data, 0);
-
- }
- });
- return false; });
-
- $( "#reboot" )
- .click(function() {
- clearTimeout(polltimer);
- $.ajax({
- type: 'POST',
- url: "{% url instance-reboot cluster.slug instance.name %}",
- dataType: 'json',
- success: function(data) {
- $("#actions_container_inner").empty();
- $("#actions_container_inner").html("<td>"+data.action+"<td>");
- setTimeout(load_data, 0);
-
- }
- });
- return false; });
-
-});
-</script>
-{% load i18n %}
-<table>
-{% if not instance.is_locked %}
- {% if instance.oper_state %}
- <tr id="actions_container_inner">
- <td><a id="shutdown" href="#">{% trans "Shutdown" %}</a></td>
- <td><a id="reboot" href="#">{% trans "Reboot" %}</a></td>
- <td><a id="console" href="{% url instance-vnc cluster.slug instance.name %}">{% trans "Console" %}</a></td>
- </tr>
- {% else %}
- <tr id="actions_container_inner">
- <td colspan=3><a id="start" href="#">{% trans "Start" %}</a></td>
- </tr>
- {% endif %}
-{% else %}
- <tr id="actions_container_inner">
- <td id="show_no_actions"><em>{{ instance.is_locked|capfirst }}</em></td>
- </tr>
-{% endif %}
-
-</table>
-
-<div id="instance_status" style="display:none;">{{ instance.oper_state|yesno:"Running,Stopped" }}</div>
+++ /dev/null
-{% extends "base.html" %}
-{% load i18n %}
-{% block title %}{% trans "Instance owners" %}{% endblock %}
-{% block breadcrumbs %}:: {% trans "Instance owners" %}{% endblock %}
-{% block content %}
-{% regroup instances by users as user_instances %}
-
-{% for user_list in user_instances %}
-<p>
-{% for i in user_list.list %}
-<em><a href="{% url instance-detail i.cluster.slug i.name %}">{{ i.name }}</a></em><br />
-{% endfor %}
-</p>
-
-<table>
-<tr><th>{% trans "Username" %}</th><th>{% trans "Name" %}</th><th>{% trans "E-mail" %}</th></tr>
-{% for u in user_list.grouper %}
-<tr><td>{{ u.username }}</td><td>{{ u.get_full_name }}</td><td>{{ u.email }}</td></tr>
-{% endfor %}
-</table>
-<hr />
-
-{% endfor %}
-{% endblock %}
+++ /dev/null
-{% extends "base.html" %}
-{% load i18n %}
-{% block title %}{% trans "Login" %}{% endblock %}
-{% block brcrmb_container %}{% endblock %}
-{% block content %}
-<div id="welcome">
-<h3>{% trans "Welcome" %}</h3>
-{% blocktrans %}
-<p>Welcome to GRNET's ViMa service.</p>
-<p>If you are new to the service, take some time to read the service description <a href="/about/info">here</a> and then register for a new account.</p>
-<p>If you already have an account, you can log in using the form on the right.</p>
-<p>For troubleshooting info and remarks do not hesitate to contact GRNET's Helpdesk.</p>
-{% endblocktrans %}</p>
-</div>
-
-<div id="loginform">
-<h3>{% trans "Login" %}</h3>
-{% if form.errors %}
-<p class="error" style="color:red">{% trans "Your username and password didn't match. Please try again." %}</p>
-{% endif %}
-
-<form method="post" action="{% url login %}">
-{% csrf_token %}
-<table>
-<tr>
- <td>{{ form.username.label_tag }}</td>
- <td>{{ form.username }}</td>
-</tr>
-<tr>
- <td>{{ form.password.label_tag }}</td>
- <td>{{ form.password }}</td>
-</tr>
-</table>
-
-<input type="submit" value="{% trans "Login" %}" />
-<input type="hidden" name="next" value="/" />
-</form>
-</div>
-{% endblock %}
+++ /dev/null
-<!DOCTYPE html>
-<html>
-<head>
- <meta charset="utf-8">
- <meta name="viewport" content="width=device-width, minimum-scale=1, maximum-scale=1">
- <title>GRNET VM mgmt</title>
- <link rel="stylesheet" href="http://code.jquery.com/mobile/1.0a4.1/jquery.mobile-1.0a4.1.min.css" />
- <script type="text/javascript" src="http://code.jquery.com/jquery-1.5.min.js"></script>
-
- <script type="text/javascript" src="http://code.jquery.com/mobile/1.0a4.1/jquery.mobile-1.0a4.1.min.js"></script>
-</head>
-<body>
-<div data-role="page" data-theme="b" id="grnet_vm">
- <!-- start header -->
-<div data-role="header" data-nobackbtn="true" data-backbtn="false">
- {% block headerextras %}{%endblock%}
- <h1>GRNET VM mgmt</h1>
- {% if not user.is_authenticated %}
- <a href="{% url loginpage %}" data-rel="dialog" class="ui-btn-right">Login</a>
- {% else %}<a class="ui-btn-right" href="{% url logout %}" rel="external">Logout</a> {% endif %}
-</div>
-<!-- end header -->
-
- <div data-role="content">
- {% block content %}{% endblock %}
- </div>
-</div>
-</body>
-</html>
+++ /dev/null
-{% extends "m_base.html" %}
-
-{% block headerextras %}
-<a href="/" data-icon="arrow-l">Clusters</a>
-{% endblock %}
-{% block content %}
-
-<ul data-role="listview" data-inset="true" data-theme="c" data-dividertheme="b">
- <li data-role="list-divider">VMs at {{object.hostname}}</li>
- {% for instance in object.get_instances %}
-{% for myuser in instance.users %}
-{% ifequal myuser user %}
-<li><a href="{% url instance-detail object.slug instance.name %}">
- <h3>{{ instance.name }}</h3>
- <p><strong>Status</strong>:{% ifequal instance.admin_state instance.oper_state %}
-{{ instance.admin_state|yesno:"Running,Stopped" }}
-{% else %}
-{{ instance.oper_state|yesno:"Running,Stopped" }}, should be {{ instance.admin_state|yesno:"running,stopped" }}
-{% endifequal %}</p>
-<p><strong>Pnode</strong>:{{ instance.pnode }}</p>
-<p><strong>Mem</strong>:{{ instance.beparams.memory }}</p>
- </a></li>
-{% endifequal %}
-{% endfor %}
-
- {% endfor %}
- </ul>
-
-{% endblock %}
+++ /dev/null
-{% extends "m_base.html" %}
-{% block content %}
-<ul data-role="listview" data-inset="true" data-theme="c" data-dividertheme="b">
- <li data-role="list-divider">Clusters</li>
- {% for cluster in object_list %}
- <li><a href="{% url cluster_detail cluster.slug %}">
- <h3>{{ cluster.hostname }}</h3>
- {% with cluster.get_cluster_info as info %}
- <p><strong>Ganeti version</strong>: {{ info.software_version }}</p>
- <p><strong>Master node</strong>: {{ info.master }}</p>
- {% endwith %}
- </a></li>
- {% endfor %}
- </ul>
-{% endblock %}
+++ /dev/null
-{% extends "m_base.html" %}
-{% load truncatedchars %}
-{% block headerextras %}
-<a href="{% url cluster_detail cluster.slug %}" data-icon="arrow-l">{{ cluster.hostname|truncchar:10 }}</a>
-{% endblock %}
-
-{% block content %}
-
-<h3>{{ instance.name }}</h3>
-<div class="ui-grid-a">
- {% if instance.oper_state %}
- {% if instance.admin_state %}
-
-<div class="ui-block-a"><a data-role="button" href="{% url instance-reboot cluster.slug instance.name %}">Reboot</a></div>
- <div class="ui-block-b"><a data-role="button" href="{% url instance-shutdown cluster.slug instance.name %}" data-theme="a">Shutdown</a></div>
- {% else %}
- <em>Instance is shutting down, no actions allowed</em>
- {% endif %}
-{% else %}
-<a data-role="button" href="{% url instance-startup cluster.slug instance.name %}">Start</a>
-{% endif %}
-
-</div><!-- /grid-a -->
-
-<!--<div id="configuration">
-{% ifnotequal instance.oper_state instance.admin_state %}
-<em>No configuration allowed at this time</em>
-{% else %}
-<form method="post" align="center">
- {% csrf_token %}
- {% for field in configform %}
- <div data-role="fieldcontain">
- {{ field.label_tag }}: {{ field }}
- </div>
- {% endfor %}
-
- <div class="ui-body ui-body-b">
- <fieldset class="ui-grid-a">
- <div class="ui-block-a"><button type="submit" data-theme="d">Cancel</button></div>
- <div class="ui-block-b"><button type="submit" data-theme="a">Submit</button></div>
-
- </fieldset>
- </div>
-
-
-</form>
-{% endifnotequal %}
-</div>-->
-
-
-{% endblock %}
+++ /dev/null
-<!DOCTYPE html>
-<html>
-<head>
- <meta charset="utf-8">
- <meta name="viewport" content="width=device-width, minimum-scale=1, maximum-scale=1">
- <link rel="stylesheet" href="http://code.jquery.com/mobile/1.0a4.1/jquery.mobile-1.0a4.1.min.css" />
- <script type="text/javascript" src="http://code.jquery.com/jquery-1.5.min.js"></script>
- <script type="text/javascript" src="http://code.jquery.com/mobile/1.0a4.1/jquery.mobile-1.0a4.1.min.js"></script>
-
-</head>
-<body>
- <div data-role="page" data-theme="b" id="jqm-home">
-
-<!-- start header -->
-<div data-role="header">
- <h1>Login</h1>
- <a href="/" class="ui-btn-right">Cancel</a>
-</div>
-<div data-role="content" data-inset="true">
-<!-- end header -->
- {% if not user.is_authenticated %}
- <form id="formcontent" method="post" action="{% url login %}">
- {% csrf_token %}
- <label for="username">username </label><input name="username" type="text"></input>
- <label for="password">password </label><input name="password" type="password"></input>
- <input type="submit" value="login" />
- </form>
- {% endif %}
- </div>
- </div>
-</body>
+++ /dev/null
-<div id="usermailchange_placeholder">
-<script>
- $(document).ajaxSend(function(event, xhr, settings) {
- 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]);
- // Does this cookie string begin with the name we want?
- if (cookie.substring(0, name.length + 1) == (name + '=')) {
- cookieValue = decodeURIComponent(cookie.substring(name.length + 1));
- break;
- }
- }
- }
- return cookieValue;
- }
- function sameOrigin(url) {
- // url could be relative or scheme relative or absolute
- var host = document.location.host; // host + port
- var protocol = document.location.protocol;
- var sr_origin = '//' + host;
- var origin = protocol + sr_origin;
- // Allow absolute or scheme relative URLs to same origin
- return (url == origin || url.slice(0, origin.length + 1) == origin + '/') ||
- (url == sr_origin || url.slice(0, sr_origin.length + 1) == sr_origin + '/') ||
- // or any other URL that isn't scheme relative or absolute i.e relative.
- !(/^(\/\/|http:|https:).*/.test(url));
- }
- function safeMethod(method) {
- return (/^(GET|HEAD|OPTIONS|TRACE)$/.test(method));
- }
-
- if (!safeMethod(settings.type) && sameOrigin(settings.url)) {
- xhr.setRequestHeader("X-CSRFToken", getCookie('csrftoken'));
- }
-});
-
- $(function() {
- $('#change_email_btn').button();
- $('#change_email_btn').click(function() {
- str = $('#change_email_form').serialize();
- $.ajax({
- type: "POST",
- url: "{% url mail-change %}",
- data: str,
- success: function(response){
-// console.log(response);
-// var $response=$(response);
-// var resdata = $response.filter("#sshkeys_placeholder").html();
- $("#usermailchange_placeholder").html(response);
- }
- });
- return false;
- });
- });
- </script>
- {% load i18n %}
-<div>{{user}} {% trans "enter your new mail address twice so we can verify you typed it in correctly." %}</div>
-<div>{% trans "Your e-mail" %} {% if changed %} {% trans "has successfully changed to" %} {% endif %}: <strong>{% ifequal mail|length 0 %} {% trans "you have not registered an address yet" %} {% else %}{{mail}}{% endifequal %}</strong></div>
-<form method="POST" id="change_email_form">
-{% csrf_token %}
- <table>
- {{ form.as_table }}
- </table>
-<button id="change_email_btn">{% trans "Change email" %}</button>
-</form>
-
-</div>
+++ /dev/null
-<div id="user_namechange_placeholder">
-<script>
- $(document).ajaxSend(function(event, xhr, settings) {
- 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]);
- // Does this cookie string begin with the name we want?
- if (cookie.substring(0, name.length + 1) == (name + '=')) {
- cookieValue = decodeURIComponent(cookie.substring(name.length + 1));
- break;
- }
- }
- }
- return cookieValue;
- }
- function sameOrigin(url) {
- // url could be relative or scheme relative or absolute
- var host = document.location.host; // host + port
- var protocol = document.location.protocol;
- var sr_origin = '//' + host;
- var origin = protocol + sr_origin;
- // Allow absolute or scheme relative URLs to same origin
- return (url == origin || url.slice(0, origin.length + 1) == origin + '/') ||
- (url == sr_origin || url.slice(0, sr_origin.length + 1) == sr_origin + '/') ||
- // or any other URL that isn't scheme relative or absolute i.e relative.
- !(/^(\/\/|http:|https:).*/.test(url));
- }
- function safeMethod(method) {
- return (/^(GET|HEAD|OPTIONS|TRACE)$/.test(method));
- }
-
- if (!safeMethod(settings.type) && sameOrigin(settings.url)) {
- xhr.setRequestHeader("X-CSRFToken", getCookie('csrftoken'));
- }
-});
-
- $(function() {
- $('#change_name_btn').button();
- $('#change_name_btn').click(function() {
- str = $('#change_name_form').serialize();
- $.ajax({
- type: "POST",
- url: "{% url name-change %}",
- data: str,
- success: function(response){
- $("#user_namechange_placeholder").html(response);
- }
- });
- return false;
- });
- });
- </script>
- {% load i18n %}
-<div><strong>{{user}}</strong>, {% trans "enter your first and last name" %}.</div>
-<div>{% trans "Your name" %}{% if changed %} {% trans "was successfully changed" %}{% endif %}: <strong>{% ifequal name|length 0 %}{% trans "we don't know your name yet" %}{% else %}{{name}}{% endifequal %}</strong></div>
-<form method="POST" id="change_name_form">
-{% csrf_token %}
- <table>
- {{ form.as_table }}
- </table>
-<button id="change_name_btn">{% trans "Change" %}</button>
-</form>
-
-</div>
+++ /dev/null
-<div id="pass_form_placeholder">
-<script>
- $(document).ajaxSend(function(event, xhr, settings) {
- 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]);
- // Does this cookie string begin with the name we want?
- if (cookie.substring(0, name.length + 1) == (name + '=')) {
- cookieValue = decodeURIComponent(cookie.substring(name.length + 1));
- break;
- }
- }
- }
- return cookieValue;
- }
- function sameOrigin(url) {
- // url could be relative or scheme relative or absolute
- var host = document.location.host; // host + port
- var protocol = document.location.protocol;
- var sr_origin = '//' + host;
- var origin = protocol + sr_origin;
- // Allow absolute or scheme relative URLs to same origin
- return (url == origin || url.slice(0, origin.length + 1) == origin + '/') ||
- (url == sr_origin || url.slice(0, sr_origin.length + 1) == sr_origin + '/') ||
- // or any other URL that isn't scheme relative or absolute i.e relative.
- !(/^(\/\/|http:|https:).*/.test(url));
- }
- function safeMethod(method) {
- return (/^(GET|HEAD|OPTIONS|TRACE)$/.test(method));
- }
-
- if (!safeMethod(settings.type) && sameOrigin(settings.url)) {
- xhr.setRequestHeader("X-CSRFToken", getCookie('csrftoken'));
- }
-});
-
- $(function() {
- $('#passformbtn').button();
- $('#passformbtn').click(function() {
- str = $('#password_change_form').serialize();
- $.ajax({
- type: "POST",
- url: "{% url pass_change %}?csrf_token={{csrf_token}}",
- data: str,
- success: function(msg){
- $("#pass_form_placeholder").html(msg);
- }
- });
- return false;
- });
- });
- </script>
-{% load i18n %}
-<strong>{{user}}</strong>, {% trans "please enter your old password, for security's sake, and then enter your new password twice so we can verify you typed it in correctly." %}
-<form method="post" align="left" id="password_change_form">{% csrf_token %}
-{{form.as_p}}
-<button id="passformbtn">{% trans "Change" %}</button>
-</form>
-</div>
\ No newline at end of file
+++ /dev/null
-{% load i18n %}
-<div>{% trans "Password changed" %} <span style="color: green; font-size: 1.1em;">{% trans "successfully" %}</span></div>
+++ /dev/null
-{% extends "base.html" %}
-{% load i18n %}
-{% block title %}{% trans "Activation Complete" %}{% endblock %}
-{% block brcrmb_container %}{% endblock %}
-{% block content %}
-<div align="center" id="registration">
- <h3>{% trans "Activation Status" %}</h3>
-{% if account %}
- <p>{{account}} {% trans "succesfully activated" %}</p>
-{% else %}
- <p>{% trans "The user has probably been already activated." %}</p>
-{% endif %}
-</div>
-{% endblock %}
+++ /dev/null
-{% extends "base.html" %}
-{% load i18n %}
-{% block title %}{% trans "Activation Complete" %}{% endblock %}
-{% block brcrmb_container %}{% endblock %}
-{% block content %}
-<div align="center" id="registration">
-<h3>{% trans "Activation Complete" %}</h3>
-<p>{% trans "The user will be notified about his/her account activation" %}</p>
-</div>
-{% endblock %}
+++ /dev/null
-Ο λογαριασμός σας με όνομα χρήστη «{{user.username}}» ενεργοποιήθηκε.
-Μπορείτε να χρησιμοποιήσετε την υπηρεσία ViMa, κάνοντας login στην παρακάτω
-διεύθυνση:
-
- http://{{ site.domain }}{% url login %}
-
----------------------------------------------------------------------------
-Your account with username “{{ user.username }}” has been activated.
-You may login to ViMa using the following URL:
-
- http://{{ site.domain }}{% url login %}
+++ /dev/null
-Activation complete
\ No newline at end of file
+++ /dev/null
-Ο/H {{ user.get_full_name }} έκανε αίτηση για νεό λογαριασμό στην υπηρεσία.
-
-Όνομα χρήστη: {{ user.username }}
-E-mail: {{ user.email }}
-
-Για να ενεργοποιήσετε το λογαριασμό και να επιτρέψετε στο χρήστη να
-χρησιμοποιήσει την υπηρεσία, επισκευθείτε τον ακόλουθο σύνδεσμο:
-
-http://{{ site.domain }}{% url activate_account activation_key %}
-
-Ο χρήστης θα ενημερωθεί για την ενεργοποίηση του λογαριασμού του μέσω e-mail.
-
------------------------------------------------------------------------------
-
-{{ user.get_full_name }} has registered for a new account.
-
-Username: {{user.username}}
-E-mail: {{user.email}}
-
-To activate the user's account and allow them to access the service, click on
-the following link:
-
-http://{{ site.domain }}{% url activate_account activation_key %}
-
-The user will be notified via mail about the account activation
+++ /dev/null
-Account registered at {{ site.name }}
+++ /dev/null
-{% extends "base.html" %}
-
-{% block content %}
-<div id="passwordchange">
- <h1>{% trans "Change Password" %}</h1>
- <fieldset>
- <form method="post">
- <table>
- {{ form.as_table }}
- </table>
- <input class="submit" type="submit" value="{% trans "Submit" %}" />
- </form>
- </fieldset>
-</div>
-{% endblock %}
+++ /dev/null
-{% extends "base.html" %}
-{% load i18n %}
-{% block title %}{% trans "Password Reset Complete" %}{% endblock %}
-{% block brcrmb_container %}{% endblock %}
-{% block content %}
-<div id="passwordreset3">
- <h3>{% trans "Password Reset Complete" %}</h3>
- <p>{% trans "Your password was successfully reset. You may login" %} <a href="{% url login %}">{% trans "here" %}</a>.</p>
-</div>
-{% endblock %}
\ No newline at end of file
+++ /dev/null
-{% extends "base.html" %}
-{% load i18n %}
-{% block title %}{% trans "Reset Password" %}{% endblock %}
-{% block brcrmb_container %}{% endblock %}
-{% block content %}
-
-{% if validlink %}
-<div id="passwordreset2" align="center">
- <h3>{% trans "Reset Password" %}</h3>
- <form method="post">
- {% csrf_token %}
- <table>
- {{ form.as_table }}
- </table>
- <input class="submit" type="submit" value="{% trans "Submit" %}" />
- </form>
-</div>
-{% else %}
-<h3>{% trans "Error" %}</h3>
-<p>{% trans "There was an error processing your password change request." %}</p>
-{% endif %}
-
-{% endblock %}
+++ /dev/null
-{% extends "base.html" %}
-{% load i18n %}
-{% block title %}{% trans "Email sent" %}{% endblock %}
-{% block brcrmb_container %}{% endblock %}
-{% block content %}
-<div align="center">
-
-<h3>{% trans "Email Sent" %}</h3>
-<p>{% trans "An email has been sent containing instructions on resetting your password. Please check your inbox." %}</p>
-
-</div>
-{% endblock %}
\ No newline at end of file
+++ /dev/null
-Reset password at {{ site_name }}:
-{% block reset_link %}
-{{ protocol }}://{{ domain }}{% url auth_password_reset_confirm uidb36=uid, token=token %}
-{% endblock %}
+++ /dev/null
-{% extends "base.html" %}
-{% load i18n %}
-{% block title %}{% trans "Password reset" %}{% endblock %}
-{% block brcrmb_container %}{% endblock %}
-{% block content %}
-<div align="center">
-
-<h3>{% trans "Password Reset" %}</h3>
-
-<form method="post">
-{% csrf_token %}
-<table>
- {{ form.as_table }}
-</table>
- <input class="submit" type="submit" value="{% trans "Reset" %}" />
-
-</form>
-</div>
-{% endblock %}
\ No newline at end of file
+++ /dev/null
-{% extends "base.html" %}
-{% load i18n %}
-{% block title %}{% trans "Register" %}{% endblock %}
-{% block brcrmb_container %}{% endblock %}
-{% block content %}
-<div align="center" id="registration">
-
-<h3>{% trans "Registration Email Sent" %}</h3>
- <p>{% trans "An email has been sent to the system administrator. You will be soon notified about the activation of your account." %}</p>
- <p>{% trans "Back to" %} <a href="{% url login %}">{% trans "login" %}</a> {% trans "page" %}.</p>
-</div>
-{% endblock %}
\ No newline at end of file
+++ /dev/null
-{% extends "base.html" %}
-{% load i18n %}
-{% block title %}{% trans "Register" %}{% endblock %}
-{% block brcrmb_container %}{% endblock %}
-{% block content %}
-<!-- change recaptcha theme -->
-<script type="text/javascript">
-var RecaptchaOptions = {
- theme : 'white'
-};
-</script>
-
-<div align="center" id="registration">
-
-<h3>{% trans "Register new user" %}</h3>
- <form method="post">
- {% csrf_token %}
- <table>
- {% for field in form %}
- <tr><th>{% trans field.label|capfirst %}</th><td>{{ field }}{% if field.errors %} <span class="error">{{ field.errors|join:", " }}</span>{% endif %}</td></tr>
- {% endfor %}
- </table>
- <input class="submit"type="submit" value="{% trans "Create" %}" />
- </form>
-</div>
-{% endblock %}
+++ /dev/null
-{% extends "base.html" %}
-{% load i18n %}
-{% block title %}{{ instance }} - {% trans "Console" %}{% endblock %}
-{% block breadcrumbs %}:: <a href="{% url instance-detail cluster.slug instance %}">{{ instance }}</a> :: VNC</p>{% endblock %}
-
-{% block content %}
-
-<h3>{% trans "VNC session on" %} {{ instance }}</h3>
-<applet archive="/static/javavnc/VncViewer.jar" code="VncViewer.class" width="99%" height="790px" align="middle">
-<param name="PORT" value="{{ port }}">
-<param name="PASSWORD" value="{{ password }}">
-<!--
-<param name="Open new window" value="yes">
-<param name="Scaling factor" value="auto">
--->
-</applet>
-
-{% endblock %}