forked from AdrianBZG/InterMine-Data-Browser-Tool
-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Perform a query against the selected class view (#84)
When the user changes the class, the app should reinitialize with the new query. This commit will update the query controller, default constraints, pie chart, bar graph, and table with the new results. Closes: #83 Squashed commits: * Display only a Templates and ClassView tab * Display the fetched model classes from the mine * Use imjs to fetch models instead of axios request * Update class tab when user selects a new one * Reset all constraints when the class changes * Make class list searchable
- Loading branch information
Showing
9 changed files
with
110 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,11 @@ | ||
export const noop = () => {} | ||
|
||
export const formatConstraintPath = ({ classView, path }) => `${classView}.${path}` | ||
|
||
export const pluralizeFilteredCount = (filteredItems, query) => { | ||
const isPlural = filteredItems.length > 1 ? 's' : '' | ||
|
||
return query === '' | ||
? `Showing ${filteredItems.length} Item${isPlural}` | ||
: `Found ${filteredItems.length} item${isPlural} matching "${query}"` | ||
} |