Skip to content

Commit

Permalink
v1.5.0
Browse files Browse the repository at this point in the history
  • Loading branch information
sco01 committed Sep 23, 2019
1 parent 9d871d1 commit 4f6f435
Show file tree
Hide file tree
Showing 7 changed files with 69 additions and 116 deletions.
10 changes: 6 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ A dashboard tab for Octoprint that displays the most relevant info regarding the
* Supports multiple hotends as configured in the printer profile
* Supports chamber temperature if configured in the printer profile
* Configurable progress gauge type (Circle, Bar)
* Fullscreen mode
* Uses Estimates from [PrintTimeGenius](https://plugins.octoprint.org/plugins/PrintTimeGenius/) when installed
* Uses GCode analysis provided by [DisplayLayerProgress](https://plugins.octoprint.org/plugins/DisplayLayerProgress/) to get more accurate layer and fan data
* Theme friendly:
Expand All @@ -33,6 +34,7 @@ For release notes and release history, please visit the [wiki](https://github.co
* Translations to other languages are not supported yet.
* The CPU-temp will likely only work on a Raspberry Pi.
* Disk Usage will likely only work on Linux deratives.
* Testing limited to desktop browsers: Safari, Chrome and Firefox

## Dependencies

Expand All @@ -42,9 +44,9 @@ The dashboard uses the time estimates provided by PrintTimeGenius if it is insta

## Credits

Inspired by OctoDash: https://github.com/UnchartedBull/OctoDash/
Icons from: http://www.iconninja.com
Github Contributors: Andy Harrison (wizard04wsu), Doug Hoyt (doughoyt), (j7126)
* Inspired by OctoDash: https://github.com/UnchartedBull/OctoDash/
* Icons from: http://www.iconninja.com
* Github Contributors: Andy Harrison (wizard04wsu), Doug Hoyt (doughoyt), (j7126)

## Setup

Expand All @@ -70,4 +72,4 @@ For custom styles:
| .dashboardGauge | stroke |
| svg text | fill |

![Screenshot](https://github.com/StefanCohen/OctoPrint-Dashboard/blob/master/screenshot-theme2.png)
![Screenshot](https://github.com/StefanCohen/OctoPrint-Dashboard/blob/master/screenshot-theme2.png)
2 changes: 1 addition & 1 deletion octoprint_dashboard/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ def get_settings_defaults(self):
showSystemInfo=False,
showProgress=True,
hideHotend=False,
showFullscreen=False
showFullscreen=True
)

def get_template_configs(self):
Expand Down
44 changes: 11 additions & 33 deletions octoprint_dashboard/static/css/dashboard.css
Original file line number Diff line number Diff line change
Expand Up @@ -96,35 +96,30 @@ svg text {
}
}

/* FullScreen. TODO: Make better ; */
/* FullScreen.*/

/* fs moz */

.dasboardContainer:-moz-full-screen {
color: #dadadc;
/*color: #dadadc;*/
font-weight: 400;
background-color: #000000;
/*background-color: #000000;*/
user-select: none;
}

.dasboardContainer:-moz-full-screen .dashboardGridItem {
text-align: center;
margin-bottom: 20px;
padding-bottom: 10px;
border-bottom: solid 1px grey!important;
}

.dasboardContainer:-moz-full-screen .dashboardGridItem>span::before {
content: "\A";
white-space: pre;
}

.dasboardContainer:-moz-full-screen .dashboardGridItem>div.inline {
display: block;
margin-top: 10px;
text-align: center;
}

.dasboardContainer:-moz-full-screen .dasboardFsContainer {
position: fixed;
left: 2vmin;
Expand All @@ -137,7 +132,6 @@ svg text {
transform: translateY(-50%);
padding: 2vmin 0px;
}

.dasboardContainer:-moz-full-screen div#webcam_container {
position: fixed;
max-width: 65vw;
Expand All @@ -159,33 +153,30 @@ svg text {
text-align: center;
}



/* fs ms */

.dasboardContainer:-ms-fullscreen {
color: #dadadc;
/*color: #dadadc;*/
font-weight: 400;
background-color: #000000;
/*background-color: #000000;*/
user-select: none;
}

.dasboardContainer:-ms-fullscreen .dashboardGridItem {
text-align: center;
margin-bottom: 20px;
padding-bottom: 10px;
border-bottom: solid 1px grey!important;
}

.dasboardContainer:-ms-fullscreen .dashboardGridItem>span::before {
content: "\A";
white-space: pre;
}

.dasboardContainer:-ms-fullscreen .dashboardGridItem>div.inline {
display: block;
margin-top: 10px;
text-align: center;
}

.dasboardContainer:-ms-fullscreen .dasboardFsContainer {
position: fixed;
left: 2vmin;
Expand All @@ -198,7 +189,6 @@ svg text {
transform: translateY(-50%);
padding: 2vmin 0px;
}

.dasboardContainer:-ms-fullscreen div#webcam_container {
position: fixed;
max-width: 65vw;
Expand All @@ -223,30 +213,25 @@ svg text {
/* fs webkit */

.dasboardContainer:-webkit-full-screen {
color: #dadadc;
/*color: #dadadc;*/
font-weight: 400;
background-color: #000000;
/*background-color: #000000;*/
user-select: none;
}

.dasboardContainer:-webkit-full-screen .dashboardGridItem {
text-align: center;
margin-bottom: 20px;
padding-bottom: 10px;
border-bottom: solid 1px grey!important;
}

.dasboardContainer:-webkit-full-screen .dashboardGridItem>span::before {
content: "\A";
white-space: pre;
}

.dasboardContainer:-webkit-full-screen .dashboardGridItem>div.inline {
display: block;
margin-top: 10px;
text-align: center;
}

.dasboardContainer:-webkit-full-screen .dasboardFsContainer {
position: fixed;
left: 2vmin;
Expand All @@ -259,7 +244,6 @@ svg text {
transform: translateY(-50%);
padding: 2vmin 0px;
}

.dasboardContainer:-webkit-full-screen div#webcam_container {
position: fixed;
max-width: 65vw;
Expand All @@ -284,30 +268,25 @@ svg text {
/* fs all */

.dasboardContainer:fullscreen {
color: #dadadc;
/*color: #dadadc;*/
font-weight: 400;
background-color: #000000;
/*background-color: #000000;*/
user-select: none;
}

.dasboardContainer:fullscreen .dashboardGridItem {
text-align: center;
margin-bottom: 20px;
padding-bottom: 10px;
border-bottom: solid 1px grey!important;
}

.dasboardContainer:fullscreen .dashboardGridItem>span::before {
content: "\A";
white-space: pre;
}

.dasboardContainer:fullscreen .dashboardGridItem>div.inline {
display: block;
margin-top: 10px;
text-align: center;
}

.dasboardContainer:fullscreen .dasboardFsContainer {
position: fixed;
left: 2vmin;
Expand All @@ -320,7 +299,6 @@ svg text {
transform: translateY(-50%);
padding: 2vmin 0px;
}

.dasboardContainer:fullscreen div#webcam_container {
position: fixed;
max-width: 65vw;
Expand Down
26 changes: 11 additions & 15 deletions octoprint_dashboard/static/js/dashboard.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,24 +66,24 @@ $(function() {
if (!document.mozFullscreenElement) {
elem.mozRequestFullScreen();
} else {
if (document.exitFullscreen) {
document.exitFullscreen();
if (document.mozExitFullscreen) {
document.mozExitFullscreen();
}
}
} else if (elem.webkitRequestFullscreen) { /* Chrome, Safari & Opera */
if (!document.webkitFullscreenElement) {
elem.webkitRequestFullscreen();
} else {
if (document.exitFullscreen) {
document.exitFullscreen();
if (document.webkitExitFullscreen) {
document.webkitExitFullscreen();
}
}
} else if (elem.msRequestFullscreen) { /* IE/Edge */
if (!document.msFullscreenElement) {
elem.msRequestFullscreen();
} else {
if (document.exitFullscreen) {
document.exitFullscreen();
if (document.msExitFullscreen) {
document.msExitFullscreen();
}
}
}
Expand Down Expand Up @@ -136,17 +136,13 @@ $(function() {
}
};

self.embedUrl = function() { //TODO: This is a hack. I haven't figured out how to get the stream from the control tab yet.
self.embedUrl = function() {
if (self.settingsViewModel.settings.webcam) {
if (self.settingsViewModel.settings.webcam.streamUrl().startsWith("http")) {
return self.settingsViewModel.settings.webcam.streamUrl();
}
else {
return window.location.origin + self.settingsViewModel.settings.webcam.streamUrl()
}
return self.settingsViewModel.settings.webcam.streamUrl()
}
else return "ERROR: Webcam url not defined.";
}
else return "ERROR: Webcam not enabled in config.";
};


self.getEta = function(seconds) {
dt = new Date();
Expand Down
24 changes: 12 additions & 12 deletions octoprint_dashboard/templates/dashboard_settings.jinja2
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,13 @@
<legend>{{ _('Widget Visibility') }}</legend>
<div class="control-group">
<div >
<label class="checkbox">{{ _('Show Progress Gauge') }}
<input type="checkbox" data-bind="checked: settings.plugins.dashboard.showProgress">
<label class="checkbox">{{ _('Show Fullscreen Mode') }}
<input type="checkbox" data-bind="checked: settings.plugins.dashboard.showFullscreen">
</label>
</div>
<div >
<label class="checkbox">{{ _('Show Webcam') }}
<input type="checkbox" data-bind="checked: settings.plugins.dashboard.showWebCam">
<label class="checkbox">{{ _('Show RPi System Info') }}
<input type="checkbox" data-bind="checked: settings.plugins.dashboard.showSystemInfo">
</label>
</div>
<div >
Expand All @@ -49,21 +49,21 @@
</label>
</div>
<div >
<label class="checkbox">{{ _('Show RPi System Info') }}
<input type="checkbox" data-bind="checked: settings.plugins.dashboard.showSystemInfo">
<label class="checkbox">{{ _('Show Progress Gauge') }}
<input type="checkbox" data-bind="checked: settings.plugins.dashboard.showProgress">
</label>
</div>
<div >
<label class="checkbox">{{ _('Show Webcam') }}
<input type="checkbox" data-bind="checked: settings.plugins.dashboard.showWebCam">
</label>
</div>
</div>

<legend>{{ _('Advanced Settings') }}</legend>
<div class="control-group">
<div >
<label class="checkbox">{{ _('Enable Fullscreen Mode (Experimental)') }}
<input type="checkbox" data-bind="checked: settings.plugins.dashboard.showFullscreen">
</label>
</div>
<div >
<label class="checkbox">{{ _('Hide hotend(s) when target temp = 0 (Experimental)') }}
<label class="checkbox">{{ _('Hide hotend(s) when target temp = 0 (Useful for dual hotends)') }}
<input type="checkbox" data-bind="checked: settings.plugins.dashboard.hideHotend">
</label>
</div>
Expand Down
Loading

6 comments on commit 4f6f435

@j7126
Copy link
Owner

@j7126 j7126 commented on 4f6f435 Sep 29, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image
What was the purpose of doing this?

@StefanCohen
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah. A the remains of a failed attempt to use the theme color background color instead of defaulting to black when in fullscreen. I'm about to release 1.6.0 within the next hour. I will revert that change in the css.

@j7126
Copy link
Owner

@j7126 j7126 commented on 4f6f435 Sep 29, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see. While you are at it can you set the colour to color: #dadadc!important; because there were some issues with some themes.
Just to save form making another pull request.

Edit: nevermind

@j7126
Copy link
Owner

@j7126 j7126 commented on 4f6f435 Sep 29, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

failed attempt to use the theme color background color instead of defaulting to black

I can do that.

@StefanCohen
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok. I will set it to #dadadc!important;

I have a bunch of things in my local master that I need to push so please hold on with the PR until 1.6.0 is out.

@StefanCohen
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can do that.

Cool. Please give it a try if you want to.

Please sign in to comment.