docker: adapt wizard

This commit is contained in:
nachoparker 2018-06-19 18:51:22 +02:00
parent 1af50d792c
commit 3ee64098b6
6 changed files with 31 additions and 20 deletions

View File

@ -1,5 +1,7 @@
[v0.57.7](https://github.com/nextcloud/nextcloudpi/commit/619812c) (2018-06-19) docker: fix persist ncp-web password
[v0.57.8](https://github.com/nextcloud/nextcloudpi/commit/61360da) (2018-06-19) docker: adapt wizard
[v0.57.7](https://github.com/nextcloud/nextcloudpi/commit/98c99e3) (2018-06-19) docker: fix persist ncp-web password
[v0.57.6 ](https://github.com/nextcloud/nextcloudpi/commit/9d0d3b3) (2018-06-19) fix mysqld service named mysql

View File

@ -32,9 +32,6 @@ sed -i 's|/media/USBdrive|/data/backups|' ncp-config.d/nc-backup.sh; \
rm /usr/local/etc/ncp.sh; \
rm /.ncp-image; \
# remove wizard for now
rm -r /var/www/ncp-web/wizard; \
# cleanup all NCP extras
source /usr/local/etc/library.sh; \
cd /usr/local/etc/ncp-config.d/; \

View File

@ -32,9 +32,6 @@ sed -i 's|/media/USBdrive|/data/backups|' ncp-config.d/nc-backup.sh; \
rm /usr/local/etc/ncp.sh; \
rm /.ncp-image; \
# remove wizard for now
rm -r /var/www/ncp-web/wizard; \
# cleanup all NCP extras
source /usr/local/etc/library.sh; \
cd /usr/local/etc/ncp-config.d/; \

View File

@ -168,13 +168,12 @@ HTML;
</div>
</a>
<?php
if ( !file_exists( '/.docker-image' ) )
echo <<<HTML
<div id="poweroff">
<div id="expand">
<div class="icon-power-white"></div>
</div>
</div>
echo <<<HTML
<div id="poweroff">
<div id="expand">
<div class="icon-power-white"></div>
</div>
</div>
HTML;
?>
</div>

View File

@ -2,6 +2,8 @@
/*global $, jQuery, alert*/
$(document).ready(function(){
var in_docker = $('#in-docker');
function addNotification( txt, tclass )
{
// limit to 9 notifications
@ -185,12 +187,15 @@ $(document).ready(function(){
// Enable external access step
$('#enable-external').on('click', function(){
launch_action( 'fail2ban',
{ "ACTIVE":"yes" },
function ( data ){
nextOnSuccess( data, function(){ show_with_animation( 'forward-ports-pane' ) } );
}
);
if ( !in_docker )
launch_action( 'fail2ban',
{ "ACTIVE":"yes" },
function ( data ){
nextOnSuccess( data, function(){ show_with_animation( 'forward-ports-pane' ) } );
}
);
else
show_with_animation( 'forward-ports-pane' );
});
// Skip external access step

View File

@ -29,7 +29,13 @@
<div id="rootwizard">
<ul id="ncp-nav">
<li><a href="#tab1" data-toggle="tab">Welcome</a></li>
<?php
// Skip USB section in docker container
if ( !file_exists( '/.docker-image' ) )
echo <<<HTML
<li><a href="#tab2" data-toggle="tab">USB Configuration</a></li>
HTML
?>
<li><a href="#tab3" data-toggle="tab">External access</a></li>
<li><a href="#tab4" data-toggle="tab">Finish</a></li>
</ul>
@ -208,8 +214,13 @@
<div id="notifications"></div>
<?php
// CSRF protection
include ('../csrf.php');
echo '<input type="hidden" id="csrf-token" name="csrf-token" value="' . getCSRFToken() . '"/>';
// Mark the wizard as "in docker"
if ( file_exists( '/.docker-image' ) )
echo '<input type="hidden" id="in-docker" name="in-docker" value=""/>';
?>
<script src="JS/jquery-latest.js"></script>