summaryrefslogtreecommitdiff
path: root/src/third_party/wiredtiger/tools/wtstats/template/models/stat.js
blob: 6dc4d07652c07a8cf7c4b2ef81b5c3f00cb9a53b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
var AmpersandState = require('ampersand-state'),
    colors = require('./colors').getInstance(),
    debug = require('debug')('model:stat');

var Stat = module.exports = AmpersandState.extend({
  props: {
    name: {
      type: 'string',
      default: ''
    },
    group: {
      type: 'string',
      default: ''
    },
    selected: {
      type: 'boolean',
      default: false
    }, 
    data: {
      type: 'object'
    },
    app: {
      type: 'object'
    }
  },
  derived: {
    color: {
      cache: true,
      fn: function () {
        return colors(this.cid);
      }
    }
  }
});