From 961c8d924a7472cb1165cf57dadb8ebbb4f9da51 Mon Sep 17 00:00:00 2001 From: Miodrag Milanovic Date: Thu, 15 Aug 2013 08:57:26 +0000 Subject: Implemented first commands for web interface (nw) --- web/commands.html | 3 +++ web/index.html | 25 ++++++++++++++++++++++--- 2 files changed, 25 insertions(+), 3 deletions(-) create mode 100644 web/commands.html (limited to 'web') diff --git a/web/commands.html b/web/commands.html new file mode 100644 index 00000000000..1a38f257688 --- /dev/null +++ b/web/commands.html @@ -0,0 +1,3 @@ +Soft reset +Hard reset +Exit diff --git a/web/index.html b/web/index.html index d733b190bb3..0bfda89104d 100644 --- a/web/index.html +++ b/web/index.html @@ -23,9 +23,28 @@ function takeScreenshot() { - document.getElementById('content').innerHTML = '
'; + document.getElementById('main').innerHTML = '
'; } + function loadCommands() + { + $("#main").load('commands.html', function () { + $(this).trigger('create'); + }); + } + function executeCommands(command) + { + $.ajax({ + url: "/cmd?name="+command, + cache: false, + dataType: "text", + success: function(data) { + }, + error: function (request, status, error) { alert(status + ", " + error); } + }); + } + + function startWebSocket() { var url = 'ws://localhost:8080/foo'; websocket = new WebSocket(url); @@ -85,12 +104,12 @@ Image
  • - Commands + Commands
  • -
    +
    -- cgit v1.2.3-70-g09d2