diff options
author | nachoparker <nacho@ownyourbits.com> | 2018-06-19 19:51:22 +0300 |
---|---|---|
committer | nachoparker <nacho@ownyourbits.com> | 2018-06-19 19:51:55 +0300 |
commit | 3ee64098b6eb9e37cc2816f07aca5c894d93cfae (patch) | |
tree | 2fd5573e541ec6f3044562b6eb7edd455ddb3a53 | |
parent | 1af50d792c5fce227b56152508a51dc5de459385 (diff) |
docker: adapt wizardv0.57.8
-rw-r--r-- | changelog.md | 4 | ||||
-rw-r--r-- | docker-armhf/nextcloudpi/Dockerfile | 3 | ||||
-rw-r--r-- | docker/nextcloudpi/Dockerfile | 3 | ||||
-rw-r--r-- | ncp-web/index.php | 13 | ||||
-rw-r--r-- | ncp-web/wizard/JS/wizard.js | 17 | ||||
-rw-r--r-- | ncp-web/wizard/index.php | 11 |
6 files changed, 31 insertions, 20 deletions
diff --git a/changelog.md b/changelog.md index fdd53ca4..ae5e2cc4 100644 --- a/changelog.md +++ b/changelog.md @@ -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 diff --git a/docker-armhf/nextcloudpi/Dockerfile b/docker-armhf/nextcloudpi/Dockerfile index f6176074..569a9d57 100644 --- a/docker-armhf/nextcloudpi/Dockerfile +++ b/docker-armhf/nextcloudpi/Dockerfile @@ -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/; \ diff --git a/docker/nextcloudpi/Dockerfile b/docker/nextcloudpi/Dockerfile index 9f616cd7..f5d41538 100644 --- a/docker/nextcloudpi/Dockerfile +++ b/docker/nextcloudpi/Dockerfile @@ -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/; \ diff --git a/ncp-web/index.php b/ncp-web/index.php index 24a24f7a..9e2daa12 100644 --- a/ncp-web/index.php +++ b/ncp-web/index.php @@ -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> diff --git a/ncp-web/wizard/JS/wizard.js b/ncp-web/wizard/JS/wizard.js index 130dd8a0..e57b1282 100644 --- a/ncp-web/wizard/JS/wizard.js +++ b/ncp-web/wizard/JS/wizard.js @@ -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 diff --git a/ncp-web/wizard/index.php b/ncp-web/wizard/index.php index b96e6839..389d778c 100644 --- a/ncp-web/wizard/index.php +++ b/ncp-web/wizard/index.php @@ -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> |