Fixed incorrect service status on prompt.

Boolean was being evaluated as string.
pull/257/head
Jimmy Casey 2019-09-30 17:13:34 +01:00 committed by GitHub
parent 2824c8fe9a
commit 4ec3a46732
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -90,7 +90,7 @@ $('.toggle-service').on('click',function(e) {
let obj = $(this);
let serviceId = obj.attr("data-id");
let online = obj.attr("data-online");
let d = confirm("Do you want to "+(online ? "stop" : "start")+" checking this service?");
let d = confirm("Do you want to "+(eval(online) ? "stop" : "start")+" checking this service?");
if (d) {
$.ajax({
url: "/api/services/" + serviceId + "/running",