Compare commits

...
193 Commits
Author SHA1 Message Date
Stefan Dej 460714e775 update links
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-11-28 02:40:38 +01:00
Stefan Dej b668fb6b48 typos docs
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-11-28 02:34:32 +01:00
Stefan Dej 8f11d50915 update docs
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-11-28 02:31:38 +01:00
lixxbox d13642cfd2 renamed: docs/about.md -> docs/about.md.draft
modified:   docs/index.md
2020-11-27 23:28:52 +01:00
lixxbox 94858b9340 new file: docs/_config.yml
new file:   docs/_sass/color_schemes/mainsail-dark.scss
	new file:   docs/_sass/color_schemes/mainsail.scss
	new file:   docs/about.md
	new file:   docs/additional-support/index.md
	new file:   docs/additional-support/shares.md.draft
	new file:   docs/additional-support/slicer-upload.md
	new file:   docs/additional-support/thumbnails.md
	new file:   docs/additional-support/webcam.md.draft
	new file:   docs/assets/img/additional/FileUpload-PrusaSlicer-2.2.0.png
	new file:   docs/assets/img/additional/PrusaSlicer-thumbnails.png
	new file:   docs/assets/img/additional/SuperSlicer-thumbnails.png
	new file:   docs/assets/img/additional/large-preview.png
	new file:   docs/assets/img/logo-mainsail-light.png
	renamed:    docs/images/logo-mainsail.png -> docs/assets/img/logo-mainsail.png
	new file:   docs/assets/img/logo.png
	new file:   docs/assets/img/logo.svg
	new file:   docs/assets/img/screenshot.png
	deleted:    docs/images/screenshot-dashboard.png
	deleted:    docs/images/screenshot-gcode-thumbnail.png
	deleted:    docs/images/superslicer-upload.png
	new file:   docs/index.md
	new file:   docs/necessary-cfg.md
	new file:   docs/setup-guide/index.md
	new file:   docs/setup-guide/klipper.md
	new file:   docs/setup-guide/mainsail.md
	new file:   docs/setup-guide/moonraker.md
	new file:   docs/setup-guide/operating-system.md
2020-11-27 23:28:52 +01:00
Stefan Dej 605c6ee05e bugfix: PWA maskable icons
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-11-27 22:21:20 +01:00
Stefan Dej 31667347f9 bugfix: temperature_sensor target temp in chart
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-11-27 20:00:04 +01:00
Stefan Dej 99529defb8 bugfix: change printer name
bugfix: favicon percent icon

Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-11-27 18:48:37 +01:00
Stefan Dej 188bce0aa4 bugfixes
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-11-26 23:00:27 +01:00
Stefan Dej 98f50790c0 bugfixes: missing config update to vuex models, ControlPanel.vue buttons equal width, ConfigFilesPanel.vue default path
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-11-22 20:02:17 +01:00
meteyou 1e2c2d15e6 voron clean & update favicon, icons & pwa
Signed-off-by: meteyou <meteyou@gmail.com>
2020-11-22 01:35:27 +01:00
meteyou cb602518f0 feature: redesign panel headers
Signed-off-by: meteyou <meteyou@gmail.com>
2020-11-21 22:52:54 +01:00
meteyou 8f363ec1c1 feature: dynamic temperature-sensor icons + header minimize from temperature panel
Signed-off-by: meteyou <meteyou@gmail.com>
2020-11-21 18:20:58 +01:00
meteyou f26aff2085 feature: update PowerControlPanel.vue > new moonraker version of power plugin
Signed-off-by: meteyou <meteyou@gmail.com>
2020-11-21 17:30:28 +01:00
meteyou fcae508d19 bugfix: update to smaller header
Signed-off-by: meteyou <meteyou@gmail.com>
2020-11-21 16:51:53 +01:00
meteyou d9b5486346 bugfix: update to smaller header
Signed-off-by: meteyou <meteyou@gmail.com>
2020-11-21 16:49:27 +01:00
meteyou a333b8afa6 bugfix: upload new navi background
Signed-off-by: meteyou <meteyou@gmail.com>
2020-11-21 10:37:18 +01:00
meteyou 672c6b3f32 bugfix: background color on scroll
Signed-off-by: meteyou <meteyou@gmail.com>
2020-11-21 10:13:41 +01:00
meteyou ebaab6324d feature: save countPerPage from gcode files & config files in gui.json
Signed-off-by: meteyou <meteyou@gmail.com>
2020-11-20 20:28:21 +01:00
meteyou 6c01fc04f8 bugfix: fixed updaten heaters in ToolPanel
Signed-off-by: meteyou <meteyou@gmail.com>
2020-11-20 20:27:21 +01:00
meteyou 7756362a58 bugfix: fixed toastr bg colors and font
Signed-off-by: meteyou <meteyou@gmail.com>
2020-11-20 20:26:37 +01:00
meteyou 601d49fc4e bugfix: reprogramming button loadings
Signed-off-by: meteyou <meteyou@gmail.com>
2020-11-20 00:47:58 +01:00
meteyou 7b2d257db3 optimize console view
Signed-off-by: meteyou <meteyou@gmail.com>
2020-11-19 22:41:06 +01:00
meteyou 3fd3862bc5 renew dashboard sizes
feature: new estimated times

Signed-off-by: meteyou <meteyou@gmail.com>
2020-11-19 22:14:39 +01:00
meteyou e9179e5bcd feature: new estimate time calculation
move getters to printer/getters

Signed-off-by: meteyou <meteyou@gmail.com>
2020-11-19 00:29:59 +01:00
meteyou f068a2ef21 update packages
Signed-off-by: meteyou <meteyou@gmail.com>
2020-11-18 22:17:28 +01:00
meteyou 6da293b494 feature: debug .env.development.local.example for moonraker connection
Signed-off-by: meteyou <meteyou@gmail.com>
2020-11-18 21:21:43 +01:00
meteyou fe385d1558 bugfix: dashboard > tempchart
Signed-off-by: meteyou <meteyou@gmail.com>
2020-11-18 11:05:39 +01:00
meteyou d4785c0b27 bugfix: dashbaord > print settings > steps +/- buttons
Signed-off-by: meteyou <meteyou@gmail.com>
2020-11-18 11:04:38 +01:00
meteyou 894ef6912b bugfix: dashboard > MiniconsolePanel.vue > empty message line-height
Signed-off-by: meteyou <meteyou@gmail.com>
2020-11-18 09:15:34 +01:00
meteyou 3997c8b3a1 bugfix: machine limits -> max 0 on startup
Signed-off-by: meteyou <meteyou@gmail.com>
2020-11-17 22:22:48 +01:00
meteyou 5a4dfb492b bugfix: save gcodefiles settings
Signed-off-by: meteyou <meteyou@gmail.com>
2020-11-17 20:47:54 +01:00
meteyou 49c79c9eae bugfix: tool input number buttons hidden
bugfix: UFP thumbnail (only 300px)
bugfix: moonraker > websocket subscription
bugfix: miniconsole > different line baseline
bugfix: new metadata push > redirect to current file
feature: show/hide colums in gcode-files
feature: show/hide hidden files/dir
feature: display missing config sections
feature: display klippy-state in settings > machinies

Signed-off-by: meteyou <meteyou@gmail.com>
2020-11-17 00:35:59 +01:00
meteyou 2bcf08e5ab typo: wikipedia -> wiki
Signed-off-by: meteyou <meteyou@gmail.com>
2020-11-13 21:17:08 +01:00
meteyou ce6843cf49 feature: Missing config panel on Dashboard.vue
Signed-off-by: meteyou <meteyou@gmail.com>
2020-11-09 23:17:52 +01:00
meteyou cf7cb122d1 move docs to github wiki
Signed-off-by: meteyou <meteyou@gmail.com>
2020-11-09 20:42:46 +01:00
meteyou a56050ca1c move docs to github wiki
Signed-off-by: meteyou <meteyou@gmail.com>
2020-11-09 20:41:48 +01:00
meteyou 39fdb75a96 move docs to github wiki
Signed-off-by: meteyou <meteyou@gmail.com>
2020-11-09 20:40:39 +01:00
meteyou f6687a944d feature: show klippy state panel in settings > machine & rename SystemPanel.vue to LogfilesPanel.vue.
Signed-off-by: meteyou <meteyou@gmail.com>
2020-11-08 21:56:44 +01:00
meteyou c513a7ca51 bugfix: print metadata by direct upload & print form slicer
Signed-off-by: meteyou <meteyou@gmail.com>
2020-11-08 21:28:13 +01:00
meteyou 616f84edbe feature: show/hide columns in G-Code-Files
Signed-off-by: meteyou <meteyou@gmail.com>
2020-11-08 18:29:31 +01:00
meteyou fefabb1ef7 delete error toasts
Signed-off-by: meteyou <meteyou@gmail.com>
2020-11-08 00:33:38 +01:00
meteyou 189fd3ddd7 update update.md for moonraker dep.
Signed-off-by: meteyou <meteyou@gmail.com>
2020-11-07 23:22:26 +01:00
Leonard Freimuth e796b27145 Update App.vue 2020-11-05 21:31:41 +01:00
Stefan Dej ac32eca665 fix mini console
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-10-27 23:27:12 +01:00
Stefan Dej f94402b94b update version number, installation.md, update.md to 0.2.6
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-10-27 23:06:48 +01:00
Stefan Dej 91f2e9b6d8 feature: modify dashboard console for more message space
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-10-27 23:05:42 +01:00
Stefan Dej 0f955fbeb4 bugfix: machine-limits expander
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-10-27 22:44:11 +01:00
Randell L Hodges 6282356ddd clear fileupload after uploading 2020-10-27 19:50:27 +01:00
Randell L Hodges 9057bea653 Modified times now come as unix times 2020-10-27 19:45:21 +01:00
Stefan Dej d19bf2ee05 Update update.md and installation.md
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-10-25 00:21:46 +02:00
Stefan Dej f35cf70301 feature: rework the StatusPanel.vue
feature: add Sys Commands to the topbar

Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-10-24 23:14:34 +02:00
meteyou 27308e44ab Merge pull request #108 from randellhodges/handle-gcode-response
handle gcode_store data format changes from moonraker
2020-10-24 16:10:56 +02:00
Randell L Hodges 0a5b664ded removed backwards handling of gcode_store 2020-10-24 09:07:40 -05:00
Randell L Hodges ece599595b handle gcode_store data format changes from moonraker 2020-10-24 08:52:41 -05:00
Stefan Dej c8f847ccc8 bugfix: generic heater in tool panel dont work
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-10-18 15:48:24 +02:00
Stefan Dej ca1fd5d04e update update.md for MainsailOS
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-10-17 13:38:20 +02:00
Stefan Dej 470a7633c5 bugfix: fix typo for gpio power devices
update update.md to 0.2.4

Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-10-16 22:58:37 +02:00
Stefan Dej 01da938a79 update update.md to v0.2.3
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-10-15 21:25:12 +02:00
Stefan Dej b27390133a feature: read version from package.json
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-10-15 21:09:49 +02:00
Stefan Dej 231ef16da1 bugfix: save_config_pending rename
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-10-13 22:41:34 +02:00
Stefan Dej 906e738151 bugfix: dynamic favicon error of pwa
feature: display klippy_disconnected status
feature: load gcode_store on startup

Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-10-13 22:38:48 +02:00
meteyou 4b6bcd7ad4 Merge pull request #101 from meteyou/add-license
Create LICENSE
2020-10-10 14:40:44 +02:00
meteyou 959869b64f Create LICENSE 2020-10-10 14:40:19 +02:00
Stefan Dej fe19bddb54 Merge remote-tracking branch 'origin/master' 2020-10-09 23:56:30 +02:00
Stefan Dej 59db2ca55b bugfix: remove old cancel print commands / default parameters
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-10-09 23:56:17 +02:00
meteyou 1691a2cbfe Merge pull request #94 from cadriel/master
refactor: docs move upstreams and common vars to independent conf
2020-10-05 21:29:22 +02:00
Craig Bassett 257b792aee refactor: docs move upstreams and common vars to independent conf 2020-10-05 10:05:16 -05:00
Stefan Dej 1457f86764 bugfix: remove comment in same line as a config
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-10-04 23:43:56 +02:00
Stefan Dej 3670d4cc63 bugfix: add heater_generic to tools (fix #87)
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-10-04 23:42:15 +02:00
meteyou d397ccf804 Merge pull request #70 from cadriel/feature/static-app-bar
feature: ensures app bar doesn't scroll off page
2020-10-04 18:38:41 +02:00
Stefan Dej 1b3636864d bugfix: startscreen from PWA settings
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-10-04 18:36:49 +02:00
meteyou ce8608f7db Merge pull request #84 from translucentfocus/InitialPWASupport
Feature: Initial PWA Support (Service workers disabled)
2020-10-04 18:01:13 +02:00
Stefan Dej 0b276168b9 add description for gzip and pi zero
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-10-04 17:48:53 +02:00
meteyou ea5f61761b Merge pull request #83 from translucentfocus/patch-1
Enhancement: Add enabling Gzip for mainsail nginx config
2020-10-04 17:44:51 +02:00
meteyou 260be4ae24 Merge pull request #91 from th33xitus/work-docs
Update installation.md
2020-10-04 13:29:09 +02:00
th33xitus 0b14108a6a Update installation.md
Adding a note to make users aware that the IP in the example configuration must be replaced with a valid IP from their own local network.
2020-10-04 12:01:50 +02:00
translucentfocus 7442908405 Initial PWA Support & favicons moved to /img/icons
Inital Commit

Favicon file path fixes & use relative pathing
2020-09-27 22:22:18 -05:00
translucentfocus bb50aa690d Gzip config for mainsail 2020-09-27 21:17:58 -05:00
Stefan Dej facd18543e bugfix: install unzip on a non raspberry pi os image (fix #85)
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-09-28 00:12:25 +02:00
Stefan Dej c3e3c6e567 bugfix: hide klipper version in footer on smarthphone
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-09-28 00:06:55 +02:00
Stefan Dej 0977cb39c6 feature: SAVE_CONFIG button, if klipper needs a "SAVE_CONFIG"
bugfix: temp chart bug after loosing connection (fix #82)
bugfix: clear mainsail store after klipper restart
bugfix: heater min/max temp input field

Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-09-28 00:00:17 +02:00
Stefan Dej e2273ecfaf bugfix: hide power plugin error message
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-09-26 00:22:03 +02:00
Stefan Dej a011510098 bugfix: move gui.json from virtual_sdcard directory to config directory
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-09-25 22:26:51 +02:00
Stefan Dej 08a106d945 bugfix: extruder amounts and feedrates in a array
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-09-23 22:25:08 +02:00
Stefan Dej e6c19065b9 bugfix: navipoint webcam and nginx redirect use the same url (fix #81)
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-09-23 21:14:11 +02:00
Stefan Dej c9e0278b26 Merge remote-tracking branch 'origin/master' 2020-09-21 00:04:42 +02:00
Stefan Dej 8220642774 bugfix: replace underline of macro name (only first underline replaced)
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-09-20 23:48:56 +02:00
meteyou c48f8321d5 Update bug_report.md
fixed line breaks
2020-09-20 19:59:14 +02:00
meteyou 789c1d2a5b Update bug_report.md
wrap test
2020-09-20 19:53:45 +02:00
meteyou 294d21e47c Update bug_report.md
typo fix
2020-09-20 19:48:25 +02:00
meteyou d235c434f4 Merge pull request #72 from kageurufu/ssl-support
Support mainsail through an SSL proxy
2020-09-19 23:11:12 +02:00
meteyou ce8df80d1c Merge pull request #71 from yanfali/safe-default-helper
Small helper function for DRY code
2020-09-19 23:09:02 +02:00
Stefan Dej 0672caa6fd Merge remote-tracking branch 'origin/master' 2020-09-19 23:04:25 +02:00
Stefan Dej bc0d1ed6df update install doc with link zu macros and update macros.md
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-09-19 22:59:28 +02:00
meteyou 676fdaede5 Update issue templates 2020-09-19 21:00:36 +02:00
Stefan Dej 75d742acbe bugfix: hide temps in tempchart (fixed #61)
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-09-19 14:39:15 +02:00
Franklyn c386375e53 Support mainsail through an SSL proxy
I like to run all my web services proxied through a single
 internet-accessible server, secured through SSL and authenticated
 against a single proxy server (nginx, in my case)

I found that mainsail hardcoded ws:// and many http:// addresses, so
 I've updated them to detect ws:// vs ws:///, and just use the protocol
 agnostic // prefix, which then sends the request over the same protocol
 the page is loaded under, either http or https.

Now i've got a nice SSL secured but publicly accessible URL for remote
 printer monitoring
2020-09-15 07:40:00 +01:00
meteyou 98f7ceebd7 Merge pull request #65 from yanfali/share-sorting-function
Share the sort function in getters between functions
2020-09-15 08:18:24 +02:00
Yan-Fa Li c14f9d8deb Small helper function for DRY code
Adds small helper function, to avoid repeating pattern.
2020-09-14 13:17:28 -07:00
Craig Bassett 8aef278a03 feature: ensures app bar doesn't scroll off page
Added benefit of the emergency stop button being always available.
2020-09-14 14:32:37 -05:00
Yan-Fa Li bd938a5d02 Share the sort function in getters between functions
- factor out sort into a named function and share it among common
   callers
 - add a suggested .editorconfig to avoid changing indents and line
   endings
 - add a suggested .pretterrc which honors original formatting as much
   as possible
2020-09-14 09:47:27 -07:00
Stefan Dej 76a93ccb45 feature: add slicer version in g-codes files
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-09-14 00:29:19 +02:00
meteyou 5a20f9dcad Merge pull request #69 from translucentfocus/master
Separated some words
2020-09-13 23:05:44 +02:00
translucentfocus 5fed21320f Add spacing 2020-09-13 14:18:25 -05:00
translucentfocus 8d620ba522 Add spacing 2020-09-13 14:17:28 -05:00
meteyou 9074d28d9f Merge pull request #38 from Birkemosen/PowerControl
Initial development of Power Control Panel
2020-09-12 23:24:41 +02:00
meteyou a60603e360 Merge pull request #67 from kageurufu/disable-autocomplete
Disable browser autocomplete in console
2020-09-12 23:23:11 +02:00
meteyou b216ead36d Merge pull request #64 from cadriel/feature/webcam_flip
feature: allows flipping the webcam horizontally and vertically
2020-09-12 22:33:16 +02:00
Franklyn 330e78828d Disable browser autocomplete in console
This stops chrome from breaking the cnonsole history feature
2020-09-12 18:36:56 +01:00
Craig Bassett b0b25839ca feature: allows flipping the webcam horizontally and vertically 2020-09-11 14:14:24 -05:00
Stefan Dej 5caaf20ee1 Merge remote-tracking branch 'origin/master' 2020-09-10 22:16:50 +02:00
Stefan Dej afb62ca393 credits upload
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-09-10 22:16:32 +02:00
meteyou c971e80074 Merge pull request #58 from kageurufu/fix-encoded-filenames
Use encodeURI instead of encodeURIComponent for paths+filename
2020-09-06 22:53:26 +02:00
Franklyn f53cd00cc1 Use encodeURI for paths
Moonraker expects file paths to use un-escaped file paths,
 such as gcodes/some%20file.gcode, but encodeURIComponent
 will always escape the slash. Using encodeURI here will not.
2020-09-06 20:36:24 +01:00
Birkemosen 59efbfa369 Update to latest moonraker api changes 2020-09-06 21:31:17 +02:00
Birkemosen b314e57bfc Update from upstream 2020-09-06 21:16:11 +02:00
Stefan Dej 458444f03a bugfix: delete files with % in filename (fix #55)
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-09-06 00:31:04 +02:00
Stefan Dej 2c093913e8 bugfix: extrude buttons min_extrude_temp dynamic
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-09-04 23:49:15 +02:00
Stefan Dej c81c491577 update versionnumber
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-09-03 22:32:33 +02:00
Stefan Dej 5cbed10d44 feature: add "edit file" in context menu of configfiles
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-09-03 22:07:15 +02:00
Stefan Dej 958358d483 update docs for v0.2.2
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-09-03 21:40:42 +02:00
Stefan Dej ddc2ab477f Update websocket reqeusts for moonraker update from 03-09-2020
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-09-03 21:28:47 +02:00
Stefan Dej f351268745 bugfix: Files.vue context menu "print start" -> wrong action
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-09-03 21:03:24 +02:00
Stefan Dej 25a7e8a33b bugfix: check websocket before send requests
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-09-02 23:57:37 +02:00
Stefan Dej 8b8f3cf939 feature: switch to meta data notifiy
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-09-02 23:57:05 +02:00
meteyou 3440d486df Merge pull request #53 from th33xitus/patch-extrude_retract_gcode
bugfix: remove M120/M121 from extrude/retract command
2020-09-02 11:18:57 +02:00
th33xitus 693fcae49a bugfix: remove unnecessary M120/M121
Removes the unnecessary M120 and M121 g-codes when sending an extrude or retract command via the Extrude/Retract button via the Dashboard
2020-09-02 11:06:51 +02:00
Birkemosen c99d4bea7e Change hiding of PowerControlPanel to Dashboard.vue. Update power buttons state from moonraker response. 2020-09-02 10:08:03 +02:00
Stefan Dej ac01dce620 bugfix: fix gcode thumbnail on dashboard
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-09-02 00:10:34 +02:00
Stefan Dej d3c3113c43 bugfix: show status if no thumbnail exists
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-09-02 00:02:31 +02:00
Stefan Dej ae30257ee1 update docs to v0.2.1
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-09-01 23:56:10 +02:00
Stefan Dej b5add6f919 bugfix: sticky toolbar in config editor
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-09-01 23:48:09 +02:00
Stefan Dej 90b3419552 increment version number
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-09-01 23:30:29 +02:00
Stefan Dej 0100eaad5d bugfix: configfile save button and scrollbar overlap
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-09-01 23:29:14 +02:00
Stefan Dej 825d65be9d bugfix: expand min/max in heightmap is lower -1 or higher 1
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-09-01 23:05:29 +02:00
Stefan Dej 38a0c8f441 bugfix: settings panel system -> responsive view
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-09-01 22:50:09 +02:00
Stefan Dej ad6ae1128b feature: show gcode thumbnail in StatusPanel.vue while printing
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-09-01 22:45:12 +02:00
Stefan Dej 6094c4f9bd bugfix: show favicon if print process == 100%
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-09-01 22:44:23 +02:00
Stefan Dej 65a4e40d39 bugfix: SettingsSystemPanel remove margin top when klipper != ready
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-09-01 20:53:37 +02:00
Stefan Dej 39f3cfe824 bugfix: ZOffsetPanel.vue current offset
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-09-01 20:42:13 +02:00
Stefan Dej 84c9040e2a bugfix: print pause button reset loading status
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-09-01 20:22:47 +02:00
Stefan Dej 890a3e3332 bugfix: min_extrude_temp from config file (extrude/retract buttons on dashboard)
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-09-01 20:19:53 +02:00
Stefan Dej 16b6ed6000 bugfix: min_extrude_temp from config file (extrude/retract buttons on dashboard)
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-09-01 19:32:21 +02:00
Birkemosen 2efc961eeb Fix missing upstream update 2020-09-01 13:13:47 +02:00
Birkemosen 70c259bd22 Merge remote-tracking branch 'upstream/master' into PowerControl 2020-09-01 13:00:22 +02:00
Stefan Dej d6eb97ffe1 update guides to 0.2.0
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-09-01 00:04:31 +02:00
Stefan Dej fb10211b52 typo heart.png
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-08-31 23:35:14 +02:00
Stefan Dej 753efc5104 bugfix: format error onload temperature sensor
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-08-31 23:34:37 +02:00
Stefan Dej 543af7032e insert version number
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-08-31 23:18:23 +02:00
Stefan Dej 0e21d865b7 bugfix: update heightmap to new klipper/moonraker version
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-08-31 22:06:43 +02:00
Stefan Dej 601dd07f85 bugfix: typo mooonraker to moonraker
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-08-31 19:21:25 +02:00
Stefan Dej f06ce3e430 bugfix: load metadata after fileupload
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-08-31 17:54:12 +02:00
Stefan Dej 1f5f1749fc bugfix: deactivate debug output
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-08-31 16:26:08 +02:00
Stefan Dej a40701d611 bugfix: macros interface settings -> list all macros
bugfix: margin between dashboard panels

Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-08-30 23:36:38 +02:00
Stefan Dej c0472dfb30 Update all klipper/moonraker communication to Moonraker 'August 16 2020' Version. The Klippy state is more definied and should work better now. This work is not finished!
feature: display print complete with time and filament used + reprint button

bugfix: Fix issue #48. Tempchart need to many load
bugfix: Fix issue #46. Print time > 1 day (was a moonraker bug) + format time to "1d 1h" and not "25h"
bugfix: Fix issue #39. Mainsail title will show filename
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-08-30 14:58:26 +02:00
Birkemosen 3607a2f6f9 Remove autoformat from js files. 2020-08-17 12:45:24 +02:00
Birkemosen 03610868d1 Revert autoformatting 2020-08-17 12:26:58 +02:00
Stefan Dej f6873bda85 bugfix: toolSlider extend only by machine limits
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-08-16 21:51:02 +02:00
Stefan Dej bec378d2a0 Update installation.md
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-08-15 03:38:04 +02:00
Stefan Dej f2a5d1d8ee Update update-0.1.x.md
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-08-15 01:56:17 +02:00
Stefan Dej 1daf1b07aa Update installation.md -> STRG to CTRL. Thx DocGalaxyBlock
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-08-15 01:35:12 +02:00
Stefan Dej 9bdcec01ca Update Mainsail to the Moonraker 0.1
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-08-15 01:23:09 +02:00
Stefan Dej 717408592d Merge remote-tracking branch 'origin/master' 2020-08-14 22:50:02 +02:00
Stefan Dej 00319167a4 update guides to outdated
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-08-14 22:49:44 +02:00
meteyou beb52f2290 Merge pull request #24 from meteyou/dependabot/npm_and_yarn/websocket-extensions-0.1.4
Bump websocket-extensions from 0.1.3 to 0.1.4
2020-08-14 10:38:30 +02:00
meteyou 8d45767e14 Merge pull request #29 from meteyou/dependabot/npm_and_yarn/lodash-4.17.19
build(deps): bump lodash from 4.17.15 to 4.17.19
2020-08-14 10:38:17 +02:00
Stefan Dej ffa2ea9b08 bugfix: min_extrude_temp at ExtruderPanel.vue (fix #35)
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-08-14 10:24:38 +02:00
Stefan Dej 41f855d9c4 upload update-0.1.x.md preview
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-08-14 10:04:49 +02:00
Stefan Dej f4a514cb67 bugfix: machine limits auto extend
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-08-12 22:33:20 +02:00
Stefan Dej 29d5b81b47 feature: add config editor
bugfix: new file named "e" after upload in root directory

Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-08-08 18:26:27 +02:00
Stefan Dej c322edba72 bugfix: fix filament runout sensor -> on/off
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-08-05 00:06:49 +02:00
Stefan Dej 43d832cd33 bugfix: fix load metadata load after upload (delay to short for the moonraker)
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-08-04 21:53:17 +02:00
Stefan Dej 981b2e854c update docs
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-08-04 00:28:59 +02:00
Stefan Dej 707330e501 bugfix: add timestamp to gui.json for caching problems
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-08-04 00:17:58 +02:00
Stefan Dej 7a75f6f6cc bugfix: remove "move=1" before all axis are homed
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-08-04 00:05:39 +02:00
Stefan Dej 331c0a1e99 add mjpgstreamer to nginx in installation.md
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-08-02 22:36:12 +02:00
Stefan Dej 0c70bd5f23 update installation.md
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-08-01 21:20:55 +02:00
Stefan Dej bce591e16e update installation.md
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-08-01 21:20:16 +02:00
Stefan Dej d0d36470ba update loadingQGL to generic function
report klippy state in browser console log

Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-08-01 16:41:33 +02:00
Stefan Dej 479f2245e3 bugfix: disable heater with value 0
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-08-01 16:38:58 +02:00
Stefan Dej 706803ea5b update update-0.1.x.md
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-08-01 16:27:46 +02:00
Stefan Dej 1efe346cb0 add update-0.1.x.md
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-08-01 14:02:53 +02:00
Stefan Dej 20bad7d24c update installation.md and update-0.0.x.md to v0.1.1
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-08-01 12:17:08 +02:00
Stefan Dej 8494a35adf bugfix: update notify_filelist_changed
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-08-01 01:07:37 +02:00
Stefan Dej 6766a266e8 feature: rename "Host restart" to "Host reboot"
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-07-31 17:05:42 +02:00
meteyou 75d6cce540 feature: add Z_TILT in ControlPanel.vue
feature: replace "_" in macro names in ControlPanel.vue

Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-07-31 15:26:16 +02:00
Stefan Dej e0e3150466 bugfix: babystepping on dashboard 2020-07-28 23:28:38 +02:00
Stefan Dej fcaebc4413 add gcode-thumbnails.md 2020-07-28 23:28:11 +02:00
Stefan Dej 37f1ffb04b feature: fine babystepping (0.01 steps) 2020-07-27 23:39:38 +02:00
Stefan Dej 1b501bb810 bugfix: sensor colors in temp chart 2020-07-27 23:01:02 +02:00
dependabot[bot] e9fc463e4a build(deps): bump lodash from 4.17.15 to 4.17.19
Bumps [lodash](https://github.com/lodash/lodash) from 4.17.15 to 4.17.19.
- [Release notes](https://github.com/lodash/lodash/releases)
- [Commits](https://github.com/lodash/lodash/compare/4.17.15...4.17.19)

Signed-off-by: dependabot[bot] <support@github.com>
2020-07-19 19:27:38 +00:00
dependabot[bot] 4937f02673 Bump websocket-extensions from 0.1.3 to 0.1.4
Bumps [websocket-extensions](https://github.com/faye/websocket-extensions-node) from 0.1.3 to 0.1.4.
- [Release notes](https://github.com/faye/websocket-extensions-node/releases)
- [Changelog](https://github.com/faye/websocket-extensions-node/blob/master/CHANGELOG.md)
- [Commits](https://github.com/faye/websocket-extensions-node/compare/0.1.3...0.1.4)

Signed-off-by: dependabot[bot] <support@github.com>
2020-06-07 22:59:23 +00:00
135 changed files with 26898 additions and 5857 deletions

No files matched your search

+8
View File
@@ -0,0 +1,8 @@
# hostname or ip from the moonraker instance
VUE_APP_HOSTNAME=printer.local
# port from the moonraker instance
VUE_APP_PORT=7125
# reconnect interval in ms
VUE_APP_RECONNECT_INTERVAL=5000
+22
View File
@@ -0,0 +1,22 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: bug
assignees: ''
---
**Describe the bug:**\
A clear and concise description of what the bug is.
**Expected behavior:**\
A clear and concise description of what you expected to happen.
**Screenshots:**\
If applicable, add screenshots to help explain your problem.
**Logfiles:**\
Please upload your Logfiles here or upload them to [pastebin.com](http://pastebin.com) and paste your log links here.
- klippy.log
- moonraker.log
+20
View File
@@ -0,0 +1,20 @@
---
name: Feature request
about: Suggest an idea for this project
title: "[FR]"
labels: ''
assignees: ''
---
**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
**Describe the solution you'd like**
A clear and concise description of what you want to happen.
**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.
**Additional context**
Add any other context or screenshots about the feature request here.
+13
View File
@@ -0,0 +1,13 @@
node_modules
.DS_Store
design
*.log
packages/test
dist
temp
.vuerc
.version
.versions
.changelog
package-lock.json
*.local
+674
View File
@@ -0,0 +1,674 @@
GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The GNU General Public License is a free, copyleft license for
software and other kinds of works.
The licenses for most software and other practical works are designed
to take away your freedom to share and change the works. By contrast,
the GNU General Public License is intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains free
software for all its users. We, the Free Software Foundation, use the
GNU General Public License for most of our software; it applies also to
any other work released this way by its authors. You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
them if you wish), that you receive source code or can get it if you
want it, that you can change the software or use pieces of it in new
free programs, and that you know you can do these things.
To protect your rights, we need to prevent others from denying you
these rights or asking you to surrender the rights. Therefore, you have
certain responsibilities if you distribute copies of the software, or if
you modify it: responsibilities to respect the freedom of others.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must pass on to the recipients the same
freedoms that you received. You must make sure that they, too, receive
or can get the source code. And you must show them these terms so they
know their rights.
Developers that use the GNU GPL protect your rights with two steps:
(1) assert copyright on the software, and (2) offer you this License
giving you legal permission to copy, distribute and/or modify it.
For the developers' and authors' protection, the GPL clearly explains
that there is no warranty for this free software. For both users' and
authors' sake, the GPL requires that modified versions be marked as
changed, so that their problems will not be attributed erroneously to
authors of previous versions.
Some devices are designed to deny users access to install or run
modified versions of the software inside them, although the manufacturer
can do so. This is fundamentally incompatible with the aim of
protecting users' freedom to change the software. The systematic
pattern of such abuse occurs in the area of products for individuals to
use, which is precisely where it is most unacceptable. Therefore, we
have designed this version of the GPL to prohibit the practice for those
products. If such problems arise substantially in other domains, we
stand ready to extend this provision to those domains in future versions
of the GPL, as needed to protect the freedom of users.
Finally, every program is threatened constantly by software patents.
States should not allow patents to restrict development and use of
software on general-purpose computers, but in those that do, we wish to
avoid the special danger that patents applied to a free program could
make it effectively proprietary. To prevent this, the GPL assures that
patents cannot be used to render the program non-free.
The precise terms and conditions for copying, distribution and
modification follow.
TERMS AND CONDITIONS
0. Definitions.
"This License" refers to version 3 of the GNU General Public License.
"Copyright" also means copyright-like laws that apply to other kinds of
works, such as semiconductor masks.
"The Program" refers to any copyrightable work licensed under this
License. Each licensee is addressed as "you". "Licensees" and
"recipients" may be individuals or organizations.
To "modify" a work means to copy from or adapt all or part of the work
in a fashion requiring copyright permission, other than the making of an
exact copy. The resulting work is called a "modified version" of the
earlier work or a work "based on" the earlier work.
A "covered work" means either the unmodified Program or a work based
on the Program.
To "propagate" a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it on a
computer or modifying a private copy. Propagation includes copying,
distribution (with or without modification), making available to the
public, and in some countries other activities as well.
To "convey" a work means any kind of propagation that enables other
parties to make or receive copies. Mere interaction with a user through
a computer network, with no transfer of a copy, is not conveying.
An interactive user interface displays "Appropriate Legal Notices"
to the extent that it includes a convenient and prominently visible
feature that (1) displays an appropriate copyright notice, and (2)
tells the user that there is no warranty for the work (except to the
extent that warranties are provided), that licensees may convey the
work under this License, and how to view a copy of this License. If
the interface presents a list of user commands or options, such as a
menu, a prominent item in the list meets this criterion.
1. Source Code.
The "source code" for a work means the preferred form of the work
for making modifications to it. "Object code" means any non-source
form of a work.
A "Standard Interface" means an interface that either is an official
standard defined by a recognized standards body, or, in the case of
interfaces specified for a particular programming language, one that
is widely used among developers working in that language.
The "System Libraries" of an executable work include anything, other
than the work as a whole, that (a) is included in the normal form of
packaging a Major Component, but which is not part of that Major
Component, and (b) serves only to enable use of the work with that
Major Component, or to implement a Standard Interface for which an
implementation is available to the public in source code form. A
"Major Component", in this context, means a major essential component
(kernel, window system, and so on) of the specific operating system
(if any) on which the executable work runs, or a compiler used to
produce the work, or an object code interpreter used to run it.
The "Corresponding Source" for a work in object code form means all
the source code needed to generate, install, and (for an executable
work) run the object code and to modify the work, including scripts to
control those activities. However, it does not include the work's
System Libraries, or general-purpose tools or generally available free
programs which are used unmodified in performing those activities but
which are not part of the work. For example, Corresponding Source
includes interface definition files associated with source files for
the work, and the source code for shared libraries and dynamically
linked subprograms that the work is specifically designed to require,
such as by intimate data communication or control flow between those
subprograms and other parts of the work.
The Corresponding Source need not include anything that users
can regenerate automatically from other parts of the Corresponding
Source.
The Corresponding Source for a work in source code form is that
same work.
2. Basic Permissions.
All rights granted under this License are granted for the term of
copyright on the Program, and are irrevocable provided the stated
conditions are met. This License explicitly affirms your unlimited
permission to run the unmodified Program. The output from running a
covered work is covered by this License only if the output, given its
content, constitutes a covered work. This License acknowledges your
rights of fair use or other equivalent, as provided by copyright law.
You may make, run and propagate covered works that you do not
convey, without conditions so long as your license otherwise remains
in force. You may convey covered works to others for the sole purpose
of having them make modifications exclusively for you, or provide you
with facilities for running those works, provided that you comply with
the terms of this License in conveying all material for which you do
not control copyright. Those thus making or running the covered works
for you must do so exclusively on your behalf, under your direction
and control, on terms that prohibit them from making any copies of
your copyrighted material outside their relationship with you.
Conveying under any other circumstances is permitted solely under
the conditions stated below. Sublicensing is not allowed; section 10
makes it unnecessary.
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
No covered work shall be deemed part of an effective technological
measure under any applicable law fulfilling obligations under article
11 of the WIPO copyright treaty adopted on 20 December 1996, or
similar laws prohibiting or restricting circumvention of such
measures.
When you convey a covered work, you waive any legal power to forbid
circumvention of technological measures to the extent such circumvention
is effected by exercising rights under this License with respect to
the covered work, and you disclaim any intention to limit operation or
modification of the work as a means of enforcing, against the work's
users, your or third parties' legal rights to forbid circumvention of
technological measures.
4. Conveying Verbatim Copies.
You may convey verbatim copies of the Program's source code as you
receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice;
keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the code;
keep intact all notices of the absence of any warranty; and give all
recipients a copy of this License along with the Program.
You may charge any price or no price for each copy that you convey,
and you may offer support or warranty protection for a fee.
5. Conveying Modified Source Versions.
You may convey a work based on the Program, or the modifications to
produce it from the Program, in the form of source code under the
terms of section 4, provided that you also meet all of these conditions:
a) The work must carry prominent notices stating that you modified
it, and giving a relevant date.
b) The work must carry prominent notices stating that it is
released under this License and any conditions added under section
7. This requirement modifies the requirement in section 4 to
"keep intact all notices".
c) You must license the entire work, as a whole, under this
License to anyone who comes into possession of a copy. This
License will therefore apply, along with any applicable section 7
additional terms, to the whole of the work, and all its parts,
regardless of how they are packaged. This License gives no
permission to license the work in any other way, but it does not
invalidate such permission if you have separately received it.
d) If the work has interactive user interfaces, each must display
Appropriate Legal Notices; however, if the Program has interactive
interfaces that do not display Appropriate Legal Notices, your
work need not make them do so.
A compilation of a covered work with other separate and independent
works, which are not by their nature extensions of the covered work,
and which are not combined with it such as to form a larger program,
in or on a volume of a storage or distribution medium, is called an
"aggregate" if the compilation and its resulting copyright are not
used to limit the access or legal rights of the compilation's users
beyond what the individual works permit. Inclusion of a covered work
in an aggregate does not cause this License to apply to the other
parts of the aggregate.
6. Conveying Non-Source Forms.
You may convey a covered work in object code form under the terms
of sections 4 and 5, provided that you also convey the
machine-readable Corresponding Source under the terms of this License,
in one of these ways:
a) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by the
Corresponding Source fixed on a durable physical medium
customarily used for software interchange.
b) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by a
written offer, valid for at least three years and valid for as
long as you offer spare parts or customer support for that product
model, to give anyone who possesses the object code either (1) a
copy of the Corresponding Source for all the software in the
product that is covered by this License, on a durable physical
medium customarily used for software interchange, for a price no
more than your reasonable cost of physically performing this
conveying of source, or (2) access to copy the
Corresponding Source from a network server at no charge.
c) Convey individual copies of the object code with a copy of the
written offer to provide the Corresponding Source. This
alternative is allowed only occasionally and noncommercially, and
only if you received the object code with such an offer, in accord
with subsection 6b.
d) Convey the object code by offering access from a designated
place (gratis or for a charge), and offer equivalent access to the
Corresponding Source in the same way through the same place at no
further charge. You need not require recipients to copy the
Corresponding Source along with the object code. If the place to
copy the object code is a network server, the Corresponding Source
may be on a different server (operated by you or a third party)
that supports equivalent copying facilities, provided you maintain
clear directions next to the object code saying where to find the
Corresponding Source. Regardless of what server hosts the
Corresponding Source, you remain obligated to ensure that it is
available for as long as needed to satisfy these requirements.
e) Convey the object code using peer-to-peer transmission, provided
you inform other peers where the object code and Corresponding
Source of the work are being offered to the general public at no
charge under subsection 6d.
A separable portion of the object code, whose source code is excluded
from the Corresponding Source as a System Library, need not be
included in conveying the object code work.
A "User Product" is either (1) a "consumer product", which means any
tangible personal property which is normally used for personal, family,
or household purposes, or (2) anything designed or sold for incorporation
into a dwelling. In determining whether a product is a consumer product,
doubtful cases shall be resolved in favor of coverage. For a particular
product received by a particular user, "normally used" refers to a
typical or common use of that class of product, regardless of the status
of the particular user or of the way in which the particular user
actually uses, or expects or is expected to use, the product. A product
is a consumer product regardless of whether the product has substantial
commercial, industrial or non-consumer uses, unless such uses represent
the only significant mode of use of the product.
"Installation Information" for a User Product means any methods,
procedures, authorization keys, or other information required to install
and execute modified versions of a covered work in that User Product from
a modified version of its Corresponding Source. The information must
suffice to ensure that the continued functioning of the modified object
code is in no case prevented or interfered with solely because
modification has been made.
If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the
User Product is transferred to the recipient in perpetuity or for a
fixed term (regardless of how the transaction is characterized), the
Corresponding Source conveyed under this section must be accompanied
by the Installation Information. But this requirement does not apply
if neither you nor any third party retains the ability to install
modified object code on the User Product (for example, the work has
been installed in ROM).
The requirement to provide Installation Information does not include a
requirement to continue to provide support service, warranty, or updates
for a work that has been modified or installed by the recipient, or for
the User Product in which it has been modified or installed. Access to a
network may be denied when the modification itself materially and
adversely affects the operation of the network or violates the rules and
protocols for communication across the network.
Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.
7. Additional Terms.
"Additional permissions" are terms that supplement the terms of this
License by making exceptions from one or more of its conditions.
Additional permissions that are applicable to the entire Program shall
be treated as though they were included in this License, to the extent
that they are valid under applicable law. If additional permissions
apply only to part of the Program, that part may be used separately
under those permissions, but the entire Program remains governed by
this License without regard to the additional permissions.
When you convey a copy of a covered work, you may at your option
remove any additional permissions from that copy, or from any part of
it. (Additional permissions may be written to require their own
removal in certain cases when you modify the work.) You may place
additional permissions on material, added by you to a covered work,
for which you have or can give appropriate copyright permission.
Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders of
that material) supplement the terms of this License with terms:
a) Disclaiming warranty or limiting liability differently from the
terms of sections 15 and 16 of this License; or
b) Requiring preservation of specified reasonable legal notices or
author attributions in that material or in the Appropriate Legal
Notices displayed by works containing it; or
c) Prohibiting misrepresentation of the origin of that material, or
requiring that modified versions of such material be marked in
reasonable ways as different from the original version; or
d) Limiting the use for publicity purposes of names of licensors or
authors of the material; or
e) Declining to grant rights under trademark law for use of some
trade names, trademarks, or service marks; or
f) Requiring indemnification of licensors and authors of that
material by anyone who conveys the material (or modified versions of
it) with contractual assumptions of liability to the recipient, for
any liability that these contractual assumptions directly impose on
those licensors and authors.
All other non-permissive additional terms are considered "further
restrictions" within the meaning of section 10. If the Program as you
received it, or any part of it, contains a notice stating that it is
governed by this License along with a term that is a further
restriction, you may remove that term. If a license document contains
a further restriction but permits relicensing or conveying under this
License, you may add to a covered work material governed by the terms
of that license document, provided that the further restriction does
not survive such relicensing or conveying.
If you add terms to a covered work in accord with this section, you
must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.
Additional terms, permissive or non-permissive, may be stated in the
form of a separately written license, or stated as exceptions;
the above requirements apply either way.
8. Termination.
You may not propagate or modify a covered work except as expressly
provided under this License. Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third
paragraph of section 11).
However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
provisionally, unless and until the copyright holder explicitly and
finally terminates your license, and (b) permanently, if the copyright
holder fails to notify you of the violation by some reasonable means
prior to 60 days after the cessation.
Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.
Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License. If your rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same
material under section 10.
9. Acceptance Not Required for Having Copies.
You are not required to accept this License in order to receive or
run a copy of the Program. Ancillary propagation of a covered work
occurring solely as a consequence of using peer-to-peer transmission
to receive a copy likewise does not require acceptance. However,
nothing other than this License grants you permission to propagate or
modify any covered work. These actions infringe copyright if you do
not accept this License. Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.
10. Automatic Licensing of Downstream Recipients.
Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
propagate that work, subject to this License. You are not responsible
for enforcing compliance by third parties with this License.
An "entity transaction" is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
organization, or merging organizations. If propagation of a covered
work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the party's predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the
Corresponding Source of the work from the predecessor in interest, if
the predecessor has it or can get it with reasonable efforts.
You may not impose any further restrictions on the exercise of the
rights granted or affirmed under this License. For example, you may
not impose a license fee, royalty, or other charge for exercise of
rights granted under this License, and you may not initiate litigation
(including a cross-claim or counterclaim in a lawsuit) alleging that
any patent claim is infringed by making, using, selling, offering for
sale, or importing the Program or any portion of it.
11. Patents.
A "contributor" is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based. The
work thus licensed is called the contributor's "contributor version".
A contributor's "essential patent claims" are all patent claims
owned or controlled by the contributor, whether already acquired or
hereafter acquired, that would be infringed by some manner, permitted
by this License, of making, using, or selling its contributor version,
but do not include claims that would be infringed only as a
consequence of further modification of the contributor version. For
purposes of this definition, "control" includes the right to grant
patent sublicenses in a manner consistent with the requirements of
this License.
Each contributor grants you a non-exclusive, worldwide, royalty-free
patent license under the contributor's essential patent claims, to
make, use, sell, offer for sale, import and otherwise run, modify and
propagate the contents of its contributor version.
In the following three paragraphs, a "patent license" is any express
agreement or commitment, however denominated, not to enforce a patent
(such as an express permission to practice a patent or covenant not to
sue for patent infringement). To "grant" such a patent license to a
party means to make such an agreement or commitment not to enforce a
patent against the party.
If you convey a covered work, knowingly relying on a patent license,
and the Corresponding Source of the work is not available for anyone
to copy, free of charge and under the terms of this License, through a
publicly available network server or other readily accessible means,
then you must either (1) cause the Corresponding Source to be so
available, or (2) arrange to deprive yourself of the benefit of the
patent license for this particular work, or (3) arrange, in a manner
consistent with the requirements of this License, to extend the patent
license to downstream recipients. "Knowingly relying" means you have
actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.
If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate, modify
or convey a specific copy of the covered work, then the patent license
you grant is automatically extended to all recipients of the covered
work and works based on it.
A patent license is "discriminatory" if it does not include within
the scope of its coverage, prohibits the exercise of, or is
conditioned on the non-exercise of one or more of the rights that are
specifically granted under this License. You may not convey a covered
work if you are a party to an arrangement with a third party that is
in the business of distributing software, under which you make payment
to the third party based on the extent of your activity of conveying
the work, and under which the third party grants, to any of the
parties who would receive the covered work from you, a discriminatory
patent license (a) in connection with copies of the covered work
conveyed by you (or copies made from those copies), or (b) primarily
for and in connection with specific products or compilations that
contain the covered work, unless you entered into that arrangement,
or that patent license was granted, prior to 28 March 2007.
Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.
12. No Surrender of Others' Freedom.
If conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot convey a
covered work so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you may
not convey it at all. For example, if you agree to terms that obligate you
to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this
License would be to refrain entirely from conveying the Program.
13. Use with the GNU Affero General Public License.
Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU Affero General Public License into a single
combined work, and to convey the resulting work. The terms of this
License will continue to apply to the part which is the covered work,
but the special requirements of the GNU Affero General Public License,
section 13, concerning interaction through a network will apply to the
combination as such.
14. Revised Versions of this License.
The Free Software Foundation may publish revised and/or new versions of
the GNU General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the
Program specifies that a certain numbered version of the GNU General
Public License "or any later version" applies to it, you have the
option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software
Foundation. If the Program does not specify a version number of the
GNU General Public License, you may choose any version ever published
by the Free Software Foundation.
If the Program specifies that a proxy can decide which future
versions of the GNU General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you
to choose that version for the Program.
Later license versions may give you additional or different
permissions. However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
later version.
15. Disclaimer of Warranty.
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. Limitation of Liability.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES.
17. Interpretation of Sections 15 and 16.
If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
Also add information on how to contact you by electronic and paper mail.
If the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode:
<program> Copyright (C) <year> <name of author>
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, your program's commands
might be different; for a GUI interface, you would use an "about box".
You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU GPL, see
<https://www.gnu.org/licenses/>.
The GNU General Public License does not permit incorporating your program
into proprietary programs. If your program is a subroutine library, you
may consider it more useful to permit linking proprietary applications with
the library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License. But first, please read
<https://www.gnu.org/licenses/why-not-lgpl.html>.
+11 -2
View File
@@ -2,6 +2,15 @@
Mainsail is a lightweight & responsive web interface for the [Klipper](https://github.com/KevinOConnor/klipper)
3D printer firmware. It communicates with the [Moonraker (Klipper-API)](https://github.com/arksine/moonraker) from [Arksine](https://github.com/arksine).
![screenshot-dashboard](docs/images/screenshot-dashboard.png)
![screenshot-dashboard](docs/assets/img/screenshot.png)
To begin using Mainsail start by [installing](docs/installation.md) it or read the [documentation](docs/README.md) for more informations.
To begin using Mainsail start by [installing](https://meteyou.github.io/mainsail/setup/) it or read the [pages](https://meteyou.github.io/mainsail/) for more informations.
## Credit, sources and inspiration
* [Kevin O'Connor](https://github.com/KevinOConnor) for the awesome 3D printer firmware [Klipper](https://github.com/KevinOConnor/klipper)
* [Eric Callahan (arksine)](https://github.com/Arksine) for [Moonraker (Klipper API)](https://github.com/Arksine/moonraker). Without Moonraker, Mainsail would not be possible.
* [lixxbox](https://github.com/lixxbox) for the Mainsail logo & Docs
* [Vue.js](https://vuejs.org/): The Progressive JavaScript Framework
* [Vuetify](https://vuetifyjs.com/): Material Design Component Framework for Vue.js
Massive thanks to the whole [Voron Design](http://vorondesign.com/) community. Without them such a project would not be possible.
+1 -6
View File
@@ -1,6 +1 @@
# Overview
- [Installation](installation.md)
- [Update from 0.0.x to 0.1.x](update-0.0.x.md)
- [Macros](macros.md)
- [Slicer upload](slicer-upload.md)
Welcome to the Mainsail documentation. The [index](http://meteyou.github.io/mainsail) of the docs is here.
+6
View File
@@ -0,0 +1,6 @@
title: "Mainsail"
logo: "/assets/img/logo-mainsail.png"
description: A web interface for Klipper
remote_theme: pmarsceill/just-the-docs
color_scheme: "mainsail"
search_enabled: true
@@ -0,0 +1,17 @@
$body-background-color: darken($grey-dk-300, 3%);
$sidebar-color: $grey-dk-300;
$border-color: $grey-dk-200;
$body-text-color: $grey-lt-300;
$body-heading-color: $grey-lt-000;
$nav-child-link-color: $grey-dk-000;
$search-result-preview-color: $grey-dk-000;
$link-color: $red-300;
$btn-primary-color: $blue-200;
$base-button-color: $grey-dk-250;
$code-background-color: $grey-dk-250;
$search-background-color: $grey-dk-250;
$table-background-color: $grey-dk-250;
$feedback-color: darken($sidebar-color, 3%);
+1
View File
@@ -0,0 +1 @@
$link-color: $red-300;
+10
View File
@@ -0,0 +1,10 @@
---
layout: default
title: About
nav_order: 100
has_children: false
permalink: /about
---
# About Mainsail
trollolol
+7
View File
@@ -0,0 +1,7 @@
---
layout: default
title: Additional Support
nav_order: 5
has_children: true
permalink: /additional
---
+44
View File
@@ -0,0 +1,44 @@
---
layout: default
title: Samba shares
parent: Additional Support
nav_order: 1
permalink: /additional/shares
---
## Samba shares
``sudo apt-get update``
``sudo apt-get install samba samba-common-bin``
> _passwort setzen - wird der schritt benötigt?_
``sudo smbpasswd -a pi​``
``sudo chmod -R 777 /home/pi/klipper_config``
``sudo chmod -R 777 /home/pi/sdcard``
``sudo nano /etc/samba/smb.conf``
```ini
[klipper_config]
comment = klipper config
path = /home/pi/klipper_config
writeable = Yes
only guest = Yes
create mask = 0777
directory mask = 0777
browseable = Yes
public = yes
[virtual_sdcard]
comment = virtual sdcard
path = /home/pi/sdcard
writeable = yes
only guest = yes
create mask = 0777
directory mask = 0777
browseable = yes
public = yes
```
``sudo service smbd restart``
+21
View File
@@ -0,0 +1,21 @@
---
layout: default
title: Slicer upload
parent: Additional Support
nav_order: 1
permalink: /additional/slicer-upload
---
## Upload from Slicer
### PrusaSlicer/SuperSlicer (prior to v2.3.0)
You can upload your GCode-files from your Slicer. Moonraker simulates the octoprint-upload function.
If not already been done, switch to advanced or expert mode and set the options under "Printer Settings / General" as shown in the screenshot below.
For "API Key" you can type anything.
![screenshot](../assets/img/additional/FileUpload-PrusaSlicer-2.2.0.png)
### PrusaSlicer/SuperSlicer (since v2.3.0)
A "Physical Printer" must be defined to configure the settings from above.
More detailed instructions will follow.
+28
View File
@@ -0,0 +1,28 @@
---
layout: default
title: Thumbnails
parent: Additional Support
nav_order: 1
permalink: /additional/thumbnails
---
## Thumbnails
Mainsail can display thumbnails in the file browser and as previews in the print status.
![preview](../assets/img/additional/large-preview.png)
### SuperSlicer (since v2.2.54.0)
In "Expert" mode SuperSlicer has some very convenient options in the "printer settings" tab to activate and customize the previews.
![SuperSlicer](../assets/img/additional/SuperSlicer-thumbnails.png)
### PrusaSlicer/SuperSlicer
To enable thumbnails, click on `Help > Show Configuration Folder` and navigate to your printer profiles inside the `printer` folder.
Open your printer profile in a text editor and find `thumbnails =` and add the resolutions `32x32,400x300`. Save the file and restart your Slicer.
![PrusaSlicer](../assets/img/additional/PrusaSlicer-thumbnails.png)
From now on the gcode files contain thumbnails displayed by mainsail.
+7
View File
@@ -0,0 +1,7 @@
---
layout: default
title: Webcam
parent: Additional Support
nav_order: 1
permalink: /additional/webcam
---
Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

+27
View File
@@ -0,0 +1,27 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generator: Adobe Illustrator 25.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 599.38 523.11" style="enable-background:new 0 0 599.38 523.11;" xml:space="preserve">
<style type="text/css">
.st0{fill:#E30613;stroke:#009640;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;}
.st1{fill:#D41216;}
.st2{fill:#D41216;stroke:#009640;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;}
.st3{fill:none;stroke:#009640;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;}
.st4{display:none;}
.st5{display:inline;fill:#E73D26;}
.st6{display:inline;fill:none;}
</style>
<g id="Ebene_2">
<g>
<path class="st0" d="M382.29,142.98"/>
<path class="st1" d="M382.29,142.98L132.98,522.82L0,522.68L344.3,0l0,0C352.18,49.06,365.2,97.68,382.29,142.98"/>
<path class="st2" d="M413.28,213.54L208.5,522.92l132.94,0.19l135.03-206.33l0,0C452.69,284.29,431.53,249.77,413.28,213.54 L413.28,213.54"/>
<path class="st3" d="M599.38,447.69"/>
<path class="st3" d="M518.6,369.16"/>
<path class="st1" d="M599.38,447.69l-49.25,75.42L417,522.82l101.6-153.67l0,0C543.48,397.35,570.49,423.61,599.38,447.69 L599.38,447.69z"/>
</g>
</g>
<g id="Ebene_1" class="st4">
<path class="st5" d="M-45.42,426.29c0.34,0.34,97.62,1.14,107.04,0.94c0.94-0.07,1.75-0.74,2.29-2.08 c0.47-1.14,1.08-2.02,1.41-2.02s0.61-0.34,0.61-0.67c0-0.81,2.76-4.91,3.56-5.24c0.27-0.13,0.47-0.61,0.47-1.08 c0-0.74,0.61-1.61,3.29-4.84c0.34-0.47,0.47-1.01,0.27-1.21c-0.27-0.2-0.07-0.4,0.34-0.4c0.47,0,0.81-0.47,0.81-1.01 c0-0.47,0.47-1.21,1.08-1.55c0.61-0.34,1.08-0.87,1.08-1.21c0.07-0.54,3.09-5.58,3.9-6.32c0.2-0.2,0.94-1.41,1.61-2.69 c0.74-1.28,1.48-2.49,1.68-2.69c0.61-0.54,3.43-4.64,3.43-4.98c0-0.2,1.95-3.23,4.37-6.72s4.37-6.66,4.37-7.06 c0-0.34,0.2-0.74,0.54-0.87c0.54-0.27,3.5-4.37,3.5-4.91c0-0.2,0.34-0.74,0.74-1.21c0.34-0.47,2.22-3.23,4.17-6.19 c1.88-2.96,3.56-5.51,3.83-5.71c0.2-0.2,0.74-1.14,1.28-2.15c0.54-1.01,1.48-2.49,2.22-3.16c0.67-0.74,1.21-1.55,1.21-1.68 c0-0.61,12.98-20.17,13.65-20.64c0.34-0.2,0.47-0.61,0.34-0.81c-0.07-0.27,0.27-1.01,0.87-1.68c0.61-0.67,1.61-2.22,2.35-3.36 c0.67-1.21,1.48-2.15,1.82-2.15c0.27,0,0.4-0.27,0.13-0.61c-0.2-0.34,0.07-1.01,0.54-1.55c1.48-1.48,5.18-7.13,5.18-7.87 c0-0.4,0.34-0.74,0.67-0.74c0.4,0,0.67-0.47,0.67-1.01c0-0.54,0.34-1.01,0.67-1.01c0.4,0,0.67-0.4,0.67-0.94 c0-0.54,0.27-1.08,0.54-1.21c0.27-0.13,1.28-1.41,2.15-2.89c0.87-1.48,1.88-3.03,2.15-3.36c1.01-1.21,9.28-13.92,9.28-14.19 c0-0.34,4.24-6.45,5.18-7.46c0.4-0.47,1.01-1.48,1.21-2.22c0.2-0.74,0.67-1.34,1.01-1.34c0.27,0,0.67-0.54,0.94-1.21 c0.4-1.14,1.82-3.56,2.49-4.17c0.2-0.2,2.15-3.16,4.37-6.66c2.15-3.43,4.5-6.86,5.11-7.53c0.67-0.74,1.08-1.28,0.87-1.28 c-0.2,0,0.74-1.48,2.02-3.36c1.28-1.82,2.35-3.63,2.35-4.03c0-0.34,0.2-0.67,0.54-0.67c0.27,0,1.21-1.34,2.15-3.03 c0.94-1.68,1.88-3.03,2.15-3.03c0.34,0,0.54-0.4,0.54-0.87c0-0.54,0.61-1.48,1.34-2.15c0.74-0.67,1.34-1.61,1.34-2.15 c0-0.47,0.34-0.87,0.67-0.87c0.4,0,0.67-0.34,0.67-0.67c0-0.74,3.16-5.85,4.5-7.26c0.4-0.4,1.01-1.41,1.21-2.15 s0.67-1.34,0.94-1.34c0.34,0,0.94-0.87,1.41-2.02c0.47-1.14,1.08-2.02,1.34-2.02c0.27,0,0.87-0.87,1.34-2.02 c0.47-1.14,1.08-2.02,1.34-2.02c0.27,0,0.87-0.94,1.34-2.02c0.47-1.14,1.14-2.02,1.48-2.02s0.4-0.34,0.2-0.67 c-0.2-0.4-0.2-0.67,0.13-0.67c0.27,0,1.41-1.55,2.55-3.36c1.08-1.88,2.22-3.36,2.55-3.36c0.27,0,0.4-0.27,0.2-0.61 c-0.2-0.27,0.2-1.08,0.94-1.75c0.74-0.67,1.34-1.55,1.34-1.95c0-0.4,0.74-1.61,1.68-2.62c0.94-1.01,1.55-1.82,1.41-1.82 c-0.34,0,8.87-14.19,10.35-15.93c0.34-0.47,0.67-1.14,0.67-1.55c0-0.34,0.34-0.67,0.67-0.67c0.4,0,0.67-0.47,0.67-1.01 s0.34-1.01,0.67-1.01c0.4,0,0.67-0.34,0.67-0.67c0-0.4,1.08-2.22,2.35-4.03s2.35-3.5,2.35-3.7s0.61-1.01,1.34-1.82 c0.74-0.81,1.34-1.88,1.34-2.35s0.34-0.87,0.74-0.87c0.34,0,0.54-0.27,0.34-0.54c-0.2-0.34,0.27-0.94,0.94-1.48 c0.67-0.54,1.14-1.14,1.01-1.34c-0.2-0.27,0.27-1.01,1.01-1.68c0.74-0.67,1.34-1.48,1.34-1.75c0-0.27,2.35-4.1,5.24-8.47 c2.96-4.37,8.27-12.51,11.9-18.02c3.63-5.58,6.93-10.29,7.33-10.56c0.4-0.27,0.47-0.54,0.13-0.54c-0.34,0-0.13-0.54,0.4-1.21 c1.01-1.21,1.08-1.75,0.2-3.83c-2.89-6.93-5.04-12.77-5.04-13.51c0-0.54-0.27-0.94-0.67-0.94c-0.34,0-0.61-0.2-0.54-0.54 c0.2-0.87-1.75-6.52-2.42-6.99c-0.4-0.27-0.47-0.67-0.2-0.94s0.2-0.81-0.13-1.21c-0.47-0.67-3.97-10.62-4.37-12.71 c-0.13-0.47-0.4-1.34-0.61-2.02c-0.27-0.61-0.67-1.68-0.94-2.35c-0.2-0.61-0.47-1.61-0.61-2.15c-0.27-1.34-1.61-5.98-2.42-8.14 c-0.34-0.94-0.67-2.35-0.74-3.16c-0.07-0.81-0.27-1.48-0.47-1.48c-0.27,0-0.47-0.4-0.54-0.87c0-0.4-0.2-1.41-0.4-2.15 c-0.2-0.74-1.01-3.9-1.68-7.06c-0.74-3.16-1.34-5.78-1.41-5.92c-0.13-0.07-0.2-0.34-0.27-0.67c-0.34-1.34-1.28-5.92-1.41-6.52 c-0.07-0.4-0.2-0.81-0.27-1.01c-0.2-0.4-0.54-2.22-0.94-5.38c-0.2-1.28-0.54-2.82-0.74-3.43c-0.27-0.61-0.4-1.34-0.34-1.68 c0.07-0.34,0-0.74-0.07-0.94c-0.27-0.67-0.67-3.09-0.94-5.38c-0.13-1.28-0.34-2.35-0.4-2.35c-0.13,0-0.61-3.36-0.74-5.92 c-0.07-1.01-0.4-2.02-0.74-2.22s-0.27-0.81,0.13-1.28c1.48-1.75-0.54-1.61-2.08,0.2l0,0c-0.87,1.01-2.22,2.96-2.96,4.37 c-0.74,1.48-1.95,3.29-2.69,4.1c-0.74,0.81-1.95,2.62-2.69,4.03c-0.74,1.34-1.82,3.03-2.42,3.63c-0.54,0.61-1.61,2.22-2.35,3.5 c-1.48,2.69-1.68,2.96-3.97,5.78c-0.94,1.21-1.68,2.35-1.68,2.55c0,0.47-6.66,10.56-7.33,11.16c-0.2,0.2-1.01,1.41-1.68,2.69 c-0.74,1.28-1.48,2.49-1.68,2.69c-0.47,0.4-8.27,12.03-8.81,13.11 M294.17,171.07c-0.74,1.14-1.82,2.76-2.35,3.56 c-0.54,0.81-1.68,2.55-2.49,3.83c-1.88,2.82-2.22,3.36-5.58,8.2c-1.48,2.15-2.69,4.03-2.69,4.24s-0.34,0.67-0.74,1.14 c-0.34,0.47-4.24,6.25-8.67,12.91c-4.37,6.66-8.27,12.44-8.67,12.91c-0.4,0.47-0.74,0.94-0.74,1.14c0,0.61-4.3,6.79-4.84,6.99 c-0.27,0.13-0.54,0.67-0.54,1.21s-0.34,0.94-0.74,0.94c-0.34,0-0.54,0.27-0.34,0.61c0.27,0.34,0.2,0.74-0.07,0.87 c-0.81,0.34-4.91,6.39-4.91,7.19c0,0.34-0.54,1.01-1.14,1.34c-0.67,0.4-0.94,0.74-0.67,0.74s-0.07,0.67-0.87,1.48 c-0.74,0.81-1.34,1.88-1.34,2.35s-0.2,0.87-0.47,0.87c-0.34,0-1.41,1.55-2.55,3.43c-1.08,1.88-2.29,3.77-2.69,4.24 c-1.34,1.61-3.7,5.04-3.7,5.45c0,0.27-0.4,0.87-0.81,1.34c-1.95,2.15-2.49,2.89-2.22,3.16c0.13,0.13-0.47,1.14-1.34,2.15 c-0.94,1.08-1.68,2.15-1.68,2.42s-0.61,1.14-1.34,2.02s-1.34,1.95-1.34,2.49s-0.27,0.81-0.61,0.61c-0.34-0.2-0.81,0.34-1.01,1.28 cLine truncated
<line class="st6" x1="108.71" y1="523.11" x2="108.7" y2="523.11"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 382 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 617 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 31 KiB

+15
View File
@@ -0,0 +1,15 @@
---
layout: default
title: Welcome
nav_order: 1
has_children: false
---
# Welcome to the Mainsail docs!
Mainsail is a lightweight & responsive web interface for the Klipper 3D printer firmware. It communicates with Moonraker (Klipper-API) from Arksine.
[Setup Guide](/setup-guide/index.md){: .btn}
## Screenshots
![Dashboard](assets/img/screenshot.png)
-45
View File
@@ -1,45 +0,0 @@
# Useful macros for Moonraker/Mainsail
These macros are important for pause/resume/cancel.
```
[pause_resume]
[gcode_macro CANCEL_PRINT]
rename_existing: BASE_CANCEL_PRINT
default_parameter_X: 230
default_parameter_Y: 230
default_parameter_Z: 10
gcode:
M104 S0
M140 S0
M141 S0
M106 S0
CLEAR_PAUSE
RESET_SD
BASE_CANCEL_PRINT
[gcode_macro PAUSE]
rename_existing: BASE_PAUSE
default_parameter_X: 230
default_parameter_Y: 230
default_parameter_Z: 10
gcode:
SAVE_GCODE_STATE NAME=PAUSE_state
BASE_PAUSE
G91
G1 E-1.7 F2100
G1 Z{Z}
G90
G1 X{X} Y{Y} F6000
G91
[gcode_macro RESUME]
rename_existing: BASE_RESUME
gcode:
G91
G1 E1.7 F2100
G91
RESTORE_GCODE_STATE NAME=PAUSE_state MOVE=1
BASE_RESUME
```
+89
View File
@@ -0,0 +1,89 @@
---
layout: default
title: Necessary Configuration
nav_order: 4
has_children: false
permalink: /necessary-configuration
---
Mainsail requires a minimum configuration to function properly. It should give you a warning at startup if the required parts are not found in your configuration.
## Required configuration
### virtual_sdcard
This allows gcode file uploads.
```yaml
[virtual_sdcard]
path: ~/sdcard
```
### display_status
This is required for messages in your status panel, if you don't have a `[display]` in your configuration.
```yaml
[display_status]
```
### pause / resume / cancel
This enables pause / resume in mainsail.
```yaml
[pause_resume]
```
## Macros
### for pause /resume / cancel functionality
These should be modified to your own needs.
```yaml
[gcode_macro PAUSE]
rename_existing: BASE_PAUSE
default_parameter_X: 230 #edit to your park position
default_parameter_Y: 230 #edit to your park position
default_parameter_Z: 10 #edit to your park position
default_parameter_E: 1 #edit to your retract length
gcode:
SAVE_GCODE_STATE NAME=PAUSE_state
BASE_PAUSE
G91
G1 E-{E} F2100
G1 Z{Z}
G90
G1 X{X} Y{Y} F6000
```
```yaml
[gcode_macro RESUME]
rename_existing: BASE_RESUME
default_parameter_E: 1 #edit to your retract length
gcode:
G91
G1 E{E} F2100
G90
RESTORE_GCODE_STATE NAME=PAUSE_state MOVE=1
BASE_RESUME
```
```yaml
[gcode_macro CANCEL_PRINT]
rename_existing: BASE_CANCEL_PRINT
gcode:
TURN_OFF_HEATERS
CLEAR_PAUSE
SDCARD_RESET_FILE
BASE_CANCEL_PRINT
```
## Optional
### customize klipper default commands
for example, if you want to adjust the `BED_MESH_CALIBRATE` command, which you can run from "heightmap > calibrate".
```yaml
[gcode_macro BED_MESH_CALIBRATE]
rename_existing: BASE_BED_MESH_CALIBRATE
gcode:
#before the original gcode
BED_MESH_CLEAR
QUAD_GANTRY_LEVEL
G1 X125 Y125 Z5 F6000
#the original gcode
BASE_BED_MESH_CALIBRATE
#after the original gcode
```
+8
View File
@@ -0,0 +1,8 @@
---
layout: default
title: Setup Guide
nav_order: 2
has_children: true
permalink: /setup/
---
This is a guide to setting up Klipper, Moonraker & Mainsail on a Raspberry Pi with Raspberry Pi OS. Other SBCs and/or Linux distributions might work, but may require a customized installation script or configs.
+63
View File
@@ -0,0 +1,63 @@
---
layout: default
title: Klipper
parent: Setup Guide
nav_order: 3
permalink: /setup/klipper
---
## Klipper
### Installation
The following commands will clone Klipper to an appropriate directory in HOME and run the setup script.
```bash
cd ~
git clone https://github.com/KevinOConnor/klipper
cd ~/klipper
./scripts/install-octopi.sh
```
### Configuration
After Klipper is installed, you will need to change the default location of the printer.cfg and add the UDS (unix domain socket). This is defined in the file `/etc/default/klipper`
To edit this file type:
```bash
sudo nano /etc/default/klipper
```
find the following line:
```
KLIPPY_ARGS="/home/pi/klipper/klippy/klippy.py /home/pi/printer.cfg -l /tmp/klippy.log"
```
and change the config location to `/home/pi/klipper_config/printer.cfg` and add `-a /tmp/klippy_uds` to define UDS.
```
KLIPPY_ARGS="/home/pi/klipper/klippy/klippy.py /home/pi/klipper_config/printer.cfg -l /tmp/klippy.log -a /tmp/klippy_uds"
```
Save the file with `CTRL+O` and close the editor with `CTRL+X`.
You have to create the directories for your klipper configuration and the virtual_sdcard directory:
```bash
mkdir ~/klipper_config
mkdir ~/sdcard
```
Move your printer.cfg to ~/klipper_config and check if the following entries are present in the config.
```ini
[virtual_sdcard]
# for gcode upload
path: ~/sdcard
[display_status]
# for display messages in status panel
[pause_resume]
# for pause/resume functionality.
# Mainsail needs gcode macros for `PAUSE`, `RESUME` and `CANCEL_PRINT` to make the buttons work.
```
> ℹ️ **These entries are very important.**
For the full functionality of mainsail, you should also define gcode macros for `PAUSE`, `RESUME` and `CANCEL_PRINT`. You'll find further information in [this](../necessary-cfg.md){: target="_blank"} document.
After your config is in place, restart klipper with `sudo service klipper restart`. Check the `/tmp/klippy.log` for errors, if Klipper starts correctly you can continue the guide.
---
[< previous step](operating-system.md){: .btn } [next step >](moonraker.md){: .btn}
@@ -1,114 +1,34 @@
# Installation
This document provides a guide on how to install Moonraker & Mainsail on a Raspberry
Pi running Raspian/Rasperry Pi OS. Other SBCs and/or linux distributions
may work, however they may need a custom install script.
---
layout: default
title: Mainsail
parent: Setup Guide
nav_order: 5
permalink: /setup/mainsail
---
**Please don't use a octopi image!!!**
Klipper should be installed prior to installing Moonraker. Please see
[Klipper's Documention](https://github.com/KevinOConnor/klipper/blob/master/docs/Installation.md)
for instructions on how to do this.
## Install Moonraker (API)
Moonraker is still in alpha development, and thus some of its dependencies
in Klipper have yet to be merged. Until this has been done it will be
necessary to add a remote and work off a developmental branch of Klipper
to correctly run Moonraker.
### Change Klipper branch
```
cd ~/klipper
git remote add arksine https://github.com/Arksine/klipper.git
```
Now fetch and checkout:
```
git fetch arksine
git checkout arksine/dev-moonraker-testing
```
Note that you are now in a detached head state and you cannot pull. Any
time you want to update to the latest version of this branch you must
repeat the two commands above.
**Note that the above command is NOT part of the Moonraker install procedure.**
### Install Moonraker application
You can now install the Moonraker application:
```
cd ~
git clone https://github.com/Arksine/moonraker.git
```
Finally, run Moonraker's install script:
```
cd ~/moonraker/scripts
./install-moonraker.sh
```
When the script completes it should start both Moonraker and Klipper. In
`klippy.log` you should find the following entry:\
`Moonraker: server connection detected`
### Configure Moonraker
All other configuration is sent to the server via Klippy, thus it is done
in printer.cfg. A basic configuration that authorizes clients on a range
from 192.168.1.1 - 192.168.1.254 is as follows.
Edit your printer.cfg with nano ~/printer.cfg and add the following lines:
```
[moonraker]
trusted_clients:
192.168.1.0/24
```
We also need a `virtual_sdcard` for store the gcode files:
```
[virtual_sdcard]
path: /home/pi/sdcard
```
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-643-g528f9f25", "is_ready": true, "message": "Printer is ready", "cpu": "4 core ARMv7 Processor rev 4 (v7l)"}}
```
your API is working!
For more informations about the Moonraker installation or configuration
look at the Repository from Arksine:
[Moonraker Repository install Documentation](https://github.com/Arksine/moonraker/blob/master/docs/installation.md)
## Install Mainsail (webinterface)
## Mainsail
### Install webserver & reverse proxy (nginx)
nginx is important to mount all components on port 80 and host the static files from Mainsail.
To install nginx you only need to execute:
nginx is important to mount all components on port 80 and host the static files from Mainsail. To install nginx you only need to execute:
`sudo apt install nginx`
now we create the config files with:
```
sudo apt install nginx
sudo touch /etc/nginx/sites-available/mainsail
sudo touch /etc/nginx/conf.d/upstreams.conf
sudo touch /etc/nginx/conf.d/common_vars.conf
```
now we create the config file with:
Each file can be filled with the following content:
`sudo nano /etc/nginx/conf.d/upstreams.conf`
```
sudo nano /etc/nginx/sites-available/mainsail
```
and fill it with the following content:
```
map $http_upgrade $connection_upgrade {
default upgrade;
'' close;
}
# /etc/nginx/conf.d/upstreams.conf
upstream apiserver {
#edit your api port here
@@ -116,6 +36,32 @@ upstream apiserver {
server 127.0.0.1:7125;
}
upstream mjpgstreamer {
#edit your webcam port here
ip_hash;
server 127.0.0.1:8081;
}
```
Save the file with `CTRL+O` and close the editor with `CTRL+X`.
`sudo nano /etc/nginx/conf.d/common_vars.conf`
```
# /etc/nginx/conf.d/common_vars.conf
map $http_upgrade $connection_upgrade {
default upgrade;
'' close;
}
```
Save the file with `CTRL+O` and close the editor with `CTRL+X`.
`sudo nano /etc/nginx/sites-available/mainsail`
```
# /etc/nginx/sites-available/mainsail
server {
listen 80 default_server;
listen [::]:80 default_server;
@@ -123,6 +69,16 @@ server {
access_log /var/log/nginx/mainsail-access.log;
error_log /var/log/nginx/mainsail-error.log;
#disable this section on smaller hardware like a pi zero
gzip on;
gzip_vary on;
gzip_proxied any;
gzip_proxied expired no-cache no-store private auth;
gzip_comp_level 4;
gzip_buffers 16 8k;
gzip_http_version 1.1;
gzip_types text/plain text/css text/xml text/javascript application/x-javascript application/json application/xml;
#web_path from mainsail static files
root /home/pi/mainsail;
@@ -186,10 +142,16 @@ server {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Scheme $scheme;
}
location /webcam/ {
proxy_pass http://mjpgstreamer/;
}
}
```
Save the file with `CTRL+O` and close the editor with `CTRL+X`.
Create directory for static files and active nginx config:
```
mkdir ~/mainsail
sudo rm /etc/nginx/sites-enabled/default
@@ -197,8 +159,8 @@ 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:
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)"}}
```
@@ -206,22 +168,35 @@ Open the url `http://<printer-ip>/printer/info` in your browser. if you see a co
Now we can install Mainsail (static httpdocs).
### Install httpdocs
Now you can download the current mainsail static data
```
cd ~/mainsail
wget -q -O mainsail.zip https://github.com/meteyou/mainsail/releases/download/v0.1.0/mainsail-beta-0.1.0.zip && unzip mainsail.zip && rm mainsail.zip
wget -q -O mainsail.zip https://github.com/meteyou/mainsail/releases/download/latest/mainsail.zip && unzip mainsail.zip && rm mainsail.zip
```
Now it should be possible to open the interface: `http://<printer-ip>/`.
### Important macros
if you want to get the full experience with mainsail and klipper virtual_sdcard print, you should use these macros, or use them as templates for your own.
[Macro Link](../necessary-cfg.md){: .btn target="_blank"}
### Change the Hostname (optional)
to use the hostname instate of the ip, you can install the avahi-daemon:
```
sudo apt install avahi-daemon
```
`sudo apt install avahi-daemon`
and you can config your hostname:
```
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.
`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.
---
[< previous step](moonraker.md){: .btn }
+80
View File
@@ -0,0 +1,80 @@
---
layout: default
title: Moonraker
parent: Setup Guide
nav_order: 4
permalink: /setup/moonraker
---
## Moonraker
Moonraker is a web server that exposes APIs which lets Mainsail interact with Klipper.
### Installation
Clone Moonraker into your HOME directory:
```bash
cd ~
git clone https://github.com/Arksine/moonraker.git
```
Run Moonrakers install script:
```bash
cd ~/moonraker/scripts
./install-moonraker.sh
```
Once the script is finished, both Moonraker and Klipper should be started.
In `/tmp/klippy.log` the following entry should appear: `Moonraker: server connection detected`
### Configuration
> ⚠️ **Please pay attention to the following steps!**
Misconfigured trusted_clients are a very common source of failure.
For Moonraker you'll need to create a separate config file.
`nano ~/moonraker.conf`
Insert the following part and modify `trusted_clients` according to arksines description below.
Also consider further IP ranges, e.g. when connecting via VPN. To determine your local ip `ip a` and `ifconfig -a` are common ways to do so on Linux and `ipconfig` on Windows.
> ℹ️ **This is a very basic config**
For more options and detailed explanations you should follow [arksines instructions](https://github.com/Arksine/moonraker/blob/master/docs/installation.md).
```
[server]
host: 0.0.0.0
config_path: ~/klipper_config
[authorization]
enabled: true
trusted_clients:
192.168.1.0/24
```
> 🔥 **trusted_clients - read carefully** 🔥
A list of newline separated ip addresses and/or ip ranges that are
trusted. Trusted clients are given full access to the API. Both IPv4
and IPv6 addresses and ranges are supported. Ranges must be expressed
in CIDR notation (see http://ip.sb/cidr for more info).
For example, an entry of 192.168.1.0/24 will authorize IPs in the range of 192.168.1.1 -
192.168.1.254. Note that when specifying IPv4 ranges the last segment
of the ip address must be 0. The default is no clients or ranges are
trusted.
Save the file with `CTRL+O` and close the editor with `CTRL+X`.
Restart Moonraker
```bash
sudo service moonraker restart
```
Open the following url with your printers IP in your browser
```
http://<printer-ip>:7125/printer/info
```
If everything has been set up successfully, a message like this should appear:
```
{"result": {"hostname": "voron250", "error_detected": false, "version": "v0.8.0-643-g528f9f25", "is_ready": true, "message": "Printer is ready", "cpu": "4 core ARMv7 Processor rev 4 (v7l)"}}
```
---
[< previous step](klipper.md){: .btn } [next step >](mainsail.md){: .btn }
+30
View File
@@ -0,0 +1,30 @@
---
layout: default
title: Operating System
parent: Setup Guide
nav_order: 2
permalink: /setup/operating-systen
---
## Operation System
> ⚠️ **Please don't use an OctoPi image!**
It can cause unforeseeable events, like rips in the space-time continuum. So be aware!
It is recommended to use a clean Raspberry Pi OS 32-bit Lite image (previously called Raspbian). You can download it [here](https://downloads.raspberrypi.org/raspios_lite_armhf_latest){:target="_blank"}.
For more information about installing Raspberry Pi OS click [here](https://www.raspberrypi.org/documentation/installation/installing-images/){:target="_blank"}. Don't forget to enable ssh.
Once you have finished the installation and are connected via ssh, you can continue.
### Requirements
```bash
sudo apt update && sudo apt upgrade
sudo apt install git dfu-util unzip
```
> ⚠️ **Moonraker requires Python 3.7 or greater,** verify that your distribution's Python 3 packages meet this requirement.
```
python3 --version
```
---
[< table of contents](index.md){: .btn } [next step >](klipper.md){: .btn }
-7
View File
@@ -1,7 +0,0 @@
# Upload Gcodes from your Slicer
You can upload your gcode-files from your slicer. Moonraker simulate the octoprint-upload.
Just set the slicer to octoprint, enter the hostname or ip and fill in the API-Key field
with something.
![superslicer-upload](images/superslicer-upload.png)
-47
View File
@@ -1,47 +0,0 @@
# Update from 0.0.x to 0.1.x
Between 0.0.x and 0.1.x was a big rebuild of Moonraker. Thats the reason for the separate guide.
## Change Klipper branch
```
cd ~/klipper
git fetch arksine
git checkout arksine/dev-moonraker-testing
```
## Install new Moonraker branch
```
cd ~
git clone https://github.com/Arksine/moonraker.git
```
we have to remove the old moonraker service and install the new version:
```
cd ~/moonraker/scripts
./uninstall-moonraker.sh
./install-moonraker.sh
```
Finally, we have to change the `printer.cfg`. The section `\[api_server\]` is now called `\[moonraker\]`.
## Update the nginx configuration
The nginx configuration (`/etc/nginx/sites-available/mainsail`) will need the following additional section:
```
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;
}
```
Restart nginx with `sudo service nginx restart`
## Update static files from Mainsail
```
rm -R ~/mainsail/*
cd ~/mainsail
wget -q -O mainsail.zip https://github.com/meteyou/mainsail/releases/download/v0.1.0/mainsail-beta-0.1.0.zip && unzip mainsail.zip && rm mainsail.zip
```
+9
View File
@@ -0,0 +1,9 @@
---
layout: default
title: Update Guide
nav_order: 3
has_children: true
permalink: /update/
---
This is a guide to update up Klipper, Moonraker & Mainsail on your Raspberry Pi.
+24
View File
@@ -0,0 +1,24 @@
---
layout: default
title: Klipper
parent: Update Guide
nav_order: 2
permalink: /update/klipper
---
## Klipper
### Update from Repository
```bash
cd ~/klipper
git fetch
git checkout origin/master
```
Restart Klipper (`sudo service klipper restart`) and check the `klippy.log`, if Klipper starts
correctly and then continue the guide.
### Klipper config changes
If you have issues after update your Klipper instance, you can check config changes [here](https://github.com/KevinOConnor/klipper/blob/master/docs/Config_Changes.md).
---
[< table of contents](index.md){: .btn } [next step >](moonraker.md){: .btn}
+25
View File
@@ -0,0 +1,25 @@
---
layout: default
title: Mainsail
parent: Update Guide
nav_order: 4
permalink: /update/mainsail
---
## Mainsail
```bash
cd ~/mainsail
rm -R ./*
wget -q -O mainsail.zip https://github.com/meteyou/mainsail/releases/download/latest/mainsail.zip && unzip mainsail.zip && rm mainsail.zip
```
### Move gui.json from gcodes to klipper_config
This is only necessary if you update from 0.2.2 to 0.2.3 or higher. If you use MainsailOS, the virtual_sdcard directory is `gcode_files` instead of `sdcard`.
```
mv ~/sdcard/gui.json ~/klipper_config/
```
Now it should be possible to open the interface: `http://<printer-ip>/`.
---
[< previous step](moonraker.md){: .btn }
+33
View File
@@ -0,0 +1,33 @@
---
layout: default
title: Moonraker
parent: Update Guide
nav_order: 3
permalink: /update/moonraker
---
## Moonraker
```bash
cd ~/moonraker
git fetch
git checkout origin/master
```
Restart Moonraker (`sudo service moonraker restart`) and 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-643-g528f9f25", "is_ready": true, "message": "Printer is ready", "cpu": "4 core ARMv7 Processor rev 4 (v7l)"}}
```
### Update Moonraker dependence
This is only nessasary, if your Moonraker version is older than 31. october 2020.
```bash
~/moonraker/scripts/install-moonraker.sh -r
```
### Moonraker config changes
If you have issues after update your Moonraker instance, you can check config changes [here](https://github.com/Arksine/moonraker/blob/master/docs/user_changes.md).
---
[< previous step](klipper.md){: .btn } [next step >](mainsail.md){: .btn }
+21779 -3320
View File
File diff suppressed because it is too large. Load diff
+25 -21
View File
@@ -1,6 +1,6 @@
{
"name": "kwc",
"version": "0.1.0",
"name": "mainsail",
"version": "0.3.0",
"private": true,
"scripts": {
"serve": "vue-cli-service serve",
@@ -8,36 +8,40 @@
"lint": "vue-cli-service lint"
},
"dependencies": {
"axios": "^0.19.2",
"chart.js": "^2.9.3",
"core-js": "^3.6.5",
"axios": "^0.21.0",
"chart.js": "^2.9.4",
"core-js": "^3.7.0",
"object-assign-deep": "^0.4.0",
"vue": "^2.6.11",
"vue-chartjs": "^3.5.0",
"vue-context": "^5.2.0",
"prismjs": "^1.22.0",
"vue": "^2.6.12",
"vue-chartjs": "^3.5.1",
"vue-context": "^6.0.0",
"vue-headful": "^2.1.0",
"vue-plotly": "^1.1.0",
"vue-prism-editor": "^1.2.2",
"vue-resource": "^1.5.1",
"vue-simple-upload": "^0.1.6",
"vue-toast-notification": "^0.4.1",
"vuetify": "^2.3.4",
"vue-toast-notification": "^0.6.0",
"vuetify": "^2.3.18",
"vuex": "^3.5.1"
},
"devDependencies": {
"@mdi/font": "^5.3.45",
"@vue/cli-plugin-babel": "^4.4.6",
"@vue/cli-plugin-eslint": "^4.4.6",
"@vue/cli-service": "^4.4.6",
"@mdi/font": "^5.8.55",
"@vue/cli-plugin-babel": "^4.5.9",
"@vue/cli-plugin-eslint": "^4.5.3",
"@vue/cli-plugin-pwa": "^4.5.9",
"@vue/cli-service": "^4.5.9",
"babel-eslint": "^10.1.0",
"css-loader": "^3.6.0",
"eslint": "^7.5.0",
"eslint-plugin-vue": "^6.2.2",
"sass": "^1.26.10",
"sass-loader": "^9.0.2",
"css-loader": "^5.0.1",
"eslint": "^7.13.0",
"eslint-plugin-vue": "^7.1.0",
"sass": "^1.29.0",
"sass-loader": "^10.1.0",
"sw-precache-webpack-plugin": "^1.0.0",
"vue-cli-plugin-route": "0.0.7",
"vue-cli-plugin-vuetify": "^2.0.7",
"vue-router": "^3.3.4",
"vue-template-compiler": "^2.6.11",
"vue-router": "^3.4.9",
"vue-template-compiler": "^2.6.12",
"vuetify-loader": "^1.6.0"
},
"eslintConfig": {
+2 -5
View File
@@ -1,6 +1,3 @@
{
"socket": {
"hostname": "kossel.local",
"port": 80
}
}
}
Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 456 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 912 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 43 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.6 KiB

-1
View File
@@ -4,7 +4,6 @@
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<link rel="icon" href="<%= BASE_URL %>favicon.ico" id="favicon" />
<title>Mainsail</title>
</head>
<body>
+107 -48
View File
@@ -1,19 +1,26 @@
<style>
@import './assets/styles/fonts.css';
@import './assets/styles/toastr.css';
.button-min-width-auto {
min-width: auto !important;
}
#page-container {
max-width: 1400px;
}
</style>
<template>
<v-app>
<vue-headful
:title="getTitle"
/>
<vue-headful :title="getTitle" />
<v-navigation-drawer
class="sidebar-wrapper" persistent v-model="drawer" enable-resize-watcher fixed app
:src="require('./assets/bg-navi.jpg')"
:src="require('./assets/bg-navi.png')"
>
<div id="nav-header">
<img :src="require('./assets/logo.svg')" />
<v-toolbar-title>{{ printername != "" ? printername : hostname }}</v-toolbar-title>
<v-toolbar-title>{{ printername !== "" ? printername : hostname }}</v-toolbar-title>
</div>
<ul class="navi" :expand="$vuetify.breakpoint.mdAndUp">
<li v-for="(category, index) in routes" :key="index" :prepend-icon="category.icon"
@@ -28,7 +35,7 @@
(
category.title !== 'Webcam' &&
category.title !== 'Heightmap' &&
(is_ready || category.alwaysShow)
(klippy_state !== 'error' || category.alwaysShow)
)
">
<v-icon>mdi-{{ category.icon }}</v-icon>
@@ -38,7 +45,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 v-if="is_ready || page.alwaysShow">
<router-link :to="page.path" class="nav-link" @click.prevent v-if="klippy_state !== 'error' || page.alwaysShow">
<v-icon>mdi-{{ page.icon }}</v-icon>
<span class="nav-title">{{ page.title }}</span>
</router-link>
@@ -48,17 +55,39 @@
</ul>
</v-navigation-drawer>
<v-app-bar app absolute
elevate-on-scroll>
<v-app-bar app elevate-on-scroll>
<v-app-bar-nav-icon @click.stop="drawer = !drawer"></v-app-bar-nav-icon>
<v-spacer></v-spacer>
<!--<v-btn color="green" v-if="!isConnected" :loading="loadingEmergencyStop" @click="emergencyStop"><v-icon class="mr-2">mdi-refresh-circle</v-icon> reconnect</v-btn>-->
<v-btn color="error" v-if="isConnected" :loading="loadingEmergencyStop" @click="emergencyStop">Emergency Stop</v-btn>
<v-btn color="primary" class="mr-5 d-none d-sm-flex" v-if="isConnected && save_config_pending" :loading="loadings.includes['topbarSaveConfig']" @click="clickSaveConfig">SAVE CONFIG</v-btn>
<v-btn color="error" class="button-min-width-auto px-3" v-if="isConnected" :loading="loadings.includes['topbarEmergencyStop']" @click="clickEmergencyStop"><v-icon class="mr-sm-2">mdi-alert-circle-outline</v-icon><span class="d-none d-sm-flex">Emergency Stop</span></v-btn>
<v-menu bottom left :offset-y="true">
<template v-slot:activator="{ on, attrs }">
<v-btn dark icon v-bind="attrs" v-on="on">
<v-icon>mdi-dots-vertical</v-icon>
</v-btn>
</template>
<v-list dense>
<v-list-item link @click="doRestart()">
<v-list-item-title><v-icon class="mr-3">mdi-sync</v-icon>Restart</v-list-item-title>
</v-list-item>
<v-list-item link @click="doFirmwareRestart()">
<v-list-item-title><v-icon class="mr-3">mdi-sync</v-icon>FW Restart</v-list-item-title>
</v-list-item>
<v-divider></v-divider>
<v-list-item link @click="doHostReboot()">
<v-list-item-title><v-icon class="mr-3">mdi-power</v-icon>Reboot Host</v-list-item-title>
</v-list-item>
<v-list-item link @click="doHostShutdown()">
<v-list-item-title><v-icon class="mr-3">mdi-power</v-icon>Shutdown Host</v-list-item-title>
</v-list-item>
</v-list>
</v-menu>
</v-app-bar>
<v-main id="content">
<v-scroll-y-transition>
<v-container fluid id="page-container" class="container">
<v-container fluid id="page-container" class="container px-sm-6 px-3 mx-auto">
<keep-alive>
<router-view></router-view>
</keep-alive>
@@ -66,7 +95,7 @@
</v-scroll-y-transition>
</v-main>
<v-dialog v-model="isConnecting" persistent width="300">
<v-dialog v-model="overlayDisconnect" persistent width="300">
<v-card color="primary" dark >
<v-card-text class="pt-2">
Connecting...
@@ -76,8 +105,8 @@
</v-dialog>
<v-footer app class="d-block">
<span v-if="version">{{ version }}</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>
<span>v{{ getVersion }}</span>
<span class="float-right d-none d-sm-inline" v-if="version">{{ version }}</span>
</v-footer>
</v-app>
</template>
@@ -94,15 +123,14 @@ export default {
},
data: () => ({
overlayDisconnect: true,
drawer: null,
activeClass: 'active',
routes: routes,
//is_ready: false,
boolNaviHeightmap: false,
}),
created () {
this.$vuetify.theme.dark = true;
//this.is_ready = (this.klippy_state === "ready") ? true : false;
this.boolNaviHeightmap = (typeof(this.config.bed_mesh) !== "undefined");
},
computed: {
@@ -110,33 +138,59 @@ export default {
return this.$route.fullPath;
},
...mapState({
toolhead: state => state.printer.toolhead,
hostname: state => state.printer.hostname,
printername: state => state.gui.general.printername,
version: state => state.printer.version,
loadingEmergencyStop: state => state.socket.loadingEmergencyStop,
isConnected: state => state.socket.isConnected,
isConnecting: state => !state.socket.isConnected,
hostname: state => state.printer.hostname,
version: state => state.printer.software_version,
klippy_state: state => state.server.klippy_state,
loadings: state => state.socket.loadings,
toolhead: state => state.printer.toolhead,
printername: state => state.gui.general.printername,
virtual_sdcard: state => state.printer.virtual_sdcard,
current_file: state => state.printer.virtual_sdcard.filename,
current_file: state => state.printer.print_stats.filename,
boolNaviWebcam: state => state.gui.webcam.bool,
klippy_state: state => state.socket.klippy_state,
is_ready: state => state.socket.is_ready,
config: state => state.config,
config: state => state.printer.configfile.config,
save_config_pending: state => state.printer.configfile.save_config_pending,
}),
...mapGetters([
'getTitle'
])
'getTitle',
'getVersion'
]),
print_percent: {
get() {
return this.$store.getters["printer/getPrintPercent"];
}
}
},
methods: {
emergencyStop: function() {
this.$store.commit('setLoadingEmergencyStop', true);
this.$socket.sendObj('post_printer_emergency_stop', {}, 'setLoadingEmergencyStop');
clickEmergencyStop: function() {
this.$store.commit('socket/addLoading', { name: 'topbarEmergencyStop' });
this.$socket.sendObj('printer.emergency_stop', {}, 'socket/removeLoading',{ name: 'topbarEmergencyStop' });
},
clickSaveConfig: function() {
this.$store.commit('server/addEvent', "SAVE_CONFIG");
this.$store.commit('socket/addLoading', { name: 'topbarSaveConfig' });
this.$socket.sendObj('printer.gcode.script', { script: "SAVE_CONFIG" }, 'socket/removeLoading', { name: 'topbarSaveConfig' });
},
doRestart: function() {
this.$store.commit('server/addEvent', "RESTART");
this.$socket.sendObj('printer.gcode.script', { script: "RESTART" });
},
doFirmwareRestart: function() {
this.$store.commit('server/addEvent', "FIRMWARE_RESTART");
this.$socket.sendObj('printer.gcode.script', { script: "FIRMWARE_RESTART" });
},
doHostReboot: function() {
this.$socket.sendObj('machine.reboot', { });
},
doHostShutdown: function() {
this.$socket.sendObj('machine.shutdown', { });
},
drawFavicon(val) {
let favicon = document.getElementById('favicon');
if (val === 0) favicon.href = "/favicon.ico";
else {
let favicon16 = document.querySelector("link[rel*='icon'][sizes='16x16']")
let favicon32 = document.querySelector("link[rel*='icon'][sizes='32x32']")
if (val > 0 && val < 100) {
let faviconSize = 64;
let canvas = document.createElement('canvas');
@@ -174,39 +228,44 @@ export default {
context.fillStyle = "#e41313";
context.fill();
favicon.href = canvas.toDataURL('image/png');
favicon16.href = canvas.toDataURL('image/png')
favicon32.href = canvas.toDataURL('image/png')
} else {
favicon16.href = "/img/icons/favicon-16x16.png"
favicon32.href = "/img/icons/favicon-32x32.png"
}
}
},
watch: {
virtual_sdcard: {
deep: true,
handler: function(val) {
let progress = (val && val.progress) ? val.progress : 0;
this.drawFavicon(progress);
}
print_percent() {
this.drawFavicon(this.print_percent);
},
current_file: {
handler: function(newVal) {
this.$socket.sendObj("get_file_metadata", { filename: newVal }, "getMetadataCurrentFile");
this.$socket.sendObj("server.files.metadata", { filename: newVal }, "files/getMetadataCurrentFile");
}
},
config() {
this.boolNaviHeightmap = (typeof(this.config.bed_mesh) !== "undefined");
},
isConnected(newVal) {
this.overlayDisconnect = !newVal;
}
},
}
</script>
<style>
.sidebar-wrapper:before {
body {
background: #121212;
}
/*.sidebar-wrapper:before {
position: absolute;
content: ' ';
top: 0; right: 0; bottom: 0; left: 0;
background: #000;
opacity: .7;
}
opacity: .5;
}*/
#nav-header {
text-align: center;
@@ -322,4 +381,4 @@ export default {
}
</style>
</style>
Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.9 KiB

+114 -15
View File
@@ -1,21 +1,120 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 23.0.4, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.1" id="_x30_" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 165 190.5" style="enable-background:new 0 0 165 190.5;" xml:space="preserve">
<!-- Generator: Adobe Illustrator 25.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 599.38 523.11" style="enable-background:new 0 0 599.38 523.11;" xml:space="preserve">
<style type="text/css">
.st0{fill:#E41313;}
.st1{fill:#FFFFFF;}
.st0{fill:#E30613;stroke:#009640;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;}
.st1{fill:#D41216;}
.st2{fill:#D41216;stroke:#009640;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;}
.st3{fill:none;stroke:#009640;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;}
.st4{display:none;}
.st5{display:inline;fill:#E73D26;}
.st6{display:inline;fill:none;}
</style>
<g id="LWPOLYLINE">
<polygon class="st0" points="82.5,0 0,47.6 0,142.9 82.5,190.5 165,142.9 165,47.6 "/>
<g id="Ebene_2">
<g>
<path class="st0" d="M382.29,142.98"/>
<path class="st1" d="M382.29,142.98L132.98,522.82L0,522.68L344.3,0l0,0C352.18,49.06,365.2,97.68,382.29,142.98"/>
<path class="st2" d="M413.28,213.54L208.5,522.92l132.94,0.19l135.03-206.33l0,0C452.69,284.29,431.53,249.77,413.28,213.54
L413.28,213.54"/>
<path class="st3" d="M599.38,447.69"/>
<path class="st3" d="M518.6,369.16"/>
<path class="st1" d="M599.38,447.69l-49.25,75.42L417,522.82l101.6-153.67l0,0C543.48,397.35,570.49,423.61,599.38,447.69
L599.38,447.69z"/>
</g>
</g>
<g id="LWPOLYLINE_1_">
<polygon class="st1" points="58.2,43.5 83.1,43.5 49.1,95.3 24.2,95.3 "/>
</g>
<g id="LWPOLYLINE_2_">
<polygon class="st1" points="36,147 104.1,43.5 129,43.5 60.9,147 "/>
</g>
<g id="LWPOLYLINE_3_">
<polygon class="st1" points="106.8,147 81.9,147 115.9,95.3 140.8,95.3 "/>
<g id="Ebene_1" class="st4">
<path class="st5" d="M-45.42,426.29c0.34,0.34,97.62,1.14,107.04,0.94c0.94-0.07,1.75-0.74,2.29-2.08
c0.47-1.14,1.08-2.02,1.41-2.02s0.61-0.34,0.61-0.67c0-0.81,2.76-4.91,3.56-5.24c0.27-0.13,0.47-0.61,0.47-1.08
c0-0.74,0.61-1.61,3.29-4.84c0.34-0.47,0.47-1.01,0.27-1.21c-0.27-0.2-0.07-0.4,0.34-0.4c0.47,0,0.81-0.47,0.81-1.01
c0-0.47,0.47-1.21,1.08-1.55c0.61-0.34,1.08-0.87,1.08-1.21c0.07-0.54,3.09-5.58,3.9-6.32c0.2-0.2,0.94-1.41,1.61-2.69
c0.74-1.28,1.48-2.49,1.68-2.69c0.61-0.54,3.43-4.64,3.43-4.98c0-0.2,1.95-3.23,4.37-6.72s4.37-6.66,4.37-7.06
c0-0.34,0.2-0.74,0.54-0.87c0.54-0.27,3.5-4.37,3.5-4.91c0-0.2,0.34-0.74,0.74-1.21c0.34-0.47,2.22-3.23,4.17-6.19
c1.88-2.96,3.56-5.51,3.83-5.71c0.2-0.2,0.74-1.14,1.28-2.15c0.54-1.01,1.48-2.49,2.22-3.16c0.67-0.74,1.21-1.55,1.21-1.68
c0-0.61,12.98-20.17,13.65-20.64c0.34-0.2,0.47-0.61,0.34-0.81c-0.07-0.27,0.27-1.01,0.87-1.68c0.61-0.67,1.61-2.22,2.35-3.36
c0.67-1.21,1.48-2.15,1.82-2.15c0.27,0,0.4-0.27,0.13-0.61c-0.2-0.34,0.07-1.01,0.54-1.55c1.48-1.48,5.18-7.13,5.18-7.87
c0-0.4,0.34-0.74,0.67-0.74c0.4,0,0.67-0.47,0.67-1.01c0-0.54,0.34-1.01,0.67-1.01c0.4,0,0.67-0.4,0.67-0.94
c0-0.54,0.27-1.08,0.54-1.21c0.27-0.13,1.28-1.41,2.15-2.89c0.87-1.48,1.88-3.03,2.15-3.36c1.01-1.21,9.28-13.92,9.28-14.19
c0-0.34,4.24-6.45,5.18-7.46c0.4-0.47,1.01-1.48,1.21-2.22c0.2-0.74,0.67-1.34,1.01-1.34c0.27,0,0.67-0.54,0.94-1.21
c0.4-1.14,1.82-3.56,2.49-4.17c0.2-0.2,2.15-3.16,4.37-6.66c2.15-3.43,4.5-6.86,5.11-7.53c0.67-0.74,1.08-1.28,0.87-1.28
c-0.2,0,0.74-1.48,2.02-3.36c1.28-1.82,2.35-3.63,2.35-4.03c0-0.34,0.2-0.67,0.54-0.67c0.27,0,1.21-1.34,2.15-3.03
c0.94-1.68,1.88-3.03,2.15-3.03c0.34,0,0.54-0.4,0.54-0.87c0-0.54,0.61-1.48,1.34-2.15c0.74-0.67,1.34-1.61,1.34-2.15
c0-0.47,0.34-0.87,0.67-0.87c0.4,0,0.67-0.34,0.67-0.67c0-0.74,3.16-5.85,4.5-7.26c0.4-0.4,1.01-1.41,1.21-2.15
s0.67-1.34,0.94-1.34c0.34,0,0.94-0.87,1.41-2.02c0.47-1.14,1.08-2.02,1.34-2.02c0.27,0,0.87-0.87,1.34-2.02
c0.47-1.14,1.08-2.02,1.34-2.02c0.27,0,0.87-0.94,1.34-2.02c0.47-1.14,1.14-2.02,1.48-2.02s0.4-0.34,0.2-0.67
c-0.2-0.4-0.2-0.67,0.13-0.67c0.27,0,1.41-1.55,2.55-3.36c1.08-1.88,2.22-3.36,2.55-3.36c0.27,0,0.4-0.27,0.2-0.61
c-0.2-0.27,0.2-1.08,0.94-1.75c0.74-0.67,1.34-1.55,1.34-1.95c0-0.4,0.74-1.61,1.68-2.62c0.94-1.01,1.55-1.82,1.41-1.82
c-0.34,0,8.87-14.19,10.35-15.93c0.34-0.47,0.67-1.14,0.67-1.55c0-0.34,0.34-0.67,0.67-0.67c0.4,0,0.67-0.47,0.67-1.01
s0.34-1.01,0.67-1.01c0.4,0,0.67-0.34,0.67-0.67c0-0.4,1.08-2.22,2.35-4.03s2.35-3.5,2.35-3.7s0.61-1.01,1.34-1.82
c0.74-0.81,1.34-1.88,1.34-2.35s0.34-0.87,0.74-0.87c0.34,0,0.54-0.27,0.34-0.54c-0.2-0.34,0.27-0.94,0.94-1.48
c0.67-0.54,1.14-1.14,1.01-1.34c-0.2-0.27,0.27-1.01,1.01-1.68c0.74-0.67,1.34-1.48,1.34-1.75c0-0.27,2.35-4.1,5.24-8.47
c2.96-4.37,8.27-12.51,11.9-18.02c3.63-5.58,6.93-10.29,7.33-10.56c0.4-0.27,0.47-0.54,0.13-0.54c-0.34,0-0.13-0.54,0.4-1.21
c1.01-1.21,1.08-1.75,0.2-3.83c-2.89-6.93-5.04-12.77-5.04-13.51c0-0.54-0.27-0.94-0.67-0.94c-0.34,0-0.61-0.2-0.54-0.54
c0.2-0.87-1.75-6.52-2.42-6.99c-0.4-0.27-0.47-0.67-0.2-0.94s0.2-0.81-0.13-1.21c-0.47-0.67-3.97-10.62-4.37-12.71
c-0.13-0.47-0.4-1.34-0.61-2.02c-0.27-0.61-0.67-1.68-0.94-2.35c-0.2-0.61-0.47-1.61-0.61-2.15c-0.27-1.34-1.61-5.98-2.42-8.14
c-0.34-0.94-0.67-2.35-0.74-3.16c-0.07-0.81-0.27-1.48-0.47-1.48c-0.27,0-0.47-0.4-0.54-0.87c0-0.4-0.2-1.41-0.4-2.15
c-0.2-0.74-1.01-3.9-1.68-7.06c-0.74-3.16-1.34-5.78-1.41-5.92c-0.13-0.07-0.2-0.34-0.27-0.67c-0.34-1.34-1.28-5.92-1.41-6.52
c-0.07-0.4-0.2-0.81-0.27-1.01c-0.2-0.4-0.54-2.22-0.94-5.38c-0.2-1.28-0.54-2.82-0.74-3.43c-0.27-0.61-0.4-1.34-0.34-1.68
c0.07-0.34,0-0.74-0.07-0.94c-0.27-0.67-0.67-3.09-0.94-5.38c-0.13-1.28-0.34-2.35-0.4-2.35c-0.13,0-0.61-3.36-0.74-5.92
c-0.07-1.01-0.4-2.02-0.74-2.22s-0.27-0.81,0.13-1.28c1.48-1.75-0.54-1.61-2.08,0.2l0,0c-0.87,1.01-2.22,2.96-2.96,4.37
c-0.74,1.48-1.95,3.29-2.69,4.1c-0.74,0.81-1.95,2.62-2.69,4.03c-0.74,1.34-1.82,3.03-2.42,3.63c-0.54,0.61-1.61,2.22-2.35,3.5
c-1.48,2.69-1.68,2.96-3.97,5.78c-0.94,1.21-1.68,2.35-1.68,2.55c0,0.47-6.66,10.56-7.33,11.16c-0.2,0.2-1.01,1.41-1.68,2.69
c-0.74,1.28-1.48,2.49-1.68,2.69c-0.47,0.4-8.27,12.03-8.81,13.11 M294.17,171.07c-0.74,1.14-1.82,2.76-2.35,3.56
c-0.54,0.81-1.68,2.55-2.49,3.83c-1.88,2.82-2.22,3.36-5.58,8.2c-1.48,2.15-2.69,4.03-2.69,4.24s-0.34,0.67-0.74,1.14
c-0.34,0.47-4.24,6.25-8.67,12.91c-4.37,6.66-8.27,12.44-8.67,12.91c-0.4,0.47-0.74,0.94-0.74,1.14c0,0.61-4.3,6.79-4.84,6.99
c-0.27,0.13-0.54,0.67-0.54,1.21s-0.34,0.94-0.74,0.94c-0.34,0-0.54,0.27-0.34,0.61c0.27,0.34,0.2,0.74-0.07,0.87
c-0.81,0.34-4.91,6.39-4.91,7.19c0,0.34-0.54,1.01-1.14,1.34c-0.67,0.4-0.94,0.74-0.67,0.74s-0.07,0.67-0.87,1.48
c-0.74,0.81-1.34,1.88-1.34,2.35s-0.2,0.87-0.47,0.87c-0.34,0-1.41,1.55-2.55,3.43c-1.08,1.88-2.29,3.77-2.69,4.24
c-1.34,1.61-3.7,5.04-3.7,5.45c0,0.27-0.4,0.87-0.81,1.34c-1.95,2.15-2.49,2.89-2.22,3.16c0.13,0.13-0.47,1.14-1.34,2.15
c-0.94,1.08-1.68,2.15-1.68,2.42s-0.61,1.14-1.34,2.02s-1.34,1.95-1.34,2.49s-0.27,0.81-0.61,0.61c-0.34-0.2-0.81,0.34-1.01,1.28
c-0.27,0.94-0.74,1.68-1.08,1.68c-0.4,0-0.67,0.34-0.67,0.67c0,0.81-2.76,4.91-3.5,5.24c-0.34,0.13-0.54,0.54-0.54,0.81
c0,0.81-4.17,6.99-4.84,7.26c-0.27,0.13-0.54,0.54-0.54,0.94c0,0.74-4.1,6.79-4.84,7.13c-0.34,0.13-0.54,0.54-0.54,0.87
c0,0.94-4.91,8-5.58,8c-0.27,0-0.4,0.27-0.13,0.61c0.2,0.34-0.07,1.01-0.47,1.55c-0.47,0.47-2.55,3.43-4.57,6.59
c-2.02,3.16-3.83,5.85-4.03,6.05c-0.4,0.4-2.89,4.03-3.36,5.04c-1.01,1.95-31.26,47.13-31.87,47.53c-0.4,0.27-0.47,0.54-0.13,0.54
c0.34,0,0.07,0.67-0.67,1.48c-1.61,1.82-4.77,6.72-4.84,7.46c0,0.34-0.74,1.14-1.55,1.88c-0.81,0.67-1.21,1.28-0.94,1.28
c0.34,0-0.13,0.74-1.01,1.68s-1.28,1.68-0.94,1.68s0.27,0.27-0.07,0.54c-0.94,0.67-3.83,4.77-4.98,6.99
c-0.54,1.08-1.21,1.88-1.55,1.88c-0.27,0-0.54,0.27-0.54,0.67c0,0.34-1.01,2.08-2.22,3.83c-1.28,1.82-2.49,3.77-2.69,4.37
c-0.27,0.67-0.74,1.21-1.14,1.21c-0.34,0-0.67,0.47-0.67,1.01c0,0.54-0.27,1.01-0.67,1.01c-0.34,0-0.67,0.27-0.67,0.61
c0,0.4-2.29,4.03-5.11,8.14c-2.76,4.17-4.91,7.66-4.77,7.87c0.34,0.27,33.68,0.67,83.44,0.87c22.79,0.13,24.14,0.07,25.21-1.14
c1.21-1.48,2.55-3.43,3.23-4.91c0.27-0.54,1.01-1.61,1.68-2.29c0.61-0.67,1.01-1.55,0.81-1.88c-0.2-0.27-0.07-0.54,0.34-0.54
s1.21-1.01,1.82-2.22c0.61-1.14,1.34-2.29,1.61-2.49c0.2-0.2,1.48-2.08,2.76-4.24c1.21-2.08,2.49-3.83,2.76-3.83
c0.34,0,0.54-0.47,0.54-1.01c0-0.54,0.34-1.01,0.74-1.01c0.34,0,0.54-0.27,0.34-0.61c-0.27-0.34-0.2-0.74,0.07-0.87
c0.81-0.34,3.56-4.44,3.56-5.24c0-0.34,0.34-0.67,0.67-0.67c0.4,0,0.67-0.47,0.67-1.01c0-0.54,0.27-1.01,0.54-1.01
c0.34,0,0.94-0.67,1.41-1.55c0.4-0.81,1.34-2.42,2.08-3.5c0.74-1.14,1.68-2.69,2.08-3.56c0.47-0.81,1.08-1.48,1.41-1.48
c0.27,0,0.54-0.4,0.54-0.87c0-0.47,0.54-1.48,1.21-2.22c0.61-0.67,1.55-2.08,2.08-3.09c0.54-1.01,1.61-2.55,2.35-3.36
c0.81-0.81,1.41-1.68,1.34-1.88c-0.07-0.47,6.05-9.68,6.66-9.95c0.27-0.13,0.47-0.54,0.47-0.87c0-0.54,5.85-9.88,6.72-10.69
c0.2-0.2,1.41-2.02,2.69-4.03c1.28-2.02,2.62-3.9,3.03-4.17c0.34-0.27,0.4-0.54,0.13-0.54c-0.34,0-0.13-0.47,0.34-1.01
c2.08-2.29,2.42-2.89,2.08-3.29c-0.27-0.2-0.07-0.4,0.34-0.4c0.47,0,0.81-0.4,0.81-0.94c0-0.54,0.27-1.08,0.54-1.21
c0.34-0.13,1.95-2.35,3.56-4.91c1.61-2.62,3.16-4.84,3.43-4.91c0.27-0.13,0.54-0.54,0.54-0.87c0-0.34,1.08-2.15,2.35-3.97
c1.28-1.82,2.35-3.5,2.35-3.77c0-0.2,0.4-0.74,0.87-1.28c0.4-0.47,2.89-4.17,5.51-8.2c2.55-3.97,4.91-7.4,5.18-7.46
c0.34-0.13,0.4-0.54,0.13-0.87c-0.2-0.34,0.13-0.81,0.67-1.01c0.61-0.2,1.08-0.74,1.08-1.08c0-0.4,1.08-2.22,2.35-3.97
c1.28-1.82,2.35-3.43,2.35-3.5c0-0.27,11.16-17.28,11.97-18.29c0.27-0.4,1.14-1.75,1.88-3.03c0.67-1.28,1.68-2.62,2.15-2.89
c0.4-0.27,0.81-0.87,0.81-1.21c0-0.4,0.74-1.68,1.68-2.89c0.94-1.21,1.68-2.55,1.68-2.96c0-0.47,0.27-0.81,0.54-0.81
c0.34,0,0.94-0.74,1.34-1.61c0.61-1.34,0.34-2.02-1.95-5.04c-1.41-1.88-2.35-3.43-2.08-3.43s0.13-0.27-0.27-0.54
c-0.87-0.54-6.99-9.48-6.99-10.22c0-0.27-0.61-1.01-1.34-1.68c-0.74-0.67-1.34-1.61-1.34-2.15c0-0.47-0.27-0.87-0.67-0.87
c-0.34,0-0.67-0.4-0.67-0.94c0-0.54-0.27-1.08-0.54-1.21c-0.54-0.2-6.19-9.01-6.19-9.61c0-0.2-0.61-1.01-1.34-1.82
c-0.74-0.81-1.34-1.88-1.34-2.35s-0.27-0.87-0.67-0.87c-0.34,0-0.67-0.27-0.67-0.61c0-0.4-0.87-2.02-2.02-3.63
c-1.08-1.68-2.02-3.36-2.02-3.77c0-0.4-0.27-0.74-0.61-0.74s-0.74-0.54-0.94-1.21c-0.4-1.14-2.49-4.84-3.16-5.51
c-0.2-0.2-1.08-1.68-1.95-3.36c-0.94-1.68-1.82-3.16-2.02-3.36c-0.27-0.2-0.81-1.08-1.21-2.02c-0.47-0.94-2.22-4.1-3.9-7.06
c-1.75-2.96-3.29-5.92-3.5-6.59c-0.2-0.61-0.61-1.14-0.87-1.14c-0.54,0-2.29-3.97-2.08-4.91
C296.66,168.25,295.38,169.19,294.17,171.07L294.17,171.07z M379.36,300.09c-0.81,1.08-1.48,2.22-1.41,2.42
c0,0.27-0.2,0.67-0.54,0.87c-0.94,0.67-8.94,12.71-8.94,13.51c0,0.34-0.2,0.67-0.47,0.67c-0.34,0-1.61,1.82-2.89,4.03
s-2.55,4.03-2.82,4.03c-0.34,0-0.54,0.4-0.54,0.94c0,0.54-0.2,1.08-0.47,1.21c-0.74,0.27-4.24,5.71-4.24,6.52
c0,0.34-0.47,0.74-1.01,1.01c-0.54,0.2-1.01,0.81-1.01,1.34c0,0.54-0.2,1.08-0.54,1.21c-0.27,0.07-1.55,1.88-2.82,3.9
c-1.28,2.02-2.49,3.83-2.69,4.03s-1.14,1.55-2.02,3.03c-0.87,1.48-2.02,3.09-2.42,3.56c-0.47,0.4-1.08,1.41-1.28,2.15
c-0.2,0.74-0.74,1.34-1.14,1.34c-0.4,0-0.61,0.2-0.34,0.4c0.2,0.27,0.07,0.81-0.4,1.28c-0.47,0.47-1.21,1.41-1.61,2.08
c-0.47,0.74-2.22,3.36-3.9,5.85c-1.68,2.55-3.03,4.91-3.03,5.24c0,0.34-0.27,0.61-0.54,0.61c-0.34,0-1.01,0.81-1.55,1.82
c-0.54,1.08-1.14,2.02-1.34,2.22s-3.36,4.84-6.99,10.42c-3.63,5.51-6.86,10.22-7.13,10.29c-0.34,0.13-0.47,0.54-0.2,0.87
c0.2,0.34,0,0.61-0.34,0.61c-0.4,0-0.74,0.47-0.74,1.01c0,0.61-0.47,1.21-1.01,1.41c-0.54,0.27-0.81,0.67-0.61,1.01
c0.2,0.34,0,0.61-0.34,0.61c-0.4,0-0.74,0.34-0.74,0.74s-0.54,1.41-1.14,2.29c-1.41,1.82-1.41,1.82-8.2,12.1
c-2.96,4.44-5.71,8.47-6.12,8.94c-0.54,0.61,0.4,0.81,4.5,0.87c13.31,0.13,60.58,0.54,80.81,0.61l22.39,0.13l1.61-1.88
c0.87-1.08,1.55-2.22,1.61-2.49c0-0.27,0.61-1.14,1.34-1.95c0.74-0.81,1.34-1.88,1.34-2.35s0.34-0.87,0.74-0.87
c0.34,0,0.54-0.27,0.34-0.54c-0.2-0.34,0.27-0.94,0.94-1.48c0.67-0.54,1.14-1.14,1.01-1.34c-0.2-0.27,0.27-1.01,1.01-1.68
c0.74-0.67,1.34-1.55,1.34-1.88c0-0.4,0.74-1.68,1.68-2.82c0.87-1.21,1.41-2.35,1.21-2.62c-0.27-0.2-0.13-0.4,0.27-0.4
c0.4,0,2.89-3.5,5.58-7.73c2.69-4.24,5.51-8.34,6.19-9.08s1.08-1.34,0.94-1.34c-0.54,0,7.73-12.3,8.61-12.91
c0.4-0.27,0.47-0.54,0.2-0.54c-0.34,0,0.07-0.81,0.81-1.75c0.81-1.01,1.41-2.22,1.41-2.76c0-0.81-3.03-4.24-11.56-13.11
c-1.82-1.82-3.23-3.43-3.23-3.56c0-0.13-0.67-1.01-1.48-1.82c-1.48-1.48-6.19-6.86-11.36-12.91c-1.28-1.41-2.89-3.23-3.63-4.03
c-1.08-1.14-4.57-5.18-9.41-10.89c-1.01-1.21-4.17-5.04-11.43-14.05C380.23,296.93,381.11,297.67,379.36,300.09L379.36,300.09z"/>
<line class="st6" x1="108.71" y1="523.11" x2="108.7" y2="523.11"/>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 851 B

After

Width:  |  Height:  |  Size: 12 KiB

+15
View File
@@ -0,0 +1,15 @@
.v-toast__item--error {
background-color: #F56565 !important;
}
.v-toast__item--success {
background-color: #38A169 !important;
}
.v-toast__item--warning {
background-color: #ED8936 !important;
}
.v-toast__text {
font-family: "Roboto", sans-serif;
}
+70 -50
View File
@@ -1,4 +1,4 @@
import store from '../store'
//import store from '../store'
import { Line, mixins } from 'vue-chartjs'
const { reactiveProp } = mixins;
@@ -12,24 +12,34 @@ export default {
props: ['chartData'],
data() {
return {
timer: '',
options: {
events: [],
animation: {
duration: 0 // general animation time
},
elements: {
line: {
tension: 0 // disable bezier curves
tension: 0,
borderWidth: 1,
},
point: {
radius: 0,
}
},
showLines: true,
legend: {
labels: {
fontColor: 'rgb(203, 203, 203)',
fontFamily: 'Roboto,sans-serif',
//fontFamily: 'Roboto,sans-serif',
filter: function(item) {
return !item.text.includes('_target');
if (item && item.text) return !item.text.includes('_target');
}
},
onClick: function(e, legendItem) {
window.console.log(e)
window.console.log(legendItem)
let ci = this.chart;
let index = legendItem.datasetIndex;
let index_target = ci.data.datasets.findIndex(dataset => dataset.label === legendItem.text+'_target');
@@ -42,58 +52,61 @@ export default {
meta_target.hidden = meta.hidden;
}
store.dispatch('setHeaterChartVisibility', { name: legendItem.text, hidden: meta.hidden });
//store.dispatch('gui/setHeaterChartVisibility', { name: legendItem.text, hidden: meta.hidden });
ci.update();
}
},
tooltips: {
enabled: true,
enabled: false
},
hover: {
mode:undefined
},
/*tooltips: {
enabled: false,
mode: 'nearest',
caretPadding: 20,
intersect: false,
callbacks: {
title: function (tooltipItem) {
let date = new Date(tooltipItem[0].label);
return date.getHours()+":"+date.getMinutes()+":"+date.getSeconds();
return date.getHours()+":"+(date.getMinutes() < 10 ? "0" : "")+date.getMinutes()+":"+(date.getSeconds() < 10 ? "0" : "")+date.getSeconds();
},
label: function (tooltipItem, data) {
let label_target = data['datasets'][tooltipItem.datasetIndex].label+"_target";
label: function (tooltipItem/!*, data*!/) {
/!*let label_target = data['datasets'][tooltipItem.datasetIndex].label+"_target";
let target_dataset = data['datasets'].find(dataset => dataset.label === label_target);
if (target_dataset !== undefined) return tooltipItem.value+" / "+target_dataset.data[tooltipItem.index];
if (target_dataset !== undefined && target_dataset.data[tooltipItem.index] !== undefined) return tooltipItem.value+" / "+target_dataset.data[tooltipItem.index].y;*!/
return tooltipItem.value;
},
}
},
},*/
maintainAspectRatio: false,
responsive: true,
responsiveAnimationDuration: 0, // animation duration after a resize
scales: {
xAxes: [
{
gridLines: {
color: 'rgba(0,0,0,0.2)',
display: true
xAxes: [{
type: 'time',
time: {
unit: 'minute',
displayFormats: {
second: 'HH:mm:ss',
minute: 'HH:mm'
}
},
ticks: {
minor: {
fontColor: 'rgb(203, 203, 203)',
fontFamily: 'Roboto,sans-serif'
},
ticks: {
minor: {
fontColor: 'rgb(203, 203, 203)',
fontFamily: 'Roboto,sans-serif'
},
major: {
fontColor: 'rgb(203, 203, 203)',
fontFamily: 'Roboto,sans-serif'
},
min: new Date() - maxSampleTime,
max: new Date()
},
time: {
unit: 'minute',
displayFormats: {
minute: 'HH:mm'
}
},
type: 'time',
}
],
min: new Date() - maxSampleTime,
max: new Date(),
},
gridLines: {
color: 'rgba(203,203,203,0.1)',
},
}],
yAxes: [
{
gridLines: {
@@ -120,20 +133,27 @@ export default {
}
}
},
created () {
this.timer = setInterval(() => {
if (
this.$data._chart.config &&
this.$data._chart.config.options &&
this.$data._chart.config.options.scales &&
this.$data._chart.config.options.scales.xAxes &&
this.$data._chart.config.options.scales.xAxes.length &&
this.$data._chart.config.options.scales.xAxes[0].ticks &&
this.$data._chart.config.options.scales.yAxes &&
this.$data._chart.config.options.scales.yAxes.length &&
this.$data._chart.config.options.scales.yAxes[0].ticks
) {
this.$data._chart.config.options.scales.yAxes[0].ticks.max = defaultMaxTemperature
this.$data._chart.config.options.scales.xAxes[0].ticks.min = new Date() - maxSampleTime
this.$data._chart.config.options.scales.xAxes[0].ticks.max = new Date()
this.$data._chart.update()
}
}, 1000)
},
mounted () {
this.renderChart(this.chartData, this.options)
},
methods: {
update() {
this.$data._chart.config.options.scales.yAxes[0].ticks.max = defaultMaxTemperature;
this.$data._chart.config.options.scales.xAxes[0].ticks.min = new Date() - maxSampleTime;
this.$data._chart.config.options.scales.xAxes[0].ticks.max = new Date();
this.$data._chart.update();
}
},
watch: {
chartData () {
this.update();
}
}
}
+74 -71
View File
@@ -1,58 +1,66 @@
<style>
.btnHomeAxis {
width: 36px;
min-width: 36px !important;
}
.btnMinWidthAuto {
min-width: auto !important;
}
</style>
<template>
<v-card>
<v-row class="" v-if="!is_printing">
<v-row class="" v-if="['standby', 'complete', 'error'].includes(printer_state)">
<v-col class="col-12 pb-0 text-center">
<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>
<v-btn small @click="doHome" :loading="loadings.includes('homeAll')" :color="homedAxes.includes('xyz') ? 'primary' : 'warning'"><v-icon class="mr-1">mdi-home</v-icon><span class="d-none d-sm-inline">Home </span>all</v-btn>
<v-btn small @click="doQGL" :loading="loadings.includes('qgl')" color="primary" class="ml-2" v-if="'quad_gantry_level' in config">QGL</v-btn>
<v-btn small @click="doZtilt" :loading="loadings.includes('zTilt')" color="primary" class="ml-2" v-if="'z_tilt' in config">Z Tilt</v-btn>
</v-col>
</v-row>
<v-row class="mt-3" v-if="!is_printing">
<v-row class="mt-3" v-if="['standby', 'complete', 'error'].includes(printer_state)">
<v-col class="col-12 py-0 px-6 text-center">
<v-btn-toggle borderless no-gutters style="flex-wrap: nowrap; width: 100%;" >
<v-btn @click="doSendMove('X-100')" cols="1" class="flex-grow-1 flex-shrink-0 d-none d-sm-flex"><v-icon left class="d-sm-flex">mdi-chevron-left</v-icon><span class="body-2">X-100</span></v-btn>
<v-btn @click="doSendMove('X-10')" cols="1" class="flex-grow-1 flex-shrink-0"><v-icon left class="d-none d-sm-flex">mdi-chevron-left</v-icon><span class="body-2">X-10</span></v-btn>
<v-btn @click="doSendMove('X-1')" cols="1" class="flex-grow-1 flex-shrink-0"><v-icon left class="d-none d-sm-flex">mdi-chevron-left</v-icon><span class="body-2">X-1</span></v-btn>
<v-btn @click="doHomeX" :color="homedAxes.includes('x') ? 'primary' : 'warning'" :loading="loadingHomeX"><v-icon class="mdi mdi-home"></v-icon></v-btn>
<v-btn @click="doSendMove('X+1')" cols="1" class="flex-grow-1 flex-shrink-0"><span class="body-2">X+1</span><v-icon right class="d-none d-sm-flex">mdi-chevron-right</v-icon></v-btn>
<v-btn @click="doSendMove('X+10')" cols="1" class="flex-grow-1 flex-shrink-0"><span class="body-2">X+10</span><v-icon right class="d-none d-sm-flex">mdi-chevron-right</v-icon></v-btn>
<v-btn @click="doSendMove('X+100')" cols="1" class="flex-grow-1 flex-shrink-0 d-none d-sm-flex"><span class="body-2">X+100</span><v-icon right class="d-none d-sm-flex">mdi-chevron-right</v-icon></v-btn>
<v-btn-toggle dense no-gutters class="row mx-auto" style="flex-wrap: nowrap;" >
<v-btn @click="doSendMove('X-100')" class="btnMinWidthAuto col"><span class="body-2">-100</span></v-btn>
<v-btn @click="doSendMove('X-10')" class="btnMinWidthAuto col"><span class="body-2">-10</span></v-btn>
<v-btn @click="doSendMove('X-1')" class="btnMinWidthAuto col"><span class="body-2">-1</span></v-btn>
<v-btn @click="doHomeX" :color="homedAxes.includes('x') ? 'primary' : 'warning'" :loading="loadings.includes('homeX')" class="font-weight-bold btnHomeAxis">X</v-btn>
<v-btn @click="doSendMove('X+1')" class="btnMinWidthAuto col"><span class="body-2">+1</span></v-btn>
<v-btn @click="doSendMove('X+10')" class="btnMinWidthAuto col"><span class="body-2">+10</span></v-btn>
<v-btn @click="doSendMove('X+100')" class="btnMinWidthAuto col"><span class="body-2">+100</span></v-btn>
</v-btn-toggle>
</v-col>
</v-row>
<v-row class="mt-3" v-if="!is_printing">
<v-row class="mt-3" v-if="['standby', 'complete', 'error'].includes(printer_state)">
<v-col class="col-12 py-0 px-6 text-center">
<v-btn-toggle borderless no-gutters style="flex-wrap: nowrap; width: 100%;" >
<v-btn @click="doSendMove('Y-100')" cols="1" class="flex-grow-1 flex-shrink-0 d-none d-sm-flex"><v-icon left class="d-none d-sm-flex">mdi-chevron-left</v-icon><span class="body-2">Y-100</span></v-btn>
<v-btn @click="doSendMove('Y-10')" cols="1" class="flex-grow-1 flex-shrink-0"><v-icon left class="d-none d-sm-flex">mdi-chevron-left</v-icon><span class="body-2">Y-10</span></v-btn>
<v-btn @click="doSendMove('Y-1')" cols="1" class="flex-grow-1 flex-shrink-0"><v-icon left class="d-none d-sm-flex">mdi-chevron-left</v-icon><span class="body-2">Y-1</span></v-btn>
<v-btn @click="doHomeY" :color="homedAxes.includes('y') ? 'primary' : 'warning'" :loading="loadingHomeY"><v-icon class="mdi mdi-home"></v-icon></v-btn>
<v-btn @click="doSendMove('Y+1')" cols="1" class="flex-grow-1 flex-shrink-0"><span class="body-2">Y+1</span><v-icon right class="d-none d-sm-flex">mdi-chevron-right</v-icon></v-btn>
<v-btn @click="doSendMove('Y+10')" cols="1" class="flex-grow-1 flex-shrink-0"><span class="body-2">Y+10</span><v-icon right class="d-none d-sm-flex">mdi-chevron-right</v-icon></v-btn>
<v-btn @click="doSendMove('Y+100')" cols="1" class="flex-grow-1 flex-shrink-0 d-none d-sm-flex"><span class="body-2">Y+100</span><v-icon right class="d-none d-sm-flex">mdi-chevron-right</v-icon></v-btn>
<v-btn-toggle dense no-gutters class="row mx-auto" style="flex-wrap: nowrap;" >
<v-btn @click="doSendMove('Y-100')" class="btnMinWidthAuto col"><span class="body-2">-100</span></v-btn>
<v-btn @click="doSendMove('Y-10')" class="btnMinWidthAuto col"><span class="body-2">-10</span></v-btn>
<v-btn @click="doSendMove('Y-1')" class="btnMinWidthAuto col"><span class="body-2">-1</span></v-btn>
<v-btn @click="doHomeY" :color="homedAxes.includes('y') ? 'primary' : 'warning'" :loading="loadings.includes('homeY')" class="font-weight-bold btnHomeAxis">Y</v-btn>
<v-btn @click="doSendMove('Y+1')" class="btnMinWidthAuto col"><span class="body-2">+1</span></v-btn>
<v-btn @click="doSendMove('Y+10')" class="btnMinWidthAuto col"><span class="body-2">+10</span></v-btn>
<v-btn @click="doSendMove('Y+100')" class="btnMinWidthAuto col"><span class="body-2">+100</span></v-btn>
</v-btn-toggle>
</v-col>
</v-row>
<v-row class="mt-3" v-if="!is_printing">
<v-row class="mt-3" v-if="['standby', 'complete', 'error'].includes(printer_state)">
<v-col class="col-12 py-0 px-6 text-center">
<v-btn-toggle borderless no-gutters style="flex-wrap: nowrap; width: 100%;" >
<v-btn @click="doSendMove('Z-25')" cols="1" class="flex-grow-1 flex-shrink-0"><v-icon left class="d-none d-sm-flex">mdi-chevron-left</v-icon><span class="body-2">Z-25</span></v-btn>
<v-btn @click="doSendMove('Z-1')" cols="1" class="flex-grow-1 flex-shrink-0"><v-icon left class="d-none d-sm-flex">mdi-chevron-left</v-icon><span class="body-2">Z-1</span></v-btn>
<v-btn @click="doSendMove('Z-0.1')" cols="1" class="flex-grow-1 flex-shrink-0 d-none d-sm-flex"><v-icon left class="d-none d-sm-flex">mdi-chevron-left</v-icon><span class="body-2">Z-0.1</span></v-btn>
<v-btn @click="doHomeZ" :color="homedAxes.includes('z') ? 'primary' : 'warning'" :loading="loadingHomeZ"><v-icon class="mdi mdi-home"></v-icon></v-btn>
<v-btn @click="doSendMove('Z+0.1')" cols="1" class="flex-grow-1 flex-shrink-0 d-none d-sm-flex"><span class="body-2">Z+0.1</span><v-icon right class="d-none d-sm-flex">mdi-chevron-right</v-icon></v-btn>
<v-btn @click="doSendMove('Z+1')" cols="1" class="flex-grow-1 flex-shrink-0"><span class="body-2">Z+1</span><v-icon right class="d-none d-sm-flex">mdi-chevron-right</v-icon></v-btn>
<v-btn @click="doSendMove('Z+25')" cols="1" class="flex-grow-1 flex-shrink-0"><span class="body-2">Z+25</span><v-icon right class="d-none d-sm-flex">mdi-chevron-right</v-icon></v-btn>
<v-btn-toggle dense no-gutters class="row mx-auto" style="flex-wrap: nowrap;" >
<v-btn @click="doSendMove('Z-25')" dense class="btnMinWidthAuto col"><span class="body-2">-25</span></v-btn>
<v-btn @click="doSendMove('Z-1')" dense class="btnMinWidthAuto col"><span class="body-2">-1</span></v-btn>
<v-btn @click="doSendMove('Z-0.1')" dense class="btnMinWidthAuto col"><span class="body-2">-0.1</span></v-btn>
<v-btn @click="doHomeZ" :color="homedAxes.includes('z') ? 'primary' : 'warning'" :loading="loadings.includes('homeZ')" class="font-weight-bold btnHomeAxis">Z</v-btn>
<v-btn @click="doSendMove('Z+0.1')" dense class="btnMinWidthAuto col"><span class="body-2">+0.1</span></v-btn>
<v-btn @click="doSendMove('Z+1')" dense class="btnMinWidthAuto col"><span class="body-2">+1</span></v-btn>
<v-btn @click="doSendMove('Z+25')" dense class="btnMinWidthAuto col"><span class="body-2">+25</span></v-btn>
</v-btn-toggle>
</v-col>
</v-row>
<v-row class="" v-if="getMacros.length > 0">
<v-row class="" v-if="this['printer/getMacros'].length > 0">
<v-col class="col-12 px-4 py-2 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="mx-1 my-1" @click="doSend(macro.name)">{{ macro.name }}</v-btn>
<div v-for="(macro, index) in this['printer/getMacros']" v-bind:key="index+99" class="d-inline-block mx-1 my-1">
<v-btn small color="primary" class="mx-1 my-1" :loading="loadings.includes('macro_'+macro.name)" @click="doSendMacro(macro.name)">{{ macro.name.replace(/_/g, " ") }}</v-btn>
</div>
</v-col>
</v-row>
@@ -60,7 +68,7 @@
</template>
<script>
import { mapState, mapGetters, mapMutations } from 'vuex'
import { mapState, mapGetters } from 'vuex'
import Vue from "vue";
export default {
@@ -69,52 +77,50 @@
},
data: function() {
return {
loadingHomeAll: false,
loadingHomeX: false,
loadingHomeY: false,
loadingHomeZ: false,
}
},
computed: {
...mapState({
loadingQGL: state => state.socket.loadingQGL,
homedAxes: state => state.printer.toolhead.homed_axes,
config: state => state.config,
loadings: state => state.loadings,
config: state => state.printer.configfile.config,
loadings: state => state.socket.loadings,
printer_state: state => state.printer.print_stats.state
}),
...mapMutations([
'setLoadingQGL',
]),
...mapGetters([
'getMacros',
'is_printing'
'printer/getMacros',
])
},
methods: {
doHome() {
this.$store.commit('addGcodeResponse', "G28");
this.$store.commit('setLoading', { name: 'controlHomeAll' });
this.$socket.sendObj('post_printer_gcode_script', { script: "G28" }, "responseHome");
this.$store.commit('server/addEvent', "G28");
this.$store.commit('socket/addLoading', { name: 'homeAll' });
this.$socket.sendObj('printer.gcode.script', { script: "G28" }, "socket/removeLoading", { name: 'homeAll' });
},
doHomeX() {
this.$store.commit('addGcodeResponse', "G28 X");
this.$store.commit('setLoading', { name: 'controlHomeX' });
this.$socket.sendObj('post_printer_gcode_script', { script: "G28 X" }, "responseHomeX");
this.$store.commit('server/addEvent', "G28 X");
this.$store.commit('socket/addLoading', { name: 'homeX' });
this.$socket.sendObj('printer.gcode.script', { script: "G28 X" }, "socket/removeLoading", { name: 'homeX' });
},
doHomeY() {
this.$store.commit('addGcodeResponse', "G28 Y");
this.$store.commit('setLoading', { name: 'controlHomeY' });
this.$socket.sendObj('post_printer_gcode_script', { script: "G28 Y" }, "responseHomeY");
this.$store.commit('server/addEvent', "G28 Y");
this.$store.commit('socket/addLoading', { name: 'homeY' });
this.$socket.sendObj('printer.gcode.script', { script: "G28 Y" }, "socket/removeLoading", { name: 'homeY' });
},
doHomeZ() {
this.$store.commit('addGcodeResponse', "G28 Z");
this.$store.commit('setLoading', { name: 'controlHomeZ' });
this.$socket.sendObj('post_printer_gcode_script', { script: "G28 Z" }, "responseHomeZ");
this.$store.commit('server/addEvent', "G28 Z");
this.$store.commit('socket/addLoading', { name: 'homeZ' });
this.$socket.sendObj('printer.gcode.script', { script: "G28 Z" }, "socket/removeLoading", { name: 'homeZ' });
},
doQGL() {
this.$store.commit('addGcodeResponse', "QUAD_GANTRY_LEVEL");
this.$store.commit('setLoadingQGL', true);
this.$socket.sendObj('post_printer_gcode_script', { script: "QUAD_GANTRY_LEVEL" }, "responseQGL");
this.$store.commit('server/addEvent', "QUAD_GANTRY_LEVEL");
this.$store.commit('socket/addLoading', { name: 'qgl' });
this.$socket.sendObj('printer.gcode.script', { script: "QUAD_GANTRY_LEVEL" }, "socket/removeLoading", { name: 'qgl' });
},
doZtilt() {
this.$store.commit('server/addEvent', "Z_TILT_ADJUST");
this.$store.commit('socket/addLoading', { name: 'zTilt' });
this.$socket.sendObj('printer.gcode.script', { script: "Z_TILT_ADJUST" }, "socket/removeLoading", { name: 'zTilt' });
},
doSendMove(gcode) {
gcode = "G91" + "\n" +
@@ -124,17 +130,14 @@
this.doSend(gcode);
},
doSend(gcode) {
this.$store.commit('addGcodeResponse', gcode);
Vue.prototype.$socket.sendObj('post_printer_gcode_script', { script: gcode }, "sendGcode");
this.$store.commit('server/addEvent', gcode);
Vue.prototype.$socket.sendObj('printer.gcode.script', { script: gcode }, "server/getGcodeRespond");
},
doSendMacro(gcode) {
this.$store.commit('server/addEvent', gcode);
this.$store.commit('socket/addLoading', { name: 'macro_'+gcode });
Vue.prototype.$socket.sendObj('printer.gcode.script', { script: gcode }, "socket/removeLoading", { name: 'macro_'+gcode });
},
},
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>
+24 -47
View File
@@ -3,34 +3,25 @@
</style>
<template>
<v-card v-if="!(printer_state === 'Printing' && printer_is_printing)">
<v-card v-if="(['standby', 'paused', 'complete'].includes(printer_state))">
<v-row class="px-3">
<v-col class="col-12 col-md-6">
<v-label>Feed amount in mm:</v-label>
<v-btn-toggle class="mt-2" no-gutters style="flex-wrap: nowrap; width: 100%;" >
<v-btn @click="setFeedAmount(100)" cols="1" :class="(feedAmount === 100 ? 'v-btn--active' : '') + ' flex-grow-1'">100</v-btn>
<v-btn @click="setFeedAmount(50)" cols="1" :class="(feedAmount === 50 ? 'v-btn--active' : '') + ' flex-grow-1'">50</v-btn>
<v-btn @click="setFeedAmount(20)" cols="1" :class="(feedAmount === 20 ? 'v-btn--active' : '') + ' flex-grow-1'">20</v-btn>
<v-btn @click="setFeedAmount(10)" cols="1" :class="(feedAmount === 10 ? 'v-btn--active' : '') + ' flex-grow-1'">10</v-btn>
<v-btn @click="setFeedAmount(5)" cols="1" :class="(feedAmount === 5 ? 'v-btn--active' : '') + ' flex-grow-1'">5</v-btn>
<v-btn @click="setFeedAmount(1)" cols="1" :class="(feedAmount === 1 ? 'v-btn--active' : '') + ' flex-grow-1'">1</v-btn>
<v-btn-toggle class="mt-2" dense no-gutters style="flex-wrap: nowrap; width: 100%;" >
<v-btn v-for="amount in feedAmounts" v-bind:key="amount" @click="setFeedAmount(amount)" dense :class="(amount === feedAmount ? 'v-btn--active' : '') + ' btnMinWidthAuto flex-grow-1 px-0 _btnFeedrate'">{{ amount }}</v-btn>
</v-btn-toggle>
</v-col>
<v-col class="col-12 col-md-6">
<v-label>Feedrate in mm/s:</v-label>
<v-btn-toggle class="mt-2" no-gutters style="flex-wrap: nowrap; width: 100%;" >
<v-btn @click="setFeedrate(100)" cols="1" :class="(feedrate === 60 ? 'v-btn--active' : '') + ' flex-grow-1'">60</v-btn>
<v-btn @click="setFeedrate(50)" cols="1" :class="(feedrate === 30 ? 'v-btn--active' : '') + ' flex-grow-1'">30</v-btn>
<v-btn @click="setFeedrate(20)" cols="1" :class="(feedrate === 15 ? 'v-btn--active' : '') + ' flex-grow-1'">15</v-btn>
<v-btn @click="setFeedrate(10)" cols="1" :class="(feedrate === 5 ? 'v-btn--active' : '') + ' flex-grow-1'">5</v-btn>
<v-btn @click="setFeedrate(1)" cols="1" :class="(feedrate === 1 ? 'v-btn--active' : '') + ' flex-grow-1'">1</v-btn>
<v-btn-toggle class="mt-2" dense no-gutters style="flex-wrap: nowrap; width: 100%;" >
<v-btn v-for="rate in feedrates" v-bind:key="rate" @click="setFeedrate(rate)" dense :class="(feedrate === rate ? 'v-btn--active' : '') + ' btnMinWidthAuto flex-grow-1 px-0 _btnFeedrate'">{{ rate }}</v-btn>
</v-btn-toggle>
</v-col>
</v-row>
<v-row class="px-3">
<v-col class="col-12 text-center">
<v-btn @click="sendRetract()" class="mx-2" :loading="loadingRetract" :disabled="!(extruder !== undefined && extruder.config !== null && extruder.status !== null && extruder.config.min_extrude_temp < extruder.status.temperature)"><v-icon>mdi-arrow-up-bold</v-icon> Retract</v-btn>
<v-btn @click="sendDetract()" class="mx-2" :loading="loadingDetract" :disabled="!(extruder !== undefined && extruder.config !== null && extruder.status !== null && extruder.config.min_extrude_temp < extruder.status.temperature)"><v-icon>mdi-arrow-down-bold</v-icon> Extrude</v-btn>
<v-btn small @click="sendRetract()" class="mx-2" :loading="loadings.includes('btnRetract')" :disabled="!this['printer/getExtrudePossible']"><v-icon small class="mr-1">mdi-arrow-up-bold</v-icon> Retract</v-btn>
<v-btn small @click="sendDetract()" class="mx-2" :loading="loadings.includes('btnDetract')" :disabled="!this['printer/getExtrudePossible']"><v-icon small class="mr-1">mdi-arrow-down-bold</v-icon> Extrude</v-btn>
</v-col>
</v-row>
</v-card>
@@ -46,30 +37,22 @@
},
data: function() {
return {
feedAmount: 20,
feedAmount: 25,
feedrate: 5,
loadingRetract: false,
loadingDetract: false,
feedAmounts: [ 100, 25, 10, 5, 1 ],
feedrates: [ 60, 30, 15, 5, 1 ],
}
},
computed: {
...mapState({
config: state => state.config,
loadings: state => state.loadings,
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,
loadings: state => state.socket.loadings,
printer_state: state => state.printer.print_stats.state,
extruder: state => state.printer.extruder,
config: state => state.printer.configfile.config
}),
...mapGetters([
'getMacros',
'getCurrentExtruder',
'is_printing'
'printer/getExtrudePossible',
]),
extruder: {
get: function() {
return this.$store.getters.getCurrentExtruder;
}
}
},
methods: {
setFeedAmount(value) {
@@ -79,23 +62,17 @@
this.feedrate = value;
},
sendRetract() {
let gcode = "M120\nM83\nG1 E-"+this.feedAmount+" F"+(this.feedrate * 60)+"\nM121";
this.$store.commit('setLoading', { name: 'extruderRetract' });
this.$store.commit('addGcodeResponse', gcode);
Vue.prototype.$socket.sendObj('post_printer_gcode_script', { script: gcode }, "respondeExtruderRetract");
let gcode = "M83\nG1 E-"+this.feedAmount+" F"+(this.feedrate * 60);
this.$store.commit('server/addEvent', gcode);
this.$store.commit('socket/addLoading', { name: 'btnRetract' });
Vue.prototype.$socket.sendObj('printer.gcode.script', { script: gcode }, "socket/removeLoading", { name: 'btnRetract' });
},
sendDetract() {
let gcode = "M120\nM83\nG1 E"+this.feedAmount+" F"+(this.feedrate * 60)+"\nM121";
this.$store.commit('setLoading', { name: 'extruderDetract' });
this.$store.commit('addGcodeResponse', gcode);
Vue.prototype.$socket.sendObj('post_printer_gcode_script', { script: gcode }, "respondeExtruderDetract");
},
},
watch: {
loadings: function(loadings) {
this.loadingRetract = loadings.includes('extruderRetract');
this.loadingDetract = loadings.includes('extruderDetract');
let gcode = "M83\nG1 E"+this.feedAmount+" F"+(this.feedrate * 60);
this.$store.commit('server/addEvent', gcode);
this.$store.commit('socket/addLoading', { name: 'btnDetract' });
Vue.prototype.$socket.sendObj('printer.gcode.script', { script: gcode }, "socket/removeLoading", { name: 'btnDetract' });
},
}
}
</script>
</script>
+23 -58
View File
@@ -1,81 +1,46 @@
<template>
<v-card>
<v-list-item>
<v-list-item-avatar color="grey">
<v-icon dark v-if="error_detected">mdi-alert-circle</v-icon>
<v-icon dark v-if="!error_detected">mdi-information-variant</v-icon>
</v-list-item-avatar>
<v-list-item-content>
<v-list-item-title class="headline">Klippy-Status</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">
<v-toolbar flat dense >
<v-toolbar-title>
<span class="subheading"><v-icon left>mdi-alert-circle</v-icon>Klippy-State: {{ klippy_state}}</span>
</v-toolbar-title>
</v-toolbar>
<v-card-text class="py-0">
<v-layout wrap class=" text-center">
<v-flex col class="text-left"><pre>{{ klippy_message }}</pre></v-flex>
<v-flex col class="text-left" v-if="klippy_connected"><pre style="white-space: pre-wrap;">{{ klippy_message }}</pre></v-flex>
<v-flex col class="text-left" v-if="!klippy_connected">
<p>Moonraker can't connect to Klippy!<br />Please check if the Klipper service is running and an UDS (Unix Domain Socket) is configured.</p>
</v-flex>
</v-layout>
</v-card-text>
<v-divider class="my-2" ></v-divider>
<v-card-text class="px-4 pt-2 pb-4 content text-center text-lg-left">
<v-btn @click="doRestart" :loading="loadingRestart" color="error" class=""><v-icon class="mr-sm-2">mdi-cached</v-icon>Restart</v-btn>
<v-btn @click="doRestartFirmware" :loading="loadingRestartFirmware" class="ml-4" color="error"><v-icon class="mr-sm-2">mdi-cached</v-icon>FIRMWARE_Restart</v-btn>
<v-divider class="my-2" v-if="klippy_connected" ></v-divider>
<v-card-text class="px-4 pt-2 pb-4 content text-center text-lg-left" v-if="klippy_connected">
<v-btn small @click="doRestart" color="error" class=""><v-icon class="mr-sm-2">mdi-cached</v-icon>Restart</v-btn>
<v-btn small @click="doRestartFirmware" class="ml-4" color="error"><v-icon class="mr-sm-2">mdi-cached</v-icon>FIRMWARE Restart</v-btn>
</v-card-text>
</v-card>
</template>
<script>
import {mapMutations, mapState} from 'vuex';
import { mapState } from 'vuex';
export default {
computed: {
...mapState({
error_detected: state => state.socket.error_detected,
klippy_message: state => state.socket.klippy_message,
loadingRestart: state => state.socket.loadingRestart,
loadingRestartFirmware: state => state.socket.loadingRestartFirmware,
klippy_connected: state => state.server.klippy_connected,
klippy_state: state => state.server.klippy_state,
klippy_message: state => state.server.klippy_message,
}),
...mapMutations([
'setLoadingRestart',
'setLoadingRestartFirmware',
]),
},
methods: {
doRestart() {
this.$store.commit('setLoadingRestart', true);
this.$socket.sendObj('post_printer_restart', { }, "responseRestart");
this.$store.commit('socket/addLoading', { name: 'restart' });
this.$socket.sendObj('printer.restart', { }, 'socket/removeLoading', { name: 'restart' });
},
doRestartFirmware() {
this.$store.commit('setLoadingRestartFirmware', true);
this.$socket.sendObj('post_printer_firmware_restart', { }, "responseRestartFirmware");
this.$store.commit('socket/addLoading', { name: 'firmwareRestart' });
this.$socket.sendObj('printer.firmware_restart', { }, 'socket/removeLoading', { name: 'firmwareRestart' });
},
},
}
</script>
<style scoped>
.equal-width {
flex-basis: 0;
}
.category-header {
flex: 0 0 100px;
}
a:not(:hover) {
color: inherit;
}
.content span,
.content strong {
padding-left: 8px;
padding-right: 8px;
white-space: pre-wrap;
}
.probe-span {
border-radius: 5px;
}
.probe-span:not(:last-child) {
margin-right: 8px;
}
</style>
</script>
@@ -0,0 +1,94 @@
<template>
<v-card
class="mb-6"
v-if="
!boolVirtualSdcard ||
!boolPauseResume ||
!boolDisplayStatus ||
!boolMacroPause ||
!boolMacroResume ||
!boolMacroCancelPrint
">
<v-toolbar flat dense>
<v-toolbar-title>
<span class="subheading">
<v-icon class="mdi mdi-alert-circle" left></v-icon>Missing configuration
</span>
</v-toolbar-title>
</v-toolbar>
<v-card-text class="px-0 pt-0 pb-2 content">
<v-layout wrap class=" text-center">
<v-flex col class="text-left">
<p v-if="!boolVirtualSdcard"><code>virtual_sdcard</code> is not defined in config.</p>
<p v-if="!boolPauseResume"><code>pause_resume</code> is not defined in config.</p>
<p v-if="!boolDisplayStatus"><code>display_status</code> is not defined in config.</p>
<p v-if="!boolMacroPause"><code>gcode_macro PAUSE</code> is not defined in config.</p>
<p v-if="!boolMacroResume"><code>gcode_macro RESUME</code> is not defined in config.</p>
<p v-if="!boolMacroCancelPrint"><code>gcode_macro CANCEL_PRINT</code> is not defined in config.</p>
<p class="mb-0"><a href="https://meteyou.github.io/mainsail/necessary-configuration" target="_blank">Here you will find more information.</a></p>
</v-flex>
</v-layout>
</v-card-text>
</v-card>
</template>
<script>
import { mapMutations, mapState, mapGetters } from 'vuex';
export default {
data: () => ({
boolVirtualSdcard: false,
boolPauseResume: false,
boolDisplayStatus: false,
boolMacroPause: false,
boolMacroResume: false,
boolMacroCancelPrint: false,
}),
computed: {
...mapState({
config: state => state.printer.configfile.config,
}),
...mapMutations([
]),
...mapGetters([
'printer/checkConfigVirtualSdcard',
'printer/checkConfigPauseResume',
'printer/checkConfigDisplayStatus',
'printer/checkConfigMacroPause',
'printer/checkConfigMacroResume',
'printer/checkConfigMacroCancel',
]),
},
created() {
this.refreshConfig();
},
methods: {
refreshConfig() {
this.boolVirtualSdcard = this['printer/checkConfigVirtualSdcard'];
this.boolPauseResume = this['printer/checkConfigPauseResume'];
this.boolDisplayStatus = this['printer/checkConfigDisplayStatus'];
this.boolMacroPause = this['printer/checkConfigMacroPause'];
this.boolMacroResume = this['printer/checkConfigMacroResume'];
this.boolMacroCancelPrint = this['printer/checkConfigMacroCancel'];
}
},
watch: {
config: {
deep: true,
handler() {
this.refreshConfig();
}
}
}
}
</script>
<style scoped>
.content span,
.content strong {
padding-left: 8px;
padding-right: 8px;
white-space: pre-wrap;
}
</style>
+57 -36
View File
@@ -1,48 +1,58 @@
<style>
.minievent-table {
max-height: 250px;
max-height: 350px;
overflow-y: auto;
}
.miniConsole .title-cell {
white-space: nowrap;
}
.miniConsole.v-data-table > .v-data-table__wrapper > table > tbody > tr > td {
height: auto;
}
.miniConsole .content-cell {
width: 100%;
}
</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-toolbar flat dense>
<v-toolbar-title>
<span class="subheading"><v-icon left>mdi-console-line</v-icon>Console</span>
</v-toolbar-title>
</v-toolbar>
<v-card-text class="px-0 py-0 content">
<v-data-table
:headers="headers"
:options="options"
:items="events"
item-key="date"
hide-default-footer
hide-default-header
disable-pagination
class="minievent-table"
:custom-sort="customSort"
sort-by="date"
>
<template #no-data>
<div class="text-center">empty</div>
</template>
<v-data-table
:headers="headers"
:options="options"
:items="events"
item-key="date"
hide-default-footer
hide-default-header
disable-pagination
class="minievent-table miniConsole"
:custom-sort="customSort"
sort-by="date"
>
<template #no-data>
<div class="py-2">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>
<template #item="{ item }">
<tr>
<td class="log-cell title-cell py-2">
{{ formatTime(item.date)}}
</td>
<td class="log-cell content-cell pl-0 py-2" colspan="2" style="width:100%;">
<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>
@@ -77,11 +87,22 @@
},
computed: {
...mapState({
events: state => state.events,
events: state => state.server.events,
})
},
methods: {
formatTime(date) {
let hours = date.getHours();
if (hours < 10) hours = "0"+hours.toString();
let minutes = date.getMinutes();
if (minutes < 10) minutes = "0"+minutes.toString();
let seconds = date.getSeconds();
if (seconds < 10) seconds = "0"+seconds.toString();
return hours+":"+minutes+":"+seconds;
},
formatMessage(message) {
message = message.replace(/(?:\r\n|\r|\n)/g, '<br>');
@@ -104,4 +125,4 @@
}
}
}
</script>
</script>
+21 -40
View File
@@ -17,48 +17,38 @@
<template>
<div>
<v-card v-if="bool_fan">
<v-card v-if="this['printer/getFans'].length">
<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>
<span class="subheading"><v-icon :class="'mdi mdi-fan '+(this['printer/getPartFanSpeed'] ? 'icon-rotate' : '')" left></v-icon>Fans</span>
</v-toolbar-title>
</v-toolbar>
<v-card-text class="pb-0">
<tool-slider :target="fan_speed" :multi="100" command="M106" attribute-name="S" :attribute-scale="2.55" ></tool-slider>
</v-card-text>
<div v-for="(fan, index) of this['printer/getFans']" v-bind:key="index">
<v-divider v-if="index"></v-divider>
<fan-slider :name="fan.name" :type="fan.type" :target="fan.speed" :controllable="fan.controllable" :multi="100" class="py-0" ></fan-slider>
</div>
</v-card>
<v-card class="mt-6" v-if="is_printing">
<v-card class="mt-6" v-if="['printing', 'paused'].includes(printer_state)">
<v-toolbar flat dense >
<v-toolbar-title>
<span class="subheading"><v-icon class="mdi mdi-timer" left></v-icon>Speed Factor</span>
<span class="subheading"><v-icon class="mdi mdi-printer-3d" left></v-icon>Print Settings</span>
</v-toolbar-title>
</v-toolbar>
<v-card-text class="pb-0">
<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-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>
</v-toolbar-title>
</v-toolbar>
<v-card-text class="pb-0">
<tool-slider :target="extrude_factor" :max="200" :multi="100" command="M221" attribute-name="S" ></tool-slider>
</v-card-text>
<tool-slider label="Speed factor" :target="speed_factor" :max="200" :multi="100" :step="5" command="M220" attribute-name="S" ></tool-slider>
<v-divider></v-divider>
<tool-slider label="Extrusion factor" :target="extrude_factor" :max="200" :multi="100" :step="1" command="M221" attribute-name="S" ></tool-slider>
</v-card>
</div>
</template>
<script>
import {mapGetters, mapState} from 'vuex'
import { mapState, mapGetters } from 'vuex'
import FanSlider from '../../inputs/FanSlider'
import ToolSlider from '../../inputs/ToolSlider'
export default {
components: {
FanSlider,
ToolSlider
},
data () {
@@ -68,23 +58,14 @@
},
computed: {
...mapState({
fan_speed: state => state.printer.fan.speed,
extrude_factor: state => state.printer.gcode.extrude_factor,
speed_factor: state => state.printer.gcode.speed_factor,
extrude_factor: state => state.printer.gcode_move.extrude_factor,
speed_factor: state => state.printer.gcode_move.speed_factor,
printer_state: state => state.printer.print_stats.state,
}),
...mapGetters([
'bool_fan',
'is_printing'
])
'printer/getFans',
'printer/getPartFanSpeed',
]),
},
methods: {
},
mounted () {
},
watch: {
}
}
</script>
</script>
@@ -0,0 +1,53 @@
<style>
</style>
<template>
<div>
<v-card>
<v-toolbar flat dense>
<v-toolbar-title>
<span class="subheading">
<v-icon class="mdi mdi-power" left></v-icon>Power Control
</span>
</v-toolbar-title>
</v-toolbar>
<div v-for="(device, index) in devices" v-bind:key="index">
<v-divider class="mt-0" v-if="index > 0"></v-divider>
<v-card-text class="py-2">
<v-row>
<v-col class="py-0 pt-1">{{ device.device }}</v-col>
<v-col class="py-0 text-right">
<v-btn-toggle v-model="device.status">
<v-btn small v-if="device.status === 'error'" disabled>Error</v-btn>
<v-btn small v-if="device.status !== 'error'" :disabled="device.status === 'on'" @click="setPower(device,1)">On</v-btn>
<v-btn small v-if="device.status !== 'error'" :disabled="device.status === 'off'" @click="setPower(device,0)">Off</v-btn>
</v-btn-toggle>
</v-col>
</v-row>
</v-card-text>
</div>
</v-card>
</div>
</template>
<script>
import { mapState } from "vuex";
import Vue from "vue";
export default {
components: {},
computed: {
...mapState({
devices: (state) => state.server.power.devices,
}),
},
methods: {
setPower(device, value) {
let rpc = value === 1 ? "machine.device_power.on" : "machine.device_power.off";
Vue.prototype.$socket.sendObj(rpc,{ [device.device]: null },"server/power/responseToggle");
},
},
};
</script>
@@ -0,0 +1,491 @@
<style>
.my-editor {
background: #2d2d2d;
color: #ccc;
font-family: Fira code, Fira Mono, Consolas, Menlo, Courier, monospace;
font-size: 14px;
line-height: 1.5;
padding: 5px;
}
.prism-editor__textarea:focus {
outline: none;
}
.config-editor-overlay div.v-card {
position: relative;
}
.config-editor-overlay div.v-card header {
position: sticky;
top: 0;
width: 100%;
z-index: 1;
}
</style>
<template>
<div>
<v-card>
<v-card-title>
Config Files
<v-spacer></v-spacer>
<input type="file" ref="fileUpload" style="display: none" @change="uploadFile" />
<v-item-group class="v-btn-toggle">
<v-btn color="" v-if="currentPath !== '' && currentPath !== '/config_examples'" @click="uploadFileButton" :loading="loadings.includes['configFileUpload']"><v-icon>mdi-file-upload</v-icon></v-btn>
<v-btn color="" v-if="currentPath !== '' && currentPath !== '/config_examples'" @click="createFile"><v-icon>mdi-file-plus</v-icon></v-btn>
<v-btn color="" v-if="currentPath !== '' && currentPath !== '/config_examples'" @click="createFolder"><v-icon>mdi-folder-plus</v-icon></v-btn>
<v-btn color="primary" @click="refreshFileList"><v-icon>mdi-refresh</v-icon></v-btn>
</v-item-group>
</v-card-title>
<v-card-subtitle>Current path: {{ this.currentPath === "" ? "/" : this.currentPath }}</v-card-subtitle>
<v-data-table
:items="files"
class="files-table"
:headers="headers"
:options="options"
:page.sync="currentPage"
:custom-sort="sortFiles"
:sort-by.sync="sortBy"
:sort-desc.sync="sortDesc"
:items-per-page.sync="countPerPage"
item-key="name">
<template #no-data>
<div class="text-center">empty</div>
</template>
<template slot="body.prepend" v-if="(currentPath !== '')">
<tr
class="file-list-cursor"
@click="clickRowGoBack">
<td class=" "><v-icon>mdi-folder-upload</v-icon></td>
<td class=" " colspan="8">..</td>
</tr>
</template>
<template #item="{ item }">
<tr
@contextmenu="showContextMenu($event, item)"
@click="clickRow(item)"
class="file-list-cursor"
:data-name="item.filename">
<td class=" ">
<v-icon v-if="item.isDirectory">mdi-folder</v-icon>
<v-icon v-if="!item.isDirectory">mdi-file</v-icon>
</td>
<td class=" ">{{ item.filename }}</td>
<td class="text-no-wrap text-right">{{ item.isDirectory ? '--' : formatFilesize(item.size) }}</td>
<td class="text-right">{{ formatDate(item.modified) }}</td>
</tr>
</template>
</v-data-table>
</v-card>
<v-menu v-model="contextMenu.shown" :position-x="contextMenu.x" :position-y="contextMenu.y" absolute offset-y>
<v-list>
<v-list-item @click="clickRow(contextMenu.item)" v-if="!contextMenu.item.isDirectory">
<v-icon class="mr-1">mdi-file-document-edit-outline</v-icon> Edit file
</v-list-item>
<v-list-item @click="downloadFile" v-if="!contextMenu.item.isDirectory">
<v-icon class="mr-1">mdi-cloud-download</v-icon> Download
</v-list-item>
<v-list-item @click="renameFile(contextMenu.item)" v-if="!contextMenu.item.isDirectory && currentPath !== '/config_examples'">
<v-icon class="mr-1">mdi-rename-box</v-icon> Rename
</v-list-item>
<v-list-item @click="removeFile" v-if="!contextMenu.item.isDirectory && currentPath !== '/config_examples'">
<v-icon class="mr-1">mdi-delete</v-icon> Delete
</v-list-item>
<v-list-item @click="deleteDirectoryAction" v-if="contextMenu.item.isDirectory && currentPath !== '' && currentPath !== '/config_examples'">
<v-icon class="mr-1">mdi-delete</v-icon> Delete
</v-list-item>
</v-list>
</v-menu>
<v-dialog v-model="editor.showLoader" hide-overlay persistent width="300" >
<v-card color="primary" dark >
<v-card-text>
Please stand by
<v-progress-linear indeterminate color="white" class="mb-0" ></v-progress-linear>
</v-card-text>
</v-card>
</v-dialog>
<v-dialog v-model="editor.show" fullscreen hide-overlay transition="dialog-bottom-transition" content-class="config-editor-overlay">
<v-card d-flex>
<v-toolbar dark color="primary">
<v-btn icon dark @click="editor.show = false">
<v-icon>mdi-close</v-icon>
</v-btn>
<v-toolbar-title>{{ editor.item.filename }}</v-toolbar-title>
<v-spacer></v-spacer>
<v-toolbar-items>
<v-btn dark text @click="saveFile" v-if="currentPath !== '/config_examples'">Save</v-btn>
</v-toolbar-items>
</v-toolbar>
<prism-editor class="my-editor" v-model="editor.sourcecode" :readonly="editor.readonly" :highlight="highlighter" line-numbers></prism-editor>
</v-card>
</v-dialog>
<v-dialog v-model="dialogRenameFile.show" max-width="400">
<v-card>
<v-card-title class="headline">Rename File</v-card-title>
<v-card-text>
<v-text-field label="Name" required v-model="dialogRenameFile.newName"></v-text-field>
</v-card-text>
<v-card-actions>
<v-spacer></v-spacer>
<v-btn color="" text @click="dialogRenameFile.show = false">Cancel</v-btn>
<v-btn color="primary" text @click="renameFileAction">rename</v-btn>
</v-card-actions>
</v-card>
</v-dialog>
<v-dialog v-model="dialogCreateFile.show" max-width="400">
<v-card>
<v-card-title class="headline">Create File</v-card-title>
<v-card-text>
<v-text-field label="Name" required v-model="dialogCreateFile.name"></v-text-field>
</v-card-text>
<v-card-actions>
<v-spacer></v-spacer>
<v-btn color="" text @click="dialogCreateFile.show = false">Cancel</v-btn>
<v-btn color="primary" text @click="createFileAction">create</v-btn>
</v-card-actions>
</v-card>
</v-dialog>
<v-dialog v-model="dialogCreateFolder.show" max-width="400">
<v-card>
<v-card-title class="headline">Create Folder</v-card-title>
<v-card-text>
<v-text-field label="Name" required v-model="dialogCreateFolder.name"></v-text-field>
</v-card-text>
<v-card-actions>
<v-spacer></v-spacer>
<v-btn color="" text @click="dialogCreateFolder.show = false">Cancel</v-btn>
<v-btn color="primary" text @click="createFolderAction">create</v-btn>
</v-card-actions>
</v-card>
</v-dialog>
</div>
</template>
<script>
import { mapState } from 'vuex'
import {findDirectory} from "@/plugins/helpers";
import { PrismEditor } from 'vue-prism-editor';
import 'vue-prism-editor/dist/prismeditor.min.css'; // import the styles somewhere
// import highlighting library (you can use any library you want just return html string)
import { highlight, languages } from 'prismjs/components/prism-core';
import 'prismjs/components/prism-editorconfig';
import 'prismjs/components/prism-ini';
import 'prismjs/themes/prism-okaidia.css';
import axios from "axios"; // import syntax highlighting styles
export default {
components: {
PrismEditor,
},
data: function() {
return {
sortBy: 'filename',
sortDesc: false,
selected: [],
headers: [
{ text: '', value: '', },
{ text: 'Name', value: 'filename', },
{ text: 'Filesize', value: 'size', align: 'right', },
{ text: 'Last modified', value: 'modified', align: 'right', },
],
options: {
},
currentPage: 1,
files: [],
currentPath: '/config',
editor: {
show: false,
showLoader: false,
readonly: false,
item: {
filename: "",
},
sourcecode: ''
},
contextMenu: {
shown: false,
isDirectory: false,
touchTimer: undefined,
x: 0,
y: 0,
item: {}
},
dialogRenameFile: {
show: false,
newName: "",
item: {}
},
dialogCreateFile: {
show: false,
name: "",
},
dialogCreateFolder: {
show: false,
name: "",
},
}
},
computed: {
...mapState({
filetree: state => state.files.filetree,
hostname: state => state.socket.hostname,
port: state => state.socket.port,
loadings: state => state.socket.loadings,
}),
countPerPage: {
get: function() {
return this.$store.state.gui.settings.configfiles.countPerPage
},
set: function(newVal) {
return this.$store.dispatch("gui/setSettings", { settings: { configfiles: { countPerPage: newVal } } });
}
},
},
created() {
this.loadPath();
},
methods: {
highlighter(code) {
return highlight(code, languages.ini); //returns html
},
refreshFileList: function() {
if (this.currentPath === "") {
this.$socket.sendObj('server.files.get_directory', { path: 'config' }, 'files/getDirectory');
this.$socket.sendObj('server.files.get_directory', { path: 'config_examples' }, 'files/getDirectory');
} else this.$socket.sendObj('server.files.get_directory', { path: this.currentPath.substring(1) }, 'files/getDirectory');
},
formatDate(date) {
let tmp2 = new Date(date);
return tmp2.toLocaleString().replace(',', '');
},
formatFilesize(fileSizeInBytes) {
let i = -1;
let byteUnits = [' kB', ' MB', ' GB', ' TB', 'PB', 'EB', 'ZB', 'YB'];
do {
fileSizeInBytes = fileSizeInBytes / 1024;
i++;
} while (fileSizeInBytes > 1024);
return Math.max(fileSizeInBytes, 0.1).toFixed(1) + byteUnits[i];
},
sortFiles(items, sortBy, sortDesc) {
sortBy = sortBy.length ? sortBy[0] : 'filename';
sortDesc = sortDesc[0];
if (items !== undefined) {
// Sort by index
items.sort(function(a, b) {
if (a[sortBy] === b[sortBy]) {
return 0;
}
if (a[sortBy] === null || a[sortBy] === undefined) {
return -1;
}
if (b[sortBy] === null || b[sortBy] === undefined) {
return 1;
}
if (a[sortBy].constructor === String && b[sortBy].constructor === String) {
return a[sortBy].localeCompare(b[sortBy], undefined, { sensivity: 'base' });
}
if (a[sortBy] instanceof Array && b[sortBy] instanceof Array) {
const reducedA = a[sortBy].length ? a.filament.reduce((a, b) => a + b) : 0;
const reducedB = b[sortBy].length ? b.filament.reduce((a, b) => a + b) : 0;
return reducedA - reducedB;
}
return a[sortBy] - b[sortBy];
});
// Deal with descending order
if (sortDesc) items.reverse();
// Then make sure directories come first
items.sort((a, b) => (a.isDirectory === b.isDirectory) ? 0 : (a.isDirectory ? -1 : 1));
}
return items;
},
loadPath: function() {
let dirArray = this.currentPath.substring(1).split("/");
this.files = findDirectory(this.filetree, dirArray);
if (dirArray.length === 1 && this.currentPath === "") {
this.files = this.files.filter(element => element.filename !== "gcodes");
}
},
clickRow: function(item) {
if (!item.isDirectory) {
this.editor.showLoader = true;
this.editor.sourcecode = "";
this.editor.item = item;
let url = '//'+this.hostname+':'+this.port+'/server/files'+this.currentPath+'/'+item.filename+'?time='+Date.now();
fetch(url, { cache: "no-cache" }).then(res => res.text()).then(file => {
this.editor.sourcecode = file;
this.editor.show = true;
this.editor.showLoader = false;
this.editor.readonly = false;
if (this.currentPath === '/config_examples') this.editor.readonly = true;
});
} else {
this.currentPath += "/"+item.filename;
this.currentPage = 1;
}
},
clickRowGoBack: function() {
this.currentPath = this.currentPath.substr(0, this.currentPath.lastIndexOf("/"));
},
saveFile: function() {
let file = new File([this.editor.sourcecode], this.editor.item.filename);
let formData = new FormData();
formData.append('file', file);
formData.append('root', 'config');
if(this.currentPath.length > 7) formData.append('path', this.currentPath.substring(8));
axios.post('//' + this.hostname + ':' + this.port + '/server/files/upload',
formData, {
headers: { 'Content-Type': 'multipart/form-data' }
}
).then(() => {
this.$toast.success("File '"+this.editor.item.filename+"' successfully saved.");
this.editor.show = false;
this.editor.sourcecode = "";
}).catch(() => {
this.$toast.error("Error save "+this.editor.item.filename);
});
},
showContextMenu (e, item) {
e.preventDefault();
this.contextMenu.shown = true;
this.contextMenu.x = e.clientX;
this.contextMenu.y = e.clientY;
this.contextMenu.item = item;
this.$nextTick(() => {
this.contextMenu.shown = true
});
},
downloadFile() {
let filename = (this.currentPath+"/"+this.contextMenu.item.filename);
let link = document.createElement("a");
link.download = name;
link.href = '//' + this.hostname + ':' + this.port + '/server/files/' + filename;
document.body.appendChild(link);
link.click();
document.body.removeChild(link);
},
createFolder() {
this.dialogCreateFolder.name = "";
this.dialogCreateFolder.show = true;
},
createFolderAction() {
this.dialogCreateFolder.show = false;
this.$socket.sendObj('server.files.post_directory', {
path: this.currentPath.substring(1)+"/"+this.dialogCreateFolder.name
}, 'files/getCreateDir');
},
createFile() {
this.dialogCreateFile.name = "";
this.dialogCreateFile.show = true;
},
createFileAction() {
let file = new File([""], this.dialogCreateFile.name);
let formData = new FormData();
formData.append('file', file);
formData.append('root', 'config');
if(this.currentPath.length > 7) formData.append('path', this.currentPath.substring(8));
axios.post('//' + this.hostname + ':' + this.port + '/server/files/upload',
formData, {
headers: { 'Content-Type': 'multipart/form-data' }
}
).then(() => {
this.dialogCreateFile.show = false;
this.dialogCreateFile.name = "";
}).catch(() => {
window.console.error("Error save "+this.editor.item.filename);
});
},
renameFile(item) {
this.dialogRenameFile.item = item;
this.dialogRenameFile.newName = item.filename;
this.dialogRenameFile.show = true;
},
renameFileAction() {
this.dialogRenameFile.show = false;
this.$socket.sendObj('server.files.move', {
source: this.currentPath+"/"+this.dialogRenameFile.item.filename,
dest: this.currentPath+"/"+this.dialogRenameFile.newName
}, 'files/getMove');
},
removeFile() {
let filename = (this.currentPath+"/"+this.contextMenu.item.filename);
axios.delete(
'//'+ this.hostname + ':' + this.port +'/server/files/'+filename
).then((result) => {
this.$toast.success(result.data.result+" successfully deleted.");
}).catch(() => {
this.$toast.error("Error! Cannot delete file.");
});
},
deleteDirectoryAction: function() {
this.$socket.sendObj('server.files.delete_directory', { path: this.currentPath+"/"+this.contextMenu.item.filename }, 'files/getDeleteDir');
},
uploadFileButton: function() {
this.$refs.fileUpload.click()
},
uploadFile: function() {
if (this.$refs.fileUpload.files.length) {
this.doUploadFile(this.$refs.fileUpload.files[0]).finally(() => {
this.$refs.fileUpload.value = ''
})
}
},
doUploadFile: function(file) {
let toast = this.$toast;
let formData = new FormData();
let filename = file.name.replace(" ", "_");
formData.append('root', 'config');
formData.append('file', file, (this.currentPath+"/"+filename).substring(7));
this.$store.commit('socket/addLoading', { name: 'configFileUpload' });
return axios.post('//' + this.hostname + ':' + this.port + '/server/files/upload',
formData, { headers: { 'Content-Type': 'multipart/form-data' } }
).then((result) => {
this.$store.commit('socket/removeLoading', { name: 'configFileUpload' });
toast.success("Upload of "+result.data.result+" successful!");
}).catch(() => {
this.$store.commit('socket/removeLoading', { name: 'configFileUpload' });
toast.error("Cannot upload the file!");
});
},
},
watch: {
config: {
deep: true,
handler() {
this.loadPath();
}
},
config_examples: {
deep: true,
handler() {
this.loadPath();
}
},
currentPath: {
handler() {
this.loadPath();
}
}
}
}
</script>
@@ -1,27 +1,30 @@
<style>
.settings_dashboard_switch .v-messages {
display: none;
}
</style>
<template>
<v-card>
<v-list-item>
<v-list-item-avatar color="grey"><v-icon dark>mdi-view-dashboard</v-icon></v-list-item-avatar>
<v-list-item-content>
<v-list-item-title class="headline">Dashboard</v-list-item-title>
</v-list-item-content>
</v-list-item>
<v-divider class="my-2"></v-divider>
<v-card-text class="px-0 pb-0 pt-3 content">
<v-toolbar flat dense >
<v-toolbar-title>
<span class="subheading"><v-icon left>mdi-view-dashboard</v-icon>Dashbaord</span>
</v-toolbar-title>
</v-toolbar>
<v-card-text class="py-3">
<v-row>
<v-col class="px-10 py-0">
<v-switch v-model="boolShowWebcamOnDashboard" label="Webcam"></v-switch>
<v-col class="py-0">
<v-switch v-model="boolShowWebcamOnDashboard" label="Webcam" class="settings_dashboard_switch mt-0"></v-switch>
</v-col>
</v-row>
<v-row>
<v-col class="px-10 py-0">
<v-switch v-model="boolShowTempchartOnDashboard" label="Tempchart"></v-switch>
<v-col class="py-0">
<v-switch v-model="boolShowTempchartOnDashboard" label="Tempchart" class="settings_dashboard_switch mt-0"></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 class="py-0">
<v-switch v-model="boolShowConsoleOnDashboard" label="Console" class="settings_dashboard_switch mt-0"></v-switch>
</v-col>
</v-row>
</v-card-text>
@@ -44,7 +47,7 @@
return this.$store.state.gui.dashboard.boolWebcam;
},
set(status) {
return this.$store.dispatch('setSettings', { gui: { dashboard: { boolWebcam: status } } });
return this.$store.dispatch('gui/setSettings', { dashboard: { boolWebcam: status } });
}
},
boolShowTempchartOnDashboard: {
@@ -52,7 +55,7 @@
return this.$store.state.gui.dashboard.boolTempchart;
},
set(status) {
return this.$store.dispatch('setSettings', { gui: { dashboard: { boolTempchart: status } } });
return this.$store.dispatch('gui/setSettings', { dashboard: { boolTempchart: status } });
}
},
boolShowConsoleOnDashboard: {
@@ -60,7 +63,7 @@
return this.$store.state.gui.dashboard.boolConsole;
},
set(status) {
return this.$store.dispatch('setSettings', { gui: { dashboard: { boolConsole: status } } });
return this.$store.dispatch('gui/setSettings', { dashboard: { boolConsole: status } });
}
},
},
+15 -18
View File
@@ -1,31 +1,28 @@
<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">
<v-toolbar flat dense >
<v-toolbar-title>
<span class="subheading"><v-icon left>mdi-arrow-expand-vertical</v-icon>Endstops</span>
</v-toolbar-title>
</v-toolbar>
<v-card-text class="pb-0">
<div v-for="(status, index) of sortEndstops" v-bind:key="index">
<v-row class="px-6" >
<v-col sm-12>
<v-row>
<v-col class="py-2">
<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>
<v-row v-if="(Object.keys(endstops).length === 0 && endstops.constructor === Object)" >
<v-col class="py-0">
<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-btn icon @click="syncEndstops" :loading="loadings.includes('queryEndstops')">
<v-icon>mdi-sync</v-icon>
</v-btn>
</v-card-actions>
@@ -41,12 +38,12 @@
},
data: function() {
return {
sortEndstops: {}
sortEndstops: {},
}
},
computed: {
...mapState({
loading: state => state.socket.loadingEndstopStatus,
loadings: state => state.socket.loadings,
endstops: state => state.printer.endstops,
})
},
@@ -55,8 +52,8 @@
},
methods: {
syncEndstops() {
this.$store.commit('setLoadingEndstopStatus', true);
this.$socket.sendObj('get_printer_query_endstops_status', { }, "responseEndstopStatus");
this.$store.commit('socket/addLoading', { name: 'queryEndstops' });
this.$socket.sendObj('printer.query_endstops.status', { }, "printer/getEndstopStatus");
},
getEndstops() {
this.sortEndstops = {};
@@ -6,16 +6,14 @@
<template>
<v-card>
<v-list-item>
<v-list-item-avatar color="grey"><v-icon dark>mdi-cog</v-icon></v-list-item-avatar>
<v-list-item-content>
<v-list-item-title class="headline">General</v-list-item-title>
</v-list-item-content>
</v-list-item>
<v-divider class="my-2"></v-divider>
<v-card-text class="px-0 pb-0 pt-3 content">
<v-toolbar flat dense >
<v-toolbar-title>
<span class="subheading"><v-icon left>mdi-cog</v-icon>General</span>
</v-toolbar-title>
</v-toolbar>
<v-card-text class="py-0">
<v-row>
<v-col class="px-10 py-0">
<v-col class="pt-2 pb-0">
<v-text-field
v-model="printerName"
label="Printer Name"
@@ -42,7 +40,7 @@
return this.$store.state.gui.general.printername;
},
set(newName) {
return this.$store.dispatch('setSettings', { gui: { general: { printername: newName } } });
return this.$store.dispatch('gui/setSettings', { general: { printername: newName } });
}
},
},
+26 -27
View File
@@ -1,48 +1,47 @@
<template>
<v-card>
<v-list-item>
<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">Machine Limits</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">
<v-row class="px-6" >
<v-col sm-12>
<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>
<v-toolbar flat dense >
<v-toolbar-title>
<span class="subheading"><v-icon left>mdi-speedometer</v-icon>Machine Limits</span>
</v-toolbar-title>
</v-toolbar>
<tool-slider label="Velocity" unit="mm/s" :target="current_velocity" :max="max_velocity" command="SET_VELOCITY_LIMIT" attribute-name="VELOCITY=" ></tool-slider>
<v-divider></v-divider>
<tool-slider label="Acceleration" unit="mm/s²" :target="current_accel" :max="max_accel" command="SET_VELOCITY_LIMIT" attribute-name="ACCEL=" ></tool-slider>
<v-divider></v-divider>
<tool-slider label="Deceleration" unit="mm/s²" :target="current_accel_to_decel" :max="max_accel_to_decel" command="SET_VELOCITY_LIMIT" attribute-name="ACCEL_TO_DECEL=" ></tool-slider>
<v-divider></v-divider>
<tool-slider label="Square corner velocity" unit="mm/s" :target="current_square_corner_velocity" :max="max_square_corner_velocity" command="SET_VELOCITY_LIMIT" attribute-name="SQUARE_CORNER_VELOCITY=" ></tool-slider>
</v-card>
</template>
<script>
import { mapState } from 'vuex'
import toolSlider from '../../../inputs/ToolSlider'
import ToolSlider from '../../../inputs/ToolSlider'
export default {
components: {
toolSlider
ToolSlider
},
data: function() {
return {
}
},
computed: {
...mapState({
max_velocity: state => state.printer.toolhead.max_velocity,
max_accel: state => state.printer.toolhead.max_accel,
max_accel_to_decel: state => state.printer.toolhead.max_accel_to_decel,
square_corner_velocity: state => state.printer.toolhead.square_corner_velocity,
})
current_velocity: state => state.printer.toolhead.max_velocity,
current_accel: state => state.printer.toolhead.max_accel,
current_accel_to_decel: state => state.printer.toolhead.max_accel_to_decel,
current_square_corner_velocity: state => state.printer.toolhead.square_corner_velocity,
config: state => state.printer.configfile.config,
max_velocity: state => parseInt(state.printer.configfile.config.printer.max_velocity) || 0,
max_accel: state => parseInt(state.printer.configfile.config.printer.max_accel) || 0,
max_accel_to_decel: state => parseInt(state.printer.configfile.config.printer.max_accel_to_decel) || parseInt(state.printer.configfile.config.printer.max_accel) / 2,
max_square_corner_velocity: state => parseInt(state.printer.configfile.config.printer.square_corner_velocity) || 5,
}),
},
methods: {
watch: {
}
}
</script>
</script>
@@ -0,0 +1,41 @@
<template>
<v-card>
<v-toolbar flat dense >
<v-toolbar-title>
<span class="subheading"><v-icon left>mdi-file-document-edit</v-icon>Logfiles</span>
</v-toolbar-title>
</v-toolbar>
<v-card-text :class="'text-center text-lg-left py-0'">
<v-row>
<v-col :class="'col-12' +(klippy_state !== 'ready' ? 'col-md-6' : 'col-md-12')+ ''">
<v-btn :href="'//'+hostname+':'+port+'/server/files/klippy.log'" block color="primary"><v-icon class="mr-2">mdi-download</v-icon>Klipper</v-btn>
</v-col>
<v-col :class="'col-12 pt-0 ' +(klippy_state !== 'ready' ? 'col-md-6 mt-md-3 ' : 'col-md-12')+ ''">
<v-btn :href="'//'+hostname+':'+port+'/server/files/moonraker.log'" block color="primary"><v-icon class="mr-2">mdi-download</v-icon>Moonraker</v-btn>
</v-col>
</v-row>
</v-card-text>
</v-card>
</template>
<script>
import { mapState } from 'vuex'
export default {
components: {
},
data: function() {
return {
}
},
computed: {
...mapState({
hostname: state => state.socket.hostname,
port: state => state.socket.port,
klippy_state: state => state.server.klippy_state,
}),
},
}
</script>
+9 -12
View File
@@ -1,17 +1,15 @@
<template>
<v-card>
<v-list-item>
<v-list-item-avatar color="grey"><v-icon dark>mdi-code-tags</v-icon></v-list-item-avatar>
<v-list-item-content>
<v-list-item-title class="headline">Macros</v-list-item-title>
</v-list-item-content>
</v-list-item>
<v-divider class="my-2"></v-divider>
<v-card-text class="px-0 pb-3 pt-3 content">
<div v-for="(macro, index) in getAllMacros" v-bind:key="index">
<v-toolbar flat dense >
<v-toolbar-title>
<span class="subheading"><v-icon left>mdi-code-tags</v-icon>Macros</span>
</v-toolbar-title>
</v-toolbar>
<v-card-text class="py-3">
<div v-for="(macro, index) in this['printer/getAllMacros']" v-bind:key="index">
<v-row>
<v-col class="px-10 py-0">
<v-col class="py-0">
<settings-macro-switch :name="macro.name"></settings-macro-switch>
</v-col>
</v-row>
@@ -27,7 +25,6 @@
export default {
components: {
SettingsMacroSwitch
},
data: function() {
return {
@@ -39,7 +36,7 @@
hiddenMacros: state => state.gui.dashboard.hiddenMacros,
}),
...mapGetters([
'getAllMacros',
'printer/getAllMacros',
])
},
methods: {
@@ -1,6 +1,6 @@
<template>
<div>
<div v-for="(runout, index) of getFilamentSwitchSensors" v-bind:key="index">
<div v-for="(runout, index) of this['printer/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>
@@ -10,7 +10,7 @@
</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>
<settings-runout-switch :name="runout.name" :enabled="runout.enabled" :filament_detected="runout.filament_detected"></settings-runout-switch>
</v-card-text>
</v-card>
</div>
@@ -32,7 +32,7 @@
},
computed: {
...mapGetters([
'getFilamentSwitchSensors'
'printer/getFilamentSwitchSensors'
])
},
methods: {
@@ -1,66 +0,0 @@
<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=" text-center text-lg-left">
<div><v-btn :href="'http://'+hostname+':'+port+'/server/files/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/files/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>FW <span class="d-none d-sm-block">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>Host <span class="d-none d-sm-block">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>Host <span class="d-none d-sm-block">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>
+67 -20
View File
@@ -1,30 +1,45 @@
<style>
.webcamImage {
width: 100%;
}
.content { overflow: hidden; }
</style>
<template>
<v-card>
<v-list-item>
<v-list-item-avatar color="grey"><v-icon dark>mdi-webcam</v-icon></v-list-item-avatar>
<v-list-item-content>
<v-list-item-title class="headline">Webcam</v-list-item-title>
</v-list-item-content>
</v-list-item>
<v-divider class="my-2"></v-divider>
<v-card-text class="px-0 pb-0 pt-3 content">
<v-toolbar flat dense >
<v-toolbar-title>
<span class="subheading"><v-icon left>mdi-webcam</v-icon>Webcam</span>
</v-toolbar-title>
</v-toolbar>
<v-card-text>
<v-row>
<v-col class="px-10 py-0">
<v-col class="py-0">
<v-text-field
v-model="webcamUrl"
hide-details
label="Webcam URL"
></v-text-field>
</v-col>
</v-row>
<v-row v-if="rotationEnabled">
<v-col class="py-0" col-auto>
<v-switch v-model="rotate" hide-details label="Rotate"></v-switch>
</v-col>
<v-col>
<v-select :items="[{ text: '90 degrees', value: 90 }, { text: '270 degrees', value: 270 }]" v-model="rotateDegrees" hide-details></v-select>
</v-col>
</v-row>
<v-row>
<v-col class="px-10 py-0">
<v-switch v-model="boolNavi" label="Show in Navigation"></v-switch>
<v-col class="py-0">
<v-switch v-model="flipX" hide-details label="Flip webcam horizontally"></v-switch>
</v-col>
</v-row>
<v-row>
<v-col class="py-0">
<v-switch v-model="flipY" hide-details label="Flip webcam vertically"></v-switch>
</v-col>
</v-row>
<v-row>
<v-col class="py-0">
<v-switch v-model="boolNavi" hide-details label="Show in navigation"></v-switch>
</v-col>
</v-row>
</v-card-text>
@@ -38,24 +53,56 @@
},
data: function() {
return {
rotationEnabled: false
}
},
computed: {
webcamUrl: {
get() {
return this.$store.state.webcam.url;
return this.$store.state.gui.webcam.url;
},
set(newWebcamUrl) {
return this.$store.dispatch('setSettings', { webcam: { url: newWebcamUrl } });
set(url) {
return this.$store.dispatch('gui/setSettings', { webcam: { url } });
}
},
flipX: {
get() {
return this.$store.state.gui.webcam.flipX;
},
set(flipX) {
return this.$store.dispatch('gui/setSettings', { webcam: { flipX } });
}
},
flipY: {
get() {
return this.$store.state.gui.webcam.flipY;
},
set(flipY) {
return this.$store.dispatch('gui/setSettings', { webcam: { flipY } });
}
},
rotate: {
get() {
return this.$store.state.gui.webcam.rotate;
},
set(rotate) {
return this.$store.dispatch('gui/setSettings', { webcam: { rotate } });
}
},
rotateDegrees: {
get() {
return this.$store.state.gui.webcam.rotateDegrees;
},
set(rotateDegrees) {
return this.$store.dispatch('gui/setSettings', { webcam: { rotateDegrees } });
}
},
boolNavi: {
get() {
return this.$store.state.gui.webcam.bool;
},
set(bool) {
return this.$store.dispatch('setSettings', { gui: { webcam: { bool: bool } } });
set(showNav) {
return this.$store.dispatch('gui/setSettings', { webcam: { bool: showNav } });
}
},
},
+4 -2
View File
@@ -6,8 +6,9 @@ import DashboardPanel from "./DashboardPanel";
import MacrosPanel from "./MacrosPanel";
import EndstopPanel from "./EndstopPanel";
import LimitsPanel from "./LimitsPanel";
import ConfigFilesPanel from "./ConfigFilesPanel";
import RunoutPanel from "./RunoutPanel";
import SystemPanel from "./SystemPanel";
import LogfilesPanel from "./LogfilesPanel";
Vue.component('settings-general-panel', GeneralPanel);
Vue.component('settings-webcam-panel', WebcamPanel);
@@ -16,7 +17,8 @@ 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);
Vue.component('settings-logfiles-panel', LogfilesPanel);
Vue.component('settings-config-files-panel', ConfigFilesPanel);
export default {
+153 -130
View File
@@ -2,163 +2,186 @@
.vertical_align_center {
margin: auto 0;
}
.statusPanel-image-preview {
width: 100%;
}
.v-btn.minwidth-0 {
min-width: auto !important;
}
</style>
<template>
<v-card>
<v-list-item>
<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_is_paused ? "Pause" : printer_state }}{{ printer_is_printing || printer_is_paused ? " - "+current_file : "" }}</v-list-item-subtitle>
</v-list-item-content>
<v-btn class="orange" v-if="printer_state === 'Printing' && printer_is_printing && !printer_is_paused" @click="btnPauseJob" :loading="btnStatusPause">pause job</v-btn>
<v-btn class="red" v-if="(is_printing && printer_is_paused)" :loading="btnStatusCancel" @click="btnCancelJob">cancel job</v-btn>
<v-btn class="orange ml-2" v-if="(is_printing && printer_is_paused)" :loading="btnStatusResume" @click="btnResumeJob">resume job</v-btn>
</v-list-item>
<v-divider class="my-2" ></v-divider>
<v-toolbar flat dense>
<v-toolbar-title>
<span class="subheading align-baseline">
<v-icon left>mdi-information</v-icon>{{ (printer_state !== "" ? printer_state.charAt(0).toUpperCase() + printer_state.slice(1) : "Unknown") }}
</span>
</v-toolbar-title>
<v-spacer></v-spacer>
<v-item-group class="v-btn-toggle" name="controllers">
<v-btn small class="px-2 minwidth-0" color="orange" v-if="printer_state === 'printing'" @click="btnPauseJob" :loading="loadings.includes('statusPrintPause')" title="Pause print"><v-icon small>mdi-pause</v-icon></v-btn>
<v-btn small class="px-2 minwidth-0" color="red" v-if="(printer_state === 'paused')" :loading="loadings.includes('statusPrintCancel')" @click="btnCancelJob" title="Cancel print"><v-icon small>mdi-stop</v-icon></v-btn>
<v-btn small class="px-2 minwidth-0" color="orange" v-if="(printer_state === 'paused')" :loading="loadings.includes('statusPrintResume')" @click="btnResumeJob" title="Resume job"><v-icon small>mdi-play</v-icon></v-btn>
<v-btn small class="px-2 minwidth-0" color="orange" v-if="(printer_state === 'error')" :loading="loadings.includes('statusPrintClear')" @click="btnClearJob" title="Clear job"><v-icon small>mdi-close</v-icon></v-btn>
<v-btn small class="px-2 minwidth-0" color="primary" v-if="(printer_state === 'complete')" :loading="loadings.includes('statusPrintReprint')" @click="btnReprintJob" title="Reprint job"><v-icon small>mdi-autorenew</v-icon></v-btn>
</v-item-group>
</v-toolbar>
<v-row v-if="current_filename" class="mx-0">
<v-col class="col-auto py-3 pr-0">
<v-progress-circular
:rotate="-90"
:size="50"
:width="7"
:value="printPercent * 100"
color="red"
>
</v-progress-circular>
</v-col>
<v-col class="col py-3" style="width: 100px;">
<h3 class="font-weight-regular">{{ Math.round(printPercent * 100)+"%" }}{{ display_message ? " - "+display_message : "" }}</h3>
<span class="subtitle-2 text-truncate d-block px-0 text--disabled"><v-icon small class="mr-1">mdi-file-outline</v-icon>{{ current_filename }}</span>
</v-col>
</v-row>
<v-divider class="mt-0 mb-0" ></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 grow class="equal-width text-left vertical_align_center">
<v-flex tag="span">{{ display_message }}</v-flex>
</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
</v-flex>
<v-flex grow class="equal-width">
<v-layout column>
<v-flex tag="strong">X</v-flex>
<v-flex tag="span">{{ position.length ? position[0].toFixed(2) : "--" }}</v-flex>
</v-layout>
</v-flex>
<v-flex grow class="equal-width">
<v-layout column>
<v-flex tag="strong">Y</v-flex>
<v-flex tag="span">{{ position.length ? position[1].toFixed(2) : "--" }}</v-flex>
</v-layout>
</v-flex>
<v-flex grow class="equal-width">
<v-layout column>
<v-flex tag="strong">Z</v-flex>
<v-flex tag="span">{{ position.length ? position[2].toFixed(2) : "--" }}</v-flex>
</v-layout>
</v-flex>
</v-layout>
<v-divider class="my-2" v-if="is_printing"></v-divider>
<v-layout wrap class=" text-center" v-if="is_printing">
<v-flex col tag="strong" class="category-header">
Printstatus
</v-flex>
<v-flex grow class="equal-width">
<v-layout column>
<v-flex tag="strong">Filament used</v-flex>
<v-flex tag="span">{{ filament_used > 1000 ? (filament_used / 1000).toFixed(2)+"m" : filament_used.toFixed(2)+"mm" }}</v-flex>
</v-layout>
</v-flex>
<v-flex grow class="equal-width">
<v-layout column>
<v-flex tag="strong">Print Time</v-flex>
<v-flex tag="span">{{ formatTime(print_time) }}</v-flex>
</v-layout>
</v-flex>
<v-flex grow class="equal-width">
<v-layout column>
<v-flex tag="strong">Total Time</v-flex>
<v-flex tag="span">{{ formatTime(print_time_total) }}</v-flex>
</v-layout>
</v-flex>
</v-layout>
<v-divider class="my-2" v-if="is_printing"></v-divider>
<v-layout wrap class=" text-center" v-if="is_printing">
<v-flex col tag="strong" class="category-header py-0">
Estimations<br />based on
</v-flex>
<v-flex grow class="equal-width">
<v-layout column>
<v-flex tag="strong">File</v-flex>
<v-flex tag="span">{{ print_time > 0 && printProgress > 0 ? formatTime(print_time / printProgress - print_time) : '--' }}</v-flex>
</v-layout>
</v-flex>
<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_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) : '--'}}</v-flex>
</v-layout>
</v-flex>
</v-layout>
<v-layout wrap class=" text-center" v-if="is_printing">
<v-layout column class="mt-2" >
<v-progress-linear
:value="printProgress * 100"
height="25"
>
<template>
<strong>{{ Math.ceil(printProgress * 100) }}%</strong>
</template>
</v-progress-linear>
</v-layout>
</v-layout>
<v-row>
<v-col
class="col-12 col-sm-4 pl-sm-3 pt-0 pr-sm-0 pb-0"
v-if="
['printing', 'paused', 'complete'].includes(printer_state) &&
current_file &&
current_file.thumbnails &&
current_file.thumbnails.length &&
current_file.thumbnails.find(element => element.width === 400)
">
<img
class="statusPanel-image-preview"
:src="'data:image/gif;base64,'+(current_file.thumbnails ? current_file.thumbnails.find(element => element.width === 400).data : '')"
/>
</v-col>
<v-col
:class="
(['printing', 'paused', 'complete'].includes(printer_state) &&
current_file &&
current_file.thumbnails &&
current_file.thumbnails.length &&
current_file.thumbnails.find(element => element.width === 400 || element.width === 300)) ? 'col-12 py-0 col-sm-8 pl-sm-0' : 'col-12 py-0'
">
<v-row class="text-center pt-2" align="center">
<v-col class="py-0 flex-grow-0 pl-8 pr-3">
<v-icon>mdi-axis-arrow</v-icon>
</v-col>
<v-col class="equal-width py-0">
<v-row><v-col class="px-0 py-0"><strong>X</strong></v-col></v-row>
<v-row><v-col class="px-0 py-0">{{ position.length ? position[0].toFixed(2) : "--" }}</v-col></v-row>
</v-col>
<v-col class="equal-width py-0">
<v-row><v-col class="px-0 py-0"><strong>Y</strong></v-col></v-row>
<v-row><v-col class="px-0 py-0">{{ position.length ? position[1].toFixed(2) : "--" }}</v-col></v-row>
</v-col>
<v-col class="equal-width py-0 pr-sm-6">
<v-row><v-col class="px-0 py-0"><strong>Z</strong></v-col></v-row>
<v-row><v-col class="px-0 py-0">{{ position.length ? position[2].toFixed(2) : "--" }}</v-col></v-row>
</v-col>
</v-row>
<v-divider class="my-2" v-if="['printing', 'paused', 'complete', 'error'].includes(printer_state)"></v-divider>
<v-row class="text-center" align="center" v-if="['printing', 'paused', 'complete', 'error'].includes(printer_state)">
<v-col class="py-0 flex-grow-0 pl-8 pr-3">
<v-icon>mdi-poll</v-icon>
</v-col>
<v-col class="equal-width py-0">
<v-row><v-col class="px-0 py-0"><strong>Filament</strong></v-col></v-row>
<v-row><v-col class="px-0 py-0">{{ filament_used > 1000 ? (filament_used / 1000).toFixed(2)+"m" : filament_used.toFixed(2)+"mm" }}</v-col></v-row>
</v-col>
<v-col class="equal-width py-0">
<v-row><v-col class="px-0 py-0"><strong>Print</strong></v-col></v-row>
<v-row><v-col class="px-0 py-0">{{ formatTime(print_time) }}</v-col></v-row>
</v-col>
<v-col class="equal-width py-0 pr-sm-6">
<v-row><v-col class="px-0 py-0"><strong>Total</strong></v-col></v-row>
<v-row><v-col class="px-0 py-0">{{ formatTime(print_time_total) }}</v-col></v-row>
</v-col>
</v-row>
<v-divider class="my-2" v-if="['printing', 'paused', 'error'].includes(printer_state)"></v-divider>
<v-row class="text-center" align="center" v-if="['printing', 'paused', 'error'].includes(printer_state)">
<v-col class="py-0 flex-grow-0 pl-8 pr-3">
<v-icon>mdi-clock-outline</v-icon>
</v-col>
<v-col class="equal-width py-0">
<v-row><v-col class="px-0 py-0"><strong>File</strong></v-col></v-row>
<v-row><v-col class="px-0 py-0">{{ print_time > 0 && printPercent > 0 ? formatTime(print_time / printPercent - print_time) : '--' }}</v-col></v-row>
</v-col>
<v-col class="equal-width py-0">
<v-row><v-col class="px-0 py-0"><strong>Filament</strong></v-col></v-row>
<v-row><v-col class="px-0 py-0">{{ (filament_used > 0 && 'filament_total' in current_file && current_file.filament_total > filament_used) ? formatTime(print_time / (filament_used / current_file.filament_total) - print_time) : '--' }}</v-col></v-row>
</v-col>
<v-col class="equal-width py-0 pr-sm-6">
<v-row><v-col class="px-0 py-0"><strong>Slicer</strong></v-col></v-row>
<v-row><v-col class="px-0 py-0">{{ 'estimated_time' in current_file && current_file.estimated_time > print_time ? formatTime(current_file.estimated_time - print_time) : '--'}}</v-col></v-row>
</v-col>
</v-row>
</v-col>
</v-row>
</v-card-text>
</v-card>
</template>
<script>
import { mapState, mapGetters } from 'vuex';
import { mapState } from 'vuex';
export default {
data: function() {
return {
}
},
computed: {
...mapState({
toolhead: state => state.printer.toolhead,
position: state => state.printer.toolhead.position,
btnStatusPause: state => state.socket.loadingPrintPause,
btnStatusResume: state => state.socket.loadingPrintResume,
btnStatusCancel: state => state.socket.loadingPrintCancel,
estimated_print_time: state => state.printer.toolhead.estimated_print_time,
printProgress: state => state.printer.virtual_sdcard.progress,
print_time: state => state.printer.virtual_sdcard.print_duration,
print_time_total: state => state.printer.virtual_sdcard.total_duration,
filament_used: state => state.printer.virtual_sdcard.filament_used,
file_position: state => state.printer.virtual_sdcard.file_position,
current_file: state => state.printer.virtual_sdcard.filename,
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,
current_file: state => state.printer.current_file,
print_time: state => state.printer.print_stats.print_duration,
print_time_total: state => state.printer.print_stats.total_duration,
filament_used: state => state.printer.print_stats.filament_used,
current_filename: state => state.printer.print_stats.filename,
printer_state: state => state.printer.print_stats.state,
display_message: state => state.printer.display_status.message,
loadings: state => state.socket.loadings,
}),
...mapGetters([
'current_file_size',
'current_file_metadata',
'current_file_estimated_time',
'current_file_filament_total',
'is_printing',
]),
printPercent: {
get() {
return this.$store.getters["printer/getPrintPercent"];
}
}
},
methods: {
btnPauseJob() {
this.$store.commit('setLoadingPrintPause', true);
this.$socket.sendObj('post_printer_print_pause', { }, 'setLoadingPrintPause');
this.$store.commit('socket/addLoading', { name: 'statusPrintPause' });
this.$socket.sendObj('printer.print.pause', { }, 'socket/removeLoading', { name: 'statusPrintPause' });
},
btnResumeJob() {
this.$store.commit('setLoadingPrintResume', true);
this.$socket.sendObj('post_printer_print_resume', { }, 'setLoadingPrintResume');
this.$store.commit('socket/addLoading', { name: 'statusPrintResume' });
this.$socket.sendObj('printer.print.resume', { }, 'socket/removeLoading', { name: 'statusPrintResume' });
},
btnCancelJob() {
this.$store.commit('setLoadingPrintCancel', true);
this.$socket.sendObj('post_printer_print_cancel', { }, 'setLoadingPrintCancel');
this.$store.commit('socket/addLoading', { name: 'statusPrintCancel' });
this.$socket.sendObj('printer.print.cancel', { }, 'socket/removeLoading', { name: 'statusPrintCancel' });
},
btnClearJob() {
this.$store.commit('socket/addLoading', {name: 'statusPrintClear'});
this.$socket.sendObj('printer.gcode.script', {script: 'SDCARD_RESET_FILE'}, 'socket/removeLoading', { name: 'statusPrintClear' });
},
btnReprintJob() {
this.$store.commit('socket/addLoading', {name: 'statusPrintReprint'});
this.$socket.sendObj('printer.print.start', { filename: this.current_filename }, 'socket/removeLoading', { name: 'statusPrintReprint' });
},
formatTime(seconds) {
let h = Math.floor(seconds / 3600);
@@ -168,7 +191,7 @@
return h+':'+m+':'+s;
},
},
}
}
</script>
@@ -197,4 +220,4 @@
.probe-span:not(:last-child) {
margin-right: 8px;
}
</style>
</style>
+62 -61
View File
@@ -6,71 +6,71 @@
#line-chart {
height: 250px;
}
.colHeaterIcons {
width: 68px;
}
</style>
<template>
<v-card>
<v-list-item>
<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">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>
<v-divider class="my-2"></v-divider>
<v-card-text class="px-0 pt-0 pb-2 content">
<v-row class="pl-3 pr-3">
<v-col class="text-center py-0"><b>Heater</b></v-col>
<v-col class="text-center py-0"><b>Current</b></v-col>
<v-col class="text-center py-0"><b>Target</b></v-col>
<v-toolbar flat dense>
<v-toolbar-title>
<span class="subheading"><v-icon left>mdi-thermometer-lines</v-icon>Temperatures</span>
</v-toolbar-title>
</v-toolbar>
<v-card-text class="px-0 py-2 content">
<v-row align="center">
<v-col class="py-0 font-weight-bold" style="padding-left: 68px;">Name</v-col>
<v-col class="py-0 text-center font-weight-bold d-none d-sm-block">Status</v-col>
<v-col class="py-0 text-center font-weight-bold">Current</v-col>
<v-col class="text-center py-0 pr-8 font-weight-bold">Target</v-col>
</v-row>
<div v-for="(heater, index) in heaters" v-bind:key="index" >
<v-divider class="my-2"></v-divider>
<v-row class="pl-3 pr-3 heater-row">
<v-col class="text-center py-0">
<b>{{ heater.name }}</b><br />
<small>{{ heater.target > 0 ? "active" : "off" }}</small>
<v-row align="center">
<v-col class="flex-grow-0 py-0 pl-8 pr-0 colHeaterIcons">
<v-icon :color="heater.color">mdi-{{ heater.icon }}</v-icon>
</v-col>
<v-col class="text-center py-0 vertical_align_center"><span>{{ heater.temperature.toFixed(1) }}°C</span></v-col>
<v-col class="text-center py-0 vertical_align_center">
<v-col class="py-0 font-weight-bold">{{ heater.name }}</v-col>
<v-col class="py-0 text-center d-none d-sm-block"><small>{{ heater.target > 0 ? "active" : "off" }}</small></v-col>
<v-col class="py-0 text-center">{{ heater.temperature ? heater.temperature.toFixed(1) : 0 }}°C</v-col>
<v-col class="text-center py-0 pr-8 pr-0 vertical_align_center">
<toolInput :name="heater.name" :target="heater.target" :min_temp="heater.min_temp" :max_temp="heater.max_temp" command="SET_HEATER_TEMPERATURE" attribute-name="HEATER" ></toolInput>
</v-col>
</v-row>
</div>
<div v-for="(fan, index) in temperature_fans" v-bind:key="index+99" >
<div v-for="(fan, index) in this['printer/getTemperatureFans']" v-bind:key="index+99" >
<v-divider class="my-2"></v-divider>
<v-row class="pl-3 pr-3 heater-row">
<v-col class="text-center py-0">
<b>{{ fan.name }}</b><br />
<small>{{ fan.target > 0 && fan.speed > 0 ? (fan.speed * 100).toFixed(0)+"%" : (fan.target > 0 ? "standby" : "off") }}</small>
<v-row align="center">
<v-col class="flex-grow-0 py-0 pl-8 pr-0 colHeaterIcons">
<v-icon :color="(fan.target ? 'grey lighten-5' : 'grey darken-2')" :class="(fan.speed ? ' icon-rotate' : '')">mdi-fan</v-icon>
</v-col>
<v-col class="text-center py-0 vertical_align_center"><span>{{ fan.temperature.toFixed(1) }}°C</span></v-col>
<v-col class="text-center py-0 vertical_align_center">
<v-col class="py-0 font-weight-bold">{{ fan.name }}</v-col>
<v-col class="py-0 text-center d-none d-sm-block"><small>{{ fan.target > 0 && fan.speed > 0 ? (fan.speed * 100).toFixed(0)+"%" : (fan.target > 0 ? "standby" : "off") }}</small></v-col>
<v-col class="py-0 text-center">{{ fan.temperature ? fan.temperature.toFixed(1) : 0}}°C</v-col>
<v-col class="text-center py-0 pr-8 pr-0 vertical_align_center">
<toolInput :name="fan.name" :target="fan.target" command="SET_TEMPERATURE_FAN_TARGET" attribute-name="temperature_fan" ></toolInput>
</v-col>
</v-row>
</div>
<div v-if="temperature_sensors.length" >
<div v-for="(sensor,index) in this['printer/getTemperatureSensors']" v-bind:key="index+999">
<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-row align="center">
<v-col class="flex-grow-0 py-0 pl-8 pr-0 colHeaterIcons">
<v-icon color="grey darken-2" :title="'min: '+sensor.min_temp+'° / max: '+sensor.max_temp+'°'">{{ sensor.icon }}</v-icon>
</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 class="py-0 font-weight-bold">{{ sensor.name }}</v-col>
<v-col class="py-0 d-none d-sm-block"><span>&nbsp;</span></v-col>
<v-col class="py-0 text-center">
<span style="cursor: default;" :title="'min: '+(sensor.measured_min_temp ? sensor.measured_min_temp.toFixed(1) : 0)+'° / max: '+(sensor.measured_max_temp ? sensor.measured_max_temp.toFixed(1) : 0)+'°'">{{ sensor.temperature ? sensor.temperature.toFixed(1) : 0 }}°C</span>
</v-col>
<v-col class="text-center py-0 pr-8 vertical_align_center"><span>&nbsp;</span></v-col>
</v-row>
</div>
<v-divider class="my-2" v-if="boolTempchart"></v-divider>
<v-row v-if="boolTempchart">
<v-col>
<v-col class="px-8">
<line-chart :chart-data="chartdata" v-if="loaded"></line-chart>
</v-col>
</v-row>
@@ -93,44 +93,45 @@
extruderTemps: [250,215,195,0],
loaded: false,
chartdata: {
labels: [],
datasets: []
}
}
},
computed: {
...mapState({
labels: state => state.temperaturChart.labels,
datasets: state => state.temperaturChart.datasets,
datasets: state => state.printer.tempHistory.datasets,
boolTempchart: state => state.gui.dashboard.boolTempchart,
}),
...mapGetters([
'heaters',
'heatersCount',
'temperature_fans',
'temperature_sensors',
])
'printer/getTemperatureFans',
'printer/getTemperatureSensors',
]),
datasets: {
get () {
return this.$store.state.printer.tempHistory.datasets
}
},
heaters: {
get () {
return this.$store.getters["printer/getHeaters"]
}
}
},
created() {
},
methods: {
fillData () {
this.loaded = true;
this.chartdata = {
labels: this.labels,
datasets: this.datasets
}
}
},
mounted () {
this.fillData();
},
watch: {
labels() {
this.fillData();
this.chartdata = {
datasets: this.datasets
}
}
setTimeout(() => {
this.loaded = true
}, 1000)
},
}
</script>
+26 -18
View File
@@ -6,15 +6,13 @@
<template>
<v-card>
<v-list-item>
<v-list-item-avatar color="grey"><v-icon dark>mdi-webcam</v-icon></v-list-item-avatar>
<v-list-item-content>
<v-list-item-title class="headline">Webcam</v-list-item-title>
</v-list-item-content>
</v-list-item>
<v-divider class="my-2"></v-divider>
<v-toolbar flat dense >
<v-toolbar-title>
<span class="subheading"><v-icon left>mdi-webcam</v-icon>Webcam</span>
</v-toolbar-title>
</v-toolbar>
<v-card-text class="px-0 py-0 content">
<img :src="webcamUrl" class="webcamImage" />
<img :src="webcamConfig.url" class="webcamImage" :style="webcamStyle" />
</v-card-text>
</v-card>
</template>
@@ -25,19 +23,29 @@
export default {
components: {
},
data: function() {
return {
}
},
computed: {
...mapState({
webcamUrl: state => state.webcam.url,
})
'webcamConfig': state => state.gui.webcam
}),
webcamStyle() {
var transforms = '';
if (this.webcamConfig.flipX) {
transforms += ' scaleX(-1)'
}
if (this.webcamConfig.flipY) {
transforms += ' scaleY(-1)'
}
if (this.webcamConfig.rotate && this.webcamConfig.rotateDegrees) {
transforms += ` rotate(${this.webcamConfig.rotateDegrees}deg)`
}
if (transforms.trimLeft().length) {
return {
transform: transforms.trimLeft(),
}
}
return '';
}
},
methods: {
}
}
</script>
+36 -26
View File
@@ -3,7 +3,7 @@
</style>
<template>
<v-card v-if="(printer_state === 'Printing' && printer_is_printing)">
<v-card v-if="(['printing', 'paused'].includes(printer_state))">
<v-toolbar flat dense >
<v-toolbar-title>
<span class="subheading"><v-icon class="mdi mdi-arrow-collapse-vertical" left></v-icon>Z Baby Stepping</span>
@@ -13,13 +13,19 @@
<v-card-text class="py-1">
<v-row class="">
<v-col class="col-12 pb-0 text-center">
<p>Current Offset: {{ base_zpos.toFixed(2) }}mm</p>
<p>Current Offset: {{ homing_origin.length > 1 ? homing_origin[2].toFixed(2) : 0.00 }}mm</p>
</v-col>
</v-row>
<v-row>
<v-col class="col-12 pt-0 text-center">
<v-btn @click="sendBabySteppingDown()" class="mx-2" :loading="loadingBabySteppingDown" ><v-icon class="mr-2">mdi-arrow-collapse-down</v-icon> -0.05mm</v-btn>
<v-btn @click="sendBabySteppingUp()" class="mx-2" :loading="loadingBabySteppingUp" ><v-icon class="mr-2">mdi-arrow-expand-up</v-icon> +0.05mm</v-btn>
<v-col class="col-12 pt-0 text-center d-flex flex-column align-center flex-sm-row justify-center">
<v-btn-toggle dense no-gutters class="mx-2 mb-2 order-last flex-nowrap order-sm-first" >
<v-btn small @click="sendBabySteppingDownFine()" class="" :loading="loadings.includes('babySteppingDownFine')" ><v-icon small class="mr-2">mdi-arrow-collapse-down</v-icon> -0.01mm</v-btn>
<v-btn small @click="sendBabySteppingDown()" class="" :loading="loadings.includes('babySteppingDown')" >-0.05mm</v-btn>
</v-btn-toggle>
<v-btn-toggle dense no-gutters class="mx-2 mb-2 order-first flex-nowrap order-sm-last" >
<v-btn small @click="sendBabySteppingUpFine()" class="" :loading="loadings.includes('babySteppingUpFine')" ><v-icon small class="mr-2">mdi-arrow-expand-up</v-icon> +0.01mm</v-btn>
<v-btn small @click="sendBabySteppingUp()" class="" :loading="loadings.includes('babySteppingUp')" >+0.05mm</v-btn>
</v-btn-toggle>
</v-col>
</v-row>
</v-card-text>
@@ -36,37 +42,41 @@
},
data: function() {
return {
loadingBabySteppingDown: false,
loadingBabySteppingUp: false,
}
},
computed: {
...mapState({
loadings: state => state.loadings,
base_zpos: state => state.printer.gcode.base_zpos,
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,
loadings: state => state.socket.loadings,
homing_origin: state => state.printer.gcode_move.homing_origin,
printer_state: state => state.printer.print_stats.state,
homed_axis: state => state.printer.toolhead.homed_axes,
}),
},
methods: {
sendBabySteppingDownFine() {
let gcode = "SET_GCODE_OFFSET Z_ADJUST=-0.01"+(this.homed_axis === "xyz" ? " MOVE=1" : "");
this.$store.commit('socket/addLoading', { name: 'babySteppingDownFine' });
this.$store.commit('server/addEvent', gcode);
Vue.prototype.$socket.sendObj('printer.gcode.script', { script: gcode }, "socket/removeLoading", { name: 'babySteppingDownFine' });
},
sendBabySteppingDown() {
let gcode = "SET_GCODE_OFFSET Z_ADJUST=-0.05 MOVE=1";
this.$store.commit('setLoading', { name: 'babySteppingDown' });
this.$store.commit('addGcodeResponse', gcode);
Vue.prototype.$socket.sendObj('post_printer_gcode_script', { script: gcode }, "respondeBabySteppingDown");
let gcode = "SET_GCODE_OFFSET Z_ADJUST=-0.05"+(this.homed_axis === "xyz" ? " MOVE=1" : "");
this.$store.commit('socket/addLoading', { name: 'babySteppingDown' });
this.$store.commit('server/addEvent', gcode);
Vue.prototype.$socket.sendObj('printer.gcode.script', { script: gcode }, "socket/removeLoading", { name: 'babySteppingDown' });
},
sendBabySteppingUpFine() {
let gcode = "SET_GCODE_OFFSET Z_ADJUST=0.01"+(this.homed_axis === "xyz" ? " MOVE=1" : "");
this.$store.commit('socket/addLoading', { name: 'babySteppingUpFine' });
this.$store.commit('server/addEvent', gcode);
Vue.prototype.$socket.sendObj('printer.gcode.script', { script: gcode }, "socket/removeLoading", { name: 'babySteppingUpFine' });
},
sendBabySteppingUp() {
let gcode = "SET_GCODE_OFFSET Z_ADJUST=0.05 MOVE=1";
this.$store.commit('setLoading', { name: 'babySteppingUp' });
this.$store.commit('addGcodeResponse', gcode);
Vue.prototype.$socket.sendObj('post_printer_gcode_script', { script: gcode }, "respondeBabySteppingUp");
},
},
watch: {
loadings: function(loadings) {
this.loadingBabySteppingDown = loadings.includes('babySteppingDown');
this.loadingBabySteppingUp = loadings.includes('babySteppingUp');
let gcode = "SET_GCODE_OFFSET Z_ADJUST=0.05"+(this.homed_axis === "xyz" ? " MOVE=1" : "");
this.$store.commit('socket/addLoading', { name: 'babySteppingUp' });
this.$store.commit('server/addEvent', gcode);
Vue.prototype.$socket.sendObj('printer.gcode.script', { script: gcode }, "socket/removeLoading", { name: 'babySteppingUp' });
},
}
}
+4
View File
@@ -2,6 +2,7 @@ import Vue from 'vue'
import StatusPanel from './StatusPanel.vue'
import KlippyStatePanel from './KlippyStatePanel.vue'
import MinSettingsPanel from './MinSettingsPanel.vue'
import ToolsPanel from './ToolsPanel.vue'
import ControlPanel from "./ControlPanel";
import ExtruderPanel from "./ExtruderPanel";
@@ -10,9 +11,11 @@ import Peripherie from "./PeripheriePanel";
import WebcamPanel from "./WebcamPanel";
import MiniconsolePanel from "./MiniconsolePanel";
import Settings from "./Settings/";
import PowerControlPanel from "./PowerControlPanel.vue";
Vue.component('status-panel', StatusPanel);
Vue.component('klippy-state-panel', KlippyStatePanel);
Vue.component('min-settings-panel', MinSettingsPanel);
Vue.component('tools-panel', ToolsPanel);
Vue.component('control-panel', ControlPanel);
Vue.component('extruder-panel', ExtruderPanel);
@@ -20,6 +23,7 @@ Vue.component('zoffset-panel', ZOffsetPanel);
Vue.component('peripherie-panel', Peripherie);
Vue.component('webcam-panel', WebcamPanel);
Vue.component('miniconsole-panel', MiniconsolePanel);
Vue.component('power-control-panel', PowerControlPanel);
export default {
Settings
+109
View File
@@ -0,0 +1,109 @@
<style>
._fan-slider-subheader {
height: auto;
}
</style>
<template>
<v-row>
<v-col :class="controllable ? 'pb-1 pt-3' : 'py-2'">
<v-subheader class="_fan-slider-subheader">
<span>{{ convertName }}</span>
<v-spacer></v-spacer>
<span class="font-weight-bold">{{ Math.round(value) }} %</span>
</v-subheader>
<v-card-text class="py-0" v-if="controllable">
<v-slider
v-model="value"
:min="0"
:max="100"
@change="sendCmd"
hide-details>
<template v-slot:prepend>
<v-icon @click="decrement">mdi-minus</v-icon>
</template>
<template v-slot:append>
<v-icon @click="increment">mdi-plus</v-icon>
</template>
</v-slider>
</v-card-text>
</v-col>
</v-row>
</template>
<script>
export default {
data: function() {
return {
value: this.target * this.multi,
}
},
props: {
target: {
type: Number,
required: true,
},
name: {
type: String,
required: true,
default: ''
},
type: {
type: String,
required: false,
default: ''
},
controllable: {
type: Boolean,
required: false,
default: false
},
multi: {
type: Number,
required: false,
default: 1
},
},
computed: {
convertName() {
let tmp = this.name;
tmp = tmp.replaceAll("_", " ");
tmp = tmp.charAt(0).toUpperCase() + tmp.slice(1);
return tmp;
}
},
methods: {
sendCmd() {
let gcode = "";
if (this.type === "fan") gcode = "M106 S"+(this.value * 2.55).toFixed(0);
if (this.type === "fan_generic") gcode = "SET_FAN_SPEED FAN="+this.name+" SPEED="+(this.value/100);
if (gcode !== "") {
this.$store.commit('server/addEvent', gcode);
this.$socket.sendObj('printer.gcode.script', { script: gcode });
}
},
decrement() {
this.value = this.value > 0 ? (this.value - 1).toFixed(0) : 0;
this.sendCmd();
},
increment() {
this.value = this.value < 100 ? (this.value + 1).toFixed(0) : 100;
this.sendCmd();
}
},
watch: {
target: function(newVal) {
this.value = newVal * this.multi;
},
},
created: function() {
},
}
</script>
+6 -4
View File
@@ -30,17 +30,19 @@
setValue() {
if (this.value) {
let index = this.hiddenMacros.indexOf(this.name.toUpperCase());
if (index > -1) this.hiddenMacros.splice(index, 1);
} else this.hiddenMacros.push(this.name.toUpperCase());
if (index > -1) this.hiddenMacros.splice(index, 1)
} else this.hiddenMacros.push(this.name.toUpperCase())
this.$store.dispatch("gui/upload")
}
},
watch: {
hiddenMacros: function() {
this.value = !this.hiddenMacros.includes(this.name.toUpperCase());
this.value = !this.hiddenMacros.includes(this.name.toUpperCase())
}
},
created() {
this.value = !this.hiddenMacros.includes(this.name.toUpperCase());
this.value = !this.hiddenMacros.includes(this.name.toUpperCase())
}
}
</script>
+10 -26
View File
@@ -8,10 +8,10 @@
<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-switch v-model="value" :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-row class="px-6" v-if="value" >
<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>
@@ -22,46 +22,30 @@
<script>
import { mapGetters } from 'vuex';
export default {
data: function() {
return {
value: false,
enabled: false,
filament_detected: false,
}
},
props: {
name: String,
enabled: Boolean,
filament_detected: Boolean,
},
computed: {
...mapGetters([
'getFilamentSwitchSensors'
])
},
methods: {
changeSensor() {
this.$socket.sendObj('post_printer_gcode_script', { 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;
}
let gcode = 'SET_FILAMENT_SENSOR SENSOR='+this.name+' ENABLE='+(this.value ? 1 : 0)
this.$store.commit('server/addEvent', gcode)
this.$socket.sendObj('printer.gcode.script', { script: gcode })
}
},
created() {
let sensor = this.getFilamentSwitchSensors.find(sensor => sensor.name === this.name);
if (sensor) {
this.enabled = sensor.enabled;
this.filament_detected = sensor.filament_detected;
}
this.value = this.enabled
}
}
</script>
+11 -2
View File
@@ -7,6 +7,15 @@
.tool-input .v-input__slot { margin-bottom: 0; }
.tool-input .v-text-field__details { display: none; }
.tool-input input {
-moz-appearance: textfield;
}
.tool-input input::-webkit-outer-spin-button,
.tool-input input::-webkit-inner-spin-button {
-webkit-appearance: none;
margin: 0;
}
</style>
<template>
@@ -40,10 +49,10 @@
if (this.max_temp !== undefined && this.value > this.max_temp) {
this.value = this.target;
Vue.$toast.error("Temperature too high for "+this.name+"! (max: "+this.max_temp+")");
} else if (this.min_temp !== undefined && this.value < this.min_temp && this.value !== 0) {
} else if (this.min_temp !== undefined && this.value < this.min_temp && parseFloat(this.value) !== 0) {
this.value = this.target;
Vue.$toast.error("Temperature too low for "+this.name+"! (min: "+this.min_temp+")");
} else this.$socket.sendObj('post_printer_gcode_script', {script: this.command+' '+this.attributeName+'='+this.name+' TARGET='+this.value});
} else this.$socket.sendObj('printer.gcode.script', { script: this.command+' '+this.attributeName+'='+this.name+' TARGET='+this.value });
}
},
watch: {
+45 -32
View File
@@ -1,12 +1,35 @@
<style>
._tool-slider-subheader {
height: auto;
}
</style>
<template>
<v-row>
<v-col class="col-auto"><v-icon @click="decrement">mdi-minus</v-icon></v-col>
<v-col class="col"><v-slider v-model="value" thumb-label="always" :label="label" :min="min" :max="max" @change="sendCmd" hide-details></v-slider></v-col>
<v-col class="col-auto"><v-icon @click="increment">mdi-plus</v-icon></v-col>
<v-col class="pb-1 pt-3">
<v-subheader class="_tool-slider-subheader">
<span>{{ label }}</span>
<v-spacer></v-spacer>
<span class="font-weight-bold">{{ value }} {{ unit }}</span>
</v-subheader>
<v-card-text class="py-0">
<v-slider
v-model="value"
:min="min"
:max="max"
@change="sendCmd"
hide-details>
<template v-slot:prepend>
<v-icon @click="decrement">mdi-minus</v-icon>
</template>
<template v-slot:append>
<v-icon @click="increment">mdi-plus</v-icon>
</template>
</v-slider>
</v-card-text>
</v-col>
</v-row>
</template>
@@ -16,7 +39,6 @@
data: function() {
return {
value: this.target * this.multi,
variableMax: 0,
}
},
props: {
@@ -25,7 +47,6 @@
required: true,
},
command: {
type: String,
required: true,
},
attributeName: {
@@ -38,6 +59,11 @@
required: false,
default: ''
},
unit: {
type: String,
required: false,
default: '%'
},
attributeScale: {
type: Number,
required: false,
@@ -53,10 +79,10 @@
required: false,
default: 100
},
extenderSteps: {
step: {
type: Number,
required: false,
default: 100
default: 1
},
multi: {
type: Number,
@@ -69,38 +95,25 @@
},
methods: {
sendCmd() {
this.$socket.sendObj('post_printer_gcode_script', { script: this.command+' '+this.attributeName+(this.value*this.attributeScale).toFixed(0) });
let gcode = this.command+' '+this.attributeName+(this.value*this.attributeScale).toFixed(0)
this.$store.commit('server/addEvent', gcode)
this.$socket.sendObj('printer.gcode.script', { script: gcode })
},
decrement() {
this.value--;
this.value = this.value > this.min ? (this.value - this.step).toFixed(0) : this.min
this.sendCmd();
},
increment() {
this.value++;
this.value = this.value < this.max ? (this.value + this.step).toFixed(0) : this.max
this.sendCmd();
},
}
},
watch: {
target: function() {
this.value = this.target * this.multi;
target: function(newVal) {
this.value = newVal * 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;
}*/
created: function() {
}
}
</script>
</script>
+4 -3
View File
@@ -22,9 +22,10 @@ Vue.component('vue-headful', vueHeadful);
fetch('/config.json')
.then(res => res.json())
.then(file => {
store.commit('setSettings', file);
store.commit('socket/setData', file);
const socketClient = new WebSocketClient('ws://' + store.state.socket.hostname + ':' + store.state.socket.port + '/websocket', {
const websocketProtocol = document.location.protocol === 'https:' ? 'wss://' : 'ws://';
const socketClient = new WebSocketClient(websocketProtocol + store.state.socket.hostname + ':' + store.state.socket.port + '/websocket', {
store: store,
reconnectEnabled: true,
reconnectInterval: store.state.socket.reconnectInterval,
@@ -45,4 +46,4 @@ fetch('/config.json')
p.appendChild(content);
document.getElementById('app').append(p);
window.console.error('Error:', error);
});
});
+16 -12
View File
@@ -15,12 +15,15 @@
margin-top: 5px;
}
.log-cell {
padding: 16px !important;
}
.log-cell.title-cell {
vertical-align: top;
height: auto !important;
}
.log-cell.content-cell {
vertical-align: top;
min-height: auto;
height: auto !important;
}
</style>
@@ -35,6 +38,7 @@
solo
class="gcode-command-field"
ref="gcodeCommandField"
autocomplete="off"
v-on:keyup.enter="doSend"
v-on:keyup.up="onKeyUp"
v-on:keyup.down="onKeyDown"
@@ -67,10 +71,10 @@
<template #item="{ item }">
<tr>
<td class="log-cell title-cell">
<td class="log-cell title-cell py-2 flex-grow-0 pr-0">
{{ item.date.toLocaleString() }}
</td>
<td class="log-cell content-cell" colspan="2">
<td class="log-cell content-cell py-2" colspan="2">
<span v-if="item.message" class="message" v-html="formatMessage(item.message)"></span>
</td>
</tr>
@@ -116,8 +120,8 @@
},
computed: {
...mapState({
events: state => state.events,
helplist: state => state.helplist,
events: state => state.server.events,
helplist: state => state.printer.helplist,
loadings: state => state.loadings,
}),
...mapGetters([
@@ -126,9 +130,9 @@
},
methods: {
doSend() {
this.$store.commit('setLoading', { name: 'loadingSendGcode' });
this.$store.commit('addGcodeResponse', this.gcode);
Vue.prototype.$socket.sendObj('post_printer_gcode_script', { script: this.gcode }, "sendGcode");
//this.$store.commit('setLoading', { name: 'loadingSendGcode' });
this.$store.commit('server/addEvent', this.gcode);
Vue.prototype.$socket.sendObj('printer.gcode.script', { script: this.gcode }, "server/getGcodeRespond");
this.lastCommands.push(this.gcode);
this.gcode = "";
this.lastCommandNumber = null;
@@ -167,7 +171,7 @@
let output = "";
commands.forEach(command => output += "<b>"+command.command+":</b> "+command.description+"<br />");
this.$store.commit('addGcodeResponse', output);
this.$store.commit('server/addEvent', output);
}
}
}
+32 -27
View File
@@ -1,47 +1,52 @@
<template>
<v-row>
<v-col class="col-sm-12 col-md-7">
<status-panel v-if="is_ready"></status-panel>
<klippy-state-panel v-if="!is_ready"></klippy-state-panel>
<webcam-panel v-if="showDashboardWebcam" class="mt-6"></webcam-panel>
<z-offset-panel class="mt-6" v-if="is_ready"></z-offset-panel>
<control-panel class="mt-6" v-if="is_ready"></control-panel>
<extruder-panel class="mt-6" v-if="is_ready"></extruder-panel>
</v-col>
<v-col class="col-sm-12 col-md-5">
<tools-panel></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>
<min-settings-panel v-if="klippy_state === 'ready' && existsPrinterConfig"></min-settings-panel>
<status-panel v-if="klippy_state === 'ready'"></status-panel>
<klippy-state-panel v-if="socket_connected && klippy_state !== 'ready'"></klippy-state-panel>
<webcam-panel v-if="showDashboardWebcam" class="mt-6"></webcam-panel>
<z-offset-panel class="mt-6" v-if="klippy_state === 'ready'"></z-offset-panel>
<control-panel class="mt-6" v-if="klippy_state === 'ready'"></control-panel>
<extruder-panel class="mt-6" v-if="klippy_state === 'ready'"></extruder-panel>
<peripherie-panel class="mt-6" v-if="klippy_state === 'ready'"></peripherie-panel>
<power-control-panel class="mt-6" v-if="countPowerDevices > 0"></power-control-panel>
</v-col>
<v-col class="col-sm-12 col-md-7">
<tools-panel v-if="socket_connected && klippy_connected"></tools-panel>
<miniconsole-panel class="mt-6" v-if="klippy_state === 'ready' && showDashboardConsole"></miniconsole-panel>
</v-col>
</v-row>
</template>
<script>
import { mapState, mapGetters } from 'vuex'
import { mapState } from 'vuex'
import ZOffsetPanel from "../components/panels/ZOffsetPanel";
export default {
components: {ZOffsetPanel},
components: { ZOffsetPanel },
data: () => ({
//is_ready: false
}),
computed: {
...mapState({
socket_connected: state => state.socket.isConnected,
klippy_connected: state => state.server.klippy_connected,
klippy_state: state => state.server.klippy_state,
showDashboardWebcam: state => state.gui.dashboard.boolWebcam,
showDashboardConsole: state => state.gui.dashboard.boolConsole,
klippy_state: state => state.socket.klippy_state,
is_ready: state => state.socket.is_ready,
config: state => state.printer.configfile.config,
}),
...mapGetters([
'showDashboardWebcam'
])
},
/*created() {
//this.is_ready = (this.klippy_state === "ready") ? true : false;
},
watch: {
klippy_state() {
this.is_ready = (this.klippy_state === "ready") ? true : false;
countPowerDevices: {
get() {
return this.$store.getters["server/power/count"]
}
},
existsPrinterConfig: {
get() {
return this.$store.getters["printer/existPrinterConfig"]
}
}
}*/
},
}
</script>
+188 -138
View File
@@ -41,62 +41,79 @@
vertical-align: middle;
transition: font-size 175ms;
}
.minHeight36 {
min-height: 36px;
}
</style>
<template>
<div>
<v-card class="fileupload-card" @dragover="dragOverUpload" @dragleave="dragLeaveUpload" @drop.prevent.stop="dragDropUpload">
<v-card class="fileupload-card my-3" @dragover="dragOverUpload" @dragleave="dragLeaveUpload" @drop.prevent.stop="dragDropUpload">
<v-card-title>
G-Code Files
<v-spacer></v-spacer>
<v-btn :loading="loadingMakeDirectory" @click="createDirectory"><v-icon class="mr-1">mdi-folder-plus</v-icon> new Directory</v-btn>
<v-btn color="primary ml-4" :loading="loadingGcodeRefresh" @click="refreshFileList"><v-icon class="mr-1">mdi-refresh</v-icon> Refresh</v-btn>
<input type="file" ref="fileUpload" style="display: none" @change="uploadFile" />
<v-btn color="primary ml-4 " :loading="loadingGcodeUpload" @click="clickUploadButton"><v-icon>mdi-upload</v-icon>Upload</v-btn>
<v-item-group class="v-btn-toggle" name="controllers">
<v-btn @click="clickUploadButton" title="Upload new Gcode" class="primary" :loading="loadings.includes('gcodeUpload')"><v-icon>mdi-upload</v-icon></v-btn>
<v-btn @click="createDirectory" title="Create new Directory"><v-icon>mdi-folder-plus</v-icon></v-btn>
<v-btn @click="refreshFileList" title="Refresh current Directory"><v-icon>mdi-refresh</v-icon></v-btn>
<v-menu :offset-y="true" title="Setup current list">
<template v-slot:activator="{ on, attrs }">
<v-btn class="" v-bind="attrs" v-on="on"><v-icon>mdi-cog</v-icon></v-btn>
</template>
<v-list>
<v-list-item class="minHeight36">
<v-checkbox class="mt-0" hide-details v-model="showHiddenFiles" label="Hidden files"></v-checkbox>
</v-list-item>
<v-divider></v-divider>
<v-list-item class="minHeight36" v-for="header of configHeaders" v-bind:key="header.key">
<v-checkbox class="mt-0" hide-details v-model="header.visible" @change="changeMetadataVisible(header.value)" :label="header.text"></v-checkbox>
</v-list-item>
</v-list>
</v-menu>
</v-item-group>
</v-card-title>
<v-card-subtitle>
Current path: {{ this.currentPath }}
</v-card-subtitle>
<v-card-subtitle>Current path: {{ this.currentPath !== 'gcodes' ? "/"+this.currentPath.substring(7) : "/" }}</v-card-subtitle>
<v-card-text>
<v-text-field
v-model="search"
append-icon="mdi-magnify"
label="Search"
single-line
hide-details
v-model="search"
append-icon="mdi-magnify"
label="Search"
single-line
hide-details
></v-text-field>
</v-card-text>
<v-data-table
:items="files"
class="files-table"
:headers="headers"
:headers="filteredHeaders"
:options="options"
:custom-sort="sortFiles"
:sort-by.sync="sortBy"
:sort-desc.sync="sortDesc"
:items-per-page="countPerPage"
:items-per-page.sync="countPerPage"
item-key="name"
:search="search"
:custom-filter="advancedSearch"
@pagination="refreshMetadata">
<template slot="items" slot-scope="props">
<td v-for="header in filteredHeaders" v-bind:key="header.text">{{ props.item[header.value] }}</td>
</template>
<template #no-data>
<div class="text-center">empty</div>
</template>
<template v-slot:body.prepend>
<template slot="body.prepend" v-if="(currentPath !== 'gcodes')">
<tr
v-if="(currentPath !== 'gcodes')"
class="file-list-cursor"
@click="clickRowGoBack"
@dragover="dragOverFilelist($event, {isDirectory: true, filename: '..'})" @dragleave="dragLeaveFilelist" @drop.prevent.stop="dragDropFilelist($event, {isDirectory: true, filename: '..'})"
>
<td class=" ">
<v-icon>mdi-folder-upload</v-icon>
</td>
<td class=" " colspan="8">
..
</td>
<td class=" "><v-icon>mdi-folder-upload</v-icon></td>
<td class=" " colspan="8">..</td>
</tr>
</template>
@@ -111,35 +128,19 @@
@dragover="dragOverFilelist($event, item)" @dragleave="dragLeaveFilelist" @drop.prevent.stop="dragDropFilelist($event, item)"
:data-name="item.filename"
>
<td class=" ">
<td class="pr-0" style="width: 32px;">
<v-icon v-if="item.isDirectory">mdi-folder</v-icon>
<v-icon v-if="!item.isDirectory && !(item.thumbnails && item.thumbnails.length > 0)">mdi-file</v-icon>
<img v-if="!item.isDirectory && item.thumbnails && item.thumbnails.length > 0" :src="'data:image/gif;base64,'+(item.thumbnails.length ? item.thumbnails[0].data : '--')" />
</td>
<td class=" ">
{{ item.filename }}
</td>
<td class="text-no-wrap text-right">
{{ item.isDirectory ? '--' : formatFilesize(item.size) }}
</td>
<td class="text-right">
{{ formatDate(item.modified) }}
</td>
<td class="text-no-wrap text-right">
{{ item.object_height ? item.object_height.toFixed(2)+' mm' : '--' }}
</td>
<td class="text-no-wrap text-right">
{{ item.layer_height ? item.layer_height.toFixed(2)+' mm' : '--' }}
</td>
<td class="text-no-wrap text-right">
{{ item.filament_total ? item.filament_total.toFixed()+' mm' : '--' }}
</td>
<td class="text-no-wrap text-right">
{{ formatPrintTime(item.estimated_time) }}
</td>
<td class="text-no-wrap text-right">
{{ item.slicer ? item.slicer : '--' }}
</td>
<td class=" ">{{ item.filename }}</td>
<td class="text-no-wrap text-right" v-if="headers.filter(header => header.value === 'size')[0].visible">{{ item.isDirectory ? '--' : formatFilesize(item.size) }}</td>
<td class="text-right" v-if="headers.filter(header => header.value === 'modified')[0].visible">{{ formatDate(item.modified) }}</td>
<td class="text-no-wrap text-right" v-if="headers.filter(header => header.value === 'object_height')[0].visible">{{ item.object_height ? item.object_height.toFixed(2)+' mm' : '--' }}</td>
<td class="text-no-wrap text-right" v-if="headers.filter(header => header.value === 'layer_height')[0].visible">{{ item.layer_height ? item.layer_height.toFixed(2)+' mm' : '--' }}</td>
<td class="text-no-wrap text-right" v-if="headers.filter(header => header.value === 'filament_total')[0].visible">{{ item.filament_total ? item.filament_total.toFixed()+' mm' : '--' }}</td>
<td class="text-no-wrap text-right" v-if="headers.filter(header => header.value === 'estimated_time')[0].visible">{{ formatPrintTime(item.estimated_time) }}</td>
<td class="text-no-wrap text-right" v-if="headers.filter(header => header.value === 'slicer')[0].visible">{{ item.slicer ? item.slicer : '--' }}<br /><small v-if="item.slicer_version">{{ item.slicer_version}}</small></td>
</tr>
</template>
</v-data-table>
@@ -149,17 +150,17 @@
</v-card>
<v-menu v-model="contextMenu.shown" :position-x="contextMenu.x" :position-y="contextMenu.y" absolute offset-y>
<v-list>
<v-list-item @click="downloadFile" :disabled="is_printing" v-if="!contextMenu.item.isDirectory">
<v-list-item @click="clickRow(contextMenu.item)" :disabled="is_printing" v-if="!contextMenu.item.isDirectory">
<v-icon class="mr-1">mdi-play</v-icon> Print start
</v-list-item>
<v-list-item @click="downloadFile" v-if="!contextMenu.item.isDirectory">
<v-icon class="mr-1">mdi-cloud-download</v-icon> Download
</v-list-item>
<v-list-item @click="renameDirectory(contextMenu.item)" v-if="contextMenu.item.isDirectory">
<v-icon class="mr-1">mdi-pencil</v-icon> Rename
<v-icon class="mr-1">mdi-rename-box</v-icon> Rename
</v-list-item>
<v-list-item @click="renameFile(contextMenu.item)" v-if="!contextMenu.item.isDirectory">
<v-icon class="mr-1">mdi-pencil</v-icon> Rename
<v-icon class="mr-1">mdi-rename-box</v-icon> Rename
</v-list-item>
<v-list-item @click="removeFile" v-if="!contextMenu.item.isDirectory">
<v-icon class="mr-1">mdi-delete</v-icon> Delete
@@ -172,9 +173,10 @@
<v-dialog v-model="dialogPrintFile.show" max-width="400">
<v-card>
<v-img
v-if="dialogPrintFile.item.thumbnails && dialogPrintFile.item.thumbnails.find(element => element.width === 400)"
:src="'data:image/gif;base64,'+(dialogPrintFile.item.thumbnails ? dialogPrintFile.item.thumbnails.find(element => element.width === 400).data : '')"
:height="(dialogPrintFile.item.thumbnails ? dialogPrintFile.item.thumbnails.find(element => element.width === 400).height : '')+'px'"
contain
v-if="dialogPrintFile.item.thumbnails && dialogPrintFile.item.thumbnails.find(element => element.width === 300 || element.width === 400)"
:src="'data:image/gif;base64,'+(dialogPrintFile.item.thumbnails ? dialogPrintFile.item.thumbnails.find(element => element.width === 300 || element.width === 400).data : '')"
:height="(dialogPrintFile.item.thumbnails ? dialogPrintFile.item.thumbnails.find(element => element.width === 400 || element.width === 300).height : '')+'px'"
></v-img>
<v-card-title class="headline">Start Job</v-card-title>
<v-card-text>Do you want to start {{ dialogPrintFile.item.filename }}?</v-card-text>
@@ -203,7 +205,7 @@
<v-card>
<v-card-title class="headline">Rename File</v-card-title>
<v-card-text>
<v-text-field label="Name" required v-model="dialogRenameFile.newName"></v-text-field>
<v-text-field label="Name" required v-model="dialogRenameFile.newName" ref="inputFieldNewName"></v-text-field>
</v-card-text>
<v-card-actions>
<v-spacer></v-spacer>
@@ -230,8 +232,7 @@
<script>
import { mapState, mapGetters } from 'vuex';
import axios from 'axios';
import { findDirectory } from "../plugins/helpers";
import Vue from "vue";
import { findDirectory } from "@/plugins/helpers";
export default {
data () {
@@ -240,6 +241,7 @@
sortBy: 'modified',
sortDesc: true,
selected: [],
hideHeaderColums: [],
dialogPrintFile: {
show: false,
item: {}
@@ -259,15 +261,15 @@
item: {}
},
headers: [
{ text: '', value: '', },
{ text: 'Name', value: 'filename', },
{ text: 'Filesize', value: 'size', align: 'right', },
{ text: 'Last modified', value: 'modified', align: 'right', },
{ text: 'Object Height', value: 'object_height', align: 'right', },
{ text: 'Layer Height', value: 'layer_height', align: 'right', },
{ text: 'Filament Usage', value: 'filament_total', align: 'right', },
{ text: 'Print Time', value: 'estimated_time', align: 'right', },
{ text: 'Generated by', value: 'slicer', align: 'right', },
{ text: '', value: '', align: 'left', configable: false, visible: true },
{ text: 'Name', value: 'filename', align: 'left', configable: false, visible: true },
{ text: 'Filesize', value: 'size', align: 'right', configable: true, visible: true },
{ text: 'Last modified', value: 'modified', align: 'right', configable: true, visible: true },
{ text: 'Object Height', value: 'object_height', align: 'right', configable: true, visible: true },
{ text: 'Layer Height', value: 'layer_height', align: 'right', configable: true, visible: true },
{ text: 'Filament Usage', value: 'filament_total', align: 'right', configable: true, visible: true },
{ text: 'Print Time', value: 'estimated_time', align: 'right', configable: true, visible: true },
{ text: 'Slicer', value: 'slicer', align: 'right', configable: true, visible: true },
],
options: {
@@ -286,9 +288,6 @@
},
files: [],
currentPath: 'gcodes',
loadingGcodeUpload: false,
loadingGcodeRefresh: false,
loadingMakeDirectory: false,
draggingFile: {
status: false,
item: {}
@@ -300,24 +299,48 @@
},
computed: {
...mapState({
filetree: state => state.filetree,
countPerPage: state => state.gui.gcodefiles.countPerPage,
filetree: state => state.files.filetree,
hostname: state => state.socket.hostname,
port: state => state.socket.port,
loadings: state => state.loadings,
loadings: state => state.socket.loadings,
displayMetadata: state => state.gui.gcodefiles.showMetadata,
}),
...mapGetters([
'is_printing'
])
]),
configHeaders() {
return this.headers.filter(header => header.configable === true);
},
filteredHeaders() {
return this.headers.filter(header => header.visible === true);
},
showHiddenFiles: {
get: function() {
return this.$store.state.gui.gcodefiles.showHiddenFiles;
},
set: function(newVal) {
return this.$store.dispatch("gui/setSettings", { gcodefiles: { showHiddenFiles: newVal } });
}
},
countPerPage: {
get: function() {
return this.$store.state.gui.gcodefiles.countPerPage
},
set: function(newVal) {
return this.$store.dispatch("gui/setSettings", { gcodefiles: { countPerPage: newVal } });
}
},
},
created() {
let dirArray = this.currentPath.split("/");
this.files = findDirectory(this.filetree, dirArray);
this.loadPath()
},
methods: {
uploadFile: function() {
if (this.$refs.fileUpload.files.length) {
this.doUploadFile(this.$refs.fileUpload.files[0]);
this.doUploadFile(this.$refs.fileUpload.files[0]).finally(() => {
this.$refs.fileUpload.value = ''
})
}
},
doUploadFile: function(file) {
@@ -326,81 +349,77 @@
let filename = file.name.replace(" ", "_");
formData.append('file', file, (this.currentPath+"/"+filename).substring(7));
this.$store.commit('setLoading', { name: 'loadingGcodeUpload' });
this.$store.commit('socket/addLoading', { name: 'gcodeUpload' });
axios.post('http://' + this.hostname + ':' + this.port + '/server/files/upload',
formData, {
headers: { 'Content-Type': 'multipart/form-data' }
}
return axios.post('//' + this.hostname + ':' + this.port + '/server/files/upload',
formData, { headers: { 'Content-Type': 'multipart/form-data' } }
).then((result) => {
this.$store.commit('removeLoading', { name: 'loadingGcodeUpload' });
this.$store.commit('socket/removeLoading', { name: 'gcodeUpload' });
toast.success("Upload of "+result.data.result+" successful!");
this.$socket.sendObj('get_directory', { path: this.currentPath }, 'getDirectory');
let filename = (this.currentPath+"/"+file.name).substring(7);
setTimeout(function() {
Vue.prototype.$socket.sendObj("get_file_metadata", { filename: filename }, "getMetadata");
}, 1000);
})
.catch(() => {
this.$store.commit('removeLoading', { name: 'loadingGcodeUpload' });
}).catch(() => {
this.$store.commit('socket/removeLoading', { name: 'gcodeUpload' });
toast.error("Cannot upload the file!");
});
},
clickUploadButton: function() {
this.$refs.fileUpload.click();
this.$refs.fileUpload.click()
},
refreshFileList: function() {
this.$store.commit('setLoading', { name: 'loadingGcodeRefresh' });
this.$socket.sendObj('get_directory', { path: this.currentPath }, 'getDirectory');
this.$socket.sendObj('server.files.get_directory', { path: this.currentPath }, 'files/getDirectory')
},
formatDate(date) {
let tmp2 = new Date(date);
let tmp2 = new Date(date)
return tmp2.toLocaleString().replace(',', '');
return tmp2.toLocaleString().replace(',', '')
},
formatFilesize(fileSizeInBytes) {
let i = -1;
let byteUnits = [' kB', ' MB', ' GB', ' TB', 'PB', 'EB', 'ZB', 'YB'];
let i = -1
let byteUnits = [' kB', ' MB', ' GB', ' TB', 'PB', 'EB', 'ZB', 'YB']
do {
fileSizeInBytes = fileSizeInBytes / 1024;
i++;
} while (fileSizeInBytes > 1024);
fileSizeInBytes = fileSizeInBytes / 1024
i++
} while (fileSizeInBytes > 1024)
return Math.max(fileSizeInBytes, 0.1).toFixed(1) + byteUnits[i];
return Math.max(fileSizeInBytes, 0.1).toFixed(1) + byteUnits[i]
},
formatPrintTime(totalSeconds) {
if (totalSeconds) {
let output = "";
let output = ""
let hours = Math.floor(totalSeconds / 3600);
totalSeconds %= 3600;
if (hours) output += hours+"h";
let minutes = Math.floor(totalSeconds / 60);
if (minutes) output += " "+minutes+"m";
let seconds = totalSeconds % 60;
if (seconds) output += " "+seconds.toFixed(0)+"s";
let days = Math.floor(totalSeconds / (3600 * 24))
if (days) {
totalSeconds %= (3600 * 24)
output += days+"d"
}
return output;
let hours = Math.floor(totalSeconds / 3600)
totalSeconds %= 3600
if (hours) output += " "+hours+"h"
let minutes = Math.floor(totalSeconds / 60)
if (minutes) output += " "+minutes+"m"
let seconds = totalSeconds % 60
if (seconds) output += " "+seconds.toFixed(0)+"s"
return output
}
return '--';
return '--'
},
showContextMenu (e, item) {
e.preventDefault();
this.contextMenu.shown = true;
this.contextMenu.x = e.clientX;
this.contextMenu.y = e.clientY;
this.contextMenu.item = item;
this.$nextTick(() => {
this.contextMenu.shown = true
});
e.preventDefault()
this.contextMenu.shown = true
this.contextMenu.x = e.clientX
this.contextMenu.y = e.clientY
this.contextMenu.item = item
this.$nextTick(() => { this.contextMenu.shown = true })
},
downloadFile() {
let filename = (this.currentPath+"/"+this.contextMenu.item.filename);
let link = document.createElement("a");
link.download = name;
link.href = 'http://' + this.hostname + ':' + this.port + '/server/files/' + filename;
link.href = '//' + this.hostname + ':' + this.port + '/server/files/' + encodeURI(filename);
document.body.appendChild(link);
link.click();
document.body.removeChild(link);
@@ -412,10 +431,10 @@
},
renameFileAction() {
this.dialogRenameFile.show = false;
this.$socket.sendObj('post_file_move', {
this.$socket.sendObj('server.files.move', {
source: this.currentPath+"/"+this.dialogRenameFile.item.filename,
dest: this.currentPath+"/"+this.dialogRenameFile.newName
}, 'getPostFileMove');
}, 'files/getMove');
},
renameDirectory(item) {
this.dialogRenameDirectory.item = item;
@@ -424,18 +443,17 @@
},
renameDirectoryAction() {
this.dialogRenameDirectory.show = false;
this.$socket.sendObj('post_file_move', {
this.$socket.sendObj('server.files.move', {
source: this.currentPath+"/"+this.dialogRenameDirectory.item.filename,
dest: this.currentPath+"/"+this.dialogRenameDirectory.newName
}, 'getPostFileMove');
}, 'files/getFileMove');
},
removeFile() {
let filename = (this.currentPath+"/"+this.contextMenu.item.filename);
axios.delete(
'http://'+ this.hostname + ':' + this.port +'/server/files/'+filename
'//'+ this.hostname + ':' + this.port +'/server/files/' + encodeURI(filename)
).then((result) => {
this.$toast.success(result.data.result+" successfully deleted.");
this.$socket.sendObj('get_directory', { path: this.currentPath }, 'getDirectory');
}).catch(() => {
this.$toast.error("Error! Cannot delete file.");
});
@@ -447,11 +465,11 @@
createDirectoryAction: function() {
if (this.dialogCreateDirectory.name.length && this.dialogCreateDirectory.name.indexOf(" ") === -1) {
this.dialogCreateDirectory.show = false;
this.$socket.sendObj('post_directory', { path: this.currentPath+"/"+this.dialogCreateDirectory.name }, 'getPostDirectory');
this.$socket.sendObj('server.files.post_directory', { path: this.currentPath+"/"+this.dialogCreateDirectory.name }, 'files/getCreateDir');
}
},
deleteDirectoryAction: function() {
this.$socket.sendObj('delete_directory', { path: this.currentPath+"/"+this.contextMenu.item.filename }, 'getDeleteDirectory');
this.$socket.sendObj('server.files.delete_directory', { path: this.currentPath+"/"+this.contextMenu.item.filename }, 'files/getDeleteDir');
},
clickRow: function(item) {
if (!item.isDirectory) {
@@ -466,14 +484,17 @@
this.currentPath = this.currentPath.substr(0, this.currentPath.lastIndexOf("/"));
},
loadPath: function() {
this.$socket.sendObj('get_directory', { path: this.currentPath }, 'getDirectory');
this.$socket.sendObj('server.files.get_directory', { path: this.currentPath }, 'files/getDirectory');
let dirArray = this.currentPath.split("/");
this.files = findDirectory(this.filetree, dirArray);
if (!this.showHiddenFiles) {
this.files = this.files.filter(file => file.filename !== "thumbs" && file.filename.substr(0, 1) !== ".");
}
},
startPrint(filename = "") {
filename = (this.currentPath+"/"+filename).substring(7);
this.dialogPrintFile.show = false;
this.$socket.sendObj('post_printer_print_start', { filename: filename }, 'switchToDashboard');
this.$socket.sendObj('printer.print.start', { filename: filename }, 'switchToDashboard');
},
dragOverUpload(e) {
if (!this.draggingFile.status) {
@@ -538,9 +559,14 @@
e.preventDefault();
e.target.parentElement.style.backgroundColor = 'transparent';
this.$socket.sendObj('post_file_move', {
let dest = "";
if (row.filename === '..') {
dest = this.currentPath.substring(0, this.currentPath.lastIndexOf("/") + 1)+this.draggingFile.item.filename;
} else dest = this.currentPath+"/"+row.filename+"/"+this.draggingFile.item.filename;
this.$socket.sendObj('server.files.move', {
source: this.currentPath+"/"+this.draggingFile.item.filename,
dest: this.currentPath+"/"+row.filename+"/"+this.draggingFile.item.filename,
dest: dest
}, 'getPostFileMove');
}
},
@@ -584,7 +610,7 @@
for (let i = data.pageStart; i < data.pageStop; i++) {
if (items[i] && !items[i].isDirectory && !items[i].metadataPulled) {
let filename = (this.currentPath+"/"+items[i].filename).substring(7);
this.$socket.sendObj("get_file_metadata", { filename: filename }, "getMetadata");
this.$socket.sendObj("server.files.metadata", { filename: filename }, "files/getMetadata");
}
}
@@ -594,7 +620,14 @@
search != null &&
typeof value === 'string' &&
value.toString().toLowerCase().indexOf(search.toLowerCase()) !== -1
}
},
changeMetadataVisible: function(name) {
if (this.headers.filter(header => header.value === name).length) {
let value = this.headers.filter(header => header.value === name)[0].visible;
this.$store.dispatch("gui/setGcodefilesMetadata", {name: name, value: value});
}
},
},
watch: {
filetree: {
@@ -602,18 +635,35 @@
handler(newVal) {
let dirArray = this.currentPath.split("/");
this.files = findDirectory(newVal, dirArray);
if (!this.showHiddenFiles) {
this.files = this.files.filter(file => file.filename !== "thumbs" && file.filename.substr(0, 1) !== ".");
}
}
},
currentPath: {
handler(newVal) {
let dirArray = newVal.split("/");
this.files = findDirectory(this.filetree, dirArray);
if (!this.showHiddenFiles) {
this.files = this.files.filter(file => file.filename !== "thumbs" && file.filename.substr(0, 1) !== ".");
}
}
},
loadings: function(loadings) {
this.loadingGcodeRefresh = loadings.includes('loadingGcodeRefresh');
this.loadingGcodeUpload = loadings.includes('loadingGcodeUpload');
displayMetadata: {
deep: true,
handler(newVal) {
Object.entries(newVal).forEach(value => {
if (this.headers.filter(header => header.value === value[0]).length) {
this.headers.filter(header => header.value === value[0])[0].visible = value[1];
}
});
}
},
showHiddenFiles: function() {
this.loadPath();
}
}
}
</script>
</script>
+42 -33
View File
@@ -53,15 +53,15 @@
</v-row>
<v-row>
<v-col class="col-12">
<v-btn color="primary" class="mr-3" @click="loadProfile" :loading="loadingLoad" :disabled="disabledLoad">LOAD</v-btn>
<v-btn color="primary" class="mr-3" @click="saveDialog = true; newName = profile" :loading="loadingSave" :disabled="disabledSave">SAVE</v-btn>
<v-btn color="primary" class="mr-3" @click="removeDialog = true" :loading="loadingRemove" :disabled="disabledRemove">REMOVE</v-btn>
<v-btn color="primary" class="mr-3" @click="loadProfile" :loading="loadings.includes('bedMeshLoad')" :disabled="disabledLoad">LOAD</v-btn>
<v-btn color="primary" class="mr-3" @click="saveDialog = true; newName = profile" :loading="loadings.includes('bedMeshSave')" :disabled="disabledSave">SAVE</v-btn>
<v-btn color="primary" class="mr-3" @click="removeDialog = true" :loading="loadings.includes('bedMeshRemove')" :disabled="disabledRemove">REMOVE</v-btn>
</v-col>
</v-row>
<v-row>
<v-col class="col-12">
<v-btn color="primary" class="mr-3" @click="clearBedMesh" :loading="loadingClear" :disabled="disabledClear">CLEAR</v-btn>
<v-btn color="primary" class="mr-3" @click="calibrateDialog = true" :loading="loadingCalibrate" :disabled="is_printing">Calibrate</v-btn>
<v-btn color="primary" class="mr-3" @click="clearBedMesh" :loading="loadings.includes('bedMeshClear')" :disabled="disabledClear">CLEAR</v-btn>
<v-btn color="primary" class="mr-3" @click="calibrateDialog = true" :loading="loadings.includes('bedMeshCalibrate')" :disabled="is_printing">Calibrate</v-btn>
</v-col>
</v-row>
</v-card-text>
@@ -193,18 +193,12 @@
}
}
},
profiles: [],
profile: {},
boolShowBedMesh: false,
loadingLoad: false,
disabledLoad: true,
loadingSave: false,
disabledSave: true,
loadingRemove: false,
disabledRemove: true,
loadingClear: false,
disabledClear: true,
loadingCalibrate: false,
showMeshType: 'probed',
saveDialog: false,
removeDialog: false,
@@ -214,14 +208,22 @@
},
computed: {
...mapState({
config: state => state.config,
config: state => state.printer.configfile.config,
bed_mesh: state => state.printer.bed_mesh,
loadings: state => state.loadings,
loadings: state => state.socket.loadings,
}),
...mapGetters([
'is_printing',
]),
profiles: {
get() {
return this.$store.getters["printer/getBedMeshProfiles"]
},
set() {
}
}
},
methods: {
showBedMesh: function() {
@@ -242,14 +244,23 @@
let x_count = 0;
let y_count = 0;
let min = -1;
let max = 1;
if (this.showMeshType === 'probed') {
x_count = this.bed_mesh.probed_matrix[0].length;
y_count = this.bed_mesh.probed_matrix.length;
this.data[0].z = this.bed_mesh.probed_matrix;
min = Math.min.apply(null, this.bed_mesh.probed_matrix.map(function(row){ return Math.min.apply(Math, row); }));
max = Math.max.apply(null, this.bed_mesh.probed_matrix.map(function(row){ return Math.max.apply(Math, row); }));
} else if (this.showMeshType === 'mesh') {
x_count = this.bed_mesh.mesh_matrix[0].length;
y_count = this.bed_mesh.mesh_matrix.length;
this.data[0].z = this.bed_mesh.mesh_matrix;
min = Math.min.apply(null, this.bed_mesh.mesh_matrix.map(function(row){ return Math.min.apply(Math, row); }));
max = Math.max.apply(null, this.bed_mesh.mesh_matrix.map(function(row){ return Math.max.apply(Math, row); }));
}
let x_step = (this.bed_mesh.mesh_max[0] - this.bed_mesh.mesh_min[0]) / (x_count - 1);
@@ -262,6 +273,11 @@
this.data[0].y.push(parseFloat(this.bed_mesh.mesh_min[1]) + parseFloat(y_step) * i);
}
if (min > -1) min = -1;
if (max < 1) max = 1;
this.layout.scene.zaxis.range = [min, max];
this.boolShowBedMesh = true;
} else this.boolShowBedMesh = false;
@@ -276,35 +292,35 @@
this.showBedMesh();
},
loadProfile: function() {
this.$store.commit('setLoading', { name: 'bedMeshLoad' });
this.$socket.sendObj('post_printer_gcode_script', { script: "BED_MESH_PROFILE LOAD="+this.profile }, "responseBedMeshLoad");
this.$store.commit('socket/addLoading', { name: 'bedMeshLoad' });
this.$socket.sendObj('printer.gcode.script', { script: "BED_MESH_PROFILE LOAD="+this.profile }, "socket/removeLoading", { name: 'bedMeshLoad' });
},
saveProfile: function() {
this.saveDialog = false;
this.$store.commit('setLoading', { name: 'bedMeshSave' });
this.$socket.sendObj('post_printer_gcode_script', { script: "BED_MESH_PROFILE SAVE="+this.newName.toUpperCase() }, "responseBedMeshSave");
this.$store.commit('socket/addLoading', { name: 'bedMeshSave' });
this.$socket.sendObj('printer.gcode.script', { script: "BED_MESH_PROFILE SAVE="+this.newName.toUpperCase() }, "socket/removeLoading", { name: 'bedMeshSave' });
},
removeProfile: function() {
this.removeDialog = false;
this.$store.commit('setLoading', { name: 'bedMeshRemove' });
this.$socket.sendObj('post_printer_gcode_script', { script: "BED_MESH_PROFILE REMOVE="+this.profile }, "responseBedMeshRemove");
this.$store.commit('socket/addLoading', { name: 'bedMeshRemove' });
this.$socket.sendObj('printer.gcode.script', { script: "BED_MESH_PROFILE REMOVE="+this.profile }, "socket/removeLoading", { name: 'bedMeshRemove' });
},
clearBedMesh: function() {
this.$store.commit('setLoading', { name: 'bedMeshClear' });
this.$socket.sendObj('post_printer_gcode_script', { script: "BED_MESH_CLEAR" }, "responseBedMeshClear");
this.$store.commit('socket/addLoading', { name: 'bedMeshClear' });
this.$socket.sendObj('printer.gcode.script', { script: "BED_MESH_CLEAR" }, "socket/removeLoading", { name: 'bedMeshClear' });
},
calibrateMesh: function() {
this.calibrateDialog = false;
this.$store.commit('setLoading', { name: 'bedMeshCalibrate' });
this.$socket.sendObj('post_printer_gcode_script', { script: "BED_MESH_CALIBRATE" }, "responseBedMeshCalibrate");
this.$store.commit('socket/addLoading', { name: 'bedMeshCalibrate' });
this.$socket.sendObj('printer.gcode.script', { script: "BED_MESH_CALIBRATE" }, "socket/removeLoading", { name: 'bedMeshCalibrate' });
}
},
created: function() {
this.profiles = this.$store.getters.getBedMeshProfiles;
},
watch: {
config: function() {
this.profiles = this.$store.getters.getBedMeshProfiles;
this.profiles = this.$store.getters["printer/getBedMeshProfiles"];
},
profile: function() {
if (this.profile !== "" && this.bed_mesh !== undefined && this.profile === this.bed_mesh.profile_name) {
@@ -322,7 +338,7 @@
deep: false,
handler(newVal) {
if (newVal !== undefined) {
this.profiles = this.$store.getters.getBedMeshProfiles;
this.profiles = this.$store.getters["printer/getBedMeshProfiles"];
this.showBedMesh();
if (this.profile !== "" && this.profile === this.bed_mesh.profile_name) this.disabledLoad = true;
@@ -341,13 +357,6 @@
}
}
},
loadings: function(loadings) {
this.loadingLoad = loadings.includes('bedMeshLoad');
this.loadingClear = loadings.includes('bedMeshClear');
this.loadingSave = loadings.includes('bedMeshSave');
this.loadingRemove = loadings.includes('bedMeshRemove');
this.loadingCalibrate = loadings.includes('bedMeshCalibrate');
}
}
}
</script>
-10
View File
@@ -1,10 +0,0 @@
<template>
<div>
Current Job
</div>
</template>
<script>
export default {
}
</script>
+1 -5
View File
@@ -12,8 +12,6 @@
</div>
</template>
<script>
import { mapState } from 'vuex';
export default {
data () {
return {
@@ -21,9 +19,7 @@
}
},
computed: {
...mapState({
webcamUrl: state => state.webcam.url,
}),
},
methods: {
+2 -7
View File
@@ -12,11 +12,6 @@
<settings-macros-panel></settings-macros-panel>
</v-col>
</v-row>
<v-fab-transition>
<v-btn fab fixed large bottom right :loading="loadingUpload" @click="saveGuiSettings">
<v-icon>mdi-check</v-icon>
</v-btn>
</v-fab-transition>
</div>
</template>
<script>
@@ -25,12 +20,12 @@
export default {
computed: {
...mapState({
loadingUpload: state => state.socket.loadingSaveGuiConfig,
}),
},
methods: {
...mapActions([
'saveGuiSettings'
]),
}
}
+25 -9
View File
@@ -1,17 +1,33 @@
<template>
<div>
<v-row>
<v-col class="col-sm-12 col-md-6" v-if="is_ready">
<settings-limits-panel></settings-limits-panel>
<v-col class="col-12 col-sm-6">
<settings-config-files-panel></settings-config-files-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 class="col-12 col-sm-6">
<v-row v-if="klippy_state === 'ready'">
<v-col class="col-12 pt-0">
<settings-limits-panel></settings-limits-panel>
</v-col>
</v-row>
<v-row v-if="klippy_state !== 'ready'">
<v-col class="col-12 pt-0">
<klippy-state-panel></klippy-state-panel>
</v-col>
</v-row>
<v-row>
<v-col class="col-md-6" v-if="klippy_state === 'ready'">
<settings-endstop-panel></settings-endstop-panel>
<settings-runout-panel></settings-runout-panel>
</v-col>
<v-col :class="(klippy_state !== 'ready' ? 'col-md-12' : 'col-md-6')">
<settings-logfiles-panel></settings-logfiles-panel>
</v-col>
</v-row>
</v-col>
</v-row>
<v-row>
</v-row>
</div>
</template>
<script>
@@ -23,7 +39,7 @@
}),
computed: {
...mapState({
is_ready: state => state.socket.is_ready,
klippy_state: state => state.server.klippy_state,
}),
},
created() {
+11 -1
View File
@@ -1,5 +1,5 @@
export function findDirectory (folder, dirArray) {
if (dirArray.length) {
if (folder !== undefined && dirArray.length) {
if (folder.childrens) folder = folder.childrens;
let parent = folder.find(element => (element.isDirectory && element.filename === dirArray[0]));
@@ -10,4 +10,14 @@ export function findDirectory (folder, dirArray) {
} else return parent.childrens;
} else return folder;
}
}
export function caseInsensitiveNameSort(a, b) {
let nameA = a.name.toUpperCase();
let nameB = b.name.toUpperCase();
if (nameA < nameB) return -1;
if (nameA > nameB) return 1;
return 0;
}
+7
View File
@@ -20,6 +20,13 @@ Vue.use(Vuetify,{
});
export default new Vuetify({
theme: {
themes: {
dark: {
}
}
},
icons: {
iconfont: 'mdi',
},
+33 -23
View File
@@ -13,9 +13,13 @@ export default class WebSocketClient {
this.onMessage = null;
this.onClose = null;
this.onError = null;
this.blackErrorList = [
this.blacklistMessages = [
"Metadata not available for",
"Klippy Request Timed Out",
"Klippy Host not connected",
];
this.blacklistFunctions = [
"getPowerDevices",
];
}
@@ -27,7 +31,7 @@ export default class WebSocketClient {
}
passToStore (eventName, event) {
if (!eventName.startsWith('socket_')) { return }
if (!eventName.startsWith('socket/')) { return }
let method = 'dispatch'
let target = eventName
let msg = event
@@ -41,20 +45,18 @@ export default class WebSocketClient {
this.instance = new WebSocket(this.url);
this.instance.onopen = () => {
if (this.store) this.passToStore('socket_on_open', event);
if (this.store) this.passToStore('socket/onOpen', event);
};
this.instance.onclose = (e) => {
window.console.log("Websocket Closed, reconnecting in "+this.reconnectInterval+"ms: ", e.reason);
this.passToStore('socket_on_close', e);
this.passToStore('socket/onClose', e);
setTimeout(() => {
this.connect();
}, this.reconnectInterval);
};
this.instance.onerror = (err) => {
console.log("Websocket Error: ", err);
this.instance.onerror = () => {
this.instance.close();
};
@@ -64,7 +66,10 @@ export default class WebSocketClient {
if (this.wsData.filter(item => item.id === data.id).length > 0 &&
this.wsData.filter(item => item.id === data.id)[0].action !== "") {
if (data.error && data.error.message) {
if (!this.blackErrorList.find(element => data.error.message.startsWith(element))) {
if (
!this.blacklistMessages.find(element => data.error.message.startsWith(element)) &&
!this.blacklistFunctions.find(element => this.wsData.filter(item => item.id === data.id)[0].action.startsWith(element))
) {
window.console.error("Response Error: "+this.wsData.filter(item => item.id === data.id)[0].action+" > "+data.error.message);
this.store.dispatch(
this.wsData.filter(item => item.id === data.id)[0].action,
@@ -72,26 +77,31 @@ export default class WebSocketClient {
);
}
} else {
let result = data.result;
if (result === "ok") result = { result: result };
let result = data.result
if (result === "ok") result = { result: result }
this.store.dispatch(
this.wsData.filter(item => item.id === data.id)[0].action,
Object.assign({requestParams: this.wsData.filter(item => item.id === data.id)[0].params }, result)
)
let preload = {}
let wsData = this.wsData.filter(item => item.id === data.id)[0]
if (wsData.actionPreload) Object.assign(preload, wsData.actionPreload)
Object.assign(preload, { requestParams: wsData.params })
Object.assign(preload, result)
this.store.dispatch(wsData.action, preload)
}
} else this.passToStore('socket_on_message', data)
} else this.passToStore('socket/onMessage', data)
}
};
}
sendObj (method, params, action = '') {
let id = Math.floor(Math.random() * 10000) + 1
this.wsData.push({
id: id,
action: action,
params: params
})
this.instance.send(this.createMessage(method, params, id))
sendObj (method, params, action = '', actionPreload = null) {
if (this.instance.readyState === WebSocket.OPEN) {
let id = Math.floor(Math.random() * 10000) + 1
this.wsData.push({
id: id,
action: action,
params: params,
actionPreload: actionPreload,
})
this.instance.send(this.createMessage(method, params, id));
}
}
}
Loaded 100 of 135 files, more files were not shown because too many files have changed in this diff. Show more