class SystemControl extends this.OS.application.BaseApplication constructor: ( args ) -> super "SystemControl", args main: () -> @max_net_range = 2048 @diskchart = $(@find("disk-area")).epoch({ type: 'time.gauge', value: 0 }); @on "resize", () => el = @find("cpu-area") if @cpu $(el).children().hide() @cpu.option("width", $(el).width()) @cpu.option("height", $(el).height()) $(el).children().show() el = @find("battery-area") el = @find("memory-area") if @memory $(el).children().hide() @memory.option("width", $(el).width()) @memory.option("height", $(el).height()) $(el).children().show() el = @find("network-area") if @network $(el).children().hide() @network.option("width", $(el).width()) @network.option("height", $(el).height()) $(el).children().show() el = @find("temp-area") if @temp $(el).children().hide() @temp.option("width", $(el).width()) @temp.option("height", $(el).height()) $(el).children().show() el = @find("battery-area") if @battery $(el).children().hide() @battery.option("width", $(el).width()) @battery.option("height", $(el).height()) $(el).children().show() @_gui.pushService("SystemControl/SysmondService", [{ path: @meta().path, type: "app", app: @ }]) .then (p) => @service = p p.app = @ .catch (e) => @error __("Unable to start sysmond service"), e streamline: (name, data, range, labels) -> i = 0 legend = $(@find("#{name}-text")) if not @[name] options = { type: 'time.line', axes: ['bottom', 'left', "right"] } options.range = range if range dobj = [] for item in data dobj.push { label: "label-#{i}", values: [] } $("