Skip to content

Commit

Permalink
Fix sort by doc type (#12)
Browse files Browse the repository at this point in the history
* Add rhodes-factory-floor tutorial

* Fix sort by doc type
  • Loading branch information
jeff-phillips-18 authored and Chad Roberts committed Mar 30, 2021
1 parent 963d32e commit 112047f
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 3 deletions.
10 changes: 10 additions & 0 deletions data/docs/rhodes-factory-floor-tutorial.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
metadata:
name: rhodes-factory-floor
type: tutorial
spec:
displayName: Predictive maintenance on the factory floor
description: |-
Use Red Hat OpenShift Data science to develop and deploy a ML model to predict machine failures
in a doughnut factory.
url: https://github.com/sophwats/factory-floor-ws
durationMinutes: 120
2 changes: 1 addition & 1 deletion frontend/src/pages/learningCenter/LearningCenter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ const LearningCenter: React.FC = () => {
let sortVal =
sortType === SORT_TYPE_NAME
? a.spec.displayName.localeCompare(b.spec.displayName)
: a.metadata.type.localeCompare(a.metadata.type);
: a.metadata.type.localeCompare(b.metadata.type);
if (sortOrder === SORT_DESC) {
sortVal *= -1;
}
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ type ODHApp = {
};

enum ODHDocType {
QuickStart = 'consolequickstarts', // TODO: update when we get dashboard quick starts
Documentation = 'documentation',
Tutorial = 'tutorial',
HowDoI = 'how-do-i',
QuickStart = 'quickstart',
Tutorial = 'tutorial',
}

type ODHDoc = {
Expand Down

0 comments on commit 112047f

Please sign in to comment.