Client.html

The client.html file is a simple HTML file, with a table an input, to send the Request URL

Base Structure

<!DOCTYPE html>
<html lang="en">
<head>
    // Here Goes the Head Code
</head>
<body>
    // Here Goes the Body Code
</body>
</html>

Here we import all the remote resources and our script.

<meta charset="UTF-8">
<title>Redis Benchmark</title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<link rel="stylesheet" href="style.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<script src="clientScript.js"></script>

Body

Here we create the table, with it's headers, and the input

<div class="container">
    <div class="form-group" style="display:flex">
        <input id="input" class="form-control" style="width:90%" type="text" placeholder="Url to Search" />
        <button class="btn btn-default" style="width:10%" onclick="callToNode()">Search!</button>
    </div>
    <table class="table table-striped">
        <thead>
            <tr>
                <th>Requested URL</th>
                <th>Response Time</th>
                <th>Source</th>
            </tr>
        </thead>
        <tbody id="log">
        </tbody>
    </table>
</div>

Complete Code

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Redis Benchmark</title>
    <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
    <link rel="stylesheet" href="style.css">
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
    <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
    <script src="script.js"></script>
</head>
<body>

    <div class="container">
        <div class="form-group" style="display:flex">
            <input id="input" class="form-control" style="width:90%" type="text" placeholder="Url to Search" />
            <button class="btn btn-default" style="width:10%" onclick="nodeRequest()">Search!</button>
        </div>
        <table class="table table-striped">
            <thead>
                <tr>
                    <th>Requested URL</th>
                    <th>Response Time</th>
                    <th>Source</th>
                </tr>
            </thead>
            <tbody id="log">
            </tbody>
        </table>
    </div>
</body>
</html>

results matching ""

    No results matching ""