-
Notifications
You must be signed in to change notification settings - Fork 0
/
out.html
194 lines (168 loc) · 10.6 KB
/
out.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
189
190
191
192
193
194
<style>
.link {
stroke: #777;
stroke-opacity: 0.3;
stroke-width: 1.0px;
}
.node circle {
fill: #ccc;
stroke: #000;
stroke-width: 0px;
}
.node text {
display: none;
font: 10px sans-serif;
}
.node:hover circle {
fill: #000;
}
.node:hover text {
display: inline;
}
.cell {
fill: none;
pointer-events: all;
}
</style>
<body>
<!-- <script src="http://d3js.org/d3.v3.min.js"></script> -->
<script src="d3.v3.min.js"></script>
<script>
var width = 1200,
height = 1200;
var svg = d3.select("body").append("svg")
.attr("width", width)
.attr("height", height);
var force = d3.layout.force()
.size([width, height]);
//d3.csv("out.csv", function(error, links2) {
var links = getData();
// if (error) throw error;
var nodesByName = {};
// Create nodes for each unique source and target.
links.forEach(function(link) {
link.source = nodeByName(link.source);
link.target = nodeByName(link.target);
});
// Extract the array of nodes from the map by name.
var nodes = d3.values(nodesByName);
// Create the link lines.
var link = svg.selectAll(".link")
.data(links)
.enter().append("line")
.attr("class", "link");
// Create the node circles.
var node = svg.selectAll(".node")
.data(nodes)
.enter().append("g")
.attr("class", "node")
.call(force.drag);
var circle = node.append("circle")
.attr("r", 4.5);
var label = node.append("text")
.attr("dy", ".35em")
.text(function(d) { return d.name; });
// Start the force layout.
force
.nodes(nodes)
.links(links)
.on("tick", tick)
.start();
function tick() {
link.attr("x1", function(d) { return d.source.x; })
.attr("y1", function(d) { return d.source.y; })
.attr("x2", function(d) { return d.target.x; })
.attr("y2", function(d) { return d.target.y; });
circle.attr("cx", function(d) { return d.x; })
.attr("cy", function(d) { return d.y; });
label
.attr("x", function(d) { return d.x + 8; })
.attr("y", function(d) { return d.y; });
}
function nodeByName(name) {
return nodesByName[name] || (nodesByName[name] = {name: name});
}
//});
function getData() {
return [
{ source : "ret_add", target : "var AuthorizationServlet::decryptAttributes()::firstEqualSignIndex" },
{ source : "return AuthenticationRestServiceImpl::access$0() 73", target : "var this" },
{ source : "return AuthenticationRestServiceImpl::access$0() 73", target : "var this" },
{ source : "return Executors::newFixedThreadPool() 88", target : "return Integer::intValue()" },
{ source : "return JAXRSClientFactory::create() 37", target : "return AuthorizationServlet_getApplicationServiceURL" },
{ source : "return JWTFactory::initialize() 80", target : "return Long::longValue()" },
{ source : "return JWTFactory::initialize() 80", target : "return SystemConfig::readConfigLong() 79" },
{ source : "return Log::error() 33", target : "return Exception::getMessage()" },
{ source : "return Log::error() 39", target : "return Exception::getMessage()" },
{ source : "return ModelUtil::toWsAuthTokenExt() 72", target : "var input" },
{ source : "return Password::isValid() 71", target : "return WsPasswordInfo::getPasswordSalt()" },
{ source : "return Password::isValid() 71", target : "return WsUser::getWsPasswordInfo()" },
{ source : "return URLDecoder::decode() 59", target : "var encrypted" },
{ source : "return URLEncoder::encode() 42", target : "var error" },
{ source : "return URLEncoder::encode() 43", target : "var appName" },
{ source : "return URLEncoder::encode() 45", target : "var appName" },
{ source : "return URLEncoder::encode() 46", target : "var error" },
{ source : "return Validator::isSingleEmailAddressValid() 14", target : "return WsUserAgent::getUserName()" },
{ source : "return WebClient::client() 38", target : "static_AuthorizationServlet_getApplicationClient_applicationRestService" },
{ source : "return XmlUtil::fromXml() 31", target : "var responseStr" },
{ source : "var AuthenticationProviderImpl::authenticate()::authoritiesMapper", target : "return NullAuthoritiesMapper_<init>" },
{ source : "var AuthenticationProviderImpl::authenticate()::result", target : "return UsernamePasswordAuthenticationToken_<init>" },
{ source : "var AuthenticationProviderImpl::authenticate()::user", target : "return User_<init>" },
{ source : "var AuthenticationProviderImpl::authenticate()::username", target : "var authentication" },
{ source : "var AuthenticationRestServiceImpl::<init>()::cacheUrls", target : "return SystemConfig::getValue() 81" },
{ source : "var AuthenticationRestServiceImpl::<init>()::e", target : "return Integer::valueOf() 87" },
{ source : "var AuthenticationRestServiceImpl::<init>()::e", target : "return SystemConfig::getIntValue() 84" },
{ source : "var AuthenticationRestServiceImpl::<init>()::e", target : "var this" },
{ source : "var AuthenticationRestServiceImpl::<init>()::isTest", target : "return SystemConfig::getBoolValue() 77" },
{ source : "var AuthenticationRestServiceImpl::<init>()::keyAlias", target : "return SystemConfig::getValue() 75" },
{ source : "var AuthenticationRestServiceImpl::<init>()::keyStorePassword", target : "return SystemConfig::getValue() 76" },
{ source : "var AuthenticationRestServiceImpl::<init>()::privateKeyPath", target : "return SystemConfig::getValue() 74" },
{ source : "var AuthenticationRestServiceImpl::authorizeAuthToken()::clientAuthToken", target : "return AuthenticationRestServiceImpl::getWsAuthTokenExt()" },
{ source : "var AuthenticationRestServiceImpl::authorizeJWT()::clientAuthToken", target : "return AuthenticationRestServiceImpl::getWsAuthTokenExt()" },
{ source : "var AuthorizationServlet::decryptAttributes()::authTokenEncryptionKey", target : "return SystemConfig::getValue() 58" },
{ source : "var AuthorizationServlet::decryptAttributes()::message", target : "return URLDecoder::decode() 59" },
{ source : "var AuthorizationServlet::decryptAttributes()::parameters", target : "return HashMap_<init>" },
{ source : "var AuthorizationServlet::doGet()::cookie", target : "return Cookie_<init>" },
{ source : "var AuthorizationServlet::doGet()::i", target : "return ApplicationUtility::getApplicationByAppKey()" },
{ source : "var AuthorizationServlet::doGet()::i", target : "return ApplicationUtility::getApplicationPermissions()" },
{ source : "var AuthorizationServlet::doGet()::i", target : "return AuthorizationServlet_getAdditionalRedirectUrisFromConfig" },
{ source : "var AuthorizationServlet::doGet()::keyValue", target : "return AuthorizationServlet_handleError" },
{ source : "var AuthorizationServlet::doGet()::keyValue", target : "return WsApplication::getCallbackUrls()" },
{ source : "var AuthorizationServlet::doGet()::keyValue", target : "static_AuthorizationServlet_doGet_applicationUtility" },
{ source : "var AuthorizationServlet::doGet()::keyValue", target : "var AuthorizationServlet::doGet()::i" },
{ source : "var AuthorizationServlet::doGet()::permId", target : "return AuthorizationServlet_generateParameterMap" },
{ source : "var AuthorizationServlet::doGet()::responseType", target : "return Log::info() 13" },
{ source : "var AuthorizationServlet::doGet()::sessionId", target : "var request" },
{ source : "var AuthorizationServlet::doGet()::wsPermission", target : "return ApplicationUtility::getPermission()" },
{ source : "var AuthorizationServlet::doGet()::wsPermission", target : "return AuthorizationServlet::getSessionCache() 10" },
{ source : "var AuthorizationServlet::doPost()::httpResponse", target : "return HTTPClientUtil::post() 17" },
{ source : "var AuthorizationServlet::doPost()::payload", target : "return XmlUtil::toXml() 15" },
{ source : "var AuthorizationServlet::doPost()::responseStr", target : "return HTTPClientUtil::readResponse() 18" },
{ source : "var AuthorizationServlet::doPost()::responseType", target : "return WsUserAgent::getResponseType()" },
{ source : "var AuthorizationServlet::doPost()::sessionId", target : "return AuthorizationServlet_getSessionIdFromCookie" },
{ source : "var AuthorizationServlet::doPost()::state", target : "return WsUserAgent::getState()" },
{ source : "var AuthorizationServlet::doPost()::valid", target : "return Validator::isSingleEmailAddressValid() 14" },
{ source : "var AuthorizationServlet::doPost()::wsAuthToken2", target : "return XmlUtil::fromXml() 19" },
{ source : "var AuthorizationServlet::doPost()::wsUserAgent", target : "return Log::info() 26" },
{ source : "var AuthorizationServlet::encryptAttributes()::authTokenEncryptionKey", target : "return SystemConfig::getValue() 55" },
{ source : "var AuthorizationServlet::encryptAttributes()::nonce", target : "return CodeGenerator::generateCode() 54" },
{ source : "var AuthorizationServlet::formatErrorWithDealerInfo()::appName", target : "return WsApplication::getAppName()" },
{ source : "var AuthorizationServlet::formatErrorWithDealerInfo()::wsApplication", target : "return ApplicationUtility::getApplicationByAppKey()" },
{ source : "var AuthorizationServlet::generateParameterMap()::parameters", target : "return HashMap_<init>" },
{ source : "var AuthorizationServlet::getApplicationClient()::client", target : "return WebClient::client() 38" },
{ source : "var AuthorizationServlet::getErrorHTTPResponse()::args", target : "new_array" },
{ source : "var AuthorizationServlet::getErrorHTTPResponse()::c4ErrorResponse", target : "return XmlUtil::fromXml() 31" },
{ source : "var AuthorizationServlet::getErrorHTTPResponse()::errorMap", target : "return AuthorizationServlet::getErrorMappings()" },
{ source : "var AuthorizationServlet::getErrorHTTPResponse()::message", target : "return Method::invoke()" },
{ source : "var AuthorizationServlet::getErrorMappings()::eMap", target : "return HashMap_<init>" },
{ source : "var AuthorizationServlet::getMethod()::args", target : "new_array" },
{ source : "var AuthorizationServlet::getMethod()::args", target : "return Object::getClass()" },
{ source : "var AuthorizationServlet::getMethod()::retVal", target : "return Class::getDeclaredMethod()" },
{ source : "var AuthorizationServlet::getSessionCache()::cacheUrls", target : "return SystemConfig::getValue() 0" },
{ source : "var AuthorizationServlet::getSessionCache()::e", target : "new_object::SimpleCache" },
{ source : "var AuthorizationServlet::getSessionIdFromCookie()::cookie", target : "var AuthorizationServlet::getSessionIdFromCookie()::i" },
{ source : "var AuthorizationServlet::getSessionIdFromCookie()::cookies", target : "var request" },
{ source : "var AuthorizationServlet::getSessionIdFromCookie()::sessionId", target : "return Cookie::getValue()" },
];
}
</script>