Skip to content

Commit

Permalink
Drop empties.
Browse files Browse the repository at this point in the history
  • Loading branch information
wayneseymour committed Feb 7, 2020
1 parent 6ee749c commit ac1080e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
8 changes: 6 additions & 2 deletions src/dev/code_coverage/cc_app/public/initial_data.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,12 @@ const initialData = {
"url": "\nhttps://build-stats.elastic.co/app/kibana#/dashboard/02b9d310-9513-11e8-a9c0-db5f285c257f?_g=\n(refreshInterval%3A(pause%3A!f%2Cvalue%3A10000)%2Ctime%3A(from%3Anow%2Fd%2Cmode%3Aquick%2Cto%3Anow%2Fd))\n"
},
"historicalItems": [
"",
"gs://kibana-ci-artifacts/jobs/elastic+kibana+code-coverage/255"
"afafadsfd",
"a",
"a",
"a",
"asdfasdfa",
"end"
]
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ export const parseAndPopulate = buildNumber => srcFile => destFile => log => {
function onComplete (initData) {
const prettyFlush = pipe(pretty, flush);
return function mutateInitialData (xs, log, destFile) {
initData.historicalItems = xs;
initData.historicalItems = xs.filter(x => x !== '');
prettyFlush(initData)(destFile);
log.debug('### Completed');
};
Expand All @@ -58,7 +58,7 @@ function onComplete (initData) {
function flush (initData) {
return function flushInner (destFile) {
const fill = boilerplate(initData);
console.log(`\n### fill: \n\t${fill}`);
console.log(`\n### fill: \n${fill}`);
fs.writeFileSync(destFile, fill, { encoding: 'utf8' });
};
}
Expand Down

0 comments on commit ac1080e

Please sign in to comment.