Commit 18eeb1f4 authored by Alexandre Delanoë's avatar Alexandre Delanoë

[FEAT] Adding Visio micro-service (Jitsi)

First add New type NodeFrameVisio it this case:
	modified :         src/Gargantext/Database/Admin/Types/Node.hs
After this step, just follow the compiler errors to fix the instances.

	modified :         src/Gargantext/Prelude/Config.hs

The NodeType NodeFrameVisio is created in Database and need some
parameters:
	modified :         src/Gargantext/Database/Action/Node.hs
	modified :         src/Gargantext/Database/Admin/Config.hs
	modified :         src/Gargantext/Database/Admin/Types/Hyperdata/Default.hs

Finally:
	modified :         gargantext.ini_toModify
The url of the micro-service can be adapted in gargantext.ini
parent e3fed9b2
Pipeline #1541 passed with stage
in 17 minutes and 30 seconds
......@@ -31,6 +31,8 @@ FRAME_WRITE_URL = URL_TO_CHANGE
#FRAME_CALC_URL = http://calc.frame.gargantext.org/
FRAME_CALC_URL = URL_TO_CHANGE
FRAME_VISIO_URL = URL_TO_CHANGE
FRAME_SEARX_URL = URL_TO_CHANGE
FRAME_ISTEX_URL = URL_TO_CHANGE
......
......@@ -57,6 +57,9 @@ mkNodeWithParent NodeFrameWrite i u n =
mkNodeWithParent NodeFrameCalc i u n =
mkNodeWithParent_ConfigureHyperdata NodeFrameCalc i u n
mkNodeWithParent NodeFrameVisio i u n =
mkNodeWithParent_ConfigureHyperdata NodeFrameVisio i u n
mkNodeWithParent NodeFrameNotebook i u n =
mkNodeWithParent_ConfigureHyperdata NodeFrameNotebook i u n
......@@ -79,6 +82,9 @@ mkNodeWithParent_ConfigureHyperdata NodeFrameWrite (Just i) uId name =
mkNodeWithParent_ConfigureHyperdata NodeFrameCalc (Just i) uId name =
mkNodeWithParent_ConfigureHyperdata' NodeFrameCalc (Just i) uId name
mkNodeWithParent_ConfigureHyperdata NodeFrameVisio (Just i) uId name =
mkNodeWithParent_ConfigureHyperdata' NodeFrameVisio (Just i) uId name
mkNodeWithParent_ConfigureHyperdata NodeFrameNotebook (Just i) uId name =
insertNode NodeFrameNotebook (Just "Notebook") (Just $ DefaultFrameCode $ HyperdataFrame "Notebook" name) i uId
......@@ -96,6 +102,7 @@ mkNodeWithParent_ConfigureHyperdata' nt (Just i) uId name = do
maybeNodeId <- case nt of
NodeFrameWrite -> insertNode NodeFrameWrite (Just name) Nothing i uId
NodeFrameCalc -> insertNode NodeFrameCalc (Just name) Nothing i uId
NodeFrameVisio -> insertNode NodeFrameVisio (Just name) Nothing i uId
_ -> nodeError NeedsConfiguration
case maybeNodeId of
......@@ -105,6 +112,7 @@ mkNodeWithParent_ConfigureHyperdata' nt (Just i) uId name = do
u <- case nt of
NodeFrameWrite -> pure $ _gc_frame_write_url cfg
NodeFrameCalc -> pure $ _gc_frame_calc_url cfg
NodeFrameVisio -> pure $ _gc_frame_visio_url cfg
_ -> nodeError NeedsConfiguration
let
s = _gc_secretkey cfg
......
......@@ -76,9 +76,10 @@ nodeTypeId n =
NodeFile -> 101
NodeFrameWrite -> 991
NodeFrameCalc -> 992
NodeFrameNotebook -> 993
NodeFrameWrite -> 991
NodeFrameCalc -> 992
NodeFrameNotebook -> 993
NodeFrameVisio -> 994
-- Cooccurrences -> 9
--
......
......@@ -52,6 +52,7 @@ data DefaultHyperdata =
| DefaultFrameWrite HyperdataFrame
| DefaultFrameCalc HyperdataFrame
| DefaultFrameVisio HyperdataFrame
| DefaultFrameCode HyperdataFrame
| DefaultFile HyperdataFile
......@@ -84,6 +85,7 @@ instance ToJSON DefaultHyperdata where
toJSON (DefaultFrameWrite x) = toJSON x
toJSON (DefaultFrameCalc x) = toJSON x
toJSON (DefaultFrameVisio x) = toJSON x
toJSON (DefaultFrameCode x) = toJSON x
toJSON (DefaultFile x) = toJSON x
......@@ -115,6 +117,7 @@ defaultHyperdata NodeDashboard = DefaultDashboard defaultHyperdataDashboard
defaultHyperdata NodeFrameWrite = DefaultFrameWrite defaultHyperdataFrame
defaultHyperdata NodeFrameCalc = DefaultFrameCalc defaultHyperdataFrame
defaultHyperdata NodeFrameVisio = DefaultFrameVisio defaultHyperdataFrame
defaultHyperdata NodeFrameNotebook = DefaultFrameCalc defaultHyperdataFrame
defaultHyperdata NodeFile = DefaultFile defaultHyperdataFile
......@@ -266,7 +266,7 @@ data NodeType = NodeUser
-}
-- Optional Nodes
| NodeFrameWrite | NodeFrameCalc | NodeFrameNotebook
| NodeFrameWrite | NodeFrameCalc | NodeFrameVisio | NodeFrameNotebook
| NodeFile
deriving (Show, Read, Eq, Generic, Bounded, Enum)
......@@ -301,6 +301,7 @@ defaultName NodePhylo = "Phylo"
defaultName NodeFrameWrite = "Frame Write"
defaultName NodeFrameCalc = "Frame Calc"
defaultName NodeFrameVisio = "Frame Visio"
defaultName NodeFrameNotebook = "Frame Code"
defaultName NodeFile = "File"
......
......@@ -39,6 +39,7 @@ data GargConfig = GargConfig { _gc_url :: !T.Text
, _gc_frame_write_url :: !T.Text
, _gc_frame_calc_url :: !T.Text
, _gc_frame_visio_url :: !T.Text
, _gc_frame_searx_url :: !T.Text
, _gc_frame_istex_url :: !T.Text
......@@ -68,6 +69,7 @@ readConfig fp = do
(cs $ val "REPO_FILEPATH")
(stripRight '/' $ val "FRAME_WRITE_URL")
(stripRight '/' $ val "FRAME_CALC_URL")
(stripRight '/' $ val "FRAME_VISIO_URL")
(stripRight '/' $ val "FRAME_SEARX_URL")
(stripRight '/' $ val "FRAME_ISTEX_URL")
(read $ cs $ val "MAX_DOCS_SCRAPERS")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment