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
f9397374
authored
Apr 22, 2014
by
Oláh István Gergely
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dashboard: fix tab in dashboard.js
parent
d33c9843
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
18 deletions
+17
-18
circle/dashboard/static/dashboard/dashboard.js
+17
-18
No files found.
circle/dashboard/static/dashboard/dashboard.js
View file @
f9397374
...
@@ -115,8 +115,8 @@ $(function () {
...
@@ -115,8 +115,8 @@ $(function () {
{
'url'
:
'/dashboard/vm/delete/'
+
vm_pk
+
'/'
,
{
'url'
:
'/dashboard/vm/delete/'
+
vm_pk
+
'/'
,
'data'
:
[],
'data'
:
[],
'pk'
:
vm_pk
,
'pk'
:
vm_pk
,
'type'
:
"vm"
,
'type'
:
"vm"
,
'redirect'
:
dir
});
'redirect'
:
dir
});
return
false
;
return
false
;
});
});
...
@@ -127,7 +127,7 @@ $(function () {
...
@@ -127,7 +127,7 @@ $(function () {
{
'url'
:
'/dashboard/disk/'
+
disk_pk
+
'/remove/'
,
{
'url'
:
'/dashboard/disk/'
+
disk_pk
+
'/remove/'
,
'data'
:
[],
'data'
:
[],
'pk'
:
disk_pk
,
'pk'
:
disk_pk
,
'type'
:
"disk"
,
'type'
:
"disk"
,
});
});
return
false
;
return
false
;
});
});
...
@@ -140,7 +140,7 @@ $(function () {
...
@@ -140,7 +140,7 @@ $(function () {
{
'url'
:
'/dashboard/node/delete/'
+
node_pk
+
'/'
,
{
'url'
:
'/dashboard/node/delete/'
+
node_pk
+
'/'
,
'data'
:
[],
'data'
:
[],
'pk'
:
node_pk
,
'pk'
:
node_pk
,
'type'
:
"node"
,
'type'
:
"node"
,
'redirect'
:
dir
});
'redirect'
:
dir
});
return
false
;
return
false
;
...
@@ -168,7 +168,7 @@ $(function () {
...
@@ -168,7 +168,7 @@ $(function () {
addModalConfirmation
(
deleteObject
,
addModalConfirmation
(
deleteObject
,
{
'url'
:
'/dashboard/group/delete/'
+
group_pk
+
'/'
,
{
'url'
:
'/dashboard/group/delete/'
+
group_pk
+
'/'
,
'data'
:
[],
'data'
:
[],
'type'
:
"group"
,
'type'
:
"group"
,
'pk'
:
group_pk
,
'pk'
:
group_pk
,
'redirect'
:
dir
});
'redirect'
:
dir
});
...
@@ -232,14 +232,13 @@ $(function () {
...
@@ -232,14 +232,13 @@ $(function () {
$
.
ajaxSetup
(
{
"async"
:
false
}
);
$
.
ajaxSetup
(
{
"async"
:
false
}
);
$
.
get
(
"/dashboard/node/list/"
,
function
(
result
)
{
$
.
get
(
"/dashboard/node/list/"
,
function
(
result
)
{
for
(
var
i
in
result
)
{
for
(
var
i
in
result
)
{
console
.
log
(
result
[
i
]);
my_nodes
.
push
({
my_nodes
.
push
({
'name'
:
result
[
i
].
name
.
toLowerCase
(),
'name'
:
result
[
i
].
name
.
toLowerCase
(),
'icon'
:
result
[
i
].
icon
,
'icon'
:
result
[
i
].
icon
,
'status'
:
result
[
i
].
status
,
'status'
:
result
[
i
].
status
,
'label'
:
result
[
i
].
label
,
'label'
:
result
[
i
].
label
,
'url'
:
result
[
i
].
url
,
'url'
:
result
[
i
].
url
,
});
});
}
}
});
});
$
.
ajaxSetup
(
{
"async"
:
true
}
);
$
.
ajaxSetup
(
{
"async"
:
true
}
);
...
@@ -256,7 +255,7 @@ $(function () {
...
@@ -256,7 +255,7 @@ $(function () {
for
(
var
i
=
0
;
i
<
5
&&
i
<
search_result
.
length
;
i
++
)
for
(
var
i
=
0
;
i
<
5
&&
i
<
search_result
.
length
;
i
++
)
html
+=
generateNodeHTML
(
search_result
[
i
].
name
,
html
+=
generateNodeHTML
(
search_result
[
i
].
name
,
search_result
[
i
].
icon
,
search_result
[
i
].
status
,
search_result
[
i
].
icon
,
search_result
[
i
].
status
,
search_result
[
i
].
url
);
search_result
[
i
].
url
);
if
(
search_result
.
length
==
0
)
if
(
search_result
.
length
==
0
)
html
+=
'<div class="list-group-item">No result</div>'
;
html
+=
'<div class="list-group-item">No result</div>'
;
$
(
"#dashboard-node-list"
).
html
(
html
);
$
(
"#dashboard-node-list"
).
html
(
html
);
...
@@ -266,7 +265,7 @@ $(function () {
...
@@ -266,7 +265,7 @@ $(function () {
for
(
var
i
=
0
;
i
<
5
&&
i
<
search_result
.
length
;
i
++
)
for
(
var
i
=
0
;
i
<
5
&&
i
<
search_result
.
length
;
i
++
)
html
+=
generateNodeTagHTML
(
search_result
[
i
].
name
,
html
+=
generateNodeTagHTML
(
search_result
[
i
].
name
,
search_result
[
i
].
icon
,
search_result
[
i
].
status
,
search_result
[
i
].
icon
,
search_result
[
i
].
status
,
search_result
[
i
].
label
,
search_result
[
i
].
url
);
search_result
[
i
].
label
,
search_result
[
i
].
url
);
if
(
search_result
.
length
==
0
)
if
(
search_result
.
length
==
0
)
html
+=
'<div class="list-group-item">No result</div>'
;
html
+=
'<div class="list-group-item">No result</div>'
;
$
(
"#dashboard-node-taglist"
).
html
(
html
);
$
(
"#dashboard-node-taglist"
).
html
(
html
);
...
@@ -307,17 +306,17 @@ function generateVmHTML(pk, name, host, icon, _status, fav) {
...
@@ -307,17 +306,17 @@ function generateVmHTML(pk, name, host, icon, _status, fav) {
function
generateNodeHTML
(
name
,
icon
,
_status
,
url
)
{
function
generateNodeHTML
(
name
,
icon
,
_status
,
url
)
{
return
'<a href="'
+
url
+
'" class="list-group-item" >'
+
return
'<a href="'
+
url
+
'" class="list-group-item" >'
+
'<span class="index-node-list-name">'
+
'<span class="index-node-list-name">'
+
'<i class="'
+
icon
+
'" title="'
+
_status
+
'"></i> '
+
name
+
'<i class="'
+
icon
+
'" title="'
+
_status
+
'"></i> '
+
name
+
'</span>'
+
'</span>'
+
'<div style="clear: both;"></div>'
+
'<div style="clear: both;"></div>'
+
'</a>'
;
'</a>'
;
}
}
function
generateNodeTagHTML
(
name
,
icon
,
_status
,
label
,
url
)
{
function
generateNodeTagHTML
(
name
,
icon
,
_status
,
label
,
url
)
{
return
'<a href="'
+
url
+
'" class="label '
+
label
+
'" >'
+
return
'<a href="'
+
url
+
'" class="label '
+
label
+
'" >'
+
'<i class="'
+
icon
+
'" title="'
+
_status
+
'"></i> '
+
name
+
'<i class="'
+
icon
+
'" title="'
+
_status
+
'"></i> '
+
name
+
'</a> '
;
'</a> '
;
}
}
/* copare vm-s by fav, pk order */
/* copare vm-s by fav, pk order */
...
...
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