From acf8d9e12ace084be9ffc6667733fd01f7f7017f Mon Sep 17 00:00:00 2001 From: Emrys Date: Tue, 23 Apr 2019 17:24:10 +0100 Subject: [PATCH 1/4] added to setup menu --- backup-module/backup_menu.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/backup-module/backup_menu.php b/backup-module/backup_menu.php index 58e9adb..3a3451a 100644 --- a/backup-module/backup_menu.php +++ b/backup-module/backup_menu.php @@ -22,5 +22,11 @@ 'icon'=>'icon-circle-arrow-down' ); - + $menu['setup'][] = array( + 'text' => _("Backup"), + 'path' => 'backup', + 'icon' => 'box-add', + 'order' => 1 + ); + From 6063061683f48f8b937f872598bb94fd8de71723 Mon Sep 17 00:00:00 2001 From: Emrys Date: Wed, 24 Apr 2019 15:40:39 +0100 Subject: [PATCH 2/4] created tabs --- backup-module/backup_view.php | 45 ++++++++++++++++++----------------- 1 file changed, 23 insertions(+), 22 deletions(-) diff --git a/backup-module/backup_view.php b/backup-module/backup_view.php index d89ed80..00350da 100644 --- a/backup-module/backup_view.php +++ b/backup-module/backup_view.php @@ -29,18 +29,11 @@ -
-
-
- -
-
+ -
- Warning: service-runner is not running and is required. To install service-runner see service-runner installation
"; @@ -93,21 +86,22 @@

Refresh page if log window does not update.

After import is complete logout then login using the new imported account login details.

- - + + + From 783a4939d495e6cabf0fb97d3460c0483c27239d Mon Sep 17 00:00:00 2001 From: Emrys Date: Thu, 25 Apr 2019 13:22:08 +0000 Subject: [PATCH 3/4] moved tabs from sidebar --- backup-module/backup_controller.php | 3 +- backup-module/backup_view.php | 177 ++++++++++++++++------------ 2 files changed, 103 insertions(+), 77 deletions(-) diff --git a/backup-module/backup_controller.php b/backup-module/backup_controller.php index 8ad456e..9624550 100644 --- a/backup-module/backup_controller.php +++ b/backup-module/backup_controller.php @@ -16,10 +16,9 @@ function backup_controller() { global $route, $session, $path, $redis, $homedir; $result = false; - // This module is only to be ran by the admin user if (!$session['write'] && !$session['admin']) { - $route->format = "text"; + $route->format = "html"; return "
Error: backup module requires admin access
"; } if (file_exists("$homedir/backup/config.cfg")) { diff --git a/backup-module/backup_view.php b/backup-module/backup_view.php index 00350da..a531492 100644 --- a/backup-module/backup_view.php +++ b/backup-module/backup_view.php @@ -26,83 +26,116 @@ padding-left:20px; padding-top:20px; } +.nav-tabs > li > a { + color: #999!important; +} +.nav-tabs > li.active > a { + color: #EFEFEF!important; +} +.nav-tabs > li > a:hover { + color: #FFF!important; +} - - - + + + + +
+
+

Import

+

Import an emoncms backup archive.

+ CAUTION ALL EMONCMS ACCOUNT DATA WILL BE OVERWRITTEN BY THE IMPORTED DATA

+

Note: Before import update to latest version of Emoncms & emonHub.

+
+

+ +
+

+

Note: If browser upload fails for large backup files follow manual import instructions.

+
+
+

Refresh page if log window does not update.

+

After import is complete logout then login using the new imported account login details.

+
+
+

Export

+

Export a compressed archive containing:

+
    +
  • Emoncms MYSQL database
  • +
  • PHPFina data files
  • +
  • PHPTimeSeries data files
  • +
  • EmonHub Config
  • +
+

These files contain all Emoncms data including:

+
    +
  • Input processes
  • +
  • Feed data
  • +
  • Dashboards
  • +
  • EmonHub Config
  • +
+

The compressed archive can be used to migrate data to another emonPi / emonBase.

+ +

+
+
Right Click > Download:
'.$backup_filename.''; + } + ?> +

+

Once export is complete refresh page to see download link.

+

Note: Export can take a long some time, please be patient.

+
+
+ + + Warning: service-runner is not running and is required. To install service-runner see service-runner installation"; } ?> -
-

Export

-

Export a compressed archive containing:

-
    -
  • Emoncms MYSQL database
  • -
  • PHPFina data files
  • -
  • PHPTimeSeries data files
  • -
  • EmonHub Config
  • -
-

These files contain all Emoncms data including:

-
    -
  • Input processes
  • -
  • Feed data
  • -
  • Dashboards
  • -
  • EmonHub Config
  • -
-

The compressed archive can be used to migrate data to another emonPi / emonBase.

- -

-
-
Right Click > Download:
'.$backup_filename.''; - } - ?> -

-

Once export is complete refresh page to see download link.

-

Note: Export can take a long some time, please be patient.

-
- -
-

Import

-

Import an emoncms backup archive.

- CAUTION ALL EMONCMS ACCOUNT DATA WILL BE OVERWRITTEN BY THE IMPORTED DATA

-

Note: Before import update to latest version of Emoncms & emonHub.

-
-

- -
-

-

Note: If browser upload fails for large backup files follow manual import instructions.

-
-
-

Refresh page if log window does not update.

-

After import is complete logout then login using the new imported account login details.

-
- - - From 527ff9a5b16d8ac39459c9fd433103cc600b034e Mon Sep 17 00:00:00 2001 From: Emrys Date: Mon, 29 Apr 2019 13:00:51 +0100 Subject: [PATCH 4/4] edited menu to remove old menu style --- backup-module/backup_menu.php | 44 +++++++++++++++++------------------ 1 file changed, 21 insertions(+), 23 deletions(-) diff --git a/backup-module/backup_menu.php b/backup-module/backup_menu.php index 3a3451a..f8a567a 100644 --- a/backup-module/backup_menu.php +++ b/backup-module/backup_menu.php @@ -1,32 +1,30 @@ "backup_menu", - 'name'=>dgettext($domain, "Backup"), - 'path'=>"backup" , - 'session'=>"write", - 'order' => 0, - 'icon'=>'icon-circle-arrow-down icon-white', - 'hideinactive'=>1 - ); + // $menu_left[] = array( + // 'id'=>"backup_menu", + // 'name'=>dgettext($domain, "Backup"), + // 'path'=>"backup" , + // 'session'=>"write", + // 'order' => 0, + // 'icon'=>'icon-circle-arrow-down icon-white', + // 'hideinactive'=>1 + // ); - $menu_dropdown_config[] = array( - 'id'=>"backup_menu_extras", - 'name'=>dgettext($domain, "Backup"), - 'path'=>"backup" , - 'session'=>"write", - 'order' => 55, - 'icon'=>'icon-circle-arrow-down' - ); + // $menu_dropdown_config[] = array( + // 'id'=>"backup_menu_extras", + // 'name'=>dgettext($domain, "Backup"), + // 'path'=>"backup" , + // 'session'=>"write", + // 'order' => 55, + // 'icon'=>'icon-circle-arrow-down' + // ); $menu['setup'][] = array( 'text' => _("Backup"), 'path' => 'backup', 'icon' => 'box-add', 'order' => 1 - ); - - + ); \ No newline at end of file