app.js 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  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.App = DS.Model.extend({
  20. appName: DS.attr('string'),
  21. type: DS.attr('string'),
  22. numJobsTotal: DS.attr('number'),
  23. userName: DS.attr('string'),
  24. executionTime: DS.attr('string'),
  25. runs: DS.hasMany('App.Run')
  26. });
  27. App.App.FIXTURES = [
  28. {
  29. id: 1,
  30. app_name: 'pigs.sh',
  31. type: 'Hive',
  32. num_jobs_total: 5,
  33. user_name: 'root',
  34. execution_time: '1347629541543',
  35. runs: [1, 2, 3]
  36. },
  37. {
  38. id: 2,
  39. app_name: 'pigsm.sh',
  40. type: 'pig',
  41. num_jobs_total: 3,
  42. user_name: 'user1',
  43. execution_time: '1347656741515',
  44. runs: [6, 4, 5]
  45. },
  46. {
  47. id: 3,
  48. app_name: 'pigsmo.sh',
  49. type: 'pig',
  50. num_jobs_total: 4,
  51. user_name: 'user3',
  52. execution_time: '1347629587687',
  53. runs: [7, 8, 9, 10, 11]
  54. },
  55. {
  56. id: 4,
  57. app_name: 'pigsmok.sh',
  58. type: 'MapReduce',
  59. num_jobs_total: 0,
  60. user_name: 'root',
  61. execution_time: '134762957834',
  62. runs: []
  63. }
  64. ];