Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
MobileEventLog
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Data-Logistics-Support
MobileEventLog
Commits
5a8cc4b5
Commit
5a8cc4b5
authored
2 years ago
by
Maximilian Betz
Browse files
Options
Downloads
Patches
Plain Diff
corrected wrong json format in dump file
parent
9910d64b
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
sw/lib/configuration.dart
+2
-1
2 additions, 1 deletion
sw/lib/configuration.dart
sw/lib/databaseconnector.dart
+3
-1
3 additions, 1 deletion
sw/lib/databaseconnector.dart
with
5 additions
and
2 deletions
sw/lib/configuration.dart
+
2
−
1
View file @
5a8cc4b5
...
...
@@ -53,7 +53,8 @@ class _MyHomePageState extends State<Configuration> {
String
filepath
=
join
(
directory
.
path
,
filename
);
final
File
file
=
File
(
filepath
);
await
file
.
writeAsString
(
eventsJson
);
String
dumpStr
=
"{
\"
events
\"
:"
+
eventsJson
+
"}"
;
await
file
.
writeAsString
(
dumpStr
);
debugPrint
(
'Stored file at: '
+
filepath
);
setState
(()
{});
...
...
This diff is collapsed.
Click to expand it.
sw/lib/databaseconnector.dart
+
3
−
1
View file @
5a8cc4b5
...
...
@@ -125,12 +125,14 @@ abstract class DatabaseConnector{
// Create a json readable event dump
Future
<
String
>
eventDump
()
async
{
List
<
Event
>
events
=
await
getEvents
();
String
ev
=
'['
;
var
ev
=
'['
;
for
(
var
event
in
events
)
{
ev
+=
jsonEncode
(
event
);
ev
+=
','
;
}
ev
=
ev
.
substring
(
0
,
ev
.
length
-
1
);
// Remove last ,
ev
+=
']'
;
return
ev
;
}
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment