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
12282eb8
authored
Apr 12, 2021
by
Máhonfai Bálint
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Group export URL and export button in group detail template
parent
e5d0098a
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
12 additions
and
6 deletions
+12
-6
circle/dashboard/static/dashboard/dashboard.js
+1
-1
circle/dashboard/templates/dashboard/group-detail.html
+4
-1
circle/dashboard/templates/dashboard/group-list/column-actions.html
+3
-3
circle/dashboard/urls.py
+4
-1
No files found.
circle/dashboard/static/dashboard/dashboard.js
View file @
12282eb8
...
...
@@ -29,7 +29,7 @@ $(function () {
return
false
;
});
$
(
'.group-create, .group-import, .node-create, .tx-tpl-ownership, .group-delete, .node-delete, .disk-remove, .template-delete, .delete-from-group, .group-remove-all-btn, .lease-delete'
).
click
(
function
(
e
)
{
$
(
'.group-create, .group-import, .
group-export, .
node-create, .tx-tpl-ownership, .group-delete, .node-delete, .disk-remove, .template-delete, .delete-from-group, .group-remove-all-btn, .lease-delete'
).
click
(
function
(
e
)
{
$
.
ajax
({
type
:
'GET'
,
url
:
$
(
this
).
prop
(
'href'
),
...
...
circle/dashboard/templates/dashboard/group-detail.html
View file @
12282eb8
...
...
@@ -12,6 +12,9 @@
<a
title=
"{% trans "
Rename
"
%}"
class=
"btn btn-default btn-xs group-details-rename-button"
>
<i
class=
"fa fa-pencil"
></i>
</a>
<a
title=
"{% trans "
Export
"
%}"
data-group-pk=
"{{ group.pk }}"
class=
"btn btn-default btn-xs group-export"
href=
"{% url "
dashboard
.
views
.
group-export
"
group_pk=
group.pk
%}"
>
<i
class=
"fa fa-upload"
></i>
</a>
<a
title=
"{% trans "
Delete
"
%}"
data-group-pk=
"{{ group.pk }}"
class=
"btn btn-default btn-xs real-link group-delete"
href=
"{% url "
dashboard
.
views
.
delete-group
"
pk=
group.pk
%}"
>
<i
class=
"fa fa-trash-o"
></i>
</a>
...
...
@@ -141,7 +144,7 @@
<hr
/>
<script
type=
"text/javascript"
src=
"/static/admin/js/vendor/jquery/jquery.min.js"
></script>
<script
type=
"text/javascript"
src=
"/static/admin/js/jquery.init.js"
></script>
<script
type=
"text/javascript"
src=
"/static/admin/js/jquery.init.js"
></script>
<script
type=
"text/javascript"
src=
"/static/autocomplete_light/jquery.init.js"
></script>
<script
type=
"text/javascript"
src=
"/static/autocomplete_light/vendor/select2/dist/js/select2.js"
></script>
{{ group_perm_form.media }}
...
...
circle/dashboard/templates/dashboard/group-list/column-actions.html
View file @
12282eb8
<a
data-group-pk=
"{{ record.pk }}"
class=
"btn btn-danger btn-xs real-link group-delete"
href=
"{% url "
dashboard
.
views
.
delete-group
"
pk=
record.pk
%}?
next=
{{
request
.
path
}}"
>
<i
class=
"fa fa-trash-o"
></i>
class=
"btn btn-danger btn-xs real-link group-delete"
href=
"{% url "
dashboard
.
views
.
delete-group
"
pk=
record.pk
%}?
next=
{{
request
.
path
}}"
>
<i
class=
"fa fa-trash-o"
></i>
</a>
circle/dashboard/urls.py
View file @
12282eb8
...
...
@@ -58,7 +58,7 @@ from .views import (
MessageList
,
MessageDetail
,
MessageCreate
,
MessageDelete
,
EnableTwoFactorView
,
DisableTwoFactorView
,
AclUserGroupAutocomplete
,
AclUserAutocomplete
,
RescheduleView
,
GroupImportView
,
RescheduleView
,
GroupImportView
,
GroupExportView
)
from
.views.node
import
node_ops
from
.views.vm
import
vm_ops
,
vm_mass_ops
...
...
@@ -200,6 +200,9 @@ urlpatterns = [
name
=
'dashboard.views.group-create'
),
url
(
r'^group/import/$'
,
GroupImportView
.
as_view
(),
name
=
"dashboard.views.group-import"
),
url
(
r'^group/(?P<group_pk>\d+)/export/$'
,
GroupExportView
.
as_view
(),
name
=
"dashboard.views.group-export"
),
url
(
r'^group/(?P<group_pk>\d+)/permissions/$'
,
GroupPermissionsView
.
as_view
(),
name
=
"dashboard.views.group-permissions"
),
...
...
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