Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
H
haskell-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
Przemyslaw Kaminski
haskell-gargantext
Commits
ed7a5078
Commit
ed7a5078
authored
Feb 19, 2020
by
Przemyslaw Kaminski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Dashboard] allow storing charts in the dashboard node
parent
f99ffe40
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
3 deletions
+8
-3
Node.hs
src/Gargantext/Database/Schema/Node.hs
+6
-1
Node.hs
src/Gargantext/Database/Types/Node.hs
+2
-2
No files found.
src/Gargantext/Database/Schema/Node.hs
View file @
ed7a5078
...
@@ -526,7 +526,7 @@ nodePhyloW maybeName maybePhylo pId = node NodePhylo name graph (Just pId)
...
@@ -526,7 +526,7 @@ nodePhyloW maybeName maybePhylo pId = node NodePhylo name graph (Just pId)
------------------------------------------------------------------------
------------------------------------------------------------------------
arbitraryDashboard
::
HyperdataDashboard
arbitraryDashboard
::
HyperdataDashboard
arbitraryDashboard
=
HyperdataDashboard
(
Just
"Preferences"
)
arbitraryDashboard
=
HyperdataDashboard
(
Just
"Preferences"
)
[]
------------------------------------------------------------------------
------------------------------------------------------------------------
node
::
(
ToJSON
a
,
Hyperdata
a
)
=>
NodeType
->
Name
->
a
->
Maybe
ParentId
->
UserId
->
NodeWrite
node
::
(
ToJSON
a
,
Hyperdata
a
)
=>
NodeType
->
Name
->
a
->
Maybe
ParentId
->
UserId
->
NodeWrite
...
@@ -611,6 +611,11 @@ postNode uid pid (Node' NodeAnnuaire txt v ns) = do
...
@@ -611,6 +611,11 @@ postNode uid pid (Node' NodeAnnuaire txt v ns) = do
pids
<-
mkNodeR
(
concat
$
map
(
\
n
->
[
childWith
uid
pid'
n
])
ns
)
pids
<-
mkNodeR
(
concat
$
map
(
\
n
->
[
childWith
uid
pid'
n
])
ns
)
pure
$
NewNode
pid'
pids
pure
$
NewNode
pid'
pids
postNode
uid
pid
(
Node'
NodeDashboard
txt
v
ns
)
=
do
NewNode
pid'
_
<-
postNode
uid
pid
(
Node'
NodeDashboard
txt
v
[]
)
pids
<-
mkNodeR
(
concat
$
map
(
\
n
->
[
childWith
uid
pid'
n
])
ns
)
pure
$
NewNode
pid'
pids
postNode
_
_
(
Node'
_
_
_
_
)
=
nodeError
NotImplYet
postNode
_
_
(
Node'
_
_
_
_
)
=
nodeError
NotImplYet
...
...
src/Gargantext/Database/Types/Node.hs
View file @
ed7a5078
...
@@ -325,7 +325,6 @@ data CorpusField = MarkdownField { _cf_text :: !Text }
...
@@ -325,7 +325,6 @@ data CorpusField = MarkdownField { _cf_text :: !Text }
,
_cf_desc
::
!
Text
,
_cf_desc
::
!
Text
,
_cf_query
::
!
Text
,
_cf_query
::
!
Text
,
_cf_authors
::
!
Text
,
_cf_authors
::
!
Text
,
_cf_charts
::
!
[
Chart
]
-- , _cf_resources :: ![Resource]
-- , _cf_resources :: ![Resource]
}
}
|
HaskellField
{
_cf_haskell
::
!
Text
}
|
HaskellField
{
_cf_haskell
::
!
Text
}
...
@@ -375,7 +374,7 @@ corpusExample = "" -- TODO
...
@@ -375,7 +374,7 @@ corpusExample = "" -- TODO
defaultCorpus
::
HyperdataCorpus
defaultCorpus
::
HyperdataCorpus
defaultCorpus
=
HyperdataCorpus
[
defaultCorpus
=
HyperdataCorpus
[
HyperdataField
JSON
"Mandatory fields"
(
JsonField
"Title"
"Descr"
"Bool query"
"Authors"
[]
)
HyperdataField
JSON
"Mandatory fields"
(
JsonField
"Title"
"Descr"
"Bool query"
"Authors"
)
,
HyperdataField
Markdown
"Optional Text"
(
MarkdownField
"# title
\n
## subtitle"
)
,
HyperdataField
Markdown
"Optional Text"
(
MarkdownField
"# title
\n
## subtitle"
)
]
]
...
@@ -454,6 +453,7 @@ instance Hyperdata HyperdataResource
...
@@ -454,6 +453,7 @@ instance Hyperdata HyperdataResource
------------------------------------------------------------------------
------------------------------------------------------------------------
data
HyperdataDashboard
=
HyperdataDashboard
{
hyperdataDashboard_preferences
::
!
(
Maybe
Text
)
data
HyperdataDashboard
=
HyperdataDashboard
{
hyperdataDashboard_preferences
::
!
(
Maybe
Text
)
,
hyperdataDashboard_charts
::
!
[
Chart
]
}
deriving
(
Show
,
Generic
)
}
deriving
(
Show
,
Generic
)
$
(
deriveJSON
(
unPrefix
"hyperdataDashboard_"
)
''
H
yperdataDashboard
)
$
(
deriveJSON
(
unPrefix
"hyperdataDashboard_"
)
''
H
yperdataDashboard
)
...
...
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