Sha256: de078d5fa79bdcd6eb18a19031eae12bfc971d1060eb2d1714e64ba92263e52e
Contents?: true
Size: 1.39 KB
Versions: 2
Compression:
Stored size: 1.39 KB
Contents
%h1 Metadata backups backup pages/templates metadata. %br Base dir: #{Optimacms::BackupMetadata::Backup.dir_backups} %ul.list-inline#commands %li=link_to 'Backup now', '#', :class=>'btn btn-primary btn-sm', :"data-name"=>'command', :"data-cmd"=>'backup' .row .col-md-12 %h2 Upload backup =horizontal_simple_form_for :import, url: upload_backup_metadata_path do |f| -#@item= render 'optimacms/admin/shared/form_errors', :object=>@item = f.input :file, as: :file, hint: 'tar.gz file' = f.button :submit_cancel, 'Upload', :cancel=>@url_back #status_commands.bg-info.well = render 'list' :javascript // commands $( '#commands a[data-name="command"]' ).click(function() { send_command($(this).data('cmd')); }); function send_command(cmd){ $('#status_commands').html("Sending..."); $.ajax({ url: "/#{Optimacms.admin_namespace}/backup_metadata/backup/?cmd=" + cmd, data: {}, type: "GET", dataType: "json", contentType: "application/json", beforeSend: function(){ // Handle the beforeSend event }, success: function(res){ $('#status_commands').html("Result: "+res.res+", output: "+res.output); }, complete: function (res) { } }); } // delete $("#list-backups").on( "ajax:success", "a.link_delete", function() { $(this).closest('div.backup-item').hide(); });
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
optimacms-0.3.29 | app/views/optimacms/admin/backup_metadata/index.html.haml |
optimacms-0.3.23 | app/views/optimacms/admin/backup_metadata/index.html.haml |