alert.js 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131
  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.AlertStatus = {
  20. negative: 'corrupt',
  21. positive: 'ok'
  22. }
  23. App.Alert = DS.Model.extend({
  24. title: DS.attr('string'),
  25. service: DS.belongsTo('App.Service'),
  26. date: DS.attr('date'),
  27. status: DS.attr('string'),
  28. message: DS.attr('string')
  29. });
  30. App.Alert.FIXTURES = [
  31. {
  32. id: 1,
  33. title: 'Corrupt/Missing Block',
  34. service_id: 1,
  35. date: 'August 29, 2012 17:00',
  36. status: 'corrupt',
  37. message: 'message'
  38. },
  39. {
  40. id: 2,
  41. title: 'Corrupt/Missing Block',
  42. service_id: 1,
  43. date: 'August 30, 2012 17:00',
  44. status: 'ok',
  45. message: 'message'
  46. },
  47. {
  48. id: 3,
  49. title: 'Corrupt/Missing Block',
  50. service_id: 2,
  51. date: 'August 29, 2012 17:00',
  52. status: 'corrupt',
  53. message: 'message'
  54. },
  55. {
  56. id: 4,
  57. title: 'Corrupt/Missing Block',
  58. service_id: 2,
  59. date: 'August 30, 2012 17:00',
  60. status: 'ok',
  61. message: 'message'
  62. },
  63. {
  64. id: 5,
  65. title: 'Corrupt/Missing Block',
  66. service_id: 3,
  67. date: 'August 29, 2012 17:00',
  68. status: 'corrupt',
  69. message: 'message'
  70. },
  71. {
  72. id: 6,
  73. title: 'Corrupt/Missing Block',
  74. service_id: 3,
  75. date: 'August 30, 2012 17:00',
  76. status: 'ok',
  77. message: 'message'
  78. },
  79. {
  80. id: 7,
  81. title: 'Corrupt/Missing Block',
  82. service_id: 4,
  83. date: 'August 29, 2012 17:00',
  84. status: 'corrupt',
  85. message: 'message'
  86. },
  87. {
  88. id: 8,
  89. title: 'Corrupt/Missing Block',
  90. service_id: 4,
  91. date: 'August 30, 2012 17:00',
  92. status: 'ok',
  93. message: 'message'
  94. },
  95. {
  96. id: 9,
  97. title: 'Corrupt/Missing Block',
  98. service_id: 5,
  99. date: 'August 29, 2012 17:00',
  100. status: 'corrupt',
  101. message: 'message'
  102. },
  103. {
  104. id: 10,
  105. title: 'Corrupt/Missing Block',
  106. service_id: 5,
  107. date: 'August 30, 2012 17:00',
  108. status: 'ok',
  109. message: 'message'
  110. },
  111. {
  112. id: 11,
  113. title: 'Corrupt/Missing Block',
  114. service_id: 6,
  115. date: 'August 29, 2012 17:00',
  116. status: 'corrupt',
  117. message: 'message'
  118. },
  119. {
  120. id: 12,
  121. title: 'Corrupt/Missing Block',
  122. service_id: 6,
  123. date: 'August 30, 2012 17:00',
  124. status: 'ok',
  125. message: 'message'
  126. }
  127. ];