Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Gyuricska Milán
/
cloud
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
c711f3c1
authored
Dec 01, 2014
by
Kálmán Viktor
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'issue-363' into 'master'
Vm detail without js
✅
closes #363 See merge request !275
parents
15c8faf1
6376e04e
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
12 deletions
+19
-12
circle/dashboard/static/dashboard/dashboard.js
+8
-6
circle/dashboard/templates/dashboard/vm-detail.html
+10
-5
circle/dashboard/templates/dashboard/vm-detail/resources.html
+1
-1
No files found.
circle/dashboard/static/dashboard/dashboard.js
View file @
c711f3c1
$
(
function
()
{
$
(
function
()
{
$
(
".not-tab-pane"
).
removeClass
(
"not-tab-pane"
).
addClass
(
"tab-pane"
);
$
(
'.vm-create'
).
click
(
function
(
e
)
{
$
(
'.vm-create'
).
click
(
function
(
e
)
{
var
template
=
$
(
this
).
data
(
"template"
);
var
template
=
$
(
this
).
data
(
"template"
);
$
.
ajax
({
$
.
ajax
({
...
@@ -243,7 +245,7 @@ $(function () {
...
@@ -243,7 +245,7 @@ $(function () {
for
(
var
i
in
result
)
{
for
(
var
i
in
result
)
{
my_vms
.
push
({
my_vms
.
push
({
'pk'
:
result
[
i
].
pk
,
'pk'
:
result
[
i
].
pk
,
'name'
:
result
[
i
].
name
.
toLowerCase
()
,
'name'
:
result
[
i
].
name
,
'state'
:
result
[
i
].
state
,
'state'
:
result
[
i
].
state
,
'fav'
:
result
[
i
].
fav
,
'fav'
:
result
[
i
].
fav
,
'host'
:
result
[
i
].
host
,
'host'
:
result
[
i
].
host
,
...
@@ -260,7 +262,7 @@ $(function () {
...
@@ -260,7 +262,7 @@ $(function () {
var
search_result
=
[];
var
search_result
=
[];
var
html
=
''
;
var
html
=
''
;
for
(
var
i
in
my_vms
)
{
for
(
var
i
in
my_vms
)
{
if
(
my_vms
[
i
].
name
.
indexOf
(
input
)
!=
-
1
||
my_vms
[
i
].
host
.
indexOf
(
input
)
!=
-
1
)
{
if
(
my_vms
[
i
].
name
.
toLowerCase
().
indexOf
(
input
)
!=
-
1
||
my_vms
[
i
].
host
.
indexOf
(
input
)
!=
-
1
)
{
search_result
.
push
(
my_vms
[
i
]);
search_result
.
push
(
my_vms
[
i
]);
}
}
}
}
...
@@ -294,7 +296,7 @@ $(function () {
...
@@ -294,7 +296,7 @@ $(function () {
$
.
get
(
"/dashboard/node/list/"
,
function
(
result
)
{
$
.
get
(
"/dashboard/node/list/"
,
function
(
result
)
{
for
(
var
i
in
result
)
{
for
(
var
i
in
result
)
{
my_nodes
.
push
({
my_nodes
.
push
({
'name'
:
result
[
i
].
name
.
toLowerCase
()
,
'name'
:
result
[
i
].
name
,
'icon'
:
result
[
i
].
icon
,
'icon'
:
result
[
i
].
icon
,
'status'
:
result
[
i
].
status
,
'status'
:
result
[
i
].
status
,
'label'
:
result
[
i
].
label
,
'label'
:
result
[
i
].
label
,
...
@@ -309,7 +311,7 @@ $(function () {
...
@@ -309,7 +311,7 @@ $(function () {
var
search_result
=
[];
var
search_result
=
[];
var
html
=
''
;
var
html
=
''
;
for
(
var
i
in
my_nodes
)
{
for
(
var
i
in
my_nodes
)
{
if
(
my_nodes
[
i
].
name
.
indexOf
(
input
)
!=
-
1
)
{
if
(
my_nodes
[
i
].
name
.
toLowerCase
().
indexOf
(
input
)
!=
-
1
)
{
search_result
.
push
(
my_nodes
[
i
]);
search_result
.
push
(
my_nodes
[
i
]);
}
}
}
}
...
@@ -351,7 +353,7 @@ $(function () {
...
@@ -351,7 +353,7 @@ $(function () {
for
(
var
i
in
result
)
{
for
(
var
i
in
result
)
{
my_groups
.
push
({
my_groups
.
push
({
'url'
:
result
[
i
].
url
,
'url'
:
result
[
i
].
url
,
'name'
:
result
[
i
].
name
.
toLowerCase
()
,
'name'
:
result
[
i
].
name
,
});
});
}
}
});
});
...
@@ -362,7 +364,7 @@ $(function () {
...
@@ -362,7 +364,7 @@ $(function () {
var
search_result
=
[];
var
search_result
=
[];
var
html
=
''
;
var
html
=
''
;
for
(
var
i
in
my_groups
)
{
for
(
var
i
in
my_groups
)
{
if
(
my_groups
[
i
].
name
.
indexOf
(
input
)
!=
-
1
)
{
if
(
my_groups
[
i
].
name
.
toLowerCase
().
indexOf
(
input
)
!=
-
1
)
{
search_result
.
push
(
my_groups
[
i
]);
search_result
.
push
(
my_groups
[
i
]);
}
}
}
}
...
...
circle/dashboard/templates/dashboard/vm-detail.html
View file @
c711f3c1
...
@@ -214,12 +214,17 @@
...
@@ -214,12 +214,17 @@
</ul>
</ul>
<div
class=
"tab-content panel-body"
>
<div
class=
"tab-content panel-body"
>
<div
class=
"tab-pane active"
id=
"_home"
>
{% include "dashboard/vm-detail/home.html" %}
</div>
<div
class=
"not-tab-pane active"
id=
"_home"
>
{% include "dashboard/vm-detail/home.html" %}
</div>
<div
class=
"tab-pane"
id=
"_resources"
>
{% include "dashboard/vm-detail/resources.html" %}
</div>
<hr
class=
"js-hidden"
/>
<div
class=
"not-tab-pane"
id=
"_resources"
>
{% include "dashboard/vm-detail/resources.html" %}
</div>
<div
class=
"tab-pane"
id=
"_console"
>
{% include "dashboard/vm-detail/console.html" %}
</div>
<div
class=
"tab-pane"
id=
"_console"
>
{% include "dashboard/vm-detail/console.html" %}
</div>
<div
class=
"tab-pane"
id=
"_access"
>
{% include "dashboard/vm-detail/access.html" %}
</div>
<hr
class=
"js-hidden"
/>
<div
class=
"tab-pane"
id=
"_network"
>
{% include "dashboard/vm-detail/network.html" %}
</div>
<div
class=
"not-tab-pane"
id=
"_access"
>
{% include "dashboard/vm-detail/access.html" %}
</div>
<div
class=
"tab-pane"
id=
"_activity"
>
{% include "dashboard/vm-detail/activity.html" %}
</div>
<hr
class=
"js-hidden"
/>
<div
class=
"not-tab-pane"
id=
"_network"
>
{% include "dashboard/vm-detail/network.html" %}
</div>
<hr
class=
"js-hidden"
/>
<div
class=
"not-tab-pane"
id=
"_activity"
>
{% include "dashboard/vm-detail/activity.html" %}
</div>
<hr
class=
"js-hidden"
/>
</div>
</div>
</div>
</div>
</div>
</div>
...
...
circle/dashboard/templates/dashboard/vm-detail/resources.html
View file @
c711f3c1
...
@@ -22,12 +22,12 @@
...
@@ -22,12 +22,12 @@
<div
id=
"vm-details-resources-disk"
>
<div
id=
"vm-details-resources-disk"
>
<h3>
<h3>
{% trans "Disks" %}
<div
class=
"pull-right"
>
<div
class=
"pull-right"
>
<div
id=
"disk-ops"
>
<div
id=
"disk-ops"
>
{% include "dashboard/vm-detail/_disk-operations.html" %}
{% include "dashboard/vm-detail/_disk-operations.html" %}
</div>
</div>
</div>
</div>
{% trans "Disks" %}
</h3>
</h3>
{% if not instance.disks.all %}
{% if not instance.disks.all %}
...
...
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