Commit c0e15d6f authored by Jérome Perrin's avatar Jérome Perrin

Remove obsolete Output_viewQueueStatGraph widget

parent 2bf25f11
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Queues Statistics</title>
<script src="../<%= copy.rsvp.relative_dest %>" type="text/javascript"></script>
<script src="../<%= copy.renderjs.relative_dest %>" type="text/javascript"></script>
<script src="../<%= curl.jqueryflot.relative_dest %>"></script>
<script src="../<%= curl.jqueryflotstack.relative_dest %>"></script>
<script src="mixin_gadget.js" type="text/javascript"></script>
<script src="Output_viewQueueStatGraph.js" type="text/javascript"></script>
</head>
<body>
<div class="graph_container" style="width: 100%;height:300px"></div>
</body>
</html>
/*global rJS, jQuery, initGadgetMixin */
/*jslint nomen: true, unparam: true */
(function (window, rJS, $, initGadgetMixin) {
"use strict";
function queue_stat_widget(output_data) {
/* FIXME: does not support more than one replic.
* + see george email to integrate without the need of an EG
*/
var series = [];
$.each(output_data.elementList, function (idx, el) {
if (el.family === 'Buffer') {
series.push({label: el.name || el.id,
data: el.results.wip_stat_list});
}
});
return series;
}
var gadget_klass = rJS(window);
initGadgetMixin(gadget_klass);
gadget_klass
/////////////////////////////////////////////////////////////////
// Acquired methods
/////////////////////////////////////////////////////////////////
.declareAcquiredMethod("aq_getAttachment", "jio_getAttachment")
/////////////////////////////////////////////////////////////////
// declared methods
/////////////////////////////////////////////////////////////////
.declareMethod("render", function (options) {
var jio_key = options.id,
gadget = this;
gadget.props.jio_key = jio_key;
gadget.props.result = options.result;
return gadget.aq_getAttachment({
"_id": gadget.props.jio_key,
"_attachment": "body.json"
})
.push(function (simulation_json) {
gadget.props.series = queue_stat_widget(
JSON.parse(simulation_json)
.result.result_list[gadget.props.result]
);
});
})
.declareMethod("startService", function () {
// XXX Manually calculate width and height when resizing
$.plot(
this.props.element.querySelector(".graph_container"),
this.props.series
);
});
}(window, rJS, jQuery, initGadgetMixin));
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Queues Statistics</title>
<script src="../lib/rsvp.min.js" type="text/javascript"></script>
<script src="../lib/renderjs.min.js" type="text/javascript"></script>
<script src="../lib/jquery.flot.js"></script>
<script src="../lib/jquery.flot.stack.js"></script>
<script src="mixin_gadget.js" type="text/javascript"></script>
<script src="Output_viewQueueStatGraph.js" type="text/javascript"></script>
</head>
<body>
<div class="graph_container" style="width: 100%;height:300px"></div>
</body>
</html>
/*global rJS, jQuery, initGadgetMixin */
/*jslint nomen: true, unparam: true */
(function(window, rJS, $, initGadgetMixin) {
"use strict";
function queue_stat_widget(output_data) {
/* FIXME: does not support more than one replic.
* + see george email to integrate without the need of an EG
*/
var series = [];
$.each(output_data.elementList, function(idx, el) {
if (el.family === "Buffer") {
series.push({
label: el.name || el.id,
data: el.results.wip_stat_list
});
}
});
return series;
}
var gadget_klass = rJS(window);
initGadgetMixin(gadget_klass);
gadget_klass.declareAcquiredMethod("aq_getAttachment", "jio_getAttachment").declareMethod("render", function(options) {
var jio_key = options.id, gadget = this;
gadget.props.jio_key = jio_key;
gadget.props.result = options.result;
return gadget.aq_getAttachment({
_id: gadget.props.jio_key,
_attachment: "body.json"
}).push(function(simulation_json) {
gadget.props.series = queue_stat_widget(JSON.parse(simulation_json).result.result_list[gadget.props.result]);
});
}).declareMethod("startService", function() {
// XXX Manually calculate width and height when resizing
$.plot(this.props.element.querySelector(".graph_container"), this.props.series);
});
})(window, rJS, jQuery, initGadgetMixin);
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment