getGraph uId nId = do
nodeGraph <- getNodeWith nId HyperdataGraph
let graph = nodeGraph ^. node_hyperdata . hyperdataGraph
- let graphVersion = graph ^? _Just
+ let listVersion = graph ^? _Just
. graph_metadata
. _Just
- . gm_version
+ . gm_list
+ . lfg_version
repo <- getRepo
let v = repo ^. r_version
_ <- insertGraph cId uId' (HyperdataGraph $ Just graph')
pure graph'
- Just graph' -> if graphVersion == Just v
+ Just graph' -> if listVersion == Just v
then pure graph'
else do
graph'' <- computeGraph cId NgramsTerms repo
computeGraph cId nt repo = do
lId <- defaultList cId
- -- what is the relation between this version and repo^.r_version.
- -- v' <- currentVersion
- let v' = repo ^. r_version
-
let metadata = GraphMetadata "Title" [cId]
[ LegendField 1 "#FFF" "Cluster"
, LegendField 2 "#FFF" "Cluster"
]
- (ListForGraph lId v')
- (repo ^. r_version)
+ (ListForGraph lId (repo ^. r_version))
-- (map (\n -> LegendField n "#FFFFFF" (pack $ show n)) [1..10])
lIds <- selectNodesWithUsername NodeList userMaster