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
f1338ec8
Commit
f1338ec8
authored
Jul 26, 2020
by
Alexandre Delanoë
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[FIX] Json prefix rename
parent
45409b41
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
52 additions
and
25 deletions
+52
-25
FacetsTable.purs
src/Gargantext/Components/FacetsTable.purs
+23
-10
Rename.purs
...Gargantext/Components/Forest/Tree/Node/Action/Rename.purs
+1
-1
Sidebar.purs
src/Gargantext/Components/GraphExplorer/Sidebar.purs
+19
-5
Tabs.purs
src/Gargantext/Components/Nodes/Corpus/Graph/Tabs.purs
+3
-3
Routes.purs
src/Gargantext/Routes.purs
+6
-6
No files found.
src/Gargantext/Components/FacetsTable.purs
View file @
f1338ec8
...
...
@@ -72,7 +72,10 @@ type Deletions = { pending :: Set Int, deleted :: Set Int }
initialDeletions :: Deletions
initialDeletions = { pending: mempty, deleted: mempty }
newtype Pair = Pair { id :: Int, label :: String }
newtype Pair =
Pair { id :: Int
, label :: String
}
derive instance genericPair :: Generic Pair _
...
...
@@ -119,9 +122,9 @@ newtype Hyperdata = Hyperdata
{ authors :: String
, title :: String
, source :: String
, publication_year :: Int
, publication_year
:: Int
, publication_month :: Int
, publication_day :: Int
, publication_day
:: Int
}
--instance decodeHyperdata :: DecodeJson Hyperdata where
...
...
@@ -249,9 +252,19 @@ docViewGraphCpt = R.hooksComponent "FacetsDocViewGraph" cpt
, H.button { style: buttonStyle, on: { click: performClick } }
[ H.i { className: "glyphitem glyphicon glyphicon-trash"
, style: { marginRight : "9px" } } []
, H.text "Delete document!" ] ] ] ] ]
, H.text "Delete document!"
]
]
]
]
]
type PagePath = {nodeId :: Int, listId :: Int, query :: TextQuery, params :: T.Params, session :: Session}
type PagePath = { nodeId :: Int
, listId :: Int
, query :: TextQuery
, params :: T.Params
, session :: Session
}
initialPagePath :: {session :: Session, nodeId :: Int, listId :: Int, query :: TextQuery} -> PagePath
initialPagePath {session, nodeId, listId, query} = {session, nodeId, listId, query, params: T.initialParams}
...
...
@@ -287,12 +300,12 @@ loadPage {session, nodeId, listId, query, params: {limit, offset, orderBy}} = do
convOrderBy _ = DateAsc -- TODO
type PageLayoutProps =
( frontends :: Frontends
( frontends
:: Frontends
, totalRecords :: Int
, deletions :: R.State Deletions
, container :: Record T.TableContainerProps -> R.Element
, session :: Session
, path :: R.State PagePath
, deletions
:: R.State Deletions
, container
:: Record T.TableContainerProps -> R.Element
, session
:: Session
, path
:: R.State PagePath
)
type PageProps = ( documents :: Array DocumentsView | PageLayoutProps )
...
...
src/Gargantext/Components/Forest/Tree/Node/Action/Rename.purs
View file @
f1338ec8
...
...
@@ -24,7 +24,7 @@ newtype RenameValue = RenameValue
instance encodeJsonRenameValue :: EncodeJson RenameValue where
encodeJson (RenameValue {text})
= "
r_
name" := text
= "name" := text
~> jsonEmptyObject
------------------------------------------------------------------------
src/Gargantext/Components/GraphExplorer/Sidebar.purs
View file @
f1338ec8
...
...
@@ -149,11 +149,18 @@ sideTab (Opened SideTabData) props =
snd props'.selectedNodeIds $ const SigmaxT.emptyNodeIds
sideTab (Opened SideTabCommunity) props =
RH.div { className: "col-md-12", id: "query" }
[ query props.frontends
props.metaData
props.session
(SigmaxT.nodesGraphMap props.graph)
props.selectedNodeIds
]
sideTab _ _ = H.div {} []
-------------------------------------------
badge :: R.State SigmaxT.NodeIds -> Record SigmaxT.Node -> R.Element
badge (_ /\ setNodeIds) {id, label} =
...
...
@@ -192,7 +199,11 @@ deleteNodes { graphId, metaData, nodes, session, termList, treeReload } = do
Just (NTC.Versioned patch) -> do
liftEffect $ snd treeReload $ (+) 1
deleteNode :: TermList -> Session -> GET.MetaData -> Record SigmaxT.Node -> Aff NTC.VersionedNgramsPatches
deleteNode :: TermList
-> Session
-> GET.MetaData
-> Record SigmaxT.Node
-> Aff NTC.VersionedNgramsPatches
deleteNode termList session (GET.MetaData metaData) node = NTC.putNgramsPatches coreParams versioned
where
nodeId :: Int
...
...
@@ -222,7 +233,12 @@ deleteNode termList session (GET.MetaData metaData) node = NTC.putNgramsPatches
patch_list :: NTC.Replace TermList
patch_list = NTC.Replace { new: termList, old: MapTerm }
query :: Frontends -> GET.MetaData -> Session -> SigmaxT.NodesMap -> R.State SigmaxT.NodeIds -> R.Element
query :: Frontends
-> GET.MetaData
-> Session
-> SigmaxT.NodesMap
-> R.State SigmaxT.NodeIds
-> R.Element
query _ _ _ _ (selectedNodeIds /\ _) | Set.isEmpty selectedNodeIds = RH.div {} []
query frontends (GET.MetaData metaData) session nodesMap (selectedNodeIds /\ _) =
query' (head metaData.corpusId)
...
...
@@ -255,5 +271,3 @@ query frontends (GET.MetaData metaData) session nodesMap (selectedNodeIds /\ _)
]
-}
src/Gargantext/Components/Nodes/Corpus/Graph/Tabs.purs
View file @
f1338ec8
...
...
@@ -13,9 +13,9 @@ import Gargantext.Sessions (Session)
type Props =
( frontends :: Frontends
, query :: TextQuery
, session :: Session
, sides :: Array GraphSideCorpus
, query
:: TextQuery
, session
:: Session
, sides
:: Array GraphSideCorpus
)
tabs :: Record Props -> R.Element
...
...
src/Gargantext/Routes.purs
View file @
f1338ec8
...
...
@@ -40,13 +40,13 @@ data SessionRoute
| GetNgramsTableVersion { listId :: ListId, tabType :: TabType } (Maybe Id)
| PutNgrams TabType (Maybe ListId) (Maybe TermList) (Maybe Id)
-- ^ This name is not good. In particular this URL is used both in PUT and POST.
| RecomputeNgrams (TabSubType CTabNgramType) Id ListId
| RecomputeListChart ChartType
CTabNgramType
Id ListId
| NodeAPI NodeType (Maybe Id) String
| GraphAPI Id String
| ListsRoute ListId
| RecomputeNgrams
(TabSubType CTabNgramType) Id ListId
| RecomputeListChart ChartType
CTabNgramType
Id ListId
| NodeAPI
NodeType (Maybe Id) String
| GraphAPI
Id String
| ListsRoute
ListId
| ListDocument (Maybe ListId) (Maybe Id)
| Search SearchOpts (Maybe Id)
| Search
SearchOpts (Maybe Id)
| CorpusMetrics CorpusMetricOpts (Maybe Id)
| CorpusMetricsHash { listId :: ListId, tabType :: TabType } (Maybe Id)
| Chart ChartOpts (Maybe Id)
...
...
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