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:23,
  171. label:'ResourceManager UI',
  172. url:'%@://%@:%@',
  173. service_id: 'YARN',
  174. template:'%@://%@:%@',
  175. http_config: 'yarn.resourcemanager.webapp.address',
  176. https_config: 'yarn.resourcemanager.webapp.https.address',
  177. site: 'yarn-site',
  178. regex: portRegex,
  179. default_http_port: 8088,
  180. default_https_port: 8090
  181. },
  182. {
  183. id:24,
  184. label:'ResourceManager logs',
  185. url:'%@://%@:%@/logs',
  186. service_id: 'YARN',
  187. template:'%@://%@:%@/logs',
  188. http_config: 'yarn.resourcemanager.webapp.address',
  189. https_config: 'yarn.resourcemanager.webapp.https.address',
  190. site: 'yarn-site',
  191. regex: portRegex,
  192. default_http_port: 8088,
  193. default_https_port: 8090
  194. },
  195. {
  196. id:25,
  197. label:'ResourceManager JMX',
  198. url:'%@://%@:%@/jmx',
  199. service_id: 'YARN',
  200. template:'%@://%@:%@/jmx',
  201. http_config: 'yarn.resourcemanager.webapp.address',
  202. https_config: 'yarn.resourcemanager.webapp.https.address',
  203. site: 'yarn-site',
  204. regex: portRegex,
  205. default_http_port: 8088,
  206. default_https_port: 8090
  207. },
  208. {
  209. id:26,
  210. label:'Thread Stacks',
  211. url:'%@://%@:%@/stacks',
  212. service_id: 'YARN',
  213. template:'%@://%@:%@/stacks',
  214. http_config: 'yarn.resourcemanager.webapp.address',
  215. https_config: 'yarn.resourcemanager.webapp.https.address',
  216. site: 'yarn-site',
  217. regex: portRegex,
  218. default_http_port: 8088,
  219. default_https_port: 8090
  220. },
  221. {
  222. id:27,
  223. label:'JobHistory UI',
  224. url:'%@://%@:%@',
  225. service_id: 'MAPREDUCE2',
  226. template:'%@://%@:%@',
  227. http_config: 'mapreduce.jobhistory.webapp.address',
  228. https_config: 'mapreduce.jobhistory.webapp.https.address',
  229. site: 'mapred-site',
  230. regex: portRegex,
  231. default_http_port: 19888
  232. },
  233. {
  234. id:28,
  235. label:'JobHistory logs',
  236. url:'%@://%@:%@/logs',
  237. service_id: 'MAPREDUCE2',
  238. template:'%@://%@:%@/logs',
  239. http_config: 'mapreduce.jobhistory.webapp.address',
  240. https_config: 'mapreduce.jobhistory.webapp.https.address',
  241. site: 'mapred-site',
  242. regex: portRegex,
  243. default_http_port: 19888
  244. },
  245. {
  246. id:29,
  247. label:'JobHistory JMX',
  248. url:'%@://%@:%@/jmx',
  249. service_id: 'MAPREDUCE2',
  250. template:'%@://%@:%@/jmx',
  251. http_config: 'mapreduce.jobhistory.webapp.address',
  252. https_config: 'mapreduce.jobhistory.webapp.https.address',
  253. site: 'mapred-site',
  254. regex: portRegex,
  255. default_http_port: 19888
  256. },
  257. {
  258. id:30,
  259. label:'Thread Stacks',
  260. url:'%@://%@:%@/stacks',
  261. service_id: 'MAPREDUCE2',
  262. template:'%@://%@:%@/stacks',
  263. http_config: 'mapreduce.jobhistory.webapp.address',
  264. https_config: 'mapreduce.jobhistory.webapp.https.address',
  265. site: 'mapred-site',
  266. regex: portRegex,
  267. default_http_port: 19888
  268. },
  269. {
  270. id:31,
  271. label:'Storm UI',
  272. url:'%@://%@:%@/',
  273. service_id: 'STORM',
  274. template:'%@://%@:%@/',
  275. http_config: 'ui.port',
  276. site: 'storm-site',
  277. regex: '^(\\d+)$',
  278. default_http_port: 8744
  279. },
  280. {
  281. id:32,
  282. label:'Falcon Web UI',
  283. url:'%@://%@:%@/',
  284. service_id: 'FALCON',
  285. template:'%@://%@:%@/',
  286. http_config: 'falcon_port',
  287. site: 'falcon-env',
  288. regex: '^(\\d+)$',
  289. default_http_port: 15000
  290. },
  291. {
  292. id: 33,
  293. label:'Ranger Admin UI',
  294. url:'%@://%@:6080/',
  295. service_id: 'RANGER',
  296. template:'%@://%@:6080/'
  297. }
  298. ];