Repository navigation
Feature/multiple variables - #16
Conversation
some are Copy from Backup
TillBrede
left a comment
There was a problem hiding this comment.
Habe das Modul auf der 2 getestet. Das Zippen und Aufteilen auf mehrere Dateien scheint zu laufe. Bei mir lokal konnte ich den Branch nicht auschecken (Problem mit composer?). Das hochladen über FTP/SFTP/FTPS konnte ich nicht komplett testen (SB_UIGoDeeper, TargetDir). Der Login und das auslesen der Verzeichnisse läuft aber.
| "confirm": "Go into this Directory?" | ||
| }, | ||
| { | ||
| "onClick": "SB_UIGoDeeper($id,$CurrentDir.'/'.$SelectTargetDirectory['SelectedDirectory'],$Host, $Port, $Username, $Password, $ConnectionType);", |
| }, | ||
| { | ||
| "type": "Label", | ||
| "caption": "Single File per Variable will zip in a archive", |
| if (!$showError) { | ||
| $this->SetStatus(201); | ||
| } else { | ||
| echo $this->Translate('Username/Password is invalid'); |
There was a problem hiding this comment.
Was meinst du mit unschönen Fehlermeldungen?
There was a problem hiding this comment.
Die Fehlermeldung im Bild. Bei SFTP wird einfach 'Username/Password is invalid' angezeigt. Bei dem Rest wird nichts abgefangen.
| //*---------------*// | ||
|
|
||
| /** Handle the export via Button */ | ||
| public function UserExport(int $ArchiveVariable, int $AggregationStage, string $AggregationStart, string $AggregationEnd) |
There was a problem hiding this comment.
ArchiveVariable wird wohl nur für die Fehlermeldung genutzt
| */ | ||
| private function fetchAllValues(string $filePath, int $variable, int $level, int $start, int $end, int $limit) | ||
| { | ||
| $separator = $this->ReadPropertyString('DecimalSeparator'); |
There was a problem hiding this comment.
Es wird nicht geprüft ob die Variablen existieren. Nicht existierende Variablen führen zu unschönen Fehlermeldungen
TillBrede
left a comment
There was a problem hiding this comment.
Der Login Fehler wird noch nicht schön abgefangen.
Funktional konnte ich nicht testen, da das Submodul fehlt / nicht richtig geladen wird
| if (!$showError) { | ||
| $this->SetStatus(201); | ||
| } else { | ||
| echo $this->Translate('Username/Password is invalid'); |
There was a problem hiding this comment.
Die Fehlermeldung im Bild. Bei SFTP wird einfach 'Username/Password is invalid' angezeigt. Bei dem Rest wird nichts abgefangen.
try to fix the composer autoload
- Fix cyclic timer for daily/weekly/monthly/yearly intervals - Upload FTP/SFTP files into the target directory by file name - Catch connection and login errors for FTP, FTPS and SFTP - Use the instance based export path for download, mail and cleanup - Fix MySQL export and hide the option without SyncMySQL - Migrate the ArchiveVariable configuration of version 1.x - Keep columns aligned in the multi variable export - Remove duplicated rows in the raw value export - Add missing translations and the target directory status
Active mode fails if the server cannot connect back (NAT, firewall). Wait 10 seconds for the server like SFTP instead of 90.
- Return false from Export and UserExport if nothing could be exported - Show errors of the download button and its own progress bar - Return 404 from the hook if the export was already deleted - Lock the export per instance and name the temp files per instance - Empty the temp file before fetching, so no stale rows are exported
- Check the configuration on every run, so a failed sending is retried - Check the FTP connection while sending instead of in ApplyChanges - "Send Mail Now" and "Send File now" only use their own method - Use the exported period in the mail subject - Report failed mails and transfers
Symcon ignores default values of parameters, so CSV_SendCyclic with only the instance ID failed with "Wrong parameter count" on every run.
Scripts of version 1.x call both functions with the variable to export. They export this single variable to a Zip File again. The export of the configured variables is now CSV_ExportVariables, the download button uses CSV_UIExport. An export deletes the previous Zip or Csv File, so the hook and the sending always find the file of the last export.
UIChangePort read the saved port instead of the port in the form.
MLSD has a standardized format. Without MLSD, Windows (IIS) listings are parsed besides Unix listings and lines like "total 12" are skipped.
"Send Mail Now" refused to send if the cyclic FTP sending had no host. The buttons only need valid variables now, the status still shows an invalid configuration of the cyclic sending.
The archive includes the end timestamp, so every export contained the first value of the current interval. On a monday, the weekly export used the week before the last one.
The next hour was calculated without the date, so after 23:00 the next run was in the past and the timer interval negative.

close https://github.com/symcon/modules/issues/281