Sha256: 9bb4ecd2c73053c85d23e91a583e7bae568bf8ec3bec8d5cc9a61e72ec6ee2ec

Contents?: true

Size: 716 Bytes

Versions: 12

Compression:

Stored size: 716 Bytes

Contents

// Provides persistent storage for dashboard configuration.
var persistence = (function() {
  // Saves configuration to persistent store. Calls success() or error() when 
  // complete.
  var save = function(config, success, error) {
    jQuery.ajax('config', {
      type: 'POST',
      success: success,
      error: error,
      contentType: 'application/json',
      data: JSON.stringify(config),
      dataType: 'json'
    });
  };

  // Returns configuration from persistent store.
  var load = function(success, error) {
    jQuery.ajax('config', {
        type: 'GET',
        success: success,
        error: error,
        dataType: 'json'
    });
  };

  return {
    save: save,
    load: load
  }
})();

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
riemann-dash-0.2.14 lib/riemann/dash/public/persistence.js
riemann-dash-0.2.13 lib/riemann/dash/public/persistence.js
riemann-dash-0.2.12 lib/riemann/dash/public/persistence.js
riemann-dash-0.2.11 lib/riemann/dash/public/persistence.js
riemann-dash-0.2.10 lib/riemann/dash/public/persistence.js
riemann-dash-0.2.9 lib/riemann/dash/public/persistence.js
riemann-dash-0.2.8 lib/riemann/dash/public/persistence.js
riemann-dash-0.2.7 lib/riemann/dash/public/persistence.js
riemann-dash-0.2.6 lib/riemann/dash/public/persistence.js
riemann-dash-0.2.5 lib/riemann/dash/public/persistence.js
riemann-dash-0.2.4 lib/riemann/dash/public/persistence.js
riemann-dash-0.2.3 lib/riemann/dash/public/persistence.js