Skip to content

Commit

Permalink
adding access to 2022 dataset
Browse files Browse the repository at this point in the history
  • Loading branch information
PatrickBunn committed Sep 19, 2023
1 parent e1debc9 commit 327b89b
Show file tree
Hide file tree
Showing 8 changed files with 48 additions and 3 deletions.
1 change: 1 addition & 0 deletions api/esprr_api/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ class Settings(BaseSettings):
"NSRDB_2019": Path("/d4/uaren/nsrdb/nsrdb_2019.zarr"),
"NSRDB_2020": Path("/d4/uaren/nsrdb/nsrdb_2020.zarr"),
"NSRDB_2021": Path("/d4/uaren/nsrdb/nsrdb_2021.zarr"),
"NSRDB_2022": Path("/d4/uaren/nsrdb/nsrdb_2021.zarr")
}
sync_jobs_period: int = 15

Expand Down
1 change: 1 addition & 0 deletions api/esprr_api/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,7 @@ class DatasetEnum(str, Enum):
nsrdb_2019 = "NSRDB_2019"
nsrdb_2020 = "NSRDB_2020"
nsrdb_2021 = "NSRDB_2021"
nsrdb_2022 = "NSRDB_2022"


class DataStatusEnum(str, Enum):
Expand Down
1 change: 1 addition & 0 deletions dashboard/src/models.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,4 +56,5 @@ export const validDatasets = [
"NSRDB_2019",
"NSRDB_2020",
"NSRDB_2021",
"NSRDB_2022"

Check warning on line 59 in dashboard/src/models.ts

View workflow job for this annotation

GitHub Actions / test-javascript

Insert `,`
];
1 change: 1 addition & 0 deletions dashboard/src/utils/DisplayNames.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ export const displayNames: Record<string, any> = {
NSRDB_2019: "NSRDB 2019",
NSRDB_2020: "NSRDB 2020",
NSRDB_2021: "NSRDB 2021",
NSRDB_2022: "NSRDB 2022",
};

export function getDisplayName(machineName: string): string {
Expand Down
35 changes: 34 additions & 1 deletion dashboard/src/views/Group.vue
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
<th>2019 Status</th>
<th>2020 Status</th>
<th>2021 Status</th>
<th>2022 Status</th>
</tr>
</thead>
<tbody>
Expand Down Expand Up @@ -269,6 +270,38 @@
</button>
</router-link>
</td>
<td>
<button
v-if="
!('NSRDB_2022' in groupResultStatus) ||
groupResultStatus['NSRDB_2022'] == 'not started'
"
@click="queueAll('NSRDB_2022')"
>
Compute 2022
</button>
<router-link
v-else
class="btn-spc"
:to="{
name: 'Group Dataset Details',
params: {
groupId: group.object_id,
dataset: 'NSRDB_2022',
},
}"
>
<button
class="group-results group-2022-results"
:disabled="
!('NSRDB_2022' in groupResultStatus) ||
groupResultStatus['NSRDB_2022'] == 'pending'
"
>
2022 Results
</button>
</router-link>
</td>
</tr>
</tbody>
</table>
Expand Down Expand Up @@ -571,7 +604,7 @@ table {
.group.systems-table tr {
display: grid;
padding: 0.5em;
grid-template-columns: 1fr 3fr 1fr 1fr 1fr 1fr 1fr 1fr;
grid-template-columns: 1fr 3fr 1fr 1fr 1fr 1fr 1fr 1fr 1fr;
border-bottom: 1px solid #ccc;
}
.group.systems-table tr:hover {
Expand Down
8 changes: 8 additions & 0 deletions dashboard/src/views/System.vue
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,14 @@
}"
><button>2021 Results</button></router-link
>
<router-link
class="btn-spc"
:to="{
name: 'System Results',
params: { systemId: systemId, dataset: 'NSRDB_2022' },
}"
><button>2022 Results</button></router-link
>
<router-link
v-if="dataset"
:to="{
Expand Down
2 changes: 1 addition & 1 deletion dashboard/tests/unit/test_group_results.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ describe("Test Group Results component", () => {
const warning = wrapper.find(".no-dataset-warning");
expect(warning.text()).toBe(
"You are trying to access an invalid dataset. Valid datasets are\n" +
" NSRDB_2018, NSRDB_2019, NSRDB_2020, NSRDB_2021."
" NSRDB_2018, NSRDB_2019, NSRDB_2020, NSRDB_2021, NSRDB_2022."
);
});
it("Test results dne", async () => {
Expand Down
2 changes: 1 addition & 1 deletion dashboard/tests/unit/test_results.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ describe("Test Results component", () => {
const warning = wrapper.find(".no-dataset-warning");
expect(warning.text()).toBe(
"You are trying to access an invalid dataset. Valid datasets are\n" +
" NSRDB_2018, NSRDB_2019, NSRDB_2020, NSRDB_2021."
" NSRDB_2018, NSRDB_2019, NSRDB_2020, NSRDB_2021, NSRDB_2022."
);
});
it("Test result dne", async () => {
Expand Down

0 comments on commit 327b89b

Please sign in to comment.