config.js 2.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. /**
  2. * Licensed to the Apache Software Foundation (ASF) under one
  3. * or more contributor license agreements. See the NOTICE file
  4. * distributed with this work for additional information
  5. * regarding copyright ownership. The ASF licenses this file
  6. * to you under the Apache License, Version 2.0 (the
  7. * "License"); you may not use this file except in compliance
  8. * with the License. You may obtain a copy of the License at
  9. *
  10. * http://www.apache.org/licenses/LICENSE-2.0
  11. *
  12. * Unless required by applicable law or agreed to in writing, software
  13. * distributed under the License is distributed on an "AS IS" BASIS,
  14. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  15. * See the License for the specific language governing permissions and
  16. * limitations under the License.
  17. */
  18. console.log = function(){};
  19. console.warn = function(){};
  20. var App = require('app');
  21. App.testMode = (location.port == '3333'); // test mode is automatically enabled if running on brunch server
  22. App.testModeDelayForActions = 10000;
  23. App.skipBootstrap = false;
  24. App.alwaysGoToInstaller = false;
  25. App.testEnableSecurity = true; // By default enable security is tested; turning it false tests disable security
  26. App.testNameNodeHA = true;
  27. App.apiPrefix = '/api/v1';
  28. App.defaultStackVersion = 'HDP-2.0.5';
  29. App.defaultLocalStackVersion = 'HDPLocal-2.0.5';
  30. App.defaultJavaHome = '/usr/jdk/jdk1.6.0_31';
  31. App.timeout = 180000; // default AJAX timeout
  32. App.maxRetries = 3; // max number of retries for certain AJAX calls
  33. App.bgOperationsUpdateInterval = 6000;
  34. App.componentsUpdateInterval = 6000;
  35. App.contentUpdateInterval = 15000;
  36. App.maxRunsForAppBrowser = 500;
  37. App.pageReloadTime=3600000;
  38. App.singleNodeInstall = false;
  39. App.singleNodeAlias = document.location.hostname;
  40. App.reassignableComponents = ['NAMENODE', 'SECONDARY_NAMENODE', 'JOBTRACKER', 'RESOURCEMANAGER'];
  41. // experimental features are automatically enabled if running on brunch server
  42. App.enableExperimental = false;
  43. App.supports = {
  44. addServices: false,
  45. hostOverrides: true,
  46. hostOverridesInstaller: true,
  47. hostOverridesHost: true,
  48. mirroring: false,
  49. secureCluster: true,
  50. secureClusterProceedPopup: false,
  51. reassignMaster: true,
  52. stackUpgrade: false,
  53. capacitySchedulerUi: false,
  54. startStopAllServices: true,
  55. hiveOozieExtraDatabases: true,
  56. multipleHBaseMasters: true,
  57. addMasters: false,
  58. customizeSmokeTestUser: true,
  59. hue: false,
  60. ldapGroupMapping: false,
  61. localRepositories: true,
  62. highAvailability: true,
  63. deleteHost: true,
  64. autoRollbackHA: false
  65. };
  66. if (App.enableExperimental) {
  67. for (var support in App.supports) {
  68. App.supports[support] = true;
  69. }
  70. }
  71. // this is to make sure that IE does not cache data when making AJAX calls to the server
  72. if (!$.mocho) {
  73. $.ajaxSetup({
  74. cache: false,
  75. headers: {"X-Requested-By": "X-Requested-By"}
  76. });
  77. }
  78. /**
  79. * Test Mode values
  80. */
  81. App.test_hostname = 'hostname';