Skip to content

Commit

Permalink
refactor(api): update mock API structure
Browse files Browse the repository at this point in the history
  • Loading branch information
yomatters committed Jun 28, 2024
1 parent c1f4533 commit 664bce5
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 6 deletions.
File renamed without changes.
11 changes: 11 additions & 0 deletions public/api/resource-group/2.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"name": "Jetstream2",
"resourceProvider": {
"resourceProviderId": 2,
"name": "Indiana University",
"iconUri": "https://www.iu.edu/favicon.ico"
},
"imageUri": "https://jetstream-cloud.org/images/home/jetstream-2.png",
"description": "Jetstream2 is a user-friendly cloud computing environment for researchers and educators running on OpenStack and featuring Exosphere as the primary user interface. It is built on the successes of Jetstream1 and continues the main features of that system while extending to a broader range of hardware and services, including GPUs, large memory nodes, virtual clustering, programmable cyberinfrastructure with OpenStack Heat and Terraform, and many other features. It is designed to provide both infrastructure for gateways and other “always on” services as well as giving researchers access to interactive computing and data analysis resources on demand.",
"userGuideUri": "https://docs.jetstream-cloud.org/"
}
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions src/resource-catalog.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ export function ResourceCatalog({
title = "Resource Catalog",
showTitle = false,
baseUri = "/access-ci-ui",
groupsURI = "/api/resourceGroups.json",
slidesURI = "/api/resourceSlides.json",
groupsURI = "/api/resource-groups.json",
slidesURI = "/api/resource-slides.json",
}) {
return (
<>
Expand Down
4 changes: 2 additions & 2 deletions src/resource-group-description.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ import { useJSON } from "./utils";

import Icon from "./icon";

export default function ResourceGroupDescription({ resourceId }) {
export default function ResourceGroupDescription({ baseUri, resourceId }) {
const data = useJSON(
`/access-ci-ui/api/resourceGroup.json?resourceId=${resourceId}`,
`${baseUri}/api/resource-group/${resourceId}.json`,
null
);
if (!data) return;
Expand Down
4 changes: 2 additions & 2 deletions src/resource-group-detail.jsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import ResourceGroupDescription from "./resource-group-description";

export default function ResourceGroupDetail({ resourceId }) {
export default function ResourceGroupDetail({ baseUri, resourceId }) {
return (
<div class="resource-group-detail">
<ResourceGroupDescription resourceId={resourceId} />
<ResourceGroupDescription baseUri={baseUri} resourceId={resourceId} />
</div>
);
}

0 comments on commit 664bce5

Please sign in to comment.