-
Notifications
You must be signed in to change notification settings - Fork 6
/
prova2.html
188 lines (169 loc) · 17.4 KB
/
prova2.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
<html>
<head>
<script src="scripts/generic/jquery.min.js"></script>
<script src="scripts/generic/mxClient.min.js"></script>
</head>
<body>
<div id="targetContainer">
</div>
<script type="text/javascript">
var graph = new mxGraph(document.getElementById("targetContainer"));
var parent = graph.getDefaultParent();
var strokeColorCampaign = "green";
var strokeColorCustomer = "blue";
var strokeColorOpportunity = "orange";
var strokeColorCampaign2 = "green";
var strokeColorCustomer2 = "blue";
var strokeColorOpportunity2 = "orange";
var strokeColor1 = "gray";
var strokeColor2 = "gray";
var strokeColor3 = "gray";
var strokeColor4 = "gray";
var fontColor1 = "black";
var fontColor2 = "black";
var fontColor3 = "black";
var fontColor4 = "black";
var endArrowCampaign = "block";
var endArrowCustomer = "block";
var endArrowOpportunity = "block";
var enableCampaign = true;
var enableCustomer = true;
var enableOpportunity = true;
if (!(enableCampaign)) {
strokeColorCampaign = "white";
strokeColorCampaign2 = "white";
endArrowCampaign = "block";
}
if (!(enableCustomer)) {
strokeColorCustomer = "white";
strokeColorCustomer2 = "white";
endArrowCustomer = "block";
}
if (!(enableOpportunity)) {
strokeColorOpportunity = "white";
strokeColorOpportunity2 = "white";
endArrowOpportunity = "block";
fontColor2 = "white";
strokeColor2 = "white";
}
if (!(enableCampaign || enableCustomer)) {
strokeColor1 = "white";
fontColor1 = "white";
}
if (!(enableCampaign || enableCustomer || enableOpportunity)) {
strokeColor4 = "white";
fontColor4 = "white";
}
if (!(enableCustomer || enableOpportunity)) {
strokeColor3 = "white";
fontColor3 = "white";
}
let sourceCampaign = graph.insertVertex(parent, "source_campaign", " ", 150, 150, 40, 40, "fontSize=18;shape=ellipse;fillColor="+strokeColorCampaign+";strokeColor="+strokeColorCampaign2+";fontColor=white");
let sinkCampaign = graph.insertVertex(parent, "sink_campaign", " ", 150, 150, 40, 40, "fontSize=18;shape=ellipse;fillColor="+strokeColorCampaign+";strokeColor="+strokeColorCampaign2+";fontColor=white");
let sourceCustomer = graph.insertVertex(parent, "source_customer", " ", 150, 150, 40, 40, "fontSize=18;shape=ellipse;fillColor="+strokeColorCustomer+";strokeColor="+strokeColorCustomer2+";fontColor=white");
let sinkCustomer = graph.insertVertex(parent, "sink_customer", " ", 150, 150, 40, 40, "fontSize=18;shape=ellipse;fillColor="+strokeColorCustomer+";strokeColor="+strokeColorCustomer2+";fontColor=white");
let sourceOpportunity = graph.insertVertex(parent, "source_opportunity", " ", 150, 150, 40, 40, "fontSize=18;shape=ellipse;fillColor="+strokeColorOpportunity+";strokeColor="+strokeColorOpportunity2+";fontColor=white");
let sinkOpportunity = graph.insertVertex(parent, "source_opportunity", " ", 150, 150, 40, 40, "fontSize=18;shape=ellipse;fillColor="+strokeColorOpportunity+";strokeColor="+strokeColorOpportunity2+";fontColor=white");
let createCampaign = graph.insertVertex(parent, "Create Campaign", "Create\nCampaign", 150, 150, 100, 68, "fontSize=18;shape=box;fillColor=white;fontColor="+fontColor1+";strokeColor="+strokeColor1+";");
let physicalAppointment = graph.insertVertex(parent, "Physical Appointment", "Physical\nAppointment", 150, 150, 120, 68, "fontSize=18;shape=box;fillColor=white;fontColor="+fontColor1+";strokeColor="+strokeColor1+";");
let phoneCall = graph.insertVertex(parent, "Phone Call", "Phone\nCall", 150, 150, 100, 68, "fontSize=18;shape=box;fillColor=white;fontColor="+fontColor1+";strokeColor="+strokeColor1+";");
let sendEmail = graph.insertVertex(parent, "Send E-Mail", "Send\nE-Mail", 150, 150, 100, 68, "fontSize=18;shape=box;fillColor=white;fontColor="+fontColor1+";strokeColor="+strokeColor1+";");
let createOpportunity = graph.insertVertex(parent, "Create Opportunity", "Create\nOpportunity", 150, 150, 120, 68, "fontSize=18;shape=box;fillColor=white;fontColor="+fontColor4+";strokeColor="+strokeColor4+";");
let createQuotation = graph.insertVertex(parent, "Create Quotation", "Create\nQuotation", 150, 150, 100, 68, "fontSize=18;shape=box;fillColor=white;fontColor="+fontColor2+";strokeColor="+strokeColor2+";");
let sendQuotation = graph.insertVertex(parent, "Send Quotation", "Send\nQuotation", 150, 150, 100, 68, "fontSize=18;shape=box;fillColor=white;fontColor="+fontColor2+";strokeColor="+strokeColor2+";");
let updateCustomerRecord = graph.insertVertex(parent, "Update Customer Record", "Update\nCustomer\nRecord", 150, 150, 100, 100, "fontSize=18;shape=box;fillColor=white;fontColor="+fontColor3+";strokeColor="+strokeColor3+";");
let opportunityWon = graph.insertVertex(parent, "Opportunity Won", "Opportunity\nWon", 150, 150, 120, 68, "fontSize=18;shape=box;fillColor=white;fontColor="+fontColor3+";strokeColor="+strokeColor3+";");
let opportunityLost = graph.insertVertex(parent, "Opportunity Lost", "Opportunity\nLost", 150, 150, 120, 68, "fontSize=18;shape=box;fillColor=white;fontColor="+fontColor3+";strokeColor="+strokeColor3+";");
let e1 = graph.insertEdge(parent, "campaigncreateCampaignSendEMail", "10000", createCampaign, sendEmail, "rounded=1;fontSize=16;strokeColor="+strokeColorCampaign2+";endArrow="+endArrowCampaign+";fontColor="+strokeColorCampaign);
e1.setVisible(strokeColorCampaign2 != "white");
let e2 = graph.insertEdge(parent, "campaigncreateCampaignPhoneCall", "5500", createCampaign, phoneCall, "rounded=1;fontSize=16;strokeColor="+strokeColorCampaign2+";endArrow="+endArrowCampaign+";fontColor="+strokeColorCampaign);
e2.setVisible(strokeColorCampaign2 != "white");
let e3 = graph.insertEdge(parent, "campaignphysicalAppointmentCreateOpportunity", "4500", physicalAppointment, createOpportunity, "rounded=1;fontSize=16;strokeColor="+strokeColorCampaign2+";endArrow="+endArrowCampaign+";fontColor="+strokeColorCampaign);
e3.setVisible(strokeColorCampaign2 != "white");
let e4 = graph.insertEdge(parent, "campaignsendEmailCreateOpportunity", "8000", sendEmail, createOpportunity, "rounded=1;fontSize=16;strokeColor="+strokeColorCampaign2+";endArrow="+endArrowCampaign+";fontColor="+strokeColorCampaign);
e4.setVisible(strokeColorCampaign2 != "white");
let e5 = graph.insertEdge(parent, "campaignphoneCallPhysicalAppointment", "15000", phoneCall, physicalAppointment, "rounded=1;fontSize=16;strokeColor="+strokeColorCampaign2+";endArrow="+endArrowCampaign+";fontColor="+strokeColorCampaign);
e5.setVisible(strokeColorCampaign2 != "white");
let e6 = graph.insertEdge(parent, "campaignsourceCampaignCreateCampaign", "20000", sourceCampaign, createCampaign, "rounded=1;fontSize=16;strokeColor="+strokeColorCampaign2+";endArrow="+endArrowCampaign+";fontColor="+strokeColorCampaign);
e6.setVisible(strokeColorCampaign2 != "white");
let e7 = graph.insertEdge(parent, "campaigncreateOpportunitySinkCampaign", "18000", createOpportunity, sinkCampaign, "rounded=1;fontSize=16;strokeColor="+strokeColorCampaign2+";endArrow="+endArrowCampaign+";fontColor="+strokeColorCampaign);
e7.setVisible(strokeColorCampaign2 != "white");
let e8 = graph.insertEdge(parent, "campaigncreateCampaignPhysicalAppointment", "5000", createCampaign, physicalAppointment, "rounded=1;fontSize=16;strokeColor="+strokeColorCampaign2+";endArrow="+endArrowCampaign+";fontColor="+strokeColorCampaign);
e8.setVisible(strokeColorCampaign2 != "white");
let e9 = graph.insertEdge(parent, "campaignPhysicalAppointmentPhoneCall", "15000", physicalAppointment, phoneCall, "rounded=1;fontSize=16;strokeColor="+strokeColorCampaign2+";endArrow="+endArrowCampaign+";fontColor="+strokeColorCampaign);
e9.setVisible(strokeColorCampaign2 != "white");
let e10 = graph.insertEdge(parent, "campaignPhoneCallCreateOpportunity", "5000", phoneCall, createOpportunity, "rounded=1;fontSize=16;strokeColor="+strokeColorCampaign2+";endArrow="+endArrowCampaign+";fontColor="+strokeColorCampaign);
e10.setVisible(strokeColorCampaign2 != "white");
let e11 = graph.insertEdge(parent, "campaignCreateOpportunityCreateOpportunity", "13000", createOpportunity, createOpportunity, "rounded=1;fontSize=16;strokeColor="+strokeColorCampaign2+";endArrow="+endArrowCampaign+";fontColor="+strokeColorCampaign);
e11.setVisible(strokeColorCampaign2 != "white");
let e12 = graph.insertEdge(parent, "sourceCustomerCreateCampaign", "50000", sourceCustomer, createCampaign, "rounded=1;fontSize=16;strokeColor="+strokeColorCustomer2+";endArrow="+endArrowCustomer+";fontColor="+strokeColorCustomer);
e12.setVisible(strokeColorCustomer2 != "white");
let e13 = graph.insertEdge(parent, "sendEmailSinkCustomer", "10000", sendEmail, sinkCustomer, "rounded=1;fontSize=16;strokeColor="+strokeColorCustomer2+";endArrow="+endArrowCustomer+";fontColor="+strokeColorCustomer);
e13.setVisible(strokeColorCustomer2 != "white");
let e14 = graph.insertEdge(parent, "phoneCallSinkCustomer", "3000", phoneCall, sinkCustomer, "rounded=1;fontSize=16;strokeColor="+strokeColorCustomer2+";endArrow="+endArrowCustomer+";fontColor="+strokeColorCustomer);
e14.setVisible(strokeColorCustomer2 != "white");
let e15 = graph.insertEdge(parent, "physicalAppointmentSinkCustomer", "1000", physicalAppointment, sinkCustomer, "rounded=1;fontSize=16;strokeColor="+strokeColorCustomer2+";endArrow="+endArrowCustomer+";fontColor="+strokeColorCustomer);
e15.setVisible(strokeColorCustomer2 != "white");
let e16 = graph.insertEdge(parent, "createCampaignSendEmail", "25000", createCampaign, sendEmail, "rounded=1;fontSize=16;strokeColor="+strokeColorCustomer2+";endArrow="+endArrowCustomer+";fontColor="+strokeColorCustomer);
e16.setVisible(strokeColorCustomer2 != "white");
let e17 = graph.insertEdge(parent, "createCampaignPhoneCall", "15000", createCampaign, phoneCall, "rounded=1;fontSize=16;strokeColor="+strokeColorCustomer2+";endArrow="+endArrowCustomer+";fontColor="+strokeColorCustomer);
e17.setVisible(strokeColorCustomer2 != "white");
let e18 = graph.insertEdge(parent, "createCampaignPhysicalAppointment", "10000", createCampaign, physicalAppointment, "rounded=1;fontSize=16;strokeColor="+strokeColorCustomer2+";endArrow="+endArrowCustomer+";fontColor="+strokeColorCustomer);
e18.setVisible(strokeColorCustomer2 != "white");
let e19 = graph.insertEdge(parent, "sendEmailCreateOpportunity", "15000", sendEmail, createOpportunity, "rounded=1;fontSize=16;strokeColor="+strokeColorCustomer2+";endArrow="+endArrowCustomer+";fontColor="+strokeColorCustomer);
e19.setVisible(strokeColorCustomer2 != "white");
let e20 = graph.insertEdge(parent, "phoneCallCreateOpportunity", "7000", phoneCall, createOpportunity, "rounded=1;fontSize=16;strokeColor="+strokeColorCustomer2+";endArrow="+endArrowCustomer+";fontColor="+strokeColorCustomer);
e20.setVisible(strokeColorCustomer2 != "white");
let e21 = graph.insertEdge(parent, "physicalAppointmentCreateOpportunity", "9000", physicalAppointment, createOpportunity, "rounded=1;fontSize=16;strokeColor="+strokeColorCustomer2+";endArrow="+endArrowCustomer+";fontColor="+strokeColorCustomer);
e21.setVisible(strokeColorCustomer2 != "white");
let e22 = graph.insertEdge(parent, "opportunityLostSinkCustomer", "10000", opportunityLost, sinkCustomer, "rounded=1;fontSize=16;strokeColor="+strokeColorCustomer2+";endArrow="+endArrowCustomer+";fontColor="+strokeColorCustomer);
e22.setVisible(strokeColorCustomer2 != "white");
let e23 = graph.insertEdge(parent, "opportunityWonSinkCustomer", "21000", opportunityWon, sinkCustomer, "rounded=1;fontSize=16;strokeColor="+strokeColorCustomer2+";endArrow="+endArrowCustomer+";fontColor="+strokeColorCustomer);
e23.setVisible(strokeColorCustomer2 != "white");
let e24 = graph.insertEdge(parent, "createOpportunityUpdateRecordCustomers", "31000", createOpportunity, updateCustomerRecord, "rounded=1;fontSize=16;strokeColor="+strokeColorCustomer2+";endArrow="+endArrowCustomer+";fontColor="+strokeColorCustomer);
e24.setVisible(strokeColorCustomer2 != "white");
let e25 = graph.insertEdge(parent, "updateCustomerRecordOpportunityWon", "21000", updateCustomerRecord, opportunityWon, "rounded=1;fontSize=16;strokeColor="+strokeColorCustomer2+";endArrow="+endArrowCustomer+";fontColor="+strokeColorCustomer);
e25.setVisible(strokeColorCustomer2 != "white");
let e26 = graph.insertEdge(parent, "updateCustomerRecordOpportunityLost", "10000", updateCustomerRecord, opportunityLost, "rounded=1;fontSize=16;strokeColor="+strokeColorCustomer2+";endArrow="+endArrowCustomer+";fontColor="+strokeColorCustomer);
e26.setVisible(strokeColorCustomer2 != "white");
let e27 = graph.insertEdge(parent, "opportunityLostCreateCampaign", "8000", opportunityLost, createCampaign, "rounded=1;fontSize=16;strokeColor="+strokeColorCustomer2+";endArrow="+endArrowCustomer+";fontColor="+strokeColorCustomer);
e27.setVisible(strokeColorCustomer2 != "white");
let e28 = graph.insertEdge(parent, "opportunityWonCreateCampaign", "1000", opportunityWon, createCampaign, "rounded=1;fontSize=16;strokeColor="+strokeColorCustomer2+";endArrow="+endArrowCustomer+";fontColor="+strokeColorCustomer);
e28.setVisible(strokeColorCustomer2 != "white");
let e29 = graph.insertEdge(parent, "OPPORTUNITYsourceOpportunityCreateOpportunity", "31000", sourceOpportunity, createOpportunity, "rounded=1;fontSize=16;strokeColor="+strokeColorOpportunity2+";endArrow="+endArrowOpportunity+";fontColor="+strokeColorOpportunity);
e29.setVisible(strokeColorOpportunity2 != "white");
let e30 = graph.insertEdge(parent, "OPPORTUNITYopportunityLostsinkOpportunity", "21000", opportunityLost, sinkOpportunity, "rounded=1;fontSize=16;strokeColor="+strokeColorOpportunity2+";endArrow="+endArrowOpportunity+";fontColor="+strokeColorOpportunity);
e30.setVisible(strokeColorOpportunity2 != "white");
let e31 = graph.insertEdge(parent, "OPPORTUNITYopportunityWonsinkOpportunity", "10000", opportunityWon, sinkOpportunity, "rounded=1;fontSize=16;strokeColor="+strokeColorOpportunity2+";endArrow="+endArrowOpportunity+";fontColor="+strokeColorOpportunity);
e31.setVisible(strokeColorOpportunity2 != "white");
let e32 = graph.insertEdge(parent, "OPPORTUNITYcreateOpportunitycreateQuotation", "16000", createOpportunity, createQuotation, "rounded=1;fontSize=16;strokeColor="+strokeColorOpportunity2+";endArrow="+endArrowOpportunity+";fontColor="+strokeColorOpportunity);
e32.setVisible(strokeColorOpportunity2 != "white");
let e33 = graph.insertEdge(parent, "OPPORTUNITYcreateOpportunityupdateCustomerRecord", "15000", createOpportunity, updateCustomerRecord, "rounded=1;fontSize=16;strokeColor="+strokeColorOpportunity2+";endArrow="+endArrowOpportunity+";fontColor="+strokeColorOpportunity);
e33.setVisible(strokeColorOpportunity2 != "white");
let e34 = graph.insertEdge(parent, "OPPORTUNITYsendQuotationOpportunityWon", "10000", sendQuotation, opportunityWon, "rounded=1;fontSize=16;strokeColor="+strokeColorOpportunity2+";endArrow="+endArrowOpportunity+";fontColor="+strokeColorOpportunity);
e34.setVisible(strokeColorOpportunity2 != "white");
let e35 = graph.insertEdge(parent, "OPPORTUNITYsendQuotationOpportunityLost", "5000", sendQuotation, opportunityLost, "rounded=1;fontSize=16;strokeColor="+strokeColorOpportunity2+";endArrow="+endArrowOpportunity+";fontColor="+strokeColorOpportunity);
e35.setVisible(strokeColorOpportunity2 != "white");
let e36 = graph.insertEdge(parent, "OPPORTUNITYupdateCustomerRecordOpportunityWon", "10000", updateCustomerRecord, opportunityWon, "rounded=1;fontSize=16;strokeColor="+strokeColorOpportunity2+";endArrow="+endArrowOpportunity+";fontColor="+strokeColorOpportunity);
e36.setVisible(strokeColorOpportunity2 != "white");
let e37 = graph.insertEdge(parent, "OPPORTUNITYcreateQuotationSendQuotation", "10000", createQuotation, sendQuotation, "rounded=1;fontSize=16;strokeColor="+strokeColorOpportunity2+";endArrow="+endArrowOpportunity+";fontColor="+strokeColorOpportunity);
e37.setVisible(strokeColorOpportunity2 != "white");
let e38 = graph.insertEdge(parent, "OPPORTUNITYupdateCustomerRecordCreateQuotation", "10000", updateCustomerRecord, createQuotation, "rounded=1;fontSize=16;strokeColor="+strokeColorOpportunity2+";endArrow="+endArrowOpportunity+";fontColor="+strokeColorOpportunity);
e38.setVisible(strokeColorOpportunity2 != "white");
let e39 = graph.insertEdge(parent, "OPPORTUNITYupdateCustomerRecordSendQuotation", "5000", updateCustomerRecord, sendQuotation, "rounded=1;fontSize=16;strokeColor="+strokeColorOpportunity2+";endArrow="+endArrowOpportunity+";fontColor="+strokeColorOpportunity);
e39.setVisible(strokeColorOpportunity2 != "white");
let e40 = graph.insertEdge(parent, "OPPORTUNITYcreateQuotationUpdateCustomerRecord", "5000", createQuotation, updateCustomerRecord, "rounded=1;fontSize=16;strokeColor="+strokeColorOpportunity2+";endArrow="+endArrowOpportunity+";fontColor="+strokeColorOpportunity);
e40.setVisible(strokeColorOpportunity2 != "white");
let e41 = graph.insertEdge(parent, "OPPORTUNITYsendQuotationUpdateCustomerRecord", "5000", sendQuotation, updateCustomerRecord, "rounded=1;fontSize=16;strokeColor="+strokeColorOpportunity2+";endArrow="+endArrowOpportunity+";fontColor="+strokeColorOpportunity);
e41.setVisible(strokeColorOpportunity2 != "white");
var layout = new mxHierarchicalLayout(graph, mxConstants.DIRECTION_WEST);
layout.interRankCellSpacing=65;
graph.getModel().beginUpdate();
layout.execute(parent);
graph.getModel().endUpdate();
graph.fit();
graph.view.rendering = true;
graph.refresh();
</script>
</body>
</html>