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
efd40e5b
Commit
efd40e5b
authored
Nov 08, 2013
by
nextime
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed 2 minor bugs and add FILEEXISTS status action
parent
d2abecb7
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
2 deletions
+7
-2
actions.php
Web/htdocs/gui/buttons/actions.php
+1
-1
common.php
Web/htdocs/gui/includes/common.php
+1
-1
domotika.py
domotika/domotika.py
+5
-0
No files found.
Web/htdocs/gui/buttons/actions.php
View file @
efd40e5b
...
@@ -18,7 +18,7 @@ if(intval($button['status2'])>0) {
...
@@ -18,7 +18,7 @@ if(intval($button['status2'])>0) {
<div
class=
"badge devlist-topdata
<?=
$badgecolor
?>
"
data-domotika-act2col=
"
<?=
$button
[
'id'
]
?>
"
<div
class=
"badge devlist-topdata
<?=
$badgecolor
?>
"
data-domotika-act2col=
"
<?=
$button
[
'id'
]
?>
"
data-dmcolor-off=
"badge-
<?=
$dmcolors
[
$button
[
'color2_off'
]]
?>
"
data-dmcolor-on=
"badge-
<?=
$dmcolors
[
$button
[
'color2_on'
]]
?>
"
>
data-dmcolor-off=
"badge-
<?=
$dmcolors
[
$button
[
'color2_off'
]]
?>
"
data-dmcolor-on=
"badge-
<?=
$dmcolors
[
$button
[
'color2_on'
]]
?>
"
>
<div
style=
"width:100%;min-width:-moz-fit-content;"
><span
data-domotika-act2textid=
"
<?=
$button
[
'id'
]
?>
"
<div
style=
"width:100%;min-width:-moz-fit-content;"
><span
data-domotika-act2textid=
"
<?=
$button
[
'id'
]
?>
"
data-dmtext-on=
<?=
$button
[
'text2_on'
]
?>
"
"
data-dmtext-off=
"
<?=
$button
[
'text2_off'
]
?>
"
>
<?=
$badgetext
;
?>
</span></div>
data-dmtext-on=
"
<?=
$button
[
'text2_on'
]
?>
"
data-dmtext-off=
"
<?=
$button
[
'text2_off'
]
?>
"
>
<?=
$badgetext
;
?>
</span></div>
<?
<?
if
(
is_array
(
$button_switchar
)
&&
in_array
(
$button
[
'ctx'
],
$button_switchar
))
{
if
(
is_array
(
$button_switchar
)
&&
in_array
(
$button
[
'ctx'
],
$button_switchar
))
{
...
...
Web/htdocs/gui/includes/common.php
View file @
efd40e5b
...
@@ -120,7 +120,7 @@ function getPanelIO($table, $content, $websection, $activeonly=true, $where="",$
...
@@ -120,7 +120,7 @@ function getPanelIO($table, $content, $websection, $activeonly=true, $where="",$
{
{
$dom
=
"ikap_dst"
;
$dom
=
"ikap_dst"
;
$ljoin
=
"actstatus on actions.id=actstatus.buttonid"
;
$ljoin
=
"actstatus on actions.id=actstatus.buttonid"
;
$add
=
"actstatus.status as status"
;
$add
=
"actstatus.status as status
, actstatus.status2 as status2
"
;
}
}
else
// output
else
// output
{
{
...
...
domotika/domotika.py
View file @
efd40e5b
...
@@ -940,6 +940,11 @@ class domotikaService(service.Service):
...
@@ -940,6 +940,11 @@ class domotikaService(service.Service):
f
=
open
(
trigger
[
5
:]
.
split
()[
0
],
"r"
)
f
=
open
(
trigger
[
5
:]
.
split
()[
0
],
"r"
)
ret
=
defer
.
succeed
(
parseReturn
(
f
.
read
(),
reverse
))
ret
=
defer
.
succeed
(
parseReturn
(
f
.
read
(),
reverse
))
f
.
close
()
f
.
close
()
if
trigger
.
startswith
(
"FILEEXISTS "
)
or
trigger
.
startswith
(
"FILEEXISTS:"
):
if
os
.
path
.
isfile
(
trigger
[
11
:]
.
split
()[
0
]):
ret
=
defer
.
succeed
(
parseReturn
(
'1'
,
reverse
))
else
:
ret
=
defer
.
succeed
(
parseReturn
(
'0'
,
reverse
))
elif
trigger
.
startswith
(
"SYSTEM "
)
or
trigger
.
startswith
(
"SYSTEM:"
):
elif
trigger
.
startswith
(
"SYSTEM "
)
or
trigger
.
startswith
(
"SYSTEM:"
):
cmdline
=
trigger
[
7
:]
cmdline
=
trigger
[
7
:]
ret
=
subprocess
.
Popen
(
cmdline
.
replace
(
"
\r\n
"
,
" "
),
ret
=
subprocess
.
Popen
(
cmdline
.
replace
(
"
\r\n
"
,
" "
),
...
...
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