Sindbad~EG File Manager

Current Path : /lib/python2.7/site-packages/glances/outputs/static/js/services/plugins/
Upload File :
Current File : //lib/python2.7/site-packages/glances/outputs/static/js/services/plugins/glances_memswap.js

glancesApp.service('GlancesPluginMemSwap', function() {
    var _pluginName = "memswap";
    var _view = {};

    this.percent = null;
    this.total = null;
    this.used = null;
    this.free = null;

    this.setData = function(data, views) {
        _view = views[_pluginName];
        data = data[_pluginName];

        this.percent = data['percent'];
        this.total = data['total'];
        this.used = data['used'];
        this.free = data['free'];
    };

    this.getDecoration = function(value) {
        if(_view[value] == undefined) {
            return;
        }

        return _view[value].decoration.toLowerCase();
    };
});

Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists