Sidebar-AWS3D.js 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169
  1. (function()
  2. {
  3. // Adds AWS 3D shapes
  4. Sidebar.prototype.addAWS3DPalette = function()
  5. {
  6. var w = 100;
  7. var h = 100;
  8. var s = mxConstants.STYLE_VERTICAL_LABEL_POSITION + '=bottom;html=1;' + mxConstants.STYLE_VERTICAL_ALIGN + '=top;' + mxConstants.STYLE_STROKEWIDTH + '=1;dashed=0;shape=mxgraph.aws3d.';
  9. var gn = 'mxgraph.aws3d';
  10. var dt = 'aws 3d amazon web service';
  11. this.addPaletteFunctions('aws3d', 'AWS 3D', false,
  12. [
  13. this.createVertexTemplateEntry(s + 'ami;aspect=fixed;fillColor=#E8CA45;strokeColor=#FFF215;',
  14. w * 0.92, h * 0.6, '', 'AMI', null, null, this.getTagsForStencil(gn, 'ami', dt).join(' ')),
  15. this.createVertexTemplateEntry(s + 'ami2;aspect=fixed;fillColor=#FF9900;strokeColor=#ffffff;',
  16. w * 0.74, h * 0.5, '', 'AMI', null, null, this.getTagsForStencil(gn, 'ami', dt).join(' ')),
  17. this.createVertexTemplateEntry(s + 'application;fillColor=#4286c5;strokeColor=#57A2D8;aspect=fixed;',
  18. w * 0.62, h * 0.688, '', 'Application', null, null, this.getTagsForStencil(gn, 'application', dt).join(' ')),
  19. this.createVertexTemplateEntry(s + 'application2;fillColor=#86E83A;strokeColor=#B0F373;aspect=fixed;',
  20. w * 0.62, h * 0.53, '', 'Application', null, null, this.getTagsForStencil(gn, 'application', dt).join(' ')),
  21. this.createVertexTemplateEntry(s + 'application_server;fillColor=#ECECEC;strokeColor=#5E5E5E;aspect=fixed;',
  22. w * 1.23, h * 1.24, '', 'EC2 Instance', null, null, this.getTagsForStencil(gn, 'ec2 instance', dt).join(' ')),
  23. this.createVertexTemplateEntry(s + 'client;aspect=fixed;strokeColor=none;fillColor=#777777;',
  24. w * 0.6, h * 1.04, '', 'Client', null, null, this.getTagsForStencil(gn, 'client', dt).join(' ')),
  25. this.createVertexTemplateEntry(s + 'cloudfront;fillColor=#ECECEC;strokeColor=#5E5E5E;aspect=fixed;',
  26. w * 1.038, h * 1.698, '', 'CloudFront', null, null, this.getTagsForStencil(gn, 'cloudfront', dt).join(' ')),
  27. this.createVertexTemplateEntry(s + 'file;aspect=fixed;strokeColor=#2d6195;fillColor=#ffffff;',
  28. w * 0.308, h * 0.706, '', 'Content', null, null, this.getTagsForStencil(gn, 'content', dt).join(' ')),
  29. this.createVertexTemplateEntry(s + 'customerGateway;fillColor=#ECECEC;strokeColor=#5E5E5E;aspect=fixed;',
  30. w * 1.167, h * 1.028, '', 'Customer Gateway', null, null, this.getTagsForStencil(gn, 'customer gateway', dt).join(' ')),
  31. this.createVertexTemplateEntry(s + 'dataCenter;fillColor=#ffffff;strokeColor=#5E5E5E;aspect=fixed;',
  32. w * 1.23, h * 1.42, '', 'Data Center', null, null, this.getTagsForStencil(gn, 'data center', dt).join(' ')),
  33. this.createVertexTemplateEntry(s + 'dataServer;fillColor=#ffffff;strokeColor=#5E5E5E;aspect=fixed;',
  34. w * 1.23, h * 1.06, '', 'Data Server', null, null, this.getTagsForStencil(gn, 'data server', dt).join(' ')),
  35. this.createVertexTemplateEntry(s + 'decider;fillColor=#ECECEC;strokeColor=#5E5E5E;aspect=fixed;',
  36. w * 0.74, h * 0.5, '', 'Decider', null, null, this.getTagsForStencil(gn, 'decider', dt).join(' ')),
  37. this.createVertexTemplateEntry(s + 'dynamoDb;fillColor=#ECECEC;strokeColor=#5E5E5E;aspect=fixed;',
  38. w * 1.815, h * 2.1, '', 'DynamoDB', null, null, this.getTagsForStencil(gn, 'dynamodb db database', dt).join(' ')),
  39. this.createVertexTemplateEntry(s + 'ebs;fillColor=#ECECEC;strokeColor=#5E5E5E;aspect=fixed;',
  40. w * 0.92, h * 0.6, '', 'EBS', null, null, this.getTagsForStencil(gn, 'ebs', dt).join(' ')),
  41. this.createVertexTemplateEntry(s + 'ebs2;fillColor=#ECECEC;strokeColor=#5E5E5E;aspect=fixed;',
  42. w * 0.92, h * 0.6, '', 'EBS', null, null, this.getTagsForStencil(gn, 'ebs', dt).join(' ')),
  43. this.createVertexTemplateEntry(s + 'elasticBeanstalk;fillColor=#ECECEC;strokeColor=#5E5E5E;aspect=fixed;',
  44. w * 1.82, h * 1.4, '', 'Elastic Beanstalk', null, null, this.getTagsForStencil(gn, 'elastic beanstalk', dt).join(' ')),
  45. this.createVertexTemplateEntry(s + 'elasticLoadBalancing;fillColor=#ECECEC;strokeColor=#5E5E5E;aspect=fixed;',
  46. w * 0.92, h * 0.8817, '', 'Elastic Load Balancing', null, null, this.getTagsForStencil(gn, 'elastic load balancing elb', dt).join(' ')),
  47. this.createVertexTemplateEntry(s + 'elasticMapReduce;fillColor=#ECECEC;strokeColor=#5E5E5E;aspect=fixed;',
  48. w * 1.23, h * 1.33, '', 'Elastic MapReduce', null, null, this.getTagsForStencil(gn, 'elastic mapreduce', dt).join(' ')),
  49. // this.createVertexTemplateEntry(s + 'elasticache;fillColor=#ECECEC;strokeColor=#5E5E5E;aspect=fixed;',
  50. // w * 1.23, h * 1.43, '', 'Elasticache', null, null, this.getTagsForStencil(gn, '', dt).join(' ')),
  51. this.addEntry(dt + 'elasticache', function()
  52. {
  53. var bg1 = new mxCell('', new mxGeometry(70, 0, 123, 124), s + 'application_server;fillColor=#ECECEC;strokeColor=#5E5E5E;aspect=fixed;');
  54. bg1.vertex = true;
  55. var bg2 = new mxCell('', new mxGeometry(0, 40, 123, 124), s + 'application_server;fillColor=#ECECEC;strokeColor=#5E5E5E;aspect=fixed;');
  56. bg2.vertex = true;
  57. var bg3 = new mxCell('', new mxGeometry(140, 40, 123, 124), s + 'application_server;fillColor=#ECECEC;strokeColor=#5E5E5E;aspect=fixed;');
  58. bg3.vertex = true;
  59. var bg4 = new mxCell('', new mxGeometry(70, 80, 123, 124), s + 'application_server;fillColor=#ECECEC;strokeColor=#5E5E5E;aspect=fixed;');
  60. bg4.vertex = true;
  61. return sb.createVertexTemplateFromCells([bg1, bg2, bg3, bg4], 264, 204, 'Elasticache');
  62. }),
  63. this.createVertexTemplateEntry(s + 'email;aspect=fixed;strokeColor=#292929;fillColor=#ffffff;',
  64. w * 0.43, h * 0.57, '', 'Email', null, null, this.getTagsForStencil(gn, 'email', dt).join(' ')),
  65. this.createVertexTemplateEntry(s + 'email_service;fillColor=#ECECEC;strokeColor=#5E5E5E;aspect=fixed;',
  66. w * 1.51, h * 1.92, '', 'Email Service', null, null, this.getTagsForStencil(gn, 'email service', dt).join(' ')),
  67. this.createVertexTemplateEntry(s + 'file;aspect=fixed;strokeColor=#292929;fillColor=#ffffff;',
  68. w * 0.308, h * 0.706, '', 'File', null, null, this.getTagsForStencil(gn, 'file', dt).join(' ')),
  69. this.createVertexTemplateEntry(s + 'glacier;fillColor=#ECECEC;strokeColor=#5E5E5E;aspect=fixed;',
  70. w * 1.81, h * 1.92, '', 'Glacier', null, null, this.getTagsForStencil(gn, 'glacier', dt).join(' ')),
  71. this.createVertexTemplateEntry(s + 'image;strokeColor=none;fillColor=#777777;aspect=fixed;',
  72. w * 0.5, h * 0.86, '', 'Image/Video', null, null, this.getTagsForStencil(gn, 'image video', dt).join(' ')),
  73. this.createVertexTemplateEntry(s + 'internetGateway;fillColor=#ECECEC;strokeColor=#5E5E5E;aspect=fixed;',
  74. w * 1.167, h * 1.028, '', 'Internet Gateway', null, null, this.getTagsForStencil(gn, 'internet gateway', dt).join(' ')),
  75. // this.createVertexTemplateEntry(s + 'kinesisStream;fillColor=#ECECEC;strokeColor=#5E5E5E;aspect=fixed;',
  76. // w * 2.2, h * 1.6, '', 'Kinesis Stream', null, null, this.getTagsForStencil(gn, '', dt).join(' ')),
  77. this.createVertexTemplateEntry(s + 'lambda;fillColor=#ECECEC;strokeColor=#5E5E5E;aspect=fixed;',
  78. w * 0.92, h * 1.095, '', 'Lambda', null, null, this.getTagsForStencil(gn, 'lambda', dt).join(' ')),
  79. this.createVertexTemplateEntry(s + 'mobile_worker;aspect=fixed;strokeColor=none;fillColor=#777777;',
  80. w * 0.36, h * 0.90, '', 'Mobile Worker', null, null, this.getTagsForStencil(gn, 'mobile worker', dt).join(' ')),
  81. this.createVertexTemplateEntry(s + 'oracleDataCenter;fillColor=#ffffff;strokeColor=#5E5E5E;aspect=fixed;',
  82. w * 1.23, h * 1.42, '', 'Oracle Data Center', null, null, this.getTagsForStencil(gn, 'oracle data center', dt).join(' ')),
  83. this.createVertexTemplateEntry(s + 'oracleDbServer;fillColor=#ffffff;strokeColor=#5E5E5E;aspect=fixed;',
  84. w * 1.23, h * 1.33, '', 'Oracle Database Server', null, null, this.getTagsForStencil(gn, 'oracle database server db', dt).join(' ')),
  85. this.createVertexTemplateEntry(s + 'oracleServer;fillColor=#ECECEC;strokeColor=#5E5E5E;aspect=fixed;',
  86. w * 1.23, h * 1.42, '', 'Oracle Server', null, null, this.getTagsForStencil(gn, 'oracle server', dt).join(' ')),
  87. this.createVertexTemplateEntry(s + 'rds;fillColor=#ECECEC;strokeColor=#5E5E5E;aspect=fixed;',
  88. w * 1.23, h * 1.33, '', 'RDS', null, null, this.getTagsForStencil(gn, 'rds', dt).join(' ')),
  89. this.createVertexTemplateEntry(s + 'rdsMaster;fillColor=#ECECEC;strokeColor=#5E5E5E;aspect=fixed;',
  90. w * 1.23, h * 1.33, '', 'RDS Master', null, null, this.getTagsForStencil(gn, 'rds master', dt).join(' ')),
  91. this.createVertexTemplateEntry(s + 'rdsSlave;fillColor=#ECECEC;strokeColor=#5E5E5E;aspect=fixed;',
  92. w * 1.23, h * 1.33, '', 'RDS Slave', null, null, this.getTagsForStencil(gn, 'rds slave', dt).join(' ')),
  93. this.createVertexTemplateEntry(s + 'redshift;fillColor=#ECECEC;strokeColor=#5E5E5E;aspect=fixed;',
  94. w * 1.50, h * 1.90, '', 'Redshift', null, null, this.getTagsForStencil(gn, 'redshift', dt).join(' ')),
  95. this.createVertexTemplateEntry(s + 'route53;fillColor=#ECECEC;strokeColor=#5E5E5E;aspect=fixed;',
  96. w * 1.1717, h * 1.344, '', 'Route 53', null, null, this.getTagsForStencil(gn, 'route', dt).join(' ')),
  97. this.createVertexTemplateEntry(s + 's3;fillColor=#ECECEC;strokeColor=#5E5E5E;aspect=fixed;',
  98. w * 2.315, h * 2.39, '', 'S3', null, null, this.getTagsForStencil(gn, 's3', dt).join(' ')),
  99. this.createVertexTemplateEntry(s + 's3Bucket;fillColor=#4286c5;strokeColor=#57A2D8;aspect=fixed;',
  100. w * 0.615, h * 0.638, '', 'S3 Bucket', null, null, this.getTagsForStencil(gn, 's3 bucket', dt).join(' ')),
  101. this.createVertexTemplateEntry(s + 'searchEngine;fillColor=#ECECEC;strokeColor=#5E5E5E;aspect=fixed;',
  102. w * 1.80, h * 1.92, '', 'Search Engine', null, null, this.getTagsForStencil(gn, 'search engine', dt).join(' ')),
  103. this.createVertexTemplateEntry(s + 'secureConnection;fillColor=#000000;strokeColor=#ffffff;aspect=fixed;',
  104. w * 0.57, h * 0.34, '', 'Secure Connection', null, null, this.getTagsForStencil(gn, 'secure connection', dt).join(' ')),
  105. this.createVertexTemplateEntry(s + 'securityTokenService;fillColor=#ECECEC;strokeColor=#5E5E5E;aspect=fixed;',
  106. w * 1.80, h * 1.92, '', 'Security Token Service', null, null, this.getTagsForStencil(gn, 'security token service', dt).join(' ')),
  107. this.createVertexTemplateEntry(s + 'simpleDb;fillColor=#ECECEC;strokeColor=#5E5E5E;aspect=fixed;',
  108. w * 1.23, h * 1.33, '', 'SimpleDB', null, null, this.getTagsForStencil(gn, 'simpledb simple db database', dt).join(' ')),
  109. this.createVertexTemplateEntry(s + 'simpleDb2;fillColor=#ECECEC;strokeColor=#5E5E5E;aspect=fixed;',
  110. w * 1.815, h * 1.926, '', 'SimpleDB', null, null, this.getTagsForStencil(gn, 'simpledb simple db database', dt).join(' ')),
  111. this.createVertexTemplateEntry(s + 'snapshot;fillColor=#4286c5;strokeColor=#57A2D8;aspect=fixed;',
  112. w * 0.92, h * 0.6, '', 'Snapshot', null, null, this.getTagsForStencil(gn, 'snapshot', dt).join(' ')),
  113. this.createVertexTemplateEntry(s + 'instance;fillColor=#ECECEC;strokeColor=#5E5E5E;aspect=fixed;',
  114. w * 1.23, h * 0.97, '', 'Spot Instance', null, null, this.getTagsForStencil(gn, 'spot instance', dt).join(' ')),
  115. this.createVertexTemplateEntry(s + 'sqs;fillColor=#ECECEC;strokeColor=#5E5E5E;aspect=fixed;',
  116. w * 1.84, h * 2.1275, '', 'SQS', null, null, this.getTagsForStencil(gn, 'sqs', dt).join(' ')),
  117. // this.createVertexTemplateEntry(s + 'sqs2;fillColor=#ECECEC;strokeColor=#5E5E5E;aspect=fixed;',
  118. // w * 1.6, h * 0.93, '', 'SQS', null, null, this.getTagsForStencil(gn, '', dt).join(' ')),
  119. this.createVertexTemplateEntry(s + 'end_user;strokeColor=none;fillColor=#777777;aspect=fixed;',
  120. w * 0.49, h * 1.0046, '', 'User', null, null, this.getTagsForStencil(gn, 'user', dt).join(' ')),
  121. this.createVertexTemplateEntry(s + 'vpcGateway;fillColor=#ECECEC;strokeColor=#5E5E5E;aspect=fixed;',
  122. w * 1.167, h * 1.028, '', 'VPC Gateway', null, null, this.getTagsForStencil(gn, 'vpc gateway', dt).join(' ')),
  123. // this.createVertexTemplateEntry(s + 'webServer;fillColor=#ECECEC;strokeColor=#5E5E5E;aspect=fixed;',
  124. // w * 1.23, h * 1.06, '', 'Web Server', null, null, this.getTagsForStencil(gn, '', dt).join(' ')),
  125. this.createVertexTemplateEntry(s + 'worker;fillColor=#ECECEC;strokeColor=#5E5E5E;aspect=fixed;',
  126. w * 0.74, h * 0.5, '', 'Worker', null, null, this.getTagsForStencil(gn, 'worker', dt).join(' ')),
  127. this.createVertexTemplateEntry(s + 'workflowService;fillColor=#ECECEC;strokeColor=#5E5E5E;aspect=fixed;',
  128. w * 1.822, h * 1.484, '', 'Workflow Service', null, null, this.getTagsForStencil(gn, 'workflow service', dt).join(' ')),
  129. this.createVertexTemplateEntry(s + 'arrowNE;fillColor=#000000;aspect=fixed;',
  130. w * 0.455, h * 0.26, '', 'Arrow NE', null, null, this.getTagsForStencil(gn, 'arrow ne north east northeast', dt).join(' ')),
  131. this.createVertexTemplateEntry(s + 'arrowSE;fillColor=#000000;aspect=fixed;',
  132. w * 0.455, h * 0.26, '', 'Arrow SE', null, null, this.getTagsForStencil(gn, 'arrow ne north east northeast', dt).join(' ')),
  133. this.createVertexTemplateEntry(s + 'arrowSW;fillColor=#000000;aspect=fixed;',
  134. w * 0.455, h * 0.26, '', 'Arrow SW', null, null, this.getTagsForStencil(gn, 'arrow ne north east northeast', dt).join(' ')),
  135. this.createVertexTemplateEntry(s + 'arrowNW;fillColor=#000000;aspect=fixed;',
  136. w * 0.455, h * 0.26, '', 'Arrow NW', null, null, this.getTagsForStencil(gn, 'arrow ne north east northeast', dt).join(' ')),
  137. this.createVertexTemplateEntry(s + 'arrowlessNE;fillColor=#000000;aspect=fixed;',
  138. w * 0.316, h * 0.18, '', 'Arrowless NE', null, null, this.getTagsForStencil(gn, 'arrow ne north east northeast', dt).join(' ')),
  139. this.createVertexTemplateEntry(s + 'dashedEdgeDouble;fillColor=#000000;aspect=fixed;',
  140. w * 0.316, h * 0.18, '', 'Dashed Edge Double Arrow', null, null, this.getTagsForStencil(gn, 'arrow ne north east northeast', dt).join(' ')),
  141. this.createVertexTemplateEntry(s + 'dashedArrowlessEdge;fillColor=#000000;aspect=fixed;',
  142. w * 0.316, h * 0.18, '', 'Dashed Arrowless Edge', null, null, this.getTagsForStencil(gn, 'arrow ne north east northeast', dt).join(' ')),
  143. this.createVertexTemplateEntry(s + 'dashedEdge;fillColor=#000000;aspect=fixed;',
  144. w * 0.316, h * 0.18, '', 'Dashed Edge', null, null, this.getTagsForStencil(gn, 'arrow ne north east northeast', dt).join(' ')),
  145. this.createVertexTemplateEntry(s + 'flatEdge;fillColor=#000000;aspect=fixed;',
  146. w * 0.632, h * 0.36, '', 'Flat Edge', null, null, this.getTagsForStencil(gn, 'arrow ne north east northeast', dt).join(' ')),
  147. this.createVertexTemplateEntry(s + 'flatDoubleEdge;fillColor=#000000;aspect=fixed;',
  148. w * 2.528, h * 1.44, '', 'Flat Double Edge', null, null, this.getTagsForStencil(gn, 'arrow ne north east northeast', dt).join(' ')),
  149. this.createVertexTemplateEntry(s + 'arrowhead;aspect=fixed;',
  150. w * 0.19, h * 0.11, '', 'Arrowhead', null, null, this.getTagsForStencil(gn, 'arrowhead', dt).join(' ')),
  151. this.createVertexTemplateEntry(s + 'edge;aspect=fixed;',
  152. w * 0.97, h * 1.074, '', 'Edge', null, null, this.getTagsForStencil(gn, 'edge', dt).join(' ')),
  153. this.createVertexTemplateEntry(s + 'reference;aspect=fixed;',
  154. w * 0.295, h * 0.195, '', 'Reference', null, null, this.getTagsForStencil(gn, 'reference', dt).join(' ')),
  155. this.createVertexTemplateEntry(s + 'spot;aspect=fixed;',
  156. w * 0.62, h * 0.36, '', 'Spot', null, null, this.getTagsForStencil(gn, 'spot', dt).join(' ')),
  157. this.createEdgeTemplateEntry('edgeStyle=isometricEdgeStyle;endArrow=none;html=1;', 50, 100, 'isometric edge', 'Isometric Edge 1'),
  158. this.createEdgeTemplateEntry('edgeStyle=isometricEdgeStyle;endArrow=none;html=1;elbow=vertical;', 50, 100, 'isometric edge', 'Isometric Edge 2')
  159. ]);
  160. };
  161. })();