Skip to content

Conversation

@caylahamann
Copy link
Contributor

closes #145

return parseInt(cur) + acc
}, 0)

writeSync( vfile({
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you make sure prettier is run on this file? It looks like this is not formatted. Thank you!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes definitely!

const result = await resp.json();

const totalCount = parseInt(result.docs[0].count.all);
const migratedCount = Object.values(ITEMS_PER_TYPE).reduce((acc, cur)=>{
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rather than using the ITEMS_PER_TYPE, should we pass in the files array from the first step of the migration and run a .length on that? This ITEMS_PER_TYPE does not guarantee that that exact number of docs is fetched, nor does it take into account more than one page of results. Eventually we will paginate more than a single page of results.

Thoughts?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like that idea! I will make that change


This experimental version doesn't contain all our content, and not everything is stable. If you're looking to read our docs, go to [docs.newrelic.com](https://docs.newrelic.com).

So far, we have migrated **{data.migratedCount}** out of **{data.totalCount}** docs!
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cc @jpvajda

Can you review this copy? Thanks!

@caylahamann
Copy link
Contributor Author

once I have the copy from @jpvajda , I'll make the other updates to this PR!

@jerelmiller jerelmiller merged commit 25e13d7 into develop Oct 28, 2020
@jerelmiller jerelmiller deleted the cayla/progress-bar branch October 28, 2020 17:20
kanderson250 pushed a commit to kanderson250/docs-website that referenced this pull request Aug 29, 2025
feat(beta): added an expanded anomaly doc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

provide a programmatic count of docs left to migrate to show progress

4 participants