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
b7e69421
Commit
b7e69421
authored
11 years ago
by
nextime
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add forced autodetection to REST and admin gui
parent
057d86b3
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
17 additions
and
5 deletions
+17
-5
index.php
Web/admin/index.php
+6
-2
0d149b90e7394297301c90191ae775f0.cache
...translations/cache/0d149b90e7394297301c90191ae775f0.cache
+1
-1
bd21190449b7e88db48fa0f580a8f666.cache
...translations/cache/bd21190449b7e88db48fa0f580a8f666.cache
+1
-1
domotika.py
domotika/domotika.py
+3
-1
rest.py
domotika/web/rest.py
+6
-0
No files found.
Web/admin/index.php
View file @
b7e69421
...
...
@@ -78,7 +78,8 @@
deleted or invalidated.
</div>
<div
class=
"modal-footer"
>
<button
type=
"button"
class=
"btn btn-default"
data-dismiss=
"modal"
>
Discard
</button>
<button
type=
"button"
class=
"btn btn-default pull-left"
data-dismiss=
"modal"
>
Discard
</button>
<input
type=
"checkbox"
id=
"forcedetect"
>
Force detection
</input>
<button
type=
"button"
class=
"btn btn-danger"
data-dismiss=
"modal"
id=
"startdetection"
>
Start Autodetection
</button>
</div>
</div>
<!-- /.modal-content -->
...
...
@@ -214,7 +215,10 @@
<script
type=
"text/javascript"
>
$
(
"#startdetection"
).
click
(
function
()
{
$
.
get
(
"/rest/v1.2/boards/autodetect/json"
);
if
(
$
(
'#forcedetect'
).
is
(
":checked"
))
$
.
get
(
"/rest/v1.2/boards/forceautodetect/json"
);
else
$
.
get
(
"/rest/v1.2/boards/autodetect/json"
);
}
);
</script>
...
...
This diff is collapsed.
Click to expand it.
Web/htdocs/gui/translations/cache/0d149b90e7394297301c90191ae775f0.cache
View file @
b7e69421
a:2:{s:9:"timestamp";i:1383439313;s:12:"translations";a:17:{s:4:"home";s:4:"home";s:5:"blind";s:10:"tapparelle";s:8:"cancello";s:8:"cancelli";s:5:"clima";s:5:"clima";s:4:"door";s:5:"porte";s:3:"led";s:3:"led";s:5:"light";s:4:"luci";s:7:"scenari";s:7:"scenari";s:6:"socket";s:5:"prese";s:6:"valvle";s:7:"valvole";s:6:"sensor";s:7:"sensori";s:6:"camera";s:10:"telecamere";s:6:"window";s:8:"finestre";s:4:"user";s:4:"user";s:4:"none";s:15:"Nessuna Sezione";s:5:"phone";s:8:"telefono";s:5:"index";s:4:"Home";}}
\ No newline at end of file
a:2:{s:9:"timestamp";i:1388713246;s:12:"translations";a:17:{s:4:"home";s:4:"home";s:5:"blind";s:10:"tapparelle";s:8:"cancello";s:8:"cancelli";s:5:"clima";s:5:"clima";s:4:"door";s:5:"porte";s:3:"led";s:3:"led";s:5:"light";s:4:"luci";s:7:"scenari";s:7:"scenari";s:6:"socket";s:5:"prese";s:6:"valvle";s:7:"valvole";s:6:"sensor";s:7:"sensori";s:6:"camera";s:10:"telecamere";s:6:"window";s:8:"finestre";s:4:"user";s:4:"user";s:4:"none";s:15:"Nessuna Sezione";s:5:"phone";s:8:"telefono";s:5:"index";s:4:"Home";}}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Web/htdocs/gui/translations/cache/bd21190449b7e88db48fa0f580a8f666.cache
View file @
b7e69421
a:2:{s:9:"timestamp";i:1383439313;s:12:"translations";a:9:{s:16:"websection.blind";s:38:"/domotika/mobile/images/tapparelle.jpg";s:19:"websection.cancello";s:36:"/domotika/mobile/images/cancelli.jpg";s:16:"websection.clima";s:33:"/domotika/mobile/images/clima.jpg";s:15:"websection.door";s:33:"/domotika/mobile/images/porte.jpg";s:14:"websection.led";s:31:"/domotika/mobile/images/led.jpg";s:16:"websection.light";s:32:"/domotika/mobile/images/luci.jpg";s:18:"websection.scenari";s:35:"/domotika/mobile/images/scenari.jpg";s:17:"websection.socket";s:33:"/domotika/mobile/images/prese.jpg";s:17:"websection.valvle";s:35:"/domotika/mobile/images/valvole.jpg";}}
\ No newline at end of file
a:2:{s:9:"timestamp";i:1388713246;s:12:"translations";a:9:{s:16:"websection.blind";s:38:"/domotika/mobile/images/tapparelle.jpg";s:19:"websection.cancello";s:36:"/domotika/mobile/images/cancelli.jpg";s:16:"websection.clima";s:33:"/domotika/mobile/images/clima.jpg";s:15:"websection.door";s:33:"/domotika/mobile/images/porte.jpg";s:14:"websection.led";s:31:"/domotika/mobile/images/led.jpg";s:16:"websection.light";s:32:"/domotika/mobile/images/luci.jpg";s:18:"websection.scenari";s:35:"/domotika/mobile/images/scenari.jpg";s:17:"websection.socket";s:33:"/domotika/mobile/images/prese.jpg";s:17:"websection.valvle";s:35:"/domotika/mobile/images/valvole.jpg";}}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
domotika/domotika.py
View file @
b7e69421
...
...
@@ -2186,7 +2186,9 @@ class domotikaService(service.Service):
def
web_on_getDaemonStatus
(
self
):
return
self
.
daemonstatus
def
web_on_startAutoDetection
(
self
):
def
web_on_startAutoDetection
(
self
,
force
=
False
):
if
force
:
self
.
resetBoards
()
self
.
autoDetectBoards
()
return
self
.
daemonstatus
...
...
This diff is collapsed.
Click to expand it.
domotika/web/rest.py
View file @
b7e69421
...
...
@@ -306,6 +306,12 @@ class BoardRest(RestCore):
self
.
core
.
startAutoDetection
()
ResponseConversion
(
request
,
entity
=
'OK'
)
@
route
(
"/forceautodetect"
)
@
wrapResponse
def
boardForceAutodetect
(
self
,
request
,
*
a
,
**
kw
):
self
.
core
.
startAutoDetection
(
True
)
ResponseConversion
(
request
,
entity
=
'OK'
)
class
CronRest
(
RestCore
):
...
...
This diff is collapsed.
Click to expand it.
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