Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Fukász Rómeó Ervin
/
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
4ac011db
authored
Oct 03, 2013
by
Kálmán Viktor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
network: show addresses on record list (issue #14)
parent
9c7ba32e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
0 deletions
+18
-0
circle/network/tables.py
+3
-0
circle/network/templates/network/columns/records-address.html
+15
-0
No files found.
circle/network/tables.py
View file @
4ac011db
...
@@ -90,6 +90,9 @@ class SmallHostTable(Table):
...
@@ -90,6 +90,9 @@ class SmallHostTable(Table):
class
RecordTable
(
Table
):
class
RecordTable
(
Table
):
fqdn
=
LinkColumn
(
'network.record'
,
args
=
[
A
(
'pk'
)],
orderable
=
False
)
fqdn
=
LinkColumn
(
'network.record'
,
args
=
[
A
(
'pk'
)],
orderable
=
False
)
address
=
TemplateColumn
(
template_name
=
"network/columns/records-address.html"
)
class
Meta
:
class
Meta
:
model
=
Record
model
=
Record
...
...
circle/network/templates/network/columns/records-address.html
0 → 100644
View file @
4ac011db
{% if record.host %}
{% if record.type == "A" %}
{{ record.host.ipv4 }}
{% elif record.type == "AAAA" %}
{{ record.host.ipv6 }}
{% elif record.type == "CNAME" %}
{{ record.host.get_fqdn }}
{% elif record.type == "MX" %}
{{ record.host.get_fqdn }}
{% else %}
This should not appear!
{% endif %}
{% else %}
{{ record.address }}
{% endif %}
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