-
Notifications
You must be signed in to change notification settings - Fork 0
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
Dashboard api #81
Dashboard api #81
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is a pretty good start at this. There are a couple small notes I made on the code and some questions for clarifications. There are 3 places I noticed are missing or broken that may be fixable on our end or simply limitations of the dashboard API that we'll need Sandy to add:
- Project spotlight missing cover images:
- Project/Collaboration/Teams page people lists are missing images:
- Project page has descriptions that are no longer truncated. Also this will probably require an API change but the the projects page now takes ~12 seconds to load/hydrate because the people endpoint returns a 10k line/345kb json response.
components/people/person-card.js
Outdated
@@ -7,7 +7,7 @@ import { useTheme } from "@emotion/react"; | |||
|
|||
export const PersonCard = ({ person, showTitle = false, anchorName }) => { | |||
const theme = useTheme(); | |||
|
|||
console.log(person) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove
components/projectSpotlight.js
Outdated
@@ -7,6 +7,7 @@ import { useTheme } from '@mui/material/styles' | |||
import { MarkdownLess } from './markdown' | |||
|
|||
export const ProjectCard = ({project}) => { | |||
console.log(project) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove
utils/dashboard.js
Outdated
...options, | ||
}; | ||
const requestUrl = getDashboardURL(endpoint); | ||
process.env['NODE_TLS_REJECT_UNAUTHORIZED'] = 0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What was the reason for this? Is this only happening in dev? Node docs highly discourage its use
From: https://nodejs.org/api/cli.html
If value equals '0', certificate validation is disabled for TLS connections. This makes TLS, and HTTPS by extension, insecure. The use of this environment variable is strongly discouraged.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Dashboard API is over http currently, we will remove this once that has a certificate.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The dashboard is now using SSL at https://dashboard.renci.org
so we can remove this
components/projects/search-bar.js
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wasn't this in a different branch? Is this supposed to be here again?
Two things I forgot to mention. We discussed yesterday the "our work" menu has collaborations/researchGroups/teams that it's currently still pulling from strapi. Maybe we should migrate this to the dashboard data in this PR as well, if it isn't too much work. Also, @mbwatson when you do your review, don't forget to be on the VPN, thought I'd mention it since it wasn't and tripped me up for a bit. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i see all the same things David noticed (thanks for your thorough inspection!)
we'll want to figure out which we can address and which would be better addressed with an API change.
for us to change, client-side
API changes to request
|
…g in the dashboard data
…-org into dashboard-api
No description provided.