Verified Commit d1823106 authored by Przemyslaw Kaminski's avatar Przemyslaw Kaminski

Merge branch 'dev' into 749-dev-sidebar-related-terms-ordering

parents c48714a1 632ce6a4
## Version 0.0.7.4.9
* [FRONT][FIX][Dev support emitting warnings](https://gitlab.iscpif.fr/gargantext/purescript-gargantext/merge_requests/519)
* [BACK][FIX][Forest of trees: restore hierarchical grouping of terms](https://gitlab.iscpif.fr/gargantext/haskell-gargantext/merge_requests/424)
* [BACK][UPGRADE][[BREAKING] refactoring of fc_url](https://gitlab.iscpif.fr/gargantext/haskell-gargantext/merge_requests/405)
* [BACK][FIX][Resolve "[Node Terms] On multiple Map terms, if the first term is already a map term, the count of the multiple map term is to zero"](https://gitlab.iscpif.fr/gargantext/haskell-gargantext/merge_requests/414)
* [BACK][UPGRADE][Resolve "Move corenlp to separate repo/flake"](https://gitlab.iscpif.fr/gargantext/haskell-gargantext/merge_requests/434)
## Version 0.0.7.4.8
* [BACK][UPGRADE][Upgrade GHC to 9.6.x (#436)](https://gitlab.iscpif.fr/gargantext/haskell-gargantext/issues/436) and [Try to drop dependency on `accelerate-llvm` and the entire `llvm` stack (#291)](https://gitlab.iscpif.fr/gargantext/haskell-gargantext/issues/291)
* [BACK][FEAT][Implement temporary file storage (#444)](https://gitlab.iscpif.fr/gargantext/haskell-gargantext/issues/444)
* [BACK/FRONT][FEAT][Import/export in SQLite format (#362)](https://gitlab.iscpif.fr/gargantext/haskell-gargantext/issues/362)
* [DOC][README][README: add info about system postgresql configuration](https://gitlab.iscpif.fr/gargantext/haskell-gargantext/merge_requests/403)
* [FRONT][FIX][`./install` doesn't work on Darwin (#671)](https://gitlab.iscpif.fr/gargantext/purescript-gargantext/issues/671)
* [BACK][FIX][Fix `start-all` so that it throws exception when a subprocess fails (#463)](https://gitlab.iscpif.fr/gargantext/haskell-gargantext/issues/463)
* [FRONT][FIX][[corpus] create list if it doesn't exist](https://gitlab.iscpif.fr/gargantext/purescript-gargantext/merge_requests/506)
* [FRONT][FIX][Upload file sends 'Nothing' as language which results in 400 error from backend (#736)](https://gitlab.iscpif.fr/gargantext/purescript-gargantext/issues/736)
* [BACK][FIX][Convert non-transactional GGTX DB queries into transactions (#411)](https://gitlab.iscpif.fr/gargantext/haskell-gargantext/issues/466) and [ACID properties of DB operations](https://gitlab.iscpif.fr/gargantext/haskell-gargantext/issues/411)
* [BACK][FIX][Proper (and thread-safe) implementation for `withSeed`](https://gitlab.iscpif.fr/gargantext/haskell-igraph/merge_requests/6)
* [FRONT][FEAT][Share link copy to clipboard](https://gitlab.iscpif.fr/gargantext/purescript-gargantext/issues/719)
* [BACK][FIX][Relax dependency bounds](https://gitlab.iscpif.fr/gargantext/haskell-igraph/merge_requests/8)
* [BACK][UPGRADE][Upgrade IGraph](https://gitlab.iscpif.fr/gargantext/haskell-gargantext/merge_requests/411)
* [FRONT][FEAT][Feature flags hide](https://gitlab.iscpif.fr/gargantext/purescript-gargantext/merge_requests/511)
* [BACK][FIX][Fix a bug in `buildPatterns` and friends](https://gitlab.iscpif.fr/gargantext/haskell-gargantext/merge_requests/413)
* [BACK/FRONT][OPTIM][Resolve "Display graph parameters in legend"](https://gitlab.iscpif.fr/gargantext/purescript-gargantext/merge_requests/510)
* [BACK][FIX][Separate ngram extraction from document insertion](https://gitlab.iscpif.fr/gargantext/haskell-gargantext/merge_requests/415)
* [BACK][REFACT][API refactorings (#467)](https://gitlab.iscpif.fr/gargantext/haskell-gargantext/issues/467)
* [BACK/FRONT][FIX][[graphql] simplify and_logic for get contexts for ngrams](https://gitlab.iscpif.fr/gargantext/purescript-gargantext/merge_requests/515)
* [FRONT][OPTIM][[Node Graph] CSS improvements on the legend tab (#743)](https://gitlab.iscpif.fr/gargantext/purescript-gargantext/issues/743)
* [BACK][FIX][ Have `extractNgramsFromDocument` catch the right exception in case extraction fails](https://gitlab.iscpif.fr/gargantext/haskell-gargantext/merge_requests/419)
* [FRONT][FIX][[Node terms] Show related docs for children terms as well](https://gitlab.iscpif.fr/gargantext/purescript-gargantext/merge_requests/516)
* [BACK][FIX][Fix bug in DB transaction rollbacks in the presence of domain-specific errors](https://gitlab.iscpif.fr/gargantext/haskell-gargantext/merge_requests/420)
* [BACK][FIX][Resolve "Error uploading zip file on dev"](https://gitlab.iscpif.fr/gargantext/haskell-gargantext/merge_requests/417)
* [BACK][OPTIM][Port all the tasty specs to hspec](https://gitlab.iscpif.fr/gargantext/haskell-gargantext/merge_requests/423)
* [BACK][UPGRADE][[openalex] make search act similar to the one on openalex web](https://gitlab.iscpif.fr/gargantext/haskell-gargantext/merge_requests/425)
* [BACK][FIX][Proper incremental TSV parser](https://gitlab.iscpif.fr/gargantext/haskell-gargantext/merge_requests/402)
* [BACK][OPTIM][Remove useless ghc dependency from tree](https://gitlab.iscpif.fr/gargantext/crawlers/pubmed/merge_requests/14)
## Version 0.0.7.4.7 ## Version 0.0.7.4.7
* [BACK][FIX][Adjust the output of the UpdateList tests (#460)](https://gitlab.iscpif.fr/gargantext/haskell-gargantext/issues/460) * [BACK][FIX][Adjust the output of the UpdateList tests (#460)](https://gitlab.iscpif.fr/gargantext/haskell-gargantext/issues/460)
......
{ {
"name": "GarganText", "name": "GarganText",
"version": "0.0.7.4.7", "version": "0.0.7.4.9",
"lockfileVersion": 3, "lockfileVersion": 3,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "GarganText", "name": "GarganText",
"version": "0.0.7.4.7", "version": "0.0.7.4.9",
"dependencies": { "dependencies": {
"@fontsource/crete-round": "~5.0.12", "@fontsource/crete-round": "~5.0.12",
"@fontsource/montserrat": "~5.0.17", "@fontsource/montserrat": "~5.0.17",
......
{ {
"name": "GarganText", "name": "GarganText",
"version": "0.0.7.4.7", "version": "0.0.7.4.9",
"scripts": { "scripts": {
"build": "spago build", "build": "spago build",
"bundle": "spago bundle --module Main --outfile dist/bundle.min.js --minify --source-maps", "bundle": "spago bundle --module Main --outfile dist/bundle.min.js --minify --source-maps",
......
...@@ -36,53 +36,20 @@ componentCpt = here.component "main" cpt ...@@ -36,53 +36,20 @@ componentCpt = here.component "main" cpt
{} {}
(mapWithIndex (showError errors) errors') (mapWithIndex (showError errors) errors')
showError errors i (FStringError { error }) = showError errors i (FStringError { error }) = errorAlert errors i "danger" error
RB.alert showError errors i (FStringWarning { warning }) = errorAlert errors i "warning" warning
{ dismissible: true showError errors i (FRESTError { error }) = errorAlert errors i "danger" (show error)
, onClose showError errors i (FOtherError { error }) = errorAlert errors i "danger" (show error)
, variant: "danger"
}
[ H.text error ]
where
onClose = do
here.error2 "click!" error
T.modify_
( \es -> case deleteAt i es of
Nothing -> es
Just es' -> es'
)
errors
showError errors i (FRESTError { error }) =
RB.alert
{ dismissible: true
, onClose
, variant: "danger"
}
[ H.text $ show error ]
where
onClose = do
here.error2 "click!" error
T.modify_
( \es -> case deleteAt i es of
Nothing -> es
Just es' -> es'
)
errors
showError errors i (FOtherError { error }) = errorAlert errors i variant txt =
RB.alert RB.alert
{ dismissible: true { dismissible: true
, onClose , onClose
, variant: "danger" , variant
} }
[ H.text $ show error ] [ H.text txt ]
where where
onClose = do onClose = do
here.error2 "click!" error
T.modify_ T.modify_
( \es -> case deleteAt i es of ( \es -> case deleteAt i es of
Nothing -> es Nothing -> es
......
...@@ -6,11 +6,12 @@ import Data.Array as A ...@@ -6,11 +6,12 @@ import Data.Array as A
import Data.Either (Either(..)) import Data.Either (Either(..))
import Data.Foldable (foldl) import Data.Foldable (foldl)
import Data.Maybe (fromMaybe, Maybe(..)) import Data.Maybe (fromMaybe, Maybe(..))
import Data.Traversable (traverse_)
import Effect (Effect) import Effect (Effect)
import Effect.Aff (Aff) import Effect.Aff (Aff)
import Effect.Class (liftEffect) import Effect.Class (liftEffect)
import Gargantext.Config.REST (RESTError, logRESTError) import Gargantext.Config.REST (RESTError, logRESTError)
import Gargantext.Types (AsyncEvent(..), AsyncTaskLog(..), FrontendError(..), asyncTaskLogEventsErrorMessage) import Gargantext.Types (AsyncEvent(..), AsyncTaskLog(..), FrontendError(..), asyncErrorToFrontendError, asyncTaskLogEventsErrors)
import Gargantext.Utils.Reactix as R2 import Gargantext.Utils.Reactix as R2
import Toestand as T import Toestand as T
...@@ -54,7 +55,4 @@ handleErrorInAsyncTaskLog ...@@ -54,7 +55,4 @@ handleErrorInAsyncTaskLog
-> AsyncTaskLog -> AsyncTaskLog
-> Effect Unit -> Effect Unit
handleErrorInAsyncTaskLog errors atl = handleErrorInAsyncTaskLog errors atl =
case asyncTaskLogEventsErrorMessage atl of traverse_ (\e -> T.modify_ (A.cons $ asyncErrorToFrontendError e) errors) (asyncTaskLogEventsErrors atl)
Nothing -> pure unit
Just error ->
T.modify_ (A.cons $ FStringError { error }) errors
...@@ -838,8 +838,17 @@ derive instance Generic AsyncEvent _ ...@@ -838,8 +838,17 @@ derive instance Generic AsyncEvent _
derive instance Newtype AsyncEvent _ derive instance Newtype AsyncEvent _
derive newtype instance JSON.ReadForeign AsyncEvent derive newtype instance JSON.ReadForeign AsyncEvent
asyncEventErrorMessage :: AsyncEvent -> Maybe String data AsyncError
asyncEventErrorMessage (AsyncEvent { level: "ERROR", message }) = Just message = AsyncErrorMessage String
| AsyncWarningMessage String
asyncErrorToFrontendError :: AsyncError -> FrontendError
asyncErrorToFrontendError (AsyncErrorMessage error) = FStringError { error }
asyncErrorToFrontendError (AsyncWarningMessage warning) = FStringWarning { warning }
asyncEventErrorMessage :: AsyncEvent -> Maybe AsyncError
asyncEventErrorMessage (AsyncEvent { level: "ERROR", message }) = Just $ AsyncErrorMessage message
asyncEventErrorMessage (AsyncEvent { level: "WARNING", message }) = Just $ AsyncWarningMessage message
asyncEventErrorMessage _ = Nothing asyncEventErrorMessage _ = Nothing
newtype AsyncTaskLog = AsyncTaskLog newtype AsyncTaskLog = AsyncTaskLog
...@@ -853,17 +862,9 @@ derive instance Generic AsyncTaskLog _ ...@@ -853,17 +862,9 @@ derive instance Generic AsyncTaskLog _
derive instance Newtype AsyncTaskLog _ derive instance Newtype AsyncTaskLog _
derive newtype instance JSON.ReadForeign AsyncTaskLog derive newtype instance JSON.ReadForeign AsyncTaskLog
asyncTaskLogEventsErrorMessage :: AsyncTaskLog -> Maybe String asyncTaskLogEventsErrors :: AsyncTaskLog -> Array AsyncError
asyncTaskLogEventsErrorMessage (AsyncTaskLog { events }) = asyncTaskLogEventsErrors (AsyncTaskLog { events }) =
foldl eventErrorMessage' Nothing events A.mapMaybe asyncEventErrorMessage events
where
eventErrorMessage' acc ae =
case asyncEventErrorMessage ae of
Nothing -> acc
Just e' ->
case acc of
Nothing -> Just e'
Just acc' -> Just $ e' <> "\n" <> acc'
asyncTaskLogPercent :: AsyncTaskLog -> Number asyncTaskLogPercent :: AsyncTaskLog -> Number
asyncTaskLogPercent (AsyncTaskLog { failed, remaining, succeeded }) = 100.0 * nom / denom asyncTaskLogPercent (AsyncTaskLog { failed, remaining, succeeded }) = 100.0 * nom / denom
...@@ -877,7 +878,7 @@ asyncTaskLogIsFinished (AsyncTaskLog { remaining }) = remaining == 0 ...@@ -877,7 +878,7 @@ asyncTaskLogIsFinished (AsyncTaskLog { remaining }) = remaining == 0
asyncTaskLogIsError :: AsyncTaskLog -> Boolean asyncTaskLogIsError :: AsyncTaskLog -> Boolean
asyncTaskLogIsError atl@(AsyncTaskLog { events }) = asyncTaskLogIsError atl@(AsyncTaskLog { events }) =
asyncTaskLogIsFinished atl asyncTaskLogIsFinished atl
&& (A.length $ A.filter (\(AsyncEvent { level }) -> level == "ERROR") events) && (A.length $ A.filter (\(AsyncEvent { level }) -> level == "ERROR" || level == "WARNING") events)
> 0 > 0
-- New type tasks (async workers) -- New type tasks (async workers)
...@@ -920,6 +921,7 @@ toggleSidePanelState Opened = Closed ...@@ -920,6 +921,7 @@ toggleSidePanelState Opened = Closed
data FrontendError data FrontendError
= FStringError { error :: String } = FStringError { error :: String }
| FStringWarning { warning :: String }
| FRESTError { error :: RESTError } | FRESTError { error :: RESTError }
| FOtherError { error :: String } | FOtherError { error :: String }
......
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