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
A prog2-höz tartozó friss repo anyagok itt elérhetőek:
https://git.iit.bme.hu/
Commit
54db2c0a
authored
May 30, 2013
by
Bence Dányi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
firewall_gui: fix missing fields
parent
d00cb31a
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
43 additions
and
2 deletions
+43
-2
firewall_gui/static/partials/record-edit.html
+12
-0
firewall_gui/static/partials/vlan-edit.html
+23
-0
firewall_gui/views.py
+8
-2
No files found.
firewall_gui/static/partials/record-edit.html
View file @
54db2c0a
...
...
@@ -116,6 +116,18 @@
<span
class=
"help-inline"
ng-bind=
"getError('address')"
></span>
</div>
</div>
<div
class=
"control-group"
ng-class=
"hasError('ttl')"
>
<label
class=
"control-label"
for=
"ttl"
>
TTL
</label>
<div
class=
"controls"
>
<input
type=
"text"
autocomplete=
"off"
id=
"ttl"
ng-model=
"entity.ttl"
title=
"Time To Live"
/>
<span
class=
"help-inline"
ng-bind=
"getError('ttl')"
></span>
</div>
</div>
<div
class=
"control-group"
ng-class=
"hasError('description')"
>
<label
class=
"control-label"
for=
"description"
>
Description
</label>
<div
class=
"controls"
>
...
...
firewall_gui/static/partials/vlan-edit.html
View file @
54db2c0a
...
...
@@ -87,6 +87,29 @@
<span
class=
"help-inline"
ng-bind=
"getError('ipv6')"
></span>
</div>
</div>
<div
class=
"control-group"
ng-class=
"hasError('net4')"
>
<label
class=
"control-label"
for=
"net4"
>
Net4
</label>
<div
class=
"controls"
>
<input
type=
"text"
id=
"net4"
ng-model=
"entity.net4"
title=
"Net4 address of this Vlan (with subnet mask)"
/>
<span
class=
"help-inline"
ng-bind=
"getError('net4')"
></span>
</div>
</div>
<div
class=
"control-group"
ng-class=
"hasError('net6')"
>
<label
class=
"control-label"
for=
"net6"
>
Net6
</label>
<div
class=
"controls"
>
<input
type=
"text"
class=
"input-xlarge"
id=
"net6"
ng-model=
"entity.net6"
title=
"Net6 address of this Vlan (with subnet mask)"
/>
<span
class=
"help-inline"
ng-bind=
"getError('net6')"
></span>
</div>
</div>
<div
class=
"control-group"
ng-class=
"hasError('snat_ip')"
>
<label
class=
"control-label"
for=
"snat_ip"
>
NAT
</label>
<div
class=
"controls"
>
...
...
firewall_gui/views.py
View file @
54db2c0a
...
...
@@ -329,6 +329,8 @@ def show_vlan(request, id=None):
'name'
:
vlan
.
name
,
'ipv4'
:
vlan
.
ipv4
+
'/'
+
str
(
vlan
.
prefix4
),
'ipv6'
:
vlan
.
ipv6
+
'/'
+
str
(
vlan
.
prefix6
),
'net4'
:
vlan
.
net4
+
'/'
+
str
(
vlan
.
prefix4
),
'net6'
:
vlan
.
net6
+
'/'
+
str
(
vlan
.
prefix6
),
'nat'
:
vlan
.
snat_ip
,
'description'
:
vlan
.
description
,
'comment'
:
vlan
.
comment
,
...
...
@@ -676,9 +678,11 @@ def save_vlan(request):
errors
=
{}
vlan
.
vid
=
data
[
'vid'
]
vlan
.
name
=
data
[
'name'
]
vlan
.
ipv4
=
vlan
.
net4
=
data
[
'ipv4'
]
.
split
(
'/'
)[
0
]
#TODO ez így nem jó!
vlan
.
ipv4
=
data
[
'ipv4'
]
.
split
(
'/'
)[
0
]
vlan
.
net4
=
data
[
'net4'
]
.
split
(
'/'
)[
0
]
vlan
.
prefix4
=
data
[
'ipv4'
]
.
split
(
'/'
)[
1
]
vlan
.
ipv6
=
vlan
.
net6
=
data
[
'ipv6'
]
.
split
(
'/'
)[
0
]
#TODO ez így nem jó!
vlan
.
ipv6
=
data
[
'ipv6'
]
.
split
(
'/'
)[
0
]
vlan
.
net6
=
data
[
'net6'
]
.
split
(
'/'
)[
0
]
vlan
.
prefix6
=
data
[
'ipv6'
]
.
split
(
'/'
)[
1
]
vlan
.
snat_ip
=
data
[
'nat'
]
vlan
.
description
=
data
[
'description'
]
...
...
@@ -793,6 +797,8 @@ def save_record(request):
record
.
name
=
data
[
'name'
]
record
.
ttl
=
data
[
'ttl'
]
record
.
description
=
data
[
'description'
]
record
.
type
=
data
[
'type'
]
record
.
address
=
data
[
'address'
]
set_field
(
record
,
'owner'
,
errors
,
username
=
data
[
'owner'
][
'name'
])
set_field
(
record
,
'domain'
,
errors
,
name
=
data
[
'domain'
][
'name'
])
try
:
...
...
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