Skip to content

Commit

Permalink
version 2019.07.1
Browse files Browse the repository at this point in the history
remove full screen page when connection to socket stops, instead it will retry to connect
  • Loading branch information
lamarios committed Jul 21, 2019
1 parent ed986f7 commit ed8d71c
Show file tree
Hide file tree
Showing 27 changed files with 66 additions and 60 deletions.
2 changes: 1 addition & 1 deletion models/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>com.ftpix.homedash</groupId>
<artifactId>homedash</artifactId>
<version>2019.01.3</version>
<version>2019.07.1</version>
</parent>

<artifactId>models</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion notifications/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<artifactId>homedash</artifactId>
<groupId>com.ftpix.homedash</groupId>
<version>2019.01.3</version>
<version>2019.07.1</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
2 changes: 1 addition & 1 deletion plugins/couchpotato/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<groupId>com.ftpix.homedash.plugins</groupId>
<artifactId>plugins</artifactId>
<version>2019.01.3</version>
<version>2019.07.1</version>
</parent>

<artifactId>couchpotato</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion plugins/docker/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<groupId>com.ftpix.homedash.plugins</groupId>
<artifactId>plugins</artifactId>
<version>2019.01.3</version>
<version>2019.07.1</version>
</parent>

<artifactId>docker</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion plugins/dockercompose/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>plugins</artifactId>
<groupId>com.ftpix.homedash.plugins</groupId>
<version>2019.01.3</version>
<version>2019.07.1</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
2 changes: 1 addition & 1 deletion plugins/dynamicdns/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<groupId>com.ftpix.homedash.plugins</groupId>
<artifactId>plugins</artifactId>
<version>2019.01.3</version>
<version>2019.07.1</version>
</parent>

<artifactId>dynamicdns</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion plugins/googlepubliccalendar/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<groupId>com.ftpix.homedash.plugins</groupId>
<artifactId>plugins</artifactId>
<version>2019.01.3</version> </parent>
<version>2019.07.1</version> </parent>

<artifactId>googlepubliccalendar</artifactId>
<name>googlepubliccalendar</name>
Expand Down
2 changes: 1 addition & 1 deletion plugins/harddisk/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<groupId>com.ftpix.homedash.plugins</groupId>
<artifactId>plugins</artifactId>
<version>2019.01.3</version>
<version>2019.07.1</version>
</parent>

<artifactId>harddisk</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion plugins/kvm/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>plugins</artifactId>
<groupId>com.ftpix.homedash.plugins</groupId>
<version>2019.01.3</version>
<version>2019.07.1</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
2 changes: 1 addition & 1 deletion plugins/logreader/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>plugins</artifactId>
<groupId>com.ftpix.homedash.plugins</groupId>
<version>2019.01.3</version>
<version>2019.07.1</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
2 changes: 1 addition & 1 deletion plugins/mma/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<groupId>com.ftpix.homedash.plugins</groupId>
<artifactId>plugins</artifactId>
<version>2019.01.3</version> </parent>
<version>2019.07.1</version> </parent>

<artifactId>mma</artifactId>
<name>mma</name>
Expand Down
2 changes: 1 addition & 1 deletion plugins/networkmonitor/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<groupId>com.ftpix.homedash.plugins</groupId>
<artifactId>plugins</artifactId>
<version>2019.01.3</version>
<version>2019.07.1</version>
</parent>

<artifactId>networkmonitor</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion plugins/pihole/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<groupId>com.ftpix.homedash.plugins</groupId>
<artifactId>plugins</artifactId>
<version>2019.01.3</version> </parent>
<version>2019.07.1</version> </parent>

<artifactId>pihole</artifactId>
<name>pihole</name>
Expand Down
2 changes: 1 addition & 1 deletion plugins/plex/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<groupId>com.ftpix.homedash.plugins</groupId>
<artifactId>plugins</artifactId>
<version>2019.01.3</version>
<version>2019.07.1</version>
</parent>

<artifactId>plex</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion plugins/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<artifactId>homedash</artifactId>
<groupId>com.ftpix.homedash</groupId>
<version>2019.01.3</version>
<version>2019.07.1</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
2 changes: 1 addition & 1 deletion plugins/portmapper/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<groupId>com.ftpix.homedash.plugins</groupId>
<artifactId>plugins</artifactId>
<version>2019.01.3</version> </parent>
<version>2019.07.1</version> </parent>

<artifactId>portmapper</artifactId>
<name>portmapper</name>
Expand Down
2 changes: 1 addition & 1 deletion plugins/sonarrtv/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<groupId>com.ftpix.homedash.plugins</groupId>
<artifactId>plugins</artifactId>
<version>2019.01.3</version>
<version>2019.07.1</version>
</parent>

<artifactId>sonarrtv</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion plugins/spotify/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<groupId>com.ftpix.homedash.plugins</groupId>
<artifactId>plugins</artifactId>
<version>2019.01.3</version>
<version>2019.07.1</version>
</parent>

<artifactId>spotify</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion plugins/systeminfo/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<groupId>com.ftpix.homedash.plugins</groupId>
<artifactId>plugins</artifactId>
<version>2019.01.3</version>
<version>2019.07.1</version>
</parent>

<artifactId>systeminfo</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion plugins/transmission/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<groupId>com.ftpix.homedash.plugins</groupId>
<artifactId>plugins</artifactId>
<version>2019.01.3</version> </parent>
<version>2019.07.1</version> </parent>

<artifactId>transmission</artifactId>
<name>transmission</name>
Expand Down
2 changes: 1 addition & 1 deletion plugins/unifi/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<groupId>com.ftpix.homedash.plugins</groupId>
<artifactId>plugins</artifactId>
<version>2019.01.3</version> </parent>
<version>2019.07.1</version> </parent>

<artifactId>unifi</artifactId>
<name>unifi</name>
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>com.ftpix.homedash</groupId>
<artifactId>homedash</artifactId>
<version>2019.01.3</version>
<version>2019.07.1</version>
<name>Archetype - homedash</name>
<url>http://maven.apache.org</url>
<packaging>pom</packaging>
Expand Down
2 changes: 1 addition & 1 deletion updater/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>homedash</artifactId>
<groupId>com.ftpix.homedash</groupId>
<version>2019.01.3</version>
<version>2019.07.1</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
10 changes: 6 additions & 4 deletions web/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<groupId>com.ftpix.homedash</groupId>
<artifactId>homedash</artifactId>
<version>2019.01.3</version>
<version>2019.07.1</version>
</parent>


Expand Down Expand Up @@ -199,7 +199,7 @@
<dependency>
<groupId>com.ftpix.homedash</groupId>
<artifactId>models</artifactId>
<version>2019.01.3</version>
<version>2019.07.1</version>
</dependency>

<dependency>
Expand Down Expand Up @@ -373,7 +373,7 @@
<version>1.1.1</version>
<configuration>
<description>
fix issue #7 where the UI wouldn't load on windows JAR distribution
remove full screen overlay when connection to server is lost. Instead will try to reconnect.
</description>
<releaseName>${version}</releaseName>
<tag>${version}</tag>
Expand Down Expand Up @@ -450,7 +450,9 @@
<arguments>
<argument>build</argument>
<argument>-t</argument>
<argument>${docker.image.name}</argument>
<argument>${docker.image.name}:latest</argument>
<argument>-t</argument>
<argument>${docker.image.name}:${version}</argument>
<argument>.</argument>
</arguments>
</configuration>
Expand Down
20 changes: 16 additions & 4 deletions web/src/main/java/assets/js/websocket.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,21 @@
* This file will handle all the websocket related stuff
*/
var ws;
var singleModuleSize = null;

$(document).ready(function () {
$('#overlay .reload-page').click(function () {
location.reload();
});
});


function initWebsocket() {
singleModuleSize = null;
var protocol = (location.protocol === 'https:') ? 'wss://' : 'ws://';
ws = new WebSocket(protocol + window.location.host + '/ws');
try {
ws.onmessage = onMessage;

ws.onopen = function (e) {
$('#reconnecting-bar').removeClass('showing');
for (i = 0; i < MODULES.length; i++) {
if (MODULES[i] != null && MODULES[i].onConnect != undefined) {
MODULES[i].onConnect();
Expand All @@ -39,6 +39,8 @@ function initWebsocket() {


function initSingleModuleWebSocket(size) {
singleModuleSize = size;

var protocol = (location.protocol === 'https:') ? 'wss://' : 'ws://';
ws = new WebSocket(protocol + window.location.host + '/ws-' + size);
try {
Expand All @@ -49,6 +51,7 @@ function initSingleModuleWebSocket(size) {
}

ws.onopen = function (e) {
$('#reconnecting-bar').removeClass('showing');
MODULE.onConnect();
MODULE.documentReady(size);
sendMessage(MODULE.moduleId, "setModule", "");
Expand Down Expand Up @@ -152,8 +155,17 @@ var notificationTimeout;
Display the overlay when the connection is off
*/
function showOfflineOverlay() {
$('#overlay').addClass('showing');
console.log('reconnecting to socket');
$('#reconnecting-bar').addClass('showing');
setTimeout(function () {
if (singleModuleSize !== null) {
initSingleModuleWebSocket(singleModuleSize);
} else {
initWebsocket();
}
}, 1000);
}

/**
* Show a success notification
* @param message
Expand Down
41 changes: 17 additions & 24 deletions web/src/main/java/assets/less/main.less
Original file line number Diff line number Diff line change
Expand Up @@ -115,44 +115,37 @@ body {
}
}

#overlay {
#reconnecting-bar {
position: fixed;
background-color: white;
background-color: @accentColor;
color: white;
z-index: 9001;
top: 0;
left: 0;
right: 0;
bottom: 0;
bottom: -60px;
height:50px;

display:flex;
align-items: center;

-webkit-transition: all @transition-speed !important;
transition: all @transition-speed !important;
font-size: 20px;

@angle: -90deg;
-webkit-transform: rotateX(@angle); /* Safari */
transform: rotateX(@angle);

transform-origin: center top;

padding-top: 50px;
p {
text-align: center;

.message{
flex-grow: 1;
margin: 0;
}

.smiley {
color: @accentColor;
font-size: 150px;
.icon{
margin: 0;
padding: 20px;
}

.message {
font-size: 35px;
}
}

#overlay.showing {
@angle: 0deg;
-webkit-transform: rotateX(@angle); /* Safari */
transform: rotateX(@angle);
#reconnecting-bar.showing {
bottom: 0px;
}

//
Expand Down
9 changes: 4 additions & 5 deletions web/src/main/resources/templates/layout.jade
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,10 @@ html(lang="en")
.icon
.message

#overlay
p.smiley :(
p.message Can't connect to the server
p
button.reload-page.btn.btn-primary Reload
#reconnecting-bar
p.icon
i.fa.fa-refresh.fa-spin
p.message Can't connect to the server, retrying

#pages
div.icons
Expand Down

0 comments on commit ed8d71c

Please sign in to comment.