-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.html
211 lines (199 loc) · 10.1 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
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
205
206
207
208
209
210
211
<html>
<head>
<title>Toap - artillery.io http recorder</title>
<meta http-equiv="Cache-control" content="no-cache">
<meta http-equiv='expires' content='0'>
<meta http-equiv='pragma' content='no-cache'>
<link rel="stylesheet" href="css/material-icon-fonts.css" >
<link rel="stylesheet" href="css/materialize.min.css">
<link rel="stylesheet" href="css/ribbons.css">
<style>
.row {
margin-bottom: 10px;
}
[type="checkbox"]+label {
font-size: 0.8rem;
}
.btn:hover {
background-color: #42a5f5;
}
</style>
</head>
<body>
<div id="app">
<!-- Navbar goes here -->
<!-- Page Layout here -->
<div class="row">
<div class="col s12 m4 l2">
<!-- This is the Title of page -->
<div class="row">
<div class="col s11 blue lighten-1">
<center><h4 class="white-text">{{title}}
</h4></center>
<h6><center class="white-text">artillery.io Web Recorder<center></h6>
</div>
</div>
<div class="row">
<div class="input-field col s10">
<input v-model="urlToRecord" id="urlToRecord" type="url" :disabled="toapProxyStatus.length > 0" class="validate">
<label data-error="not a valid url" for="urlToRecord" class="cyan-text">URL To Record *</label>
</div>
</div>
<div class="row">
<div class="col s10">
<input type="checkbox" class="filled-in blue lighten-1" id="recordThinkTime" value="recordThinkTime" v-model="recordThinkTime" :disabled="toapProxyStatus.length > 0">
<label for="recordThinkTime">Record Think Time</label>
</div>
<div class="col s10">
<p></p>
<input type="checkbox" class="filled-in" id="recordHeaders" value="recordHeaders" v-model="recordHeaders" :disabled="toapProxyStatus.length > 0">
<label class="small" for="recordHeaders">Record Headers</label>
</div>
<div class="row">
<div class="input-field col s10">
<input v-model="fileName" id="fileName" type="text" :disabled="toapProxyStatus.length > 0" class="validate">
<label for="fileName" class="cyan-text">Save To File *</label>
</div>
<!-- Browser Window switch -->
<div class="row">
<div class="switch col s10">
<label>Open New Browser Window</label>
<label>
Off
<input type="checkbox" v-model="newWindow" :disabled="toapProxyStatus.length > 0">
<span class="lever"></span>
On
</label>
</div>
<p><br></p><p></p>
<div class="col s10 truncate" v-if='newWindow && proxyURL[0]' style="padding-top: 15px">
<a href="{{proxyURL[0]}}" target="_blank">{{urlToRecord}}</a>
</div>
</div>
<div v-if="toapProxyStatus.length > 0" class="input-field col s9">
<input v-model="comments" id="comments" type="text" :disabled="!proxyURL[0]">
<label for="comments">Add Comments</label>
<small class=resize-note>add comments to flow ⤴</small>
</div>
<div v-if="toapProxyStatus.length > 0" class="col s1" style="padding-top: 25;"> <!-- v-if="comments && toapProxyStatus.length > 0" -->
<button class="btn-floating btn-tiny waves-effect waves-light blue" v-on:click="addComments()" :disabled="!comments">
<i class="material-icons large">add</i>
</button>
</div>
</div>
</div>
<!-- Start Server -->
<div class="row">
<button :disabled="!urlToRecord || !fileName" v-if='toapProxyStatus.length === 0' type="button" class="btn btn-primary blue lighten-1 col s10 waves-effect {{startToapButton}}" v-on:click="startPorxyServer()"
<a class="waves-effect waves-light btn">
<i class="material-icons right">cloud</i>
Start {{title}}</a>
</button>
<button v-if='toapProxyStatus.length > 0' type="button" class="btn btn-primary red lighten-1 waves-effect col s10" v-on:click="stopProxyServer()" :disabled="!proxyURL[0]"
<a class="waves-effect waves-light btn">
<i class="material-icons right">cloud</i>
Stop {{title}}</a>
</button>
</div>
<div class="row" v-if='downloadFlowFile.length > 0' v-for="file in downloadFlowFile">
<div class="divider s4"></div><p></p>
<a class="btn btn-primary blue lighten-1 col s10 waves-effect truncate" href="/flow/{{file}}.json" download
@click="downloadFlow()" <a class="waves-effect waves-light btn">
<i class="material-icons right">file_download</i>
Flow - {{file}}</a>
</a>
</div>
</div>
<div class="col s12 m8 l10"> <!-- Note that "m8 l9" was added -->
<!-- Teal page content
This content will be:
9-columns-wide on large screens,
8-columns-wide on medium screens,
12-columns-wide on small screens -->
<div class="ribbon right green" style="z-index:10">
<a href="https://github.com/rupeshmore/toap">Star ★ me on GitHub</a>
</div>
<ul class="collection" v-if='proxyURL.length > 0 && !newWindow'>
<head>
<!--<meta http-Equiv="Cache-Control" Content="no-cache" />
<meta http-Equiv="Pragma" Content="no-cache" />
<meta http-Equiv="Expires" Content="0" />-->
</head>
<body style="margin:0px;padding:0px;overflow:hidden">
<iframe :src="proxyURL[0]" frameborder="0" style="overflow:hidden;height:100%;width:100%;display:block;" height="100%" width="100%"></iframe>
</body>
</ul>
<ul class="collection" v-else>
<div class="container">
<h2 class="header center blue-text">{{title}} (तोप)</h2>
<div class="row center">
<h6 class="header col s12 bold"><a href="https://artillery.io/">Artillery.io</a> http(s) recorder based on node.js</h6>
</div>
<h5 class="header center col s12 light green-text">This iframe will be replaced once recording starts.</h5>
<br><br>
<div class="row">
<div class="col s6">
<ul class="light">
<li class="collection-header"><h5>Features</h5></li>
<li><span class="green-text">✓</span> Calculate Think Time between requests.<li><p></p>
<li><span class="green-text">✓</span> Configure to record think time and headers.<li><p></p>
<li><span class="green-text">✓</span> Add comments to the script.<li><p></p>
<li><span class="green-text">✓</span> Download the JSON flow file at any point in time.<li><p></p>
</ul>
</div>
<div class="col s6">
<ul class="light">
<li class="collection-header"><h5>Getting Started</h5></li>
<li><span>•</span> <mark>Clear Browser cache before each recording.</mark></li>
<li><span>•</span> Enter the Url To Record. (Should start with 'http://' )</li>
<li><span>•</span> Configure to record think-time or headers.</li>
<li><span>•</span> Enter the Script File Name to record the requests.</li>
<li><span>•</span> Click Start {{title}} Button to start recording.</li>
<li><span>•</span> Once recording has started add comments to the script.</li>
<li><span>•</span> Download script using the download button.</li>
</ul>
</div>
</div>
<br><br>
<div class="row center">
<p class="header col s12 bold">Click here for <a class="center" href="https://youtu.be/wpwDhpZSP8k" target="_blank">Toap (तोप) Demo Video</a></p>
</div>
<p class="light center">Note: websites with 'X-Frame-Options' set to 'SAMEORIGIN' will not display in this page due to iframe restrictions.<br>Set the 'Open New Browser Window' to record requests.</p>
<br>
<!--<p class="center">By Test Developer, for developers and testers</p>-->
</div>
</ul>
<!-- Modal Structure -->
<div id="toapRunning" class="modal">
<div class="modal-content">
<h4>Toap is Up & Running.</h4>
<p class="light">Toap was started from another browser or the Toap cache was cleared.</p>
<p class="light">All the Toap settings in this browser are disabled.</p>
<p class="light">Close Toap in the browser from where it was started or restart the node service.</p>
</div>
<div class="modal-footer">
<a class="modal-action modal-close btn">Close</a>
</div>
</div>
</div>
</div>
</div>
<script src="js/jquery-2.2.3.min.js"></script>
<script src="js/vue.min.js"></script>
<script src="js/materialize.min.js"></script>
<script src="js/vueApp.js"></script>
<script>
// analytics
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-85613401-1', 'auto');
ga('send', 'pageview');
$(document).ready(function() {
Materialize.updateTextFields();
});
$(".button-collapse").sideNav();
</script>
</body>
<html>