quick_links.js 7.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304
  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. var portRegex = '\\w*:(\\d+)';
  20. App.QuickLinks = DS.Model.extend({
  21. label: DS.attr('string'),
  22. url: DS.attr('string'),
  23. service_id: DS.attr('string'),
  24. template: DS.attr('string'),
  25. http_config: DS.attr('string'),
  26. https_config: DS.attr('string'),
  27. site: DS.attr('string'),
  28. regex: DS.attr('string'),
  29. default_http_port: DS.attr('number'),
  30. default_https_port: DS.attr('number')
  31. });
  32. App.QuickLinks.FIXTURES = [
  33. {
  34. id:1,
  35. label:'NameNode UI',
  36. url:'%@://%@:%@',
  37. service_id: 'HDFS',
  38. template:'%@://%@:%@',
  39. http_config: 'dfs.namenode.http-address',
  40. https_config: 'dfs.namenode.https-address',
  41. site: 'hdfs-site',
  42. regex: portRegex,
  43. default_http_port: 50070,
  44. default_https_port: 50470
  45. },
  46. {
  47. id:2,
  48. label:'NameNode logs',
  49. url:'%@://%@:%@/logs',
  50. service_id: 'HDFS',
  51. template:'%@://%@:%@/logs',
  52. http_config: 'dfs.namenode.http-address',
  53. https_config: 'dfs.namenode.https-address',
  54. site: 'hdfs-site',
  55. regex: portRegex,
  56. default_http_port: 50070,
  57. default_https_port: 50470
  58. },
  59. {
  60. id:3,
  61. label:'NameNode JMX',
  62. url:'%@://%@:%@/jmx',
  63. service_id: 'HDFS',
  64. template:'%@://%@:%@/jmx',
  65. http_config: 'dfs.namenode.http-address',
  66. https_config: 'dfs.namenode.https-address',
  67. site: 'hdfs-site',
  68. regex: portRegex,
  69. default_http_port: 50070,
  70. default_https_port: 50470
  71. },
  72. {
  73. id:4,
  74. label:'Thread Stacks',
  75. url:'%@://%@:%@/stacks',
  76. service_id: 'HDFS',
  77. template:'%@://%@:%@/stacks',
  78. http_config: 'dfs.namenode.http-address',
  79. https_config: 'dfs.namenode.https-address',
  80. site: 'hdfs-site',
  81. regex: portRegex,
  82. default_http_port: 50070,
  83. default_https_port: 50470
  84. },
  85. {
  86. id:13,
  87. label:'HBase Master UI',
  88. url:'%@://%@:%@/master-status',
  89. service_id: 'HBASE',
  90. template:'%@://%@:%@/master-status',
  91. http_config: 'hbase.master.info.port',
  92. site: 'hbase-site',
  93. regex: '^(\\d+)$',
  94. default_http_port: 60010
  95. },
  96. {
  97. id:14,
  98. label:'HBase Logs',
  99. url:'%@://%@:60010/logs',
  100. service_id: 'HBASE',
  101. template:'%@://%@:%@/logs',
  102. http_config: 'hbase.master.info.port',
  103. site: 'hbase-site',
  104. regex: '^(\\d+)$',
  105. default_http_port: 60010
  106. },
  107. {
  108. id:15,
  109. label:'Zookeeper Info',
  110. url:'%@://%@:60010/zk.jsp',
  111. service_id: 'HBASE',
  112. template:'%@://%@:%@/zk.jsp',
  113. http_config: 'hbase.master.info.port',
  114. site: 'hbase-site',
  115. regex: '^(\\d+)$',
  116. default_http_port: 60010
  117. },
  118. {
  119. id:16,
  120. label:'HBase Master JMX',
  121. url:'%@://%@:60010/jmx',
  122. service_id: 'HBASE',
  123. template:'%@://%@:%@/jmx',
  124. http_config: 'hbase.master.info.port',
  125. site: 'hbase-site',
  126. regex: '^(\\d+)$',
  127. default_http_port: 60010
  128. },
  129. {
  130. id:17,
  131. label:'Debug Dump',
  132. url:'%@://%@:%@/dump',
  133. service_id: 'HBASE',
  134. template:'%@://%@:%@/dump',
  135. http_config: 'hbase.master.info.port',
  136. site: 'hbase-site',
  137. regex: '^(\\d+)$',
  138. default_http_port: 60010
  139. },
  140. {
  141. id:18,
  142. label:'Thread Stacks',
  143. url:'%@://%@:%@/stacks',
  144. service_id: 'HBASE',
  145. template:'%@://%@:%@/stacks',
  146. http_config: 'hbase.master.info.port',
  147. site: 'hbase-site',
  148. regex: '^(\\d+)$',
  149. default_http_port: 60010
  150. },
  151. {
  152. id:19,
  153. label:'Oozie Web UI',
  154. url:'%@://%@:%@/oozie',
  155. service_id: 'OOZIE',
  156. template:'%@://%@:%@/oozie',
  157. http_config: 'oozie.base.url',
  158. site: 'oozie-site',
  159. regex: portRegex,
  160. default_http_port: 11000
  161. },
  162. {
  163. id:20,
  164. label:'Ganglia Web UI',
  165. url:'%@://%@/ganglia',
  166. service_id: 'GANGLIA',
  167. template:'%@://%@/ganglia'
  168. },
  169. {
  170. id:21,
  171. label:'Nagios Web UI',
  172. url:'%@://%@/nagios',
  173. service_id: 'NAGIOS',
  174. template:'%@://%@/nagios'
  175. },
  176. {
  177. id:23,
  178. label:'ResourceManager UI',
  179. url:'%@://%@:%@',
  180. service_id: 'YARN',
  181. template:'%@://%@:%@',
  182. http_config: 'yarn.resourcemanager.webapp.address',
  183. https_config: 'yarn.resourcemanager.webapp.https.address',
  184. site: 'yarn-site',
  185. regex: portRegex,
  186. default_http_port: 8088,
  187. default_https_port: 8090
  188. },
  189. {
  190. id:24,
  191. label:'ResourceManager logs',
  192. url:'%@://%@:%@/logs',
  193. service_id: 'YARN',
  194. template:'%@://%@:%@/logs',
  195. http_config: 'yarn.resourcemanager.webapp.address',
  196. https_config: 'yarn.resourcemanager.webapp.https.address',
  197. site: 'yarn-site',
  198. regex: portRegex,
  199. default_http_port: 8088,
  200. default_https_port: 8090
  201. },
  202. {
  203. id:25,
  204. label:'ResourceManager JMX',
  205. url:'%@://%@:%@/jmx',
  206. service_id: 'YARN',
  207. template:'%@://%@:%@/jmx',
  208. http_config: 'yarn.resourcemanager.webapp.address',
  209. https_config: 'yarn.resourcemanager.webapp.https.address',
  210. site: 'yarn-site',
  211. regex: portRegex,
  212. default_http_port: 8088,
  213. default_https_port: 8090
  214. },
  215. {
  216. id:26,
  217. label:'Thread Stacks',
  218. url:'%@://%@:%@/stacks',
  219. service_id: 'YARN',
  220. template:'%@://%@:%@/stacks',
  221. http_config: 'yarn.resourcemanager.webapp.address',
  222. https_config: 'yarn.resourcemanager.webapp.https.address',
  223. site: 'yarn-site',
  224. regex: portRegex,
  225. default_http_port: 8088,
  226. default_https_port: 8090
  227. },
  228. {
  229. id:27,
  230. label:'JobHistory UI',
  231. url:'%@://%@:%@',
  232. service_id: 'MAPREDUCE2',
  233. template:'%@://%@:%@',
  234. http_config: 'mapreduce.jobhistory.webapp.address',
  235. https_config: 'mapreduce.jobhistory.webapp.https.address',
  236. site: 'mapred-site',
  237. regex: portRegex,
  238. default_http_port: 19888
  239. },
  240. {
  241. id:28,
  242. label:'JobHistory logs',
  243. url:'%@://%@:%@/logs',
  244. service_id: 'MAPREDUCE2',
  245. template:'%@://%@:%@/logs',
  246. http_config: 'mapreduce.jobhistory.webapp.address',
  247. https_config: 'mapreduce.jobhistory.webapp.https.address',
  248. site: 'mapred-site',
  249. regex: portRegex,
  250. default_http_port: 19888
  251. },
  252. {
  253. id:29,
  254. label:'JobHistory JMX',
  255. url:'%@://%@:%@/jmx',
  256. service_id: 'MAPREDUCE2',
  257. template:'%@://%@:%@/jmx',
  258. http_config: 'mapreduce.jobhistory.webapp.address',
  259. https_config: 'mapreduce.jobhistory.webapp.https.address',
  260. site: 'mapred-site',
  261. regex: portRegex,
  262. default_http_port: 19888
  263. },
  264. {
  265. id:30,
  266. label:'Thread Stacks',
  267. url:'%@://%@:%@/stacks',
  268. service_id: 'MAPREDUCE2',
  269. template:'%@://%@:%@/stacks',
  270. http_config: 'mapreduce.jobhistory.webapp.address',
  271. https_config: 'mapreduce.jobhistory.webapp.https.address',
  272. site: 'mapred-site',
  273. regex: portRegex,
  274. default_http_port: 19888
  275. },
  276. {
  277. id:31,
  278. label:'Storm UI',
  279. url:'%@://%@:%@/',
  280. service_id: 'STORM',
  281. template:'%@://%@:%@/',
  282. http_config: 'ui.port',
  283. site: 'storm-site',
  284. regex: '^(\\d+)$',
  285. default_http_port: 8744
  286. },
  287. {
  288. id:32,
  289. label:'Falcon Web UI',
  290. url:'%@://%@:%@/',
  291. service_id: 'FALCON',
  292. template:'%@://%@:%@/',
  293. http_config: 'falcon_port',
  294. site: 'falcon-env',
  295. regex: '^(\\d+)$',
  296. default_http_port: 15000
  297. }
  298. ];