2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-01-31 12:49:34 +00:00

fhemweb.js: Raw definition changes (Forum #56949)

git-svn-id: https://svn.fhem.de/fhem/trunk@12423 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
rudolfkoenig 2016-10-24 17:30:37 +00:00
parent 1c79942a4d
commit 87e7265b15
2 changed files with 10 additions and 10 deletions

View File

@ -1404,7 +1404,7 @@ WriteStatefile()
$stateFile = ResolveDateWildcards($stateFile, @t);
if(!open(SFH, ">$stateFile")) {
my $msg = "WriteStateFile: Cannot open $stateFile: $!";
my $msg = "WriteStatefile: Cannot open $stateFile: $!";
Log 1, $msg;
return $msg;
}
@ -2166,16 +2166,16 @@ CommandList($$)
my $str = "";
if($param =~ m/^-r *(.*)$/) {
my $arg = ($1 ? $1 : ".*");
foreach my $d (devspec2array($arg,$cl)) {
if(!defined($defs{$d})) {
$str .= "No device named $d found";
last;
}
my @list = devspec2array($1 ? $1 : ".*", $cl);
foreach my $d (sort @list) {
return "No device named $d found" if(!defined($defs{$d}));
$str .= "\n" if($str);
my @a = GetDefAndAttr($d);
$str .= join("\n", @a)."\n" if(@a);
@a = GetAllReadings($d);
}
foreach my $d (sort @list) {
$str .= "\n" if($str);
my @a = GetAllReadings($d);
$str .= join("\n", @a)."\n" if(@a);
}
return $str;

View File

@ -600,7 +600,7 @@ FW_rawDef()
$("#content").append('<div id="rawDef">'+
'<textarea id="td_longText" rows="25" cols="60" style="width:99%"/>'+
'<button>Apply changes</button>'+
'<button>Execute commands</button>'+
'</div></br>');
FW_cmd(FW_root+"?cmd=list -r "+dev+"&XHR=1", function(data) {
@ -626,7 +626,7 @@ FW_rawDef()
doNext()
{
if(++i1 >= arr.length) {
return FW_okDialog("Applied changes, no errors found.");
return FW_okDialog("Executed everything, no errors found.");
return;
}
str += arr[i1];