Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Fukász Rómeó Ervin
/
cloud
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
0016478b
authored
Feb 09, 2013
by
tarokkk
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
webgui: Colored template and actual VM
parent
ce8ca35e
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
61 deletions
+21
-61
one/static/box.less
+2
-2
one/templates/box-vmlist.html
+3
-3
one/templates/show.html
+16
-56
No files found.
one/static/box.less
View file @
0016478b
...
...
@@ -122,9 +122,9 @@
background-repeat: no-repeat;
}
&.selected-summary{
background-color: rgb(
241, 241, 157
);
background-color: rgb(
142, 219, 128
);
&:hover{
background-color:
#FFFF66
;
background-color:
rgb(100, 223, 78)
;
}
}
&:hover{
...
...
one/templates/box-vmlist.html
View file @
0016478b
...
...
@@ -3,7 +3,7 @@
{% if instances %}
{% for i in instances %}
<li
class=
"wm"
>
<div
class=
"summary {% if id == i.id %}selected-summary
{% endif %}"
>
<div
class=
"summary {% if id == i.id %}selected-summary{% elif 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}}
...
...
@@ -16,8 +16,8 @@
<a
href=
"{{i.get_connect_uri}}"
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 "
Stop
"
%}"
>
<img
src=
"/static/icons/control-pause.png"
alt=
"{% trans "
Suspend
"
%}"
/>
<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
"
%}"
/>
...
...
one/templates/show.html
View file @
0016478b
...
...
@@ -45,89 +45,49 @@
<div
class=
"boxes"
>
<div
class=
"contentblock"
id=
"state"
>
<div
class=
"contentblock
wm
"
id=
"state"
>
<h2>
{{name}}
</h2>
<div
class=
"content"
>
{% if state == "PENDING" or state == "ACTIVE" and booting %}
<p
style=
"font-size:25px; line-height:2em;text-align:center;"
>
<img
src=
"/static/load-2.gif"
/>
{% trans "The machine is starting..." %}
</p>
<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?')"
>
{% csrf_token %}
<input
type=
"submit"
class=
"icon-delete"
value=
"Törlés"
/>
</form>
<a
href=
"/"
>
<img
src=
"/static/icons/Go-home.png"
alt=
"<-"
/>
</a>
{% trans "Starting..." %}
</p>
{% 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-1.gif"
id=
"connecting"
style=
"display:none;"
/>
{% trans "Connect" %}
</a>
</p>
<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?')"
>
{% csrf_token %}
<input
type=
"submit"
class=
"icon-delete"
value=
"Törlés"
/>
</form>
<a
href=
"/"
>
<img
src=
"/static/icons/Go-home.png"
alt=
"<-"
/>
{% trans "Running" %}
</a>
</p>
{% elif state == "STOPPED" %}
<p
style=
"font-size:25px; line-height:2em;text-align:center;"
>
{% trans "The machine is stopped" %}
</p>
<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?')"
>
{% csrf_token %}
<input
type=
"submit"
class=
"icon-delete"
value=
"Törlés"
/>
</form>
<a
href=
"/"
>
<img
src=
"/static/icons/Go-home.png"
alt=
"<-"
/>
</a>
{% trans "Stopped" %}
</p>
{% endif %}
{% if state == "DONE" %}
<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;"
>
<a
href=
"/"
>
<img
src=
"/static/icons/Go-home.png"
alt=
"⌫"
/>
</a>
{% trans "Deletedeleted" %}
</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;"
>
<form
action=
"{% url vm_delete id %}"
method=
"post"
onsubmit=
"return confirm('Biztosan törli a gépet?')"
>
{% csrf_token %}
<input
type=
"submit"
class=
"icon-delete"
value=
"Törlés"
/>
</form>
<a
href=
"/"
>
<img
src=
"/static/icons/Go-home.png"
alt=
"⌫"
/>
</a>
</p>
{% endif %}
{% if state == "STOPPPED" %}
<p
style=
"font-size:25px; line-height:2em;text-align:center;"
>
<a
href=
"/vm/suspend/{{i.id}}/"
>
<img
src=
"/static/icons/Media-playback-start.png"
alt=
">"
/>
</a>
<a
href=
"/"
>
<img
src=
"/static/icons/Go-home.png"
alt=
"⌫"
/>
</a>
</p>
{% endif %}
</div>
<div
class=
"details"
style=
"display: block;"
>
<div
class=
"details-container"
>
<ul>
<li
class=
"name"
>
{% trans "Hostname" %}:
<span
class=
"value"
>
{{i.name}}
</span></li>
<li
class=
"os-linux"
>
{% trans "System" %}:
<span
class=
"value"
>
{{i.template.disk.name}}
</span></li>
<li
class=
"type"
>
{% trans "Size" %}:
<span
class=
"value"
>
{{i.template.instance_type.name}}
</span></li>
<li
class=
"date"
>
{% trans "Created at" %}:
<span
class=
"value"
>
{{i.created_at}}
</span></li>
<li
class=
"date"
>
{% trans "Expiration" %}:
<span
class=
"value"
><abbr
title=
"1 nap, 5 óra, 34 perc"
>
1 nap
</abbr></span></li>
</ul>
</div>
</div>
</div>
<div
class=
"contentblock"
id=
"vm-credentials"
>
<h2>
{% trans "Login credentials" %}
</h2>
...
...
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