From 07294af77f4b088f67efafbeee79e7ddd0eeac84 Mon Sep 17 00:00:00 2001 From: maride Date: Tue, 21 Aug 2018 18:49:59 +0200 Subject: Feature: Start and stop challenge containers --- hosted/challenges.html | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) (limited to 'hosted/challenges.html') diff --git a/hosted/challenges.html b/hosted/challenges.html index 3c18f2d..34c1ab5 100644 --- a/hosted/challenges.html +++ b/hosted/challenges.html @@ -23,6 +23,17 @@

{{{ description }}}

+ {{#if ContainsLaunchable}} + {{#if IPAddress}} +

+ Container running IPv4: {{IPAddress}} +

+ + {{else}} + + {{/if}} + {{/if}} +
{{#if foundFlag}}

Flag found!

{{else}} @@ -99,6 +110,22 @@ }); } + function startContainer(name) { + $.post("/api/startContainer", { + "challengeName": name + }).done(function() { + loadChallengesAndRender(); + }); + } + + function stopContainer(name) { + $.post("/api/stopContainer", { + "challengeName": name + }).done(function() { + loadChallengesAndRender(); + }); + } + $(document).ready(function() { loadChallengesAndRender(); }); -- cgit 1.4.1