HomeGenie Forum
Automation Program Plugins and Wizard Scripting => Help => Topic started by: wolfgang928 on September 10, 2016, 09:41:52 AM
-
Hello all,
i'm just playing with download a widget side filtered list content to a locale log file from inside widget.
Due to missing js libraries like FileSaver.js or others i found the adaption of the maintenance log download function
$('#btn_configuresystem_downloadtday').bind('click', function () {
window.open('/api/HomeAutomation.HomeGenie/Config/System.Configure/SystemLogging.DownloadCsv/0');
});
which is using a
(request.Context.Data as HttpListenerContext).Response.AddHeader("Content-Disposition", "attachment;filename=homegenie_log_" + migCommand.GetOption(1) + ".csv");
request.ResponseData = csvlog;
Is there any other way to make this locale inside widget, because all my data are inside widget yet and not on the server side due to the filtering feature.
Thanks for a hint!
Wolfgang
-
Just read - helped me with some /API calls I was working on (Program.Stores).
Thanks!
-
Hello all,
i'm just playing with download a widget side filtered list content to a locale log file from inside widget.
Due to missing js libraries like FileSaver.js or others i found the adaption of the maintenance log download function
$('#btn_configuresystem_downloadtday').bind('click', function () {
window.open('/api/HomeAutomation.HomeGenie/Config/System.Configure/SystemLogging.DownloadCsv/0');
});
which is using a
(request.Context.Data as HttpListenerContext).Response.AddHeader("Content-Disposition", "attachment;filename=homegenie_log_" + migCommand.GetOption(1) + ".csv");
request.ResponseData = csvlog;
Is there any other way to make this locale inside widget, because all my data are inside widget yet and not on the server side due to the filtering feature.
Thanks for a hint!
Wolfgang
This sounds cool. Is the code available?