Sha256: d308282120de0f4c47a0a911a522850e8810b75c8f05bdf3bee85a52c3328f2a

Contents?: true

Size: 1.4 KB

Versions: 5

Compression:

Stored size: 1.4 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.config.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

5 entries across 5 versions & 1 rubygems

Version Path
optimacms-0.4.3 app/views/optimacms/admin/backup_metadata/index.html.haml
optimacms-0.4.2 app/views/optimacms/admin/backup_metadata/index.html.haml
optimacms-0.3.35 app/views/optimacms/admin/backup_metadata/index.html.haml
optimacms-0.3.34 app/views/optimacms/admin/backup_metadata/index.html.haml
optimacms-0.3.30 app/views/optimacms/admin/backup_metadata/index.html.haml