Skip to content

Commit

Permalink
DRAFT Convert CompareRunsView
Browse files Browse the repository at this point in the history
  • Loading branch information
mshriver committed Feb 27, 2025
1 parent 6b17c5d commit 634a2dd
Show file tree
Hide file tree
Showing 5 changed files with 235 additions and 245 deletions.
10 changes: 5 additions & 5 deletions frontend/src/components/classify-failures.js
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ const ClassifyFailuresTable = (props) => {
}, [page, pageSize, appliedFilters]);


const onCollapse = (_event, rowIndex, isOpen) => {
const onCollapse = (_, rowIndex, isOpen) => {
// handle row click opening the child row with ResultView
if (isOpen) {
let result = rows[rowIndex].result;
Expand Down Expand Up @@ -224,15 +224,15 @@ const ClassifyFailuresTable = (props) => {

// METAFILTER FUNCTIONS
const updateFilters = useCallback((_filterId, name, operator, value) => {
let localFilters = {...appliedFilters};
let newFilters = {...appliedFilters};
if ((value === null) || (value.length === 0)) {
delete localFilters[name];
delete newFilters[name];
}
else {
localFilters[name] = {'op': operator, 'val': value};
newFilters[name] = {'op': operator, 'val': value};
}

setAppliedFilters(localFilters);
setAppliedFilters(newFilters);
setPage(1);
}, [appliedFilters]);

Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/metafilter.js
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ const MetaFilter = (props) => {
</Select>
</FlexItem>
</Flex>
{Object.keys(activeFilters).length > 0 &&
{activeFilters && Object.keys(activeFilters).length > 0 &&
<Flex style={{marginTop: '1rem', fontWeight: 'normal'}}>
<Flex>
<FlexItem style={{marginBottom: '0.5rem'}}>
Expand Down
3 changes: 2 additions & 1 deletion frontend/src/components/view.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,10 @@ import {

import { HttpClient } from '../services/http';
import { Settings } from '../settings';
import { CompareRunsView, JenkinsJobView, JenkinsJobAnalysisView } from '../views';
import AccessibilityDashboardView from '../views/accessibilitydashboard';
import { JenkinsJobView, JenkinsJobAnalysisView } from '../views';
import AccessibilityAnalysisView from '../views/accessibilityanalysis';
import CompareRunsView from '../views/compareruns';

const VIEW_MAP = {
'accessibility-dashboard-view': AccessibilityDashboardView,
Expand Down
Loading

0 comments on commit 634a2dd

Please sign in to comment.