Skip to content

Commit

Permalink
port to json config and allow to specify credentials
Browse files Browse the repository at this point in the history
  • Loading branch information
foxriver76 committed Jan 31, 2024
1 parent d5c39d7 commit f4a6509
Show file tree
Hide file tree
Showing 3 changed files with 85 additions and 123 deletions.
121 changes: 0 additions & 121 deletions admin/index_m.html

This file was deleted.

65 changes: 65 additions & 0 deletions admin/jsonConfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
{
"type": "panel",
"items": {
"customName": {
"label": "Name",
"default": "My 3D printer",
"type": "text",
"help": "Define your own printer name for this instance"
},
"klipperPort": {
"newLine": true,
"label": "Port",
"type": "number",
"default": 80
},
"klipperIP": {
"label": "IP",
"type": "text",
"default": "192.168.1.50",
"help": "IP of your Klipper installation"
},
"apiRefreshInterval": {
"newLine": true,
"label": "Refresh interval",
"default": 60,
"min": 1,
"type": "number",
"help": "in Seconds"
},
"apiRefreshIntervalOperational": {
"label": "Operational refresh interval",
"default": 30,
"min": 1,
"type": "number",
"help": "in Seconds"
},
"apiRefreshIntervalPrinting": {
"label": "Printing refresh interval",
"default": 10,
"min": 1,
"type": "number",
"help": "in Seconds"
},
"auth": {
"newLine": true,
"label": "Authenticate",
"type": "checkbox",
"default": false,
"help": "If authentication is required"
},
"user": {
"newLine": true,
"label": "Username",
"type": "text",
"default": "",
"hidden": "!data.auth"
},
"password": {
"label": "Password",
"type": "password",
"default": "",
"hidden": "!data.auth"
}
}
}
22 changes: 20 additions & 2 deletions io-package.json
Original file line number Diff line number Diff line change
Expand Up @@ -99,20 +99,38 @@
"connectionType": "local",
"dataSource": "poll",
"materialize": true,
"adminUI": {
"config": "json"
},
"dependencies": [
{
"js-controller": ">=2.0.0"
}
]
],
"tier": 2,
"licenseInformation": {
"license": "MIT",
"type": "free"
}
},
"native": {
"customName": "My 3D printer",
"klipperPort": "80",
"klipperIP": "192.168.1.50",
"apiRefreshInterval": 60,
"apiRefreshIntervalOperational": 30,
"apiRefreshIntervalPrinting": 10
"apiRefreshIntervalPrinting": 10,
"auth": false,
"password": "",
"user": ""
},
"protectedNative": [
"user",
"password"
],
"encryptedNative": [
"password"
],
"objects": [],
"instanceObjects": [
{
Expand Down

0 comments on commit f4a6509

Please sign in to comment.