Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
W
White Rabbit Switch - Software
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
86
Issues
86
List
Board
Labels
Milestones
Merge Requests
4
Merge Requests
4
CI / CD
CI / CD
Pipelines
Schedules
Wiki
Wiki
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Projects
White Rabbit Switch - Software
Commits
4e9aaa51
Commit
4e9aaa51
authored
Mar 08, 2017
by
anne munoz
Committed by
Adam Wujek
Aug 02, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
www: fixed reset
added reboot button fixed redirect to reboot page
parent
6471fdab
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
4 deletions
+21
-4
functions.php
userspace/rootfs_override/var/www/functions.php
+1
-2
menu.php
userspace/rootfs_override/var/www/menu.php
+1
-1
reset.php
userspace/rootfs_override/var/www/reset.php
+19
-1
No files found.
userspace/rootfs_override/var/www/functions.php
View file @
4e9aaa51
...
...
@@ -1435,8 +1435,7 @@ function get_encrypt_salt($enc_password){
**/
function
resetswitch
(){
shell_exec
(
"make -C /wr/etc/ defconfig"
);
shell_exec
(
"reboot"
);
wrs_reboot
();
wrs_reboot
();
}
/**
...
...
userspace/rootfs_override/var/www/menu.php
View file @
4e9aaa51
...
...
@@ -42,7 +42,7 @@ echo '<div class="login">
echo
'<li><a href="logs.php">System Logs</a></li>'
;
echo
'<li><a href="terminal.php">Virtual Console</a></li>'
;
echo
'<li><a href="firmware.php">Firmware</a></li>'
;
echo
'<li><a href="reset.php">Re
set to defaul
t</a></li>'
;
echo
'<li><a href="reset.php">Re
boot & Rese
t</a></li>'
;
echo
'</ul>'
;
}
echo
'</ul><br><hr>'
;
...
...
userspace/rootfs_override/var/www/reset.php
View file @
4e9aaa51
...
...
@@ -16,13 +16,26 @@
</div>
<div
class=
"rightpanel"
>
<div
class=
"rightbody"
>
<h1
class=
"title"
>
Re
set
<a
href=
'help.php?help_id=firmware'
onClick=
'showPopup(this.href);return(false);'
><img
align=
right
src=
"./img/question.png"
></a></h1>
<h1
class=
"title"
>
Re
boot
&
Reset
<a
href=
'help.php?help_id=firmware'
onClick=
'showPopup(this.href);return(false);'
><img
align=
right
src=
"./img/question.png"
></a></h1>
<?php
session_is_started
();
?>
<h2>
Reboot
</h2>
<br>
<p>
This will reboot your switch
</p>
<br>
<FORM
method=
"POST"
ENCTYPE=
"multipart/form-data"
onsubmit=
"return confirm('Are you sure you want to reboot the switch?');"
>
<th><INPUT
type=
submit
value=
"Reboot"
class=
"btn"
name=
"reboot"
></th>
</FORM>
<br>
<hr>
<br>
<h2>
Reset
</h2>
<br>
<p>
This will reset your switch to the default state
</p>
<br>
<FORM
method=
"POST"
ENCTYPE=
"multipart/form-data"
onsubmit=
"return confirm('Are you sure you want to reset the switch?');"
>
...
...
@@ -38,6 +51,11 @@
resetswitch
();
}
if
(
isset
(
$_POST
[
'reboot'
])){
wrs_reboot
();
}
?>
</div>
</div>
...
...
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