Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make UI URL links relative #692

Merged
merged 1 commit into from
May 29, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions locust/static/locust.js
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ var responseTimeChart = new LocustLineChart($(".charts-container"), "Response Ti
var usersChart = new LocustLineChart($(".charts-container"), "Number of Users", ["Users"], "users");

function updateStats() {
$.get('/stats/requests', function (report) {
$.get('./stats/requests', function (report) {
$("#total_rps").html(Math.round(report.total_rps*100)/100);
//$("#fail_ratio").html(Math.round(report.fail_ratio*10000)/100);
$("#fail_ratio").html(Math.round(report.fail_ratio*100));
Expand Down Expand Up @@ -164,7 +164,7 @@ function updateStats() {
updateStats();

function updateExceptions() {
$.get('/exceptions', function (data) {
$.get('./exceptions', function (data) {
$('#exceptions tbody').empty();
$('#exceptions tbody').jqoteapp(exceptions_tpl, data.exceptions);
setTimeout(updateExceptions, 5000);
Expand Down
34 changes: 17 additions & 17 deletions locust/templates/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
<html>
<head>
<title>Locust</title>
<link rel="stylesheet" type="text/css" href="/static/style.css?v={{ version }}" media="screen">
<link rel="shortcut icon" href="/static/img/favicon.ico" type="image/x-icon"/>
<link rel="stylesheet" type="text/css" href="./static/style.css?v={{ version }}" media="screen">
<link rel="shortcut icon" href="./static/img/favicon.ico" type="image/x-icon"/>
</head>
<body class="{{state}}">
<div class="top">
<div class="top-content container">
<img src="/static/img/logo.png?v={{ version }}" class="logo" />
<img src="./static/img/logo.png?v={{ version }}" class="logo" />
<div class="boxes">
<div class="top_box box_url">
<div class="label">HOST</div>
Expand Down Expand Up @@ -42,8 +42,8 @@
<div class="value"><span id="fail_ratio"></span>%</div>
</div>
<div class="top_box box_stop box_running" id="box_stop">
<a href="/stop" class="stop-button"><i></i>STOP</a>
<a href="/stats/reset" class="reset-button">Reset<br>Stats</a>
<a href="./stop" class="stop-button"><i></i>STOP</a>
<a href="./stats/reset" class="reset-button">Reset<br>Stats</a>
</div>
</div>
<div style="clear:both;"></div>
Expand All @@ -56,7 +56,7 @@
</div>
<div class="padder">
<h2>Start new Locust swarm</h2>
<form action="/swarm" method="POST" id="swarm_form">
<form action="./swarm" method="POST" id="swarm_form">
<label for="locust_count">Number of users to simulate</label>
<input type="text" name="locust_count" id="locust_count" class="val" /><br>
<label for="hatch_rate">Hatch rate <span style="color:#8a8a8a;">(users spawned/second)</span></label>
Expand All @@ -73,7 +73,7 @@ <h2>Start new Locust swarm</h2>
</div>
<div class="padder">
<h2>Change the locust count</h2>
<form action="/swarm" method="POST" id="edit_form">
<form action="./swarm" method="POST" id="edit_form">
<label for="locust_count">Number of users to simulate</label>
<input type="text" name="locust_count" id="new_locust_count" class="val" /><br>
<label for="hatch_rate">Hatch rate <span style="color:#8a8a8a;">(users spawned/second)</span></label>
Expand Down Expand Up @@ -146,9 +146,9 @@ <h2>Change the locust count</h2>
</div>
<div style="display:none;">
<div style="margin-top:20px;">
<a href="/stats/requests/csv">Download request statistics CSV</a><br>
<a href="/stats/distribution/csv">Download response time distribution CSV</a><br>
<a href="/exceptions/csv">Download exceptions CSV</a>
<a href="./stats/requests/csv">Download request statistics CSV</a><br>
<a href="./stats/distribution/csv">Download response time distribution CSV</a><br>
<a href="./exceptions/csv">Download exceptions CSV</a>
</div>
</div>
<div style="display:none;">
Expand Down Expand Up @@ -207,13 +207,13 @@ <h2>Version <a href="https://github.com/locustio/locust/releases/tag/v{{version}
</nav>


<script type="text/javascript" src="/static/jquery-1.11.3.min.js"></script>
<script type="text/javascript" src="/static/jquery.jqote2.min.js"></script>
<script type="text/javascript" src="/static/jquery.tools.min.js"></script>
<script type="text/javascript" src="./static/jquery-1.11.3.min.js"></script>
<script type="text/javascript" src="./static/jquery.jqote2.min.js"></script>
<script type="text/javascript" src="./static/jquery.tools.min.js"></script>
<!-- echarts from https://github.com/ecomfe/echarts -->
<script type="text/javascript" src="/static/echarts.common.min.js"></script>
<script type="text/javascript" src="./static/echarts.common.min.js"></script>
<!-- vintage theme of echarts -->
<script type="text/javascript" src="/static/vintage.js"></script>
<script type="text/javascript" src="./static/vintage.js"></script>
<script type="text/x-jqote-template" id="stats-template">
<![CDATA[
<tr class="<%=(alternate ? "dark" : "")%> <%=(this.name == "Total" ? "total" : "")%>">
Expand Down Expand Up @@ -262,7 +262,7 @@ <h2>Version <a href="https://github.com/locustio/locust/releases/tag/v{{version}
<% alternate = !alternate; %>
]]>
</script>
<script type="text/javascript" src="/static/chart.js?v={{ version }}"></script>
<script type="text/javascript" src="/static/locust.js?v={{ version }}"></script>
<script type="text/javascript" src="./static/chart.js?v={{ version }}"></script>
<script type="text/javascript" src="./static/locust.js?v={{ version }}"></script>
</body>
</html>