rackF5.js 51 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675
  1. /**
  2. * $Id: mxF5.js,v 1.0 2018/05/03 13:10:37 mate Exp $
  3. * Copyright (c) 2006-2018, JGraph Ltd
  4. */
  5. //**********************************************************************************************************************************************************
  6. //Big-IP 1600
  7. //**********************************************************************************************************************************************************
  8. /**
  9. * Extends mxShape.
  10. */
  11. function mxRackF5BigIp1600(bounds, fill, stroke, strokewidth)
  12. {
  13. mxShape.call(this);
  14. this.bounds = bounds;
  15. this.fill = fill;
  16. this.stroke = stroke;
  17. this.strokewidth = (strokewidth != null) ? strokewidth : 1;
  18. };
  19. /**
  20. * Extends mxShape.
  21. */
  22. mxUtils.extend(mxRackF5BigIp1600, mxShape);
  23. mxRackF5BigIp1600.prototype.cst =
  24. {
  25. SHAPE_BIG_IP_1600 : 'mxgraph.rackF5Shapes.big_ip_1600'
  26. };
  27. /**
  28. * Function: paintVertexShape
  29. *
  30. * Paints the vertex shape.
  31. */
  32. mxRackF5BigIp1600.prototype.paintVertexShape = function(c, x, y, w, h)
  33. {
  34. c.translate(x, y);
  35. var hasEars = mxUtils.getValue(this.style, 'hasEars', '1');
  36. var isFront = mxUtils.getValue(this.style, 'isFront', '0');
  37. var isDC = mxUtils.getValue(this.style, 'isDC', '0');
  38. var psNum = parseInt(mxUtils.getValue(this.style, 'psNum', '2'));
  39. var stencilPath = mxUtils.getValue(this.style, 'path', 'img/lib/f5/');
  40. if (hasEars)
  41. {
  42. c.image(0, 0, w * 0.04, h, stencilPath + 'big_ip_5x00_ear.png', 0, 0, 0);
  43. c.image(w * 0.96, 0, w * 0.04, h, stencilPath + 'big_ip_5x00_ear.png', 0, 1, 0);
  44. }
  45. if (isFront)
  46. {
  47. c.image(w * 0.04, 0, w * 0.92, h, stencilPath + 'big_ip_1600_front.png', 0, 0, 0);
  48. }
  49. else
  50. {
  51. c.image(w * 0.04, 0, w * 0.92, h, stencilPath + 'big_ip_1600_back.png', 0, 0, 0);
  52. if (isDC)
  53. {
  54. if (psNum >= '1')
  55. {
  56. c.image(w * 0.425, h * 0.05, w * 0.244, h * 0.92, stencilPath + 'big_ip_4x00_dc.png', 0, 0, 0);
  57. }
  58. if (psNum >= '2')
  59. {
  60. c.image(w * 0.672, h * 0.05, w * 0.245, h * 0.92, stencilPath + 'big_ip_4x00_dc.png', 0, 0, 0);
  61. }
  62. }
  63. else
  64. {
  65. if (psNum >= '2')
  66. {
  67. c.image(w * 0.672, h * 0.05, w * 0.245, h * 0.92, stencilPath + 'big_ip_4x00_ac.png', 0, 0, 0);
  68. }
  69. }
  70. }
  71. };
  72. mxCellRenderer.registerShape(mxRackF5BigIp1600.prototype.cst.SHAPE_BIG_IP_1600, mxRackF5BigIp1600);
  73. //**********************************************************************************************************************************************************
  74. //Big-IP 2x00
  75. //**********************************************************************************************************************************************************
  76. /**
  77. * Extends mxShape.
  78. */
  79. function mxRackF5BigIp2x00(bounds, fill, stroke, strokewidth)
  80. {
  81. mxShape.call(this);
  82. this.bounds = bounds;
  83. this.fill = fill;
  84. this.stroke = stroke;
  85. this.strokewidth = (strokewidth != null) ? strokewidth : 1;
  86. };
  87. /**
  88. * Extends mxShape.
  89. */
  90. mxUtils.extend(mxRackF5BigIp2x00, mxShape);
  91. mxRackF5BigIp2x00.prototype.cst =
  92. {
  93. SHAPE_BIG_IP_2x00 : 'mxgraph.rackF5Shapes.big_ip_2x00'
  94. };
  95. /**
  96. * Function: paintVertexShape
  97. *
  98. * Paints the vertex shape.
  99. */
  100. mxRackF5BigIp2x00.prototype.paintVertexShape = function(c, x, y, w, h)
  101. {
  102. c.translate(x, y);
  103. var hasEars = mxUtils.getValue(this.style, 'hasEars', '1');
  104. var isFront = mxUtils.getValue(this.style, 'isFront', '0');
  105. var isDC = mxUtils.getValue(this.style, 'isDC', '0');
  106. var psNum = parseInt(mxUtils.getValue(this.style, 'psNum', '2'));
  107. var stencilPath = mxUtils.getValue(this.style, 'path', 'img/lib/f5/');
  108. if (hasEars)
  109. {
  110. c.image(0, 0, w * 0.04, h, stencilPath + 'big_ip_5x00_ear.png', 0, 0, 0);
  111. c.image(w * 0.96, 0, w * 0.04, h, stencilPath + 'big_ip_5x00_ear.png', 0, 1, 0);
  112. }
  113. if (isFront)
  114. {
  115. c.image(w * 0.04, 0, w * 0.92, h, stencilPath + 'big_ip_2x00_front.png', 0, 0, 0);
  116. }
  117. else
  118. {
  119. c.image(w * 0.04, 0, w * 0.92, h, stencilPath + 'big_ip_1600_back.png', 0, 0, 0);
  120. if (isDC)
  121. {
  122. if (psNum >= '1')
  123. {
  124. c.image(w * 0.425, h * 0.05, w * 0.244, h * 0.92, stencilPath + 'big_ip_4x00_dc.png', 0, 0, 0);
  125. }
  126. if (psNum >= '2')
  127. {
  128. c.image(w * 0.672, h * 0.05, w * 0.245, h * 0.92, stencilPath + 'big_ip_4x00_dc.png', 0, 0, 0);
  129. }
  130. }
  131. else
  132. {
  133. if (psNum >= '2')
  134. {
  135. c.image(w * 0.672, h * 0.05, w * 0.245, h * 0.92, stencilPath + 'big_ip_4x00_ac.png', 0, 0, 0);
  136. }
  137. }
  138. }
  139. };
  140. mxCellRenderer.registerShape(mxRackF5BigIp2x00.prototype.cst.SHAPE_BIG_IP_2x00, mxRackF5BigIp2x00);
  141. //**********************************************************************************************************************************************************
  142. //Big-IP 3600
  143. //**********************************************************************************************************************************************************
  144. /**
  145. * Extends mxShape.
  146. */
  147. function mxRackF5BigIp3600(bounds, fill, stroke, strokewidth)
  148. {
  149. mxShape.call(this);
  150. this.bounds = bounds;
  151. this.fill = fill;
  152. this.stroke = stroke;
  153. this.strokewidth = (strokewidth != null) ? strokewidth : 1;
  154. };
  155. /**
  156. * Extends mxShape.
  157. */
  158. mxUtils.extend(mxRackF5BigIp3600, mxShape);
  159. mxRackF5BigIp3600.prototype.cst =
  160. {
  161. SHAPE_BIG_IP_3600 : 'mxgraph.rackF5Shapes.big_ip_3600'
  162. };
  163. /**
  164. * Function: paintVertexShape
  165. *
  166. * Paints the vertex shape.
  167. */
  168. mxRackF5BigIp3600.prototype.paintVertexShape = function(c, x, y, w, h)
  169. {
  170. c.translate(x, y);
  171. var hasEars = mxUtils.getValue(this.style, 'hasEars', '1');
  172. var isFront = mxUtils.getValue(this.style, 'isFront', '0');
  173. var isDC = mxUtils.getValue(this.style, 'isDC', '0');
  174. var psNum = parseInt(mxUtils.getValue(this.style, 'psNum', '2'));
  175. var stencilPath = mxUtils.getValue(this.style, 'path', 'img/lib/f5/');
  176. if (hasEars)
  177. {
  178. c.image(0, 0, w * 0.04, h, stencilPath + 'big_ip_5x00_ear.png', 0, 0, 0);
  179. c.image(w * 0.96, 0, w * 0.04, h, stencilPath + 'big_ip_5x00_ear.png', 0, 1, 0);
  180. }
  181. if (isFront)
  182. {
  183. c.image(w * 0.04, 0, w * 0.92, h, stencilPath + 'big_ip_3600_front.png', 0, 0, 0);
  184. }
  185. else
  186. {
  187. c.image(w * 0.04, 0, w * 0.92, h, stencilPath + 'big_ip_1600_back.png', 0, 0, 0);
  188. if (isDC)
  189. {
  190. if (psNum >= '1')
  191. {
  192. c.image(w * 0.425, h * 0.05, w * 0.244, h * 0.92, stencilPath + 'big_ip_4x00_dc.png', 0, 0, 0);
  193. }
  194. if (psNum >= '2')
  195. {
  196. c.image(w * 0.672, h * 0.05, w * 0.245, h * 0.92, stencilPath + 'big_ip_4x00_dc.png', 0, 0, 0);
  197. }
  198. }
  199. else
  200. {
  201. if (psNum >= '2')
  202. {
  203. c.image(w * 0.672, h * 0.05, w * 0.245, h * 0.92, stencilPath + 'big_ip_4x00_ac.png', 0, 0, 0);
  204. }
  205. }
  206. }
  207. };
  208. mxCellRenderer.registerShape(mxRackF5BigIp3600.prototype.cst.SHAPE_BIG_IP_3600, mxRackF5BigIp3600);
  209. //**********************************************************************************************************************************************************
  210. //Big-IP 3900
  211. //**********************************************************************************************************************************************************
  212. /**
  213. * Extends mxShape.
  214. */
  215. function mxRackF5BigIp3900(bounds, fill, stroke, strokewidth)
  216. {
  217. mxShape.call(this);
  218. this.bounds = bounds;
  219. this.fill = fill;
  220. this.stroke = stroke;
  221. this.strokewidth = (strokewidth != null) ? strokewidth : 1;
  222. };
  223. /**
  224. * Extends mxShape.
  225. */
  226. mxUtils.extend(mxRackF5BigIp3900, mxShape);
  227. mxRackF5BigIp3900.prototype.cst =
  228. {
  229. SHAPE_BIG_IP_3900 : 'mxgraph.rackF5Shapes.big_ip_3900'
  230. };
  231. /**
  232. * Function: paintVertexShape
  233. *
  234. * Paints the vertex shape.
  235. */
  236. mxRackF5BigIp3900.prototype.paintVertexShape = function(c, x, y, w, h)
  237. {
  238. c.translate(x, y);
  239. var hasEars = mxUtils.getValue(this.style, 'hasEars', '1');
  240. var isFront = mxUtils.getValue(this.style, 'isFront', '0');
  241. var isDC = mxUtils.getValue(this.style, 'isDC', '0');
  242. var psNum = parseInt(mxUtils.getValue(this.style, 'psNum', '2'));
  243. var stencilPath = mxUtils.getValue(this.style, 'path', 'img/lib/f5/');
  244. if (hasEars)
  245. {
  246. c.image(0, 0, w * 0.04, h, stencilPath + 'big_ip_5x00_ear.png', 0, 0, 0);
  247. c.image(w * 0.96, 0, w * 0.04, h, stencilPath + 'big_ip_5x00_ear.png', 0, 1, 0);
  248. }
  249. if (isFront)
  250. {
  251. c.image(w * 0.04, 0, w * 0.92, h, stencilPath + 'big_ip_3900_front.png', 0, 0, 0);
  252. }
  253. else
  254. {
  255. c.image(w * 0.04, 0, w * 0.92, h, stencilPath + 'big_ip_1600_back.png', 0, 0, 0);
  256. if (isDC)
  257. {
  258. if (psNum >= '1')
  259. {
  260. c.image(w * 0.425, h * 0.05, w * 0.244, h * 0.92, stencilPath + 'big_ip_4x00_dc.png', 0, 0, 0);
  261. }
  262. if (psNum >= '2')
  263. {
  264. c.image(w * 0.672, h * 0.05, w * 0.245, h * 0.92, stencilPath + 'big_ip_4x00_dc.png', 0, 0, 0);
  265. }
  266. }
  267. else
  268. {
  269. if (psNum >= '2')
  270. {
  271. c.image(w * 0.672, h * 0.05, w * 0.245, h * 0.92, stencilPath + 'big_ip_4x00_ac.png', 0, 0, 0);
  272. }
  273. }
  274. }
  275. };
  276. mxCellRenderer.registerShape(mxRackF5BigIp3900.prototype.cst.SHAPE_BIG_IP_3900, mxRackF5BigIp3900);
  277. //**********************************************************************************************************************************************************
  278. //Big-IP 4x00
  279. //**********************************************************************************************************************************************************
  280. /**
  281. * Extends mxShape.
  282. */
  283. function mxRackF5BigIp4x00(bounds, fill, stroke, strokewidth)
  284. {
  285. mxShape.call(this);
  286. this.bounds = bounds;
  287. this.fill = fill;
  288. this.stroke = stroke;
  289. this.strokewidth = (strokewidth != null) ? strokewidth : 1;
  290. };
  291. /**
  292. * Extends mxShape.
  293. */
  294. mxUtils.extend(mxRackF5BigIp4x00, mxShape);
  295. mxRackF5BigIp4x00.prototype.cst =
  296. {
  297. SHAPE_BIG_IP_4x00 : 'mxgraph.rackF5Shapes.big_ip_4x00'
  298. };
  299. /**
  300. * Function: paintVertexShape
  301. *
  302. * Paints the vertex shape.
  303. */
  304. mxRackF5BigIp4x00.prototype.paintVertexShape = function(c, x, y, w, h)
  305. {
  306. c.translate(x, y);
  307. var hasEars = mxUtils.getValue(this.style, 'hasEars', '1');
  308. var isFront = mxUtils.getValue(this.style, 'isFront', '0');
  309. var isDC = mxUtils.getValue(this.style, 'isDC', '0');
  310. var psNum = parseInt(mxUtils.getValue(this.style, 'psNum', '2'));
  311. var stencilPath = mxUtils.getValue(this.style, 'path', 'img/lib/f5/');
  312. if (hasEars)
  313. {
  314. c.image(0, 0, w * 0.04, h, stencilPath + 'big_ip_5x00_ear.png', 0, 0, 0);
  315. c.image(w * 0.96, 0, w * 0.04, h, stencilPath + 'big_ip_5x00_ear.png', 0, 1, 0);
  316. }
  317. if (isFront)
  318. {
  319. c.image(w * 0.04, 0, w * 0.92, h, stencilPath + 'big_ip_4x00_front.png', 0, 0, 0);
  320. }
  321. else
  322. {
  323. c.image(w * 0.04, 0, w * 0.92, h, stencilPath + 'big_ip_1600_back.png', 0, 0, 0);
  324. if (isDC)
  325. {
  326. if (psNum >= '1')
  327. {
  328. c.image(w * 0.425, h * 0.05, w * 0.244, h * 0.92, stencilPath + 'big_ip_4x00_dc.png', 0, 0, 0);
  329. }
  330. if (psNum >= '2')
  331. {
  332. c.image(w * 0.672, h * 0.05, w * 0.245, h * 0.92, stencilPath + 'big_ip_4x00_dc.png', 0, 0, 0);
  333. }
  334. }
  335. else
  336. {
  337. if (psNum >= '2')
  338. {
  339. c.image(w * 0.672, h * 0.05, w * 0.245, h * 0.92, stencilPath + 'big_ip_4x00_ac.png', 0, 0, 0);
  340. }
  341. }
  342. }
  343. };
  344. mxCellRenderer.registerShape(mxRackF5BigIp4x00.prototype.cst.SHAPE_BIG_IP_4x00, mxRackF5BigIp4x00);
  345. //**********************************************************************************************************************************************************
  346. //Big-IP 5x00
  347. //**********************************************************************************************************************************************************
  348. /**
  349. * Extends mxShape.
  350. */
  351. function mxRackF5BigIp5x00(bounds, fill, stroke, strokewidth)
  352. {
  353. mxShape.call(this);
  354. this.bounds = bounds;
  355. this.fill = fill;
  356. this.stroke = stroke;
  357. this.strokewidth = (strokewidth != null) ? strokewidth : 1;
  358. };
  359. /**
  360. * Extends mxShape.
  361. */
  362. mxUtils.extend(mxRackF5BigIp5x00, mxShape);
  363. mxRackF5BigIp5x00.prototype.cst =
  364. {
  365. SHAPE_BIG_IP_5x00 : 'mxgraph.rackF5Shapes.big_ip_5x00'
  366. };
  367. /**
  368. * Function: paintVertexShape
  369. *
  370. * Paints the vertex shape.
  371. */
  372. mxRackF5BigIp5x00.prototype.paintVertexShape = function(c, x, y, w, h)
  373. {
  374. c.translate(x, y);
  375. var hasEars = mxUtils.getValue(this.style, 'hasEars', '1');
  376. var isFront = mxUtils.getValue(this.style, 'isFront', '0');
  377. var isDC = mxUtils.getValue(this.style, 'isDC', '0');
  378. var psNum = parseInt(mxUtils.getValue(this.style, 'psNum', '2'));
  379. var stencilPath = mxUtils.getValue(this.style, 'path', 'img/lib/f5/');
  380. if (hasEars)
  381. {
  382. c.image(0, 0, w * 0.04, h, stencilPath + 'big_ip_5x00_ear.png', 0, 0, 0);
  383. c.image(w * 0.96, 0, w * 0.04, h, stencilPath + 'big_ip_5x00_ear.png', 0, 1, 0);
  384. }
  385. if (isFront)
  386. {
  387. c.image(w * 0.04, 0, w * 0.92, h, stencilPath + 'big_ip_5x00_front.png', 0, 0, 0);
  388. }
  389. else
  390. {
  391. c.image(w * 0.04, 0, w * 0.92, h, stencilPath + 'big_ip_1600_back.png', 0, 0, 0);
  392. if (isDC)
  393. {
  394. if (psNum >= '1')
  395. {
  396. c.image(w * 0.425, h * 0.05, w * 0.244, h * 0.92, stencilPath + 'big_ip_4x00_dc.png', 0, 0, 0);
  397. }
  398. if (psNum >= '2')
  399. {
  400. c.image(w * 0.672, h * 0.05, w * 0.245, h * 0.92, stencilPath + 'big_ip_4x00_dc.png', 0, 0, 0);
  401. }
  402. }
  403. else
  404. {
  405. if (psNum >= '2')
  406. {
  407. c.image(w * 0.672, h * 0.05, w * 0.245, h * 0.92, stencilPath + 'big_ip_4x00_ac.png', 0, 0, 0);
  408. }
  409. }
  410. }
  411. };
  412. mxCellRenderer.registerShape(mxRackF5BigIp5x00.prototype.cst.SHAPE_BIG_IP_5x00, mxRackF5BigIp5x00);
  413. //**********************************************************************************************************************************************************
  414. //EM 4000
  415. //**********************************************************************************************************************************************************
  416. /**
  417. * Extends mxShape.
  418. */
  419. function mxRackF5Em4000(bounds, fill, stroke, strokewidth)
  420. {
  421. mxShape.call(this);
  422. this.bounds = bounds;
  423. this.fill = fill;
  424. this.stroke = stroke;
  425. this.strokewidth = (strokewidth != null) ? strokewidth : 1;
  426. };
  427. /**
  428. * Extends mxShape.
  429. */
  430. mxUtils.extend(mxRackF5Em4000, mxShape);
  431. mxRackF5Em4000.prototype.cst =
  432. {
  433. SHAPE_EM_4000 : 'mxgraph.rackF5Shapes.em4000'
  434. };
  435. /**
  436. * Function: paintVertexShape
  437. *
  438. * Paints the vertex shape.
  439. */
  440. mxRackF5Em4000.prototype.paintVertexShape = function(c, x, y, w, h)
  441. {
  442. c.translate(x, y);
  443. var hasEars = mxUtils.getValue(this.style, 'hasEars', '1');
  444. var isFront = mxUtils.getValue(this.style, 'isFront', '0');
  445. var isDC = mxUtils.getValue(this.style, 'isDC', '0');
  446. var psNum = parseInt(mxUtils.getValue(this.style, 'psNum', '2'));
  447. var stencilPath = mxUtils.getValue(this.style, 'path', 'img/lib/f5/');
  448. if (hasEars)
  449. {
  450. c.image(0, 0, w * 0.04, h, stencilPath + 'big_ip_5x00_ear.png', 0, 0, 0);
  451. c.image(w * 0.96, 0, w * 0.04, h, stencilPath + 'big_ip_5x00_ear.png', 0, 1, 0);
  452. }
  453. if (isFront)
  454. {
  455. c.image(w * 0.04, 0, w * 0.92, h, stencilPath + 'em_4000_front.png', 0, 0, 0);
  456. }
  457. else
  458. {
  459. c.image(w * 0.04, 0, w * 0.92, h, stencilPath + 'big_ip_1600_back.png', 0, 0, 0);
  460. if (isDC)
  461. {
  462. if (psNum >= '1')
  463. {
  464. c.image(w * 0.425, h * 0.05, w * 0.244, h * 0.92, stencilPath + 'big_ip_4x00_dc.png', 0, 0, 0);
  465. }
  466. if (psNum >= '2')
  467. {
  468. c.image(w * 0.672, h * 0.05, w * 0.245, h * 0.92, stencilPath + 'big_ip_4x00_dc.png', 0, 0, 0);
  469. }
  470. }
  471. else
  472. {
  473. if (psNum >= '2')
  474. {
  475. c.image(w * 0.672, h * 0.05, w * 0.245, h * 0.92, stencilPath + 'big_ip_4x00_ac.png', 0, 0, 0);
  476. }
  477. }
  478. }
  479. };
  480. mxCellRenderer.registerShape(mxRackF5Em4000.prototype.cst.SHAPE_EM_4000, mxRackF5Em4000);
  481. //**********************************************************************************************************************************************************
  482. //Big-IP 6900
  483. //**********************************************************************************************************************************************************
  484. /**
  485. * Extends mxShape.
  486. */
  487. function mxRackF5BigIp6900(bounds, fill, stroke, strokewidth)
  488. {
  489. mxShape.call(this);
  490. this.bounds = bounds;
  491. this.fill = fill;
  492. this.stroke = stroke;
  493. this.strokewidth = (strokewidth != null) ? strokewidth : 1;
  494. };
  495. /**
  496. * Extends mxShape.
  497. */
  498. mxUtils.extend(mxRackF5BigIp6900, mxShape);
  499. mxRackF5BigIp6900.prototype.cst =
  500. {
  501. SHAPE_BIG_IP_6900 : 'mxgraph.rackF5Shapes.big_ip_6900'
  502. };
  503. /**
  504. * Function: paintVertexShape
  505. *
  506. * Paints the vertex shape.
  507. */
  508. mxRackF5BigIp6900.prototype.paintVertexShape = function(c, x, y, w, h)
  509. {
  510. c.translate(x, y);
  511. var hasEars = mxUtils.getValue(this.style, 'hasEars', '1');
  512. var isFront = mxUtils.getValue(this.style, 'isFront', '0');
  513. var isDC = mxUtils.getValue(this.style, 'isDC', '0');
  514. var psNum = parseInt(mxUtils.getValue(this.style, 'psNum', '2'));
  515. var stencilPath = mxUtils.getValue(this.style, 'path', 'img/lib/f5/');
  516. if (hasEars)
  517. {
  518. c.image(0, 0, w * 0.04, h, stencilPath + 'big_ip_6900_ear.png', 0, 0, 0);
  519. c.image(w * 0.96, 0, w * 0.04, h, stencilPath + 'big_ip_6900_ear.png', 0, 1, 0);
  520. }
  521. if (isFront)
  522. {
  523. c.image(w * 0.04, 0, w * 0.92, h, stencilPath + 'big_ip_6900_front.png', 0, 0, 0);
  524. }
  525. else
  526. {
  527. c.image(w * 0.04, 0, w * 0.92, h, stencilPath + 'big_ip_6900_back.png', 0, 0, 0);
  528. if (isDC)
  529. {
  530. c.image(w * 0.046, h * 0.025, w * 0.176, h * 0.48, stencilPath + 'big_ip_6900_dc.png', 0, 0, 0);
  531. c.image(w * 0.227, h * 0.025, w * 0.176, h * 0.48, stencilPath + 'big_ip_6900_dc.png', 0, 0, 0);
  532. }
  533. }
  534. };
  535. mxCellRenderer.registerShape(mxRackF5BigIp6900.prototype.cst.SHAPE_BIG_IP_6900, mxRackF5BigIp6900);
  536. //**********************************************************************************************************************************************************
  537. //Big-IP 89x0
  538. //**********************************************************************************************************************************************************
  539. /**
  540. * Extends mxShape.
  541. */
  542. function mxRackF5BigIp89x0(bounds, fill, stroke, strokewidth)
  543. {
  544. mxShape.call(this);
  545. this.bounds = bounds;
  546. this.fill = fill;
  547. this.stroke = stroke;
  548. this.strokewidth = (strokewidth != null) ? strokewidth : 1;
  549. };
  550. /**
  551. * Extends mxShape.
  552. */
  553. mxUtils.extend(mxRackF5BigIp89x0, mxShape);
  554. mxRackF5BigIp89x0.prototype.cst =
  555. {
  556. SHAPE_BIG_IP_89x0 : 'mxgraph.rackF5Shapes.big_ip_89x0'
  557. };
  558. /**
  559. * Function: paintVertexShape
  560. *
  561. * Paints the vertex shape.
  562. */
  563. mxRackF5BigIp89x0.prototype.paintVertexShape = function(c, x, y, w, h)
  564. {
  565. c.translate(x, y);
  566. var hasEars = mxUtils.getValue(this.style, 'hasEars', '1');
  567. var isFront = mxUtils.getValue(this.style, 'isFront', '0');
  568. var isDC = mxUtils.getValue(this.style, 'isDC', '0');
  569. var psNum = parseInt(mxUtils.getValue(this.style, 'psNum', '2'));
  570. var stencilPath = mxUtils.getValue(this.style, 'path', 'img/lib/f5/');
  571. if (hasEars)
  572. {
  573. c.image(0, 0, w * 0.04, h, stencilPath + 'big_ip_6900_ear.png', 0, 0, 0);
  574. c.image(w * 0.96, 0, w * 0.04, h, stencilPath + 'big_ip_6900_ear.png', 0, 1, 0);
  575. }
  576. if (isFront)
  577. {
  578. c.image(w * 0.04, 0, w * 0.92, h, stencilPath + 'big_ip_89x0_front.png', 0, 0, 0);
  579. }
  580. else
  581. {
  582. c.image(w * 0.04, 0, w * 0.92, h, stencilPath + 'big_ip_6900_back.png', 0, 0, 0);
  583. if (isDC)
  584. {
  585. c.image(w * 0.046, h * 0.025, w * 0.176, h * 0.48, stencilPath + 'big_ip_6900_dc.png', 0, 0, 0);
  586. c.image(w * 0.227, h * 0.025, w * 0.176, h * 0.48, stencilPath + 'big_ip_6900_dc.png', 0, 0, 0);
  587. }
  588. }
  589. };
  590. mxCellRenderer.registerShape(mxRackF5BigIp89x0.prototype.cst.SHAPE_BIG_IP_89x0, mxRackF5BigIp89x0);
  591. //**********************************************************************************************************************************************************
  592. //Big-IP 7x00
  593. //**********************************************************************************************************************************************************
  594. /**
  595. * Extends mxShape.
  596. */
  597. function mxRackF5BigIp7x00(bounds, fill, stroke, strokewidth)
  598. {
  599. mxShape.call(this);
  600. this.bounds = bounds;
  601. this.fill = fill;
  602. this.stroke = stroke;
  603. this.strokewidth = (strokewidth != null) ? strokewidth : 1;
  604. };
  605. /**
  606. * Extends mxShape.
  607. */
  608. mxUtils.extend(mxRackF5BigIp7x00, mxShape);
  609. mxRackF5BigIp7x00.prototype.cst =
  610. {
  611. SHAPE_BIG_IP_7x00 : 'mxgraph.rackF5Shapes.big_ip_7x00'
  612. };
  613. /**
  614. * Function: paintVertexShape
  615. *
  616. * Paints the vertex shape.
  617. */
  618. mxRackF5BigIp7x00.prototype.paintVertexShape = function(c, x, y, w, h)
  619. {
  620. c.translate(x, y);
  621. var hasEars = mxUtils.getValue(this.style, 'hasEars', '1');
  622. var isFront = mxUtils.getValue(this.style, 'isFront', '0');
  623. var isDC = mxUtils.getValue(this.style, 'isDC', '0');
  624. var psNum = parseInt(mxUtils.getValue(this.style, 'psNum', '2'));
  625. var stencilPath = mxUtils.getValue(this.style, 'path', 'img/lib/f5/');
  626. if (hasEars)
  627. {
  628. c.image(0, 0, w * 0.04, h, stencilPath + 'big_ip_6900_ear.png', 0, 0, 0);
  629. c.image(w * 0.96, 0, w * 0.04, h, stencilPath + 'big_ip_6900_ear.png', 0, 1, 0);
  630. }
  631. if (isFront)
  632. {
  633. c.image(w * 0.04, 0, w * 0.92, h, stencilPath + 'big_ip_7x00_front.png', 0, 0, 0);
  634. }
  635. else
  636. {
  637. c.image(w * 0.04, 0, w * 0.92, h, stencilPath + 'big_ip_6900_back.png', 0, 0, 0);
  638. if (isDC)
  639. {
  640. c.image(w * 0.046, h * 0.025, w * 0.176, h * 0.48, stencilPath + 'big_ip_6900_dc.png', 0, 0, 0);
  641. c.image(w * 0.227, h * 0.025, w * 0.176, h * 0.48, stencilPath + 'big_ip_6900_dc.png', 0, 0, 0);
  642. }
  643. }
  644. };
  645. mxCellRenderer.registerShape(mxRackF5BigIp7x00.prototype.cst.SHAPE_BIG_IP_7x00, mxRackF5BigIp7x00);
  646. //**********************************************************************************************************************************************************
  647. //Big-IP 10x00
  648. //**********************************************************************************************************************************************************
  649. /**
  650. * Extends mxShape.
  651. */
  652. function mxRackF5BigIp10x00(bounds, fill, stroke, strokewidth)
  653. {
  654. mxShape.call(this);
  655. this.bounds = bounds;
  656. this.fill = fill;
  657. this.stroke = stroke;
  658. this.strokewidth = (strokewidth != null) ? strokewidth : 1;
  659. };
  660. /**
  661. * Extends mxShape.
  662. */
  663. mxUtils.extend(mxRackF5BigIp10x00, mxShape);
  664. mxRackF5BigIp10x00.prototype.cst =
  665. {
  666. SHAPE_BIG_IP_10x00 : 'mxgraph.rackF5Shapes.big_ip_10x00'
  667. };
  668. /**
  669. * Function: paintVertexShape
  670. *
  671. * Paints the vertex shape.
  672. */
  673. mxRackF5BigIp10x00.prototype.paintVertexShape = function(c, x, y, w, h)
  674. {
  675. c.translate(x, y);
  676. var hasEars = mxUtils.getValue(this.style, 'hasEars', '1');
  677. var isFront = mxUtils.getValue(this.style, 'isFront', '0');
  678. var isDC = mxUtils.getValue(this.style, 'isDC', '0');
  679. var psNum = parseInt(mxUtils.getValue(this.style, 'psNum', '2'));
  680. var stencilPath = mxUtils.getValue(this.style, 'path', 'img/lib/f5/');
  681. if (hasEars)
  682. {
  683. c.image(0, 0, w * 0.04, h, stencilPath + 'big_ip_6900_ear.png', 0, 0, 0);
  684. c.image(w * 0.96, 0, w * 0.04, h, stencilPath + 'big_ip_6900_ear.png', 0, 1, 0);
  685. }
  686. if (isFront)
  687. {
  688. c.image(w * 0.04, 0, w * 0.92, h, stencilPath + 'big_ip_10x00_front.png', 0, 0, 0);
  689. }
  690. else
  691. {
  692. c.image(w * 0.04, 0, w * 0.92, h, stencilPath + 'big_ip_6900_back.png', 0, 0, 0);
  693. if (isDC)
  694. {
  695. c.image(w * 0.046, h * 0.025, w * 0.176, h * 0.48, stencilPath + 'big_ip_6900_dc.png', 0, 0, 0);
  696. c.image(w * 0.227, h * 0.025, w * 0.176, h * 0.48, stencilPath + 'big_ip_6900_dc.png', 0, 0, 0);
  697. }
  698. }
  699. };
  700. mxCellRenderer.registerShape(mxRackF5BigIp10x00.prototype.cst.SHAPE_BIG_IP_10x00, mxRackF5BigIp10x00);
  701. //**********************************************************************************************************************************************************
  702. //Big-IP 110x0
  703. //**********************************************************************************************************************************************************
  704. /**
  705. * Extends mxShape.
  706. */
  707. function mxRackF5BigIp110x0(bounds, fill, stroke, strokewidth)
  708. {
  709. mxShape.call(this);
  710. this.bounds = bounds;
  711. this.fill = fill;
  712. this.stroke = stroke;
  713. this.strokewidth = (strokewidth != null) ? strokewidth : 1;
  714. };
  715. /**
  716. * Extends mxShape.
  717. */
  718. mxUtils.extend(mxRackF5BigIp110x0, mxShape);
  719. mxRackF5BigIp110x0.prototype.cst =
  720. {
  721. SHAPE_BIG_IP_110x0 : 'mxgraph.rackF5Shapes.big_ip_110x0'
  722. };
  723. /**
  724. * Function: paintVertexShape
  725. *
  726. * Paints the vertex shape.
  727. */
  728. mxRackF5BigIp110x0.prototype.paintVertexShape = function(c, x, y, w, h)
  729. {
  730. c.translate(x, y);
  731. var hasEars = mxUtils.getValue(this.style, 'hasEars', '1');
  732. var isFront = mxUtils.getValue(this.style, 'isFront', '0');
  733. var isDC = mxUtils.getValue(this.style, 'isDC', '0');
  734. var psNum = parseInt(mxUtils.getValue(this.style, 'psNum', '2'));
  735. var stencilPath = mxUtils.getValue(this.style, 'path', 'img/lib/f5/');
  736. if (hasEars)
  737. {
  738. c.image(0, h * 0.33, w * 0.04, h * 0.67, stencilPath + 'big_ip_6900_ear.png', 0, 0, 0);
  739. c.image(w * 0.96, h * 0.33, w * 0.04, h * 0.67, stencilPath + 'big_ip_6900_ear.png', 0, 1, 0);
  740. }
  741. if (isFront)
  742. {
  743. c.image(w * 0.04, 0, w * 0.92, h, stencilPath + 'big_ip_110x0_front.png', 0, 0, 0);
  744. }
  745. else
  746. {
  747. c.image(w * 0.04, 0, w * 0.92, h, stencilPath + 'big_ip_110x0_back.png', 0, 0, 0);
  748. if (isDC)
  749. {
  750. c.image(w * 0.085, h * 0.025, w * 0.177, h * 0.31, stencilPath + 'big_ip_6900_dc.png', 0, 0, 0);
  751. c.image(w * 0.271, h * 0.025, w * 0.179, h * 0.31, stencilPath + 'big_ip_6900_dc.png', 0, 0, 0);
  752. }
  753. }
  754. };
  755. mxCellRenderer.registerShape(mxRackF5BigIp110x0.prototype.cst.SHAPE_BIG_IP_110x0, mxRackF5BigIp110x0);
  756. //**********************************************************************************************************************************************************
  757. //Viprion 2400
  758. //**********************************************************************************************************************************************************
  759. /**
  760. * Extends mxShape.
  761. */
  762. function mxRackF5Viprion2400(bounds, fill, stroke, strokewidth)
  763. {
  764. mxShape.call(this);
  765. this.bounds = bounds;
  766. this.fill = fill;
  767. this.stroke = stroke;
  768. this.strokewidth = (strokewidth != null) ? strokewidth : 1;
  769. };
  770. /**
  771. * Extends mxShape.
  772. */
  773. mxUtils.extend(mxRackF5Viprion2400, mxShape);
  774. mxRackF5Viprion2400.prototype.cst =
  775. {
  776. SHAPE_VIPRION_2400 : 'mxgraph.rackF5Shapes.viprion_2400'
  777. };
  778. /**
  779. * Function: paintVertexShape
  780. *
  781. * Paints the vertex shape.
  782. */
  783. mxRackF5Viprion2400.prototype.paintVertexShape = function(c, x, y, w, h)
  784. {
  785. c.translate(x, y);
  786. var hasEars = mxUtils.getValue(this.style, 'hasEars', '1');
  787. var isFront = mxUtils.getValue(this.style, 'isFront', '0');
  788. var isDC = mxUtils.getValue(this.style, 'isDC', '0');
  789. var bladeNum = parseInt(mxUtils.getValue(this.style, 'bladeNum', '4'));
  790. var stencilPath = mxUtils.getValue(this.style, 'path', 'img/lib/f5/');
  791. if (hasEars)
  792. {
  793. c.image(0, 0, w * 0.04, h, stencilPath + 'viprion_2400_ear.png', 0, 0, 0);
  794. c.image(w * 0.96, 0, w * 0.04, h, stencilPath + 'viprion_2400_ear.png', 0, 1, 0);
  795. }
  796. if (isFront)
  797. {
  798. c.image(w * 0.04, 0, w * 0.92, h, stencilPath + 'viprion_2400_front.png', 0, 0, 0);
  799. if (isDC)
  800. {
  801. c.image(w * 0.178, h * 0.025, w * 0.301, h * 0.273, stencilPath + 'viprion_2400_dc.png', 0, 0, 0);
  802. c.image(w * 0.52, h * 0.025, w * 0.301, h * 0.273, stencilPath + 'viprion_2400_dc.png', 0, 0, 0);
  803. }
  804. if (bladeNum >= 1)
  805. {
  806. c.image(w * 0.052, h * 0.337, w * 0.45, h * 0.29, stencilPath + 'viprion_2400_blade.png', 0, 0, 0);
  807. }
  808. if (bladeNum >= 2)
  809. {
  810. c.image(w * 0.495, h * 0.337, w * 0.45, h * 0.29, stencilPath + 'viprion_2400_blade.png', 0, 0, 0);
  811. }
  812. if (bladeNum >= 3)
  813. {
  814. c.image(w * 0.052, h * 0.655, w * 0.45, h * 0.29, stencilPath + 'viprion_2400_blade.png', 0, 0, 0);
  815. }
  816. if (bladeNum >= 4)
  817. {
  818. c.image(w * 0.495, h * 0.655, w * 0.45, h * 0.29, stencilPath + 'viprion_2400_blade.png', 0, 0, 0);
  819. }
  820. }
  821. else
  822. {
  823. c.image(w * 0.04, 0, w * 0.92, h, stencilPath + 'viprion_2400_back.png', 0, 0, 0);
  824. }
  825. };
  826. mxCellRenderer.registerShape(mxRackF5Viprion2400.prototype.cst.SHAPE_VIPRION_2400, mxRackF5Viprion2400);
  827. //**********************************************************************************************************************************************************
  828. //Viprion 4400
  829. //**********************************************************************************************************************************************************
  830. /**
  831. * Extends mxShape.
  832. */
  833. function mxRackF5Viprion4400(bounds, fill, stroke, strokewidth)
  834. {
  835. mxShape.call(this);
  836. this.bounds = bounds;
  837. this.fill = fill;
  838. this.stroke = stroke;
  839. this.strokewidth = (strokewidth != null) ? strokewidth : 1;
  840. };
  841. /**
  842. * Extends mxShape.
  843. */
  844. mxUtils.extend(mxRackF5Viprion4400, mxShape);
  845. mxRackF5Viprion4400.prototype.cst =
  846. {
  847. SHAPE_VIPRION_4400 : 'mxgraph.rackF5Shapes.viprion_4400'
  848. };
  849. /**
  850. * Function: paintVertexShape
  851. *
  852. * Paints the vertex shape.
  853. */
  854. mxRackF5Viprion4400.prototype.paintVertexShape = function(c, x, y, w, h)
  855. {
  856. c.translate(x, y);
  857. var hasEars = mxUtils.getValue(this.style, 'hasEars', '1');
  858. var hasMask = mxUtils.getValue(this.style, 'hasMask', '1');
  859. var isFront = mxUtils.getValue(this.style, 'isFront', '0');
  860. var bladeType = mxUtils.getValue(this.style, 'bladeType', '0');
  861. var isDC = mxUtils.getValue(this.style, 'isDC', '0');
  862. var bladeNum = parseInt(mxUtils.getValue(this.style, 'bladeNum', '0'));
  863. var stencilPath = mxUtils.getValue(this.style, 'path', 'img/lib/f5/');
  864. if (hasEars)
  865. {
  866. c.image(0, 0, w * 0.04, h, stencilPath + 'viprion_4400_ear.png', 0, 0, 0);
  867. c.image(w * 0.96, 0, w * 0.04, h, stencilPath + 'viprion_4400_ear.png', 0, 1, 0);
  868. }
  869. if (isFront)
  870. {
  871. c.image(w * 0.04, 0, w * 0.92, h, stencilPath + 'viprion_4400_front_chassis.png', 0, 0, 0);
  872. if (hasMask)
  873. {
  874. c.image(w * 0.033, h * 0.005, w * 0.934, h * 0.282, stencilPath + 'viprion_4400_front.png', 0, 0, 0);
  875. }
  876. var bladeStr = stencilPath + 'viprion_4400_pb100_blade.png';
  877. if (bladeType == 1)
  878. {
  879. bladeStr = stencilPath + 'viprion_4400_pb200_blade.png';
  880. }
  881. else if (bladeType == 2)
  882. {
  883. bladeStr = stencilPath + 'viprion_4400_b4300_blade.png';
  884. }
  885. if (bladeNum >= 1)
  886. {
  887. c.image(w * 0.182, h * 0.3, w * 0.74, h * 0.145, bladeStr, 0, 0, 0);
  888. }
  889. if (bladeNum >= 2)
  890. {
  891. c.image(w * 0.182, h * 0.462, w * 0.74, h * 0.145, bladeStr, 0, 0, 0);
  892. }
  893. if (bladeNum >= 3)
  894. {
  895. c.image(w * 0.182, h * 0.625, w * 0.74, h * 0.145, bladeStr, 0, 0, 0);
  896. }
  897. if (bladeNum >= 4)
  898. {
  899. c.image(w * 0.182, h * 0.788, w * 0.74, h * 0.145, bladeStr, 0, 0, 0);
  900. }
  901. }
  902. else
  903. {
  904. if (isDC)
  905. {
  906. c.image(w * 0.04, 0, w * 0.92, h, stencilPath + 'viprion_4400_back_dc.png', 0, 0, 0);
  907. }
  908. else
  909. {
  910. c.image(w * 0.04, 0, w * 0.92, h, stencilPath + 'viprion_4400_back_ac.png', 0, 0, 0);
  911. }
  912. }
  913. };
  914. mxCellRenderer.registerShape(mxRackF5Viprion4400.prototype.cst.SHAPE_VIPRION_4400, mxRackF5Viprion4400);
  915. //**********************************************************************************************************************************************************
  916. //Viprion 4800
  917. //**********************************************************************************************************************************************************
  918. /**
  919. * Extends mxShape.
  920. */
  921. function mxRackF5Viprion4800(bounds, fill, stroke, strokewidth)
  922. {
  923. mxShape.call(this);
  924. this.bounds = bounds;
  925. this.fill = fill;
  926. this.stroke = stroke;
  927. this.strokewidth = (strokewidth != null) ? strokewidth : 1;
  928. };
  929. /**
  930. * Extends mxShape.
  931. */
  932. mxUtils.extend(mxRackF5Viprion4800, mxShape);
  933. mxRackF5Viprion4800.prototype.cst =
  934. {
  935. SHAPE_VIPRION_4800 : 'mxgraph.rackF5Shapes.viprion_4800'
  936. };
  937. /**
  938. * Function: paintVertexShape
  939. *
  940. * Paints the vertex shape.
  941. */
  942. mxRackF5Viprion4800.prototype.paintVertexShape = function(c, x, y, w, h)
  943. {
  944. c.translate(x, y);
  945. var hasEars = mxUtils.getValue(this.style, 'hasEars', '1');
  946. var isFront = mxUtils.getValue(this.style, 'isFront', '0');
  947. var bladeNum = parseInt(mxUtils.getValue(this.style, 'bladeNum', '0'));
  948. var stencilPath = mxUtils.getValue(this.style, 'path', 'img/lib/f5/');
  949. if (hasEars)
  950. {
  951. c.image(0, h * 0.09, w * 0.04, h * 0.8, stencilPath + 'viprion_4800_ear.png', 0, 0, 0);
  952. c.image(w * 0.96, h * 0.09, w * 0.04, h * 0.8, stencilPath + 'viprion_4800_ear.png', 0, 1, 0);
  953. }
  954. if (isFront)
  955. {
  956. c.image(w * 0.04, 0, w * 0.92, h, stencilPath + 'viprion_4800_front.png', 0, 0, 0);
  957. if (bladeNum >= 1)
  958. {
  959. c.image(w * 0.075, h * 0.245, w * 0.104, h * 0.516, stencilPath + 'viprion_4800_blade.png', 0, 0, 0);
  960. }
  961. if (bladeNum >= 2)
  962. {
  963. c.image(w * 0.182, h * 0.245, w * 0.104, h * 0.516, stencilPath + 'viprion_4800_blade.png', 0, 0, 0);
  964. }
  965. if (bladeNum >= 3)
  966. {
  967. c.image(w * 0.289, h * 0.245, w * 0.104, h * 0.516, stencilPath + 'viprion_4800_blade.png', 0, 0, 0);
  968. }
  969. if (bladeNum >= 4)
  970. {
  971. c.image(w * 0.396, h * 0.245, w * 0.104, h * 0.516, stencilPath + 'viprion_4800_blade.png', 0, 0, 0);
  972. }
  973. if (bladeNum >= 5)
  974. {
  975. c.image(w * 0.503, h * 0.245, w * 0.104, h * 0.516, stencilPath + 'viprion_4800_blade.png', 0, 0, 0);
  976. }
  977. if (bladeNum >= 6)
  978. {
  979. c.image(w * 0.61, h * 0.245, w * 0.104, h * 0.516, stencilPath + 'viprion_4800_blade.png', 0, 0, 0);
  980. }
  981. if (bladeNum >= 7)
  982. {
  983. c.image(w * 0.717, h * 0.245, w * 0.104, h * 0.516, stencilPath + 'viprion_4800_blade.png', 0, 0, 0);
  984. }
  985. if (bladeNum >= 8)
  986. {
  987. c.image(w * 0.824, h * 0.245, w * 0.104, h * 0.516, stencilPath + 'viprion_4800_blade.png', 0, 0, 0);
  988. }
  989. }
  990. else
  991. {
  992. c.image(w * 0.04, 0, w * 0.92, h, stencilPath + 'viprion_4800_back.png', 0, 0, 0);
  993. }
  994. };
  995. mxCellRenderer.registerShape(mxRackF5Viprion4800.prototype.cst.SHAPE_VIPRION_4800, mxRackF5Viprion4800);
  996. //**********************************************************************************************************************************************************
  997. //Big-IP i2000
  998. //**********************************************************************************************************************************************************
  999. /**
  1000. * Extends mxShape.
  1001. */
  1002. function mxRackF5BigIpi2000(bounds, fill, stroke, strokewidth)
  1003. {
  1004. mxShape.call(this);
  1005. this.bounds = bounds;
  1006. this.fill = fill;
  1007. this.stroke = stroke;
  1008. this.strokewidth = (strokewidth != null) ? strokewidth : 1;
  1009. };
  1010. /**
  1011. * Extends mxShape.
  1012. */
  1013. mxUtils.extend(mxRackF5BigIpi2000, mxShape);
  1014. mxRackF5BigIpi2000.prototype.cst =
  1015. {
  1016. SHAPE_BIG_IP_I2000 : 'mxgraph.rackF5Shapes.big_ip_i2000'
  1017. };
  1018. /**
  1019. * Function: paintVertexShape
  1020. *
  1021. * Paints the vertex shape.
  1022. */
  1023. mxRackF5BigIpi2000.prototype.paintVertexShape = function(c, x, y, w, h)
  1024. {
  1025. c.translate(x, y);
  1026. var hasEars = mxUtils.getValue(this.style, 'hasEars', '1');
  1027. var isFront = mxUtils.getValue(this.style, 'isFront', '0');
  1028. var isDC = mxUtils.getValue(this.style, 'isDC', '0');
  1029. var psNum = parseInt(mxUtils.getValue(this.style, 'psNum', '2'));
  1030. var stencilPath = mxUtils.getValue(this.style, 'path', 'img/lib/f5/');
  1031. if (hasEars)
  1032. {
  1033. c.image(0, 0, w * 0.04, h, stencilPath + 'big_ip_5x00_ear.png', 0, 0, 0);
  1034. c.image(w * 0.96, 0, w * 0.04, h, stencilPath + 'big_ip_5x00_ear.png', 0, 1, 0);
  1035. }
  1036. if (isFront)
  1037. {
  1038. c.image(w * 0.04, 0, w * 0.92, h, stencilPath + 'big_ip_i2000_front.png', 0, 0, 0);
  1039. }
  1040. else
  1041. {
  1042. c.image(w * 0.04, 0, w * 0.92, h, stencilPath + 'big_ip_1600_back.png', 0, 0, 0);
  1043. if (isDC)
  1044. {
  1045. if (psNum >= '1')
  1046. {
  1047. c.image(w * 0.425, h * 0.05, w * 0.244, h * 0.92, stencilPath + 'big_ip_4x00_dc.png', 0, 0, 0);
  1048. }
  1049. if (psNum >= '2')
  1050. {
  1051. c.image(w * 0.672, h * 0.05, w * 0.245, h * 0.92, stencilPath + 'big_ip_4x00_dc.png', 0, 0, 0);
  1052. }
  1053. }
  1054. else
  1055. {
  1056. if (psNum >= '2')
  1057. {
  1058. c.image(w * 0.672, h * 0.05, w * 0.245, h * 0.92, stencilPath + 'big_ip_4x00_ac.png', 0, 0, 0);
  1059. }
  1060. }
  1061. }
  1062. };
  1063. mxCellRenderer.registerShape(mxRackF5BigIpi2000.prototype.cst.SHAPE_BIG_IP_I2000, mxRackF5BigIpi2000);
  1064. //**********************************************************************************************************************************************************
  1065. //Big-IP i4000
  1066. //**********************************************************************************************************************************************************
  1067. /**
  1068. * Extends mxShape.
  1069. */
  1070. function mxRackF5BigIpi4000(bounds, fill, stroke, strokewidth)
  1071. {
  1072. mxShape.call(this);
  1073. this.bounds = bounds;
  1074. this.fill = fill;
  1075. this.stroke = stroke;
  1076. this.strokewidth = (strokewidth != null) ? strokewidth : 1;
  1077. };
  1078. /**
  1079. * Extends mxShape.
  1080. */
  1081. mxUtils.extend(mxRackF5BigIpi4000, mxShape);
  1082. mxRackF5BigIpi4000.prototype.cst =
  1083. {
  1084. SHAPE_BIG_IP_I4000 : 'mxgraph.rackF5Shapes.big_ip_i4000'
  1085. };
  1086. /**
  1087. * Function: paintVertexShape
  1088. *
  1089. * Paints the vertex shape.
  1090. */
  1091. mxRackF5BigIpi4000.prototype.paintVertexShape = function(c, x, y, w, h)
  1092. {
  1093. c.translate(x, y);
  1094. var hasEars = mxUtils.getValue(this.style, 'hasEars', '1');
  1095. var isFront = mxUtils.getValue(this.style, 'isFront', '0');
  1096. var isDC = mxUtils.getValue(this.style, 'isDC', '0');
  1097. var psNum = parseInt(mxUtils.getValue(this.style, 'psNum', '2'));
  1098. var stencilPath = mxUtils.getValue(this.style, 'path', 'img/lib/f5/');
  1099. if (hasEars)
  1100. {
  1101. c.image(0, 0, w * 0.04, h, stencilPath + 'big_ip_5x00_ear.png', 0, 0, 0);
  1102. c.image(w * 0.96, 0, w * 0.04, h, stencilPath + 'big_ip_5x00_ear.png', 0, 1, 0);
  1103. }
  1104. if (isFront)
  1105. {
  1106. c.image(w * 0.04, 0, w * 0.92, h, stencilPath + 'big_ip_i4000_front.png', 0, 0, 0);
  1107. }
  1108. else
  1109. {
  1110. c.image(w * 0.04, 0, w * 0.92, h, stencilPath + 'big_ip_1600_back.png', 0, 0, 0);
  1111. if (isDC)
  1112. {
  1113. if (psNum >= '1')
  1114. {
  1115. c.image(w * 0.425, h * 0.05, w * 0.244, h * 0.92, stencilPath + 'big_ip_4x00_dc.png', 0, 0, 0);
  1116. }
  1117. if (psNum >= '2')
  1118. {
  1119. c.image(w * 0.672, h * 0.05, w * 0.245, h * 0.92, stencilPath + 'big_ip_4x00_dc.png', 0, 0, 0);
  1120. }
  1121. }
  1122. else
  1123. {
  1124. if (psNum >= '2')
  1125. {
  1126. c.image(w * 0.672, h * 0.05, w * 0.245, h * 0.92, stencilPath + 'big_ip_4x00_ac.png', 0, 0, 0);
  1127. }
  1128. }
  1129. }
  1130. };
  1131. mxCellRenderer.registerShape(mxRackF5BigIpi4000.prototype.cst.SHAPE_BIG_IP_I4000, mxRackF5BigIpi4000);
  1132. //**********************************************************************************************************************************************************
  1133. //Big-IP i5000
  1134. //**********************************************************************************************************************************************************
  1135. /**
  1136. * Extends mxShape.
  1137. */
  1138. function mxRackF5BigIpi5000(bounds, fill, stroke, strokewidth)
  1139. {
  1140. mxShape.call(this);
  1141. this.bounds = bounds;
  1142. this.fill = fill;
  1143. this.stroke = stroke;
  1144. this.strokewidth = (strokewidth != null) ? strokewidth : 1;
  1145. };
  1146. /**
  1147. * Extends mxShape.
  1148. */
  1149. mxUtils.extend(mxRackF5BigIpi5000, mxShape);
  1150. mxRackF5BigIpi5000.prototype.cst =
  1151. {
  1152. SHAPE_BIG_IP_I5000 : 'mxgraph.rackF5Shapes.big_ip_i5000'
  1153. };
  1154. /**
  1155. * Function: paintVertexShape
  1156. *
  1157. * Paints the vertex shape.
  1158. */
  1159. mxRackF5BigIpi5000.prototype.paintVertexShape = function(c, x, y, w, h)
  1160. {
  1161. c.translate(x, y);
  1162. var hasEars = mxUtils.getValue(this.style, 'hasEars', '1');
  1163. var isFront = mxUtils.getValue(this.style, 'isFront', '0');
  1164. var isDC = mxUtils.getValue(this.style, 'isDC', '0');
  1165. var psNum = parseInt(mxUtils.getValue(this.style, 'psNum', '2'));
  1166. var stencilPath = mxUtils.getValue(this.style, 'path', 'img/lib/f5/');
  1167. if (hasEars)
  1168. {
  1169. c.image(0, 0, w * 0.04, h, stencilPath + 'big_ip_5x00_ear.png', 0, 0, 0);
  1170. c.image(w * 0.96, 0, w * 0.04, h, stencilPath + 'big_ip_5x00_ear.png', 0, 1, 0);
  1171. }
  1172. if (isFront)
  1173. {
  1174. c.image(w * 0.04, 0, w * 0.92, h, stencilPath + 'big_ip_i5000_front.png', 0, 0, 0);
  1175. }
  1176. else
  1177. {
  1178. c.image(w * 0.04, 0, w * 0.92, h, stencilPath + 'big_ip_1600_back.png', 0, 0, 0);
  1179. if (isDC)
  1180. {
  1181. if (psNum >= '1')
  1182. {
  1183. c.image(w * 0.425, h * 0.05, w * 0.244, h * 0.92, stencilPath + 'big_ip_4x00_dc.png', 0, 0, 0);
  1184. }
  1185. if (psNum >= '2')
  1186. {
  1187. c.image(w * 0.672, h * 0.05, w * 0.245, h * 0.92, stencilPath + 'big_ip_4x00_dc.png', 0, 0, 0);
  1188. }
  1189. }
  1190. else
  1191. {
  1192. if (psNum >= '2')
  1193. {
  1194. c.image(w * 0.672, h * 0.05, w * 0.245, h * 0.92, stencilPath + 'big_ip_4x00_ac.png', 0, 0, 0);
  1195. }
  1196. }
  1197. }
  1198. };
  1199. mxCellRenderer.registerShape(mxRackF5BigIpi5000.prototype.cst.SHAPE_BIG_IP_I5000, mxRackF5BigIpi5000);
  1200. //**********************************************************************************************************************************************************
  1201. //Big-IP i7000
  1202. //**********************************************************************************************************************************************************
  1203. /**
  1204. * Extends mxShape.
  1205. */
  1206. function mxRackF5BigIpi7000(bounds, fill, stroke, strokewidth)
  1207. {
  1208. mxShape.call(this);
  1209. this.bounds = bounds;
  1210. this.fill = fill;
  1211. this.stroke = stroke;
  1212. this.strokewidth = (strokewidth != null) ? strokewidth : 1;
  1213. };
  1214. /**
  1215. * Extends mxShape.
  1216. */
  1217. mxUtils.extend(mxRackF5BigIpi7000, mxShape);
  1218. mxRackF5BigIpi7000.prototype.cst =
  1219. {
  1220. SHAPE_BIG_IP_I7000 : 'mxgraph.rackF5Shapes.big_ip_i7000'
  1221. };
  1222. /**
  1223. * Function: paintVertexShape
  1224. *
  1225. * Paints the vertex shape.
  1226. */
  1227. mxRackF5BigIpi7000.prototype.paintVertexShape = function(c, x, y, w, h)
  1228. {
  1229. c.translate(x, y);
  1230. var hasEars = mxUtils.getValue(this.style, 'hasEars', '1');
  1231. var isFront = mxUtils.getValue(this.style, 'isFront', '0');
  1232. var isDC = mxUtils.getValue(this.style, 'isDC', '0');
  1233. var psNum = parseInt(mxUtils.getValue(this.style, 'psNum', '2'));
  1234. var stencilPath = mxUtils.getValue(this.style, 'path', 'img/lib/f5/');
  1235. if (hasEars)
  1236. {
  1237. c.image(0, 0, w * 0.04, h, stencilPath + 'big_ip_5x00_ear.png', 0, 0, 0);
  1238. c.image(w * 0.96, 0, w * 0.04, h, stencilPath + 'big_ip_5x00_ear.png', 0, 1, 0);
  1239. }
  1240. if (isFront)
  1241. {
  1242. c.image(w * 0.04, 0, w * 0.92, h, stencilPath + 'big_ip_i7000_front.png', 0, 0, 0);
  1243. }
  1244. else
  1245. {
  1246. c.image(w * 0.04, 0, w * 0.92, h, stencilPath + 'big_ip_1600_back.png', 0, 0, 0);
  1247. if (isDC)
  1248. {
  1249. if (psNum >= '1')
  1250. {
  1251. c.image(w * 0.425, h * 0.05, w * 0.244, h * 0.92, stencilPath + 'big_ip_4x00_dc.png', 0, 0, 0);
  1252. }
  1253. if (psNum >= '2')
  1254. {
  1255. c.image(w * 0.672, h * 0.05, w * 0.245, h * 0.92, stencilPath + 'big_ip_4x00_dc.png', 0, 0, 0);
  1256. }
  1257. }
  1258. else
  1259. {
  1260. if (psNum >= '2')
  1261. {
  1262. c.image(w * 0.672, h * 0.05, w * 0.245, h * 0.92, stencilPath + 'big_ip_4x00_ac.png', 0, 0, 0);
  1263. }
  1264. }
  1265. }
  1266. };
  1267. mxCellRenderer.registerShape(mxRackF5BigIpi7000.prototype.cst.SHAPE_BIG_IP_I7000, mxRackF5BigIpi7000);
  1268. //**********************************************************************************************************************************************************
  1269. //Big-IP i10000
  1270. //**********************************************************************************************************************************************************
  1271. /**
  1272. * Extends mxShape.
  1273. */
  1274. function mxRackF5BigIpi10000(bounds, fill, stroke, strokewidth)
  1275. {
  1276. mxShape.call(this);
  1277. this.bounds = bounds;
  1278. this.fill = fill;
  1279. this.stroke = stroke;
  1280. this.strokewidth = (strokewidth != null) ? strokewidth : 1;
  1281. };
  1282. /**
  1283. * Extends mxShape.
  1284. */
  1285. mxUtils.extend(mxRackF5BigIpi10000, mxShape);
  1286. mxRackF5BigIpi10000.prototype.cst =
  1287. {
  1288. SHAPE_BIG_IP_I10000 : 'mxgraph.rackF5Shapes.big_ip_i10000'
  1289. };
  1290. /**
  1291. * Function: paintVertexShape
  1292. *
  1293. * Paints the vertex shape.
  1294. */
  1295. mxRackF5BigIpi10000.prototype.paintVertexShape = function(c, x, y, w, h)
  1296. {
  1297. c.translate(x, y);
  1298. var hasEars = mxUtils.getValue(this.style, 'hasEars', '1');
  1299. var isFront = mxUtils.getValue(this.style, 'isFront', '0');
  1300. var isDC = mxUtils.getValue(this.style, 'isDC', '0');
  1301. var psNum = parseInt(mxUtils.getValue(this.style, 'psNum', '2'));
  1302. var stencilPath = mxUtils.getValue(this.style, 'path', 'img/lib/f5/');
  1303. if (hasEars)
  1304. {
  1305. c.image(0, 0, w * 0.04, h, stencilPath + 'big_ip_5x00_ear.png', 0, 0, 0);
  1306. c.image(w * 0.96, 0, w * 0.04, h, stencilPath + 'big_ip_5x00_ear.png', 0, 1, 0);
  1307. }
  1308. if (isFront)
  1309. {
  1310. c.image(w * 0.04, 0, w * 0.92, h, stencilPath + 'big_ip_i10000_front.png', 0, 0, 0);
  1311. }
  1312. else
  1313. {
  1314. c.image(w * 0.04, 0, w * 0.92, h, stencilPath + 'big_ip_1600_back.png', 0, 0, 0);
  1315. if (isDC)
  1316. {
  1317. if (psNum >= '1')
  1318. {
  1319. c.image(w * 0.425, h * 0.05, w * 0.244, h * 0.92, stencilPath + 'big_ip_4x00_dc.png', 0, 0, 0);
  1320. }
  1321. if (psNum >= '2')
  1322. {
  1323. c.image(w * 0.672, h * 0.05, w * 0.245, h * 0.92, stencilPath + 'big_ip_4x00_dc.png', 0, 0, 0);
  1324. }
  1325. }
  1326. else
  1327. {
  1328. if (psNum >= '2')
  1329. {
  1330. c.image(w * 0.672, h * 0.05, w * 0.245, h * 0.92, stencilPath + 'big_ip_4x00_ac.png', 0, 0, 0);
  1331. }
  1332. }
  1333. }
  1334. };
  1335. mxCellRenderer.registerShape(mxRackF5BigIpi10000.prototype.cst.SHAPE_BIG_IP_I10000, mxRackF5BigIpi10000);
  1336. /**
  1337. * Order is relevant. Do not move to start of file!
  1338. */
  1339. Draw.loadPlugin(function(ui)
  1340. {
  1341. // Avoids having to bind all functions to "this"
  1342. var sb = ui.sidebar;
  1343. // Skips adding sidebar entries in lightbox
  1344. if (sb == null)
  1345. {
  1346. return;
  1347. }
  1348. var stencilPath = "path=https://jgraph.github.io/drawio-libs/libs/f5/;";
  1349. // Default tags
  1350. var dt = 'rack f5 network ';
  1351. var fns = [
  1352. sb.createVertexTemplateEntry(stencilPath + 'shape=mxgraph.rackF5Shapes.big_ip_1600;hasEars=0;isFront=1;isDC=0;psNum=1;',
  1353. 168, 16, '', 'Big-IP 1600', null, null, dt + 'big ip 1600'),
  1354. sb.createVertexTemplateEntry(stencilPath + 'shape=mxgraph.rackF5Shapes.big_ip_1600;hasEars=1;isFront=0;isDC=1;psNum=2;',
  1355. 168, 16, '', 'Big-IP 1600', null, null, dt + 'big ip 1600'),
  1356. sb.createVertexTemplateEntry(stencilPath + 'shape=mxgraph.rackF5Shapes.big_ip_2x00;hasEars=0;isFront=1;isDC=0;psNum=1;',
  1357. 168, 16, '', 'Big-IP 2x00', null, null, dt + 'big ip 2x00'),
  1358. sb.createVertexTemplateEntry(stencilPath + 'shape=mxgraph.rackF5Shapes.big_ip_2x00;hasEars=1;isFront=0;isDC=1;psNum=2;',
  1359. 168, 16, '', 'Big-IP 2x00', null, null, dt + 'big ip 2x00'),
  1360. sb.createVertexTemplateEntry(stencilPath + 'shape=mxgraph.rackF5Shapes.big_ip_3600;hasEars=0;isFront=1;isDC=0;psNum=1;',
  1361. 168, 16, '', 'Big-IP 3600', null, null, dt + 'big ip 3600'),
  1362. sb.createVertexTemplateEntry(stencilPath + 'shape=mxgraph.rackF5Shapes.big_ip_3600;hasEars=1;isFront=0;isDC=1;psNum=2;',
  1363. 168, 16, '', 'Big-IP 3600', null, null, dt + 'big ip 3600'),
  1364. sb.createVertexTemplateEntry(stencilPath + 'shape=mxgraph.rackF5Shapes.big_ip_3900;hasEars=0;isFront=1;isDC=0;psNum=1;',
  1365. 168, 16, '', 'Big-IP 3900', null, null, dt + 'big ip 3900'),
  1366. sb.createVertexTemplateEntry(stencilPath + 'shape=mxgraph.rackF5Shapes.big_ip_3900;hasEars=1;isFront=0;isDC=1;psNum=2;',
  1367. 168, 16, '', 'Big-IP 3900', null, null, dt + 'big ip 3900'),
  1368. sb.createVertexTemplateEntry(stencilPath + 'shape=mxgraph.rackF5Shapes.big_ip_4x00;hasEars=0;isFront=1;isDC=0;psNum=1;',
  1369. 168, 16, '', 'Big-IP 4x00', null, null, dt + 'big ip 4x00'),
  1370. sb.createVertexTemplateEntry(stencilPath + 'shape=mxgraph.rackF5Shapes.big_ip_4x00;hasEars=1;isFront=0;isDC=1;psNum=2;',
  1371. 168, 16, '', 'Big-IP 4x00', null, null, dt + 'big ip 4x00'),
  1372. sb.createVertexTemplateEntry(stencilPath + 'shape=mxgraph.rackF5Shapes.big_ip_5x00;hasEars=0;isFront=1;isDC=0;psNum=1;',
  1373. 168, 16, '', 'Big-IP 5x00', null, null, dt + 'big ip 5x00'),
  1374. sb.createVertexTemplateEntry(stencilPath + 'shape=mxgraph.rackF5Shapes.big_ip_5x00;hasEars=1;isFront=0;isDC=1;psNum=2;',
  1375. 168, 16, '', 'Big-IP 5x00', null, null, dt + 'big ip 5x00'),
  1376. sb.createVertexTemplateEntry(stencilPath + 'shape=mxgraph.rackF5Shapes.em4000;hasEars=0;isFront=1;isDC=0;psNum=1;',
  1377. 168, 16, '', 'EM 4000', null, null, dt + 'em 4000'),
  1378. sb.createVertexTemplateEntry(stencilPath + 'shape=mxgraph.rackF5Shapes.em4000;hasEars=1;isFront=0;isDC=1;psNum=2;',
  1379. 168, 16, '', 'EM 4000', null, null, dt + 'em 4000'),
  1380. sb.createVertexTemplateEntry(stencilPath + 'shape=mxgraph.rackF5Shapes.big_ip_6900;hasEars=0;isFront=1;isDC=0;',
  1381. 168, 32, '', 'Big-IP 6900', null, null, dt + 'big ip 6900'),
  1382. sb.createVertexTemplateEntry(stencilPath + 'shape=mxgraph.rackF5Shapes.big_ip_6900;hasEars=1;isFront=0;isDC=1;',
  1383. 168, 32, '', 'Big-IP 6900', null, null, dt + 'big ip 6900'),
  1384. sb.createVertexTemplateEntry(stencilPath + 'shape=mxgraph.rackF5Shapes.big_ip_89x0;hasEars=0;isFront=1;isDC=0;',
  1385. 168, 32, '', 'Big-IP 89x0', null, null, dt + 'big ip 89x0'),
  1386. sb.createVertexTemplateEntry(stencilPath + 'shape=mxgraph.rackF5Shapes.big_ip_6900;hasEars=1;isFront=0;isDC=1;',
  1387. 168, 32, '', 'Big-IP 89x0', null, null, dt + 'big ip 89x0'),
  1388. sb.createVertexTemplateEntry(stencilPath + 'shape=mxgraph.rackF5Shapes.big_ip_7x00;hasEars=0;isFront=1;isDC=0;',
  1389. 168, 32, '', 'Big-IP 7x00', null, null, dt + 'big ip 7x00'),
  1390. sb.createVertexTemplateEntry(stencilPath + 'shape=mxgraph.rackF5Shapes.big_ip_7x00;hasEars=1;isFront=0;isDC=1;',
  1391. 168, 32, '', 'Big-IP 7x00', null, null, dt + 'big ip 7x00'),
  1392. sb.createVertexTemplateEntry(stencilPath + 'shape=mxgraph.rackF5Shapes.big_ip_10x00;hasEars=0;isFront=1;isDC=0;',
  1393. 168, 32, '', 'Big-IP 10x00', null, null, dt + 'big ip 10x00'),
  1394. sb.createVertexTemplateEntry(stencilPath + 'shape=mxgraph.rackF5Shapes.big_ip_10x00;hasEars=1;isFront=0;isDC=1;',
  1395. 168, 32, '', 'Big-IP 10x00', null, null, dt + 'big ip 10x00'),
  1396. sb.createVertexTemplateEntry(stencilPath + 'shape=mxgraph.rackF5Shapes.big_ip_110x0;hasEars=0;isFront=1;isDC=0;',
  1397. 168, 48, '', 'Big-IP 110x0', null, null, dt + 'big ip 110x0'),
  1398. sb.createVertexTemplateEntry(stencilPath + 'shape=mxgraph.rackF5Shapes.big_ip_110x0;hasEars=1;isFront=0;isDC=1;',
  1399. 168, 48, '', 'Big-IP 110x0', null, null, dt + 'big ip 110x0'),
  1400. sb.createVertexTemplateEntry(stencilPath + 'shape=mxgraph.rackF5Shapes.viprion_2400;hasEars=0;isFront=1;isDC=1;bladeNum=4;',
  1401. 168, 64, '', 'VIPRION 2400', null, null, dt + 'viprion 2400'),
  1402. sb.createVertexTemplateEntry(stencilPath + 'shape=mxgraph.rackF5Shapes.viprion_2400;hasEars=1;isFront=0;isDC=0;bladeNum=4;',
  1403. 168, 64, '', 'VIPRION 2400', null, null, dt + 'viprion 2400'),
  1404. sb.createVertexTemplateEntry(stencilPath + 'shape=mxgraph.rackF5Shapes.viprion_4400;hasMask=1;bladeType=0;hasEars=0;isFront=1;isDC=1;bladeNum=4;',
  1405. 168, 112, '', 'VIPRION 4400', null, null, dt + 'viprion 4400'),
  1406. sb.createVertexTemplateEntry(stencilPath + 'shape=mxgraph.rackF5Shapes.viprion_4400;hasMask=1;bladeType=0;hasEars=1;isFront=0;isDC=0;bladeNum=4;',
  1407. 168, 112, '', 'VIPRION 4400', null, null, dt + 'viprion 4400'),
  1408. sb.createVertexTemplateEntry(stencilPath + 'shape=mxgraph.rackF5Shapes.viprion_4800;hasEars=1;isFront=1;bladeNum=8;',
  1409. 168, 224, '', 'VIPRION 4800', null, null, dt + 'viprion 4800'),
  1410. sb.createVertexTemplateEntry(stencilPath + 'shape=mxgraph.rackF5Shapes.viprion_4800;hasEars=0;isFront=0;bladeNum=8;',
  1411. 168, 224, '', 'VIPRION 4800', null, null, dt + 'viprion 4800'),
  1412. sb.createVertexTemplateEntry(stencilPath + 'shape=mxgraph.rackF5Shapes.big_ip_i2000;hasEars=0;isFront=1;isDC=0;psNum=1;',
  1413. 168, 16, '', 'Big-IP i2000', null, null, dt + 'big ip i2000'),
  1414. sb.createVertexTemplateEntry(stencilPath + 'shape=mxgraph.rackF5Shapes.big_ip_i2000;hasEars=1;isFront=0;isDC=1;psNum=2;',
  1415. 168, 16, '', 'Big-IP i2000', null, null, dt + 'big ip i2000'),
  1416. sb.createVertexTemplateEntry(stencilPath + 'shape=mxgraph.rackF5Shapes.big_ip_i4000;hasEars=0;isFront=1;isDC=0;psNum=1;',
  1417. 168, 16, '', 'Big-IP i4000', null, null, dt + 'big ip i4000'),
  1418. sb.createVertexTemplateEntry(stencilPath + 'shape=mxgraph.rackF5Shapes.big_ip_i4000;hasEars=1;isFront=0;isDC=1;psNum=2;',
  1419. 168, 16, '', 'Big-IP i4000', null, null, dt + 'big ip i4000'),
  1420. sb.createVertexTemplateEntry(stencilPath + 'shape=mxgraph.rackF5Shapes.big_ip_i5000;hasEars=0;isFront=1;isDC=0;psNum=1;',
  1421. 168, 16, '', 'Big-IP i5000', null, null, dt + 'big ip i5000'),
  1422. sb.createVertexTemplateEntry(stencilPath + 'shape=mxgraph.rackF5Shapes.big_ip_i5000;hasEars=1;isFront=0;isDC=1;psNum=2;',
  1423. 168, 16, '', 'Big-IP i5000', null, null, dt + 'big ip i5000'),
  1424. sb.createVertexTemplateEntry(stencilPath + 'shape=mxgraph.rackF5Shapes.big_ip_i7000;hasEars=0;isFront=1;isDC=0;psNum=1;',
  1425. 168, 16, '', 'Big-IP i7000', null, null, dt + 'big ip i7000'),
  1426. sb.createVertexTemplateEntry(stencilPath + 'shape=mxgraph.rackF5Shapes.big_ip_i7000;hasEars=1;isFront=0;isDC=1;psNum=2;',
  1427. 168, 16, '', 'Big-IP i7000', null, null, dt + 'big ip i7000'),
  1428. sb.createVertexTemplateEntry(stencilPath + 'shape=mxgraph.rackF5Shapes.big_ip_i10000;hasEars=0;isFront=1;isDC=0;psNum=1;',
  1429. 168, 16, '', 'Big-IP i10000', null, null, dt + 'big ip i10000'),
  1430. sb.createVertexTemplateEntry(stencilPath + 'shape=mxgraph.rackF5Shapes.big_ip_i10000;hasEars=1;isFront=0;isDC=1;psNum=2;',
  1431. 168, 16, '', 'Big-IP i10000', null, null, dt + 'big ip i10000')
  1432. ];
  1433. ui.sidebar.addPaletteFunctions('rackF5Shapes', 'Rack / F5 v2', true, fns);
  1434. // Collapses default sidebar entry and inserts this before
  1435. var c = ui.sidebar.container;
  1436. c.firstChild.click();
  1437. c.insertBefore(c.lastChild, c.firstChild);
  1438. c.insertBefore(c.lastChild, c.firstChild);
  1439. });