TimingPageWidget.js 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. /*##############################################################################
  2. # Copyright (C) 2011 HPCC Systems.
  3. #
  4. # All rights reserved. This program is free software: you can redistribute it and/or modify
  5. # it under the terms of the GNU Affero General Public License as
  6. # published by the Free Software Foundation, either version 3 of the
  7. # License, or (at your option) any later version.
  8. #
  9. # This program is distributed in the hope that it will be useful,
  10. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. # GNU Affero General Public License for more details.
  13. #
  14. # You should have received a copy of the GNU Affero General Public License
  15. # along with this program. If not, see <http://www.gnu.org/licenses/>.
  16. ############################################################################## */
  17. define([
  18. "dojo/_base/declare",
  19. "dijit/registry",
  20. "dijit/layout/_LayoutWidget",
  21. "dijit/_TemplatedMixin",
  22. "dijit/_WidgetsInTemplateMixin",
  23. "dijit/layout/BorderContainer",
  24. "hpcc/TimingGridWidget",
  25. "hpcc/TimingTreeMapWidget",
  26. "dojo/text!../templates/TimingPageWidget.html"
  27. ],
  28. function (declare,
  29. registry, _LayoutWidget, _TemplatedMixin, _WidgetsInTemplateMixin, BorderContainer,
  30. TimingGridWidget, TimingTreeMapWidget,
  31. template) {
  32. return declare("TimingPageWidget", [_LayoutWidget, _TemplatedMixin, _WidgetsInTemplateMixin], {
  33. templateString: template,
  34. baseClass: "TimingPageWidget",
  35. borderContainer: null,
  36. timingGrid: null,
  37. timingTreeMap: null,
  38. buildRendering: function (args) {
  39. this.inherited(arguments);
  40. },
  41. postCreate: function (args) {
  42. this.inherited(arguments);
  43. this.borderContainer = registry.byId(this.id + "BorderContainer");
  44. this.timingGrid = registry.byId(this.id + "Grid");
  45. this.timingTreeMap = registry.byId(this.id + "TreeMap");
  46. },
  47. startup: function (args) {
  48. this.inherited(arguments);
  49. },
  50. resize: function (args) {
  51. this.inherited(arguments);
  52. this.borderContainer.resize();
  53. },
  54. layout: function (args) {
  55. this.inherited(arguments);
  56. },
  57. // Plugin wrapper ---
  58. init: function (params) {
  59. this.timingGrid.init(params);
  60. this.timingTreeMap.init(params);
  61. }
  62. });
  63. });