forked from apache/echarts
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
105 lines (91 loc) · 3.62 KB
/
index.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
<!DOCTYPE html>
<html>
<head>
<title>ECharts Stress Test</title>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="./dep/bootstrap/bootstrap.min.css">
<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
<style type="text/css">
.btn {
margin: 10px 10px 10px 0;
}
#report {
width: 100%;
height: 400px;
}
textarea {
height: 150px;
}
.progress-bar {
transition-duration: 0s;
}
</style>
</head>
<body id="app">
<div class="container">
<h1>ECharts Stress Test</h1>
<div>
<button class="btn" v-bind:class="{'btn-primary': !hasRun, 'btn-default': hasRun}" v-on:click="run">
Start
</button>
<button class="btn btn-primary" data-target="#export-modal" data-toggle="modal" v-if="hasRun">
Export
</button>
<span v-if="hasRun || isRunning">Elapsed time: {{ elapsedTime / 1000 }} seconds</span>
</div>
<div class="progress" v-if="isRunning">
<div class="progress-bar" role="progressbar" aria-valuenow="{{ progress }}" aria-valuemin="0" aria-valuemax="100" style="width: {{ progress }}%;">{{ progress }}%</div>
</div>
<div id="report" v-if="hasRun"></div>
<table id="test-table" class="table table-striped" v-if="hasRun">
<tr>
<th>Data Amount</th>
<th v-for="name in caseNames">{{ name }}</th>
</tr>
<tr v-for="(aid, amount) in amounts">
<td>{{ amount }}</td>
<th v-for="(cid, name) in caseNames">{{ times[aid][cid] }}</th>
</tr>
</table>
</div>
<div class="modal fade" id="export-modal" tabindex="-1" role="dialog">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
<h4 class="modal-title">Test Result</h4>
</div>
<div class="modal-body">
<div>
<button class="btn btn-primary" v-on:click="download">Download</button>
</div>
<textarea v-if="hasRun" class="form-control">{{ result }}</textarea>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
</div>
</div>
</div>
</div><!-- end of modal -->
<script src="./dep/jquery/jquery-2.2.4.js"></script>
<script src="./dep/bootstrap/bootstrap.min.js"></script>
<script src="./dep/vue/vue.min.js"></script>
<script src="./dep/lodash/lodash.js"></script>
<script src="./dep/filesaver/FileSaver.min.js"></script>
<script type="text/javascript" src="../dist/echarts.js"></script>
<script src="../test/esl.js"></script>
<script>
require.config({
baseUrl: './src'
});
require(['app']);
</script>
</body>
</html>