config.js 3.4 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. 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.2';
  28. App.defaultWindowsStackVersion = 'HDPWIN-2.1';
  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.sessionKeepAliveInterval = 60000;
  33. App.bgOperationsUpdateInterval = 6000;
  34. App.componentsUpdateInterval = 6000;
  35. App.contentUpdateInterval = 15000;
  36. App.alertDefinitionsUpdateInterval = 10000;
  37. App.alertInstancesUpdateInterval = 10000;
  38. App.alertGroupsUpdateInterval = 10000;
  39. App.pageReloadTime=3600000;
  40. App.singleNodeInstall = false;
  41. App.singleNodeAlias = document.location.hostname;
  42. App.minDiskSpace = 2.0; // minimum disk space required for '/' for each host before install, unit GB
  43. App.minDiskSpaceUsrLib = 1.0; // minimum disk space for '/usr/lib' for each host before install, unit GB
  44. App.healthIconClassGreen = 'icon-ok-sign'; // bootstrap icon class for healthy/started service/host/host-component
  45. App.healthIconClassRed = 'icon-warning-sign'; // bootstrap icon class for master down/stopped service/host/host-component
  46. App.healthIconClassOrange = 'icon-minus-sign'; // bootstrap icon class for slave down/decommissioned host/host-component
  47. App.healthIconClassYellow = 'icon-question-sign'; // bootstrap icon class for heartbeat lost service/host/host-component
  48. App.isManagedMySQLForHiveEnabled = false;
  49. App.healthStatusRed = '#ff0000';
  50. App.healthStatusGreen = '#5AB400';
  51. App.healthStatusOrange = '#FF8E00';
  52. // experimental features are automatically enabled if running on brunch server
  53. App.enableExperimental = false;
  54. App.supports = {
  55. preUpgradeCheck: true,
  56. stackUpgrade: true,
  57. autoRollbackHA: false,
  58. alwaysEnableManagedMySQLForHive: true,
  59. preKerberizeCheck: false,
  60. automatedKerberos: true,
  61. customizeAgentUserAccount: false,
  62. installGanglia: false,
  63. opsDuringRollingUpgrade: false
  64. };
  65. if (App.enableExperimental) {
  66. for (var support in App.supports) {
  67. App.supports[support] = true;
  68. }
  69. }
  70. // this is to make sure that IE does not cache data when making AJAX calls to the server
  71. if (!$.mocho) {
  72. $.ajaxSetup({
  73. cache: false,
  74. headers: {"X-Requested-By": "X-Requested-By"}
  75. });
  76. }
  77. /**
  78. * Test Mode values
  79. */
  80. App.test_hostname = 'hostname';