Commit d8abf3ad authored by Alexandre Delanoë's avatar Alexandre Delanoë

[FEAT] Aadding Visio micro-service (Jitsi)

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

Then adapt the routes:
	modified :         src/Gargantext/Router.purs
	modified :         src/Gargantext/Components/Router.purs
	modified :         src/Gargantext/Routes.purs

Finally fix the Node and its options:
	modified :         src/Gargantext/Components/Forest/Tree/Node/Settings.purs
	modified :         src/Gargantext/Components/Nodes/Frame.purs

	modifié :         dist/index.html
Some script have to be loaded (to be tested still)
parent fae5ebd9
Pipeline #1549 canceled with stage
......@@ -14,5 +14,6 @@
<div id="app" class ="container-fluid"></div>
<div id="portal"></div>
<script src="bundle.js"></script>
<script src='https://visio.gargantext.org/external_api.js'></script> <!-- FIXME to be removed -->
</body>
</html>
......@@ -133,6 +133,7 @@ settingsBox Team =
-- , NodeFrameNotebook
, Team
, FolderShared
, NodeFrameVisio
]
, Share
, Delete
......@@ -338,6 +339,19 @@ settingsBox NodeFrameNotebook =
}
settingsBox NodeFrameVisio =
SettingsBox { show : true
, edit : true
, doc : Documentation NodeFrameVisio
, buttons : [ Add [ NodeFrameVisio
, NodeFrameWrite
, NodeFrameCalc
]
, Delete
]
}
......
......@@ -89,7 +89,8 @@ type FrameId = String
hframeUrl :: NodeType -> Base -> FrameId -> String
hframeUrl NodeFrameNotebook _ frame_id = frame_id -- Temp fix : frame_id is currently the whole url created
hframeUrl NodeFrameCalc base frame_id = base <> "/" <> frame_id
hframeUrl NodeFrameCalc base frame_id = base <> "/" <> frame_id
hframeUrl NodeFrameVisio base frame_id = base <> "/" <> frame_id
hframeUrl _ base frame_id = base <> "/" <> frame_id <> "?view" -- "?both"
frameLayoutView :: Record ViewProps -> R.Element
......@@ -108,10 +109,11 @@ frameLayoutViewCpt = here.component "frameLayoutView" cpt
, FV.homeButton
, H.div { className : "frame"
, rows: "100%,*" }
[ H.iframe { src: hframeUrl nodeType base frame_id
, width: "100%"
, height: "100%"
} []
[ -- H.script { src: "https://visio.gargantext.org/external_api.js"} [],
H.iframe { src: hframeUrl nodeType base frame_id
, width: "100%"
, height: "100%"
} []
]
]
......
......@@ -183,9 +183,10 @@ renderRouteCpt = here.component "renderRoute" cpt where
GR.PGraphExplorer s g -> graphExplorer (sessionNodeProps s g) []
GR.PhyloExplorer s g -> phyloExplorer (sessionNodeProps s g) []
GR.RouteFile s n -> routeFile (sessionNodeProps s n) []
GR.RouteFrameCalc s n -> routeFrame (Record.merge { nodeType: NodeFrameCalc } $ sessionNodeProps s n) []
GR.RouteFrameWrite s n -> routeFrame (Record.merge { nodeType: NodeFrameWrite } $ sessionNodeProps s n) []
GR.RouteFrameCalc s n -> routeFrame (Record.merge { nodeType: NodeFrameCalc } $ sessionNodeProps s n) []
GR.RouteFrameCode s n -> routeFrame (Record.merge { nodeType: NodeFrameNotebook } $ sessionNodeProps s n) []
GR.RouteFrameWrite s n -> routeFrame (Record.merge { nodeType: NodeFrameWrite } $ sessionNodeProps s n) []
GR.RouteFrameVisio s n -> routeFrame (Record.merge { nodeType: NodeFrameVisio } $ sessionNodeProps s n) []
GR.Team s n -> team (sessionNodeProps s n) []
GR.Texts s n -> texts (sessionNodeProps s n) []
GR.UserPage s n -> user (sessionNodeProps s n) []
......
......@@ -32,10 +32,11 @@ router = oneOf
, Annuaire <$> (route "annuaire" *> sid) <*> int
, UserPage <$> (route "user" *> sid) <*> int
, RouteFrameWrite <$> (route "write" *> sid) <*> int
, RouteFrameWrite <$> (route "write" *> sid) <*> int
, RouteFrameCalc <$> (route "calc" *> sid) <*> int
, RouteFrameCode <$> (route "code" *> sid) <*> int
, RouteFile <$> (route "file" *> sid) <*> int
, RouteFrameVisio <$> (route "visio" *> sid) <*> int
, RouteFile <$> (route "file" *> sid) <*> int
, Home <$ lit ""
]
where
......
......@@ -29,6 +29,7 @@ data AppRoute
| RouteFrameCalc SessionId Int
| RouteFrameCode SessionId Int
| RouteFrameWrite SessionId Int
| RouteFrameVisio SessionId Int
| Team SessionId Int
| Texts SessionId Int
| UserPage SessionId Int
......@@ -81,6 +82,7 @@ instance showAppRoute :: Show AppRoute where
show (RouteFrameWrite s i) = "write" <> show i <> " (" <> show s <> ")"
show (RouteFrameCalc s i) = "calc" <> show i <> " (" <> show s <> ")"
show (RouteFrameCode s i) = "code" <> show i <> " (" <> show s <> ")"
show (RouteFrameVisio s i) = "visio" <> show i <> " (" <> show s <> ")"
show (RouteFile s i) = "file" <> show i <> " (" <> show s <> ")"
......@@ -104,8 +106,9 @@ appPath (Annuaire s i) = "annuaire/" <> show s <> "/" <> show i
appPath (UserPage s i) = "user/" <> show s <> "/" <> show i
appPath (ContactPage s a i) = "annuaire/" <> show s <> "/" <> show a <> "/contact/" <> show i
appPath (RouteFrameWrite s i) = "write/" <> show s <> "/" <> show i
appPath (RouteFrameCalc s i) = "calc/" <> show s <> "/" <> show i
appPath (RouteFrameCode s i) = "code/" <> show s <> "/" <> show i
appPath (RouteFrameCalc s i) = "calc/" <> show s <> "/" <> show i
appPath (RouteFrameCode s i) = "code/" <> show s <> "/" <> show i
appPath (RouteFrameVisio s i) = "visio/" <> show s <> "/" <> show i
appPath (RouteFile s i) = "file/" <> show s <> "/" <> show i
nodeTypeAppRoute :: NodeType -> SessionId -> Int -> Maybe AppRoute
......@@ -125,5 +128,6 @@ nodeTypeAppRoute GT.NodeUser s i = Just $ UserPage s i
nodeTypeAppRoute GT.Team s i = Just $ Team s i
nodeTypeAppRoute GT.Texts s i = Just $ Texts s i
nodeTypeAppRoute GT.NodeFrameWrite s i = Just $ RouteFrameWrite s i
nodeTypeAppRoute GT.NodeFrameCalc s i = Just $ RouteFrameCalc s i
nodeTypeAppRoute GT.NodeFrameCalc s i = Just $ RouteFrameCalc s i
nodeTypeAppRoute GT.NodeFrameVisio s i = Just $ RouteFrameVisio s i
nodeTypeAppRoute _ _ _ = Nothing
......@@ -173,6 +173,7 @@ data NodeType = Annuaire
| NodeFrameCalc
| NodeFrameNotebook
| NodeFrameWrite
| NodeFrameVisio
| NodePublic NodeType
......@@ -203,7 +204,8 @@ instance showNodeType :: Show NodeType where
show Texts = "NodeDocs"
show NodeFrameWrite = "NodeFrameWrite"
show NodeFrameCalc = "NodeFrameCalc"
show NodeFrameNotebook = "NodeFrameNotebook"
show NodeFrameNotebook = "NodeFrameNotebook"
show NodeFrameVisio = "NodeFrameVisio"
show (NodePublic nt) = "NodePublic" <> show nt
show NodeFile = "NodeFile"
......@@ -232,6 +234,7 @@ instance readNodeType :: Read NodeType where
read "NodeFrameWrite" = Just NodeFrameWrite
read "NodeFrameCalc" = Just NodeFrameCalc
read "NodeFrameNotebook" = Just NodeFrameNotebook
read "NodeFrameVisio" = Just NodeFrameVisio
read "NodeFile" = Just NodeFile
-- TODO NodePublic read ?
read _ = Nothing
......@@ -282,6 +285,10 @@ fldr NodeFrameCalc false = "fa fa-calculator"
fldr NodeFrameNotebook true = "fa fa-file-code-o"
fldr NodeFrameNotebook false = "fa fa-code"
fldr NodeFrameVisio true = "fa fa-video-camera"
fldr NodeFrameVisio false = "fa fa-video-camera"
fldr (NodePublic nt) b = fldr nt b
......@@ -338,7 +345,8 @@ nodeTypePath Texts = "texts"
nodeTypePath Team = "team"
nodeTypePath NodeFrameWrite = "write"
nodeTypePath NodeFrameCalc = "calc"
nodeTypePath NodeFrameNotebook = "code"
nodeTypePath NodeFrameNotebook = "code"
nodeTypePath NodeFrameVisio = "visio"
nodeTypePath (NodePublic nt) = nodeTypePath nt
nodeTypePath NodeFile = "file"
......
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