router.js 3.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  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. });
  27. this.route('yarn-services');
  28. this.route('yarn-nodes', function(){
  29. this.route('table');
  30. this.route('heatmap');
  31. this.route('status');
  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' }, function() {
  39. this.route("info");
  40. this.route("yarn-nm-gpu");
  41. });
  42. this.route('yarn-node-apps', { path: '/yarn-node-apps/:node_id/:node_addr' });
  43. this.route('yarn-node-app',
  44. { path: '/yarn-node-app/:node_id/:node_addr/:app_id' });
  45. this.route('yarn-node-containers',
  46. { path: '/yarn-node-containers/:node_id/:node_addr' });
  47. this.route('yarn-node-container',
  48. { path: '/yarn-node-container/:node_id/:node_addr/:container_id' });
  49. this.route('yarn-container-log', { path:
  50. '/yarn-container-log/:node_id/:node_addr/:container_id/:filename' });
  51. this.route('yarn-deploy-service');
  52. this.route('cluster-overview');
  53. this.route('yarn-app', { path: '/yarn-app/:app_id' }, function() {
  54. this.route('info');
  55. this.route('attempts');
  56. this.route('components');
  57. this.route('charts');
  58. this.route('configs');
  59. this.route('logs');
  60. });
  61. this.route('yarn-component-instances', function() {
  62. this.route('info', {path: '/:component_name/info'});
  63. this.route('configs', {path: '/:component_name/configs'});
  64. });
  65. this.route('yarn-component-instance', function() {
  66. this.route('info', {path: '/:component_name/instances/:instance_name/info'});
  67. });
  68. this.route('yarn-app-attempt', { path: '/yarn-app-attempt/:app_attempt_id'});
  69. this.route('yarn-queues', { path: '/yarn-queues/:queue_name' });
  70. this.route('yarn-queue-apps', { path: '/yarn-queue-apps/:queue_name' });
  71. this.route('yarn-tools', function() {
  72. this.route('yarn-conf');
  73. this.route('yarn-metrics');
  74. this.route('yarn-rm-log');
  75. });
  76. this.route('yarn-flow-activity');
  77. this.route('yarn-flow', { path: '/yarn-flow/:flow_uid'}, function() {
  78. this.route('info');
  79. this.route('runs');
  80. });
  81. this.route('yarn-flowrun', { path: '/yarn-flowrun/:flowrun_uid'}, function() {
  82. this.route('info');
  83. this.route('metrics');
  84. });
  85. this.route('yarn-flowrun-metric', { path: '/yarn-flowrun-metric/:flowrun_uid/:metric_id'});
  86. this.route('timeline-error', {path: 'timeline-error/:error_id'});
  87. this.route('notauth');
  88. this.route('notfound');
  89. this.route('error', { path: '*:' });
  90. });
  91. export default Router;