Skip to content

Commit

Permalink
Merge pull request #13 from lokonli/master-305
Browse files Browse the repository at this point in the history
Master 305
  • Loading branch information
lokonli authored Aug 4, 2019
2 parents 15bf917 + 2687daa commit e9cb2d1
Show file tree
Hide file tree
Showing 43 changed files with 1,776 additions and 1,013 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,5 @@
/custom_2/CONFIG_DEFAULT.js
/node_modules/
/docs/_build
Makefile.ini

26 changes: 3 additions & 23 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,25 +1,5 @@
# Dockerfile for Dashticz
FROM nginx

# See http://nelkinda.com/blog/apache-php-in-docker/
FROM php:apache
USER root

RUN apt-get update
RUN apt-get install -y nginx --no-install-recommends

# Remove the default Nginx configuration file
RUN rm -v /etc/nginx/nginx.conf

# Copy a configuration file from the current directory
COPY nginx.conf /etc/nginx/

RUN rm -rf /usr/share/nginx/html/

# Append "daemon off;" to the beginning of the configuration
RUN echo "daemon off;" >> /etc/nginx/nginx.conf

# Expose ports
EXPOSE 90

# Set the default command to execute
# when creating a new container
CMD service nginx start
SHELL ["/bin/bash", "-c"]
116 changes: 116 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
-include Makefile.ini
PORT?=8082
APP?=dtv3-$(PORT)

.PHONY: help
help:
@echo "Installation script"
@echo "make help : Show this info"
@echo "make start : Build Dashticz container and start it on port 8082"
@echo " Parameters: "
@echo " PORT=<port> : Build Dashticz container and start in on the provided port"
@echo "make stop : Stop the Domoticz container"
@echo
@echo "make update : Update Dashticz to the latest version from Github"
@echo "make beta : Switch to the beta branch"
@echo "make master : Switch to the master branch"

testdocker:
ifeq (, $(shell which docker))
@echo "Let's install docker first"
wget -qO- https://get.docker.com/ | sh
endif


testgit:
ifeq (, $(shell which git))
@echo "Installing git ..."
sudo apt-get install git
endif

testport:
ifeq ($(shell ss -ln src :$(PORT) | grep -Ec -e "\<$(PORT)\>"),0)
else
@echo
@echo "PORT is defined in Makefile.ini as $(PORT)"
@echo "This port already is in use"
@echo "Please use a different port."
@echo "Then restart via: make start"
@echo
@exit 201
endif

.PHONY: start
start: testdocker testgit
@echo "Checking container $(APP)"
#ifeq ($(strip shell sudo docker image -q $(APP)),)
ifeq ($(shell sudo docker ps -q -a -f NAME=$(APP) ),)
@echo "Checking port $(PORT)"

ifeq ($(shell ss -ln src :$(PORT) | grep -Ec -e "\<$(PORT)\>"),0)
sudo docker build -t $(APP) .
sudo docker run --name $(APP) -d -p $(PORT):80 --mount type=bind,source="$(CURDIR)",target=/var/www/html $(APP)
@echo
@echo "Dashticz is running at:"
@printf "http://%s:`sudo docker inspect -f '{{ (index (index .NetworkSettings.Ports "80/tcp") 0).HostPort }}' $(APP)`\n" `hostname -I | grep -Po '\b(?:\d{1,3}\.){3}\d{1,3}\b'`
else
@echo
@echo "Port $(PORT) already is in use."
@echo "If you want to rebuild run the following command first: make stop"
@echo "or edit Makefile.ini with a new port and retry via: make start"
@echo

endif
else
@echo
@echo "The Docker container $(APP) for Dashticz already exists"
@echo "If you want to rebuild run the following command first: make stop"
@echo "or edit Makefile.ini with a new name for APP and retry via: make start"
@echo
endif


.PHONY: stop
stop:
@echo "Cleaning up $(APP)"
ifeq ($(shell sudo docker ps -q -a -f NAME=$(APP) ),)
#container doesn exist
@echo "Container $(APP) non existing"
else
@echo "Container $(APP) exists"
ifeq (true, $(shell sudo docker inspect -f '{{.State.Running}}' $(APP) 2>/dev/null))
#container is running
sudo docker stop $(APP)
endif
sudo docker rm $(APP)
endif


.PHONY: dockerinstall
dockerinstall:
echo installing docker
sudo apt-get install docker.io

.PHONY: logs
logs:
sudo docker container logs $(APP)

.PHONY: login
login:
sudo docker exec -it $(APP) bash

.PHONY: status
status:
sudo docker ps -f name=$(APP)

.PHONY: update
update:
git pull

.PHONY: master
master:
git checkout master

.PHONY: beta
beta:
git checkout master
21 changes: 17 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,23 @@
# Dashticz v3
Alternative dashboard for Domoticz
# Dashticz
Alternative dashboard for Domoticz.

Fork from Dashticz v2.
The Dashboard of Domoticz is quite powerful. The disadvantage is that it's only possible to show information known in Domoticz.
There is where Dashticz steps in. Dashticz is able to show (almost) all Domoticz information.
In addition to that it's possible to show information from all kind of other sources.

# Screenshots
![alt tag](http://i.imgur.com/9DBcpNd.jpg)

# Installation instructions
See https://dashticz.readthedocs.io/en/latest/gettingstarted/

# Documentation and support
Documentation can be found on:
https://dashticz-v3.readthedocs.io
https://dashticz.readthedocs.io

For additional information and support please visit the Dashticz forum:
https://www.domoticz.com/forum/viewforum.php?f=67

**Additional info**

This currently is the active Dashticz repository. Previous repositories (dashticz/dashticz_v2 and dashticzv3/dashticz_v3) will not be updated anymore.
42 changes: 31 additions & 11 deletions css/creative.css
Original file line number Diff line number Diff line change
Expand Up @@ -370,22 +370,22 @@ a.playlist {

.containsspotify #current {
overflow: hidden;
background-color: #282828;
}

.containsspotify #current .current_image {
float: left;
margin:2px 0px 5px 2px;
width: calc(32% - 2px);
/* width: calc(32% - 2px);*/
width: 68px;
}

.containsspotify #current .current_image img {
max-width:64px;
max-width: 64px;
}
.containsspotify #current .current_info {
float: left;
padding-left:10px;
width: calc(68%);
width: calc(100% - 72px);
}
.containsspotify #current .current_artist {
font-weight: bold;
Expand All @@ -401,7 +401,7 @@ a.playlist {
max-height: 33px;
}
.containsspotify .change {
background-color: #282828;
/* background-color: #282828;*/
display: block;
margin-top: -4px;
padding: 3px;
Expand All @@ -421,13 +421,15 @@ a.playlist {
width: 100%;
max-width: 100%;
color: #fff !important;
background-color: #282828;
background-color: transparent;

border: 0px;
padding-left: 0px;
}

.containsspotify select.devices option{
color: #fff !important;
color: #fff !important;
background-color: #292b2c;
}

.spotback {
Expand Down Expand Up @@ -635,7 +637,7 @@ hr {
background-image:none !important;
background-color:#313131;
}
.standby .far,.standby .far.fa-small,.standby .fas,.standby .fas.fa-small,.standby .fab,.standby .fab.fa-small, {
.standby .far,.standby .far.fa-small,.standby .fas,.standby .fas.fa-small,.standby .fab,.standby .fab.fa-small {
color:#fff !important;
}

Expand Down Expand Up @@ -1089,7 +1091,8 @@ img.icon {
margin-right: 3px !important;
}

@media (max-width: 1400px) {
/*
@media (max-width: 975px) {
.col-icon {
width:30px !important;
Expand All @@ -1109,10 +1112,18 @@ img.icon {
}
.col-data {
width: calc(100% - 34px);
// padding-left: 34px;
}
}
*/

.containsweather .col-xs-1 {
width: 50px
}

.containsweather .col-xs-11 {
width: calc(100% - 50px)
}

@media (max-width: 975px) {
div.mh {
Expand All @@ -1132,9 +1143,18 @@ img.icon {
margin-left:0px !important
}
div.big {
padding-top: 9px !important;
padding-left: 13px !important;
}


.containsweather .col-xs-1 {
width: 35px
}

.containsweather .col-xs-11 {
width: calc(100% - 35px)
}

img.icon {
max-width:15px !important;
}
Expand Down
2 changes: 1 addition & 1 deletion custom/CONFIG_DEFAULT.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

var config = {}
config['domoticz_ip'] = 'http://192.168.1.3:8084';
config['app_title'] = 'Dashticz';
config['app_title'] = 'Dashticz V3';
config['domoticz_refresh'] = '5';
config['dashticz_refresh'] = '60';

Expand Down
Loading

0 comments on commit e9cb2d1

Please sign in to comment.