Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
purescript-gargantext
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Grégoire Locqueville
purescript-gargantext
Commits
406521d3
Commit
406521d3
authored
Jun 13, 2020
by
Alexandre Delanoë
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[REFACT] read instance + fix warnings
parent
00786471
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
19 additions
and
20 deletions
+19
-20
AsyncTasks.purs
src/Gargantext/AsyncTasks.purs
+1
-1
DocsTable.purs
src/Gargantext/Components/DocsTable.purs
+1
-1
Action.purs
src/Gargantext/Components/Forest/Tree/Node/Action.purs
+1
-4
FTree.purs
src/Gargantext/Components/Forest/Tree/Node/Tools/FTree.purs
+0
-1
Types.purs
src/Gargantext/Types.purs
+16
-13
No files found.
src/Gargantext/AsyncTasks.purs
View file @
406521d3
module Gargantext.AsyncTasks where
module Gargantext.AsyncTasks where
import Data.Argonaut (decodeJson
, class EncodeJson, encodeJson, (:=), (~>), (.:)
)
import Data.Argonaut (decodeJson)
import Data.Argonaut.Parser (jsonParser)
import Data.Argonaut.Parser (jsonParser)
import Data.Array as A
import Data.Array as A
import Data.Either (Either(..))
import Data.Either (Either(..))
...
...
src/Gargantext/Components/DocsTable.purs
View file @
406521d3
...
@@ -34,7 +34,7 @@ import Gargantext.Utils.Reactix as R2
...
@@ -34,7 +34,7 @@ import Gargantext.Utils.Reactix as R2
import Gargantext.Routes as Routes
import Gargantext.Routes as Routes
import Gargantext.Routes (SessionRoute(NodeAPI))
import Gargantext.Routes (SessionRoute(NodeAPI))
import Gargantext.Sessions (Session, sessionId, post, delete, put)
import Gargantext.Sessions (Session, sessionId, post, delete, put)
import Gargantext.Types (NodeType(..), OrderBy(..), TabType, TabPostQuery(..), AffTableResult
, NodeID
)
import Gargantext.Types (NodeType(..), OrderBy(..), TabType, TabPostQuery(..), AffTableResult)
------------------------------------------------------------------------
------------------------------------------------------------------------
data Category = Trash | UnRead | Checked | Topic | Favorite
data Category = Trash | UnRead | Checked | Topic | Favorite
...
...
src/Gargantext/Components/Forest/Tree/Node/Action.purs
View file @
406521d3
module Gargantext.Components.Forest.Tree.Node.Action where
module Gargantext.Components.Forest.Tree.Node.Action where
import Data.Generic.Rep (class Generic)
import Data.Generic.Rep.Eq (genericEq)
import Data.Generic.Rep.Show (genericShow)
import Data.Maybe (Maybe)
import Data.Maybe (Maybe)
import Effect.Aff (Aff)
import Effect.Aff (Aff)
import Gargantext.Prelude (class
Eq, class Show, class Read
, Unit)
import Gargantext.Prelude (class
Show
, Unit)
import Gargantext.Sessions (Session)
import Gargantext.Sessions (Session)
import Gargantext.Types as GT
import Gargantext.Types as GT
import Gargantext.Components.Forest.Tree.Node (NodeAction(..), glyphiconNodeAction)
import Gargantext.Components.Forest.Tree.Node (NodeAction(..), glyphiconNodeAction)
...
...
src/Gargantext/Components/Forest/Tree/Node/Tools/FTree.purs
View file @
406521d3
...
@@ -2,7 +2,6 @@ module Gargantext.Components.Forest.Tree.Node.Tools.FTree where
...
@@ -2,7 +2,6 @@ module Gargantext.Components.Forest.Tree.Node.Tools.FTree where
import Data.Argonaut (class DecodeJson, decodeJson, (.:))
import Data.Argonaut (class DecodeJson, decodeJson, (.:))
import Data.Newtype (class Newtype)
import Data.Newtype (class Newtype)
import Gargantext.Sessions (Session, get, put, post, delete)
import Gargantext.Types as GT
import Gargantext.Types as GT
import Prelude hiding (div)
import Prelude hiding (div)
...
...
src/Gargantext/Types.purs
View file @
406521d3
module Gargantext.Types where
module Gargantext.Types where
import Prelude
import Data.Argonaut (class DecodeJson, class EncodeJson, decodeJson, encodeJson, jsonEmptyObject, (.:), (:=), (~>))
import Data.Argonaut (class DecodeJson, class EncodeJson, decodeJson, encodeJson, jsonEmptyObject, (.:), (:=), (~>))
import Data.Array as A
import Data.Array as A
import Data.Either (Either(..))
import Data.Either (Either(..))
...
@@ -11,9 +10,10 @@ import Data.Generic.Rep.Show (genericShow)
...
@@ -11,9 +10,10 @@ import Data.Generic.Rep.Show (genericShow)
import Data.Int (toNumber)
import Data.Int (toNumber)
import Data.Maybe (Maybe(..), maybe, fromMaybe)
import Data.Maybe (Maybe(..), maybe, fromMaybe)
import Effect.Aff (Aff)
import Effect.Aff (Aff)
import Gargantext.Prelude (class Read, read)
import Prelude
import Prim.Row (class Union)
import Prim.Row (class Union)
import URI.Query (Query)
import URI.Query (Query)
import Gargantext.Prelude (class Read, read)
type ID = Int
type ID = Int
type Name = String
type Name = String
...
@@ -508,25 +508,28 @@ data AsyncTaskStatus = Running
...
@@ -508,25 +508,28 @@ data AsyncTaskStatus = Running
| Finished
| Finished
| Killed
| Killed
derive instance genericAsyncTaskStatus :: Generic AsyncTaskStatus _
derive instance genericAsyncTaskStatus :: Generic AsyncTaskStatus _
instance showAsyncTaskStatus :: Show AsyncTaskStatus where
instance showAsyncTaskStatus :: Show AsyncTaskStatus where
show = genericShow
show = genericShow
derive instance eqAsyncTaskStatus :: Eq AsyncTaskStatus
derive instance eqAsyncTaskStatus :: Eq AsyncTaskStatus
instance encodeJsonAsyncTaskStatus :: EncodeJson AsyncTaskStatus where
instance encodeJsonAsyncTaskStatus :: EncodeJson AsyncTaskStatus where
encodeJson s = encodeJson $ show s
encodeJson s = encodeJson $ show s
instance decodeJsonAsyncTaskStatus :: DecodeJson AsyncTaskStatus where
instance decodeJsonAsyncTaskStatus :: DecodeJson AsyncTaskStatus where
decodeJson json = do
decodeJson json = do
obj <- decodeJson json
obj <- decodeJson json
pure $
readAsyncTaskStatus
obj
pure $
fromMaybe Running $ read
obj
readAsyncTaskStatus :: String -> AsyncTaskStatus
instance readAsyncTaskStatus :: Read AsyncTaskStatus where
readAsyncTaskStatus "IsFailure" =
Failed
read "IsFailure" = Just
Failed
readAsyncTaskStatus "IsFinished" =
Finished
read "IsFinished" = Just
Finished
readAsyncTaskStatus "IsKilled" =
Killed
read "IsKilled" = Just
Killed
readAsyncTaskStatus "IsPending" =
Pending
read "IsPending" = Just
Pending
readAsyncTaskStatus "IsReceived" =
Received
read "IsReceived" = Just
Received
readAsyncTaskStatus "IsRunning" =
Running
read "IsRunning" = Just
Running
readAsyncTaskStatus "IsStarted" =
Started
read "IsStarted" = Just
Started
readAsyncTaskStatus _ = Runn
ing
read _ = Noth
ing
newtype AsyncTask =
newtype AsyncTask =
AsyncTask { id :: AsyncTaskID
AsyncTask { id :: AsyncTaskID
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment