Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add the list of available rails timezones to the base endpoint #973

Merged
merged 1 commit into from
Dec 7, 2020

Conversation

skateman
Copy link
Member

@skateman skateman commented Dec 1, 2020

There's no way to retrieve the list of available timezones from the frontend in a Rails-compatible way, so I'm adjusting the /api endpoint to provide a list of these.

# GET /api

{
  "name": "API",
  "description": "REST API",
  ...
  "timezones": [
    {
      "name": "International Date Line West",
      "description": "(GMT-12:00) International Date Line West"
    },
    {
      "name": "American Samoa",
      "description": "(GMT-11:00) American Samoa"
    },
    ...
  ],
  ...
}

@Fryguy
Copy link
Member

Fryguy commented Dec 4, 2020

I don't think we should expose a proper endpoint for something that isn't the domain of our application (imagine, for example, github exposed a /api/timezones endpoint, but it was because of some quirk of their UI...it just doesn't make sense).

Instead, can we just expose this from /api or OPTIONS /api ? I imagine this is a one-time thing that needs to be queried and cached by the UI.

@skateman skateman changed the title Introducing a simple GET-only endpoint for timezones Add the list of available rails timezones to the base endpoint Dec 4, 2020
@skateman
Copy link
Member Author

skateman commented Dec 4, 2020

@Fryguy updated

@miq-bot
Copy link
Member

miq-bot commented Dec 4, 2020

Checked commit skateman@e851c4d with ruby 2.6.3, rubocop 0.82.0, haml-lint 0.35.0, and yamllint
1 file checked, 0 offenses detected
Everything looks fine. 🏆

Copy link
Member

@Fryguy Fryguy left a comment

Choose a reason for hiding this comment

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

@gtanzillo Please also review.

@gtanzillo gtanzillo self-assigned this Dec 7, 2020
@gtanzillo gtanzillo merged commit 6b304bf into ManageIQ:master Dec 7, 2020
@skateman skateman deleted the timezones-endpoint branch December 7, 2020 15:25
@skateman skateman mentioned this pull request Dec 9, 2020
10 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants