Commit 3dfe784
authored
Adds write-to-file flag to store data locally (#180)
* Adds write-to-file flag to store data locally
Only stores data locally if no organization is specified.
This can be added if needed.
Signed-off-by: Jamie Leppard <[email protected]>
* Restructure gatherAndPostData to allow local write
gatherAndPostData has been split into:
gatherData which returns config information, the prefight client
and readings.
postData which sends this data to preflight server as previously
happened in gatherAndPostData
The outputpath flag now determines if postData is called.
If the flag is set, postData is not called and the data is written
locally.
This also fixes the issue of the flag only working when no org is set.
Signed-off-by: Jamie Leppard <[email protected]>
* Breaks down gatherData into smaller functions
gatherData is broken down into:
getConfiguration - returns config and preflight client
this is now implemented outside of gatherAndOutputData
in the main Run loop
gatherData - creates data gatherers and generates readings
This is run inside gatherAndOutputData as previously done
Signed-off-by: Jamie Leppard <[email protected]>
Co-authored-by: Jamie Leppard <[email protected]>1 parent 99edf3f commit 3dfe784
2 files changed
+39
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
64 | 64 | | |
65 | 65 | | |
66 | 66 | | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
67 | 74 | | |
68 | 75 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
| 37 | + | |
| 38 | + | |
37 | 39 | | |
38 | 40 | | |
39 | 41 | | |
40 | 42 | | |
41 | 43 | | |
42 | | - | |
| 44 | + | |
| 45 | + | |
43 | 46 | | |
44 | 47 | | |
45 | 48 | | |
46 | 49 | | |
47 | 50 | | |
48 | 51 | | |
49 | 52 | | |
50 | | - | |
| 53 | + | |
51 | 54 | | |
52 | 55 | | |
53 | 56 | | |
| |||
127 | 130 | | |
128 | 131 | | |
129 | 132 | | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
130 | 153 | | |
131 | 154 | | |
132 | 155 | | |
| |||
172 | 195 | | |
173 | 196 | | |
174 | 197 | | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
175 | 203 | | |
176 | 204 | | |
177 | 205 | | |
| |||
185 | 213 | | |
186 | 214 | | |
187 | 215 | | |
| 216 | + | |
188 | 217 | | |
189 | 218 | | |
190 | 219 | | |
| |||
199 | 228 | | |
200 | 229 | | |
201 | 230 | | |
202 | | - | |
| 231 | + | |
203 | 232 | | |
204 | 233 | | |
205 | 234 | | |
| |||
0 commit comments