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
805181a0
authored
May 16, 2013
by
Bence Dányi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
firewall_gui: autocomplete for usernames
parent
87c7b63c
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
9 additions
and
8 deletions
+9
-8
firewall_gui/static/js/project.js
+1
-1
firewall_gui/static/partials/host-edit.html
+1
-1
firewall_gui/static/partials/hostgroup-edit.html
+1
-1
firewall_gui/static/partials/record-edit.html
+1
-1
firewall_gui/static/partials/rule-edit.html
+1
-1
firewall_gui/static/partials/vlan-edit.html
+1
-1
firewall_gui/static/partials/vlangroup-edit.html
+1
-1
firewall_gui/views.py
+2
-1
No files found.
firewall_gui/static/js/project.js
View file @
805181a0
...
...
@@ -293,7 +293,7 @@ function EntityController(url, init) {
}
$http
.
get
(
url
+
id
+
'/'
).
success
(
function
success
(
data
)
{
$scope
.
entity
=
data
;
[
'vlan'
,
'vlangroup'
,
'host'
,
'hostgroup'
,
'firewall'
].
forEach
(
function
(
t
)
{
[
'vlan'
,
'vlangroup'
,
'host'
,
'hostgroup'
,
'firewall'
,
'owner'
,
'domain'
,
'record'
].
forEach
(
function
(
t
)
{
$
(
'.'
+
t
).
typeahead
({
/**
* Typeahead does AJAX queries
...
...
firewall_gui/static/partials/host-edit.html
View file @
805181a0
...
...
@@ -56,7 +56,7 @@
<div
class=
"control-group"
ng-class=
"hasError('owner')"
>
<label
class=
"control-label"
for=
"owner"
>
Owner
</label>
<div
class=
"controls"
>
<input
type=
"text"
autocomplete=
"off"
id=
"owner"
ng-model=
"entity.owner.name"
/>
<input
type=
"text"
class=
"owner"
autocomplete=
"off"
id=
"owner"
ng-model=
"entity.owner.name"
/>
<span
class=
"help-inline"
ng-bind=
"getError('owner')"
></span>
</div>
</div>
...
...
firewall_gui/static/partials/hostgroup-edit.html
View file @
805181a0
...
...
@@ -30,7 +30,7 @@
<div
class=
"control-group"
ng-class=
"hasError('owner')"
>
<label
class=
"control-label"
for=
"owner"
>
Owner
</label>
<div
class=
"controls"
>
<input
type=
"text"
autocomplete=
"off"
id=
"owner"
ng-model=
"entity.owner.name"
/>
<input
type=
"text"
class=
"owner"
autocomplete=
"off"
id=
"owner"
ng-model=
"entity.owner.name"
/>
<span
class=
"help-inline"
ng-bind=
"getError('owner')"
></span>
</div>
</div>
...
...
firewall_gui/static/partials/record-edit.html
View file @
805181a0
...
...
@@ -58,7 +58,7 @@
<div
class=
"control-group"
ng-class=
"hasError('owner')"
>
<label
class=
"control-label"
for=
"owner"
>
Owner
</label>
<div
class=
"controls"
>
<input
type=
"text"
autocomplete=
"off"
id=
"owner"
ng-model=
"entity.owner.name"
/>
<input
type=
"text"
class=
"owner"
autocomplete=
"off"
id=
"owner"
ng-model=
"entity.owner.name"
/>
<span
class=
"help-inline"
ng-bind=
"getError('owner')"
></span>
</div>
</div>
...
...
firewall_gui/static/partials/rule-edit.html
View file @
805181a0
...
...
@@ -55,7 +55,7 @@
<div
class=
"control-group"
ng-class=
"hasError('owner')"
>
<label
class=
"control-label"
for=
"owner"
>
Owner
</label>
<div
class=
"controls"
>
<input
type=
"text"
autocomplete=
"off"
id=
"owner"
ng-model=
"entity.owner.name"
/>
<input
type=
"text"
class=
"owner"
autocomplete=
"off"
id=
"owner"
ng-model=
"entity.owner.name"
/>
<span
class=
"help-inline"
ng-bind=
"getError('owner')"
></span>
</div>
</div>
...
...
firewall_gui/static/partials/vlan-edit.html
View file @
805181a0
...
...
@@ -56,7 +56,7 @@
<div
class=
"control-group"
ng-class=
"hasError('owner')"
>
<label
class=
"control-label"
for=
"owner"
>
Owner
</label>
<div
class=
"controls"
>
<input
type=
"text"
autocomplete=
"off"
id=
"owner"
ng-model=
"entity.owner.name"
/>
<input
type=
"text"
class=
"owner"
autocomplete=
"off"
id=
"owner"
ng-model=
"entity.owner.name"
/>
<span
class=
"help-inline"
ng-bind=
"getError('owner')"
></span>
</div>
</div>
...
...
firewall_gui/static/partials/vlangroup-edit.html
View file @
805181a0
...
...
@@ -28,7 +28,7 @@
<div
class=
"control-group"
ng-class=
"hasError('owner')"
>
<label
class=
"control-label"
for=
"owner"
>
Owner
</label>
<div
class=
"controls"
>
<input
type=
"text"
autocomplete=
"off"
id=
"owner"
ng-model=
"entity.owner.name"
/>
<input
type=
"text"
class=
"owner"
autocomplete=
"off"
id=
"owner"
ng-model=
"entity.owner.name"
/>
<span
class=
"help-inline"
ng-bind=
"getError('owner')"
></span>
</div>
</div>
...
...
firewall_gui/views.py
View file @
805181a0
...
...
@@ -433,9 +433,10 @@ def autocomplete(request, entity):
'firewall'
:
make_autocomplete
(
Firewall
),
'domain'
:
make_autocomplete
(
Domain
),
'record'
:
make_autocomplete
(
Record
),
'owner'
:
make_autocomplete
(
User
,
'username'
)
}[
entity
](
request
)
except
Exception
as
e
:
return
HttpResponse
(
'>:-3'
,
status
=
500
)
return
HttpResponse
(
'>:-3'
+
str
(
e
)
,
status
=
500
)
def
set_field
(
object
,
attr
,
errors
,
**
kwargs
):
...
...
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