Sha256: 206d4a5b99610a1a2e0e7840de7dea702c9c07130ab14545d990d81716b2a706

Contents?: true

Size: 718 Bytes

Versions: 4

Compression:

Stored size: 718 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

4 entries across 4 versions & 3 rubygems

Version Path
mindreframer-riemann-dash-0.2.3 lib/riemann/dash/public/persistence.js
mindreframer-reslike-dash-0.2.2 lib/riemann/dash/public/persistence.js
riemann-dash-0.2.1 lib/riemann/dash/public/persistence.js
riemann-dash-0.2.0 lib/riemann/dash/public/persistence.js