Commit 5617ee80 authored by david Chavalarias's avatar david Chavalarias

Merge branch 'dev' of https://gitlab.iscpif.fr/gargantext/purescript-gargantext into dev-david

parents 8f0e61d4 8343397e
...@@ -46,6 +46,7 @@ bundle.js ...@@ -46,6 +46,7 @@ bundle.js
/.lesshst /.lesshst
/dist/js/**/*.map /dist/js/**/*.map
/dist/styles/**/*.map /dist/styles/**/*.map
/dist/bundle.min.js*
# IDE specific # IDE specific
.vscode .vscode
## Version 0.0.7.3.1
* [FRONT][FIX][Cannot build the project on latest `dev` (#701)](https://gitlab.iscpif.fr/gargantext/purescript-gargantext/issues/701)
* [FRONT][FIX][Phylomemy panel reload after first query (#674)](https://gitlab.iscpif.fr/gargantext/purescript-gargantext/issues/674)
* [BACK][FIX][Various test failures (#408)](https://gitlab.iscpif.fr/gargantext/haskell-gargantext/issues/408)
* [BACK][FIX][Swagger documentation is down (#407)](https://gitlab.iscpif.fr/gargantext/haskell-gargantext/issues/407)
* [BACK][ADMIN][Improve startup error from
`runDbCheck`](https://gitlab.iscpif.fr/gargantext/haskell-gargantext/merge_requests/347)
* [BACK][CLEAN] removing unused SQL function in schema.sql
* [BACK][TESTS][Terms are calculated over all documents, even those in trash (#385)](https://gitlab.iscpif.fr/gargantext/haskell-gargantext/issues/385)
## Version 0.0.7.3 [/!\ Maintenance command inside]
* [BACK][FIX][Upgrade to GHC 9.4.8][Switch from .ini to TOML? (#304)](https://gitlab.iscpif.fr/gargantext/haskell-gargantext/issues/304)
* [BACK][CLEAN][Unused trigger](https://gitlab.iscpif.fr/gargantext/haskell-gargantext/merge_requests/345)
* ``` $ ./bin/psql gargantext.ini < devops/postgres/upgrade/0.0.7.3.sql```
* [BACK][Update Readme](https://gitlab.iscpif.fr/gargantext/haskell-gargantext/merge_requests/346)
* [FRONT][FIX][[Node document] Display the db source of a document (with authors, etc.) (#695)](https://gitlab.iscpif.fr/gargantext/purescript-gargantext/issues/695)
* [FRONT][FIX][Add separators between keywords in phylo (#696)](https://gitlab.iscpif.fr/gargantext/purescript-gargantext/issues/696)
* [FRONT][FIX][[Node Terms] In settings, on the download tab, put JSON as default selectbox choice, instead of the current JSON (zipped) (#691)](https://gitlab.iscpif.fr/gargantext/purescript-gargantext/issues/691)
* [BACK][FIX][Order 2] Back to previous parameter WIP
## Version 0.0.7.2.8
* [BACK][FEAT][Switch from .ini to TOML? (#304)](https://gitlab.iscpif.fr/gargantext/haskell-gargantext/issues/304)
* [BACK][SCRIPTS][Improve conversion script
](https://gitlab.iscpif.fr/gargantext/haskell-gargantext/merge_requests/341)
* [BACK][FIX][Remove obsolete GHC option (#388)](https://gitlab.iscpif.fr/gargantext/haskell-gargantext/issues/388)
* [DOC][README][Little update to README, docs and .gitignore
interface](https://gitlab.iscpif.fr/gargantext/haskell-gargantext/merge_requests/343)
## Version 0.0.7.2.7
* [BACK][FEAT][Switch from .ini to TOML? (#304)](https://gitlab.iscpif.fr/gargantext/haskell-gargantext/issues/304)
## Version 0.0.7.2.6
* [FRONT][FIX] Fix quote with spaces
## Version 0.0.7.2.5
* [BACK][CLEAN][Remove dead code (#387)](https://gitlab.iscpif.fr/gargantext/haskell-gargantext/issues/387)
Code that could be reused later but removed since it is understood
as dead code. In fact it not used yet:
- Contact Type (for Annuaire and what we call community explorer)
- Train model to improve the Map List terms
- scrapy Orchestrator to gather data in the web
- see commit: d85b11280b36ca55857d2faaba63c0684542b1df
- some similarity confluence matrix
- see commit: d85b11280b36ca55857d2faaba63c0684542b1df
- distributional similiarity
- see commit: d85b11280b36ca55857d2faaba63c0684542b1df
- see commit: d85b11280b36ca55857d2faaba63c0684542b1df
- Telegram/Gitlab issue/Wikidata/Wikimedia parser
- see commit: d85b11280b36ca55857d2faaba63c0684542b1df
## Version 0.0.7.2.4
* [FRONT][FIX][Star on documents when reading through it (#687)](https://gitlab.iscpif.fr/gargantext/purescript-gargantext/issues/687)
* [BACK][FEAT][[Node terms] institutes missing with HAL request (#330)](https://gitlab.iscpif.fr/gargantext/haskell-gargantext/issues/330)
## Version 0.0.7.2.3
* [FRONT][FIX][Star on documents when reading through it (#687)](https://gitlab.iscpif.fr/gargantext/purescript-gargantext/issues/687)
* [BACK][FIX][[Meta] Mistmatch between compound words representation in frontend and in database. (#386)](https://gitlab.iscpif.fr/gargantext/haskell-gargantext/issues/386)
* [BACK][FIX][[API OpenAlex] Fix: adapt ngrams_url field following an API change causing an ExternalAPIError (#393)](https://gitlab.iscpif.fr/gargantext/haskell-gargantext/issues/393)
* [BACK][FIX][Update and Improve Weeder File (#389)](https://gitlab.iscpif.fr/gargantext/haskell-gargantext/issues/389)
## Version 0.0.7.2.2
* [BACK][FIX][Write Frame microservice proxy improvements (#364)](https://gitlab.iscpif.fr/gargantext/haskell-gargantext/issues/364)
## Version 0.0.7.2.1
* [FRONT][DESIGN][[Graph explorer] Search and associated documents (#262)](https://gitlab.iscpif.fr/gargantext/purescript-gargantext/issues/262)
* [BACK][FIX][Problem at parsing TSV (#380)](https://gitlab.iscpif.fr/gargantext/haskell-gargantext/issues/380)
* [BACK][FEAT][[Node terms] institutes missing with HAL request (#330)](https://gitlab.iscpif.fr/gargantext/haskell-gargantext/issues/330)
## Version 0.0.7.2
* [FRONT][FEAT][Graph Explorer Legend (#683)](https://gitlab.iscpif.fr/gargantext/purescript-gargantext/issues/683)
* [FRONT][FIX][[Graph explorer] Search and associated documents (#262)](https://gitlab.iscpif.fr/gargantext/purescript-gargantext/issues/262)
* [BACK][FIX][Terms are calculated over all documents, even those in trash (#385)](https://gitlab.iscpif.fr/gargantext/haskell-gargantext/issues/385)
* [BACK][FIX][Improve document search (and better error reporting) (#265)](https://gitlab.iscpif.fr/gargantext/haskell-gargantext/issues/265)
* [BACK][FEAT][Add websockets support (#341)](https://gitlab.iscpif.fr/gargantext/haskell-gargantext/issues/341)
## Version 0.0.7.1.16
* [BACK][FI][API with Open Alex seems down (#379)](https://gitlab.iscpif.fr/gargantext/haskell-gargantext/issues/379)
## Version 0.0.7.1.15
* [FRONT][FIX][[Graph explorer] Search and associated documents (#262)](https://gitlab.iscpif.fr/gargantext/purescript-gargantext/issues/262)
* [BACK][FIX][Sharing link sometimes fails (#375)](https://gitlab.iscpif.fr/gargantext/haskell-gargantext/issues/375)
## Version 0.0.7.1.14
* [BACK][FIX][Write Frame microservice proxy improvements (#364)](https://gitlab.iscpif.fr/gargantext/haskell-gargantext/issues/364)
## Version 0.0.7.1.13
* [FRONT][ERGO][[Node Phylo] Default initial behaviour on clicking a Phylo node for the 1st time (#582)](https://gitlab.iscpif.fr/gargantext/purescript-gargantext/issues/582)
* [BACK][PROXY][Enabling the microservices proxy trigger endless &quot;Refresh to update&quot; modals (#374)](https://gitlab.iscpif.fr/gargantext/haskell-gargantext/issues/374)
* [BACK][REFACT][[REFACTORING] renaming Corpus to Document for HAL related file (#372)](https://gitlab.iscpif.fr/gargantext/haskell-gargantext/issues/372)
## Version 0.0.7.1.12
* [BACK][INFRA][Microservices notes proxy doesn&#39;t work with local CodiMD (#370)](https://gitlab.iscpif.fr/gargantext/haskell-gargantext/issues/370)
* [BACK][DOC][[Documentation] Document development tooling (#371)](https://gitlab.iscpif.fr/gargantext/haskell-gargantext/issues/371)
## Version 0.0.7.1.11
* [BACK][SECURITY][Allow the microservices proxy to be disabled or enabled by configuration settings (#369)](https://gitlab.iscpif.fr/gargantext/haskell-gargantext/issues/369)
## Version 0.0.7.1.10
* [BACK][FIX][Improving message error from the TSV import (#361)](https://gitlab.iscpif.fr/gargantext/haskell-gargantext/issues/361)
* [BACK][FIX][Creation of corpus from HAL&#39;s API crash (#366)](https://gitlab.iscpif.fr/gargantext/haskell-gargantext/issues/366)
* [BACK][FIX][[Documentation] Improve README (#365)](https://gitlab.iscpif.fr/gargantext/haskell-gargantext/issues/365)
## Version 0.0.7.1.9
* [BACK][FIX][Write Frame microservice proxy improvements (#364)](https://gitlab.iscpif.fr/gargantext/haskell-gargantext/issues/364)
* [BACK][FIX][Integrate `servant-routes` in the codebase (#350)](https://gitlab.iscpif.fr/gargantext/haskell-gargantext/issues/350)
* [BACK][FIX][[Documentation] Improve README (#365)](https://gitlab.iscpif.fr/gargantext/haskell-gargantext/issues/365)
* [BACK][FIX][Improving message error from the TSV import (#361)](https://gitlab.iscpif.fr/gargantext/haskell-gargantext/issues/361)
## Version 0.0.7.1.8
* [BACK][FEAT][[Graph explorer] Search and associated documents (#262)](https://gitlab.iscpif.fr/gargantext/purescript-gargantext/issues/262) (Backend Part).
## Version 0.0.7.1.7.4
* [FRONT][FEAT][[Graph explorer] Search and associated documents (#262)](https://gitlab.iscpif.fr/gargantext/purescript-gargantext/issues/262)
* [FRONT][FEAT][Info list in top bar: use purescript only (#242)](https://gitlab.iscpif.fr/gargantext/purescript-gargantext/issues/242)
* [BACK][DOC][[DOCS]: Describe frontend&#39;s build step (#363)](https://gitlab.iscpif.fr/gargantext/haskell-gargantext/issues/363)
* [BACK][INSTALL] Removing unused docker dependency
## Version 0.0.7.1.7.3
* [BACK][ADM][Consider moving `GargConfig` &amp; co outside of `gargantext-prelude` (#356)](https://gitlab.iscpif.fr/gargantext/haskell-gargantext/issues/356)
* [BACK][DOC] Readme updated
## Version 0.0.7.1.7.2
* [FEAT][Calc] Enabling Node calc url sharing
* [BACK][REFACT][We have too many executables (#355)](https://gitlab.iscpif.fr/gargantext/haskell-gargantext/issues/355)
## Version 0.0.7.1.7.1
* [CI-TESTS][OK]
## Version 0.0.7.1.7
* [BACK][SECURITU] Node Notes Right managements
## Version 0.0.7.1.6.5
* [BACK][FIX] TSV/CSV hot fix
## Version 0.0.7.1.6.4
* [FRONT][FIX][[Corpus] Import docs from selected list is broken (#679)](https://gitlab.iscpif.fr/gargantext/purescript-gargantext/issues/679)
* [BACK][FIX][[Node terms] institutes missing with HAL request (#330)](https://gitlab.iscpif.fr/gargantext/haskell-gargantext/issues/330)
## Version 0.0.7.1.6.3
* [BACK][FIX][CSV; TSV in all codebase (#348)](https://gitlab.iscpif.fr/gargantext/haskell-gargantext/issues/348)
* [FRONT][FIX][CSV TSV in all codebase (#676)](https://gitlab.iscpif.fr/gargantext/purescript-gargantext/issues/676)
* [FRONT][FIX][TSV export for ngrams table]
## Version 0.0.7.1.6.2
* [FRONT][FIX][Pb with term selection in phylomemy (#673)](https://gitlab.iscpif.fr/gargantext/purescript-gargantext/issues/673)
## Version 0.0.7.1.6.1
* [FRONT][FIX][Display Phylomemy parameters (#580)](https://gitlab.iscpif.fr/gargantext/purescript-gargantext/issues/580)
* [BACK][FIX][Consider integrating Servant named routes (#271)](https://gitlab.iscpif.fr/gargantext/haskell-gargantext/issues/271)
## Version 0.0.7.1.6
* [BACK][REFACT][Consider integrating Servant named routes (#271)](https://gitlab.iscpif.fr/gargantext/haskell-gargantext/issues/271)
* [FRONT][FIX] Double Option in form
## Version 0.0.7.1.5.5
* [BACK][FIX][`nodeErrorToFrontendError` contains an `undefined` (#346)](https://gitlab.iscpif.fr/gargantext/haskell-gargantext/issues/346)
* [FRONT][FIX][[Tree perfs] When the tree is opening: reduce API calls or replace with lighter calls (#670)](https://gitlab.iscpif.fr/gargantext/purescript-gargantext/issues/670)
## Version 0.0.7.1.5.4
* [BACK][FIX][[Docs TSV export/import] Check and maintain consistency between export and import formats (#345)](https://gitlab.iscpif.fr/gargantext/haskell-gargantext/issues/345)
## Version 0.0.7.1.5.3
* [FRONT][FIX][[Tree focus] Temporary HOTFIX: comment the forced focus (forest open nodes) for performances reason (#669)](https://gitlab.iscpif.fr/gargantext/purescript-gargantext/issues/669)
* [FRONT][FIX][[Tree perfs] When the tree is opening: reduce API calls or replace with lighter calls (#670)](https://gitlab.iscpif.fr/gargantext/purescript-gargantext/issues/670)
* [BACK][FIX][update .gitignore file (#347)](https://gitlab.iscpif.fr/gargantext/haskell-gargantext/issues/347)
## Version 0.0.7.1.5.2
* [BACK][FIX] Order 2 small corpus
* [FRONT][FIX][[Tree focus] Temporary HOTFIX: comment the forced focus (forest open nodes) for performances reason (#669)](https://gitlab.iscpif.fr/gargantext/purescript-gargantext/issues/669)
## Version 0.0.7.1.5.1
* [FRONT][ADMIN] Dev Spago Config
* [FRONT][FIX][[Phylo] On the exported SVG file: fix the background color behind the label (#668)](https://gitlab.iscpif.fr/gargantext/purescript-gargantext/issues/668)
## Version 0.0.7.1.5
* [FRONT][ADM][Upgrade PureScript to 0.15.11 (#605)](https://gitlab.iscpif.fr/gargantext/purescript-gargantext/issues/605)
* [FRONT][FIX][For graph controls, add a debounce timer (#651)](https://gitlab.iscpif.fr/gargantext/purescript-gargantext/issues/651)
* [FRONT][FEAT][Export the phylo in JSON and dot format (#643)](https://gitlab.iscpif.fr/gargantext/purescript-gargantext/issues/643)
* [BACK][FIX][[Node Phylo] Export the phylo in JSON and dot format (#337)](https://gitlab.iscpif.fr/gargantext/haskell-gargantext/issues/337)
* [BACK][FIX][Consider integrating Servant named routes (#271)](https://gitlab.iscpif.fr/gargantext/haskell-gargantext/issues/271)
## Version 0.0.7.1.4
* [FRONT][FIX][Search Term in Graph Explorer: spaces (#655)](https://gitlab.iscpif.fr/gargantext/purescript-gargantext/issues/655)
* [FRONT][ADMIN] Dev Spago next upgrade
## Version 0.0.7.1.3
* [FRONT][FIX][[Tree (Node Graph)] (Update: remove it) - The &quot;resync&quot; picto no longer launch a reload - It should open the dialog box on the graph reload form confirmation (#644)](https://gitlab.iscpif.fr/gargantext/purescript-gargantext/issues/644)
* [FRONT][FIX][Regression in terms display in phylomemy (#642)](https://gitlab.iscpif.fr/gargantext/purescript-gargantext/issues/642)
## Version 0.0.7.1.2
* [FRONT][FIX][[Tree search] Enrich search results with the path of the node (#638)](https://gitlab.iscpif.fr/gargantext/purescript-gargantext/issues/638)
* [FRONT][FIX][[Node type/API GQL] Accomodate an additional field in the Node (see https://gitlab.iscpif.fr/gargantext/haskell-gargantext/issues/336) to be able to display the ty name of a node (#647)](https://gitlab.iscpif.fr/gargantext/purescript-gargantext/issues/647)
* [FRONT][FIX][[Nodes layout] Minor improvements (icons in tabs, titles) (#646)](https://gitlab.iscpif.fr/gargantext/purescript-gargantext/issues/646)
* [BACK][FIX][Singulars and plurals not grouped anymore (#169)](https://gitlab.iscpif.fr/gargantext/haskell-gargantext/issues/169)
## Version 0.0.7.1.1
* [FRONT][FEAT][[Tree search] Add possibility to share a node URL (without the username), that will redirect to the right instance and node (#548)](https://gitlab.iscpif.fr/gargantext/purescript-gargantext/issues/548)
## Version 0.0.7.1
* [FRONT][FIX][Fix breadcrumbs (#648)](https://gitlab.iscpif.fr/gargantext/purescript-gargantext/issues/648)
## Version 0.0.7
- [BACK/FRONT][RELEASE] OO7 Version
...@@ -52,21 +52,16 @@ $ nix-env --version ...@@ -52,21 +52,16 @@ $ nix-env --version
nix-env (Nix) 2.11.0 nix-env (Nix) 2.11.0
``` ```
Enable de flake experimental feature :
```shell
mkdir ~/.config/nix
echo "experimental-features = nix-command flakes" > ~/.config/nix/nix.conf
```
To build the frontend just execute the install script at the root at the project: To build the frontend just execute the install script at the root at the project:
```shell ```shell
./install ./bin/install
``` ```
Alternatively, you can use
```shell ```shell
nix -L develop nix -L develop
``` ```
and then run the `npm` commands manually.
**Local instance is ready!** (Example: http://localhost:8000/) **Local instance is ready!** (Example: http://localhost:8000/)
......
...@@ -15,7 +15,7 @@ import Gargantext.Hooks.FirstEffect (useFirstEffect') ...@@ -15,7 +15,7 @@ import Gargantext.Hooks.FirstEffect (useFirstEffect')
import Gargantext.Router as Router import Gargantext.Router as Router
import Gargantext.Sessions as Sessions import Gargantext.Sessions as Sessions
import Gargantext.Types (CacheParams, defaultCacheParams) import Gargantext.Types (CacheParams, defaultCacheParams)
import Gargantext.Utils (getter) import Gargantext.Utils (getter, host)
import Gargantext.Utils.Reactix as R2 import Gargantext.Utils.Reactix as R2
import Reactix as R import Reactix as R
import Reactix.Utils as RU import Reactix.Utils as RU
...@@ -110,7 +110,8 @@ mainAppCpt = here.component "main" cpt where ...@@ -110,7 +110,8 @@ mainAppCpt = here.component "main" cpt where
let session = Seq.head sessions let session = Seq.head sessions
-- here.log2 "[mainApp] sessions" sessions' -- here.log2 "[mainApp] sessions" sessions'
wsProto <- Notifications.wsProtocol wsProto <- Notifications.wsProtocol
Notifications.connect ws (wsProto <> "://localhost:8008/ws") session h <- host
Notifications.connect ws (wsProto <> "://" <> h <> "/ws") session
-- T.write_ ws boxes.wsNotification -- T.write_ ws boxes.wsNotification
-- NOTE: Dummy subscription -- NOTE: Dummy subscription
-- let action = NotificationsT.InsertCallback (NotificationsT.UpdateTree (-1)) "some-uuid" (\_ -> here.log "callback!") -- let action = NotificationsT.InsertCallback (NotificationsT.UpdateTree (-1)) "some-uuid" (\_ -> here.log "callback!")
......
...@@ -2,7 +2,7 @@ module Gargantext.Components.Forest.Tree.Node.Action.Update where ...@@ -2,7 +2,7 @@ module Gargantext.Components.Forest.Tree.Node.Action.Update where
import Gargantext.Prelude import Gargantext.Prelude
import Gargantext.Components.Forest.Tree.Node.Action.Update.Types (Charts(..), Granularity(..), GraphMetric(..), Method(..), PartitionMethod(..), UpdateNodeParams(..), Strength(..), BridgenessMethod(..)) import Gargantext.Components.Forest.Tree.Node.Action.Update.Types (Charts(..), Granularity(..), GraphMetric(..), Method(..), PartitionMethod(..), UpdateNodeParams(..), Strength(..), BridgenessMethod(..), UpdateNodeConfigGraph(..))
import DOM.Simple.Console (log3) import DOM.Simple.Console (log3)
import Data.Either (Either(..)) import Data.Either (Either(..))
...@@ -52,6 +52,7 @@ updateCpt = here.component "update" cpt where ...@@ -52,6 +52,7 @@ updateCpt = here.component "update" cpt where
cpt props@{ nodeType: NodeList } _ = pure $ updateNodeList props [] cpt props@{ nodeType: NodeList } _ = pure $ updateNodeList props []
cpt props@{ nodeType: NodeTexts } _ = pure $ updateTexts props [] cpt props@{ nodeType: NodeTexts } _ = pure $ updateTexts props []
cpt props@{ nodeType: Phylo } _ = pure $ updatePhylo props cpt props@{ nodeType: Phylo } _ = pure $ updatePhylo props
cpt props@{ nodeType: Corpus } _ = pure $ updateCorpus props
cpt props@{ nodeType: _ } _ = pure $ updateOther props [] cpt props@{ nodeType: _ } _ = pure $ updateOther props []
updateDashboard :: R2.Component UpdateProps updateDashboard :: R2.Component UpdateProps
...@@ -100,13 +101,14 @@ updateGraphCpt = here.component "updateGraph" cpt where ...@@ -100,13 +101,14 @@ updateGraphCpt = here.component "updateGraph" cpt where
callback :: Action -> Aff Unit callback :: Action -> Aff Unit
callback = dispatch >=> \_ -> dispatch CloseBox callback = dispatch >=> \_ -> dispatch CloseBox
let action = UpdateNode $ UpdateNodeParamsGraph { methodGraphMetric: methodGraphMetric' let config = UpdateNodeConfigGraph { methodGraphMetric: methodGraphMetric'
, methodGraphClustering: methodGraphClustering' , methodGraphClustering: methodGraphClustering'
, methodGraphBridgeness: methodGraphBridgeness' , methodGraphBridgeness: methodGraphBridgeness'
, methodGraphEdgesStrength : methodGraphEdgesStrength' , methodGraphEdgesStrength : methodGraphEdgesStrength'
, methodGraphNodeType1 : methodGraphNodeType1' , methodGraphNodeType1 : methodGraphNodeType1'
, methodGraphNodeType2 : methodGraphNodeType2' , methodGraphNodeType2 : methodGraphNodeType2'
} }
let action = UpdateNode $ UpdateNodeParamsGraph { methodGraph: config }
pure $ pure $
Tools.panelWithSubmitButton { action Tools.panelWithSubmitButton { action
...@@ -211,6 +213,58 @@ updatePhyloCpt = here.component "updatePhylo" cpt where ...@@ -211,6 +213,58 @@ updatePhyloCpt = here.component "updatePhylo" cpt where
, status: Enabled , status: Enabled
} `merge` parser.toFormData defaultData } `merge` parser.toFormData defaultData
updateCorpus :: R2.Leaf UpdateProps
updateCorpus = R2.leaf updateCorpusCpt
updateCorpusCpt :: R.Component UpdateProps
updateCorpusCpt = here.component "updateTexts" cpt where
cpt { dispatch } _ = do
-- nodeList parameters
methodList <- T.useBox Basic
methodList' <- T.useLive T.unequal methodList
-- method for graph metric
methodGraphMetric <- T.useBox Order1
methodGraphMetric' <- T.useLive T.unequal methodGraphMetric
let graphConfig = UpdateNodeConfigGraph { methodGraphMetric: methodGraphMetric'
, methodGraphEdgesStrength: Strong
, methodGraphClustering: Spinglass
, methodGraphBridgeness: BridgenessMethod_Basic
, methodGraphNodeType1: GT.CTabTerms
, methodGraphNodeType2: GT.CTabTerms
}
let phyloConfig = Phylo.UpdateData { defaultMode: true
, proximity: 0.5
, synchrony: 0.5
, quality: 0.8
, exportFilter: 3.0
, timeUnit: Phylo.Year $ Phylo.TimeUnitCriteria
{ period: 3
, step: 1
, matchingFrame: 5
}
, clique: Phylo.MaxClique
{ size: 5
, threshold: 0.0001
, filter: Phylo.ByThreshold
}
}
let methodTexts = Both
pure $
Tools.panelWithSubmitButton { action: UpdateNode $ UpdateNodeParamsCorpus { methodTexts: methodTexts
, methodList: methodList' }
, dispatch
, mError: Nothing }
[ H.p { } [ H.text "Update both term and document indexing."]
, H.p { } [ H.text "Term update mode"
, Tools.formChoiceSafe { items: [Basic, Advanced, WithModel]
, default: methodList'
, callback: \val -> T.write_ val methodList
, print: show } [] ]
, H.text "If you also want to update a graph or a phylo, use the update action on the respective node."
]
updateNodeList :: R2.Component UpdateProps updateNodeList :: R2.Component UpdateProps
updateNodeList = R.createElement updateNodeListCpt updateNodeList = R.createElement updateNodeListCpt
updateNodeListCpt :: R.Component UpdateProps updateNodeListCpt :: R.Component UpdateProps
......
...@@ -10,20 +10,29 @@ import Gargantext.Types as GT ...@@ -10,20 +10,29 @@ import Gargantext.Types as GT
import Simple.JSON as JSON import Simple.JSON as JSON
import Simple.JSON.Generics as JSONG import Simple.JSON.Generics as JSONG
newtype UpdateNodeConfigGraph = UpdateNodeConfigGraph { methodGraphMetric :: GraphMetric
, methodGraphEdgesStrength :: Strength
, methodGraphClustering :: PartitionMethod
, methodGraphBridgeness :: BridgenessMethod
, methodGraphNodeType1 :: GT.CTabNgramType
, methodGraphNodeType2 :: GT.CTabNgramType
}
derive instance Eq UpdateNodeConfigGraph
derive instance Generic UpdateNodeConfigGraph _
instance Show UpdateNodeConfigGraph where show = genericShow
derive newtype instance JSON.ReadForeign UpdateNodeConfigGraph
derive newtype instance JSON.WriteForeign UpdateNodeConfigGraph
data UpdateNodeParams data UpdateNodeParams
= UpdateNodeParamsList { methodList :: Method } = UpdateNodeParamsList { methodList :: Method }
| UpdateNodeParamsGraph { methodGraphMetric :: GraphMetric | UpdateNodeParamsGraph { methodGraph :: UpdateNodeConfigGraph }
, methodGraphEdgesStrength :: Strength | UpdateNodeParamsTexts { methodTexts :: Granularity }
, methodGraphClustering :: PartitionMethod | UpdateNodeParamsCorpus { methodTexts :: Granularity
, methodGraphBridgeness :: BridgenessMethod , methodList :: Method }
, methodGraphNodeType1 :: GT.CTabNgramType | UpdateNodeParamsBoard { methodBoard :: Charts }
, methodGraphNodeType2 :: GT.CTabNgramType | UpdateNodeParamsPhylo { methodPhylo :: Phylo.UpdateData }
} | UpdateNodeParamsLink { methodLink :: LinkNodeReq }
| UpdateNodeParamsTexts { methodTexts :: Granularity }
| UpdateNodeParamsBoard { methodBoard :: Charts }
| UpdateNodeParamsPhylo { methodPhylo :: Phylo.UpdateData }
| UpdateNodeParamsLink { methodLink :: LinkNodeReq }
derive instance Eq UpdateNodeParams derive instance Eq UpdateNodeParams
derive instance Generic UpdateNodeParams _ derive instance Generic UpdateNodeParams _
instance Show UpdateNodeParams where show = genericShow instance Show UpdateNodeParams where show = genericShow
...@@ -32,12 +41,15 @@ instance JSON.WriteForeign UpdateNodeParams where ...@@ -32,12 +41,15 @@ instance JSON.WriteForeign UpdateNodeParams where
writeImpl (UpdateNodeParamsList { methodList }) = writeImpl (UpdateNodeParamsList { methodList }) =
JSON.writeImpl { type: "UpdateNodeParamsList" JSON.writeImpl { type: "UpdateNodeParamsList"
, methodList } , methodList }
writeImpl (UpdateNodeParamsGraph { methodGraphMetric, methodGraphClustering, methodGraphBridgeness, methodGraphEdgesStrength, methodGraphNodeType1, methodGraphNodeType2}) = writeImpl (UpdateNodeParamsGraph { methodGraph }) =
JSON.writeImpl { type: "UpdateNodeParamsGraph" JSON.writeImpl { type: "UpdateNodeParamsGraph"
, methodGraphMetric, methodGraphClustering, methodGraphBridgeness, methodGraphEdgesStrength, methodGraphNodeType1, methodGraphNodeType2} , methodGraph }
writeImpl (UpdateNodeParamsTexts { methodTexts }) = writeImpl (UpdateNodeParamsTexts { methodTexts }) =
JSON.writeImpl { type: "UpdateNodeParamsTexts" JSON.writeImpl { type: "UpdateNodeParamsTexts"
, methodTexts } , methodTexts }
writeImpl (UpdateNodeParamsCorpus { methodTexts, methodList }) =
JSON.writeImpl { type: "UpdateNodeParamsCorpus"
, methodTexts, methodList }
writeImpl (UpdateNodeParamsBoard { methodBoard }) = writeImpl (UpdateNodeParamsBoard { methodBoard }) =
JSON.writeImpl { type: "UpdateNodeParamsBoard" JSON.writeImpl { type: "UpdateNodeParamsBoard"
, methodBoard } , methodBoard }
......
...@@ -152,7 +152,8 @@ settingsBoxLens Calc = ...@@ -152,7 +152,8 @@ settingsBoxLens Calc =
, ShareURL , ShareURL
, Delete ] , Delete ]
settingsBoxLens Corpus = settingsBoxLens Corpus =
_buttons .~ [ Add [ Graph _buttons .~ [ ReloadWithSettings
, Add [ Graph
, Notes , Notes
, Calc , Calc
, NodeTexts , NodeTexts
......
...@@ -122,7 +122,7 @@ options :: ...@@ -122,7 +122,7 @@ options ::
} }
options = options =
-- Layout -- Layout
{ showControls : false { showControls : true
, sideTab : GET.SideTabLegend , sideTab : GET.SideTabLegend
, showSidebar : GT.InitialClosed , showSidebar : GT.InitialClosed
, showDoc : Nothing , showDoc : Nothing
......
...@@ -112,6 +112,8 @@ href = location >>= WHL.href ...@@ -112,6 +112,8 @@ href = location >>= WHL.href
protocol :: Effect String protocol :: Effect String
protocol = location >>= WHL.protocol protocol = location >>= WHL.protocol
host :: Effect String
host = location >>= WHL.host
nbsp :: Int -> String nbsp :: Int -> String
nbsp = nbsp' "" nbsp = nbsp' ""
......
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