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

Update website to display new workload and suite changes correctly #10

Merged
merged 4 commits into from
Jan 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion __tests__/pages/category/index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ describe('Category component', () => {
const categoryTitle = screen.getByText('Categories');
expect(categoryTitle).toBeInTheDocument();
let cards = screen.queryAllByLabelText('card');
expect(cards).toHaveLength(14);
expect(cards).toHaveLength(15);
});
});

Expand Down
12 changes: 9 additions & 3 deletions components/resourceMetadata.js
Original file line number Diff line number Diff line change
Expand Up @@ -119,9 +119,15 @@ export default function MetaData({ resource, className, metaFields, showMetadata
<div>
{key.charAt(0).toUpperCase() + key.slice(1)}
</div>
<a href={process.env.BASE_PATH + '/resources/' + resource.resources[key] + `?database=${resource.database}`} style={{ display: 'block', paddingTop: '0.0625rem' }}>
{resource.resources[key]}
</a>
{typeof(resource.resources[key]) == 'string' ?
<a href={process.env.BASE_PATH + '/resources/' + resource.resources[key] + `?database=${resource.database}`} style={{ display: 'block', paddingTop: '0.0625rem' }}>
{resource.resources[key]}
</a>
:
<a href={process.env.BASE_PATH + '/resources/' + resource.resources[key]["id"] + `?database=${resource.database}&version=${resource.resources[key]["resource_version"]}`} style={{ display: 'block', paddingTop: '0.0625rem' }}>
{resource.resources[key]["id"]}
</a>
}
</div>
);
})
Expand Down
52 changes: 50 additions & 2 deletions cypress/fixtures/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@
"simpoint-directory",
"resource",
"looppoint-pinpoint-csv",
"looppoint-json"
"looppoint-json",
"suite"
],
"description": "The category of the resource",
"default": "resource"
Expand Down Expand Up @@ -189,7 +190,11 @@
},
{
"$ref": "#/definitions/workload"
},
{
"$ref": "#/definitions/suite"
}

],
"definitions": {
"architecture": {
Expand Down Expand Up @@ -236,7 +241,18 @@
},
"resources": {
"type": "object",
"description": "A dictionary of resources that are required to run the workload",
"description": "An dictionary of resources that are required to run the workload",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"resoruce-version": {
"type": "string"
}
}
},
"default": {}
}
},
Expand Down Expand Up @@ -526,6 +542,38 @@
"$ref": "#/definitions/abstract-file"
}
]
},
"suite" : {
"description": "A collection of workloads.",
"properties" : {
"category": {
"type": "string",
"const": "suite"
},
"workloads": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"resource-version": {
"type": "string"
},
"input-group" : {
"type": "array",
"items": {
"type": "string"
}
}
}
}
}
},
"required": [
"workloads"
]
}
}
}
Loading