[NGRAMS] OrderBy url

parent 53399396
...@@ -697,7 +697,7 @@ ngramsTableSpec = simpleSpec performAction render ...@@ -697,7 +697,7 @@ ngramsTableSpec = simpleSpec performAction render
[ "Graph" [ "Graph"
, "Stop" , "Stop"
, "Terms" , "Terms"
, "Score (Occurences)" -- see convOrderBy , "Score (Occurrences)" -- see convOrderBy
] ]
, totalRecords: 47361 -- TODO , totalRecords: 47361 -- TODO
} }
......
...@@ -120,6 +120,9 @@ offsetUrl o = "&offset=" <> show o ...@@ -120,6 +120,9 @@ offsetUrl o = "&offset=" <> show o
orderUrl :: forall a. Show a => Maybe a -> UrlPath orderUrl :: forall a. Show a => Maybe a -> UrlPath
orderUrl = maybe "" (\x -> "&order=" <> show x) orderUrl = maybe "" (\x -> "&order=" <> show x)
orderByUrl :: forall a. Show a => Maybe a -> UrlPath
orderByUrl = maybe "" (\x -> "&orderBy=" <> show x)
showTabType' :: TabType -> String showTabType' :: TabType -> String
showTabType' (TabCorpus t) = show t showTabType' (TabCorpus t) = show t
showTabType' (TabDocument t) = show t showTabType' (TabDocument t) = show t
...@@ -145,6 +148,7 @@ pathUrl c (Children n o l s) i = ...@@ -145,6 +148,7 @@ pathUrl c (Children n o l s) i =
pathUrl c (GetNgrams pathUrl c (GetNgrams
{ tabType: t { tabType: t
, offset: o , offset: o
, orderBy
, limit: l , limit: l
, listIds , listIds
, termListFilter: tlf , termListFilter: tlf
...@@ -155,6 +159,7 @@ pathUrl c (GetNgrams ...@@ -155,6 +159,7 @@ pathUrl c (GetNgrams
<> "/" <> "/"
<> tabTypeNgramsGet t <> tabTypeNgramsGet t
<> offsetUrl o <> limitUrl l <> offsetUrl o <> limitUrl l
<> orderByUrl orderBy
<> foldMap (\x -> "&list=" <> show x) listIds <> foldMap (\x -> "&list=" <> show x) listIds
<> foldMap (\x -> "&listType=" <> show x) tlf <> foldMap (\x -> "&listType=" <> show x) tlf
<> foldMap (\x -> case x of <> foldMap (\x -> case x of
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment