Add start-now button for train-classifier task

This commit is contained in:
Eike Kettner
2020-09-01 23:56:57 +02:00
parent 8677eca6d4
commit f9fcee81a5
6 changed files with 115 additions and 15 deletions

View File

@ -88,6 +88,7 @@ module Api exposing
, setItemNotes
, setTags
, setUnconfirmed
, startClassifier
, startOnceNotifyDueItems
, startOnceScanMailbox
, startReIndex
@ -795,6 +796,19 @@ versionInfo flags receive =
--- Collective
startClassifier :
Flags
-> (Result Http.Error BasicResult -> msg)
-> Cmd msg
startClassifier flags receive =
Http2.authPost
{ url = flags.config.baseUrl ++ "/api/v1/sec/collective/classifier/startonce"
, account = getAccount flags
, body = Http.emptyBody
, expect = Http.expectJson receive Api.Model.BasicResult.decoder
}
getTagCloud : Flags -> (Result Http.Error TagCloud -> msg) -> Cmd msg
getTagCloud flags receive =
Http2.authGet