Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
haskell-gargantext
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
199
Issues
199
List
Board
Labels
Milestones
Merge Requests
12
Merge Requests
12
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
haskell-gargantext
Commits
90af97f8
Commit
90af97f8
authored
Oct 25, 2021
by
Przemyslaw Kaminski
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev' into dev-graph-search-in-groups-not-in-labels
parents
cafa3ccd
2e5c7242
Pipeline
#2010
failed with stage
in 0 seconds
Changes
5
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
44 additions
and
12 deletions
+44
-12
package.yaml
package.yaml
+1
-1
Metrics.hs
src/Gargantext/API/Metrics.hs
+1
-1
DocumentUpload.hs
src/Gargantext/API/Node/DocumentUpload.hs
+2
-5
Update.hs
src/Gargantext/API/Node/Update.hs
+35
-4
Chart.hs
src/Gargantext/Core/Viz/Chart.hs
+5
-1
No files found.
package.yaml
View file @
90af97f8
name
:
gargantext
name
:
gargantext
version
:
'
0.0.4.
4
'
version
:
'
0.0.4.
5
'
synopsis
:
Search, map, share
synopsis
:
Search, map, share
description
:
Please see README.md
description
:
Please see README.md
category
:
Data
category
:
Data
...
...
src/Gargantext/API/Metrics.hs
View file @
90af97f8
src/Gargantext/API/Node/DocumentUpload.hs
View file @
90af97f8
...
@@ -81,7 +81,6 @@ documentUpload uId nId doc logStatus = do
...
@@ -81,7 +81,6 @@ documentUpload uId nId doc logStatus = do
,
_scst_remaining
=
Just
1
,
_scst_remaining
=
Just
1
,
_scst_events
=
Just
[]
}
,
_scst_events
=
Just
[]
}
logStatus
jl
logStatus
jl
mcId
<-
getClosestParentIdByType'
nId
NodeCorpus
mcId
<-
getClosestParentIdByType'
nId
NodeCorpus
let
cId
=
case
mcId
of
let
cId
=
case
mcId
of
Just
c
->
c
Just
c
->
c
...
@@ -89,7 +88,6 @@ documentUpload uId nId doc logStatus = do
...
@@ -89,7 +88,6 @@ documentUpload uId nId doc logStatus = do
(
year
,
month
,
day
)
<-
liftBase
$
getCurrentTime
>>=
return
.
toGregorian
.
utctDay
(
year
,
month
,
day
)
<-
liftBase
$
getCurrentTime
>>=
return
.
toGregorian
.
utctDay
let
nowS
=
T
.
pack
$
show
year
<>
"-"
<>
show
month
<>
"-"
<>
show
day
let
nowS
=
T
.
pack
$
show
year
<>
"-"
<>
show
month
<>
"-"
<>
show
day
let
hd
=
HyperdataDocument
{
_hd_bdd
=
Nothing
let
hd
=
HyperdataDocument
{
_hd_bdd
=
Nothing
,
_hd_doi
=
Nothing
,
_hd_doi
=
Nothing
,
_hd_url
=
Nothing
,
_hd_url
=
Nothing
...
@@ -109,7 +107,6 @@ documentUpload uId nId doc logStatus = do
...
@@ -109,7 +107,6 @@ documentUpload uId nId doc logStatus = do
,
_hd_publication_minute
=
Nothing
,
_hd_publication_minute
=
Nothing
,
_hd_publication_second
=
Nothing
,
_hd_publication_second
=
Nothing
,
_hd_language_iso2
=
Just
$
T
.
pack
$
show
EN
}
,
_hd_language_iso2
=
Just
$
T
.
pack
$
show
EN
}
_
<-
flowDataText
(
RootId
(
NodeId
uId
))
(
DataNew
[[
hd
]])
(
Multi
EN
)
cId
Nothing
_
<-
flowDataText
(
RootId
(
NodeId
uId
))
(
DataNew
[[
hd
]])
(
Multi
EN
)
cId
Nothing
pure
$
jobLogSuccess
jl
pure
$
jobLogSuccess
jl
src/Gargantext/API/Node/Update.hs
View file @
90af97f8
...
@@ -23,17 +23,19 @@ import Data.Swagger
...
@@ -23,17 +23,19 @@ import Data.Swagger
import
GHC.Generics
(
Generic
)
import
GHC.Generics
(
Generic
)
import
Gargantext.API.Admin.Orchestrator.Types
(
JobLog
(
..
),
AsyncJobs
)
import
Gargantext.API.Admin.Orchestrator.Types
(
JobLog
(
..
),
AsyncJobs
)
import
Gargantext.API.Admin.Types
(
HasSettings
)
import
Gargantext.API.Admin.Types
(
HasSettings
)
import
qualified
Gargantext.API.Metrics
as
Metrics
import
Gargantext.API.Ngrams.List
(
reIndexWith
)
import
Gargantext.API.Ngrams.List
(
reIndexWith
)
import
qualified
Gargantext.API.Ngrams.Types
as
NgramsTypes
import
Gargantext.API.Prelude
(
GargServer
,
simuLogs
)
import
Gargantext.API.Prelude
(
GargServer
,
simuLogs
)
import
Gargantext.Core.Methods.Distances
(
GraphMetric
(
..
))
import
Gargantext.Core.Methods.Distances
(
GraphMetric
(
..
))
import
Gargantext.Core.Viz.Graph.API
(
recomputeGraph
)
import
Gargantext.Database.Query.Table.Node
(
getNode
)
import
Gargantext.Database.Schema.Node
(
node_parent_id
)
import
Gargantext.Core.Types.Main
(
ListType
(
..
))
import
Gargantext.Core.Types.Main
(
ListType
(
..
))
import
Gargantext.
Database.Schema.Ngrams
(
NgramsType
(
NgramsTerms
)
)
import
Gargantext.
Core.Viz.Graph.API
(
recomputeGraph
)
import
Gargantext.Database.Action.Flow.Pairing
(
pairing
)
import
Gargantext.Database.Action.Flow.Pairing
(
pairing
)
import
Gargantext.Database.Action.Flow.Types
(
FlowCmdM
)
import
Gargantext.Database.Action.Flow.Types
(
FlowCmdM
)
import
Gargantext.Database.Admin.Types.Node
import
Gargantext.Database.Admin.Types.Node
import
Gargantext.Database.Query.Table.Node
(
getNode
)
import
Gargantext.Database.Schema.Node
(
node_parent_id
)
import
Gargantext.Database.Schema.Ngrams
(
NgramsType
(
NgramsTerms
))
import
Gargantext.Prelude
(
Ord
,
Eq
,
(
<$>
),
(
$
),
liftBase
,
(
.
),
printDebug
,
pure
,
show
,
cs
,
(
<>
),
panic
)
import
Gargantext.Prelude
(
Ord
,
Eq
,
(
<$>
),
(
$
),
liftBase
,
(
.
),
printDebug
,
pure
,
show
,
cs
,
(
<>
),
panic
)
import
qualified
Gargantext.Utils.Aeson
as
GUA
import
qualified
Gargantext.Utils.Aeson
as
GUA
import
Prelude
(
Enum
,
Bounded
,
minBound
,
maxBound
)
import
Prelude
(
Enum
,
Bounded
,
minBound
,
maxBound
)
...
@@ -119,6 +121,35 @@ updateNode _uId nid1 (LinkNodeReq nt nid2) logStatus = do
...
@@ -119,6 +121,35 @@ updateNode _uId nid1 (LinkNodeReq nt nid2) logStatus = do
,
_scst_events
=
Just
[]
,
_scst_events
=
Just
[]
}
}
-- | `Advanced` to update graphs
updateNode
_uId
lId
(
UpdateNodeParamsList
Advanced
)
logStatus
=
do
logStatus
JobLog
{
_scst_succeeded
=
Just
1
,
_scst_failed
=
Just
0
,
_scst_remaining
=
Just
2
,
_scst_events
=
Just
[]
}
corpusId
<-
view
node_parent_id
<$>
getNode
lId
logStatus
JobLog
{
_scst_succeeded
=
Just
2
,
_scst_failed
=
Just
0
,
_scst_remaining
=
Just
1
,
_scst_events
=
Just
[]
}
_
<-
case
corpusId
of
Just
cId
->
do
_
<-
Metrics
.
updatePie'
cId
(
Just
lId
)
NgramsTypes
.
Authors
Nothing
_
<-
Metrics
.
updateTree'
cId
(
Just
lId
)
NgramsTypes
.
Institutes
MapTerm
_
<-
Metrics
.
updatePie'
cId
(
Just
lId
)
NgramsTypes
.
Sources
Nothing
pure
()
Nothing
->
pure
()
pure
JobLog
{
_scst_succeeded
=
Just
3
,
_scst_failed
=
Just
0
,
_scst_remaining
=
Just
0
,
_scst_events
=
Just
[]
}
updateNode
_uId
lId
(
UpdateNodeParamsList
_mode
)
logStatus
=
do
updateNode
_uId
lId
(
UpdateNodeParamsList
_mode
)
logStatus
=
do
logStatus
JobLog
{
_scst_succeeded
=
Just
1
logStatus
JobLog
{
_scst_succeeded
=
Just
1
,
_scst_failed
=
Just
0
,
_scst_failed
=
Just
0
...
...
src/Gargantext/Core/Viz/Chart.hs
View file @
90af97f8
...
@@ -69,7 +69,11 @@ chartData cId nt lt = do
...
@@ -69,7 +69,11 @@ chartData cId nt lt = do
(
_total
,
mapTerms
)
<-
countNodesByNgramsWith
(
group
dico
)
(
_total
,
mapTerms
)
<-
countNodesByNgramsWith
(
group
dico
)
<$>
getNodesByNgramsOnlyUser
cId
(
ls'
<>
ls
)
nt
terms
<$>
getNodesByNgramsOnlyUser
cId
(
ls'
<>
ls
)
nt
terms
let
(
dates
,
count
)
=
V
.
unzip
$
fmap
(
\
(
NgramsTerm
t
,(
d
,
_
))
->
(
t
,
d
))
$
V
.
fromList
$
HashMap
.
toList
mapTerms
let
(
dates
,
count
)
=
V
.
unzip
$
V
.
fromList
$
List
.
sortOn
snd
$
(
\
(
NgramsTerm
t
,(
d
,
_
))
->
(
t
,
d
))
<$>
HashMap
.
toList
mapTerms
pure
(
Histo
dates
(
round
<$>
count
))
pure
(
Histo
dates
(
round
<$>
count
))
...
...
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