config.js 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  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.appURLRoot = '{proxy_root}/'.replace(/\{.+\}/g, ''); // determines application root path name, not related to hash route
  27. App.apiPrefix = '/api/v1';
  28. App.defaultStackVersion = 'HDP-2.3';
  29. App.defaultWindowsStackVersion = 'HDPWIN-2.1';
  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.sessionKeepAliveInterval = 60000;
  34. App.bgOperationsUpdateInterval = 6000;
  35. App.componentsUpdateInterval = 6000;
  36. App.contentUpdateInterval = 15000;
  37. App.hostStatusCountersUpdateInterval = 10000;
  38. App.alertDefinitionsUpdateInterval = 10000;
  39. App.alertInstancesUpdateInterval = 10000;
  40. App.alertGroupsUpdateInterval = 10000;
  41. App.clusterEnvUpdateInterval = 10000;
  42. App.pageReloadTime = 3600000;
  43. App.nnCheckpointAgeAlertThreshold = 12; // in hours
  44. App.singleNodeInstall = false;
  45. App.singleNodeAlias = document.location.hostname;
  46. App.minDiskSpace = 2.0; // minimum disk space required for '/' for each host before install, unit GB
  47. App.minDiskSpaceUsrLib = 1.0; // minimum disk space for '/usr/lib' for each host before install, unit GB
  48. App.healthIconClassGreen = 'icon-ok-sign'; // bootstrap icon class for healthy/started service/host/host-component
  49. App.healthIconClassRed = 'icon-warning-sign'; // bootstrap icon class for master down/stopped service/host/host-component
  50. App.healthIconClassOrange = 'icon-minus-sign'; // bootstrap icon class for slave down/decommissioned host/host-component
  51. App.healthIconClassYellow = 'icon-question-sign'; // bootstrap icon class for heartbeat lost service/host/host-component
  52. App.isManagedMySQLForHiveEnabled = false;
  53. App.isStormMetricsSupported = true;
  54. App.healthStatusRed = '#ff0000';
  55. App.healthStatusGreen = '#5AB400';
  56. App.healthStatusOrange = '#FF8E00';
  57. App.inactivityRemainTime = 60; // in seconds
  58. App.enableLogger = true;
  59. App.stackVersionsAvailable = true;
  60. App.upgradeHistoryAvailable = false;
  61. App.enableDigitalClock = false;
  62. // experimental features are automatically enabled if running on brunch server
  63. App.enableExperimental = false;
  64. App.supports = {
  65. disableHostCheckOnAddHostWizard: false,
  66. preUpgradeCheck: true,
  67. displayOlderVersions: false,
  68. autoRollbackHA: false,
  69. alwaysEnableManagedMySQLForHive: false,
  70. preKerberizeCheck: false,
  71. customizeAgentUserAccount: false,
  72. installGanglia: false,
  73. opsDuringRollingUpgrade: false,
  74. customizedWidgetLayout: false,
  75. showPageLoadTime: false,
  76. skipComponentStartAfterInstall: false,
  77. preInstallChecks: false,
  78. hostComboSearchBox: true,
  79. serviceAutoStart: false,
  80. logSearch: true,
  81. redhatSatellite: false,
  82. enableIpa: false,
  83. addingNewRepository: false,
  84. kerberosStackAdvisor: true,
  85. logCountVizualization: false,
  86. enabledWizardForHostOrderedUpgrade: true,
  87. manageJournalNode: true
  88. };
  89. if (App.enableExperimental) {
  90. for (var support in App.supports) {
  91. App.supports[support] = true;
  92. }
  93. }
  94. // this is to make sure that IE does not cache data when making AJAX calls to the server
  95. if (!$.mocho) {
  96. $.ajaxSetup({
  97. cache: false,
  98. headers: {"X-Requested-By": "X-Requested-By"}
  99. });
  100. }
  101. /**
  102. * Test Mode values
  103. */
  104. App.test_hostname = 'hostname';