Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
D
domotikad
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
domotika
domotikad
Commits
d64227e0
Commit
d64227e0
authored
Jan 20, 2014
by
nextime
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Better panel sizing and hide empty panels on standard GUI
parent
48736f78
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
68 additions
and
36 deletions
+68
-36
common.php
Web/htdocs/gui/includes/common.php
+2
-0
actuations.php
Web/htdocs/gui/pages/actuations.php
+6
-10
cameras.php
Web/htdocs/gui/pages/cameras.php
+1
-8
index.php
Web/htdocs/gui/pages/index.php
+1
-8
video.php
Web/htdocs/gui/pages/video.php
+1
-8
standard.php
Web/htdocs/gui/panels/content/standard.php
+1
-1
include.php
Web/htdocs/gui/panels/include.php
+37
-0
standard.php
Web/htdocs/gui/panels/panelcheck/standard.php
+8
-0
common_includes.php
Web/includes/common_includes.php
+2
-1
zwaved.py
daemons/zwave/zwaved.py
+9
-0
No files found.
Web/htdocs/gui/includes/common.php
View file @
d64227e0
...
@@ -45,6 +45,8 @@ $PAGE_ADDFOOTJS = "";
...
@@ -45,6 +45,8 @@ $PAGE_ADDFOOTJS = "";
$PAGE_ADDLEFT
=
""
;
$PAGE_ADDLEFT
=
""
;
$PAGE_ADDRIGHT
=
""
;
$PAGE_ADDRIGHT
=
""
;
$SHOW_EMPTY_PANELS
=
TRUE
;
function
addFootJS
(
$file
)
function
addFootJS
(
$file
)
{
{
ob_start
();
ob_start
();
...
...
Web/htdocs/gui/pages/actuations.php
View file @
d64227e0
...
@@ -2,19 +2,15 @@
...
@@ -2,19 +2,15 @@
<div
class=
"insider"
>
<div
class=
"insider"
>
<?
<?
$paneldimensions
=
array
(
'dimensions'
=>
array
(
4
=>
'50%'
));
$SHOW_EMPTY_PANELS
=
FALSE
;
$panels
=
array
();
$panels
=
array
();
$panels
[]
=
array
(
'panel_title'
=>
$tr
->
Get
(
$GUISUBSECTION
)
.
" - "
.
$tr
->
Get
(
"Actions"
),
'panel_sections'
=>
'actions'
,
'panel_websections'
=>
$GUISUBSECTION
,
'panel_cols'
=>
4
,
'panel_height'
=>
'100%'
)
+
$PANELDEFAULTS
;
$panels
[]
=
array
(
'panel_title'
=>
$tr
->
Get
(
$GUISUBSECTION
)
.
" - "
.
$tr
->
Get
(
"Actions"
),
'panel_sections'
=>
'actions'
,
'panel_websections'
=>
$GUISUBSECTION
,
'panel_cols'
=>
4
,
'panel_height'
=>
'100%'
)
+
$PANELDEFAULTS
;
$panels
[]
=
array
(
'panel_title'
=>
$tr
->
Get
(
$GUISUBSECTION
)
.
" - "
.
$tr
->
Get
(
"Outputs"
),
'panel_sections'
=>
'output'
,
'panel_websections'
=>
$GUISUBSECTION
,
'panel_cols'
=>
4
,
'panel_height'
=>
'100%'
)
+
$PANELDEFAULTS
;
$panels
[]
=
array
(
'panel_title'
=>
$tr
->
Get
(
$GUISUBSECTION
)
.
" - "
.
$tr
->
Get
(
"Outputs"
),
'panel_sections'
=>
'output'
,
'panel_websections'
=>
$GUISUBSECTION
,
'panel_cols'
=>
4
,
'panel_height'
=>
'100%'
)
+
$PANELDEFAULTS
;
$panels
[]
=
array
(
'panel_title'
=>
$tr
->
Get
(
$GUISUBSECTION
)
.
" - "
.
$tr
->
Get
(
"Inputs"
),
'panel_sections'
=>
'input'
,
'panel_websections'
=>
$GUISUBSECTION
,
'panel_cols'
=>
4
,
'panel_height'
=>
'
50%'
)
+
$PANELDEFAULTS
;
$panels
[]
=
array
(
'panel_title'
=>
$tr
->
Get
(
$GUISUBSECTION
)
.
" - "
.
$tr
->
Get
(
"Inputs"
),
'panel_sections'
=>
'input'
,
'panel_websections'
=>
$GUISUBSECTION
,
'panel_cols'
=>
4
,
'panel_height'
=>
'
100%'
)
+
$PANELDEFAULTS
+
$paneldimensions
;
$panels
[]
=
array
(
'panel_title'
=>
$tr
->
Get
(
$GUISUBSECTION
)
.
" - "
.
$tr
->
Get
(
"Analogs"
),
'panel_sections'
=>
'analog'
,
'panel_websections'
=>
$GUISUBSECTION
,
'panel_cols'
=>
4
,
'panel_height'
=>
'
50%'
)
+
$PANELDEFAULTS
;
$panels
[]
=
array
(
'panel_title'
=>
$tr
->
Get
(
$GUISUBSECTION
)
.
" - "
.
$tr
->
Get
(
"Analogs"
),
'panel_sections'
=>
'analog'
,
'panel_websections'
=>
$GUISUBSECTION
,
'panel_cols'
=>
4
,
'panel_height'
=>
'
100%'
)
+
$PANELDEFAULTS
+
$paneldimensions
;
foreach
(
$panels
as
$panel
)
{
include
(
$FSPATH
.
"/panels/include.php"
);
if
(
file_exists
(
$FSPATH
.
"/panels/head/"
.
$panel
[
'panel_type'
]
.
".php"
))
addHead
(
$FSPATH
.
"/panels/head/"
.
$panel
[
'panel_type'
]
.
".php"
);
if
(
file_exists
(
$FSPATH
.
"/panels/content/"
.
$panel
[
'panel_type'
]
.
".php"
))
include
(
$FSPATH
.
"/panels/content/"
.
$panel
[
'panel_type'
]
.
".php"
);
if
(
file_exists
(
$FSPATH
.
"/panels/footjs/"
.
$panel
[
'panel_type'
]
.
".php"
))
addFootJS
(
$FSPATH
.
"/panels/footjs/"
.
$panel
[
'panel_type'
]
.
".php"
);
}
?>
?>
</div>
<!-- insider -->
</div>
<!-- insider -->
Web/htdocs/gui/pages/cameras.php
View file @
d64227e0
...
@@ -54,13 +54,6 @@ if(!is_array($panels) or count($panels)<1) {
...
@@ -54,13 +54,6 @@ if(!is_array($panels) or count($panels)<1) {
DB
::
query
(
$q
);
DB
::
query
(
$q
);
}
}
}
}
foreach
(
$panels
as
$panel
)
{
include
(
$FSPATH
.
"/panels/include.php"
);
if
(
file_exists
(
$FSPATH
.
"/panels/head/"
.
$panel
[
'panel_type'
]
.
".php"
))
addHead
(
$FSPATH
.
"/panels/head/"
.
$panel
[
'panel_type'
]
.
".php"
);
if
(
file_exists
(
$FSPATH
.
"/panels/content/"
.
$panel
[
'panel_type'
]
.
".php"
))
include
(
$FSPATH
.
"/panels/content/"
.
$panel
[
'panel_type'
]
.
".php"
);
if
(
file_exists
(
$FSPATH
.
"/panels/footjs/"
.
$panel
[
'panel_type'
]
.
".php"
))
addFootJS
(
$FSPATH
.
"/panels/footjs/"
.
$panel
[
'panel_type'
]
.
".php"
);
}
?>
?>
</div>
<!-- row -->
</div>
<!-- row -->
Web/htdocs/gui/pages/index.php
View file @
d64227e0
...
@@ -25,13 +25,6 @@ if(!$panels or count($panels)<1) {
...
@@ -25,13 +25,6 @@ if(!$panels or count($panels)<1) {
}
}
}
}
foreach
(
$panels
as
$panel
)
{
include
(
$FSPATH
.
"/panels/include.php"
);
if
(
file_exists
(
$FSPATH
.
"/panels/head/"
.
$panel
[
'panel_type'
]
.
".php"
))
addHead
(
$FSPATH
.
"/panels/head/"
.
$panel
[
'panel_type'
]
.
".php"
);
if
(
file_exists
(
$FSPATH
.
"/panels/content/"
.
$panel
[
'panel_type'
]
.
".php"
))
include
(
$FSPATH
.
"/panels/content/"
.
$panel
[
'panel_type'
]
.
".php"
);
if
(
file_exists
(
$FSPATH
.
"/panels/footjs/"
.
$panel
[
'panel_type'
]
.
".php"
))
addFootJS
(
$FSPATH
.
"/panels/footjs/"
.
$panel
[
'panel_type'
]
.
".php"
);
}
?>
?>
</div>
<!-- row -->
</div>
<!-- row -->
Web/htdocs/gui/pages/video.php
View file @
d64227e0
...
@@ -48,13 +48,6 @@ if(!is_array($panels) or count($panels)<1) {
...
@@ -48,13 +48,6 @@ if(!is_array($panels) or count($panels)<1) {
DB
::
query
(
$q
);
DB
::
query
(
$q
);
}
}
}
}
foreach
(
$panels
as
$panel
)
{
include
(
$FSPATH
.
"/panels/include.php"
);
if
(
file_exists
(
$FSPATH
.
"/panels/head/"
.
$panel
[
'panel_type'
]
.
".php"
))
addHead
(
$FSPATH
.
"/panels/head/"
.
$panel
[
'panel_type'
]
.
".php"
);
if
(
file_exists
(
$FSPATH
.
"/panels/content/"
.
$panel
[
'panel_type'
]
.
".php"
))
include
(
$FSPATH
.
"/panels/content/"
.
$panel
[
'panel_type'
]
.
".php"
);
if
(
file_exists
(
$FSPATH
.
"/panels/footjs/"
.
$panel
[
'panel_type'
]
.
".php"
))
addFootJS
(
$FSPATH
.
"/panels/footjs/"
.
$panel
[
'panel_type'
]
.
".php"
);
}
?>
?>
</div>
<!-- row -->
</div>
<!-- row -->
Web/htdocs/gui/panels/content/standard.php
View file @
d64227e0
<?
@
include_once
(
"../../includes/common.php"
);
?>
<?
@
include_once
(
"../../includes/common.php"
);
?>
<?
<?
if
(
$panel
&&
is_array
(
$panel
))
{
if
(
$panel
&&
is_array
(
$panel
))
{
$buttonar
=
getPanelButtons
(
$_DOMOTIKA
[
'username'
],
$panel
[
'panel_content'
],
$panel
[
'panel_sections'
],
$panel
[
'panel_websections'
],
$panel
[
'panel_selector'
],
true
);
//
$buttonar=getPanelButtons($_DOMOTIKA['username'],$panel['panel_content'],$panel['panel_sections'],$panel['panel_websections'],$panel['panel_selector'],true);
//print_r($buttonar);
//print_r($buttonar);
if
(
is_numeric
(
$panel
[
'panel_height'
]))
$panel
[
'panel_height'
]
.=
"px"
;
if
(
is_numeric
(
$panel
[
'panel_height'
]))
$panel
[
'panel_height'
]
.=
"px"
;
$visible
=
""
;
$visible
=
""
;
...
...
Web/htdocs/gui/panels/include.php
0 → 100644
View file @
d64227e0
<?
@
include_once
(
"../../includes/common.php"
);
?>
<?
foreach
(
$panels
as
$panel
)
{
$paneldo
=
TRUE
;
$buttonar
=
FALSE
;
if
(
file_exists
(
$FSPATH
.
"/panels/panelcheck/"
.
$panel
[
'panel_type'
]
.
".php"
))
{
$paneldo
=
FALSE
;
include
(
$FSPATH
.
"/panels/panelcheck/"
.
$panel
[
'panel_type'
]
.
".php"
);
}
if
(
$paneldo
||
$SHOW_EMPTY_PANELS
)
{
$showpanels
[]
=
array
(
'panel'
=>
$panel
,
'buttons'
=>
$buttonar
);
}
}
$totpans
=
count
(
$showpanels
);
foreach
(
$showpanels
as
$panelar
)
{
$buttonar
=
$panelar
[
'buttons'
];
$panel
=
$panelar
[
'panel'
];
if
(
array_key_exists
(
'dimensions'
,
$panel
))
{
if
(
array_key_exists
(
$totpans
,
$panel
[
'dimensions'
]))
{
$panel
[
'panel_height'
]
=
$panel
[
'dimensions'
][
$totpans
];
}
}
if
(
file_exists
(
$FSPATH
.
"/panels/head/"
.
$panel
[
'panel_type'
]
.
".php"
))
addHead
(
$FSPATH
.
"/panels/head/"
.
$panel
[
'panel_type'
]
.
".php"
);
if
(
file_exists
(
$FSPATH
.
"/panels/content/"
.
$panel
[
'panel_type'
]
.
".php"
))
include
(
$FSPATH
.
"/panels/content/"
.
$panel
[
'panel_type'
]
.
".php"
);
if
(
file_exists
(
$FSPATH
.
"/panels/footjs/"
.
$panel
[
'panel_type'
]
.
".php"
))
addFootJS
(
$FSPATH
.
"/panels/footjs/"
.
$panel
[
'panel_type'
]
.
".php"
);
}
?>
Web/htdocs/gui/panels/panelcheck/standard.php
0 → 100644
View file @
d64227e0
<?
@
include_once
(
"../../includes/common.php"
);
?>
<?
if
(
$panel
&&
is_array
(
$panel
))
{
$buttonar
=
getPanelButtons
(
$_DOMOTIKA
[
'username'
],
$panel
[
'panel_content'
],
$panel
[
'panel_sections'
],
$panel
[
'panel_websections'
],
$panel
[
'panel_selector'
],
true
);
if
(
count
(
$buttonar
)
>
0
)
$paneldo
=
TRUE
;
}
?>
Web/includes/common_includes.php
View file @
d64227e0
...
@@ -9,7 +9,8 @@ $PANELDEFAULTS=array(
...
@@ -9,7 +9,8 @@ $PANELDEFAULTS=array(
'panel_websections'
=>
'*'
,
'panel_websections'
=>
'*'
,
'panel_selector'
=>
'dmdomain'
,
'panel_selector'
=>
'dmdomain'
,
'panel_content'
=>
''
,
'panel_content'
=>
''
,
'panel_visible'
=>
'all'
'panel_visible'
=>
'all'
,
'panel_position'
=>
0
);
);
require_once
(
"session.php"
);
require_once
(
"session.php"
);
...
...
daemons/zwave/zwaved.py
View file @
d64227e0
...
@@ -10,6 +10,13 @@ from dmlib.daemonizer import Daemonizer
...
@@ -10,6 +10,13 @@ from dmlib.daemonizer import Daemonizer
from
dmlib.utils.genutils
import
configFile
from
dmlib.utils.genutils
import
configFile
import
logging
,
time
,
sys
,
os
import
logging
,
time
,
sys
,
os
from
logging
import
handlers
as
loghandlers
from
logging
import
handlers
as
loghandlers
from
corepost
import
Response
,
NotFoundException
,
AlreadyExistsException
from
corepost.web
import
RESTResource
,
route
,
Http
from
corepost.convert
import
convertForSerialization
,
generateXml
,
convertToJson
from
corepost.enums
import
MediaType
,
HttpHeader
import
yaml
try
:
try
:
...
@@ -24,6 +31,8 @@ log = logging.getLogger( 'ZWaved' )
...
@@ -24,6 +31,8 @@ log = logging.getLogger( 'ZWaved' )
CURDIR
=
os
.
path
.
abspath
(
os
.
path
.
dirname
(
sys
.
argv
[
0
]))
CURDIR
=
os
.
path
.
abspath
(
os
.
path
.
dirname
(
sys
.
argv
[
0
]))
sys
.
path
.
append
(
os
.
path
.
abspath
(
CURDIR
+
"/../../"
))
sys
.
path
.
append
(
os
.
path
.
abspath
(
CURDIR
+
"/../../"
))
from
domotika.web
import
sse
"""
"""
{'homeId': 23191651L, 'event': 0, 'valueId': {'index': 0, 'units': '', 'type': 'Bool', 'nodeId': 2, 'value': None, 'commandClass': 'COMMAND_CLASS_NO_OPERATION', 'instance': 1, 'readOnly': False, 'homeId': 23191651L, 'label': '', 'genre': 'Basic', 'id': 72057594071482368L}, 'notificationType': 'NodeEvent', 'nodeId': 2}
{'homeId': 23191651L, 'event': 0, 'valueId': {'index': 0, 'units': '', 'type': 'Bool', 'nodeId': 2, 'value': None, 'commandClass': 'COMMAND_CLASS_NO_OPERATION', 'instance': 1, 'readOnly': False, 'homeId': 23191651L, 'label': '', 'genre': 'Basic', 'id': 72057594071482368L}, 'notificationType': 'NodeEvent', 'nodeId': 2}
"""
"""
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment