config.js 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  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. var App = require('app');
  19. App.version = ''; // filled out by set-ambari-version.sh script
  20. App.testMode = (location.port == '3333'); // test mode is automatically enabled if running on brunch server
  21. App.testModeDelayForActions = 10000;
  22. App.skipBootstrap = false;
  23. App.alwaysGoToInstaller = false;
  24. App.testEnableSecurity = true; // By default enable security is tested; turning it false tests disable security
  25. App.testNameNodeHA = true;
  26. App.apiPrefix = '/api/v1';
  27. App.defaultStackVersion = 'HDP-2.0.5';
  28. App.defaultLocalStackVersion = 'HDPLocal-2.0.5';
  29. App.defaultJavaHome = '/usr/jdk/jdk1.6.0_31';
  30. App.timeout = 180000; // default AJAX timeout
  31. App.maxRetries = 3; // max number of retries for certain AJAX calls
  32. App.bgOperationsUpdateInterval = 6000;
  33. App.componentsUpdateInterval = 6000;
  34. App.contentUpdateInterval = 15000;
  35. App.maxRunsForAppBrowser = 500;
  36. App.pageReloadTime=3600000;
  37. App.singleNodeInstall = false;
  38. App.singleNodeAlias = document.location.hostname;
  39. App.minDiskSpace = 2.0; // minimum disk space required for '/' for each host before install, unit GB
  40. App.minDiskSpaceUsrLib = 1.0; // minimum disk space for '/usr/lib' for each host before install, unit GB
  41. App.mirroringDatasetNamePrefix = 'ambari-mirroring-'; // special prefix to be added for each Falcon feed name created with Ambari
  42. App.healthIconClassGreen = 'icon-ok-sign'; // bootstrap icon class for healthy/started service/host/host-component
  43. App.healthIconClassRed = 'icon-warning-sign'; // bootstrap icon class for master down/stopped service/host/host-component
  44. App.healthIconClassOrange = 'icon-minus-sign'; // bootstrap icon class for slave down/decommissioned host/host-component
  45. App.healthIconClassYellow = 'icon-question-sign'; // bootstrap icon class for heartbeat lost service/host/host-component
  46. // experimental features are automatically enabled if running on brunch server
  47. App.enableExperimental = false;
  48. App.supports = {
  49. addServices: true,
  50. hostOverrides: true,
  51. hostOverridesInstaller: true,
  52. hostOverridesHost: true,
  53. mirroring: false,
  54. secureCluster: true,
  55. secureClusterProceedPopup: false,
  56. reassignMaster: true,
  57. stackUpgrade: false,
  58. capacitySchedulerUi: false,
  59. startStopAllServices: true,
  60. hiveOozieExtraDatabases: true,
  61. multipleHBaseMasters: true,
  62. addMasters: false,
  63. customizeSmokeTestUser: true,
  64. hue: false,
  65. falcon: true,
  66. ldapGroupMapping: false,
  67. localRepositories: true,
  68. highAvailability: true,
  69. resourceManagerHighAvailability: true,
  70. deleteHost: true,
  71. autoRollbackHA: false,
  72. appTimelineServer: true,
  73. jobs: true,
  74. ubuntu: true,
  75. views: false,
  76. flume: true,
  77. databaseConnection: true,
  78. configHistory: false,
  79. serverRecommendValidate: false,
  80. downloadClientConfigs: true,
  81. abortRequests: false
  82. };
  83. if (App.enableExperimental) {
  84. for (var support in App.supports) {
  85. App.supports[support] = true;
  86. }
  87. }
  88. // this is to make sure that IE does not cache data when making AJAX calls to the server
  89. if (!$.mocho) {
  90. $.ajaxSetup({
  91. cache: false,
  92. headers: {"X-Requested-By": "X-Requested-By"}
  93. });
  94. }
  95. /**
  96. * Test Mode values
  97. */
  98. App.test_hostname = 'hostname';