54
54
.content {
55
55
margin : 0 auto;
56
56
width : 800px ;
57
- padding : 10px ;
58
57
background-repeat : no-repeat;
59
- background-position : 760 px 22 px ;
58
+ background-position : 732 px 12 px ;
60
59
background-image : url (data:image/png;base64, iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH4AMJADYhJU0FUwAAClNJREFUaN61mntwVNUdxz/3LsHIM8meDQEVKqiVooUy4ouiUq0K7AmCIx0dpx2xHVo7fWk743RatTrVjqPS1lbr27ZWpjJC2LMgtlVq8V20agedFikKEpLs2U2IPEOS2z/u797sbvaG3QV+M5ndvefcc37fc87v9T1xOBJJW0gq//ta69KPAuLAOOBkYDx4o/0Ozh6gDfgf0A5kodeim/oAMBa0qloVp6q3Nngw1wnANODxAyDpK04cGHaYEfp8ILQBzwP3oVUbACs74KrGYwwkWDVja4AZwK3AAmntFsW2ABuBfwPbgU+lfTRwInAGMAf4rOxcnbT/DbgFeButDla6Q+UDWbULFo8HY2cCDwMz5f1NwJ3AW0A7Wh0sc1GGC5DpwM3AbGl5D/g2Wr3MURXTEUw8GmOXY6yHsYcwdiMmOzPst9ZWYWPZvHky0zD2BYw9KHM8grF10naEO5Ky0KzA2DOAtcBE4CPgK+D8Ex33SHWBexCS46pbqNROcGpBx4MF+wLwNHA6sAtYjFavk+6AZGMVEzz7UTDwxbID/Rj78MBR6+aYisneh7G9Mm+yylWyAYhlGNsnW50c1H4sJJXJt6O5MreHsTcBsMZWDOISAdFNOntW6LX81co755kjXHk79POUnYaxWQHTXK7NBINMl231MPasAsMcADMeY28fUpnywahwrFQnpFuLF3Vq3s5ccHhjX3EARu8Zg8dmYAKQRKvnMBZi/dAbg+Y4GLsIWCVvzUOr9VVnBgdwOI71wKXAGvCWohM5TNZ3AEE8Sdk5OLwI5HD4HEmVZfU2WHQyAG7BVl5dCx53SeB6KAShFfSEIO7JAwHwIMa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eV6WzJg7CSMbcXYPxRwzQVXGPYamSeHsfWVXbwYOwVju+Sy5/sFt0kDfUZh7AKMjfPim9XFkTW2BmMHkxwmnGupXP3tFQKjCjdv7DSM7ZTV+CUmM7wICEddBi6SYhh7m8z9KcaeA8CGbdUOaCdh7DYZ8B2MnXTsQIS70Iixr8ucuzD2NJ+myg1R+pcPbC0wX37dIEx5V3gt0Vzl9fT6fXD5iGCOMcCVwGOi29/p4TKuVD2HG8Yte2dqapJCoO0DHgDew9jbWLklFoKo5LY3GHcAxM2+R+JxoA+cJTjexVypesoZ16loYq1gTWYYrvMgsAhCpuUxycm2QX8W3Xhg6LE6jgM3LqXqtbLDAU+wFsf9BsmGAyHzXoZU9k81wbWAD6wJaBZe64Q8FtJK1fm+UKq7pW2MULBTgSZZhEDLjNzPrEIrv5hL5yDZULZqTtWGubodFo0LQM0CluL/Y0xc6oSREW/uE3BZ4A3giTDZbNkLV4ysSh3n6Hqd9hjE6mX1R8nf8LyyNyDfusHrRCd6j9bU/wcOxBkv5BVVWAAAAABJRU5ErkJggg==);
61
60
}
62
- .content h1 {
63
- margin : 30px 0px ;
61
+ .content .header {
62
+ padding-top : 20px ;
63
+ padding-bottom : 30px ;
64
+ }
65
+ .content .header h1 {
66
+ font-weight : bold;
67
+ font-size : 2em ;
64
68
}
65
69
input : disabled {
66
70
background-color : # ccc ;
88
92
border : none;
89
93
border-radius : 2px ;
90
94
}
95
+ .helpBox {
96
+ margin-top : 10px ;
97
+ margin-bottom : 10px ;
98
+ }
91
99
# output {
92
100
min-height : 100px ;
93
- background-color : lightgray ;
101
+ background-color : # F2F2F2 ;
94
102
margin-top : 6px ;
95
- border : 1px solid gray;
96
- border-radius : 4px ;
97
- padding : 4px ;
103
+ border : 1px solid # 00A0DF ;
98
104
font-family : monospace;
99
105
}
100
106
# output .command {
107
+ color : # 00607C ;
108
+ margin-top : 10px ;
109
+ margin-bottom : 10px ;
110
+ }
111
+ # output pre .output {
112
+ color : # 414042 ;
113
+ margin-left : 1% ;
114
+ width : 96% ;
101
115
}
102
- # output .output {
103
- color : red;
104
- margin-bottom : 5px ;
116
+ # output textarea .output {
117
+ color : # 414042 ;
118
+ margin-left : 1% ;
119
+ width : 96% ;
120
+ background-color : # 00000000 ;
121
+ border : solid 1px # 999 ;
122
+ overflow-x : scroll;
123
+ overflow-y : auto;
124
+ height : 150px ;
105
125
}
106
126
.warn {
107
127
border-color : red;
108
128
}
109
129
</ style >
110
130
< title > Network connectivity tools</ title >
111
- < script src ="/ js/jquery.min.js " type ="text/javascript "> </ script >
112
- < script src ="/ js/toastr.min.js " type ="text/javascript "> </ script >
113
- < link href ="/ css/toastr.min.css " rel ="stylesheet " />
131
+ < script src ="js/jquery.min.js " type ="text/javascript "> </ script >
132
+ < script src ="js/toastr.min.js " type ="text/javascript "> </ script >
133
+ < link href ="css/toastr.min.css " rel ="stylesheet " />
114
134
</ head >
115
135
< body >
116
136
< div class ="content ">
117
- < h1 > Network connectivity tools</ h1 >
137
+ < div class =" header " > < h1 > Network connectivity tools</ h1 > </ div >
118
138
< form id ="theForm " action ="# ">
119
- < div >
139
+ < div >
120
140
< select name ="operation " id ="operation ">
121
141
< option value ="ping " selected > Ping</ option >
122
142
< option value ="traceroute "> Traceroute</ option >
@@ -125,14 +145,21 @@ <h1>Network connectivity tools</h1>
125
145
< option value ="curl "> curl</ option >
126
146
</ select >
127
147
< input name ="ip " placeholder ="IP Address or Host " type ="text " title ="IP " id ="ip " />
128
- < input name ="path " placeholder ="Path " type ="text " title ="PATH " id ="path " />
129
148
< input name ="port " placeholder ="Port " type ="text " title ="PORT " id ="port " />
149
+ < input name ="path " placeholder ="Path " type ="text " title ="PATH " id ="path " />
130
150
< button type ="button " id ="check "> Run</ button >
131
151
< button type ="button " id ="clean "> Clean Console</ button >
132
- </ div >
152
+ </ div >
133
153
</ form >
134
- < div id ="output ">
135
- </ div >
154
+ < div >
155
+ < div class ="helpBox " id ="pingHelp "> Set an IP Address or Hostname and hit Run</ div >
156
+ < div class ="helpBox " id ="tracerouteHelp " style ="display: none; "> Set an IP Address or Hostname and hit Run</ div >
157
+ < div class ="helpBox " id ="socketHelp " style ="display: none; "> Set an IP Address or Hostname, the Port and hit Run</ div >
158
+ < div class ="helpBox " id ="dnsHelp " style ="display: none; "> Set a Hostname and hit Run</ div >
159
+ < div class ="helpBox " id ="curlHelp " style ="display: none; "> Set an IP Address or Hostname, the Path, the Port and hit Run</ div >
160
+ </ div >
161
+ < pre id ="output ">
162
+ </ pre >
136
163
</ div >
137
164
< script type ="text/javascript ">
138
165
$ ( document ) . ready ( function ( ) {
@@ -158,23 +185,30 @@ <h1>Network connectivity tools</h1>
158
185
var operation = e . target . value ;
159
186
var inputs = $ ( "#theForm input" ) . removeClass ( ) ;
160
187
inputs . removeAttr ( "disabled" ) ;
188
+ var helps = $ ( ".helpBox" ) ;
189
+ helps . hide ( ) ;
161
190
switch ( operation ) {
162
191
case "ping" :
163
192
$ ( "#path" ) . attr ( "disabled" , true ) ;
164
193
$ ( "#port" ) . attr ( "disabled" , true ) ;
194
+ $ ( "#pingHelp" ) . show ( ) ;
165
195
break ;
166
196
case "traceroute" :
167
197
$ ( "#path" ) . attr ( "disabled" , true ) ;
168
198
$ ( "#port" ) . attr ( "disabled" , true ) ;
199
+ $ ( "#tracerouteHelp" ) . show ( ) ;
169
200
break ;
170
201
case "socket" :
171
202
$ ( "#path" ) . attr ( "disabled" , true ) ;
203
+ $ ( "#socketHelp" ) . show ( ) ;
172
204
break ;
173
205
case "dns" :
174
206
$ ( "#path" ) . attr ( "disabled" , true ) ;
175
207
$ ( "#port" ) . attr ( "disabled" , true ) ;
208
+ $ ( "#dnsHelp" ) . show ( ) ;
176
209
break ;
177
210
case "curl" :
211
+ $ ( "#curlHelp" ) . show ( ) ;
178
212
break ;
179
213
default :
180
214
@@ -213,13 +247,17 @@ <h1>Network connectivity tools</h1>
213
247
apiurl += '&path=' + path ;
214
248
apiurl += '&port=' + port ;
215
249
}
216
- console . log ( operation + " " + ip + " " + path + " " + port ) ;
250
+ console . log ( operation + " " + ip + " " + port + " " + path ) ;
217
251
$ . ajax ( {
218
252
url : apiurl
219
253
} )
220
254
. done ( function ( result ) {
221
- $ ( "#output" ) . append ( '<pre class="command">> ' + operation + ' ' + ip + ' ' + path + ' ' + port + '</pre>' ) ;
222
- $ ( "#output" ) . append ( '<pre class="output">' + result + '</pre>' ) ;
255
+ $ ( "#output" ) . append ( '<pre class="command">> ' + operation + ' ' + ip + ' ' + port + ' ' + path + '</pre>' ) ;
256
+ if ( operation === 'curl' ) {
257
+ $ ( "#output" ) . append ( '<textarea class="output">' + result + '</textarea>' ) ;
258
+ } else {
259
+ $ ( "#output" ) . append ( '<pre class="output">' + result + '</pre>' ) ;
260
+ }
223
261
} )
224
262
. fail ( function ( ) {
225
263
toastr [ "error" ] ( "Couldn't complete request" , "Error during invocation" )
0 commit comments