From 31ad8ff529d8dfc6b6dd316302b1d422ed5a861f Mon Sep 17 00:00:00 2001 From: Mark Williams Date: Thu, 14 Mar 2024 13:47:03 +0000 Subject: [PATCH 1/2] LIMS-1206: Remove stacked usage bar chart from visit page --- client/src/js/modules/dc/datacollections.js | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/client/src/js/modules/dc/datacollections.js b/client/src/js/modules/dc/datacollections.js index 1ba3d8e68..b2a415011 100644 --- a/client/src/js/modules/dc/datacollections.js +++ b/client/src/js/modules/dc/datacollections.js @@ -8,9 +8,6 @@ define(['marionette', 'views/search', 'views/filter', - - 'modules/stats/views/stack', - 'views/dialog', 'modules/dc/views/queuebuilder', 'modules/proposal/views/users', @@ -21,7 +18,7 @@ define(['marionette', 'templates/dc/dclist.html', ], function(Marionette, Pages, DCListView, - SampleChanger, DCLogView, StatusView, Search, Filter, StackView, DialogView, QueueBuilderView, UserView, DewarsView, + SampleChanger, DCLogView, StatusView, Search, Filter, DialogView, QueueBuilderView, UserView, DewarsView, ReprocessOverview, template) { @@ -146,10 +143,6 @@ function(Marionette, Pages, DCListView, this.type.show(this.ty) } - if (this.options.params.visit) { - this.use.show(new StackView({ visit: this.options.params.visit })) - } - if (this.model && this.model.get('ACTIVE') == 1) { // Sample changer console.log('get sc', this.getOption('sampleChanger')) From f5d48ba36ae598790449aa1545d97a41217aef4f Mon Sep 17 00:00:00 2001 From: Mark Williams Date: Fri, 19 Apr 2024 10:38:19 +0100 Subject: [PATCH 2/2] Remove no longer used modules/stats/views/stack.js --- client/src/js/modules/stats/views/stack.js | 87 ---------------------- 1 file changed, 87 deletions(-) delete mode 100644 client/src/js/modules/stats/views/stack.js diff --git a/client/src/js/modules/stats/views/stack.js b/client/src/js/modules/stats/views/stack.js deleted file mode 100644 index 7e978d14d..000000000 --- a/client/src/js/modules/stats/views/stack.js +++ /dev/null @@ -1,87 +0,0 @@ -define(['marionette', 'modules/stats/models/pie', 'utils', - 'jquery', - 'jquery.flot', - 'jquery.flot.resize', - 'jquery.flot.stack', - 'jquery.flot.tooltip', -], function(Marionette, Pie, utils, $) { - - return Marionette.ItemView.extend({ - template: false, - modelEvents: { 'change': 'render' }, - - initialize: function(options) { - this.model = new Pie(options) - this.model.fetch() - - this.$el.css('opactiy', 0) - }, - - className: 'horizontal_stack', - - - onRender: function() { - if (this.model.get('data')) { - var options = { - series: { - bars: { - horizontal: true, - show: true, - }, - stack: true - }, - tooltip: true, - tooltipOpts: { - content: this.getTooltip.bind(this), - }, - legend: { - show: false - }, - grid: { - borderWidth: 0, - hoverable: true, - }, - yaxis: { - max: 1, - ticks: [], - }, - xaxis: { - ticks: []//[0,4,8,12,16,20,24] - }, - } - - var data = this.model.get('data') - _.each(data, function(v, k) { - data[k] = parseFloat(v) - }) - - var d = [ - { label: 'Startup', color: 'yellow', data: [[this.model.get('data').SUP,0]] }, - { label: 'Data Collection', color: 'green', data: [[data.DCTIME,0]] }, - { label: 'Auto Indexing', color: '#93db70', data: [[data.AITIME,0]] }, - { label: 'Centring', color: 'cyan', data: [[data.CENTTIME,0]] }, - { label: 'Energy Scans', color: 'orange', data: [[data.EDGE,0]] }, - { label: 'Robot Actions', color: 'blue', data: [[data.R,0]] }, - { label: 'Thinking', color: 'purple', data: [[data.T,0]] }, - { label: 'Remaining', color: 'red', data: [[data.REM,0]] }, - { label: 'Beam Dump', color: 'black', data: [[data.NOBEAM,0]] }, - { label: 'Faults', color: 'grey', data: [[data.FAULT,0]] }, - ] - - $.plot(this.$el, d, options) - this.$el.css('opacity', 1) - } - }, - - getTooltip: function(lab, x, y, item) { - return item.series.label+': '+x.toFixed(2)+'hrs' - - }, - - onDestroy: function() { - this.model.stop() - }, - - }) - -}) \ No newline at end of file