Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
CIRCLE
/
cloud
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
94
Merge Requests
10
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
A prog2-höz tartozó friss repo anyagok itt elérhetőek:
https://git.iit.bme.hu/
Commit
ba28b42a
authored
Feb 09, 2013
by
tarokkk
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
webui: Added translations and cleaned up states
parent
0dedc837
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
33 deletions
+28
-33
one/templates/show.html
+28
-33
No files found.
one/templates/show.html
View file @
ba28b42a
...
@@ -3,14 +3,14 @@
...
@@ -3,14 +3,14 @@
{% block js %}
{% block js %}
<script
type=
"text/javascript"
>
<script
type=
"text/javascript"
>
{
%
if
booting
%
}
{
%
if
booting
or
state
!=
'ACTIVE'
%
}
var
timer
=
setInterval
(
function
(){
var
timer
=
setInterval
(
function
(){
$
.
ajax
({
$
.
ajax
({
type
:
'GET'
,
type
:
'GET'
,
dataType
:
'json'
,
dataType
:
'json'
,
url
:
'/ajax/vm/status/{{ id }}'
,
url
:
'/ajax/vm/status/{{ id }}'
,
success
:
function
(
data
){
success
:
function
(
data
){
if
(
!
data
.
booting
){
if
(
!
data
.
booting
&&
data
.
state
==
'ACTIVE'
){
window
.
location
.
reload
();
window
.
location
.
reload
();
}
}
}
}
...
@@ -28,7 +28,7 @@
...
@@ -28,7 +28,7 @@
{% 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;"
>
<p
style=
"font-size:25px; line-height:2em;text-align:center;"
>
<img
src=
"/static/load-2.gif"
/>
<img
src=
"/static/load-2.gif"
/>
Gép indítása..
{% trans "The machine is starting..." %}
</p>
</p>
<p
style=
"font-size:25px; line-height:2em;text-align:center;"
>
<p
style=
"font-size:25px; line-height:2em;text-align:center;"
>
<form
action=
"{% url vm_delete id %}"
method=
"post"
onsubmit=
"return confirm('Biztosan törli a gépet?')"
>
<form
action=
"{% url vm_delete id %}"
method=
"post"
onsubmit=
"return confirm('Biztosan törli a gépet?')"
>
...
@@ -39,17 +39,12 @@
...
@@ -39,17 +39,12 @@
<img
src=
"/static/icons/Go-home.png"
alt=
"<-"
/>
<img
src=
"/static/icons/Go-home.png"
alt=
"<-"
/>
</a>
</a>
</p>
</p>
{% endif %}
{% if state == "ACTIVE" and not booting %}
{% elif state == "ACTIVE" and not booting %}
{% if age
<
15
%}
<p
id=
"connect"
style=
"display:block; font-size:25px; line-height:2em;text-align:center;"
>
<
p
id=
"wait"
style=
"font-size:25px; line-height:2em;text-align:center;"
>
<img
src=
"/static/load-2.gif"
/>
Gép indítása...
</p>
<p
id=
"connect"
style=
"display:none; font-size:25px; line-height:2em;text-align:center;"
>
<a
href=
"{{uri}}"
class=
"button"
onclick=
"return connectbutton();"
>
<a
href=
"{{uri}}"
class=
"button"
onclick=
"return connectbutton();"
>
<img
src=
"/static/load-1.gif"
id=
"connecting"
style=
"display:none;"
/>
<img
src=
"/static/load-1.gif"
id=
"connecting"
style=
"display:none;"
/>
Csatlakozás
{% trans "Connect" %}
</a>
</a>
</p>
</p>
<p
style=
"font-size:25px; line-height:2em;text-align:center;"
>
<p
style=
"font-size:25px; line-height:2em;text-align:center;"
>
...
@@ -61,12 +56,9 @@
...
@@ -61,12 +56,9 @@
<img
src=
"/static/icons/Go-home.png"
alt=
"<-"
/>
<img
src=
"/static/icons/Go-home.png"
alt=
"<-"
/>
</a>
</a>
</p>
</p>
{% else %}
{% elif state == "STOPPED" %}
<p
id=
"connect"
style=
"font-size:25px; line-height:2em;text-align:center;"
>
<p
style=
"font-size:25px; line-height:2em;text-align:center;"
>
<a
href=
"{{uri}}"
class=
"button"
onclick=
"return connectbutton();"
>
{% trans "The machine is stopped" %}
<img
src=
"/static/load-1.gif"
id=
"connecting"
style=
"display:none;"
/>
Csatlakozás
</a>
</p>
</p>
<p
style=
"font-size:25px; line-height:2em;text-align:center;"
>
<p
style=
"font-size:25px; line-height:2em;text-align:center;"
>
<form
action=
"{% url vm_delete id %}"
method=
"post"
onsubmit=
"return confirm('Biztosan törli a gépet?')"
>
<form
action=
"{% url vm_delete id %}"
method=
"post"
onsubmit=
"return confirm('Biztosan törli a gépet?')"
>
...
@@ -78,9 +70,10 @@
...
@@ -78,9 +70,10 @@
</a>
</a>
</p>
</p>
{% endif %}
{% endif %}
{% endif %}
{% if state == "DONE" %}
{% if state == "DONE" %}
<p
style=
"font-size:25px; line-height:2em;text-align:center;"
>
A gép törölve van!
</p>
<p
style=
"font-size:25px; line-height:2em;text-align:center;"
>
{% trans "The machine deleted" %}
</p>
<p
style=
"font-size:25px; line-height:2em;text-align:center;"
>
<p
style=
"font-size:25px; line-height:2em;text-align:center;"
>
<a
href=
"/"
>
<a
href=
"/"
>
<img
src=
"/static/icons/Go-home.png"
alt=
"⌫"
/>
<img
src=
"/static/icons/Go-home.png"
alt=
"⌫"
/>
...
@@ -88,7 +81,9 @@
...
@@ -88,7 +81,9 @@
</p>
</p>
{% endif %}
{% endif %}
{% if state == "FAILED" %}
{% if state == "FAILED" %}
<p
style=
"font-size:25px; line-height:2em;text-align:center;"
>
Váratlan hiba lépett fel.
</p>
<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;"
>
<p
style=
"font-size:25px; line-height:2em;text-align:center;"
>
<form
action=
"{% url vm_delete id %}"
method=
"post"
onsubmit=
"return confirm('Biztosan törli a gépet?')"
>
<form
action=
"{% url vm_delete id %}"
method=
"post"
onsubmit=
"return confirm('Biztosan törli a gépet?')"
>
{% csrf_token %}
{% csrf_token %}
...
@@ -99,7 +94,7 @@
...
@@ -99,7 +94,7 @@
</a>
</a>
</p>
</p>
{% endif %}
{% endif %}
{% if state == "S
USPEND
ED" %}
{% if state == "S
TOPPP
ED" %}
<p
style=
"font-size:25px; line-height:2em;text-align:center;"
>
<p
style=
"font-size:25px; line-height:2em;text-align:center;"
>
<a
href=
"/vm/suspend/{{i.id}}/"
>
<a
href=
"/vm/suspend/{{i.id}}/"
>
<img
src=
"/static/icons/Media-playback-start.png"
alt=
">"
/>
<img
src=
"/static/icons/Media-playback-start.png"
alt=
">"
/>
...
@@ -112,27 +107,27 @@
...
@@ -112,27 +107,27 @@
</div>
</div>
</div>
</div>
<div
class=
"contentblock"
id=
"vm-credentials"
>
<div
class=
"contentblock"
id=
"vm-credentials"
>
<h2>
Bejelentkezési adatok
</h2>
<h2>
{% trans "Login credentials" %}
</h2>
<div
class=
"content"
>
<div
class=
"content"
>
<table>
<table>
<tr>
<tr>
<th>
Protokoll
:
</th>
<th>
{% trans "Protocol" %}
:
</th>
<td>
{{i.template.access_type|upper}}
</td>
<td>
{{i.template.access_type|upper}}
</td>
</tr>
</tr>
<tr>
<tr>
<th>
IP
:
</th>
<th>
{% trans "IP" %}
:
</th>
<td>
{{ i.firewall_host.pub_ipv4}}
</td>
<td>
{{ i.firewall_host.pub_ipv4}}
</td>
</tr>
</tr>
<tr>
<tr>
<th>
Port
:
</th>
<th>
{% trans "Port" %}
:
</th>
<td>
{{ i.get_port}}
</td>
<td>
{{ i.get_port}}
</td>
</tr>
</tr>
<tr>
<tr>
<th>
Felhasználónév
:
</th>
<th>
{% trans "Username" %}
:
</th>
<td>
cloud
</td>
<td>
cloud
</td>
</tr>
</tr>
<tr>
<tr>
<th>
Jelszó
:
</th>
<th>
{% trans "Password" %}
:
</th>
<td>
{{ i.pw }}
</td>
<td>
{{ i.pw }}
</td>
</tr>
</tr>
</table>
</table>
...
@@ -145,9 +140,9 @@
...
@@ -145,9 +140,9 @@
{% csrf_token %}
{% csrf_token %}
<table>
<table>
<tr>
<tr>
<th>
Protokoll
</th>
<th>
{% trans "Protocol" %}
</th>
<th>
Külső port
</th>
<th>
{% trans "Public port" %}
</th>
<th
colspan=
"2"
>
Belső port
</th>
<th
colspan=
"2"
>
{% trans "Private port" %}
</th>
</tr>
</tr>
{% for port in ports %}
{% for port in ports %}
<tr>
<tr>
...
@@ -155,7 +150,7 @@
...
@@ -155,7 +150,7 @@
<td>
{{port.public}}
</td>
<td>
{{port.public}}
</td>
<td>
{{port.private}}
</td>
<td>
{{port.private}}
</td>
<td>
<td>
<a
href=
"/vm/port_del/{{i.id}}/{{port.proto}}/{{port.public}}/"
>
Törlés
</a>
<a
href=
"/vm/port_del/{{i.id}}/{{port.proto}}/{{port.public}}/"
>
{% trans "Delete" %}
</a>
</td>
</td>
</tr>
</tr>
{% endfor %}
{% endfor %}
...
@@ -173,7 +168,7 @@
...
@@ -173,7 +168,7 @@
<input
style=
"min-width:70px;width:70px;"
type=
"text"
name=
"private"
/>
<input
style=
"min-width:70px;width:70px;"
type=
"text"
name=
"private"
/>
</td>
</td>
<td>
<td>
<input
type=
"submit"
value=
"Hozzáadás
"
/>
<input
type=
"submit"
style=
"min-width:3em"
value=
"{% trans "
Add
"
%}
"
/>
</td>
</td>
</tr>
</tr>
</table>
</table>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment