Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
52afc35fd6 | ||
|
|
9e5266425c | ||
|
|
86595ab70b | ||
|
|
0f87e3f28f | ||
|
|
88305e74cf | ||
|
|
abea5d8660 | ||
|
|
d2bccb737e | ||
|
|
0bfde82ee8 | ||
|
|
de9485cc84 | ||
|
|
e8d2c71401 | ||
|
|
554b25d754 | ||
|
|
ecf2ee070b | ||
|
|
e35d13d446 | ||
|
|
9f46a502fc | ||
|
|
a4436348df | ||
|
|
706515bc84 | ||
|
|
efc70ca5aa | ||
|
|
544d5e2db5 | ||
|
|
70e8ce5687 | ||
|
|
6bc72dcb8c | ||
|
|
d0f78196c5 | ||
|
|
ec827bbea4 | ||
|
|
d57e888133 |
No files matched your search
@@ -1,28 +1,195 @@
|
||||
# Klipper Web Control
|
||||
KWC is a responsive web interface for [Klipper](https://github.com/KevinOConnor/klipper) 3D printer firmware. It communicates with the klipper-api from [Arksine](https://github.com/arksine).
|
||||
# Mainsail
|
||||
Mainsail is a responsive web interface for the [Klipper](https://github.com/KevinOConnor/klipper) 3D printer firmware. It communicates with the Moonraker (Klipper-API) from [Arksine](https://github.com/arksine).
|
||||
|
||||
## Installation
|
||||
At first install Arksine klipper-api fork/branch -> [install manual](https://github.com/Arksine/klipper/tree/work-web_server-20200131/klippy/extras/web_server)
|
||||
## Automatic Install Scripts
|
||||
* [Installer from ArmyAg08](https://github.com/ArmyAg08/mainsail-installer) (recommended)
|
||||
* [Installer from BlackStump](https://github.com/BlackStump/mainsail-install) (untested)
|
||||
|
||||
## Manual installation of Mainsail
|
||||
Mainsail requires a working Klipper instance. Please head over to the official Klipper [installation documentation](https://www.klipper3d.org/Installation.html).
|
||||
|
||||
The installation is split into several sections:
|
||||
|
||||
- [Change branch for Klipper-API](#change-branch-for-moonraker)
|
||||
- [Configure Klipper-API](#configure-moonraker)
|
||||
- [Install the Webserver & Reverse Proxy (NGINX)](#install-webserver--reverse-proxy-nginx)
|
||||
- [Install & Configure Mainsail](#install--configure-mainsail)
|
||||
- [Change the Hostname](#change-the-hostname-optional)
|
||||
|
||||
### Change branch for Moonraker
|
||||
The Klipper-API isn't merged in Klipper at the moment, so you have to change the Repository to [Arksine's Fork](https://github.com/Arksine/klipper/tree/work-web_server-20200131/klippy/extras/remote_api) with the Klipper-API.
|
||||
|
||||
Download and install KWC:
|
||||
```bash
|
||||
mkdir -p ~/kwc
|
||||
cd ~/kwc
|
||||
wget -q -O kwc.zip https://github.com/meteyou/kwc/releases/download/v0.0.7/kwc-alpha-0.0.7.zip && unzip kwc.zip && rm kwc.zip
|
||||
cd ~/klipper
|
||||
git remote add arksine https://github.com/Arksine/klipper.git
|
||||
git fetch arksine
|
||||
git checkout arksine/work-web_server-20200131
|
||||
~/klipper/scripts/install-moonraker.sh
|
||||
```
|
||||
|
||||
Configure web_server in printer.cfg:
|
||||
### Configure Moonraker
|
||||
Edit your `printer.cfg` with `nano ~/printer.cfg` and add the following lines:
|
||||
```
|
||||
[web_server]
|
||||
port: 8080
|
||||
enable_cors: true
|
||||
[virtual_sdcard]
|
||||
path: /home/pi/sdcard
|
||||
|
||||
[api_server]
|
||||
trusted_clients:
|
||||
192.168.1.0/24
|
||||
192.168.0.0/24
|
||||
127.0.0.1
|
||||
allow_file_ops_when_printing: true
|
||||
```
|
||||
Edit the first line of `trusted_clients` (192.168.0.0/24) to your network. The second line (127.0.0.0/24) is for reverse proxy later.
|
||||
If you need other options in your API you can find all options with descriptions on [Arksine's Fork](https://github.com/Arksine/klipper/tree/work-web_server-20200131/moonraker).
|
||||
|
||||
Finally, we create the `virtual_sdcard` directory:
|
||||
```
|
||||
mkdir ~/sdcard
|
||||
```
|
||||
Restart klipper (`sudo service klipper restart`) and check your klippy.log if klipper is starting correct again.
|
||||
|
||||
When klipper is running, open the url `http://<printer-ip>:7125/printer/info` in your browser. If you see a content like this
|
||||
```
|
||||
{"result": {"hostname": "voron250", "error_detected": false, "version": "v0.8.0-479-gd586fb06", "is_ready": true, "message": "Printer is ready", "cpu": "4 core ARMv7 Processor rev 4 (v7l)"}}
|
||||
```
|
||||
your API is working!
|
||||
|
||||
### install webserver & reverse proxy (nginx)
|
||||
nginx is important to mount all components on port 80 and host the static files from Mainsail.
|
||||
|
||||
If you have installed lighttpd & haproxy before you have to stop & disable it:
|
||||
```bash
|
||||
sudo service haproxy stop
|
||||
sudo service lighttpd stop
|
||||
sudo apt remove haproxy lighttpd
|
||||
```
|
||||
|
||||
Example Klipper macros:
|
||||
After disable all other webserver you can install nginx now:
|
||||
```bash
|
||||
sudo apt install nginx
|
||||
```
|
||||
now we create the config file with
|
||||
```bash
|
||||
sudo nano /etc/nginx/sites-available/mainsail
|
||||
```
|
||||
and fill it with the following content:
|
||||
```
|
||||
map $http_upgrade $connection_upgrade {
|
||||
default upgrade;
|
||||
'' close;
|
||||
}
|
||||
|
||||
upstream apiserver {
|
||||
#edit your api port here
|
||||
ip_hash;
|
||||
server 127.0.0.1:7125;
|
||||
}
|
||||
|
||||
server {
|
||||
listen 80 default_server;
|
||||
listen [::]:80 default_server;
|
||||
|
||||
access_log /var/log/nginx/kwc-access.log;
|
||||
error_log /var/log/nginx/kwc-error.log;
|
||||
|
||||
#web_path from mainsail static files
|
||||
root /home/pi/mainsail;
|
||||
|
||||
index index.html;
|
||||
server_name _;
|
||||
|
||||
#max upload size for gcodes
|
||||
client_max_body_size 200M;
|
||||
|
||||
location / {
|
||||
try_files $uri $uri/ /index.html;
|
||||
}
|
||||
|
||||
location /printer {
|
||||
proxy_pass http://apiserver/printer;
|
||||
proxy_set_header Host $http_host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Scheme $scheme;
|
||||
}
|
||||
|
||||
location /api {
|
||||
proxy_pass http://apiserver/api;
|
||||
proxy_set_header Host $http_host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Scheme $scheme;
|
||||
}
|
||||
|
||||
location /access {
|
||||
proxy_pass http://apiserver/access;
|
||||
proxy_set_header Host $http_host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Scheme $scheme;
|
||||
}
|
||||
|
||||
location /websocket {
|
||||
proxy_pass http://apiserver/websocket;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection $connection_upgrade;
|
||||
proxy_set_header Host $http_host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_read_timeout 86400;
|
||||
}
|
||||
|
||||
location /machine {
|
||||
proxy_pass http://apiserver/machine;
|
||||
proxy_set_header Host $http_host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Scheme $scheme;
|
||||
}
|
||||
|
||||
location /server {
|
||||
proxy_pass http://apiserver/server;
|
||||
proxy_set_header Host $http_host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Scheme $scheme;
|
||||
}
|
||||
}
|
||||
```
|
||||
Create directory for static files and active nginx config:
|
||||
```bash
|
||||
mkdir ~/mainsail
|
||||
sudo rm /etc/nginx/sites-enabled/default
|
||||
sudo ln -s /etc/nginx/sites-available/mainsail /etc/nginx/sites-enabled/
|
||||
sudo service nginx restart
|
||||
```
|
||||
Now you can check again the API if it works with the reverse proxy. Open the url `http://<printer-ip>/printer/info` in your browser. if you see a content like this:
|
||||
```
|
||||
{"result": {"hostname": "voron250", "error_detected": false, "version": "v0.8.0-479-gd586fb06", "is_ready": true, "message": "Printer is ready", "cpu": "4 core ARMv7 Processor rev 4 (v7l)"}}
|
||||
```
|
||||
Now we can install Mainsail.
|
||||
|
||||
### Install & Configure Mainsail
|
||||
Now you can download the current mainsail static data
|
||||
```bash
|
||||
cd ~/mainsail
|
||||
wget -q -O mainsail.zip https://github.com/meteyou/mainsail/releases/download/v0.0.11/mainsail-alpha-0.0.11.zip && unzip mainsail.zip && rm mainsail.zip
|
||||
```
|
||||
Now it should be possible to open the interface: `http://<printer-ip>/`.
|
||||
|
||||
### Change the Hostname (Optional)
|
||||
to use the hostname instate of the ip, you can install the avahi-daemon:
|
||||
```bash
|
||||
sudo apt install avahi-daemon
|
||||
```
|
||||
and you can config your hostname (if you use a raspberry pi):
|
||||
```bash
|
||||
sudo raspi-config
|
||||
```
|
||||
in `2 Network Options` > `N1 Hostname` you can edit your hostname of your raspberry pi. After a reboot you can use `http://<hostname>.local/` to open the webinterface.
|
||||
|
||||
## Klipper example macros for Mainsail
|
||||
These macros are important to start/pause/cancel prints.
|
||||
```
|
||||
[pause_resume]
|
||||
|
||||
@@ -67,65 +234,15 @@ gcode:
|
||||
BASE_RESUME
|
||||
```
|
||||
|
||||
## Installation lighttpd
|
||||
```bash
|
||||
sudo apt install lighttpd
|
||||
## Update Mainsail to V0.0.11
|
||||
```
|
||||
edit configfile `/etc/lighttpd/lighttpd.conf` and edit following lines:
|
||||
sudo service klipper stop
|
||||
cd ~/klipper
|
||||
git clean -x -d -i
|
||||
git fetch arksine && git checkout arksine/work-web_server-20200131
|
||||
~/klipper/scripts/install-moonraker.sh #optional: only for the first installation of moonraker
|
||||
rm -R ~/mainsail/*
|
||||
cd ~/mainsail
|
||||
wget -q -O mainsail.zip https://github.com/meteyou/mainsail/releases/download/v0.0.11/mainsail-alpha-0.0.11.zip && unzip mainsail.zip && rm mainsail.zip
|
||||
```
|
||||
server.document-root = "/home/pi/kwc"
|
||||
server.port = 81
|
||||
```
|
||||
|
||||
```bash
|
||||
sudo usermod -a -G www-data pi
|
||||
```
|
||||
|
||||
## Installation haproxy
|
||||
haproxy is necessary to use port 80.
|
||||
|
||||
`sudo apt install haproxy`
|
||||
|
||||
add following lines at the end of `/etc/haproxy/haproxy.cfg`:
|
||||
```
|
||||
frontend public
|
||||
bind :::80 v4v6
|
||||
default_backend lighttpd
|
||||
use_backend printer if { path_beg /printer/ }
|
||||
# use_backend webcam if { path_beg /webcam1/ }
|
||||
|
||||
acl is_websocket path_beg /websocket
|
||||
acl is_websocket hdr(Upgrade) -i WebSocket
|
||||
acl is_websocket hdr_beg(Host) -i ws
|
||||
use_backend websocket if is_websocket
|
||||
|
||||
backend lighttpd
|
||||
reqrep ^([^\ :]*)\ /(.*) \1\ /\2
|
||||
option forwardfor
|
||||
server lighttpd1 127.0.0.1:81
|
||||
|
||||
backend printer
|
||||
reqrep ^([^\ :]*)\ /(.*) \1\ /\2
|
||||
option forwardfor
|
||||
server printer1 127.0.0.1:8080
|
||||
|
||||
backend websocket
|
||||
reqrep ^([^\ :]*)\ /(.*) \1\ /\2
|
||||
option forwardfor
|
||||
server websocket1 127.0.0.1:8080
|
||||
|
||||
#backend webcam
|
||||
# reqrep ^([^\ :]*)\ /webcam1/(.*) \1\ /\2
|
||||
# server webcam1 127.0.0.1:8081
|
||||
```
|
||||
|
||||
all comments are for webcam support. You can install MJPEG-Streamer with this [tutorial](https://github.com/cncjs/cncjs/wiki/Setup-Guide:-Raspberry-Pi-%7C-MJPEG-Streamer-Install-&-Setup-&-FFMpeg-Recording).
|
||||
|
||||
|
||||
## Update KWC to V0.0.7
|
||||
```
|
||||
rm -R ~/kwc/*
|
||||
cd ~/kwc
|
||||
wget -q -O kwc.zip https://github.com/meteyou/kwc/releases/download/v0.0.7/kwc-alpha-0.0.7.zip && unzip kwc.zip && rm kwc.zip
|
||||
```
|
||||
and update your macros
|
||||
and update your macros & nginx config.
|
||||
Generated
+4819
-538
File diff suppressed because it is too large.
Load diff
+14
-17
@@ -10,35 +10,32 @@
|
||||
"dependencies": {
|
||||
"axios": "^0.19.2",
|
||||
"chart.js": "^2.9.3",
|
||||
"core-js": "^3.6.4",
|
||||
"core-js": "^3.6.5",
|
||||
"object-assign-deep": "^0.4.0",
|
||||
"vue": "^2.6.11",
|
||||
"vue-chartjs": "^3.5.0",
|
||||
"vue-context": "^5.0.0",
|
||||
"vue-context": "^5.1.0",
|
||||
"vue-headful": "^2.1.0",
|
||||
"vue-json-rpc-websocket": "^1.1.1",
|
||||
"vue-plotly": "^1.1.0",
|
||||
"vue-resource": "^1.5.1",
|
||||
"vue-simple-upload": "^0.1.6",
|
||||
"vue-toast-notification": "0.0.3",
|
||||
"vuetify": "^2.2.17",
|
||||
"vuetify-toast-snackbar": "^0.6.1",
|
||||
"vuex": "^3.1.3"
|
||||
"vue-toast-notification": "^0.2.0",
|
||||
"vuetify": "^2.2.22",
|
||||
"vuex": "^3.2.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@fortawesome/fontawesome-free": "^5.12.1",
|
||||
"@mdi/font": "^4.9.95",
|
||||
"@vue/cli-plugin-babel": "^4.2.3",
|
||||
"@vue/cli-plugin-eslint": "^4.2.3",
|
||||
"@vue/cli-service": "^4.2.3",
|
||||
"@mdi/font": "^5.1.45",
|
||||
"@vue/cli-plugin-babel": "^4.3.1",
|
||||
"@vue/cli-plugin-eslint": "^4.3.1",
|
||||
"@vue/cli-service": "^4.3.1",
|
||||
"babel-eslint": "^10.1.0",
|
||||
"css-loader": "^3.4.2",
|
||||
"eslint": "^5.16.0",
|
||||
"eslint-plugin-vue": "^5.0.0",
|
||||
"material-design-icons-iconfont": "^5.0.1",
|
||||
"css-loader": "^3.5.2",
|
||||
"eslint": "^6.8.0",
|
||||
"eslint-plugin-vue": "^6.2.2",
|
||||
"sass": "^1.26.3",
|
||||
"sass-loader": "^8.0.2",
|
||||
"vue-cli-plugin-route": "0.0.7",
|
||||
"vue-cli-plugin-vuetify": "^1.1.2",
|
||||
"vue-cli-plugin-vuetify": "^2.0.5",
|
||||
"vue-router": "^3.1.6",
|
||||
"vue-template-compiler": "^2.6.11",
|
||||
"vuetify-loader": "^1.4.3"
|
||||
|
||||
+3
-4
@@ -1,8 +1,7 @@
|
||||
{
|
||||
"socket": {
|
||||
"hostname": "voron250.local",
|
||||
"port": 8080,
|
||||
"reconnectInterval": 3000,
|
||||
"reconnectAttempts": 1000
|
||||
"hostname": "kossel.local",
|
||||
"port": 80,
|
||||
"reconnectInterval": 3000
|
||||
}
|
||||
}
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
After Width: | Height: | Size: 14 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 4.6 KiB |
@@ -6,8 +6,6 @@
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1.0">
|
||||
<link rel="icon" href="<%= BASE_URL %>favicon.ico" id="favicon" />
|
||||
<title>KlipperWebControl</title>
|
||||
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:100,300,400,500,700,900">
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@mdi/font@latest/css/materialdesignicons.min.css">
|
||||
</head>
|
||||
<body>
|
||||
<noscript>
|
||||
|
||||
+33
-9
@@ -1,3 +1,7 @@
|
||||
<style>
|
||||
@import './assets/styles/fonts.css';
|
||||
</style>
|
||||
|
||||
<template>
|
||||
<v-app>
|
||||
<vue-headful
|
||||
@@ -14,8 +18,19 @@
|
||||
<ul class="navi" :expand="$vuetify.breakpoint.mdAndUp">
|
||||
<li v-for="(category, index) in routes" :key="index" :prepend-icon="category.icon"
|
||||
:class="[category.path !== '/' && currentPage.includes(category.path) ? 'active' : '', 'nav-item']"
|
||||
:value="true">
|
||||
<router-link slot="activator" class="nav-link" exact :to="category.path" @click.prevent v-if="(category.title === 'Webcam' && boolNaviWebcam) || category.title !== 'Webcam'">
|
||||
:value="true"
|
||||
>
|
||||
<router-link
|
||||
slot="activator" class="nav-link" exact :to="category.path" @click.prevent
|
||||
v-if="
|
||||
(category.title === 'Webcam' && boolNaviWebcam) ||
|
||||
(category.title === 'Heightmap' && boolNaviHeightmap) ||
|
||||
(
|
||||
category.title !== 'Webcam' &&
|
||||
category.title !== 'Heightmap' &&
|
||||
(is_ready || category.alwaysShow)
|
||||
)
|
||||
">
|
||||
<v-icon>mdi-{{ category.icon }}</v-icon>
|
||||
<span class="nav-title">{{ category.title }}</span>
|
||||
<v-icon class="nav-arrow" v-if="category.children && category.children.length > 0">mdi-chevron-down</v-icon>
|
||||
@@ -23,7 +38,7 @@
|
||||
|
||||
<ul class="child">
|
||||
<li v-for="(page, pageIndex) in category.children" class="nav-item" v-bind:key="`${index}-${pageIndex}`">
|
||||
<router-link :to="page.path" class="nav-link" @click.prevent>
|
||||
<router-link :to="page.path" class="nav-link" @click.prevent v-if="is_ready || page.alwaysShow">
|
||||
<v-icon>mdi-{{ page.icon }}</v-icon>
|
||||
<span class="nav-title">{{ page.title }}</span>
|
||||
</router-link>
|
||||
@@ -62,7 +77,7 @@
|
||||
|
||||
<v-footer app class="d-block">
|
||||
<span v-if="version">{{ version }}</span>
|
||||
<span class="float-right">© 2020</span>
|
||||
<span class="float-right">Made with <img src="/img/heard.png" height="15" title="love" alt="heard" /> by <a href="http://www.vorondesign.com/" target="_blank"><img src="/img/voron.png" height="15" title="VoronDesign" alt="Logo - VoronDesign" /></a></span>
|
||||
</v-footer>
|
||||
</v-app>
|
||||
</template>
|
||||
@@ -81,13 +96,14 @@ export default {
|
||||
data: () => ({
|
||||
drawer: null,
|
||||
activeClass: 'active',
|
||||
routes: routes
|
||||
routes: routes,
|
||||
is_ready: false,
|
||||
boolNaviHeightmap: false,
|
||||
}),
|
||||
created () {
|
||||
this.$vuetify.theme.dark = true;
|
||||
this.$socket.onOpen = () => {
|
||||
|
||||
}
|
||||
this.is_ready = (this.klippy_state === "ready") ? true : false;
|
||||
this.boolNaviHeightmap = (typeof(this.config.bed_mesh) !== "undefined");
|
||||
},
|
||||
computed: {
|
||||
currentPage: function() {
|
||||
@@ -102,6 +118,8 @@ export default {
|
||||
isConnecting: state => !state.socket.isConnected,
|
||||
progress: state => state.printer.virtual_sdcard.progress,
|
||||
boolNaviWebcam: state => state.gui.webcam.bool,
|
||||
klippy_state: state => state.socket.klippy_state,
|
||||
config: state => state.config,
|
||||
}),
|
||||
...mapGetters([
|
||||
'getTitle'
|
||||
@@ -162,8 +180,14 @@ export default {
|
||||
handler: function(val) {
|
||||
this.drawFavicon(val);
|
||||
}
|
||||
},
|
||||
klippy_state() {
|
||||
this.is_ready = (this.klippy_state === "ready") ? true : false;
|
||||
},
|
||||
config() {
|
||||
this.boolNaviHeightmap = (typeof(this.config.bed_mesh) !== "undefined");
|
||||
}
|
||||
}
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
@@ -0,0 +1,48 @@
|
||||
/* latin */
|
||||
@font-face {
|
||||
font-family: 'Roboto';
|
||||
font-style: normal;
|
||||
font-weight: 100;
|
||||
src: local('Roboto Thin'), local('Roboto-Thin'), url(/fonts/roboto-thin.woff2) format('woff2');
|
||||
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
|
||||
}
|
||||
/* latin */
|
||||
@font-face {
|
||||
font-family: 'Roboto';
|
||||
font-style: normal;
|
||||
font-weight: 300;
|
||||
src: local('Roboto Light'), local('Roboto-Light'), url(/fonts/roboto-light.woff2) format('woff2');
|
||||
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
|
||||
}
|
||||
/* latin */
|
||||
@font-face {
|
||||
font-family: 'Roboto';
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
src: local('Roboto'), local('Roboto-Regular'), url(/fonts/roboto-regular.woff2) format('woff2');
|
||||
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
|
||||
}
|
||||
/* latin */
|
||||
@font-face {
|
||||
font-family: 'Roboto';
|
||||
font-style: normal;
|
||||
font-weight: 500;
|
||||
src: local('Roboto Medium'), local('Roboto-Medium'), url(/fonts/roboto-medium.woff2) format('woff2');
|
||||
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
|
||||
}
|
||||
/* latin */
|
||||
@font-face {
|
||||
font-family: 'Roboto';
|
||||
font-style: normal;
|
||||
font-weight: 700;
|
||||
src: local('Roboto Bold'), local('Roboto-Bold'), url(/fonts/roboto-bold.woff2) format('woff2');
|
||||
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
|
||||
}
|
||||
/* latin */
|
||||
@font-face {
|
||||
font-family: 'Roboto';
|
||||
font-style: normal;
|
||||
font-weight: 900;
|
||||
src: local('Roboto Black'), local('Roboto-Black'), url(/fonts/roboto-black.woff2) format('woff2');
|
||||
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
|
||||
}
|
||||
@@ -1,3 +1,4 @@
|
||||
import store from '../store'
|
||||
import { Line, mixins } from 'vue-chartjs'
|
||||
const { reactiveProp } = mixins;
|
||||
|
||||
@@ -27,6 +28,23 @@ export default {
|
||||
filter: function(item) {
|
||||
return !item.text.includes('_target');
|
||||
}
|
||||
},
|
||||
onClick: function(e, legendItem) {
|
||||
let ci = this.chart;
|
||||
let index = legendItem.datasetIndex;
|
||||
let index_target = ci.data.datasets.findIndex(dataset => dataset.label === legendItem.text+'_target');
|
||||
let meta = ci.getDatasetMeta(index);
|
||||
|
||||
// See controller.isDatasetVisible comment
|
||||
meta.hidden = meta.hidden === null ? !ci.data.datasets[index].hidden : null;
|
||||
if (index_target !== -1) {
|
||||
let meta_target = ci.getDatasetMeta(index_target);
|
||||
meta_target.hidden = meta.hidden;
|
||||
}
|
||||
|
||||
store.dispatch('setHeaterChartVisibility', { name: legendItem.text, hidden: meta.hidden });
|
||||
|
||||
ci.update();
|
||||
}
|
||||
},
|
||||
tooltips: {
|
||||
|
||||
@@ -6,10 +6,8 @@
|
||||
<v-card>
|
||||
<v-row class="">
|
||||
<v-col class="col-12 pb-0 text-center">
|
||||
<div class="d-inline-block mx-2 my-1"><v-btn @click="doHome" :loading="loadingHome" :color="homedAxes.includes('xyz') ? 'primary' : 'warning'" class=""><v-icon class="mr-1">mdi-home</v-icon><span class="d-none d-sm-inline">Home </span>all</v-btn></div>
|
||||
<div class="d-inline-block mx-2 my-1"><v-btn @click="doHome" :loading="loadingHomeAll" :color="homedAxes.includes('xyz') ? 'primary' : 'warning'" class=""><v-icon class="mr-1">mdi-home</v-icon><span class="d-none d-sm-inline">Home </span>all</v-btn></div>
|
||||
<div class="d-inline-block mx-2 my-1" v-if="config.hasOwnProperty('quad_gantry_level')"><v-btn @click="doQGL" :loading="loadingQGL" color="primary">QGL</v-btn></div>
|
||||
<div class="d-none d-sm-inline-block mx-2 my-1"><v-btn @click="doRestart" :loading="loadingRestart" color="error"><v-icon class="mr-sm-2">mdi-cached</v-icon>Restart</v-btn></div>
|
||||
<div class="d-inline-block mx-2 my-1"><v-btn @click="doRestartFirmware" :loading="loadingRestartFirmware" color="error"><v-icon class="mr-sm-2">mdi-cached</v-icon><span class="d-none d-sm-block">Firmware Restart</span></v-btn></div>
|
||||
</v-col>
|
||||
</v-row>
|
||||
<v-row class="mt-3">
|
||||
@@ -63,6 +61,7 @@
|
||||
|
||||
<script>
|
||||
import { mapState, mapGetters, mapMutations } from 'vuex'
|
||||
import Vue from "vue";
|
||||
|
||||
export default {
|
||||
components: {
|
||||
@@ -70,29 +69,21 @@
|
||||
},
|
||||
data: function() {
|
||||
return {
|
||||
|
||||
loadingHomeAll: false,
|
||||
loadingHomeX: false,
|
||||
loadingHomeY: false,
|
||||
loadingHomeZ: false,
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapState({
|
||||
loadingHome: state => state.socket.loadingHome,
|
||||
loadingHomeX: state => state.socket.loadingHomeX,
|
||||
loadingHomeY: state => state.socket.loadingHomeY,
|
||||
loadingHomeZ: state => state.socket.loadingHomeZ,
|
||||
loadingQGL: state => state.socket.loadingQGL,
|
||||
loadingRestart: state => state.socket.loadingRestart,
|
||||
loadingRestartFirmware: state => state.socket.loadingRestartFirmware,
|
||||
homedAxes: state => state.printer.toolhead.homed_axes,
|
||||
config: state => state.config,
|
||||
loadings: state => state.loadings,
|
||||
}),
|
||||
...mapMutations([
|
||||
'setLoadingHome',
|
||||
'setLoadingHomeX',
|
||||
'setLoadingHomeY',
|
||||
'setLoadingHomeZ',
|
||||
'setLoadingQGL',
|
||||
'setLoadingRestart',
|
||||
'setLoadingRestartFirmware',
|
||||
]),
|
||||
...mapGetters([
|
||||
'getMacros',
|
||||
@@ -100,19 +91,19 @@
|
||||
},
|
||||
methods: {
|
||||
doHome() {
|
||||
this.$store.commit('setLoadingHome', true);
|
||||
this.$store.commit('setLoading', { name: 'controlHomeAll' });
|
||||
this.$socket.sendObj('post_printer_gcode', { script: "G28" }, "responseHome");
|
||||
},
|
||||
doHomeX() {
|
||||
this.$store.commit('setLoadingHomeX', true);
|
||||
this.$store.commit('setLoading', { name: 'controlHomeX' });
|
||||
this.$socket.sendObj('post_printer_gcode', { script: "G28 X" }, "responseHomeX");
|
||||
},
|
||||
doHomeY() {
|
||||
this.$store.commit('setLoadingHomeY', true);
|
||||
this.$store.commit('setLoading', { name: 'controlHomeY' });
|
||||
this.$socket.sendObj('post_printer_gcode', { script: "G28 Y" }, "responseHomeY");
|
||||
},
|
||||
doHomeZ() {
|
||||
this.$store.commit('setLoadingHomeZ', true);
|
||||
this.$store.commit('setLoading', { name: 'controlHomeZ' });
|
||||
this.$socket.sendObj('post_printer_gcode', { script: "G28 Z" }, "responseHomeZ");
|
||||
},
|
||||
doQGL() {
|
||||
@@ -127,16 +118,16 @@
|
||||
this.doSend(gcode);
|
||||
},
|
||||
doSend(gcode) {
|
||||
this.$socket.sendObj('post_printer_gcode', { script: gcode }, "sendGcode");
|
||||
},
|
||||
doRestart() {
|
||||
this.$store.commit('setLoadingRestart', true);
|
||||
this.$socket.sendObj('post_printer_restart', { }, "responseRestart");
|
||||
},
|
||||
doRestartFirmware() {
|
||||
this.$store.commit('setLoadingRestartFirmware', true);
|
||||
this.$socket.sendObj('post_printer_firmware_restart', { }, "responseRestartFirmware");
|
||||
Vue.prototype.$socket.sendObj('post_printer_gcode', { script: gcode }, "sendGcode");
|
||||
},
|
||||
},
|
||||
watch: {
|
||||
loadings: function(loadings) {
|
||||
this.loadingHomeAll = loadings.includes('controlHomeAll');
|
||||
this.loadingHomeX = loadings.includes('controlHomeX');
|
||||
this.loadingHomeY = loadings.includes('controlHomeY');
|
||||
this.loadingHomeZ = loadings.includes('controlHomeZ');
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -1,45 +0,0 @@
|
||||
<template>
|
||||
<v-card>
|
||||
<v-list-item>
|
||||
<v-list-item-avatar color="grey"><v-icon dark>fa-cogs</v-icon></v-list-item-avatar>
|
||||
<v-list-item-content>
|
||||
<v-list-item-title class="headline">Macros</v-list-item-title>
|
||||
<v-list-item-subtitle>
|
||||
{{ getMacros.length }} Macros
|
||||
</v-list-item-subtitle>
|
||||
</v-list-item-content>
|
||||
</v-list-item>
|
||||
<v-divider class="my-2"></v-divider>
|
||||
<v-card-text class="px-0 pt-0 pb-2 content text-center">
|
||||
<div v-for="(macro, index) in getMacros" v-bind:key="index+99" class="d-inline-block mx-1 my-1">
|
||||
<v-btn color="primary" class="ml-3" @click="doSend(macro.name)">{{ macro.name }}</v-btn>
|
||||
</div>
|
||||
</v-card-text>
|
||||
</v-card>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {mapGetters} from 'vuex'
|
||||
|
||||
export default {
|
||||
components: {
|
||||
|
||||
},
|
||||
data: function() {
|
||||
return {
|
||||
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapGetters([
|
||||
'getMacros',
|
||||
]),
|
||||
},
|
||||
methods: {
|
||||
doSend(gcode) {
|
||||
this.$socket.sendObj('post_printer_gcode', { script: gcode }, "sendGcode");
|
||||
},
|
||||
},
|
||||
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,81 @@
|
||||
<style>
|
||||
|
||||
.minievent-table {
|
||||
max-height: 250px;
|
||||
overflow-y: auto;
|
||||
}
|
||||
</style>
|
||||
|
||||
<template>
|
||||
<v-card>
|
||||
<v-list-item>
|
||||
<v-list-item-avatar color="grey"><v-icon dark>mdi-console-line</v-icon></v-list-item-avatar>
|
||||
<v-list-item-content>
|
||||
<v-list-item-title class="headline">Console</v-list-item-title>
|
||||
</v-list-item-content>
|
||||
</v-list-item>
|
||||
<v-divider class="mt-2"></v-divider>
|
||||
<v-card-text class="px-0 py-0 content">
|
||||
<v-data-table
|
||||
:headers="headers"
|
||||
:options="options"
|
||||
:sort-by.sync="sortBy"
|
||||
:sort-desc.sync="sortDesc"
|
||||
:items="events"
|
||||
item-key="date"
|
||||
hide-default-footer
|
||||
disable-pagination
|
||||
class="minievent-table"
|
||||
>
|
||||
<template #no-data>
|
||||
<div class="text-center">empty</div>
|
||||
</template>
|
||||
|
||||
<template #item="{ item }">
|
||||
<tr>
|
||||
<td class="log-cell title-cell">
|
||||
{{ item.date.toLocaleString() }}
|
||||
</td>
|
||||
<td class="log-cell content-cell" colspan="2">
|
||||
<span v-if="item.message" class="message" v-html="formatMessage(item.message)"></span>
|
||||
</td>
|
||||
</tr>
|
||||
</template>
|
||||
</v-data-table>
|
||||
</v-card-text>
|
||||
</v-card>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapState } from 'vuex'
|
||||
|
||||
export default {
|
||||
components: {
|
||||
|
||||
},
|
||||
data: function() {
|
||||
return {
|
||||
sortBy: 'date',
|
||||
sortDesc: true,
|
||||
headers: [
|
||||
],
|
||||
options: {
|
||||
|
||||
},
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapState({
|
||||
events: state => state.events,
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
|
||||
formatMessage(message) {
|
||||
message = message.replace(/(?:\r\n|\r|\n)/g, '<br>');
|
||||
|
||||
return message;
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -17,7 +17,7 @@
|
||||
|
||||
<template>
|
||||
<div>
|
||||
<v-card class="mt-4" v-if="bool_fan">
|
||||
<v-card v-if="bool_fan">
|
||||
<v-toolbar flat dense >
|
||||
<v-toolbar-title>
|
||||
<span class="subheading"><v-icon :class="fan_speed > 0 ? 'mdi mdi-fan icon-rotate' : 'mdi mdi-fan'" left></v-icon>Tool Fan</span>
|
||||
@@ -28,7 +28,7 @@
|
||||
<tool-slider :target="fan_speed" :multi="100" command="M106" attribute-name="S" :attribute-scale="2.55" ></tool-slider>
|
||||
</v-card-text>
|
||||
</v-card>
|
||||
<v-card class="mt-4" v-if="is_printing">
|
||||
<v-card class="mt-6" v-if="is_printing">
|
||||
<v-toolbar flat dense >
|
||||
<v-toolbar-title>
|
||||
<span class="subheading"><v-icon class="mdi mdi-timer" left></v-icon>Speed Factor</span>
|
||||
@@ -39,7 +39,7 @@
|
||||
<tool-slider :target="speed_factor" :max="200" :multi="100" command="M220" attribute-name="S" ></tool-slider>
|
||||
</v-card-text>
|
||||
</v-card>
|
||||
<v-card class="mt-4" v-if="is_printing">
|
||||
<v-card class="mt-6" v-if="is_printing">
|
||||
<v-toolbar flat dense >
|
||||
<v-toolbar-title>
|
||||
<span class="subheading"><v-icon class="mdi mdi-texture" left></v-icon>Extrusion Factor</span>
|
||||
|
||||
@@ -19,6 +19,11 @@
|
||||
<v-switch v-model="boolShowTempchartOnDashboard" label="Tempchart"></v-switch>
|
||||
</v-col>
|
||||
</v-row>
|
||||
<v-row>
|
||||
<v-col class="px-10 py-0">
|
||||
<v-switch v-model="boolShowConsoleOnDashboard" label="Console"></v-switch>
|
||||
</v-col>
|
||||
</v-row>
|
||||
</v-card-text>
|
||||
</v-card>
|
||||
</template>
|
||||
@@ -50,6 +55,14 @@
|
||||
return this.$store.dispatch('setSettings', { gui: { dashboard: { boolTempchart: status } } });
|
||||
}
|
||||
},
|
||||
boolShowConsoleOnDashboard: {
|
||||
get() {
|
||||
return this.$store.state.gui.dashboard.boolConsole;
|
||||
},
|
||||
set(status) {
|
||||
return this.$store.dispatch('setSettings', { gui: { dashboard: { boolConsole: status } } });
|
||||
}
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
|
||||
|
||||
@@ -0,0 +1,73 @@
|
||||
<template>
|
||||
<v-card>
|
||||
<v-list-item>
|
||||
<v-list-item-avatar color="grey"><v-icon dark>mdi-arrow-expand-vertical</v-icon></v-list-item-avatar>
|
||||
<v-list-item-content>
|
||||
<v-list-item-title class="headline">Endstops</v-list-item-title>
|
||||
</v-list-item-content>
|
||||
</v-list-item>
|
||||
<v-divider class="my-2"></v-divider>
|
||||
<v-card-text class="px-0 pt-0 pb-2 content">
|
||||
<div v-for="(status, index) of sortEndstops" v-bind:key="index">
|
||||
<v-row class="px-6" >
|
||||
<v-col sm-12>
|
||||
<label class="mt-1 d-inline-block">Endstop <b>{{ index.toUpperCase() }}</b></label>
|
||||
<v-chip class="float-right" :color="status === 'open' ? 'green' : 'red' " text-color="white">{{ status }}</v-chip>
|
||||
</v-col>
|
||||
</v-row>
|
||||
</div>
|
||||
<v-row class="px-6" v-if="(Object.keys(endstops).length === 0 && endstops.constructor === Object)" >
|
||||
<v-col sm-12>
|
||||
<p>Press the sync-button on the right-bottom to load the current endstop status.</p>
|
||||
</v-col>
|
||||
</v-row>
|
||||
</v-card-text>
|
||||
<v-card-actions>
|
||||
<v-spacer></v-spacer>
|
||||
|
||||
<v-btn icon @click="syncEndstops" :loading="loading">
|
||||
<v-icon>mdi-sync</v-icon>
|
||||
</v-btn>
|
||||
</v-card-actions>
|
||||
</v-card>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapState } from 'vuex'
|
||||
|
||||
export default {
|
||||
components: {
|
||||
|
||||
},
|
||||
data: function() {
|
||||
return {
|
||||
sortEndstops: {}
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapState({
|
||||
loading: state => state.socket.loadingEndstopStatus,
|
||||
endstops: state => state.printer.endstops,
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
syncEndstops() {
|
||||
this.$store.commit('setLoadingEndstopStatus', true);
|
||||
this.$socket.sendObj('get_printer_endstops', { }, "responseEndstopStatus");
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
endstops: function() {
|
||||
this.sortEndstops = {};
|
||||
|
||||
let keys = Object.keys(this.endstops);
|
||||
keys.sort();
|
||||
|
||||
for (let i = 0; i < keys.length; i++) {
|
||||
let k = keys[i];
|
||||
this.sortEndstops[k] = this.endstops[k];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
+6
-6
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<v-card>
|
||||
<v-list-item>
|
||||
<v-list-item-avatar color="grey"><v-icon dark>fa-exclamation</v-icon></v-list-item-avatar>
|
||||
<v-list-item-avatar color="grey"><v-icon dark>mdi-exclamation-thick</v-icon></v-list-item-avatar>
|
||||
<v-list-item-content>
|
||||
<v-list-item-title class="headline">Machinelimits</v-list-item-title>
|
||||
</v-list-item-content>
|
||||
@@ -10,10 +10,10 @@
|
||||
<v-card-text class="px-0 pt-0 pb-2 content">
|
||||
<v-row class="px-6" >
|
||||
<v-col sm-12>
|
||||
<toolSlider label="VELOCITY" :target="max_velocity" :max="300" command="SET_VELOCITY_LIMIT" attribute-name="VELOCITY=" class="mt-5" ></toolSlider>
|
||||
<toolSlider label="ACCEL" :target="max_accel" :max="5000" command="SET_VELOCITY_LIMIT" attribute-name="ACCEL=" class="mt-5" ></toolSlider>
|
||||
<toolSlider label="DECEL" :target="max_accel_to_decel" :max="2500" command="SET_VELOCITY_LIMIT" attribute-name="ACCEL_TO_DECEL=" class="mt-5" ></toolSlider>
|
||||
<toolSlider label="SCV" :target="square_corner_velocity" :max="10" command="SET_VELOCITY_LIMIT" attribute-name="SQUARE_CORNER_VELOCITY=" class="mt-5" ></toolSlider>
|
||||
<toolSlider label="VELOCITY" v-bind:target="max_velocity" :max="500" :extender-steps="100" command="SET_VELOCITY_LIMIT" attribute-name="VELOCITY=" class="mt-5" ></toolSlider>
|
||||
<toolSlider label="ACCEL" v-bind:target="max_accel" :max="5000" :extender-steps="500" command="SET_VELOCITY_LIMIT" attribute-name="ACCEL=" class="mt-5" ></toolSlider>
|
||||
<toolSlider label="DECEL" v-bind:target="max_accel_to_decel" :max="5000" :extender-steps="500" command="SET_VELOCITY_LIMIT" attribute-name="ACCEL_TO_DECEL=" class="mt-5" ></toolSlider>
|
||||
<toolSlider label="SCV" v-bind:target="square_corner_velocity" :max="10" :extender-steps="5" command="SET_VELOCITY_LIMIT" attribute-name="SQUARE_CORNER_VELOCITY=" class="mt-5" ></toolSlider>
|
||||
</v-col>
|
||||
</v-row>
|
||||
</v-card-text>
|
||||
@@ -22,7 +22,7 @@
|
||||
|
||||
<script>
|
||||
import { mapState } from 'vuex'
|
||||
import toolSlider from '../../inputs/ToolSlider'
|
||||
import toolSlider from '../../../inputs/ToolSlider'
|
||||
|
||||
export default {
|
||||
components: {
|
||||
@@ -0,0 +1,42 @@
|
||||
<template>
|
||||
<div>
|
||||
<div v-for="(runout, index) of getFilamentSwitchSensors" v-bind:key="index">
|
||||
<v-card class="mt-6">
|
||||
<v-list-item>
|
||||
<v-list-item-avatar color="grey"><v-icon dark>mdi-printer-3d-nozzle-alert</v-icon></v-list-item-avatar>
|
||||
<v-list-item-content>
|
||||
<v-list-item-title class="headline">{{ runout.name }}</v-list-item-title>
|
||||
</v-list-item-content>
|
||||
</v-list-item>
|
||||
<v-divider class="my-2"></v-divider>
|
||||
<v-card-text class="px-0 pt-0 pb-2 content">
|
||||
<settings-runout-switch :name="runout.name "></settings-runout-switch>
|
||||
</v-card-text>
|
||||
</v-card>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex'
|
||||
import SettingsRunoutSwitch from "../../../inputs/SettingsRunoutSwitch";
|
||||
|
||||
export default {
|
||||
components: {
|
||||
SettingsRunoutSwitch
|
||||
},
|
||||
data: function() {
|
||||
return {
|
||||
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapGetters([
|
||||
'getFilamentSwitchSensors'
|
||||
])
|
||||
},
|
||||
methods: {
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,66 @@
|
||||
<template>
|
||||
<v-card>
|
||||
<v-list-item>
|
||||
<v-list-item-avatar color="grey"><v-icon dark>mdi-cpu-64-bit</v-icon></v-list-item-avatar>
|
||||
<v-list-item-content>
|
||||
<v-list-item-title class="headline">System</v-list-item-title>
|
||||
</v-list-item-content>
|
||||
</v-list-item>
|
||||
<v-divider class="my-2"></v-divider>
|
||||
<v-card-text class="">
|
||||
<div><v-btn :href="'http://'+hostname+':'+port+'/printer/klippy.log'" color="primary"><v-icon class="mr-sm-2">mdi-download</v-icon>Klipper Log</v-btn></div>
|
||||
<div><v-btn :href="'http://'+hostname+':'+port+'/server/moonraker.log'" color="mt-3 primary"><v-icon class="mr-sm-2">mdi-download</v-icon>Moonraker Log</v-btn></div>
|
||||
<div><v-btn @click="doRestart" :loading="loadingRestart" color="error" class="mt-3"><v-icon class="mr-sm-2">mdi-cached</v-icon>Restart</v-btn></div>
|
||||
<div><v-btn @click="doRestartFirmware" :loading="loadingRestartFirmware" class="mt-3" color="error"><v-icon class="mr-sm-2">mdi-cached</v-icon><span class="d-none d-sm-block">FW Restart</span></v-btn></div>
|
||||
<div><v-btn @click="doRebootHost" :loading="loadingRebootHost" class="mt-3" color="error"><v-icon class="mr-sm-2">mdi-cached</v-icon><span class="d-none d-sm-block">Host Restart</span></v-btn></div>
|
||||
<div><v-btn @click="doShutdownHost" :loading="loadingShutdownHost" class="mt-3" color="error"><v-icon class="mr-sm-2">mdi-power</v-icon><span class="d-none d-sm-block">Host Shutdown</span></v-btn></div>
|
||||
</v-card-text>
|
||||
</v-card>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {mapMutations, mapState} from 'vuex'
|
||||
|
||||
export default {
|
||||
components: {
|
||||
|
||||
},
|
||||
data: function() {
|
||||
return {
|
||||
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapState({
|
||||
hostname: state => state.socket.hostname,
|
||||
port: state => state.socket.port,
|
||||
loadingRestart: state => state.socket.loadingRestart,
|
||||
loadingRestartFirmware: state => state.socket.loadingRestartFirmware,
|
||||
loadingRebootHost: state => state.socket.loadingRebootHost,
|
||||
loadingShutdownHost: state => state.socket.loadingShutdownHost,
|
||||
}),
|
||||
...mapMutations([
|
||||
'setLoadingRestart',
|
||||
'setLoadingRestartFirmware',
|
||||
]),
|
||||
},
|
||||
methods: {
|
||||
doRestart() {
|
||||
this.$store.commit('setLoadingRestart', true);
|
||||
this.$socket.sendObj('post_printer_restart', { }, "responseRestart");
|
||||
},
|
||||
doRestartFirmware() {
|
||||
this.$store.commit('setLoadingRestartFirmware', true);
|
||||
this.$socket.sendObj('post_printer_firmware_restart', { }, "responseRestartFirmware");
|
||||
},
|
||||
doRebootHost() {
|
||||
this.$store.commit('setLoadingRebootHost', true);
|
||||
this.$socket.sendObj('post_machine_reboot', { });
|
||||
},
|
||||
doShutdownHost() {
|
||||
this.$store.commit('setLoadingShutdownHost', true);
|
||||
this.$socket.sendObj('post_machine_shutdown', { });
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -3,10 +3,18 @@ import Vue from 'vue'
|
||||
import WebcamPanel from './WebcamPanel.vue'
|
||||
import DashboardPanel from "./DashboardPanel";
|
||||
import MacrosPanel from "./MacrosPanel";
|
||||
import EndstopPanel from "./EndstopPanel";
|
||||
import LimitsPanel from "./LimitsPanel";
|
||||
import RunoutPanel from "./RunoutPanel";
|
||||
import SystemPanel from "./SystemPanel";
|
||||
|
||||
Vue.component('settings-webcam-panel', WebcamPanel);
|
||||
Vue.component('settings-dashboard-panel', DashboardPanel);
|
||||
Vue.component('settings-macros-panel', MacrosPanel);
|
||||
Vue.component('settings-endstop-panel', EndstopPanel);
|
||||
Vue.component('settings-limits-panel', LimitsPanel);
|
||||
Vue.component('settings-runout-panel', RunoutPanel);
|
||||
Vue.component('settings-system-panel', SystemPanel);
|
||||
|
||||
export default {
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<v-card>
|
||||
<v-list-item>
|
||||
<v-list-item-avatar color="grey"><v-icon dark>fa-info</v-icon></v-list-item-avatar>
|
||||
<v-list-item-avatar color="grey"><v-icon dark>mdi-information-variant</v-icon></v-list-item-avatar>
|
||||
<v-list-item-content>
|
||||
<v-list-item-title class="headline">Status</v-list-item-title>
|
||||
<v-list-item-subtitle class="mr-3">{{ printer_state }}{{ printer_is_printing ? " - "+current_file : "" }}</v-list-item-subtitle>
|
||||
@@ -12,6 +12,11 @@
|
||||
</v-list-item>
|
||||
<v-divider class="my-2" ></v-divider>
|
||||
<v-card-text class="px-0 pt-0 pb-2 content">
|
||||
<v-layout wrap class=" text-center" v-if="display_message">
|
||||
<v-flex col tag="strong" class="category-header">Message</v-flex>
|
||||
<v-flex col class="text-left">{{ display_message }}</v-flex>
|
||||
</v-layout>
|
||||
<v-divider class="my-2" v-if="display_message" ></v-divider>
|
||||
<v-layout wrap class=" text-center">
|
||||
<v-flex col tag="strong" class="category-header">
|
||||
Position
|
||||
@@ -73,13 +78,13 @@
|
||||
<v-flex grow class="equal-width">
|
||||
<v-layout column>
|
||||
<v-flex tag="strong">Filament</v-flex>
|
||||
<v-flex tag="span">{{ filament_used > 0 && current_file_filament_used > 0 ? formatTime(print_time / (filament_used / current_file_filament_used) - print_time) : '--' }}</v-flex>
|
||||
<v-flex tag="span">{{ (filament_used > 0 && current_file_filament_total > filament_used) ? formatTime(print_time / (filament_used / current_file_filament_total) - print_time) : '--' }}</v-flex>
|
||||
</v-layout>
|
||||
</v-flex>
|
||||
<v-flex grow class="equal-width">
|
||||
<v-layout column>
|
||||
<v-flex tag="strong">Slicer</v-flex>
|
||||
<v-flex tag="span">{{ current_file_estimated_time > print_time ? formatTime(current_file_estimated_time - print_time) : formatTime(0) }}</v-flex>
|
||||
<v-flex tag="span">{{ current_file_estimated_time > print_time ? formatTime(current_file_estimated_time - print_time) : '--'}}</v-flex>
|
||||
</v-layout>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
@@ -103,10 +108,6 @@
|
||||
import { mapState, mapGetters } from 'vuex';
|
||||
|
||||
export default {
|
||||
data: () => ({
|
||||
|
||||
|
||||
}),
|
||||
computed: {
|
||||
...mapState({
|
||||
toolhead: state => state.printer.toolhead,
|
||||
@@ -126,13 +127,15 @@
|
||||
printer_state: state => state.printer.idle_timeout.state,
|
||||
printer_is_paused: state => state.printer.pause_resume.is_paused,
|
||||
printer_is_printing: state => state.printer.virtual_sdcard.is_active,
|
||||
|
||||
display_message: state => state.printer.display_status.message,
|
||||
}),
|
||||
|
||||
...mapGetters([
|
||||
'current_file_size',
|
||||
'current_file_metadata',
|
||||
'current_file_estimated_time',
|
||||
'current_file_filament_used',
|
||||
'current_file_filament_total',
|
||||
'is_printing',
|
||||
]),
|
||||
},
|
||||
@@ -150,10 +153,12 @@
|
||||
this.$socket.sendObj('post_printer_print_cancel', { }, 'setLoadingPrintCancel');
|
||||
},
|
||||
formatTime(seconds) {
|
||||
let date = new Date(null);
|
||||
date.setSeconds(seconds);
|
||||
let h = Math.floor(seconds / 3600);
|
||||
seconds %= 3600;
|
||||
let m = Math.floor(seconds / 60);
|
||||
let s = seconds % 60;
|
||||
|
||||
return date.toISOString().substr(11,8);
|
||||
return h+':'+m+':'+s;
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<template>
|
||||
<v-card>
|
||||
<v-list-item>
|
||||
<v-list-item-avatar color="grey"><v-icon dark>fa-thermometer-three-quarters</v-icon></v-list-item-avatar>
|
||||
<v-list-item-avatar color="grey"><v-icon dark>mdi-thermometer</v-icon></v-list-item-avatar>
|
||||
<v-list-item-content>
|
||||
<v-list-item-title class="headline">Temperature Chart</v-list-item-title>
|
||||
<v-list-item-subtitle>
|
||||
|
||||
@@ -7,13 +7,15 @@
|
||||
<template>
|
||||
<v-card>
|
||||
<v-list-item>
|
||||
<v-list-item-avatar color="grey"><v-icon dark>fa-thermometer-three-quarters</v-icon></v-list-item-avatar>
|
||||
<v-list-item-avatar color="grey"><v-icon dark>mdi-thermometer</v-icon></v-list-item-avatar>
|
||||
<v-list-item-content>
|
||||
<v-list-item-title class="headline">Heaters</v-list-item-title>
|
||||
<v-list-item-title class="headline">Temperatures</v-list-item-title>
|
||||
<v-list-item-subtitle>
|
||||
{{ heatersCount }} heaters
|
||||
<span v-if="temperature_fans.length === 1">, {{ temperature_fans.length }} fan</span>
|
||||
<span v-if="temperature_fans.length > 1">, {{ temperature_fans.length }} fans</span>
|
||||
<span v-if="temperature_sensors.length === 1">, {{ temperature_sensors.length }} sensor</span>
|
||||
<span v-if="temperature_sensors.length > 1">, {{ temperature_sensors.length }} sensors</span>
|
||||
</v-list-item-subtitle>
|
||||
</v-list-item-content>
|
||||
</v-list-item>
|
||||
@@ -50,6 +52,18 @@
|
||||
</v-col>
|
||||
</v-row>
|
||||
</div>
|
||||
<div v-if="temperature_sensors.length" >
|
||||
<v-divider class="my-2"></v-divider>
|
||||
<v-row class="pl-3 pr-3 heater-row">
|
||||
<v-col class="text-center py-0">
|
||||
<b>Temperature<br />Sensors</b>
|
||||
</v-col>
|
||||
<v-col class="text-center py-0 vertical_align_center" v-for="(sensor,index) in temperature_sensors" v-bind:key="index+999" >
|
||||
<span style="cursor: default;" :title="'min: '+sensor.measured_min_temp.toFixed(1)+'° / max: '+sensor.measured_max_temp.toFixed(1)+'°'">{{ sensor.temperature.toFixed(1) }}°C</span><br />
|
||||
<small style="cursor: default;" :title="'min: '+sensor.measured_min_temp.toFixed(1)+'° / max: '+sensor.measured_max_temp.toFixed(1)+'°'">{{ sensor.name }}</small>
|
||||
</v-col>
|
||||
</v-row>
|
||||
</div>
|
||||
<v-divider class="my-2" v-if="boolTempchart"></v-divider>
|
||||
<v-row v-if="boolTempchart">
|
||||
<v-col>
|
||||
@@ -61,7 +75,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {mapGetters, mapState} from 'vuex'
|
||||
import { mapGetters, mapState } from 'vuex'
|
||||
import toolInput from '../../inputs/ToolInput'
|
||||
import LineChart from '../../charts/LineChart.js'
|
||||
|
||||
@@ -90,7 +104,11 @@
|
||||
'heaters',
|
||||
'heatersCount',
|
||||
'temperature_fans',
|
||||
'temperature_sensors',
|
||||
])
|
||||
},
|
||||
created() {
|
||||
|
||||
},
|
||||
methods: {
|
||||
fillData () {
|
||||
|
||||
@@ -5,9 +5,8 @@ import ToolsPanel from './ToolsPanel.vue'
|
||||
import TempchartPanel from './TempchartPanel.vue'
|
||||
import ControlPanel from "./ControlPanel";
|
||||
import Peripherie from "./PeripheriePanel";
|
||||
import MacrosPanel from "./MacrosPanel";
|
||||
import LimitsPanel from "./LimitsPanel";
|
||||
import WebcamPanel from "./WebcamPanel";
|
||||
import MiniconsolePanel from "./MiniconsolePanel";
|
||||
import Settings from "./Settings/";
|
||||
|
||||
Vue.component('status-panel', StatusPanel);
|
||||
@@ -15,9 +14,8 @@ Vue.component('tools-panel', ToolsPanel);
|
||||
Vue.component('tempchart-panel', TempchartPanel);
|
||||
Vue.component('control-panel', ControlPanel);
|
||||
Vue.component('peripherie-panel', Peripherie);
|
||||
Vue.component('macros-panel', MacrosPanel);
|
||||
Vue.component('limits-panel', LimitsPanel);
|
||||
Vue.component('webcam-panel', WebcamPanel);
|
||||
Vue.component('miniconsole-panel', MiniconsolePanel);
|
||||
|
||||
export default {
|
||||
Settings
|
||||
|
||||
@@ -29,18 +29,18 @@
|
||||
methods: {
|
||||
setValue() {
|
||||
if (this.value) {
|
||||
let index = this.hiddenMacros.indexOf(this.name);
|
||||
let index = this.hiddenMacros.indexOf(this.name.toUpperCase());
|
||||
if (index > -1) this.hiddenMacros.splice(index, 1);
|
||||
} else this.hiddenMacros.push(this.name);
|
||||
} else this.hiddenMacros.push(this.name.toUpperCase());
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
hiddenMacros: function() {
|
||||
this.value = !this.hiddenMacros.includes(this.name);
|
||||
this.value = !this.hiddenMacros.includes(this.name.toUpperCase());
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.value = !this.hiddenMacros.includes(this.name);
|
||||
this.value = !this.hiddenMacros.includes(this.name.toUpperCase());
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,67 @@
|
||||
<style>
|
||||
.settingsRunoutSwitchInput .v-messages {
|
||||
display: none;
|
||||
}
|
||||
</style>
|
||||
|
||||
<template>
|
||||
<div>
|
||||
<v-row class="px-6" >
|
||||
<v-col sm-12>
|
||||
<v-switch v-model="enabled" :label="enabled ? 'enabled' : 'disabled'" @change="changeSensor()" class="settingsRunoutSwitchInput my-0"></v-switch>
|
||||
</v-col>
|
||||
</v-row>
|
||||
<v-row class="px-6" v-if="enabled" >
|
||||
<v-col sm-12>
|
||||
<label class="mt-1 d-inline-block">Filament:</label>
|
||||
<v-chip class="float-right" :color="filament_detected ? 'green' : 'red' " text-color="white">{{ filament_detected ? 'detected' : 'empty' }}</v-chip>
|
||||
</v-col>
|
||||
</v-row>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
|
||||
export default {
|
||||
data: function() {
|
||||
return {
|
||||
value: false,
|
||||
enabled: false,
|
||||
filament_detected: false,
|
||||
}
|
||||
},
|
||||
props: {
|
||||
name: String,
|
||||
},
|
||||
computed: {
|
||||
...mapGetters([
|
||||
'getFilamentSwitchSensors'
|
||||
])
|
||||
},
|
||||
methods: {
|
||||
changeSensor() {
|
||||
this.$socket.sendObj('post_printer_gcode', { script: 'SET_FILAMENT_SENSOR SENSOR='+this.name+' ENABLE='+(this.enabled ? 0 : 1) });
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
getFilamentSwitchSensors: function() {
|
||||
let sensor = this.getFilamentSwitchSensors.find(sensor => sensor.name === this.name);
|
||||
|
||||
if (sensor) {
|
||||
this.enabled = sensor.enabled;
|
||||
this.filament_detected = sensor.filament_detected;
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
let sensor = this.getFilamentSwitchSensors.find(sensor => sensor.name === this.name);
|
||||
|
||||
if (sensor) {
|
||||
this.enabled = sensor.enabled;
|
||||
this.filament_detected = sensor.filament_detected;
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -10,7 +10,7 @@
|
||||
</style>
|
||||
|
||||
<template>
|
||||
<v-text-field type="number" min="-273" max="1999" step="any" ref="toolField" v-model="value" class="tool-input" @change="setTemps">
|
||||
<v-text-field type="number" min="-273" max="1999" step="any" ref="toolField" v-model="value" class="tool-input" @change="setTemps" onClick="this.select();">
|
||||
</v-text-field>
|
||||
</template>
|
||||
|
||||
|
||||
@@ -15,7 +15,8 @@
|
||||
export default {
|
||||
data: function() {
|
||||
return {
|
||||
value: this.target * this.multi
|
||||
value: this.target * this.multi,
|
||||
variableMax: 0,
|
||||
}
|
||||
},
|
||||
props: {
|
||||
@@ -52,6 +53,11 @@
|
||||
required: false,
|
||||
default: 100
|
||||
},
|
||||
extenderSteps: {
|
||||
type: Number,
|
||||
required: false,
|
||||
default: 100
|
||||
},
|
||||
multi: {
|
||||
type: Number,
|
||||
required: false,
|
||||
@@ -77,7 +83,24 @@
|
||||
watch: {
|
||||
target: function() {
|
||||
this.value = this.target * this.multi;
|
||||
}
|
||||
},
|
||||
/*value: function() {
|
||||
if (this.value > 0) {
|
||||
if (this.value > (this.variableMax - this.extenderSteps) && this.value < (this.variableMax + this.extenderSteps)) this.variableMax += this.extenderSteps;
|
||||
else if (this.value > (this.variableMax - this.extenderSteps)) {
|
||||
this.variableMax = (this.value / this.extenderSteps).toFixed(0) * this.extenderSteps;
|
||||
if (this.variableMax < this.max) this.variableMax = this.max;
|
||||
}
|
||||
}
|
||||
}*/
|
||||
},
|
||||
/*created: function() {
|
||||
/!*window.console.log("Test");
|
||||
window.console.log(this.target+' * '+this.multi);
|
||||
this.value = this.target * this.multi;*!/
|
||||
window.console.log(this.target+' * '+this.multi);
|
||||
this.variableMax = (this.value / this.extenderSteps + 1).toFixed(0) * this.extenderSteps;
|
||||
if (this.variableMax < this.max) this.variableMax = this.max;
|
||||
}*/
|
||||
}
|
||||
</script>
|
||||
+25
-25
@@ -1,12 +1,11 @@
|
||||
import Vue from 'vue'
|
||||
import JRPCWS from './plugins/json-rpc-websocket'
|
||||
import WebSocketClient from './plugins/wsClient'
|
||||
import App from './App.vue'
|
||||
import vuetify from './plugins/vuetify'
|
||||
import VueResource from 'vue-resource'
|
||||
import './components'
|
||||
import store from './store'
|
||||
import router from './plugins/router'
|
||||
import 'vue-toast-notification/dist/index.css';
|
||||
import vueHeadful from 'vue-headful';
|
||||
|
||||
Vue.config.productionTip = false;
|
||||
@@ -20,29 +19,30 @@ Vue.http.headers.common['Access-Control-Allow-Methods'] = 'POST, GET, PUT, OPTIO
|
||||
|
||||
Vue.component('vue-headful', vueHeadful);
|
||||
|
||||
fetch('/config.json').then(res => res.json()).then(file => {
|
||||
store.commit('setSettings', file);
|
||||
fetch('/config.json')
|
||||
.then(res => res.json())
|
||||
.then(file => {
|
||||
store.commit('setSettings', file);
|
||||
|
||||
Vue.use(JRPCWS, 'ws://' + store.state.socket.hostname + ':' + store.state.socket.port + '/websocket', {
|
||||
store: store,
|
||||
reconnectEnabled: true,
|
||||
reconnectInterval: store.state.socket.reconnectInterval,
|
||||
reconnectAttempts: store.state.socket.reconnectAttempts,
|
||||
});
|
||||
const socketClient = new WebSocketClient('ws://' + store.state.socket.hostname + ':' + store.state.socket.port + '/websocket', {
|
||||
store: store,
|
||||
reconnectEnabled: true,
|
||||
reconnectInterval: store.state.socket.reconnectInterval,
|
||||
});
|
||||
socketClient.connect();
|
||||
Vue.prototype.$socket = socketClient;
|
||||
|
||||
new Vue({
|
||||
data(){
|
||||
return file
|
||||
},
|
||||
vuetify,
|
||||
router,
|
||||
store,
|
||||
render: h => h(App)
|
||||
}).$mount('#app')
|
||||
}).catch((error) => {
|
||||
let p = document.createElement("p");
|
||||
let content = document.createTextNode("config.json not found or cannot be decoded!");
|
||||
p.appendChild(content);
|
||||
document.getElementById('app').append(p);
|
||||
window.console.error('Error:', error);
|
||||
new Vue({
|
||||
vuetify,
|
||||
router,
|
||||
store,
|
||||
render: h => h(App)
|
||||
}).$mount('#app')
|
||||
})
|
||||
.catch((error) => {
|
||||
let p = document.createElement("p");
|
||||
let content = document.createTextNode("config.json not found or cannot be decoded!");
|
||||
p.appendChild(content);
|
||||
document.getElementById('app').append(p);
|
||||
window.console.error('Error:', error);
|
||||
});
|
||||
@@ -82,6 +82,7 @@
|
||||
</template>
|
||||
<script>
|
||||
import { mapState, mapGetters } from 'vuex';
|
||||
import Vue from "vue";
|
||||
|
||||
export default {
|
||||
data () {
|
||||
@@ -132,7 +133,7 @@
|
||||
methods: {
|
||||
doSend() {
|
||||
this.loadingSendGcode = true;
|
||||
this.$socket.sendObj('post_printer_gcode', { script: this.gcode }, "sendGcode");
|
||||
Vue.prototype.$socket.sendObj('post_printer_gcode', { script: this.gcode }, "sendGcode");
|
||||
this.lastCommands.push(this.gcode);
|
||||
this.gcode = "";
|
||||
this.lastCommandNumber = null;
|
||||
|
||||
+20
-4
@@ -3,23 +3,39 @@
|
||||
<v-col class="col-sm-12 col-md-7">
|
||||
<status-panel></status-panel>
|
||||
<webcam-panel v-if="showDashboardWebcam" class="mt-6"></webcam-panel>
|
||||
<control-panel class="mt-6"></control-panel>
|
||||
<control-panel class="mt-6" v-if="is_ready"></control-panel>
|
||||
</v-col>
|
||||
<v-col class="col-sm-12 col-md-5">
|
||||
<tools-panel></tools-panel>
|
||||
<peripherie-panel></peripherie-panel>
|
||||
<tools-panel v-if="is_ready"></tools-panel>
|
||||
<peripherie-panel class="mt-6" v-if="is_ready"></peripherie-panel>
|
||||
<miniconsole-panel class="mt-6" v-if="is_ready && showDashboardConsole"></miniconsole-panel>
|
||||
</v-col>
|
||||
</v-row>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex'
|
||||
import { mapState, mapGetters } from 'vuex'
|
||||
|
||||
export default {
|
||||
data: () => ({
|
||||
is_ready: false
|
||||
}),
|
||||
computed: {
|
||||
...mapState({
|
||||
showDashboardConsole: state => state.gui.dashboard.boolConsole,
|
||||
klippy_state: state => state.socket.klippy_state,
|
||||
}),
|
||||
...mapGetters([
|
||||
'showDashboardWebcam'
|
||||
])
|
||||
},
|
||||
created() {
|
||||
this.is_ready = (this.klippy_state === "ready") ? true : false;
|
||||
},
|
||||
watch: {
|
||||
klippy_state() {
|
||||
this.is_ready = (this.klippy_state === "ready") ? true : false;
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
+7
-15
@@ -86,7 +86,7 @@
|
||||
{{ item.layer_height ? item.layer_height.toFixed(2)+' mm' : '--' }}
|
||||
</td>
|
||||
<td class="text-no-wrap text-right">
|
||||
{{ item.filament_used ? item.filament_used.toFixed()+' mm' : '--' }}
|
||||
{{ item.filament_total ? item.filament_total.toFixed()+' mm' : '--' }}
|
||||
</td>
|
||||
<td class="text-no-wrap text-right">
|
||||
{{ formatPrintTime(item.estimated_time) }}
|
||||
@@ -164,7 +164,7 @@
|
||||
},
|
||||
{
|
||||
text: 'Filament Usage',
|
||||
value: 'filament_used',
|
||||
value: 'filament_total',
|
||||
align: 'right',
|
||||
},
|
||||
{
|
||||
@@ -225,15 +225,11 @@
|
||||
}
|
||||
).then((result) => {
|
||||
this.$store.commit('setLoadingGcodeUpload', false);
|
||||
toast.success("Upload of "+result.data.result+" successful!", {
|
||||
icon: 'fa-check'
|
||||
});
|
||||
toast.success("Upload of "+result.data.result+" successful!");
|
||||
})
|
||||
.catch(() => {
|
||||
this.$store.commit('setLoadingGcodeUpload', false);
|
||||
toast.error("Cannot upload the file!", {
|
||||
icon: 'fa-exclamation-triangle'
|
||||
});
|
||||
toast.error("Cannot upload the file!");
|
||||
});
|
||||
},
|
||||
clickUploadButton: function() {
|
||||
@@ -296,14 +292,10 @@
|
||||
removeFile() {
|
||||
axios.delete(
|
||||
'http://'+ this.hostname + ':' + this.port +'/printer/files/'+this.contextMenu.item.filename
|
||||
).then(() => {
|
||||
this.$toast(this.contextMenu.item.filename+" successfully deleted.", {
|
||||
icon: 'fa-trash'
|
||||
});
|
||||
).then((result) => {
|
||||
this.$toast.success(result.data.result+" successfully deleted.");
|
||||
}).catch(() => {
|
||||
this.$toast.error("Error! Cannot delete file.", {
|
||||
icon: 'fa-warning'
|
||||
});
|
||||
this.$toast.error("Error! Cannot delete file.");
|
||||
});
|
||||
},
|
||||
startPrint(filename = "") {
|
||||
|
||||
@@ -0,0 +1,159 @@
|
||||
<style>
|
||||
|
||||
</style>
|
||||
|
||||
<template>
|
||||
<div>
|
||||
<v-row>
|
||||
<v-col class="col-xl-8">
|
||||
<v-card>
|
||||
<v-list-item>
|
||||
<v-list-item-avatar color="grey"><v-icon dark>mdi-grid</v-icon></v-list-item-avatar>
|
||||
<v-list-item-content>
|
||||
<v-list-item-title class="headline">Heightmap</v-list-item-title>
|
||||
</v-list-item-content>
|
||||
</v-list-item>
|
||||
<v-divider class="my-2"></v-divider>
|
||||
<v-card-text class="px-0 py-0 content">
|
||||
<Plotly ref="heightmap" :data="data" :layout="layout" :display-mode-bar="false"></Plotly>
|
||||
</v-card-text>
|
||||
</v-card>
|
||||
</v-col>
|
||||
<v-col class="col-xl-4">
|
||||
<v-card>
|
||||
<v-list-item>
|
||||
<v-list-item-avatar color="grey"><v-icon dark>mdi-cogs</v-icon></v-list-item-avatar>
|
||||
<v-list-item-content>
|
||||
<v-list-item-title class="headline">Profile</v-list-item-title>
|
||||
</v-list-item-content>
|
||||
</v-list-item>
|
||||
<v-divider class="my-2"></v-divider>
|
||||
<v-card-text>
|
||||
<v-select
|
||||
:items="profiles"
|
||||
v-model="profile"
|
||||
item-text="name"
|
||||
item-value="data"
|
||||
label="Profil"
|
||||
outlined
|
||||
></v-select>
|
||||
</v-card-text>
|
||||
</v-card>
|
||||
</v-col>
|
||||
</v-row>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { mapState } from 'vuex';
|
||||
import { Plotly } from 'vue-plotly'
|
||||
|
||||
export default {
|
||||
components: {
|
||||
Plotly
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
data:[
|
||||
{
|
||||
x: [],
|
||||
y: [],
|
||||
z: [],
|
||||
type:"surface",
|
||||
intensity: [0, .05, .1],
|
||||
cmin: -0.1,
|
||||
cmax: 0.1,
|
||||
showscale: true,
|
||||
autocolorscale: true,
|
||||
colorbar: {
|
||||
tickfont: {
|
||||
color: '#fff'
|
||||
},
|
||||
}
|
||||
}
|
||||
],
|
||||
layout:{
|
||||
showScale: true,
|
||||
plot_bgcolor: 'transparent',
|
||||
paper_bgcolor: 'transparent',
|
||||
margin: {
|
||||
l: 0,
|
||||
r: 100,
|
||||
b: 0,
|
||||
t: 0
|
||||
},
|
||||
scene: {
|
||||
camera: {
|
||||
eye: {
|
||||
x: -1.25,
|
||||
y: -1.25,
|
||||
z: 0.25
|
||||
}
|
||||
},
|
||||
xaxis: {
|
||||
color: '#fff',
|
||||
range: [0,200]
|
||||
},
|
||||
yaxis: {
|
||||
color: '#fff',
|
||||
range: [0,200]
|
||||
},
|
||||
zaxis: {
|
||||
color: '#fff',
|
||||
range: [-1,1]
|
||||
}
|
||||
}
|
||||
},
|
||||
profiles: [],
|
||||
profile: {}
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapState({
|
||||
config: state => state.config,
|
||||
}),
|
||||
},
|
||||
methods: {
|
||||
|
||||
},
|
||||
watch: {
|
||||
config: function() {
|
||||
this.profiles = this.$store.getters.getBedMeshProfiles;
|
||||
|
||||
if (this.config.stepper_x !== undefined) this.layout.scene.xaxis.range = [this.config.stepper_x.position_min, this.config.stepper_x.position_max];
|
||||
if (this.config.stepper_y !== undefined) this.layout.scene.yaxis.range= [this.config.stepper_y.position_min, this.config.stepper_y.position_max];
|
||||
|
||||
this.$refs.heightmap.update();
|
||||
},
|
||||
profile: function() {
|
||||
this.data[0].x = [];
|
||||
let x_step = (this.profile.max_x - this.profile.min_x) / this.profile.x_count;
|
||||
for(let i = 0; i < this.profile.x_count; i++) {
|
||||
this.data[0].x.push(parseFloat(this.profile.min_x) + parseFloat(x_step) * i);
|
||||
}
|
||||
|
||||
this.data[0].y = [];
|
||||
let y_step = (this.profile.max_y - this.profile.min_y) / this.profile.y_count;
|
||||
for(let i = 0; i < this.profile.y_count; i++) {
|
||||
this.data[0].y.push(parseFloat(this.profile.min_y) + parseFloat(y_step) * i);
|
||||
}
|
||||
|
||||
this.data[0].z = [];
|
||||
let rows = this.profile.points.split('\n')
|
||||
rows.forEach((row) => {
|
||||
if (row !== "") {
|
||||
let tmp = [];
|
||||
let cols = row.split(', ');
|
||||
cols.forEach((col) => {
|
||||
tmp.push(parseFloat(col));
|
||||
});
|
||||
|
||||
this.data[0].z.push(tmp);
|
||||
}
|
||||
});
|
||||
|
||||
//this.$refs.heightmap.plot();
|
||||
window.console.log(this.$refs);
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -1,15 +1,13 @@
|
||||
<template>
|
||||
<div>
|
||||
<v-row>
|
||||
<v-col class="col-6">
|
||||
<v-col class="col-12 col-md-6 col-lg-4">
|
||||
<settings-dashboard-panel></settings-dashboard-panel>
|
||||
</v-col>
|
||||
<v-col class="col-6">
|
||||
<v-col class="col-12 col-md-6 col-lg-4">
|
||||
<settings-webcam-panel></settings-webcam-panel>
|
||||
</v-col>
|
||||
</v-row>
|
||||
<v-row>
|
||||
<v-col class="col-6">
|
||||
<v-col class="col-12 col-md-6 col-lg-4">
|
||||
<settings-macros-panel></settings-macros-panel>
|
||||
</v-col>
|
||||
</v-row>
|
||||
|
||||
@@ -1,14 +1,38 @@
|
||||
<template>
|
||||
<div>
|
||||
<v-row>
|
||||
<v-col class="col-sm-12 col-md-6">
|
||||
<limits-panel></limits-panel>
|
||||
<v-col class="col-sm-12 col-md-6" v-if="is_ready">
|
||||
<settings-limits-panel></settings-limits-panel>
|
||||
</v-col>
|
||||
<v-col class="col-sm-12 col-md-3" v-if="is_ready">
|
||||
<settings-endstop-panel></settings-endstop-panel>
|
||||
<settings-runout-panel></settings-runout-panel>
|
||||
</v-col>
|
||||
<v-col class="col-sm-12 col-md-3">
|
||||
<settings-system-panel></settings-system-panel>
|
||||
</v-col>
|
||||
</v-row>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
import {mapState} from "vuex";
|
||||
|
||||
export default {
|
||||
data: () => ({
|
||||
is_ready: false
|
||||
}),
|
||||
computed: {
|
||||
...mapState({
|
||||
klippy_state: state => state.socket.klippy_state,
|
||||
}),
|
||||
},
|
||||
created() {
|
||||
this.is_ready = (this.klippy_state === "ready") ? true : false;
|
||||
},
|
||||
watch: {
|
||||
klippy_state() {
|
||||
this.is_ready = (this.klippy_state === "ready") ? true : false;
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -1,9 +0,0 @@
|
||||
import WebSocketClient from './wsClient'
|
||||
|
||||
export default {
|
||||
install (Vue, url, options) {
|
||||
const socketClient = new WebSocketClient(url, options)
|
||||
socketClient.connect()
|
||||
Vue.prototype.$socket = socketClient
|
||||
}
|
||||
}
|
||||
@@ -1,122 +0,0 @@
|
||||
export default class WebSocketClient {
|
||||
constructor (url, options) {
|
||||
this.instance = null
|
||||
this.url = url
|
||||
this.options = options || this.defaultOptions()
|
||||
if (this.options) {
|
||||
if (options.reconnectEnabled) {
|
||||
this.reconnectEnabled = options.reconnectEnabled
|
||||
if (this.reconnectEnabled) {
|
||||
this.reconnectInterval = options.reconnectInterval
|
||||
this.reconnectAttempts = options.recconectAttempts
|
||||
this.reconnectCount = 1
|
||||
}
|
||||
}
|
||||
if (options.store) {
|
||||
this.store = options.store
|
||||
}
|
||||
}
|
||||
|
||||
this.wsData = []
|
||||
|
||||
this.onOpen = null
|
||||
this.onMessage = null
|
||||
this.onClose = null
|
||||
this.onError = null
|
||||
}
|
||||
|
||||
createMessage (method, params, id) {
|
||||
let msg = {
|
||||
jsonrpc: '2.0', method: method, params: params, id: id
|
||||
};
|
||||
return JSON.stringify(msg)
|
||||
}
|
||||
|
||||
defaultOptions () {
|
||||
return {
|
||||
reconnectEnabled: false,
|
||||
reconnectInterval: 0,
|
||||
recconectAttempts: 0,
|
||||
store: undefined
|
||||
}
|
||||
}
|
||||
|
||||
passToStore (eventName, event) {
|
||||
if (!eventName.startsWith('socket_')) { return }
|
||||
let method = 'dispatch'
|
||||
let target = eventName
|
||||
let msg = event
|
||||
if (event.data) {
|
||||
msg = JSON.parse(event.data)
|
||||
}
|
||||
this.store[method](target, msg)
|
||||
}
|
||||
|
||||
connect () {
|
||||
this.instance = new WebSocket(this.url);
|
||||
|
||||
this.instance.onopen = () => {
|
||||
if (this.reconnectEnabled) this.reconnectCount = 1;
|
||||
if (typeof this.onOpen === 'function') this.onOpen();
|
||||
if (this.store) this.passToStore('socket_on_open', event);
|
||||
};
|
||||
|
||||
this.instance.onmessage = (msg) => {
|
||||
let data = JSON.parse(msg.data);
|
||||
if (typeof this.onMessage === 'function') {
|
||||
this.onMessage(data)
|
||||
} else if (this.store) {
|
||||
if ('error' in data) {
|
||||
this.passToStore('socket_on_error', data.error)
|
||||
} else if (this.wsData.filter(item => item.id === data.id).length > 0 &&
|
||||
this.wsData.filter(item => item.id === data.id)[0].action !== "") {
|
||||
this.store.dispatch(
|
||||
this.wsData.filter(item => item.id === data.id)[0].action,
|
||||
data.result
|
||||
)
|
||||
} else this.passToStore('socket_on_message', data)
|
||||
}
|
||||
}
|
||||
|
||||
this.instance.onclose = (e) => {
|
||||
if (typeof this.onClose === 'function') {
|
||||
this.onClose(e)
|
||||
} else if (this.store) {
|
||||
this.passToStore('socket_on_close', e)
|
||||
}
|
||||
if (!e.wasClean && this.reconnectEnabled) {
|
||||
this.reconnect()
|
||||
}
|
||||
}
|
||||
|
||||
this.instance.onerror = (e) => {
|
||||
if (typeof this.onError === 'function') {
|
||||
this.onError(e)
|
||||
} else if (this.store) {
|
||||
this.passToStore('socket_on_error', e)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
reconnect () {
|
||||
if (this.reconnectCount <= this.reconnectAttempts) {
|
||||
this.reconnectCount++
|
||||
delete this.instance
|
||||
setTimeout(() => {
|
||||
this.connect()
|
||||
if (this.store) { this.passToStore('socket_reconnect', this.reconnectCount) }
|
||||
}, this.reconnectInterval)
|
||||
} else {
|
||||
if (this.store) { this.passToStore('socket_reconnect_error', true) }
|
||||
}
|
||||
}
|
||||
|
||||
sendObj (method, params, action = '') {
|
||||
let id = Math.floor(Math.random() * 10000) + 1
|
||||
this.wsData.push({
|
||||
id: id,
|
||||
action: action
|
||||
})
|
||||
this.instance.send(this.createMessage(method, params, id))
|
||||
}
|
||||
}
|
||||
+10
-10
@@ -1,7 +1,14 @@
|
||||
import '@fortawesome/fontawesome-free/css/all.css'
|
||||
import '@mdi/font/css/materialdesignicons.css'
|
||||
import Vue from 'vue';
|
||||
import Vuetify, { VSnackbar, VBtn, VIcon } from 'vuetify/lib';
|
||||
import VuetifyToast from 'vuetify-toast-snackbar'
|
||||
|
||||
//vue-toast-notification
|
||||
import VueToast from 'vue-toast-notification';
|
||||
import 'vue-toast-notification/dist/theme-sugar.css';
|
||||
|
||||
Vue.use(VueToast, {
|
||||
duration: 3000,
|
||||
});
|
||||
|
||||
|
||||
Vue.use(Vuetify,{
|
||||
@@ -12,15 +19,8 @@ Vue.use(Vuetify,{
|
||||
}
|
||||
});
|
||||
|
||||
Vue.use(VuetifyToast, {
|
||||
x: 'right',
|
||||
y: 'bottom',
|
||||
timeout: 3000,
|
||||
});
|
||||
|
||||
export default new Vuetify({
|
||||
|
||||
icons: {
|
||||
iconfont: 'fa',
|
||||
iconfont: 'mdi',
|
||||
},
|
||||
});
|
||||
@@ -0,0 +1,79 @@
|
||||
export default class WebSocketClient {
|
||||
|
||||
constructor (url, options) {
|
||||
this.instance = null;
|
||||
this.url = url;
|
||||
this.reconnectInterval = options.reconnectInterval;
|
||||
this.store = options.store;
|
||||
this.wsData = [];
|
||||
this.timerId = 0;
|
||||
this.keepAliveTimeout = 1000;
|
||||
|
||||
this.onOpen = null;
|
||||
this.onMessage = null;
|
||||
this.onClose = null;
|
||||
this.onError = null;
|
||||
}
|
||||
|
||||
createMessage (method, params, id) {
|
||||
let msg = {
|
||||
jsonrpc: '2.0', method: method, params: params, id: id
|
||||
};
|
||||
return JSON.stringify(msg)
|
||||
}
|
||||
|
||||
passToStore (eventName, event) {
|
||||
if (!eventName.startsWith('socket_')) { return }
|
||||
let method = 'dispatch'
|
||||
let target = eventName
|
||||
let msg = event
|
||||
if (event && event.data) {
|
||||
msg = JSON.parse(event.data)
|
||||
}
|
||||
this.store[method](target, msg)
|
||||
}
|
||||
|
||||
connect () {
|
||||
this.instance = new WebSocket(this.url);
|
||||
|
||||
this.instance.onopen = () => {
|
||||
if (this.store) this.passToStore('socket_on_open', event);
|
||||
};
|
||||
|
||||
this.instance.onclose = (e) => {
|
||||
window.console.log("Websocket Closed, reconnecting in "+this.reconnectInterval+"ms: ", e.reason);
|
||||
this.passToStore('socket_on_close', e);
|
||||
|
||||
setTimeout(() => {
|
||||
this.connect();
|
||||
}, this.reconnectInterval);
|
||||
};
|
||||
|
||||
this.instance.onerror = (err) => {
|
||||
console.log("Websocket Error: ", err);
|
||||
this.instance.close();
|
||||
};
|
||||
|
||||
this.instance.onmessage = (msg) => {
|
||||
let data = JSON.parse(msg.data);
|
||||
if (this.store) {
|
||||
if (this.wsData.filter(item => item.id === data.id).length > 0 &&
|
||||
this.wsData.filter(item => item.id === data.id)[0].action !== "") {
|
||||
this.store.dispatch(
|
||||
this.wsData.filter(item => item.id === data.id)[0].action,
|
||||
data.result
|
||||
)
|
||||
} else this.passToStore('socket_on_message', data)
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
sendObj (method, params, action = '') {
|
||||
let id = Math.floor(Math.random() * 10000) + 1
|
||||
this.wsData.push({
|
||||
id: id,
|
||||
action: action
|
||||
})
|
||||
this.instance.send(this.createMessage(method, params, id))
|
||||
}
|
||||
}
|
||||
+23
-7
@@ -2,6 +2,7 @@ import Dashboard from '../pages/Dashboard.vue'
|
||||
//import Status from '../pages/Status.vue'
|
||||
import Webcam from '../pages/Webcam.vue'
|
||||
import Console from '../pages/Console.vue'
|
||||
import Heightmap from '../pages/Heightmap.vue'
|
||||
import Files from '../pages/Files.vue'
|
||||
import Settings from '../pages/Settings.vue'
|
||||
import SettingsInterface from '../pages/settings/interface.vue'
|
||||
@@ -13,18 +14,28 @@ const routes = [
|
||||
path: '/',
|
||||
icon: 'view-dashboard',
|
||||
component: Dashboard,
|
||||
alwaysShow: true,
|
||||
},
|
||||
{
|
||||
title: "Webcam",
|
||||
path: '/webcam',
|
||||
icon: 'webcam',
|
||||
component: Webcam,
|
||||
alwaysShow: false,
|
||||
},
|
||||
{
|
||||
title: "Console",
|
||||
path: '/console',
|
||||
icon: 'code-tags',
|
||||
icon: 'console-line',
|
||||
component: Console,
|
||||
alwaysShow: false,
|
||||
},
|
||||
{
|
||||
title: "Heightmap",
|
||||
path: '/heightmap',
|
||||
icon: 'grid',
|
||||
component: Heightmap,
|
||||
alwaysShow: false,
|
||||
},
|
||||
/*{
|
||||
title: "Current Job",
|
||||
@@ -37,22 +48,27 @@ const routes = [
|
||||
path: '/files',
|
||||
icon: 'printer-3d-nozzle',
|
||||
component: Files,
|
||||
alwaysShow: false,
|
||||
},
|
||||
{
|
||||
title: "Settings",
|
||||
path: '/settings',
|
||||
redirect: '/settings/machine',
|
||||
icon: 'wrench',
|
||||
component: Settings,
|
||||
alwaysShow: true,
|
||||
children: [
|
||||
{
|
||||
title: 'Interface',
|
||||
path: '/settings/interface',
|
||||
component: SettingsInterface
|
||||
},
|
||||
{
|
||||
title: 'Machine',
|
||||
path: '/settings/machine',
|
||||
component: SettingsMachine
|
||||
component: SettingsMachine,
|
||||
alwaysShow: true,
|
||||
},
|
||||
{
|
||||
title: 'Interface',
|
||||
path: '/settings/interface',
|
||||
component: SettingsInterface,
|
||||
alwaysShow: true,
|
||||
},
|
||||
]
|
||||
},
|
||||
|
||||
+63
-60
@@ -17,23 +17,6 @@ export default {
|
||||
});
|
||||
|
||||
Vue.prototype.$socket.sendObj('get_printer_info', {}, 'getKlipperInfo');
|
||||
Vue.prototype.$socket.sendObj('get_printer_objects', {}, 'getObjectInfo');
|
||||
Vue.prototype.$socket.sendObj('get_printer_status', { heater: [] }, 'getObjectInfo');
|
||||
Vue.prototype.$socket.sendObj('get_printer_status', { configfile: ['config'] }, 'getPrinterConfig');
|
||||
Vue.prototype.$socket.sendObj('post_printer_subscriptions', {
|
||||
gcode: [],
|
||||
toolhead: [],
|
||||
virtual_sdcard: [],
|
||||
heater: [],
|
||||
heater_bed: [],
|
||||
extruder: ["temperature", "target"],
|
||||
fan: [],
|
||||
pause_resume: [],
|
||||
idle_timeout: [],
|
||||
|
||||
});
|
||||
Vue.prototype.$socket.sendObj('get_printer_files', {}, 'getFileList');
|
||||
Vue.prototype.$socket.sendObj('get_printer_gcode_help', {}, 'getHelpList');
|
||||
},
|
||||
|
||||
socket_on_close ({ commit }, event) {
|
||||
@@ -46,10 +29,6 @@ export default {
|
||||
window.console.error('Code: ' + event.code)
|
||||
},
|
||||
|
||||
socket_on_error ({ commit }, data) {
|
||||
commit('reportError', data);
|
||||
},
|
||||
|
||||
socket_on_message ({ commit, state }, data) {
|
||||
if (!state.socket.isConnected) commit('setConnected');
|
||||
switch(data.method) {
|
||||
@@ -65,9 +44,9 @@ export default {
|
||||
commit('setPrinterStatus', data.params[0]);
|
||||
break;
|
||||
|
||||
/*case 'notify_klippy_state_changed':
|
||||
case 'notify_klippy_state_changed':
|
||||
commit('setPrinterStatus', data.params[0]);
|
||||
break;*/
|
||||
break;
|
||||
|
||||
case 'notify_filelist_changed':
|
||||
commit('setFileList', data.params[0].filelist);
|
||||
@@ -86,30 +65,6 @@ export default {
|
||||
}
|
||||
},
|
||||
|
||||
socket_reconnect ({ commit }, count) {
|
||||
commit('setConnected');
|
||||
window.console.log(count);
|
||||
Vue.prototype.$socket.sendObj('get_printer_status', { heater: [] }, 'getObjectInfo');
|
||||
Vue.prototype.$socket.sendObj('get_printer_status', { configfile: ['config'] }, 'getPrinterConfig');
|
||||
Vue.prototype.$socket.sendObj('post_printer_subscriptions', {
|
||||
gcode: [],
|
||||
toolhead: [],
|
||||
virtual_sdcard: [],
|
||||
heater: [],
|
||||
heater_bed: [],
|
||||
extruder: ["temperature", "target"],
|
||||
fan: [],
|
||||
pause_resume: [],
|
||||
idle_timeout: [],
|
||||
|
||||
});
|
||||
},
|
||||
|
||||
socket_reconnect_error ({ commit }) {
|
||||
commit('setDisconnected');
|
||||
window.console.error('Socket disconnected')
|
||||
},
|
||||
|
||||
saveGuiSettings({ commit, state }) {
|
||||
commit('setLoadingSaveGuiConfige', true);
|
||||
let file = new File([JSON.stringify({ webcam: state.webcam, gui: state.gui })], 'gui.json');
|
||||
@@ -129,23 +84,60 @@ export default {
|
||||
},
|
||||
|
||||
getKlipperInfo({ commit }, data) {
|
||||
commit('setPrinterData', {
|
||||
hostname: data.hostname,
|
||||
version: data.version
|
||||
});
|
||||
if (data !== undefined && data.is_ready) {
|
||||
commit('setPrinterData', {
|
||||
hostname: data.hostname,
|
||||
version: data.version
|
||||
});
|
||||
|
||||
commit('setPrinterStatus', 'ready');
|
||||
|
||||
Vue.prototype.$socket.sendObj('get_printer_objects', {}, 'getObjectInfo');
|
||||
Vue.prototype.$socket.sendObj('get_printer_status', { heaters: [] }, 'getHeatersInfo');
|
||||
Vue.prototype.$socket.sendObj('get_printer_status', { configfile: ['config'] }, 'getPrinterConfig');
|
||||
Vue.prototype.$socket.sendObj('post_printer_subscriptions', {
|
||||
gcode: [],
|
||||
toolhead: [],
|
||||
virtual_sdcard: [],
|
||||
heaters: [],
|
||||
fan: [],
|
||||
pause_resume: [],
|
||||
idle_timeout: [],
|
||||
display_status: [],
|
||||
});
|
||||
Vue.prototype.$socket.sendObj('get_printer_files', {}, 'getFileList');
|
||||
Vue.prototype.$socket.sendObj('get_printer_gcode_help', {}, 'getHelpList');
|
||||
} else {
|
||||
commit('setPrinterStatus', 'disconnected');
|
||||
|
||||
setTimeout(function() {
|
||||
Vue.prototype.$socket.sendObj('get_printer_info', {}, 'getKlipperInfo');
|
||||
}, 1000);
|
||||
}
|
||||
},
|
||||
|
||||
getObjectInfo({ commit }, data) {
|
||||
commit('setObjectData', data);
|
||||
},
|
||||
|
||||
getPrinterConfig({commit}, data) {
|
||||
commit('setPrinterConfig', data);
|
||||
getHeatersInfo({ commit }, data) {
|
||||
commit('setObjectData', data);
|
||||
|
||||
if (data.heaters.available_heaters.length) {
|
||||
data.heaters.available_heaters.forEach(function(heater) {
|
||||
Vue.prototype.$socket.sendObj('post_printer_subscriptions', { [heater]: [] });
|
||||
})
|
||||
}
|
||||
|
||||
Vue.prototype.$socket.sendObj("get_server_temperature_store", {}, "getHeatersHistory");
|
||||
},
|
||||
|
||||
addSubscription(state, data) {
|
||||
window.console.log(state);
|
||||
window.console.log(data);
|
||||
getHeatersHistory({ commit }, data) {
|
||||
commit('setHeaterHistory', data);
|
||||
},
|
||||
|
||||
getPrinterConfig({commit}, data) {
|
||||
commit('setPrinterConfig', data);
|
||||
},
|
||||
|
||||
getFileList({ commit }, data) {
|
||||
@@ -157,6 +149,11 @@ export default {
|
||||
commit('setHelpList', data);
|
||||
},
|
||||
|
||||
setHeaterChartVisibility({ commit, dispatch }, data) {
|
||||
commit('setHeaterChartVisibility', data);
|
||||
dispatch('saveGuiSettings');
|
||||
},
|
||||
|
||||
setLoadingSendGcode({commit}, value) {
|
||||
commit('setLoadingSendGcode', value);
|
||||
},
|
||||
@@ -180,22 +177,23 @@ export default {
|
||||
sendGcode({commit}, data) {
|
||||
commit('setLoadingSendGcode', false);
|
||||
commit('sendGcode', data);
|
||||
commit('addGcodeResponse', data);
|
||||
},
|
||||
|
||||
responseHome({commit}) {
|
||||
commit('setLoadingHome', false);
|
||||
commit('removeLoading', { name: 'controlHomeAll' });
|
||||
},
|
||||
|
||||
responseHomeX({commit}) {
|
||||
commit('setLoadingHomeX', false);
|
||||
commit('removeLoading', { name: 'controlHomeX' });
|
||||
},
|
||||
|
||||
responseHomeY({commit}) {
|
||||
commit('setLoadingHomeY', false);
|
||||
commit('removeLoading', { name: 'controlHomeY' });
|
||||
},
|
||||
|
||||
responseHomeZ({commit}) {
|
||||
commit('setLoadingHomeZ', false);
|
||||
commit('removeLoading', { name: 'controlHomeZ' });
|
||||
},
|
||||
|
||||
responseQGL({commit}) {
|
||||
@@ -210,6 +208,11 @@ export default {
|
||||
commit('setLoadingRestartFirmware', false);
|
||||
},
|
||||
|
||||
responseEndstopStatus({ commit }, data) {
|
||||
commit('setLoadingEndstopStatus', false);
|
||||
commit('setEndstopStatus', data);
|
||||
},
|
||||
|
||||
switchToDashboard() {
|
||||
router.push("/");
|
||||
},
|
||||
|
||||
+85
-6
@@ -6,9 +6,9 @@ export default {
|
||||
heaters: state => {
|
||||
let heaters = [];
|
||||
|
||||
if (state.object.heater.available_heaters) {
|
||||
if (state.object.heaters.available_heaters) {
|
||||
for (let [key, value] of Object.entries(state.printer)) {
|
||||
if (state.object.heater.available_heaters.includes(key)) {
|
||||
if (state.object.heaters.available_heaters.includes(key)) {
|
||||
heaters.push({
|
||||
name: key,
|
||||
target: value.target,
|
||||
@@ -60,6 +60,33 @@ export default {
|
||||
});
|
||||
},
|
||||
|
||||
temperature_sensors: state => {
|
||||
let sensors = [];
|
||||
|
||||
for (let [key, value] of Object.entries(state.printer)) {
|
||||
let nameSplit = key.split(" ");
|
||||
|
||||
if (nameSplit[0] === "temperature_sensor") {
|
||||
sensors.push({
|
||||
name: nameSplit[1],
|
||||
temperature: value.temperature,
|
||||
measured_min_temp: value.measured_min_temp,
|
||||
measured_max_temp: value.measured_max_temp,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
return sensors.sort((a, b) => {
|
||||
let nameA = a.name.toUpperCase();
|
||||
let nameB = b.name.toUpperCase();
|
||||
|
||||
if (nameA < nameB) return -1;
|
||||
if (nameA > nameB) return 1;
|
||||
|
||||
return 0;
|
||||
});
|
||||
},
|
||||
|
||||
current_file_size: state => {
|
||||
let file = state.files.filter((file) => file.filename === state.printer.virtual_sdcard.current_file);
|
||||
|
||||
@@ -84,10 +111,10 @@ export default {
|
||||
return 0;
|
||||
},
|
||||
|
||||
current_file_filament_used: state => {
|
||||
current_file_filament_total: state => {
|
||||
let file = state.files.filter((file) => file.filename === state.printer.virtual_sdcard.current_file);
|
||||
|
||||
if (file.length) return file[0]['filament_used'];
|
||||
if (file.length) return file[0]['filament_total'];
|
||||
|
||||
return 0;
|
||||
},
|
||||
@@ -109,7 +136,7 @@ export default {
|
||||
|
||||
for (let prop in state.config) {
|
||||
if (prop.startsWith('gcode_macro') &&
|
||||
!state.config[prop].hasOwnProperty('rename_existing') &&
|
||||
!Object.hasOwnProperty.call(state.config[prop], 'rename_existing') &&
|
||||
!(hiddenMacros.indexOf(prop.replace('gcode_macro ', '').toLowerCase()) > -1)
|
||||
) {
|
||||
array.push({
|
||||
@@ -134,7 +161,8 @@ export default {
|
||||
let array = [];
|
||||
|
||||
for (let prop in state.config) {
|
||||
if (prop.startsWith('gcode_macro') && !state.config[prop].hasOwnProperty('rename_existing')) {
|
||||
if (prop.startsWith('gcode_macro') &&
|
||||
!Object.hasOwnProperty.call(state.config[prop], 'rename_existing')) {
|
||||
array.push({
|
||||
'name': prop.replace('gcode_macro ', ''),
|
||||
'prop': state.config[prop]
|
||||
@@ -153,6 +181,57 @@ export default {
|
||||
});
|
||||
},
|
||||
|
||||
getFilamentSwitchSensors: state => {
|
||||
let sensors = [];
|
||||
|
||||
for (let [key, value] of Object.entries(state.printer)) {
|
||||
let nameSplit = key.split(" ");
|
||||
|
||||
if (nameSplit[0] === "filament_switch_sensor") {
|
||||
sensors.push({
|
||||
name: nameSplit[1],
|
||||
enabled: value.enabled,
|
||||
filament_detected: value.filament_detected,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
return sensors.sort((a, b) => {
|
||||
let nameA = a.name.toUpperCase();
|
||||
let nameB = b.name.toUpperCase();
|
||||
|
||||
if (nameA < nameB) return -1;
|
||||
if (nameA > nameB) return 1;
|
||||
|
||||
return 0;
|
||||
});
|
||||
},
|
||||
|
||||
getBedMeshProfiles: state => {
|
||||
let profiles = [];
|
||||
|
||||
for (let [key, value] of Object.entries(state.config)) {
|
||||
let nameSplit = key.split(" ");
|
||||
|
||||
if (nameSplit[0] === "bed_mesh" && nameSplit[1] !== undefined) {
|
||||
profiles.push({
|
||||
name: nameSplit[1],
|
||||
data: value
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
return profiles.sort((a, b) => {
|
||||
let nameA = a.name.toUpperCase();
|
||||
let nameB = b.name.toUpperCase();
|
||||
|
||||
if (nameA < nameB) return -1;
|
||||
if (nameA > nameB) return 1;
|
||||
|
||||
return 0;
|
||||
});
|
||||
},
|
||||
|
||||
getTitle: state => {
|
||||
if (state.socket.isConnected) {
|
||||
if (state.printer.pause_resume.is_paused) return "Pause Print";
|
||||
|
||||
+15
-8
@@ -12,23 +12,22 @@ export default new Vuex.Store({
|
||||
state: {
|
||||
socket: {
|
||||
hostname: window.location.hostname,
|
||||
port: 8080,
|
||||
port: window.location.port,
|
||||
reconnectInterval: 3000,
|
||||
reconnectAttempts: 1000,
|
||||
isConnected: false,
|
||||
loadingGcodeUpload: false,
|
||||
loadingGcodeRefresh: false,
|
||||
loadingEmergencyStop: false,
|
||||
loadingPrintPause: false,
|
||||
loadingPrintResume: false,
|
||||
loadingHome: false,
|
||||
loadingHomeX: false,
|
||||
loadingHomeY: false,
|
||||
loadingHomeZ: false,
|
||||
loadingQGL: false,
|
||||
loadingRestart: false,
|
||||
loadingRestartFirmware: false,
|
||||
loadingRebootHost: false,
|
||||
loadingShutdownHost: false,
|
||||
loadingSaveGuiConfig: false,
|
||||
loadingEndstopStatus: false,
|
||||
klippy_state: "ready",
|
||||
},
|
||||
webcam: {
|
||||
url: ""
|
||||
@@ -37,7 +36,9 @@ export default new Vuex.Store({
|
||||
dashboard: {
|
||||
boolWebcam: true,
|
||||
boolTempchart: true,
|
||||
boolConsole: false,
|
||||
hiddenMacros: [],
|
||||
hiddenTempChart: [],
|
||||
},
|
||||
webcam: {
|
||||
bool: false,
|
||||
@@ -46,6 +47,7 @@ export default new Vuex.Store({
|
||||
countPerPage: 10,
|
||||
}
|
||||
},
|
||||
loadings: [],
|
||||
config: {
|
||||
|
||||
},
|
||||
@@ -71,6 +73,10 @@ export default new Vuex.Store({
|
||||
printing_time: 0,
|
||||
state: "",
|
||||
},
|
||||
display_status: {
|
||||
message: null,
|
||||
progress: 0,
|
||||
},
|
||||
virtual_sdcard: {
|
||||
progress: 0,
|
||||
current_file: "",
|
||||
@@ -86,10 +92,11 @@ export default new Vuex.Store({
|
||||
},
|
||||
fan: {
|
||||
speed: 0,
|
||||
}
|
||||
},
|
||||
endstops: {},
|
||||
},
|
||||
object: {
|
||||
heater: {
|
||||
heaters: {
|
||||
available_heaters: []
|
||||
}
|
||||
},
|
||||
|
||||
+156
-98
@@ -1,97 +1,146 @@
|
||||
import Vue from "vue";
|
||||
const objectAssignDeep = require(`object-assign-deep`);
|
||||
import { colorArray, colorChamber, colorHeaterBed, temperaturChartSampleInterval, temperaturChartSampleLength } from './variables';
|
||||
import { colorArray, colorChamber, colorHeaterBed, temperaturChartSampleLength } from './variables';
|
||||
|
||||
export default {
|
||||
|
||||
setConnected (state) {
|
||||
state.socket.isConnected = true;
|
||||
|
||||
Vue.prototype.$socket
|
||||
//reset store
|
||||
},
|
||||
|
||||
setDisconnected (state) {
|
||||
state.socket.isConnected = false
|
||||
Vue.prototype.$socket.reconnect();
|
||||
state.socket.isConnected = false;
|
||||
//Vue.prototype.$socket.reconnect();
|
||||
},
|
||||
|
||||
setPrinterData(state, data) {
|
||||
Object.assign(state.printer, data);
|
||||
|
||||
if (Array.isArray(state.object.heater.available_heaters) && state.object.heater.available_heaters.length) {
|
||||
let boolAddValues = false;
|
||||
let now = new Date();
|
||||
if (Array.isArray(state.object.heaters.available_heaters) && state.object.heaters.available_heaters.length) {
|
||||
let now = Date.now();
|
||||
|
||||
if (state.temperaturChart.labels.length === 0 || now - state.temperaturChart.labels[state.temperaturChart.labels.length - 1] > temperaturChartSampleInterval) {
|
||||
for (let [key, value] of Object.entries(data)) {
|
||||
let keySplit = key.split(" ");
|
||||
for (let [key, value] of Object.entries(data)) {
|
||||
let keySplit = key.split(" ");
|
||||
|
||||
if (state.object.heater.available_heaters.includes(key) || keySplit[0] === "temperature_fan") {
|
||||
if (keySplit[0] === "temperature_fan") key = keySplit[1];
|
||||
if (state.object.heaters.available_heaters.includes(key) || keySplit[0] === "temperature_fan") {
|
||||
if (keySplit[0] === "temperature_fan") key = keySplit[1];
|
||||
|
||||
let index = state.temperaturChart.datasets.findIndex(element => element.label === key);
|
||||
let index_target = state.temperaturChart.datasets.findIndex(element => element.label === key+'_target');
|
||||
|
||||
if (index >= 0) {
|
||||
state.temperaturChart.datasets[index].data.push(value.temperature.toFixed(1));
|
||||
state.temperaturChart.datasets[index_target].data.push(value.target.toFixed(1));
|
||||
} else {
|
||||
let color = '#f87979';
|
||||
|
||||
switch (key) {
|
||||
case 'heater_bed': color = colorHeaterBed; break;
|
||||
case 'chamber': color = colorChamber; break;
|
||||
default: color = colorArray[state.temperaturChart.datasets.length]; break;
|
||||
}
|
||||
|
||||
state.temperaturChart.datasets.push({
|
||||
label: key,
|
||||
data: [value.temperature.toFixed(1)],
|
||||
borderColor: color,
|
||||
backgroundColor: color,
|
||||
fill: false,
|
||||
borderDash: undefined,
|
||||
borderWidth: 2,
|
||||
pointRadius: 0,
|
||||
pointHitRadius: 5,
|
||||
showLine: true
|
||||
});
|
||||
|
||||
state.temperaturChart.datasets.push({
|
||||
label: key+"_target",
|
||||
data: [value.target.toFixed(1)],
|
||||
borderColor: color,
|
||||
backgroundColor: color+'20',
|
||||
fill: true,
|
||||
borderDash: undefined,
|
||||
borderWidth: 0,
|
||||
pointRadius: 0,
|
||||
pointHitRadius: 0,
|
||||
showLine: true
|
||||
});
|
||||
}
|
||||
|
||||
boolAddValues = true;
|
||||
}
|
||||
this.commit('addTemperatureChartValue', { name: key, value: value, time: now });
|
||||
}
|
||||
|
||||
if (boolAddValues) {
|
||||
state.temperaturChart.labels.push(now);
|
||||
|
||||
if (state.temperaturChart.labels.length > temperaturChartSampleLength) {
|
||||
state.temperaturChart.labels.splice(0, state.temperaturChart.labels.length-temperaturChartSampleLength)
|
||||
}
|
||||
}
|
||||
|
||||
for (let [key, dataset] of Object.entries(state.temperaturChart.datasets)) {
|
||||
if (dataset.data.length > temperaturChartSampleLength) {
|
||||
state.temperaturChart.datasets[key].data.splice(0, dataset.data.length-temperaturChartSampleLength)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
setHeaterHistory(state, data) {
|
||||
let now = new Date();
|
||||
|
||||
if (data !== undefined) {
|
||||
for (let [key, datasets] of Object.entries(data)) {
|
||||
let keySplit = key.split(" ");
|
||||
|
||||
if (keySplit.length > 1) key = keySplit[1];
|
||||
|
||||
let max = datasets.temperatures.length;
|
||||
for (let i = 0; i < max; i++) {
|
||||
let time = new Date(now.getTime() - 1000 * (max - i));
|
||||
this.commit('addTemperatureChartValue', {
|
||||
name: key,
|
||||
value: {
|
||||
temperature: datasets.temperatures[i],
|
||||
target: datasets.targets[i],
|
||||
},
|
||||
type: keySplit[0],
|
||||
time: time
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
addTemperatureChartValue(state, payload) {
|
||||
if (state.temperaturChart.labels.map(Number).indexOf(+payload.time) < 0) {
|
||||
state.temperaturChart.labels.push(payload.time);
|
||||
|
||||
if (state.temperaturChart.labels.length > temperaturChartSampleLength) {
|
||||
state.temperaturChart.labels = state.temperaturChart.labels.splice(state.temperaturChart.labels.length - temperaturChartSampleLength)
|
||||
}
|
||||
}
|
||||
|
||||
let index = state.temperaturChart.datasets.findIndex(element => element.label === payload.name);
|
||||
if (index < 0) {
|
||||
this.commit('addTemperatureChartHeater', {
|
||||
name: payload.name,
|
||||
type: payload.type,
|
||||
});
|
||||
index = state.temperaturChart.datasets.findIndex(element => element.label === payload.name);
|
||||
}
|
||||
let index_target = state.temperaturChart.datasets.findIndex(element => element.label === payload.name+'_target');
|
||||
|
||||
if (index >= 0) state.temperaturChart.datasets[index].data.push(payload.value.temperature.toFixed(1));
|
||||
if (index_target >= 0) state.temperaturChart.datasets[index_target].data.push(payload.value.target.toFixed(1));
|
||||
|
||||
if (index >= 0 && state.temperaturChart.datasets[index].data.length > temperaturChartSampleLength) {
|
||||
state.temperaturChart.datasets[index].data = state.temperaturChart.datasets[index].data.splice(state.temperaturChart.datasets[index].data.length - temperaturChartSampleLength)
|
||||
}
|
||||
|
||||
if (index_target >= 0 && state.temperaturChart.datasets[index_target].data.length > temperaturChartSampleLength) {
|
||||
state.temperaturChart.datasets[index_target].data = state.temperaturChart.datasets[index_target].data.splice(state.temperaturChart.datasets[index_target].data.length - temperaturChartSampleLength)
|
||||
}
|
||||
},
|
||||
|
||||
addTemperatureChartHeater(state, payload) {
|
||||
let color = '';
|
||||
|
||||
switch (payload.name) {
|
||||
case 'heater_bed': color = colorHeaterBed; break;
|
||||
case 'chamber': color = colorChamber; break;
|
||||
default: color = colorArray[state.temperaturChart.datasets.length]; break;
|
||||
}
|
||||
|
||||
let hidden = state.gui.dashboard.hiddenTempChart.indexOf(payload.name.toUpperCase()) >= 0 ? true : null;
|
||||
|
||||
state.temperaturChart.datasets.push({
|
||||
label: payload.name,
|
||||
data: [],
|
||||
borderColor: color,
|
||||
backgroundColor: color,
|
||||
fill: false,
|
||||
borderDash: undefined,
|
||||
borderWidth: 2,
|
||||
pointRadius: 0,
|
||||
pointHitRadius: 5,
|
||||
showLine: true,
|
||||
lineTension: 0,
|
||||
hidden: hidden,
|
||||
});
|
||||
|
||||
if (payload.type !== "temperature_sensor") {
|
||||
state.temperaturChart.datasets.push({
|
||||
label: payload.name+"_target",
|
||||
data: [],
|
||||
borderColor: color,
|
||||
backgroundColor: color+'20',
|
||||
fill: true,
|
||||
borderDash: undefined,
|
||||
borderWidth: 0,
|
||||
pointRadius: 0,
|
||||
pointHitRadius: 0,
|
||||
showLine: true,
|
||||
lineTension: 0,
|
||||
hidden: hidden,
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
setHeaterChartVisibility(state, data) {
|
||||
let index = state.gui.dashboard.hiddenTempChart.indexOf(data.name.toUpperCase());
|
||||
|
||||
if (data.hidden && index === -1) state.gui.dashboard.hiddenTempChart.push(data.name.toUpperCase())
|
||||
else if (data.hidden !== true && index > -1) state.gui.dashboard.hiddenTempChart.splice(index, 1);
|
||||
},
|
||||
|
||||
setSettings(state, data) {
|
||||
state = objectAssignDeep(state, data);
|
||||
},
|
||||
@@ -102,18 +151,16 @@ export default {
|
||||
for (let key of Object.keys(data)) {
|
||||
let nameSplit = key.split(" ");
|
||||
|
||||
if (nameSplit[0] === "temperature_fan") {
|
||||
Vue.prototype.$socket.sendObj('post_printer_subscriptions', { [key]: [] });
|
||||
}
|
||||
|
||||
if (nameSplit[0] === "filament_switch_sensor") {
|
||||
Vue.prototype.$socket.sendObj('post_printer_subscriptions', { [key]: [] });
|
||||
}
|
||||
if (
|
||||
nameSplit[0] === "temperature_fan" ||
|
||||
nameSplit[0] === "temperature_sensors" ||
|
||||
nameSplit[0] === "filament_switch_sensor"
|
||||
) Vue.prototype.$socket.sendObj('post_printer_subscriptions', { [key]: [] });
|
||||
}
|
||||
},
|
||||
|
||||
setPrinterConfig(state, data) {
|
||||
Vue.set(state, 'config', data.configfile.config);
|
||||
if (data.configfile) Vue.set(state, 'config', data.configfile.config);
|
||||
},
|
||||
|
||||
setFileList(state, data) {
|
||||
@@ -128,7 +175,7 @@ export default {
|
||||
modified: Date.parse(file.modified),
|
||||
size: file.size,
|
||||
slicer: file.slicer,
|
||||
filament_used: file.filament_used,
|
||||
filament_total: file.filament_total,
|
||||
estimated_time: file.estimated_time,
|
||||
layer_height: file.layer_height,
|
||||
first_layer_height: file.first_layer_height,
|
||||
@@ -157,11 +204,15 @@ export default {
|
||||
message: data
|
||||
});
|
||||
|
||||
if (data.substring(0,2) === "!!") {
|
||||
if (data !== undefined && data.substring(0,2) === "!!") {
|
||||
Vue.$toast.error(data);
|
||||
}
|
||||
},
|
||||
|
||||
setEndstopStatus(state, data) {
|
||||
Vue.set(state.printer, 'endstops', data);
|
||||
},
|
||||
|
||||
setLoadingSendGcode(state, value) {
|
||||
state.socket.loadingSendGcode = value;
|
||||
},
|
||||
@@ -170,8 +221,19 @@ export default {
|
||||
state.socket.loadingSendGcode = false;
|
||||
},
|
||||
|
||||
setLoading(state, data) {
|
||||
if (!state.loadings.includes(data.name)) {
|
||||
state.loadings.push(data.name);
|
||||
}
|
||||
},
|
||||
|
||||
removeLoading(state, data) {
|
||||
state.loadings = state.loadings.filter(function(ele){ return ele !== data.name; });
|
||||
},
|
||||
|
||||
setPrinterStatus(state, value) {
|
||||
state.printer.toolhead.status = value;
|
||||
state.socket.klippy_state = value;
|
||||
//state.printer.toolhead.status = value;
|
||||
},
|
||||
|
||||
setLoadingGcodeUpload(state, value) {
|
||||
@@ -198,22 +260,6 @@ export default {
|
||||
state.socket.loadingPrintCancel = value;
|
||||
},
|
||||
|
||||
setLoadingHome(state, value) {
|
||||
state.socket.loadingHome = value;
|
||||
},
|
||||
|
||||
setLoadingHomeX(state, value) {
|
||||
state.socket.loadingHomeX = value;
|
||||
},
|
||||
|
||||
setLoadingHomeY(state, value) {
|
||||
state.socket.loadingHomeY = value;
|
||||
},
|
||||
|
||||
setLoadingHomeZ(state, value) {
|
||||
state.socket.loadingHomeZ = value;
|
||||
},
|
||||
|
||||
setLoadingQGL(state, value) {
|
||||
state.socket.loadingQGL = value;
|
||||
},
|
||||
@@ -226,10 +272,22 @@ export default {
|
||||
state.socket.loadingRestartFirmware = value;
|
||||
},
|
||||
|
||||
setLoadingRebootHost(state, value) {
|
||||
state.socket.loadingRebootHost = value;
|
||||
},
|
||||
|
||||
setLoadingShutdownHost(state, value) {
|
||||
state.socket.loadingShutdownHost = value;
|
||||
},
|
||||
|
||||
setLoadingSaveGuiConfige(state, value) {
|
||||
state.socket.loadingSaveGuiConfig = value;
|
||||
},
|
||||
|
||||
setLoadingEndstopStatus(state, value) {
|
||||
state.socket.loadingEndstopStatus = value;
|
||||
},
|
||||
|
||||
reportError(state, data) {
|
||||
//Vue.$toast.error(data.message);
|
||||
window.console.log(data);
|
||||
|
||||
@@ -14,5 +14,4 @@ export const colorArray = [
|
||||
|
||||
export const colorHeaterBed = '#2196F3';
|
||||
export const colorChamber = '#4CAF50';
|
||||
export const temperaturChartSampleInterval = 1000;
|
||||
export const temperaturChartSampleLength = 600;
|
||||
Reference in new issue
Block a user