Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Gutyán Gábor
/
circlestack
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
e22e8f62
authored
Apr 17, 2014
by
Oláh István Gergely
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dashboard: removing pk from js, changing tag colors
parent
0a7dbb2e
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
6 deletions
+4
-6
circle/dashboard/static/dashboard/dashboard.js
+1
-2
circle/dashboard/views.py
+0
-1
circle/vm/models/node.py
+3
-3
No files found.
circle/dashboard/static/dashboard/dashboard.js
View file @
e22e8f62
...
...
@@ -234,7 +234,6 @@ $(function () {
for
(
var
i
in
result
)
{
console
.
log
(
result
[
i
]);
my_nodes
.
push
({
'pk'
:
result
[
i
].
pk
,
'name'
:
result
[
i
].
name
.
toLowerCase
(),
'icon'
:
result
[
i
].
icon
,
'status'
:
result
[
i
].
status
,
...
...
@@ -274,7 +273,7 @@ $(function () {
// if there is only one result and ENTER is pressed redirect
if
(
e
.
keyCode
==
13
&&
search_result
.
length
==
1
)
{
window
.
location
.
href
=
"/dashboard/node/"
+
search_result
[
0
].
pk
+
"/"
;
window
.
location
.
href
=
search_result
[
0
].
url
;
}
if
(
e
.
keyCode
==
13
&&
search_result
.
length
>
1
&&
input
.
length
>
0
)
{
window
.
location
.
href
=
"/dashboard/node/list/?s="
+
input
;
...
...
circle/dashboard/views.py
View file @
e22e8f62
...
...
@@ -929,7 +929,6 @@ class NodeList(LoginRequiredMixin, SuperuserRequiredMixin, SingleTableView):
if
self
.
request
.
is_ajax
():
nodes
=
Node
.
objects
.
all
()
nodes
=
[{
'pk'
:
i
.
pk
,
'name'
:
i
.
name
,
'icon'
:
i
.
get_status_icon
(),
'url'
:
i
.
get_absolute_url
(),
...
...
circle/vm/models/node.py
View file @
e22e8f62
...
...
@@ -278,9 +278,9 @@ class Node(OperatedMixin, TimeStampedModel):
def
get_status_label
(
self
):
return
{
'OFFLINE'
:
'label-
danger
'
,
'DISABLED'
:
'label-
danger
'
,
'MISSING'
:
'label-
warning
'
,
'OFFLINE'
:
'label-
warning
'
,
'DISABLED'
:
'label-
warning
'
,
'MISSING'
:
'label-
danger
'
,
'ONLINE'
:
'label-success'
}
.
get
(
self
.
get_state
(),
'label-danger'
)
...
...
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