2 Copyright
2008 Steven Barth
<steven@midlink.org
>
3 Copyright
2008-
2015 Jo-Philipp Wich
<jow@openwrt.org
>
4 Copyright
2017 Stan Grishin
<stangri@melmac.net
>
5 Licensed to the public under the Apache License
2.0.
10 <h2 name=
"content"><%:Advanced Reboot%
></h2>
13 <%- local c = require(
"luci.model.uci").cursor():changes(); if c and next(c) then -%
>
14 <p class=
"alert-message warning"><%:Warning: There are unsaved changes that will get lost on reboot!%
></p>
17 <%- if device_name then -%
>
18 <fieldset class=
"cbi-section">
19 <legend><%=device_name%
><%: Partitions%
></legend>
20 <table class=
"cbi-section-table" id=
"partitions">
21 <tr class=
"cbi-section-table-titles">
22 <th class=
"cbi-section-table-cell"><%:Partition%
></th>
23 <th class=
"cbi-section-table-cell"><%:Status%
></th>
24 <th class=
"cbi-section-table-cell"><%:Firmware/OS (Kernel)%
></th>
25 <th class=
"cbi-section-table-cell"><%:Action%
></th>
27 <tr class=
"cbi-section-table-row">
29 <%=boot_envvar1_partition_one%
>
32 <%- if boot_envvar1_partition_one == current_partition then -%
><%:Current%
><%- else -%
><%:Alternative%
><%- end -%
>
38 <%- if boot_envvar1_partition_one == current_partition then -%
>
39 <form method=
"post" action=
"<%=url('admin/system/advanced_reboot/reboot')%>">
40 <input type=
"hidden" name=
"token" value=
"<%=token%>" />
41 <input id=
"reboot-button" type=
"submit" class=
"cbi-button cbi-button-apply" value=
"<%:Reboot to current partition%>" />
44 <form method=
"post" action=
"<%=url('admin/system/advanced_reboot/alternative_reboot')%>">
45 <input type=
"hidden" name=
"token" value=
"<%=token%>" />
46 <input id=
"altreboot-button" type=
"submit" class=
"cbi-button cbi-button-apply" value=
"<%:Reboot to alternative partition...%>" />
51 <tr class=
"cbi-section-table-row">
53 <%=boot_envvar1_partition_two%
>
56 <%- if boot_envvar1_partition_two == current_partition then -%
><%:Current%
><%- else -%
><%:Alternative%
><%- end -%
>
62 <%- if boot_envvar1_partition_two == current_partition then -%
>
63 <form method=
"post" action=
"<%=url('admin/system/advanced_reboot/reboot')%>">
64 <input type=
"hidden" name=
"token" value=
"<%=token%>" />
65 <input id=
"reboot-button" type=
"submit" class=
"cbi-button cbi-button-apply" value=
"<%:Reboot to current partition%>" />
68 <form method=
"post" action=
"<%=url('admin/system/advanced_reboot/alternative_reboot')%>">
69 <input type=
"hidden" name=
"token" value=
"<%=token%>" />
70 <input id=
"altreboot-button" type=
"submit" class=
"cbi-button cbi-button-apply" value=
"<%:Reboot to alternative partition...%>" />
78 <p class=
"alert-message warning"><%:Warning: This system does not have two partitions!%
></p>
83 <%- if nixio.fs.access(
"/sbin/poweroff") then -%
>
84 <form method=
"post" action=
"<%=url('admin/system/advanced_reboot/power_off')%>">
85 <input type=
"hidden" name=
"token" value=
"<%=token%>" />
86 <input id=
"poweroff-button" type=
"submit" class=
"cbi-button cbi-button-apply" value=
"<%:Perform power off...%>" />
89 <p class=
"alert-message warning"><%:Warning: This system does not support powering off!%
></p>