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
Commit
3d81d408
authored
Oct 25, 2014
by
Bach Dániel
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'fix-group-detail' into 'master'
Fix group detail Closes
#323
See merge request
!253
parents
7c604358
ae2e57a2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
136 additions
and
147 deletions
+136
-147
circle/dashboard/static/dashboard/dashboard.css
+10
-1
circle/dashboard/static/dashboard/group-details.js
+1
-1
circle/dashboard/static/dashboard/group-list.js
+1
-0
circle/dashboard/static/dashboard/node-details.js
+1
-1
circle/dashboard/static/dashboard/node-list.js
+0
-34
circle/dashboard/tables.py
+3
-0
circle/dashboard/templates/dashboard/group-detail.html
+119
-109
circle/dashboard/templates/dashboard/group-list.html
+1
-1
No files found.
circle/dashboard/static/dashboard/dashboard.css
View file @
3d81d408
...
...
@@ -216,7 +216,7 @@ html {
}
#vm-list-rename-name
,
#node-list-rename-name
,
#group-list-rename-name
{
max-width
:
1
0
0px
;
max-width
:
1
5
0px
;
}
.label-tag
{
...
...
@@ -1042,3 +1042,12 @@ textarea[name="new_members"] {
#vm-migrate-node-list
li
{
cursor
:
pointer
;
}
.group-list-table
.actions
,
.group-list-table
.admin
,
.group-list-table
.number_of_users
,
.group-list-table
.pk
{
width
:
1px
;
white-space
:
nowrap
;
text-align
:
center
;
}
circle/dashboard/static/dashboard/group-details.js
View file @
3d81d408
...
...
@@ -14,7 +14,7 @@
data
:
{
'new_name'
:
name
},
headers
:
{
"X-CSRFToken"
:
getCookie
(
'csrftoken'
)},
success
:
function
(
data
,
textStatus
,
xhr
)
{
$
(
"#group-details-h1-name"
).
html
(
data
[
'new_name'
]).
show
();
$
(
"#group-details-h1-name"
).
text
(
data
[
'new_name'
]).
show
();
$
(
'#group-details-rename'
).
hide
();
// addMessage(data['message'], "success");
},
...
...
circle/dashboard/static/dashboard/group-list.js
View file @
3d81d408
...
...
@@ -3,6 +3,7 @@ $(function() {
$
(
"#group-list-rename-button, .group-details-rename-button"
).
click
(
function
()
{
$
(
"#group-list-column-name"
,
$
(
this
).
closest
(
"tr"
)).
hide
();
$
(
"#group-list-rename"
,
$
(
this
).
closest
(
"tr"
)).
css
(
'display'
,
'inline'
);
$
(
"#group-list-rename"
).
find
(
"input"
).
select
();
});
/* rename ajax */
...
...
circle/dashboard/static/dashboard/node-details.js
View file @
3d81d408
...
...
@@ -15,7 +15,7 @@ $(function() {
data
:
{
'new_name'
:
name
},
headers
:
{
"X-CSRFToken"
:
getCookie
(
'csrftoken'
)},
success
:
function
(
data
,
textStatus
,
xhr
)
{
$
(
"#node-details-h1-name"
).
html
(
data
[
'new_name'
]).
show
();
$
(
"#node-details-h1-name"
).
text
(
data
[
'new_name'
]).
show
();
$
(
'#node-details-rename'
).
hide
();
// addMessage(data['message'], "success");
},
...
...
circle/dashboard/static/dashboard/node-list.js
View file @
3d81d408
...
...
@@ -12,40 +12,6 @@ $(function() {
tr
.
removeClass
(
'danger'
);
}
/* rename */
$
(
"#node-list-rename-button, .node-details-rename-button"
).
click
(
function
()
{
$
(
"#node-list-column-name"
,
$
(
this
).
closest
(
"tr"
)).
hide
();
$
(
"#node-list-rename"
,
$
(
this
).
closest
(
"tr"
)).
css
(
'display'
,
'inline'
);
});
/* rename ajax */
$
(
'.node-list-rename-submit'
).
click
(
function
()
{
var
row
=
$
(
this
).
closest
(
"tr"
)
var
name
=
$
(
'#node-list-rename-name'
,
row
).
val
();
var
url
=
'/dashboard/node/'
+
row
.
children
(
"td:first-child"
).
text
().
replace
(
" "
,
""
)
+
'/'
;
$
.
ajax
({
method
:
'POST'
,
url
:
url
,
data
:
{
'new_name'
:
name
},
headers
:
{
"X-CSRFToken"
:
getCookie
(
'csrftoken'
)},
success
:
function
(
data
,
textStatus
,
xhr
)
{
$
(
"#node-list-column-name"
,
row
).
html
(
$
(
"<a/>"
,
{
'class'
:
"real-link"
,
href
:
"/dashboard/node/"
+
data
[
'node_pk'
]
+
"/"
,
text
:
data
[
'new_name'
]
})
).
show
();
$
(
'#node-list-rename'
,
row
).
hide
();
// addMessage(data['message'], "success");
},
error
:
function
(
xhr
,
textStatus
,
error
)
{
addMessage
(
"Error during renaming!"
,
"danger"
);
}
});
return
false
;
});
function
statuschangeSuccess
(
tr
){
var
tspan
=
tr
.
children
(
'.enabled'
).
children
();
...
...
circle/dashboard/tables.py
View file @
3d81d408
...
...
@@ -88,18 +88,21 @@ class GroupListTable(Table):
number_of_users
=
TemplateColumn
(
orderable
=
False
,
verbose_name
=
_
(
"Number of users"
),
template_name
=
'dashboard/group-list/column-users.html'
,
attrs
=
{
'th'
:
{
'class'
:
'group-list-table-admin'
}},
)
admin
=
TemplateColumn
(
orderable
=
False
,
verbose_name
=
_
(
"Admin"
),
template_name
=
'dashboard/group-list/column-admin.html'
,
attrs
=
{
'th'
:
{
'class'
:
'group-list-table-admin'
}},
)
actions
=
TemplateColumn
(
orderable
=
False
,
verbose_name
=
_
(
"Actions"
),
attrs
=
{
'th'
:
{
'class'
:
'group-list-table-thin'
}},
template_code
=
(
'{
%
include "dashboard/group-list/column-'
'actions.html" with btn_size="btn-xs"
%
}'
),
...
...
circle/dashboard/templates/dashboard/group-detail.html
View file @
3d81d408
This diff is collapsed.
Click to expand it.
circle/dashboard/templates/dashboard/group-list.html
View file @
3d81d408
...
...
@@ -10,7 +10,7 @@
<div
class=
"col-md-12"
>
<div
class=
"panel panel-default"
>
<div
class=
"panel-heading"
>
<h3
class=
"no-margin"
><i
class=
"fa fa-group"
></i>
Your groups
</h3>
<h3
class=
"no-margin"
><i
class=
"fa fa-group"
></i>
{% trans "Groups" %}
</h3>
</div>
<div
class=
"panel-body"
>
<div
id=
"table_container"
>
...
...
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