quick_links.js 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428
  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:'%@://%@:%@/dfshealth.jsp',
  37. service_id: 'HDFS',
  38. template:'%@://%@:%@/dfshealth.jsp',
  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:5,
  87. label:'JobTracker UI',
  88. url:'%@://%@:%@/jobtracker.jsp',
  89. service_id: 'MAPREDUCE',
  90. template:'%@://%@:%@/jobtracker.jsp',
  91. http_config: 'mapred.job.tracker.http.address',
  92. https_config: 'mapred.job.tracker.https.address',
  93. site: 'mapred-site',
  94. regex: portRegex,
  95. default_http_port: 50030,
  96. default_https_port: 50035
  97. },
  98. {
  99. id:6,
  100. label:'Scheduling Info',
  101. url:'%@://%@:%@/scheduler',
  102. service_id: 'MAPREDUCE',
  103. template:'%@://%@:%@/scheduler',
  104. http_config: 'mapred.job.tracker.http.address',
  105. https_config: 'mapred.job.tracker.https.address',
  106. site: 'mapred-site',
  107. regex: portRegex,
  108. default_http_port: 50030,
  109. default_https_port: 50035
  110. },
  111. {
  112. id:7,
  113. label:'Running Jobs',
  114. url:'%@://%@:%@/jobtracker.jsp#running_jobs',
  115. service_id: 'MAPREDUCE',
  116. template:'%@://%@:%@/jobtracker.jsp#running_jobs',
  117. http_config: 'mapred.job.tracker.http.address',
  118. https_config: 'mapred.job.tracker.https.address',
  119. site: 'mapred-site',
  120. regex: portRegex,
  121. default_http_port: 50030,
  122. default_https_port: 50035
  123. },
  124. {
  125. id:8,
  126. label:'Retired Jobs',
  127. url:'%@://%@:%@/jobtracker.jsp#retired_jobs',
  128. service_id: 'MAPREDUCE',
  129. template:'%@://%@:%@/jobtracker.jsp#retired_jobs',
  130. http_config: 'mapred.job.tracker.http.address',
  131. https_config: 'mapred.job.tracker.https.address',
  132. site: 'mapred-site',
  133. regex: portRegex,
  134. default_http_port: 50030,
  135. default_https_port: 50035
  136. },
  137. {
  138. id:9,
  139. label:'JobHistory Server',
  140. url:'%@://%@:%@/jobhistoryhome.jsp',
  141. service_id: 'MAPREDUCE',
  142. template:'%@://%@:%@/jobhistoryhome.jsp',
  143. http_config: 'mapreduce.history.server.http.address',
  144. site: 'mapred-site',
  145. regex: portRegex,
  146. default_http_port: 51111
  147. },
  148. {
  149. id:10,
  150. label:'JobTracker Logs',
  151. url:'%@://%@:%@/logs',
  152. service_id: 'MAPREDUCE',
  153. template:'%@://%@:%@/logs',
  154. http_config: 'mapred.job.tracker.http.address',
  155. https_config: 'mapred.job.tracker.https.address',
  156. site: 'mapred-site',
  157. regex: portRegex,
  158. default_http_port: 50030,
  159. default_https_port: 50035
  160. },
  161. {
  162. id:11,
  163. label:'JobTracker JMX',
  164. url:'%@://%@:%@/jmx',
  165. service_id: 'MAPREDUCE',
  166. template:'%@://%@:%@/jmx',
  167. http_config: 'mapred.job.tracker.http.address',
  168. https_config: 'mapred.job.tracker.https.address',
  169. site: 'mapred-site',
  170. regex: portRegex,
  171. default_http_port: 50030,
  172. default_https_port: 50035
  173. },
  174. {
  175. id:12,
  176. label:'Thread Stacks',
  177. url:'%@://%@:%@/stacks',
  178. service_id: 'MAPREDUCE',
  179. template:'%@://%@:%@/stacks',
  180. http_config: 'mapred.job.tracker.http.address',
  181. https_config: 'mapred.job.tracker.https.address',
  182. site: 'mapred-site',
  183. regex: portRegex,
  184. default_http_port: 50030,
  185. default_https_port: 50035
  186. },
  187. {
  188. id:13,
  189. label:'HBase Master UI',
  190. url:'%@://%@:%@/master-status',
  191. service_id: 'HBASE',
  192. template:'%@://%@:%@/master-status',
  193. http_config: 'hbase.master.info.port',
  194. site: 'hbase-site',
  195. regex: '^(\\d+)$',
  196. default_http_port: 60010
  197. },
  198. {
  199. id:14,
  200. label:'HBase Logs',
  201. url:'%@://%@:60010/logs',
  202. service_id: 'HBASE',
  203. template:'%@://%@:%@/logs',
  204. http_config: 'hbase.master.info.port',
  205. site: 'hbase-site',
  206. regex: '^(\\d+)$',
  207. default_http_port: 60010
  208. },
  209. {
  210. id:15,
  211. label:'Zookeeper Info',
  212. url:'%@://%@:60010/zk.jsp',
  213. service_id: 'HBASE',
  214. template:'%@://%@:%@/zk.jsp',
  215. http_config: 'hbase.master.info.port',
  216. site: 'hbase-site',
  217. regex: '^(\\d+)$',
  218. default_http_port: 60010
  219. },
  220. {
  221. id:16,
  222. label:'HBase Master JMX',
  223. url:'%@://%@:60010/jmx',
  224. service_id: 'HBASE',
  225. template:'%@://%@:%@/jmx',
  226. http_config: 'hbase.master.info.port',
  227. site: 'hbase-site',
  228. regex: '^(\\d+)$',
  229. default_http_port: 60010
  230. },
  231. {
  232. id:17,
  233. label:'Debug Dump',
  234. url:'%@://%@:%@/dump',
  235. service_id: 'HBASE',
  236. template:'%@://%@:%@/dump',
  237. http_config: 'hbase.master.info.port',
  238. site: 'hbase-site',
  239. regex: '^(\\d+)$',
  240. default_http_port: 60010
  241. },
  242. {
  243. id:18,
  244. label:'Thread Stacks',
  245. url:'%@://%@:%@/stacks',
  246. service_id: 'HBASE',
  247. template:'%@://%@:%@/stacks',
  248. http_config: 'hbase.master.info.port',
  249. site: 'hbase-site',
  250. regex: '^(\\d+)$',
  251. default_http_port: 60010
  252. },
  253. {
  254. id:19,
  255. label:'Oozie Web UI',
  256. url:'%@://%@:%@/oozie',
  257. service_id: 'OOZIE',
  258. template:'%@://%@:%@/oozie',
  259. http_config: 'oozie.base.url',
  260. site: 'oozie-site',
  261. regex: portRegex,
  262. default_http_port: 11000
  263. },
  264. {
  265. id:20,
  266. label:'Ganglia Web UI',
  267. url:'%@://%@/ganglia',
  268. service_id: 'GANGLIA',
  269. template:'%@://%@/ganglia'
  270. },
  271. {
  272. id:21,
  273. label:'Nagios Web UI',
  274. url:'%@://%@/nagios',
  275. service_id: 'NAGIOS',
  276. template:'%@://%@/nagios'
  277. },
  278. {
  279. id:22,
  280. label:'Hue Web UI',
  281. url:'%@://%@/hue',
  282. service_id: 'HUE',
  283. template:'%@://%@/hue'
  284. },
  285. {
  286. id:23,
  287. label:'ResourceManager UI',
  288. url:'%@://%@:%@',
  289. service_id: 'YARN',
  290. template:'%@://%@:%@',
  291. http_config: 'yarn.resourcemanager.webapp.address',
  292. https_config: 'yarn.resourcemanager.webapp.https.address',
  293. site: 'yarn-site',
  294. regex: portRegex,
  295. default_http_port: 8088,
  296. default_https_port: 8090
  297. },
  298. {
  299. id:24,
  300. label:'ResourceManager logs',
  301. url:'%@://%@:%@/logs',
  302. service_id: 'YARN',
  303. template:'%@://%@:%@/logs',
  304. http_config: 'yarn.resourcemanager.webapp.address',
  305. https_config: 'yarn.resourcemanager.webapp.https.address',
  306. site: 'yarn-site',
  307. regex: portRegex,
  308. default_http_port: 8088,
  309. default_https_port: 8090
  310. },
  311. {
  312. id:25,
  313. label:'ResourceManager JMX',
  314. url:'%@://%@:%@/jmx',
  315. service_id: 'YARN',
  316. template:'%@://%@:%@/jmx',
  317. http_config: 'yarn.resourcemanager.webapp.address',
  318. https_config: 'yarn.resourcemanager.webapp.https.address',
  319. site: 'yarn-site',
  320. regex: portRegex,
  321. default_http_port: 8088,
  322. default_https_port: 8090
  323. },
  324. {
  325. id:26,
  326. label:'Thread Stacks',
  327. url:'%@://%@:%@/stacks',
  328. service_id: 'YARN',
  329. template:'%@://%@:%@/stacks',
  330. http_config: 'yarn.resourcemanager.webapp.address',
  331. https_config: 'yarn.resourcemanager.webapp.https.address',
  332. site: 'yarn-site',
  333. regex: portRegex,
  334. default_http_port: 8088,
  335. default_https_port: 8090
  336. },
  337. {
  338. id:27,
  339. label:'JobHistory UI',
  340. url:'%@://%@:%@',
  341. service_id: 'MAPREDUCE2',
  342. template:'%@://%@:%@',
  343. http_config: 'mapreduce.jobhistory.webapp.address',
  344. https_config: 'mapreduce.jobhistory.webapp.https.address',
  345. site: 'mapred-site',
  346. regex: portRegex,
  347. default_http_port: 19888
  348. },
  349. {
  350. id:28,
  351. label:'JobHistory logs',
  352. url:'%@://%@:%@/logs',
  353. service_id: 'MAPREDUCE2',
  354. template:'%@://%@:%@/logs',
  355. http_config: 'mapreduce.jobhistory.webapp.address',
  356. https_config: 'mapreduce.jobhistory.webapp.https.address',
  357. site: 'mapred-site',
  358. regex: portRegex,
  359. default_http_port: 19888
  360. },
  361. {
  362. id:29,
  363. label:'JobHistory JMX',
  364. url:'%@://%@:%@/jmx',
  365. service_id: 'MAPREDUCE2',
  366. template:'%@://%@:%@/jmx',
  367. http_config: 'mapreduce.jobhistory.webapp.address',
  368. https_config: 'mapreduce.jobhistory.webapp.https.address',
  369. site: 'mapred-site',
  370. regex: portRegex,
  371. default_http_port: 19888
  372. },
  373. {
  374. id:30,
  375. label:'Thread Stacks',
  376. url:'%@://%@:%@/stacks',
  377. service_id: 'MAPREDUCE2',
  378. template:'%@://%@:%@/stacks',
  379. http_config: 'mapreduce.jobhistory.webapp.address',
  380. https_config: 'mapreduce.jobhistory.webapp.https.address',
  381. site: 'mapred-site',
  382. regex: portRegex,
  383. default_http_port: 19888
  384. },
  385. {
  386. id:31,
  387. label:'Nimbus UI',
  388. url:'%@://%@:%@/',
  389. service_id: 'STORM',
  390. template:'%@://%@:%@/',
  391. http_config: 'nimbus.host',
  392. https_config: 'nimbus.host',
  393. site: 'storm-site',
  394. regex: portRegex,
  395. default_http_port: 8744
  396. },
  397. // @todo Add real info about link
  398. {
  399. id:33,
  400. label:'App Timeline Server UI',
  401. url:'%@://%@:%@/ats',
  402. service_id: 'YARN',
  403. template:'%@://%@:%@/ats',
  404. http_config: 'yarn.resourcemanager.webapp.address',
  405. https_config: 'yarn.resourcemanager.webapp.https.address',
  406. site: 'yarn-site',
  407. regex: portRegex,
  408. default_http_port: 8088
  409. },
  410. {
  411. id:32,
  412. label:'Falcon Server UI',
  413. url:'%@://%@:%@/stacks',
  414. service_id: 'FALCON',
  415. template:'%@://%@:%@/html5-ui',
  416. site: 'falcon-site',
  417. regex: portRegex,
  418. default_http_port: 16000
  419. }
  420. ];