166 lines
7.1 KiB
HTML
166 lines
7.1 KiB
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<link rel="stylesheet" href="dist/themes/default/style.min.css"/>
|
|
<link rel="stylesheet" href="css/login_dialog.css"/>
|
|
<script src="http://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
|
|
<script src="dist/jstree.min.js"></script>
|
|
<script src="dist/jquery.leanModal.min.js"></script>
|
|
<script src="/js/main.js?v=0.1.3" type="module"></script>
|
|
</head>
|
|
<body>
|
|
<h3>Klippy Web API Test</h3>
|
|
<div id="term" style="width: 60em; height: 20em; overflow:auto; border: 1px solid black">
|
|
</div>
|
|
<br/>
|
|
<input id="cbxAuto" type="checkbox" name="Autoscroll" checked="true"/> Autoscroll
|
|
<input id="cbxSub" type="checkbox" name="AutoSub" checked="true"/> Subscribe on Ready
|
|
<input id="cbxFileTransfer" type="checkbox" checked="true" name="FileEnable"/> Allow File Operations While Printing
|
|
<br/><br/>
|
|
<input type="radio" name="test_type" value="http" checked="true">Test HTTP API
|
|
<input type="radio" name="test_type" value="websocket">Test Websocket API
|
|
<br/><br/>
|
|
<form id="gcform">
|
|
<input type="text" />
|
|
<input type="submit" value="Send GCode"/>
|
|
</form>
|
|
<br/>
|
|
<form id="apiform">
|
|
<input type="text" style="width: 30em" id="apirequest" name="apirequest" value="/printer/objects/list"
|
|
title="Should be a url for a http request, ie: /printer/objects/list, or a json-rpc registered
|
|
method name."/>
|
|
<input type="text" style="width: 20em" id="apiargs" name="apiargs"
|
|
title="Arguments for a websocket request. Arguments should be specified in as a JSON object, without
|
|
brackets." hidden/>
|
|
<input type="submit" value="Send API Command"/>
|
|
<span id="apimethod">
|
|
<input type="radio" name="api_cmd_type" value="get" checked="true">GET
|
|
<input type="radio" name="api_cmd_type" value="post">POST
|
|
<input type="radio" name="api_cmd_type" value="delete">DELETE
|
|
</span>
|
|
</form>
|
|
<br/>
|
|
<div style="display: flex">
|
|
<div style="width: 10em">
|
|
<button id="btnpauseresume" style="width: 9em">Pause Print</button><br/><br/>
|
|
<button id="btncancelprint" style="width: 9em">Cancel Print</button><br/><br/>
|
|
</div>
|
|
<a id="hidden_link" href="#" hidden>hidden</a>
|
|
<input type="file" style="display:none" id="upload-file" />
|
|
<div id="filelist">
|
|
</div>
|
|
</div>
|
|
<br/>
|
|
Progress: <progress id="progressbar" value="0" max="100"></progress>
|
|
<span id="upload_progress">0%</span><br/><br/>
|
|
<button id="btnqueryendstops" style="width: 9em">Query Endstops</button>
|
|
<button id="btnsubscribe" style="width: 9em">Post Subscription</button>
|
|
<button id="btngetfiles" style="width: 9em">Get File List</button>
|
|
<button id="btngethelp" style="width: 9em">Get Gcode Help</button>
|
|
<button id="btngetobjs" style="width: 9em">Get Object List</button>
|
|
<button id="btntestmesh" style="width: 9em">Get Bed Mesh</button>
|
|
<button id="btnsendbatch" class="reqws" style="width: 9em">Test GC Batch</button>
|
|
<button id="btnsendmacro" class="reqws" style="width: 9em">Test GC Macro</button>
|
|
<br/><br/>
|
|
<button id="btnestop" style="width: 9em">E-Stop</button>
|
|
<button id="btnrestart" style="width: 9em">Restart</button>
|
|
<button id="btnfirmwarerestart" style="width: 9em">Firmware Restart</button>
|
|
<button id="btnreboot" style="width: 9em">Reboot OS</button>
|
|
<button id="btnshutdown" style="width: 9em">Shutdown OS</button>
|
|
<button id="btngetlog" style="width: 9em">Klippy Log</button>
|
|
<button id="btnmoonlog" style="width: 9em">Moonraker Log</button>
|
|
<br/><br/>
|
|
<button id="btnloginuser" style="width: 9em">Login User</button>
|
|
<button id="btncreateuser" style="width: 9em">Create User</button>
|
|
<button id="btnsetapikey" style="width: 9em">Set API Key</button>
|
|
<button id="btnlogout" style="width: 9em" class="req-login">Log Out</button>
|
|
<button id="btndeluser" style="width: 9em" class="req-login">Delete User</button>
|
|
<button id="btnchangepass" style="width: 9em" class="req-login">Change Pass</button>
|
|
|
|
<br/><br/>
|
|
<span id="filename" hidden></span></br>
|
|
<div id="streamdiv">
|
|
</div>
|
|
|
|
<a id="nav_home" href="#" hidden>Hidden Home</a>
|
|
<a id="do_login" rel="leanModal" name="login" href="#login" hidden>Hidden Login</a>
|
|
<div id="login" class="user">
|
|
<div id="login-ct">
|
|
<div id="login-header" class="user-header">
|
|
<h2>Moonraker Login</h2>
|
|
<button id="login_close" class="modal_close"></a>
|
|
</div>
|
|
|
|
<form id="login_form" class="user-form">
|
|
<div class="text-field">
|
|
<label for="login_username">Username</label>
|
|
<input id="login_username" class="good_input" name="login_username" type="text" />
|
|
</div>
|
|
<div class="text-field">
|
|
<label for="login_password">Password</label>
|
|
<input id="login_password" name="login_password" type="password" />
|
|
</div>
|
|
<div class="button-field">
|
|
<button type="submit" class="user-button">Login</button>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
|
|
<a id="do_signup" rel="leanModal" name="signup" href="#signup" hidden>Hidden Signup</a>
|
|
<div id="signup" class="user">
|
|
<div id="signup-ct">
|
|
<div id="signup-header" class="user-header">
|
|
<h2>Create User</h2>
|
|
<button id="signup_close" class="modal_close"></a>
|
|
</div>
|
|
<form id="signup_form" class="user-form">
|
|
<div class="text-field">
|
|
<label for="signup_username">Username</label>
|
|
<input id="signup_username" class="good_input" name="signup_username" type="text" />
|
|
</div>
|
|
<div class="text-field">
|
|
<label for="signup_password">Password</label>
|
|
<input id="signup_password" name="signup_password" type="password" />
|
|
</div>
|
|
<div class="text-field">
|
|
<label for="signup_verify_pass">Re-Enter Password</label>
|
|
<input id="signup_verify_pass" name="signup_verify_pass" type="password" />
|
|
</div>
|
|
<div class="button-field">
|
|
<button type="submit" class="user-button">Signup</button>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
|
|
<a id="do_changepass" rel="leanModal" name="changepass" href="#changepass" hidden></a>
|
|
<div id="changepass" class="user">
|
|
<div id="changepass-ct">
|
|
<div id="changepass-header" class="user-header">
|
|
<h2>Change Password</h2>
|
|
<button id="changepass_close" class="modal_close"></a>
|
|
</div>
|
|
<form id="changepass_form" class="user-form">
|
|
<div class="text-field">
|
|
<label for="changepass_oldpass">Current Password</label>
|
|
<input id="changepass_oldpass" name="changepass_oldpass" type="password" />
|
|
</div>
|
|
<div class="text-field">
|
|
<label for="changepass_newpass">New Password</label>
|
|
<input id="changepass_newpass" name="changepass_newpass" type="password" />
|
|
</div>
|
|
<div class="text-field">
|
|
<label for="changepass_verify_pass">Re-Enter New Password</label>
|
|
<input id="changepass_verify_pass" name="changepass_verify_pass" type="password" />
|
|
</div>
|
|
<div class="button-field">
|
|
<button type="submit" class="user-button">Submit</button>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
|
|
</body>
|
|
</html>
|