router.js 2.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  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. import Ember from 'ember';
  19. import config from './config/environment';
  20. var Router = Ember.Router.extend({
  21. location: config.locationType
  22. });
  23. Router.map(function() {
  24. this.route('yarn-apps', function () {
  25. this.route('apps');
  26. this.route('services');
  27. });
  28. this.route('yarn-services');
  29. this.route('yarn-nodes', function(){
  30. this.route('table');
  31. this.route('heatmap');
  32. });
  33. this.route('yarn-queue', {path: '/yarn-queue/:queue_name'}, function() {
  34. this.route('info');
  35. this.route('apps');
  36. });
  37. this.route('yarn-nodes-heatmap');
  38. this.route('yarn-node', { path: '/yarn-node/:node_id/:node_addr' });
  39. this.route('yarn-node-apps', { path: '/yarn-node-apps/:node_id/:node_addr' });
  40. this.route('yarn-node-app',
  41. { path: '/yarn-node-app/:node_id/:node_addr/:app_id' });
  42. this.route('yarn-node-containers',
  43. { path: '/yarn-node-containers/:node_id/:node_addr' });
  44. this.route('yarn-node-container',
  45. { path: '/yarn-node-container/:node_id/:node_addr/:container_id' });
  46. this.route('yarn-container-log', { path:
  47. '/yarn-container-log/:node_id/:node_addr/:container_id/:filename' });
  48. this.route('cluster-overview');
  49. this.route('yarn-app', { path: '/yarn-app/:app_id' });
  50. this.route('yarn-app-attempt', { path: '/yarn-app-attempt/:app_attempt_id'});
  51. this.route('error');
  52. this.route('notfound', { path: '*:' });
  53. this.route('yarn-app-attempts', { path: '/yarn-app-attempts/:app_id' });
  54. this.route('yarn-queues', { path: '/yarn-queues/:queue_name' });
  55. this.route('yarn-flow-activity');
  56. this.route('yarn-flow', { path: '/yarn-flow/:flow_uid'}, function() {
  57. this.route('info');
  58. this.route('runs');
  59. });
  60. this.route('yarn-flowrun', { path: '/yarn-flowrun/:flowrun_uid'}, function() {
  61. this.route('info');
  62. this.route('metrics');
  63. });
  64. this.route('yarn-flowrun-metric', { path: '/yarn-flowrun-metric/:flowrun_uid/:metric_id'});
  65. this.route('timeline-error', {path: 'timeline-error/:error_id'});
  66. });
  67. export default Router;