1(function() 2{ 3 Sidebar.prototype.addCumulusPalette = function() 4 { 5 var sc = 2; 6 var dt = 'cumulus'; 7 var sb = this; 8 var s = 'aspect=fixed;perimeter=ellipsePerimeter;html=1;align=center;fontSize=12;verticalAlign=top;fontColor=#364149;shadow=0;dashed=0;image;image=img/lib/cumulus/'; 9 this.setCurrentSearchEntryLibrary('cumulus'); 10 11 // Adds Cumulus shapes 12 var gn = ' '; 13 14 var fns = [ 15 this.createVertexTemplateEntry(s + 'switch_bare_metal_empty.svg;', 16 sc * 48, sc * 12, '', 'Switch - Bare Metal (empty)', false, null, this.getTagsForStencil(gn, 'switch bare metal empty', dt).join(' ')), 17 this.createVertexTemplateEntry(s + 'switch_cumulus_linux.svg;', 18 sc * 48, sc * 12, '', 'Switch - Cumulus Linux', false, null, this.getTagsForStencil(gn, 'switch cumulus linux', dt).join(' ')), 19 this.createVertexTemplateEntry(s + 'switch_out_of_band.svg;', 20 sc * 48, sc * 12, '', 'Switch - Out of Band', false, null, this.getTagsForStencil(gn, 'switch_out_of_band', dt).join(' ')), 21 this.createVertexTemplateEntry(s + 'switch_voyager.svg;', 22 sc * 48, sc * 12, '', 'Switch Voyager', false, null, this.getTagsForStencil(gn, 'switch voyager', dt).join(' ')), 23 24 this.createVertexTemplateEntry(s + 'cumulus_linux_icon.svg;', 25 sc * 48, sc * 48, '', 'Linux Icon', false, null, this.getTagsForStencil(gn, 'cumulus linux icon', dt).join(' ')), 26 this.createVertexTemplateEntry(s + 'cumulus_netq_icon.svg;', 27 sc * 48, sc * 48, '', 'NetQ Icon', false, null, this.getTagsForStencil(gn, '', dt).join(' ')), 28 29 this.createVertexTemplateEntry(s + 'rack_bare_metal.svg;', 30 sc * 48, sc * 57, '', 'Rack Bare Metal', false, null, this.getTagsForStencil(gn, 'rack bare metal', dt).join(' ')), 31 this.createVertexTemplateEntry(s + 'rack_cumulus_linux.svg;', 32 sc * 48, sc * 57, '', 'Rack Cumulus Linux', false, null, this.getTagsForStencil(gn, 'rack linux', dt).join(' ')), 33 this.createVertexTemplateEntry(s + 'rack_out_of_band.svg;', 34 sc * 48, sc * 57, '', 'Rack Out of Band', false, null, this.getTagsForStencil(gn, 'rack out of band', dt).join(' ')), 35 this.createVertexTemplateEntry(s + 'rack_voyager.svg;', 36 sc * 48, sc * 57, '', 'Rack Voyager', false, null, this.getTagsForStencil(gn, 'rack voyager', dt).join(' ')), 37 38 this.createVertexTemplateEntry(s + 'server_bare_metal.svg;', 39 sc * 48, sc * 10, '', 'Server - Bare Metal', false, null, this.getTagsForStencil(gn, 'server bare metal', dt).join(' ')), 40 this.createVertexTemplateEntry(s + 'chassis_bare_metal_empty.svg;', 41 sc * 53, sc * 36, '', 'Chassis - Bare Metal Empty', false, null, this.getTagsForStencil(gn, 'chassis bare metal empty', dt).join(' ')), 42 this.createVertexTemplateEntry(s + 'chassis_cumulus_linux.svg;', 43 sc * 53, sc * 36, '', 'Chassis - Cumulus Linux', false, null, this.getTagsForStencil(gn, 'chassis linux', dt).join(' ')), 44 this.createVertexTemplateEntry(s + 'netq_chassis.svg;', 45 sc * 53, sc * 36, '', 'NetQ Chassis', false, null, this.getTagsForStencil(gn, 'netq chassis', dt).join(' ')), 46 47 this.createEdgeTemplateEntry('endArrow=block;html=1;startArrow=block;startFill=1;endFill=1;', sc * 50, sc * 50, '', 'Unspecified', null, dt + 'unspecified'), 48 this.createEdgeTemplateEntry('endArrow=block;html=1;startArrow=block;startFill=1;endFill=1;strokeColor=#EB4770;', sc * 50, sc * 50, '', '1G', null, dt + '1g'), 49 this.createEdgeTemplateEntry('endArrow=block;html=1;startArrow=block;startFill=1;endFill=1;strokeColor=#FB9F41;', sc * 50, sc * 50, '', '10G', null, dt + '10g'), 50 this.createEdgeTemplateEntry('endArrow=block;html=1;startArrow=block;startFill=1;endFill=1;strokeColor=#FCC548;', sc * 50, sc * 50, '', '25G', null, dt + '25g'), 51 this.createEdgeTemplateEntry('endArrow=block;html=1;startArrow=block;startFill=1;endFill=1;strokeColor=#83CA73;', sc * 50, sc * 50, '', '40G', null, dt + '40g'), 52 this.createEdgeTemplateEntry('endArrow=block;html=1;startArrow=block;startFill=1;endFill=1;strokeColor=#2EAB6D;', sc * 50, sc * 50, '', '100G', null, dt + '100g'), 53 this.createEdgeTemplateEntry('endArrow=block;html=1;startArrow=block;startFill=1;endFill=1;strokeColor=#4EFDC0;', sc * 50, sc * 50, '', 'OOB / RMP', null, dt + 'oob rmp'), 54 55 this.createEdgeTemplateEntry('endArrow=block;html=1;startArrow=block;startFill=1;endFill=1;strokeColor=#EB4770;dashed=1;dashPattern=5 5;', sc * 50, sc * 50, '', 'Virtual', null, dt + 'virtual'), 56 this.createEdgeTemplateEntry('endArrow=block;html=1;startArrow=block;startFill=1;endFill=1;strokeColor=#FB9F41;dashed=1;dashPattern=5 5;', sc * 50, sc * 50, '', 'Virtual', null, dt + 'virtual'), 57 this.createEdgeTemplateEntry('endArrow=block;html=1;startArrow=block;startFill=1;endFill=1;strokeColor=#FCC548;dashed=1;dashPattern=5 5;', sc * 50, sc * 50, '', 'Virtual', null, dt + 'virtual'), 58 this.createEdgeTemplateEntry('endArrow=block;html=1;startArrow=block;startFill=1;endFill=1;strokeColor=#83CA73;dashed=1;dashPattern=5 5;', sc * 50, sc * 50, '', 'Virtual', null, dt + 'virtual'), 59 this.createEdgeTemplateEntry('endArrow=block;html=1;startArrow=block;startFill=1;endFill=1;strokeColor=#2EAB6D;dashed=1;dashPattern=5 5;', sc * 50, sc * 50, '', 'Virtual', null, dt + 'virtual'), 60 this.createEdgeTemplateEntry('endArrow=block;html=1;startArrow=block;startFill=1;endFill=1;strokeColor=#4EFDC0;dashed=1;dashPattern=5 5;', sc * 50, sc * 50, '', 'Virtual', null, dt + 'virtual'), 61 62 this.createVertexTemplateEntry(s + 'netq_agent.svg;', 63 sc * 9, sc * 9, '', 'NetQ Agent', false, null, this.getTagsForStencil(gn, 'netq agent', dt).join(' ')), 64 this.createVertexTemplateEntry(s + 'netq_telemetry_server.svg;', 65 sc * 48, sc * 12, '', 'NetQ Telemetry Server', false, null, this.getTagsForStencil(gn, 'netq telemetry server', dt).join(' ')), 66 this.createVertexTemplateEntry(s + 'netq_server.svg;', 67 sc * 48, sc * 10, '', 'NetQ Server', false, null, this.getTagsForStencil(gn, 'netq server', dt).join(' ')), 68 69 this.createVertexTemplateEntry( 70 'aspect=fixed;perimeter=ellipsePerimeter;html=1;align=center;shadow=0;dashed=0;image;image=img/lib/cumulus/internet.svg;labelPosition=center;verticalLabelPosition=middle;verticalAlign=middle;fontSize=14;fontColor=#36424A;', 71 sc * 137, sc * 49, 'Internet', 'Internet', true, null, this.getTagsForStencil(gn, 'internet', dt).join(' ')), 72 this.createVertexTemplateEntry(s + 'container.svg;', 73 sc * 45, sc * 40, '', 'Container', true, null, this.getTagsForStencil(gn, 'container', dt).join(' ')), 74 75 this.addEntry(dt + 'pbr switch', function() 76 { 77 var cell1 = new mxCell('swp51', new mxGeometry(0, 0, sc * 30, sc * 12), 'rounded=0;whiteSpace=wrap;html=1;fillColor=#FB9F41;strokeColor=none;fontColor=#FFFFFF;'); 78 cell1.vertex = true; 79 var cell2 = new mxCell('PBR', new mxGeometry(sc * 30, 0, sc * 30, sc * 12), 'text;verticalAlign=middle;align=center;fontColor=#FB9F41;fontStyle=1'); 80 cell2.vertex = true; 81 82 return sb.createVertexTemplateFromCells([cell1, cell2], sc * 60, sc * 12, 'Package Diagram'); 83 }), 84 85 this.createVertexTemplateEntry(s + 'ddos_server.svg;', 86 sc * 48, sc * 10, '192.168.0.32', 'DDos Server', true, null, this.getTagsForStencil(gn, 'ddos server', dt).join(' ')), 87 this.createVertexTemplateEntry(s + 'switch.svg;', 88 sc * 48, sc * 10, '', 'Switch', true, null, this.getTagsForStencil(gn, 'switch', dt).join(' ')), 89 90 this.createVertexTemplateEntry(s + 'limed_spruce.svg;', 91 sc * 150, sc * 34, '', 'Limed Spruce', false, null, this.getTagsForStencil(gn, 'limed spruce', dt).join(' ')), 92 93 this.createVertexTemplateEntry('fillColor=#36424A;strokeColor=none;', 94 sc * 25, sc * 25, '', 'Limited Spruce', true, null, this.getTagsForStencil(gn, 'color limited spruce', dt).join(' ')), 95 this.createVertexTemplateEntry('fillColor=#515D68;strokeColor=none;', 96 sc * 25, sc * 25, '', 'Nevada', true, null, this.getTagsForStencil(gn, 'color nevada', dt).join(' ')), 97 this.createVertexTemplateEntry('fillColor=#6E7B86;strokeColor=none;', 98 sc * 25, sc * 25, '', 'Rolling Stone', true, null, this.getTagsForStencil(gn, 'color rolling stone', dt).join(' ')), 99 this.createVertexTemplateEntry('fillColor=#8C9AA6;strokeColor=none;', 100 sc * 25, sc * 25, '', 'Gray Chateau', true, null, this.getTagsForStencil(gn, 'color gray chateau', dt).join(' ')), 101 this.createVertexTemplateEntry('fillColor=#AEB8C3;strokeColor=none;', 102 sc * 25, sc * 25, '', 'Cadet Blue', true, null, this.getTagsForStencil(gn, 'color cadet blue', dt).join(' ')), 103 this.createVertexTemplateEntry('fillColor=#D2D6DF;strokeColor=none;', 104 sc * 25, sc * 25, '', 'Heather', true, null, this.getTagsForStencil(gn, 'color heather', dt).join(' ')), 105 this.createVertexTemplateEntry('fillColor=#EAEDF2;strokeColor=none;', 106 sc * 25, sc * 25, '', 'Athens Gray', true, null, this.getTagsForStencil(gn, 'color athens gray', dt).join(' ')), 107 this.createVertexTemplateEntry('fillColor=#7CCC6C;strokeColor=none;', 108 sc * 25, sc * 25, '', 'Mantis', true, null, this.getTagsForStencil(gn, 'color mantis', dt).join(' ')), 109 this.createVertexTemplateEntry('fillColor=#4BC05B;strokeColor=none;', 110 sc * 25, sc * 25, '', 'Fern', true, null, this.getTagsForStencil(gn, 'color fern', dt).join(' ')), 111 this.createVertexTemplateEntry('fillColor=#00AD69;strokeColor=none;', 112 sc * 25, sc * 25, '', 'Jade', true, null, this.getTagsForStencil(gn, 'color jade', dt).join(' ')), 113 this.createVertexTemplateEntry('fillColor=#009271;strokeColor=none;', 114 sc * 25, sc * 25, '', 'Observatory', true, null, this.getTagsForStencil(gn, 'color observatory', dt).join(' ')), 115 this.createVertexTemplateEntry('fillColor=#FFC82E;strokeColor=none;', 116 sc * 25, sc * 25, '', 'Energy Jellow', true, null, this.getTagsForStencil(gn, 'color energy jellow', dt).join(' ')), 117 this.createVertexTemplateEntry('fillColor=#FFA12D;strokeColor=none;', 118 sc * 25, sc * 25, '', 'Neon Carrot', true, null, this.getTagsForStencil(gn, 'color neon carrot', dt).join(' ')), 119 this.createVertexTemplateEntry('fillColor=#F1446F;strokeColor=none;', 120 sc * 25, sc * 25, '', 'Radical Red', true, null, this.getTagsForStencil(gn, 'color radical red', dt).join(' ')), 121 this.createVertexTemplateEntry('fillColor=#83389B;strokeColor=none;', 122 sc * 25, sc * 25, '', 'Rarity', true, null, this.getTagsForStencil(gn, 'color rarity', dt).join(' ')), 123 this.createVertexTemplateEntry('fillColor=#1EB5BD;strokeColor=none;', 124 sc * 25, sc * 25, '', 'Seagull', true, null, this.getTagsForStencil(gn, 'color seagull', dt).join(' ')), 125 this.createVertexTemplateEntry('fillColor=#78CDD1;strokeColor=none;', 126 sc * 25, sc * 25, '', 'Half Baked', true, null, this.getTagsForStencil(gn, 'color half baked', dt).join(' ')) 127 ]; 128 129 this.addPalette('cumulus', 'Cumulus', false, mxUtils.bind(this, function(content) 130 { 131 for (var i = 0; i < fns.length; i++) 132 { 133 content.appendChild(fns[i](content)); 134 } 135 })); 136 137 this.setCurrentSearchEntryLibrary(); 138 }; 139})(); 140