HPCCPlatformRoxieWidget.js 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. /*##############################################################################
  2. # HPCC SYSTEMS software Copyright (C) 2012 HPCC Systems.
  3. #
  4. # Licensed under the Apache License, Version 2.0 (the "License");
  5. # you may not use this file except in compliance with the License.
  6. # You may obtain a copy of the License at
  7. #
  8. # http://www.apache.org/licenses/LICENSE-2.0
  9. #
  10. # Unless required by applicable law or agreed to in writing, software
  11. # distributed under the License is distributed on an "AS IS" BASIS,
  12. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. # See the License for the specific language governing permissions and
  14. # limitations under the License.
  15. ############################################################################## */
  16. define([
  17. "dojo/_base/declare",
  18. "dijit/registry",
  19. "hpcc/_TabContainerWidget",
  20. "hpcc/ESPRequest",
  21. "dojo/text!../templates/HPCCPlatformRoxieWidget.html",
  22. "dijit/layout/BorderContainer",
  23. "dijit/layout/TabContainer",
  24. "dijit/layout/ContentPane"
  25. ], function (declare,
  26. registry,
  27. _TabContainerWidget, ESPRequest,
  28. template) {
  29. return declare("HPCCPlatformRoxieWidget", [_TabContainerWidget], {
  30. templateString: template,
  31. baseClass: "HPCCPlatformRoxieWidget",
  32. postCreate: function (args) {
  33. this.inherited(arguments);
  34. },
  35. startup: function (args) {
  36. this.inherited(arguments);
  37. },
  38. getTitle: function () {
  39. return "HPCC Platform - Roxie";
  40. },
  41. // Hitched actions ---
  42. // Implementation ---
  43. init: function (params) {
  44. if (this.inherited(arguments))
  45. return;
  46. this.initTab();
  47. },
  48. initTab: function () {
  49. var currSel = this.getSelectedChild();
  50. if (currSel && !currSel.initalized) {
  51. if (currSel.id === this.id + "_Queries") {
  52. currSel.set("content", dojo.create("iframe", {
  53. src: ESPRequest.getBaseURL() + "/WUQuerySets",
  54. style: "border: 0; width: 100%; height: 100%"
  55. }));
  56. currSel.initalized = true;
  57. } else if (currSel.init) {
  58. currSel.init({});
  59. }
  60. }
  61. }
  62. });
  63. });