2021-11-10 13:01:02 -08:00
@ extends ( 'layouts/default' )
2016-03-25 01:18:05 -07:00
{{ -- Page title -- }}
@ section ( 'title' )
{{ trans ( 'admin/settings/general.backups' ) }}
@ parent
@ stop
2017-07-07 23:44:48 -07:00
@ section ( 'header_right' )
2021-11-10 00:08:43 -08:00
< a href = " { { route('settings.index') }} " class = " btn btn-default pull-right " style = " margin-left: 5px; " >
{{ trans ( 'general.back' ) }}
</ a >
< form method = " POST " style = " display: inline " >
{{ Form :: hidden ( '_token' , csrf_token ()) }}
< button class = " btn btn-primary { { (config('app.lock_passwords')) ? ' disabled': '' }} " > {{ trans ( 'admin/settings/general.generate_backup' ) }} </ button >
</ form >
2017-07-07 23:44:48 -07:00
@ stop
2016-03-25 01:18:05 -07:00
{{ -- Page content -- }}
@ section ( 'content' )
< div class = " row " >
2021-11-10 00:08:43 -08:00
2021-11-10 13:01:02 -08:00
< div class = " col-md-8 " >
2021-11-10 00:08:43 -08:00
2016-03-25 01:18:05 -07:00
< div class = " box box-default " >
< div class = " box-body " >
2021-11-10 00:08:43 -08:00
2016-03-25 01:18:05 -07:00
< div class = " table-responsive " >
2021-11-10 00:08:43 -08:00
2021-04-21 20:16:17 -07:00
< table
data - cookie = " true "
data - cookie - id - table = " system-backups "
data - pagination = " true "
data - id - table = " system-backups "
data - search = " true "
data - side - pagination = " client "
data - sort - order = " asc "
id = " system-backups "
class = " table table-striped snipe-table " >
2016-03-25 01:18:05 -07:00
< thead >
2021-11-10 00:08:43 -08:00
< tr >
< th data - sortable = " true " > File </ th >
< th data - sortable = " true " data - field = " modified_display " data - sort - name = " modified_value " > Created </ th >
< th data - field = " modified_value " data - visible = " false " ></ th >
< th data - sortable = " true " > Size </ th >
2020-04-01 03:25:07 -07:00
< th >< span class = " sr-only " > {{ trans ( 'general.delete' ) }} </ span ></ th >
2021-11-10 00:08:43 -08:00
</ tr >
2016-03-25 01:18:05 -07:00
</ thead >
< tbody >
2016-12-27 12:03:47 -08:00
@ foreach ( $files as $file )
< tr >
2020-08-28 18:22:37 -07:00
< td >
< a href = " { { route('settings.backups.download', [ $file['filename'] ]) }} " >
{{ $file [ 'filename' ] }}
</ a >
</ td >
2021-11-10 00:08:43 -08:00
< td > {{ $file [ 'modified_display' ] }} </ td >
< td > {{ $file [ 'modified_value' ] }} </ td >
2016-12-27 12:03:47 -08:00
< td > {{ $file [ 'filesize' ] }} </ td >
< td >
2017-06-09 12:44:11 -07:00
@ can ( 'superadmin' )
< a data - html = " false "
2017-07-07 23:44:48 -07:00
class = " btn delete-asset btn-danger btn-sm { { (config('app.lock_passwords')) ? ' disabled': '' }} " data - toggle = " modal " href = " { { route('settings.backups.destroy', $file['filename'] ) }} " data - content = " { { trans('admin/settings/message.backup.delete_confirm') }} " data - title = " { { trans('general.delete') }} { { htmlspecialchars( $file['filename'] ) }} ? " onClick = " return false; " >
2021-09-26 01:11:08 -07:00
< i class = " fas fa-trash icon-white " aria - hidden = " true " ></ i >
2020-04-01 03:25:07 -07:00
< span class = " sr-only " > {{ trans ( 'general.delete' ) }} </ span >
2017-06-09 12:44:11 -07:00
</ a >
2021-11-10 00:08:43 -08:00
2021-11-10 01:44:11 -08:00
< a data - html = " true "
href = " { { route('settings.backups.restore', $file['filename'] ) }} " class = " btn btn-warning btn-sm restore-asset { { (config('app.lock_passwords')) ? ' disabled': '' }} " data - toggle = " modal " data - content = " Yes, restore it. I acknowledge that this will overwrite any existing data currently in the database. This method does not currently support installations that use S3 for file storage. This will also log out all of your existing users (including you). " data - title = " Are you sure you wish to restore your database from { { $file['filename'] }}? " onClick = " return false; " >
2021-11-10 00:08:43 -08:00
< i class = " fas fa-retweet " aria - hidden = " true " ></ i >
< span class = " sr-only " > Restore </ span >
</ a >
2017-06-09 12:44:11 -07:00
@ endcan
2016-12-27 12:03:47 -08:00
</ td >
</ tr >
@ endforeach
</ tbody >
2016-03-25 01:18:05 -07:00
</ table >
2021-11-10 00:08:43 -08:00
</ div > <!-- end table - responsive div -->
</ div > <!-- end box - body div -->
</ div > <!-- end box div -->
</ div > <!-- end col - md div -->
2016-03-25 01:18:05 -07:00
<!-- side address column -->
2021-11-10 13:01:02 -08:00
< div class = " col-md-4 " >
2021-11-10 01:44:11 -08:00
< h2 style = " margin-top: 0px " > Upload Backup </ h2 >
2016-03-25 01:18:05 -07:00
2021-11-10 01:44:11 -08:00
{{ Form :: open ([
'method' => 'POST' ,
'route' => 'settings.backups.upload' ,
'files' => true ,
'class' => 'form-horizontal' ]) }}
@ csrf
2021-11-10 00:08:43 -08:00
2021-11-10 01:44:11 -08:00
< div class = " form-group { { $errors->has ((isset( $fieldname ) ? $fieldname : 'image')) ? 'has-error' : '' }} " >
< div class = " col-md-8 col-xs-8 " >
<!-- screen reader only -->
< input type = " file " id = " file " name = " file " aria - label = " file " class = " sr-only " >
<!-- displayed on screen -->
< label class = " btn btn-default col-md-12 col-xs-12 " aria - hidden = " true " >
2021-11-10 13:01:02 -08:00
< i class = " fas fa-paperclip " aria - hidden = " true " ></ i >
2021-11-10 01:44:11 -08:00
{{ trans ( 'button.select_file' ) }}
< input type = " file " name = " file " class = " js-uploadFile " id = " uploadFile " data - maxsize = " { { Helper::file_upload_max_size() }} " accept = " application/zip " style = " display:none; " aria - label = " file " aria - hidden = " true " >
</ label >
</ div >
< div class = " col-md-4 col-xs-4 " >
2021-11-10 13:01:02 -08:00
< button class = " btn btn-primary col-md-12 col-xs-12 " id = " uploadButton " disabled > Upload </ button >
2021-11-10 01:44:11 -08:00
</ div >
2021-11-10 00:08:43 -08:00
< div class = " col-md-12 " >
2021-11-10 01:44:11 -08:00
< p class = " label label-default col-md-12 " style = " font-size: 120%!important; margin-top: 10px; margin-bottom: 10px; " id = " uploadFile-info " ></ p >
< p class = " help-block " style = " margin-top: 10px; margin-bottom: 10px; " id = " uploadFile-status " > {{ trans_choice ( 'general.filetypes_accepted_help' , 3 , [ 'size' => Helper :: file_upload_max_size_readable (), 'types' => '.zip' ]) }} </ p >
{ !! $errors -> first ( 'image' , '<span class="alert-msg" aria-hidden="true">:message</span>' ) !! }
2021-11-10 00:08:43 -08:00
2021-11-10 13:01:02 -08:00
</ div >
2021-11-10 01:44:11 -08:00
</ div >
2021-11-10 00:08:43 -08:00
2021-11-10 01:44:11 -08:00
{{ Form :: close () }}
2021-11-10 00:08:43 -08:00
2021-11-10 13:01:02 -08:00
< h3 > Restoring from Backup </ h3 >
< div class = " alert alert-warning fade in " >
< p > You can use the restore ( < i class = " text-white fas fa-retweet " aria - hidden = " true " ></ i > ) button to restore from a previous backup , however there are a few things you should know : </ p >
</ div >
< ul class = " list-unstyled " >
< li >< i class = " fas fa-exclamation-triangle " aria - hidden = " true " ></ i >
Your entire database and any uploaded files will be completely replaced by what ' s in the backup file .
< br >< br >
</ li >
< li >< i class = " fas fa-exclamation-triangle " aria - hidden = " true " ></ i >
Very large backups may time out on the restore attempt and may still need to be run via command line .
< br >< br >
</ li >
< li >< i class = " fas fa-exclamation-triangle " aria - hidden = " true " ></ i >
This does not currently work with S3 file storage .
< br >< br >
</ li >
< li >< i class = " fas fa-exclamation-triangle " aria - hidden = " true " ></ i >
You will be logged out after your restore is complete .</ li >
</ ul >
< br >< br >
< p > Backup files are located in : < code > {{ $path }} </ code ></ p >
2021-11-10 01:44:11 -08:00
2021-11-10 00:08:43 -08:00
</ div > <!-- end col - md - 12 form div -->
</ div > <!-- end form group div -->
</ div > <!-- end col - md - 3 div -->
</ div > <!-- end row div -->
2016-03-25 01:18:05 -07:00
@ stop
2021-04-21 20:16:17 -07:00
@ section ( 'moar_scripts' )
2021-11-10 13:01:02 -08:00
2021-04-21 20:16:17 -07:00
@ include ( 'partials.bootstrap-table' )
2021-11-10 13:01:02 -08:00
< script >
$ ( document ) . ready ( function () {
$ ( '#uploadFile' ) . on ( 'keyup' , function () {
let empty = false ;
$ ( '#uploadFile' ) . each ( function () {
empty = $ ( this ) . val () . length == 0 ;
});
if ( empty )
$ ( '#uploadButton' ) . attr ( 'disabled' , 'disabled' );
else
$ ( '#uploadButton' ) . attr ( 'disabled' , false );
});
});
</ script >
2021-04-21 20:16:17 -07:00
@ stop