77 lines
2.7 KiB
Django/Jinja
77 lines
2.7 KiB
Django/Jinja
<div class="octo-tab-content">
|
|
<div class="row-fluid header" id="toolBar">
|
|
<div class="span3 title">
|
|
<p>Calibration</p>
|
|
</div>
|
|
<div class="span8 title">
|
|
<div class="row-fluid">
|
|
<div class="span6"></div>
|
|
<div class="span6">
|
|
<button class="btn" data-bind="click: $root.restart, visible: true">
|
|
RESTART
|
|
</button>
|
|
<button class="btn btn-primary" data-bind="click: $root.test, visible: true" title="BTN for testing">
|
|
<i class="fas fa-save" data-color="#000000"></i>  
|
|
TEST
|
|
</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="span1 icon">
|
|
<a data-bind="click: $root.onSettingsClick">
|
|
<i class="fas fa-cog fa-lg" data-color="#ddd"></i>
|
|
</a>
|
|
</div>
|
|
</div>
|
|
<div class="main row-fluid">
|
|
<div class="span3">
|
|
<ul class="nav nav-list">
|
|
<li class="active">
|
|
<a data-toggle="tab" href="#calibration_documentation">Documentation</a>
|
|
</li>
|
|
<li>
|
|
<a data-toggle="tab" href="#calibration_eSteps">E-Steps</a>
|
|
</li>
|
|
<li>
|
|
<a data-toggle="tab" href="#calibration_x-y-z">X-Y-Z-Steps</a>
|
|
</li>
|
|
<li>
|
|
<a data-toggle="tab" href="#calibration_pid">PID Autotune</a>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
<div class="span9">
|
|
{% include "tabs/tab-content.jinja2" %}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
{% block script%}
|
|
<script type="text/javascript">
|
|
OCTOPRINT_VIEWMODELS.push({
|
|
construct: function () {
|
|
this.restart = function () { OctoPrint.system.executeCommand('core', 'restart') };
|
|
|
|
this.test = function () {
|
|
OctoPrint.simpleApiCommand("CalibrationTools", "pid_save").done(function (response) {
|
|
console.log(response)
|
|
}).fail(function (response) {
|
|
new PNotify({
|
|
title: "Test request",
|
|
text: response.responseJSON.error.msg,
|
|
type: "error"
|
|
});
|
|
});
|
|
};
|
|
|
|
this.onSettingsClick = function () {
|
|
$('a#navbar_show_settings').click();
|
|
$('li#settings_plugin_CalibrationTools_link a').click();
|
|
$("#settings_plugin_CalibrationTools").click();
|
|
};
|
|
},
|
|
// dependencies: ["terminalViewModel"],
|
|
elements: ["#toolBar"]
|
|
});
|
|
</script>
|
|
{% endblock %} |