-
Notifications
You must be signed in to change notification settings - Fork 1
/
drtools-namespaces.html
204 lines (184 loc) · 7.04 KB
/
drtools-namespaces.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
195
196
197
198
199
200
201
202
203
204
<!DOCTYPE html>
<html>
<head>
<title>:: drtools-metric-visualization ::</title>
<meta charset="utf-8">
<script type="text/javascript" src="./js/drtools/loader.js"></script>
<script src="./js/drtools/jquery.min.js"></script>
<script src="./js/drtools/jquery.csv.min.js"></script>
<script src="./drtools-properties.js"></script>
<link href="https://fonts.googleapis.com/css?family=Poppins:100,200,300,400,500,600,700,800,900" rel="stylesheet">
<link rel="stylesheet" href="css/open-iconic-bootstrap.min.css">
<link rel="stylesheet" href="css/animate.css">
<link rel="stylesheet" href="css/owl.carousel.min.css">
<link rel="stylesheet" href="css/owl.theme.default.min.css">
<link rel="stylesheet" href="css/magnific-popup.css">
<link rel="stylesheet" href="css/aos.css">
<link rel="stylesheet" href="css/ionicons.min.css">
<link rel="stylesheet" href="css/flaticon.css">
<link rel="stylesheet" href="css/icomoon.css">
<link rel="stylesheet" href="css/style.css">
<style>
.bubbles {
stroke-width: 2px;
stroke: white;
}
.bubbles:hover {
stroke: black;
}
.text_table {
font-family: 'Poppins', Arial, sans-serif;
font-size: 13px;
line-height: 1.8;
font-weight: 400;
color: #000;
}
</style>
</head>
<body class="text-center">
<section class="ftco-section" id="header-section">
<div class="col-md-12 text-center heading-section ftco-animate">
<h2 class="mb-4"><script>document.write(graphTitles.titleNamespace)</script></h2>
<script>document.write(graphTitles.titleNamespaceExplanation)</script>
</div>
<div class="col-md-12 text-center heading-section ftco-animate">
Project: <script>document.write(optionsProject.projectName)</script>
</div>
<div class="nav-item text-center cta mr-md-2">
<a href="index.html" class="nav-link"><span>Back</span></a>
</div>
<div class="text">
<strong class="text-error"><div id="errorMessage"></div></strong>
</div>
</section>
<section class="ftco-section" id="graph-section">
<div class="text">
<table>
<tr>
<td><div class="mr-sm-2" id="noc" style="padding-left: 50px"></div></td>
<td><div class="mr-sm-2" id="nac"></div></td>
</tr>
</table>
<div id="chart_div"></div>
<div id="dashboard_div"></div>
</div>
</section>
<section class="ftco-section" id="metrics-section">
<div class="col-md-12 text-center heading-section ftco-animate">
<b>Statistics of Metrics</b>
</div>
<div id="table_metrics"></div>
</section>
<script src="js/jquery-migrate-3.0.1.min.js"></script>
<script src="js/popper.min.js"></script>
<script src="js/bootstrap.min.js"></script>
<script src="js/jquery.easing.1.3.js"></script>
<script src="js/jquery.waypoints.min.js"></script>
<script src="js/jquery.stellar.min.js"></script>
<script src="js/owl.carousel.min.js"></script>
<script src="js/jquery.magnific-popup.min.js"></script>
<script src="js/aos.js"></script>
<script src="js/jquery.animateNumber.min.js"></script>
<script src="js/scrollax.min.js"></script>
<script src="js/main.js"></script>
<script src="js/drtools/drtools-utils.js"></script>
<script>
$.ajax({
url: optionsProject.datasetStatisticOfNamespace,
dataType: 'text',
}).done(readStatisticTable);
function readStatisticTable(data) {
var allRows = data.split(/\r?\n|\r/);
var table = '<table class="table table-hover text_table">';
table += '<thead>';
table += '<tr>';
table += '<th scope="col">Metric</th>';
table += '<th scope="col">1st Quartile</th>';
table += '<th scope="col">3rd Quartile</th>';
table += '<th scope="col">Average</th>';
table += '<th scope="col">Median</th>';
table += '<th scope="col">Min Value</th>';
table += '<th scope="col">Max Value</th>';
table += '<th scope="col">Amplitude</th>';
table += '<th scope="col">Standard Deviation</th>';
table += '<th scope="col">Upper Fence</th>';
table += '<th scope="col">Threshold (greater than = bad)</th>';
table += '</tr>';
table += '</thead>';
table += '<tbody>';
for (var singleRow = 1; singleRow < allRows.length; singleRow++) {
table += '<tr>';
var rowCells = allRows[singleRow].split(',');
for (var rowCell = 0; rowCell < rowCells.length; rowCell++) {
table += '<td scope="col">';
if (rowCell === 0) table += rowCells[rowCell].replace(/^"|"$/g, '');
else table += parseFloat(rowCells[rowCell]).toFixed(2);
table += '</td>';
}
table += '</tr>';
}
table += '</tbody>';
table += '</table>';
$('#table_metrics').append(table);
}
</script>
<script>
if (!optionsProject.datasetNamespaces || 0 === optionsProject.datasetNamespaces.length === ''
|| !doesFileExist(optionsProject.datasetNamespaces)) {
$("#errorMessage").text(errorMessage.msgNamespaces)
}
else {
google.charts.load('current', {'packages':['corechart', 'controls']});
google.charts.setOnLoadCallback(drawBar);
function drawBar() {
var dashboard = new google.visualization.Dashboard(
document.getElementById('dashboard_div'));
$.get(optionsProject.datasetNamespaces, function(csvString) {
var arrayData = $.csv.toArrays(csvString, {onParseValue: $.csv.hooks.castToScalar});
var data = new google.visualization.arrayToDataTable(arrayData);
var noc = new google.visualization.ControlWrapper({
'controlType': 'NumberRangeFilter',
'containerId': 'noc',
'options': {
'filterColumnIndex': 1,
'ui': {
'labelStacking': 'horizontal',
'label': 'Number of Types/Classes (NOC)'
}
}
});
var nac = new google.visualization.ControlWrapper({
'controlType': 'NumberRangeFilter',
'containerId': 'nac',
'options': {
'filterColumnIndex': 2,
'ui': {
'labelStacking': 'horizontal',
'label': 'Number of Abstract Types/Classes (NAC)'
}
}
});
var barChart = new google.visualization.ChartWrapper({
'chartType': 'BarChart',
'containerId': 'chart_div',
'options': {
'width': 1300,
'height': 600,
'legend': { 'position': 'top', 'maxLines': 3 },
'bar': { 'groupWidth': '75%' },
'isStacked': true,
'fontName': 'Poppins',
'bars': 'horizontal'
},
'view': {'columns': [0, 1, 2]}
});
dashboard.bind([noc, nac], [barChart]);
dashboard.draw(data);
});
}
google.charts.setOnLoadCallback(drawBar);
}
</script>
<div id="chart_div" style="width: 1300px; height: 600px; font-family: 'Poppins', sans-serif"></div>
</body>
</html>