Skip to content
This repository has been archived by the owner on Jan 22, 2020. It is now read-only.

Add service detail view and increase test coverage. #37

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

jpetto
Copy link
Contributor

@jpetto jpetto commented Jan 9, 2017

Adds a service detail view as well as more test coverage.

As we do not yet have any service detail data, this PR is both potential architecture and execution. Perhaps we refine architecture in this PR, or ride with/merge this momentum and refine with follow-up PRs as necessary. I'm good either way.

To test:

  1. Modify your local copy of /local-dev/public/status.yml. Find service dms-078f7f5a2f (it's second in the list for me) and add the key/value hasDetail: true.
  2. Create the directory /local-dev/public/service-detail/dms-078f7f5a2f/.
  3. Inside that new directory, create a file named index.yml and paste in the contents from this gist.
  4. Load the site and scroll to "CloudFlare to Datadog Sync", which should now be a link.
  5. Click the link to see the test service detail data.
  6. Click the logo to go back to the status board view.

Assumptions made in this PR:

  1. We can/want to add the hasDetail: true key/value pair to all services in status.yml that have service detail information.
  2. We will build a back-end service similar to the one that updates status.yml to update YAML data files for all services with hasDetail: true.
  3. It's a good idea to keep service detail in a folder/URL named after the service's not-terribly-human-friendly id. (Though I'm not sure what a better & easier alternative would be.)

I went with requiring status.yml to tell the app if a service has detail because the alternative (doing a fetch request for each service to see if a directory/data file exists) seemed pretty sub-optimal. However, if coordinating service detail data with updates to status.yml is a headache, we can reconsider.

Note that merging this PR will have no visible impact until a service with hasDetail: true exists in status.yml.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant