initialize.js 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  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. window.App = require('app');
  19. App.testMode = false;
  20. require('messages');
  21. require('utils/data_table');
  22. require('utils/db');
  23. require('utils/helper');
  24. require('models');
  25. require('controllers');
  26. require('views');
  27. require('router');
  28. require('mappers/server_data_mapper');
  29. require('mappers/services_mapper');
  30. require('mappers/hosts_mapper');
  31. require('mappers/cluster_mapper');
  32. require('mappers/jobs_mapper');
  33. require('mappers/runs_mapper');
  34. require('mappers/racks_mapper');
  35. require('mappers/alerts_mapper');
  36. require('utils/http_client');
  37. App.initialize();
  38. /**
  39. * Test Mode values
  40. */
  41. App.test_hostname = 'hostname';
  42. console.log('after initialize');
  43. console.log('TRACE: app.js-> localStorage:Ambari.authenticated=' + localStorage.getItem('Ambari' + 'authenticated'));
  44. console.log('TRACE: app.js-> localStorage:currentStep=' + localStorage.getItem(App.get('router').getLoginName() + 'Installer' + 'currentStep'));
  45. console.log('TRACE: app.js-> router.authenticated=' + App.get('router.loggedIn'));