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
bdf66d49
Commit
bdf66d49
authored
Apr 01, 2016
by
Franco Fichtner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
firewall: pimp schedule layout
parent
a818fb3f
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
323 additions
and
336 deletions
+323
-336
firewall_schedule.php
src/www/firewall_schedule.php
+42
-43
firewall_schedule_edit.php
src/www/firewall_schedule_edit.php
+281
-293
No files found.
src/www/firewall_schedule.php
View file @
bdf66d49
...
...
@@ -114,33 +114,32 @@ $main_buttons = array(
<div
class=
"row"
>
<?php
if
(
isset
(
$savemsg
))
print_info_box
(
$savemsg
);
?>
<section
class=
"col-xs-12"
>
<div
class=
"content-box
content-box-main
"
>
<div
class=
"content-box
tab-content
"
>
<form
action=
"firewall_schedule.php"
method=
"post"
name=
"iform"
id=
"iform"
>
<input
type=
"hidden"
id=
"id"
name=
"id"
value=
""
/>
<input
type=
"hidden"
id=
"action"
name=
"act"
value=
""
/>
<div
class=
"table-responsive"
>
<table
class=
"table table-striped"
>
<thead>
<tr>
<td>
<?=
gettext
(
"Name"
);
?>
</td>
<td>
<?=
gettext
(
"Time Range(s)"
);
?>
</td>
<td>
<?=
gettext
(
"Description"
);
?>
</td>
<td></td>
</tr>
</thead>
<tbody>
<?php
$i
=
0
;
foreach
(
$a_schedules
as
$schedule
)
:
?>
<tr
ondblclick=
"document.location='firewall_schedule_edit.php?id=
<?=
$i
;
?>
';"
>
<td>
<?=
$schedule
[
'name'
];
?>
<table
class=
"table table-striped"
>
<thead>
<tr>
<td>
<?=
gettext
(
"Name"
);
?>
</td>
<td>
<?=
gettext
(
"Time Range(s)"
);
?>
</td>
<td>
<?=
gettext
(
"Description"
);
?>
</td>
<td></td>
</tr>
</thead>
<tbody>
<?php
$i
=
0
;
foreach
(
$a_schedules
as
$schedule
)
:
?>
<tr
ondblclick=
"document.location='firewall_schedule_edit.php?id=
<?=
$i
;
?>
';"
>
<td>
<?=
$schedule
[
'name'
];
?>
<?php
if
(
filter_get_time_based_rule_status
(
$schedule
))
:?>
<
span
data
-
toggle
=
"tooltip"
title
=
"<?=gettext("
Schedule
is
currently
active
");?>"
class
="
fa
fa
-
clock
-
o
"></span>
<
span
data
-
toggle
=
"tooltip"
title
=
"<?=gettext("
Schedule
is
currently
active
");?>"
class
="
fa
fa
-
clock
-
o
"></span>
<?php
endif;?>
</td>
<td>
<table class="
table
table
-
condensed
table
-
striped
">
</td>
<td>
<table class="
table
table
-
condensed
table
-
striped
">
<?php
foreach(
$schedule['timerange']
as
$timerange
) {
$firstprint
= false;
...
...
@@ -227,32 +226,32 @@ $main_buttons = array(
?><tr><td><?=
$dayFriendly
;?></td><td><?=
$timeFriendly
;?></td><td><?=
$description
;?></td></tr><?php
}
}//end for?></table>
</td>
<td>
<?=
$schedule['descr']
;?>
</td>
<td>
<a href="
firewall_schedule_edit
.
php
?
id
=<?=
$i
;
?>
" data-toggle="tooltip" title="
<?=
gettext
(
"edit schedule"
);
?>
" class="btn btn-default btn-xs">
<span
class=
"glyphicon glyphicon-pencil"
></span>
</a>
<a
id=
"del_
<?=
$i
;
?>
"
title=
"
<?=
gettext
(
"delete schedule"
);
?>
"
data-toggle=
"tooltip"
class=
"act_delete btn btn-default btn-xs"
>
<span
class=
"fa fa-trash text-muted"
></span>
</a>
<a
href=
"firewall_schedule.php?dup=
<?=
$i
;
?>
"
class=
"btn btn-default btn-xs"
data-toggle=
"tooltip"
title=
"
<?=
gettext
(
"clone schedule"
);
?>
"
>
<span
class=
"fa fa-clone text-muted"
></span>
</a>
</td>
</tr>
</td>
<td>
<?=
$schedule['descr']
;?>
</td>
<td>
<a href="
firewall_schedule_edit
.
php
?
id
=<?=
$i
;
?>
" data-toggle="tooltip" title="
<?=
gettext
(
"edit schedule"
);
?>
" class="btn btn-default btn-xs">
<span
class=
"glyphicon glyphicon-pencil"
></span>
</a>
<a
id=
"del_
<?=
$i
;
?>
"
title=
"
<?=
gettext
(
"delete schedule"
);
?>
"
data-toggle=
"tooltip"
class=
"act_delete btn btn-default btn-xs"
>
<span
class=
"fa fa-trash text-muted"
></span>
</a>
<a
href=
"firewall_schedule.php?dup=
<?=
$i
;
?>
"
class=
"btn btn-default btn-xs"
data-toggle=
"tooltip"
title=
"
<?=
gettext
(
"clone schedule"
);
?>
"
>
<span
class=
"fa fa-clone text-muted"
></span>
</a>
</td>
</tr>
<?php
$i
++
;
endforeach
;
?>
<
/tbody
>
</table
>
</div
>
<div
class=
"container-fluid"
>
<span
class=
"text-danger"
><strong>
<?=
gettext
(
"Note:"
);
?>
<br
/></strong></span
>
<
?=
gettext
(
"Schedules act as placeholders for time ranges to be used in Firewall Rules."
);
?
>
</
div
>
<
tr
>
<td
colspan=
"4"
>
<?=
gettext
(
"Schedules act as placeholders for time ranges to be used in Firewall Rules."
);
?
>
</td
>
</tr
>
<
/tbody
>
</
table
>
</form>
</div>
</section>
...
...
src/www/firewall_schedule_edit.php
View file @
bdf66d49
This diff is collapsed.
Click to expand it.
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