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
f19feec1
authored
Apr 29, 2013
by
Bence Dányi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
firewall_gui: boilerplate code removed
parent
146497db
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
17 deletions
+15
-17
firewall_gui/static/js/project.js
+15
-17
No files found.
firewall_gui/static/js/project.js
View file @
f19feec1
var
listControllers
=
{
rules
:
'rule-list'
,
hosts
:
'host-list'
,
vlans
:
'vlan-list'
,
vlangroups
:
'vlangroup-list'
,
hostgroups
:
'hostgroup-list'
,
};
var
module
=
angular
.
module
(
'firewall'
,
[]).
config
(
var
module
=
angular
.
module
(
'firewall'
,
[]).
config
(
[
'$routeProvider'
,
function
(
$routeProvider
)
{
[
'$routeProvider'
,
function
(
$routeProvider
)
{
$routeProvider
.
when
(
'/rules/'
,
{
for
(
var
i
in
listControllers
)
{
templateUrl
:
'/static/partials/rule-list.html'
,
$routeProvider
.
when
(
'/'
+
i
+
'/'
,
{
controller
:
ListController
(
'/firewall/rules/'
)
templateUrl
:
'/static/partials/'
+
listControllers
[
i
]
+
'.html'
,
}).
when
(
'/hosts/'
,
{
controller
:
ListController
(
'/firewall/'
+
i
+
'/'
)
templateUrl
:
'/static/partials/host-list.html'
,
});
controller
:
ListController
(
'/firewall/hosts/'
)
}
}).
when
(
'/vlans/'
,
{
$routeProvider
.
otherwise
({
templateUrl
:
'/static/partials/vlan-list.html'
,
controller
:
ListController
(
'/firewall/vlans/'
)
}).
when
(
'/vlangroups/'
,
{
templateUrl
:
'/static/partials/vlangroup-list.html'
,
controller
:
ListController
(
'/firewall/vlangroups/'
)
}).
when
(
'/hostgroups/'
,
{
templateUrl
:
'/static/partials/hostgroup-list.html'
,
controller
:
ListController
(
'/firewall/hostgroups/'
)
}).
otherwise
({
redirectTo
:
'/rules/'
redirectTo
:
'/rules/'
});
});
}]);
}]);
...
...
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