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
140
Issues
140
List
Board
Labels
Milestones
Merge Requests
4
Merge Requests
4
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
gargantext
purescript-gargantext
Commits
eb6aacde
Commit
eb6aacde
authored
May 27, 2020
by
Alexandre Delanoë
Browse files
Options
Browse Files
Download
Plain Diff
[MERGE] fix with dev
parents
bbd5a4e5
657b356f
Changes
10
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
316 additions
and
210 deletions
+316
-210
Tree.purs
src/Gargantext/Components/Forest/Tree.purs
+5
-2
Node.purs
src/Gargantext/Components/Forest/Tree/Node.purs
+95
-84
Action.purs
src/Gargantext/Components/Forest/Tree/Node/Action.purs
+12
-1
Box.purs
src/Gargantext/Components/Forest/Tree/Node/Box.purs
+176
-94
Sidebar.purs
src/Gargantext/Components/GraphExplorer/Sidebar.purs
+0
-8
Login.purs
src/Gargantext/Components/Login.purs
+13
-7
Routes.purs
src/Gargantext/Routes.purs
+12
-12
Types.purs
src/Gargantext/Types.purs
+2
-1
BootstrapNative.js
src/Gargantext/Utils/BootstrapNative.js
+0
-0
BootstrapNative.purs
src/Gargantext/Utils/BootstrapNative.purs
+1
-1
No files found.
src/Gargantext/Components/Forest/Tree.purs
View file @
eb6aacde
...
...
@@ -190,9 +190,12 @@ performAction p@{ reload: (_ /\ setReload)
performAction p@{ openNodes: (_ /\ setOpenNodes)
, reload: (_ /\ setReload)
, tasks: (_ /\ setAsyncTasks)
, session
, tree: (NTree (LNode {id}) _) } (CreateSubmit name nodeType) = do
void $ createNode session id $ CreateValue {name, nodeType}
-- task <- createNodeAsync session id $ CreateValue {name, nodeType}
task <- createNode session id $ CreateValue {name, nodeType}
-- liftEffect $ setAsyncTasks $ A.cons task
liftEffect do
setOpenNodes (Set.insert (mkNodeId session id))
performAction p RefreshTree
...
...
src/Gargantext/Components/Forest/Tree/Node.purs
View file @
eb6aacde
...
...
@@ -16,9 +16,12 @@ filterWithRights (show action if user can only)
-}
------------------------------------------------------------------------
------------------------------------------------------------------------
data Status a = IsBeta a | IsProd a
data NodeAction = Documentation NodeType
| SearchBox
| Download | Upload | Refresh
| Download | Upload | Refresh
| Config
| Move | Clone | Delete
| Share | Link NodeType
| Add (Array NodeType)
...
...
@@ -38,6 +41,7 @@ instance eqNodeAction :: Eq NodeAction where
eq (Link x) (Link y) = true && (x == y)
eq (Add x) (Add y) = true && (x == y)
eq CopyFromCorpus CopyFromCorpus = true
eq Config Config = true
eq _ _ = false
instance showNodeAction :: Show NodeAction where
...
...
@@ -50,6 +54,7 @@ instance showNodeAction :: Show NodeAction where
show Clone = "Clone"
show Delete = "Delete"
show Share = "Share"
show Config = "Config"
show (Link x) = "Link to " <> show x
show (Add xs) = foldl (\a b -> a <> show b) "Add " xs
show CopyFromCorpus = "Copy from corpus"
...
...
@@ -64,10 +69,11 @@ glyphiconNodeAction Upload = "upload"
glyphiconNodeAction (Link _) = "transfer"
glyphiconNodeAction Download = "download"
glyphiconNodeAction CopyFromCorpus = "random"
glyphiconNodeAction Refresh = "refresh"
glyphiconNodeAction Config = "wrench"
glyphiconNodeAction _ = ""
------------------------------------------------------------------------
------------------------------------------------------------------------
data SettingsBox =
SettingsBox { show :: Boolean
...
...
@@ -79,14 +85,14 @@ data SettingsBox =
settingsBox :: NodeType -> SettingsBox
settingsBox NodeUser = SettingsBox {
show: true
show
: true
, edit : false
, doc : Documentation NodeUser
, buttons : [ Delete ]
}
settingsBox FolderPrivate = SettingsBox {
show: true
show
: true
, edit : false
, doc : Documentation FolderPrivate
, buttons : [ Add [ Corpus
...
...
@@ -97,7 +103,7 @@ settingsBox FolderPrivate = SettingsBox {
}
settingsBox Team = SettingsBox {
show: true
show
: true
, edit : true
, doc : Documentation Team
, buttons : [ Add [ Corpus
...
...
@@ -108,7 +114,7 @@ settingsBox Team = SettingsBox {
}
settingsBox FolderShared = SettingsBox {
show: true
show
: true
, edit : true
, doc : Documentation FolderShared
, buttons : [ Add [Team, FolderShared]
...
...
@@ -117,7 +123,7 @@ settingsBox FolderShared = SettingsBox {
}
settingsBox FolderPublic = SettingsBox {
show: true
show
: true
, edit : false
, doc : Documentation FolderPublic
, buttons : [ Add [ Corpus
...
...
@@ -126,8 +132,8 @@ settingsBox FolderPublic = SettingsBox {
]
}
settingsBox Folder =
SettingsBox {
show
: true
settingsBox Folder =
SettingsBox { show
: true
, edit : true
, doc : Documentation Folder
, buttons : [ Add [ Corpus
...
...
@@ -138,8 +144,8 @@ settingsBox Folder = SettingsBox {
]
}
settingsBox Corpus =
SettingsBox {
show
: true
settingsBox Corpus =
SettingsBox { show
: true
, edit : true
, doc : Documentation Corpus
, buttons : [ SearchBox
...
...
@@ -157,45 +163,50 @@ settingsBox Corpus = SettingsBox {
]
}
settingsBox Texts =
SettingsBox {
show
: true
settingsBox Texts =
SettingsBox { show
: true
, edit : false
, doc : Documentation Texts
, buttons : [ Upload
, buttons : [ Refresh
, Upload
, Download
-- , Delete
]
}
settingsBox Graph =
SettingsBox {
show
: true
settingsBox Graph =
SettingsBox { show
: true
, edit : false
, doc : Documentation Graph
, buttons : [ Download -- TODO as GEXF or JSON
, buttons : [ Refresh
, Config
, Download -- TODO as GEXF or JSON
, Delete
]
}
settingsBox NodeList =
SettingsBox {
show
: true
settingsBox NodeList =
SettingsBox { show
: true
, edit : false
, doc : Documentation NodeList
, buttons : [ Upload
, CopyFromCorpus
, buttons : [ Refresh
, Config
, Download
-- , Delete
, Upload
, CopyFromCorpus
, Delete
]
}
settingsBox Dashboard =
SettingsBox {
show
: true
settingsBox Dashboard =
SettingsBox { show
: true
, edit : false
, doc : Documentation Dashboard
, buttons : []
}
settingsBox Annuaire =
SettingsBox {
show
: true
settingsBox Annuaire =
SettingsBox { show
: true
, edit : false
, doc : Documentation Annuaire
, buttons : [ Upload
...
...
@@ -203,8 +214,8 @@ settingsBox Annuaire = SettingsBox {
]
}
settingsBox _ =
SettingsBox {
show
: false
settingsBox _ =
SettingsBox { show
: false
, edit : false
, doc : Documentation NodeUser
, buttons : []
...
...
src/Gargantext/Components/Forest/Tree/Node/Action.purs
View file @
eb6aacde
...
...
@@ -12,6 +12,7 @@ import Prelude hiding (div)
import Gargantext.Components.Lang (Lang)
import Gargantext.Routes (SessionRoute(..))
import Gargantext.Sessions (Session, get, put, post, delete)
import Gargantext.Routes as GR
import Gargantext.Types as GT
data Action = CreateSubmit String GT.NodeType
...
...
@@ -61,6 +62,16 @@ type UploadFile = {
createNode :: Session -> ID -> CreateValue -> Aff (Array ID)
createNode session parentId = post session $ NodeAPI GT.Node (Just parentId) ""
createNodeAsync :: Session
-> ID
-> CreateValue
-> Aff GT.AsyncTaskWithType
createNodeAsync session parentId q = do
task <- post session p q
pure $ GT.AsyncTaskWithType {task, typ: GT.CreateNode}
where
p = GR.NodeAPI GT.Node (Just parentId) (GT.asyncTaskTypePath GT.CreateNode)
renameNode :: Session -> ID -> RenameValue -> Aff (Array ID)
renameNode session renameNodeId = put session $ NodeAPI GT.Node (Just renameNodeId) "rename"
...
...
src/Gargantext/Components/Forest/Tree/Node/Box.purs
View file @
eb6aacde
This diff is collapsed.
Click to expand it.
src/Gargantext/Components/GraphExplorer/Sidebar.purs
View file @
eb6aacde
...
...
@@ -69,11 +69,6 @@ sidebarCpt = R.hooksComponent "Sidebar" cpt
[ RH.div { className: "", role: "tabpanel" }
(Seq.toUnfoldable $ (Seq.map (badge props.selectedNodeIds) (badges props.graph props.selectedNodeIds)))
]
, RH.div { className: "gexf" } [
RH.a { className: "btn btn-default"
, href: gexfHref props.session props.graphId
, target: "_blank" } [ RH.text "Download GEXF" ]
]
, RH.div { className: "tab-content" }
[
removeButton "Remove candidate" CandidateTerm props nodesMap
...
...
@@ -138,9 +133,6 @@ sidebarCpt = R.hooksComponent "Sidebar" cpt
snd props.removedNodeIds $ const $ fst props.selectedNodeIds
snd props.selectedNodeIds $ const SigmaxT.emptyNodeIds
gexfHref :: Session -> Int -> String
gexfHref session graphId = url session $ Routes.NodeAPI GT.Graph (Just graphId) "gexf"
badge :: R.State SigmaxT.NodeIds -> Record SigmaxT.Node -> R.Element
badge (_ /\ setNodeIds) {id, label} =
...
...
src/Gargantext/Components/Login.purs
View file @
eb6aacde
...
...
@@ -167,7 +167,7 @@ formCpt = R.hooksComponent "G.C.Login.form" cpt where
[ cardGroup
[ cardBlock
[ center
[ H.div {className: "text-muted"
}
[ H.div {}{-className: "text-muted"-
}
[ H.text $ "Login to garg://" <> show backend]
, requestAccessLink {}
]
...
...
@@ -178,7 +178,13 @@ formCpt = R.hooksComponent "G.C.Login.form" cpt where
, center
[ H.label {}
[ H.div {className: "checkbox"}
[ termsCheckbox setBox , H.text "I accept the terms of use ", termsLink {} ] ]
[ termsCheckbox setBox
, H.text "I hereby accept "
, H.a { target: "_blank"
, href: "http://gitlab.iscpif.fr/humanities/tofu/tree/master"
} [ H.text "the terms of use" ]
]
]
]
]
, if checkBox == true
...
...
@@ -216,7 +222,7 @@ termsCheckbox setCheckBox =
termsLink :: {} -> R.Element
termsLink _ =
H.a { target: "_blank", href: termsUrl } [ H.text "
[Read the terms of use]
" ]
H.a { target: "_blank", href: termsUrl } [ H.text "
the terms of use
" ]
where termsUrl = "http://gitlab.iscpif.fr/humanities/tofu/tree/master"
requestAccessLink :: {} -> R.Element
...
...
src/Gargantext/Routes.purs
View file @
eb6aacde
src/Gargantext/Types.purs
View file @
eb6aacde
...
...
@@ -464,13 +464,14 @@ modeFromString _ = Nothing
-- Async tasks
-- corresponds to /add/form/async or /add/query/async
data AsyncTaskType = Form | GraphT | Query
data AsyncTaskType = Form | GraphT | Query
| CreateNode
derive instance genericAsyncTaskType :: Generic AsyncTaskType _
asyncTaskTypePath :: AsyncTaskType -> String
asyncTaskTypePath Form = "add/form/async/"
asyncTaskTypePath Query = "query/"
asyncTaskTypePath GraphT = "async/"
asyncTaskTypePath CreateNode = "async/nobody/"
type AsyncTaskID = String
...
...
src/Gargantext/BootstrapNative.js
→
src/Gargantext/
Utils/
BootstrapNative.js
View file @
eb6aacde
File moved
src/Gargantext/BootstrapNative.purs
→
src/Gargantext/
Utils/
BootstrapNative.purs
View file @
eb6aacde
module Gargantext.BootstrapNative where
module Gargantext.
Utils.
BootstrapNative where
import Effect (Effect)
...
...
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