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

Api #3367

Merged
merged 6 commits into from
Apr 4, 2023
Merged

Api #3367

merged 6 commits into from
Apr 4, 2023

Conversation

dbutenhof
Copy link
Member

PBENCH-1119

With the REST-ification of the API, only a few of the APIs can still be called using the simplistic "api": {name: string, ...} list, because URI parameters are generally needed and are no longer at the end of the URI: for example, /api/v1/datasets/{dataset}/metadata.

The UI now has the uriTemplate method to help expand the "uri" template objects. Complete the transition by updating the remaining UI references and dropping the api object entirely.

This was immediately motivated by Webb's comment on my API documentation PR that it was odd I was documenting that the api object in endpoints is "mostly obsolete"; better to simply remove it and move on.

@dbutenhof dbutenhof added Server Dashboard Of and relating to the Dashboard GUI API Of and relating to application programming interfaces to services and functions labels Mar 30, 2023
@dbutenhof dbutenhof self-assigned this Mar 30, 2023
webbnh
webbnh previously approved these changes Mar 31, 2023
Copy link
Member

@webbnh webbnh left a comment

Choose a reason for hiding this comment

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

Looks generally good. I have a suggestion or two, and a question or two.

dashboard/src/actions/overviewActions.js Outdated Show resolved Hide resolved
dashboard/src/actions/overviewActions.js Outdated Show resolved Hide resolved
dashboard/src/utils/helper.js Outdated Show resolved Hide resolved
webbnh
webbnh previously approved these changes Mar 31, 2023
Copy link
Member

@webbnh webbnh left a comment

Choose a reason for hiding this comment

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

👍

@dbutenhof
Copy link
Member Author

Sigh; and, once again, I had to nudge Mr Jenkins to wake him up because Mr Smee slept through his alarm again ...

PBENCH-1119

With the REST-ification of the API, only a few of the APIs can still be called
using the simplistic `{name: uri}` list, because URI parameters are needed and
are no longer at the end of the URI: for example,
`/api/v1/datasets/{dataset}/metadata`.

The UI now has the `uriTemplate` method to help expand the `"uri"` template
objects. Complete the transition by updating the remaining UI references and
dropping the `api` object entirely.
(How'd that happen?)
Copy link
Member

@webbnh webbnh left a comment

Choose a reason for hiding this comment

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

👍

@dbutenhof dbutenhof merged commit c10bb8a into distributed-system-analysis:main Apr 4, 2023
@dbutenhof dbutenhof deleted the api branch April 4, 2023 15:18
@@ -1,13 +1,15 @@
import * as TYPES from "./types";

import API from "../utils/axiosInstance";
import { uriTemplate } from "utils/helper";
Copy link
Member

Choose a reason for hiding this comment

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

Nit: overviewActions.js and tableOfContentActions.js import from ../utils/helper (although findNoOfDays is imported from utils/dateFunctions in overviewActions.js). Assuming that they are equivalent, maybe we should go with a single idiom in all cases.

Copy link
Member Author

Choose a reason for hiding this comment

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

It's a good point, and I'm not quite sure how this ended up that way because I'm usually not inclined to depend on the default root. (And it confuses vscode, too.)

Copy link
Member

@ndokos ndokos left a comment

Choose a reason for hiding this comment

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

LGTM (with one nit that we might want to resolve eventually).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API Of and relating to application programming interfaces to services and functions Dashboard Of and relating to the Dashboard GUI Server
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants