view service/shuttlepro/gui.js @ 1748:d012c53c5ae8

powereagle now registers a hostname with dhcp so we don't have to hunt for it
author drewp@bigasterisk.com
date Sat, 23 Mar 2024 14:57:59 -0700
parents 57ae7dc0f417
children
line wrap: on
line source

(function () {
    function abbreviateTrig(trig) {
        // prefixes, abbreviations, make everything into links, etc
        return trig;
    }
    
    var model = {
        current: ko.observable("...")
    };
    model.refreshGraph = function() {
        $.ajax({
            url: "graph",
            success: function(data) {
                model.current(abbreviateTrig(data));
            }
        });
    };
    model.refreshGraph();
    ko.applyBindings(model);   
})();