Skip to content

Commit

Permalink
Frontend, property > quality attribute category
Browse files Browse the repository at this point in the history
  • Loading branch information
sei-aderr committed Dec 10, 2024
1 parent 680213c commit 2b62b0e
Show file tree
Hide file tree
Showing 7 changed files with 31 additions and 31 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
</p>
<UsaTextInput v-model="requirement.quality">
<template #label>
<b>System Quality:</b> What is the model qa category to be tested, such
<b>System Quality:</b> What is the model quaity attribute category to be tested, such
as accuracy, performance, robustness, fairness, or resource
consumption?
<InfoIcon>
Expand All @@ -54,7 +54,7 @@
<UsaTextInput v-model="requirement.stimulus">
<template #label>
<b>Stimulus:</b> What is the input to the model, the action, or the
event that will enable testing of the qa category, such as input data,
event that will enable testing of the quality attribute category, such as input data,
system event, or user operation?
<InfoIcon>
A condition arriving at the system/model (e.g., data,
Expand Down
14 changes: 7 additions & 7 deletions mlte/frontend/nuxt-app/components/TestCatalog/entry-edit.vue
Original file line number Diff line number Diff line change
Expand Up @@ -55,20 +55,20 @@
</div>

<UsaSelect
v-model="modelValue.property_category"
:options="propertyCategoryOptions"
v-model="modelValue.qa_category"
:options="QACategoryOptions"
>
<template #label>
Quality Attribute Category
<InfoIcon>
High-level qa category that the test example is
High-level quality attribute category that the test example is
validating, e.g., functional correctness, performance, robustness.
</InfoIcon>
</template>
<template #error-message>Not defined</template>
</UsaSelect>

<UsaTextInput v-model="modelValue.property">
<UsaTextInput v-model="modelValue.quality_attribute">
<template #label>
Quality Attribute
<InfoIcon>
Expand Down Expand Up @@ -161,8 +161,8 @@ const props = defineProps({
catalog_id: "",
},
tags: [],
property_category: "",
property: "",
qa_category: "",
quality_attribute: "",
code_type: "",
code: "",
description: "",
Expand Down Expand Up @@ -229,7 +229,7 @@ const tagOptions = ref([
{ name: "Tabular", selected: false },
{ name: "Time Series", selected: false },
]);
const propertyCategoryOptions = ref([
const QACategoryOptions = ref([
{ value: "Explainability", text: "Explainability" },
{ value: "Fairness", text: "Fairness" },
{ value: "Functional Correctness", text: "Functional Correctness" },
Expand Down
4 changes: 2 additions & 2 deletions mlte/frontend/nuxt-app/components/TestCatalog/entry-list.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<th data-sortable scope="col" role="columnheader">Identifier</th>
<th data-sortable scope="col" role="columnheader">Catalog</th>
<th data-sortable scope="col" role="columnheader">Tags</th>
<th data-sortable scope="col" role="columnheader">Property Category</th>
<th data-sortable scope="col" role="columnheader">Quality Attribute Category</th>
<th data-sortable scope="col" role="columnheader">Code Type</th>
<th data-sortable scope="col" role="columnheader">Actions</th>
</tr>
Expand All @@ -24,7 +24,7 @@
</span>
</td>
<td>
{{ entry.property_category }}
{{ entry.qa_category }}
</td>
<td>
{{ entry.code_type }}
Expand Down
6 changes: 3 additions & 3 deletions mlte/frontend/nuxt-app/composables/form-methods.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,15 @@ export function loadFindings(proxyObject: object) {
const findings = [];
// TODO(Kyle): Standardize conversion of proxy objects.
const validatedSpec = JSON.parse(JSON.stringify(proxyObject));
validatedSpec.body.spec.properties.forEach((property) => {
validatedSpec.body.spec.qa_categories.forEach((qa_category) => {
// TODO(Kyle): This is not portable to some browsers.
const results = new Map(
Object.entries(validatedSpec.body.results[property.name]),
Object.entries(validatedSpec.body.results[qa_category.name]),
);
results.forEach((value) => {
const finding = {
status: value.type,
property: property.name,
qa_category: qa_category.name,
measurement: value.metadata.measurement_type,
evidence_id: value.metadata.identifier.name,
message: value.message,
Expand Down
4 changes: 2 additions & 2 deletions mlte/frontend/nuxt-app/pages/report-export.vue
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
<thead>
<tr>
<th data-sortable scope="col" role="columnheader">Status</th>
<th data-sortable scope="col" role="columnheader">Property</th>
<th data-sortable scope="col" role="columnheader">Quality Attribute Category</th>
<th data-sortable scope="col" role="columnheader">Measurement</th>
<th data-sortable scope="col" role="columnheader">Evidence ID</th>
<th data-sortable scope="col" role="columnheader">Message</th>
Expand All @@ -86,7 +86,7 @@
{{ finding.status }}
</td>
<td v-else>{{ finding.status }}</td>
<td>{{ finding.property }}</td>
<td>{{ finding.qa_category }}</td>
<td>{{ finding.measurement }}</td>
<td>{{ finding.evidence_id }}</td>
<td>{{ finding.message }}</td>
Expand Down
4 changes: 2 additions & 2 deletions mlte/frontend/nuxt-app/pages/report-form.vue
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
<thead>
<tr>
<th data-sortable scope="col" role="columnheader">Status</th>
<th data-sortable scope="col" role="columnheader">Property</th>
<th data-sortable scope="col" role="columnheader">Quality Attribute Category</th>
<th data-sortable scope="col" role="columnheader">Measurement</th>
<th data-sortable scope="col" role="columnheader">Evidence ID</th>
<th data-sortable scope="col" role="columnheader">Message</th>
Expand All @@ -51,7 +51,7 @@
{{ finding.status }}
</td>
<td v-else>{{ finding.status }}</td>
<td>{{ finding.property }}</td>
<td>{{ finding.qa_category }}</td>
<td>{{ finding.measurement }}</td>
<td>{{ finding.evidence_id }}</td>
<td>{{ finding.message }}</td>
Expand Down
26 changes: 13 additions & 13 deletions mlte/frontend/nuxt-app/pages/test-catalog.vue
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@

<div class="inline-input-right">
<label class="usa-label" style="margin-top: 0px">
Search by Property Category
Search by Quality Attribute Category
</label>
<UsaTextInput v-model="propertySearchValue" @keyup.enter="search()" />
<UsaTextInput v-model="QACategorySearchValue" @keyup.enter="search()" />
</div>
<div class="inline-button">
<UsaButton class="usa-button--unstyled" @click="search()">
Expand Down Expand Up @@ -51,12 +51,12 @@ const token = useCookie("token");
const editFlag = ref(false);
const newEntryFlag = ref(false);
const tagSearchValue = ref("");
const propertySearchValue = ref("");
const QACategorySearchValue = ref("");
const entryList = ref<{
header: object;
tags: Array<string>;
property_category: string;
property: string;
qa_category: string;
quality_attribute: string;
code_type: string;
code: string;
description: string;
Expand Down Expand Up @@ -94,9 +94,9 @@ async function populateFullEntryList() {
}
async function search() {
if (tagSearchValue.value === "" && propertySearchValue.value === "") {
if (tagSearchValue.value === "" && QACategorySearchValue.value === "") {
populateFullEntryList();
} else if (propertySearchValue.value === "") {
} else if (QACategorySearchValue.value === "") {
await $fetch(config.public.apiPath + "/catalogs/entry/search", {
retry: 0,
method: "POST",
Expand Down Expand Up @@ -132,8 +132,8 @@ async function search() {
body: {
filter: {
type: "property",
name: "property_category",
value: propertySearchValue.value,
name: "qa_category",
value: QACategorySearchValue.value,
},
},
onRequestError() {
Expand Down Expand Up @@ -166,8 +166,8 @@ async function search() {
},
{
type: "property",
name: "property_category",
value: propertySearchValue.value,
name: "qa_category",
value: QACategorySearchValue.value,
},
],
},
Expand Down Expand Up @@ -197,8 +197,8 @@ function resetSelectedEntry() {
catalog_id: "",
},
tags: [],
property_category: "",
property: "",
qa_category: "",
quality_attribute: "",
code_type: "",
code: "",
description: "",
Expand Down

0 comments on commit 2b62b0e

Please sign in to comment.