Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
OpnSense
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kulya
OpnSense
Commits
4cf690e0
Commit
4cf690e0
authored
Mar 11, 2015
by
Franco Fichtner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
src: style and whitespace sweep
parent
aa34ef3e
Changes
12
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
23 additions
and
28 deletions
+23
-28
Makefile
Makefile
+2
-0
configd
src/etc/rc.d/configd
+11
-11
services_api.php
src/opnsense/mvc/app/config/services_api.php
+5
-2
IntegerValidator.php
.../app/models/OPNsense/Base/Validators/IntegerValidator.php
+2
-3
MinMaxValidator.php
...c/app/models/OPNsense/Base/Validators/MinMaxValidator.php
+2
-2
__init__.py
src/opnsense/service/modules/addons/__init__.py
+0
-1
template_helpers.py
src/opnsense/service/modules/addons/template_helpers.py
+0
-1
example_simple_page.txt
...service/templates/OPNsense/Sample/example_simple_page.txt
+0
-3
variables.less
src/opnsense/www/css/font-awesome/less/variables.less
+0
-1
_variables.scss
src/opnsense/www/css/font-awesome/scss/_variables.scss
+0
-1
opnsense.js
src/opnsense/www/js/opnsense.js
+0
-2
opnsense_ui.js
src/opnsense/www/js/opnsense_ui.js
+1
-1
No files found.
Makefile
View file @
4cf690e0
...
@@ -35,6 +35,8 @@ sweep:
...
@@ -35,6 +35,8 @@ sweep:
find
${
.CURDIR
}
/src
!
-name
"*.min.*"
!
-name
"*.svg"
\
find
${
.CURDIR
}
/src
!
-name
"*.min.*"
!
-name
"*.svg"
\
!
-name
"*.map"
-type
f
-print0
|
\
!
-name
"*.map"
-type
f
-print0
|
\
xargs
-0
-n1
scripts/cleanfile
xargs
-0
-n1
scripts/cleanfile
find
${
.CURDIR
}
/pkg
-type
f
-print0
|
\
xargs
-0
-n1
scripts/cleanfile
style
:
style
:
@
(
phpcs
--tab-width
=
4
--standard
=
PSR2
${
.CURDIR
}
/src/opnsense/mvc
\
@
(
phpcs
--tab-width
=
4
--standard
=
PSR2
${
.CURDIR
}
/src/opnsense/mvc
\
...
...
src/etc/rc.d/configd
View file @
4cf690e0
...
@@ -27,10 +27,10 @@ configd_load_rc_config()
...
@@ -27,10 +27,10 @@ configd_load_rc_config()
command_interpreter
=
/usr/local/bin/python2.7
command_interpreter
=
/usr/local/bin/python2.7
}
}
#
#
configd_prestart
()
configd_prestart
()
{
{
# reset access rights on configd daemon script
# reset access rights on configd daemon script
chmod
700 /usr/local/opnsense/service/configd.py
chmod
700 /usr/local/opnsense/service/configd.py
}
}
...
@@ -38,32 +38,32 @@ configd_prestart()
...
@@ -38,32 +38,32 @@ configd_prestart()
configd_poststart
()
configd_poststart
()
{
{
# give the daemon some time to initilize it's configuration
# give the daemon some time to initilize it's configuration
sleep
1
sleep
1
}
}
# kill configd
# kill configd
configd_stop
()
configd_stop
()
{
{
if
[
-z
"
$rc_pid
"
]
;
then
if
[
-z
"
$rc_pid
"
]
;
then
[
-n
"
$rc_fast
"
]
&&
return
0
[
-n
"
$rc_fast
"
]
&&
return
0
_run_rc_notrunning
_run_rc_notrunning
return
1
return
1
fi
fi
echo
-n
"Stopping
${
name
}
."
echo
-n
"Stopping
${
name
}
."
# first ask gently to exit
# first ask gently to exit
kill
-15
${
rc_pid
}
kill
-15
${
rc_pid
}
# wait max 2 seconds for gentle exit
# wait max 2 seconds for gentle exit
for
i
in
$(
seq
1 20
)
;
for
i
in
$(
seq
1 20
)
;
do
do
if
[
-z
"
`
/bin/ps
-ex
| /usr/bin/awk
'{print $1;}'
| /usr/bin/grep
"^
${
rc_pid
}
"
`
"
]
;
then
if
[
-z
"
`
/bin/ps
-ex
| /usr/bin/awk
'{print $1;}'
| /usr/bin/grep
"^
${
rc_pid
}
"
`
"
]
;
then
break
break
fi
fi
sleep
0.1
sleep
0.1
done
done
# kill if it's still running
# kill if it's still running
if
[
!
-z
"
`
/bin/ps
-ex
| /usr/bin/awk
'{print $1;}'
| /usr/bin/grep
"^
${
rc_pid
}
"
`
"
]
;
then
if
[
!
-z
"
`
/bin/ps
-ex
| /usr/bin/awk
'{print $1;}'
| /usr/bin/grep
"^
${
rc_pid
}
"
`
"
]
;
then
kill
-9
${
rc_pid
}
kill
-9
${
rc_pid
}
fi
fi
...
...
src/opnsense/mvc/app/config/services_api.php
View file @
4cf690e0
<?php
<?php
/**
/**
* Copyright (C) 2015 Deciso B.V.
* Copyright (C) 2015 Deciso B.V.
*
*
...
@@ -88,9 +89,11 @@ $di->set('router', function() {
...
@@ -88,9 +89,11 @@ $di->set('router', function() {
//
//
// probe registered API modules and create a namespace map
// probe registered API modules and create a namespace map
// for example, OPNsense\Core\Api will be mapped at http(s):\\host\core\..
// for example, OPNsense\Core\Api will be mapped at http(s):\\host\core\..
// module names should be unique in the application, unless you want to overwrite functionality (check glob's sorting).
// module names should be unique in the application, unless you want to
// overwrite functionality (check glob's sorting).
//
//
// if the glob for probing the directories turns out to be too slow, we should consider some kind of caching here
// if the glob for probing the directories turns out to be too slow,
// we should consider some kind of caching here
//
//
$registered_modules
=
array
();
$registered_modules
=
array
();
$controller_dir
=
__DIR__
.
"/../controllers/"
;
$controller_dir
=
__DIR__
.
"/../controllers/"
;
...
...
src/opnsense/mvc/app/models/OPNsense/Base/Validators/IntegerValidator.php
View file @
4cf690e0
<?php
<?php
/**
/**
* Copyright (C) 2015 Deciso B.V.
* Copyright (C) 2015 Deciso B.V.
*
*
...
@@ -30,17 +31,15 @@ namespace OPNsense\Base\Validators;
...
@@ -30,17 +31,15 @@ namespace OPNsense\Base\Validators;
use
\Phalcon\Validation\Validator
;
use
\Phalcon\Validation\Validator
;
use
\Phalcon\Validation\ValidatorInterface
;
use
\Phalcon\Validation\ValidatorInterface
;
use
\Phalcon\Validation\Message
;
;
use
\Phalcon\Validation\Message
;
class
IntegerValidator
extends
Validator
implements
ValidatorInterface
class
IntegerValidator
extends
Validator
implements
ValidatorInterface
{
{
public
function
validate
(
$validator
,
$attribute
)
public
function
validate
(
$validator
,
$attribute
)
{
{
$value
=
$validator
->
getValue
(
$attribute
);
$value
=
$validator
->
getValue
(
$attribute
);
$msg
=
$this
->
getOption
(
'message'
);
$msg
=
$this
->
getOption
(
'message'
);
if
(
ctype_digit
(
strval
((
$value
)))
==
false
)
{
if
(
ctype_digit
(
strval
((
$value
)))
==
false
)
{
$validator
->
appendMessage
(
new
Message
(
$msg
,
$attribute
,
'IntegerValidator'
));
$validator
->
appendMessage
(
new
Message
(
$msg
,
$attribute
,
'IntegerValidator'
));
return
false
;
return
false
;
...
...
src/opnsense/mvc/app/models/OPNsense/Base/Validators/MinMaxValidator.php
View file @
4cf690e0
<?php
<?php
/**
/**
* Copyright (C) 2015 Deciso B.V.
* Copyright (C) 2015 Deciso B.V.
*
*
...
@@ -30,11 +31,10 @@ namespace OPNsense\Base\Validators;
...
@@ -30,11 +31,10 @@ namespace OPNsense\Base\Validators;
use
\Phalcon\Validation\Validator
;
use
\Phalcon\Validation\Validator
;
use
\Phalcon\Validation\ValidatorInterface
;
use
\Phalcon\Validation\ValidatorInterface
;
use
\Phalcon\Validation\Message
;
;
use
\Phalcon\Validation\Message
;
class
MinMaxValidator
extends
Validator
implements
ValidatorInterface
class
MinMaxValidator
extends
Validator
implements
ValidatorInterface
{
{
public
function
validate
(
$validator
,
$attribute
)
public
function
validate
(
$validator
,
$attribute
)
{
{
$value
=
$validator
->
getValue
(
$attribute
);
$value
=
$validator
->
getValue
(
$attribute
);
...
...
src/opnsense/service/modules/addons/__init__.py
View file @
4cf690e0
...
@@ -29,4 +29,3 @@
...
@@ -29,4 +29,3 @@
--------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------
package : configd
package : configd
"""
"""
src/opnsense/service/modules/addons/template_helpers.py
View file @
4cf690e0
...
@@ -64,4 +64,3 @@ class Helpers(object):
...
@@ -64,4 +64,3 @@ class Helpers(object):
return
True
return
True
else
:
else
:
return
False
return
False
src/opnsense/service/templates/OPNsense/Sample/example_simple_page.txt
View file @
4cf690e0
...
@@ -34,6 +34,3 @@ A sample with multiple output files ( for example based on interface ) can be fo
...
@@ -34,6 +34,3 @@ A sample with multiple output files ( for example based on interface ) can be fo
{% if helpers.exists('filter.rule') %}
{% if helpers.exists('filter.rule') %}
filter.rule exists
filter.rule exists
{% endif %}
{% endif %}
src/opnsense/www/css/font-awesome/less/variables.less
View file @
4cf690e0
...
@@ -603,4 +603,3 @@
...
@@ -603,4 +603,3 @@
@fa-var-youtube: "\f167";
@fa-var-youtube: "\f167";
@fa-var-youtube-play: "\f16a";
@fa-var-youtube-play: "\f16a";
@fa-var-youtube-square: "\f166";
@fa-var-youtube-square: "\f166";
src/opnsense/www/css/font-awesome/scss/_variables.scss
View file @
4cf690e0
...
@@ -603,4 +603,3 @@ $fa-var-yen: "\f157";
...
@@ -603,4 +603,3 @@ $fa-var-yen: "\f157";
$fa-var-youtube
:
"\f167"
;
$fa-var-youtube
:
"\f167"
;
$fa-var-youtube-play
:
"\f16a"
;
$fa-var-youtube-play
:
"\f16a"
;
$fa-var-youtube-square
:
"\f166"
;
$fa-var-youtube-square
:
"\f166"
;
src/opnsense/www/js/opnsense.js
View file @
4cf690e0
...
@@ -162,5 +162,3 @@ function ajaxGet(url,sendData,callback) {
...
@@ -162,5 +162,3 @@ function ajaxGet(url,sendData,callback) {
data
:
sendData
data
:
sendData
});
});
}
}
src/opnsense/www/js/opnsense_ui.js
View file @
4cf690e0
...
@@ -39,4 +39,4 @@ function saveFormToEndpoint(url,formid,callback_ok) {
...
@@ -39,4 +39,4 @@ function saveFormToEndpoint(url,formid,callback_ok) {
});
});
}
}
\ No newline at end of file
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