Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Gelencsér Szabolcs
/
cloud
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
692cbe84
authored
May 16, 2013
by
Bence Dányi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
firewall_gui: show domain details
parent
51b375a9
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
0 deletions
+17
-0
cloud/urls.py
+2
-0
firewall_gui/views.py
+15
-0
No files found.
cloud/urls.py
View file @
692cbe84
...
...
@@ -100,6 +100,8 @@ urlpatterns = patterns('',
url
(
r'^firewall/vlans/(?P<id>\d+)/$'
,
'firewall_gui.views.show_vlan'
),
url
(
r'^firewall/vlangroups/(?P<id>\d+)/$'
,
'firewall_gui.views.show_vlangroup'
),
url
(
r'^firewall/hostgroups/(?P<id>\d+)/$'
,
'firewall_gui.views.show_hostgroup'
),
url
(
r'^firewall/records/(?P<id>\d+)/$'
,
'firewall_gui.views.show_record'
),
url
(
r'^firewall/domains/(?P<id>\d+)/$'
,
'firewall_gui.views.show_domain'
),
url
(
r'^firewall/(?P<name>\w+)/$'
,
'firewall_gui.views.list_entities'
),
...
...
firewall_gui/views.py
View file @
692cbe84
...
...
@@ -396,6 +396,21 @@ def show_record(request, id):
}
return
HttpResponse
(
json
.
dumps
(
record
),
content_type
=
'application/json'
)
def
show_domain
(
request
,
id
):
domain
=
get_object_or_404
(
Domain
,
id
=
id
)
domain
=
{
'id'
:
domain
.
id
,
'name'
:
domain
.
name
,
'owner'
:
{
'id'
:
domain
.
owner
.
id
,
'name'
:
domain
.
owner
.
username
,
},
'created_at'
:
domain
.
created_at
.
isoformat
(),
'modified_at'
:
domain
.
modified_at
.
isoformat
(),
'ttl'
:
domain
.
ttl
,
'description'
:
domain
.
description
}
return
HttpResponse
(
json
.
dumps
(
domain
),
content_type
=
'application/json'
)
def
make_autocomplete
(
entity
,
name
=
'name'
):
def
autocomplete
(
request
):
...
...
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