Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
clinicaltrials
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
david Chavalarias
clinicaltrials
Commits
6a4e0439
Commit
6a4e0439
authored
Jun 28, 2017
by
Romain Loth
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
first deployment of ProjectExplorer for comex using new method
parent
7c0749cf
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
58 additions
and
34 deletions
+58
-34
README.md
00.DOCUMENTATION/A-Introduction/README.md
+15
-0
explorerjs.html
explorerjs.html
+1
-1
settings_explorerjs.js
settings_explorerjs.js
+17
-25
selection-panels.css
twlibs/css/selection-panels.css
+5
-0
twjs.css
twlibs/css/twjs.css
+1
-0
Tinaweb.js
twmain/Tinaweb.js
+9
-0
enviroment.js
twmain/enviroment.js
+1
-1
methods.js
twmain/methods.js
+3
-3
settings_explorerjs.comex.js
twpresets/settings_explorerjs.comex.js
+5
-3
adapt_html_paths.sh
twtools/adapt_html_paths.sh
+1
-1
No files found.
00.DOCUMENTATION/A-Introduction/README.md
View file @
6a4e0439
...
...
@@ -46,7 +46,22 @@ There are two exceptions are:
# - explorerjs.html -> static/ProjectExplorer/explorerjs.prod.html
```
4) finally update the settings property `ourlibs` (path to twlibs) with the same URL prefix
```
nano static/ProjectExplorer/settings_explorerjs.js
----------------- [IN NANO] --------------------
(...)
TWConf.paths = {
'ourlibs': 'static/ProjectExplorer/twlibs', // <=== here
...
}
(...)
-----------------------------------------------
```
- to use it within a different GUI layout: take our html as an exemple and create your own html importing the same libs and exposing the same div ids.
- the directory `twpresets/` contains specific variants of `settings_explorerjs` for some common deployment tasks of the ISCPIF (comex, gargantext)
-
optionally, the backends under
`twbackends`
:
-
they are the only server-side elements of the tina distribution
...
...
explorerjs.html
View file @
6a4e0439
...
...
@@ -444,7 +444,7 @@
</div>
</div>
<div
class=
"question"
>
<div
class=
"question
reldocs
"
>
<div
class=
"input-group"
>
<label
for=
"reldocs-type"
class=
"smlabel input-group-addon"
>
Related documents type
</label>
<select
id=
"reldocs-type"
name=
"reldocs-type"
...
...
settings_explorerjs.js
View file @
6a4e0439
...
...
@@ -6,8 +6,8 @@ TW.conf = (function(TW){
let
TWConf
=
{}
TWConf
.
branding
=
'
ProjectExplorer'
// <--- the
name displayed in upper left
TWConf
.
brandingLink
=
'https://
github.com/moma/ProjectExplorer
'
// <--- link to "home"
TWConf
.
branding
=
'
Community Explorer 2'
// <---
name displayed in upper left
TWConf
.
brandingLink
=
'https://
communityexplorer.org
'
// <--- link to "home"
// ==========================
...
...
@@ -17,10 +17,10 @@ TW.conf = (function(TW){
// Graph data source
// -----------------
// the graph input depends on TWConf.sourcemode (or manual url arg 'sourcemode')
TWConf
.
sourcemode
=
"
servermenu
"
// accepted: "api" | "serverfile" | "servermenu" | "localfile"
TWConf
.
sourcemode
=
"
api
"
// accepted: "api" | "serverfile" | "servermenu" | "localfile"
// server-side .gexf|.json default source
TWConf
.
sourceFile
=
"
data/politoscope/ProgrammeDesCandidats.enrichi.gexf
"
TWConf
.
sourceFile
=
""
// ...or server-side gexf default source list
TWConf
.
sourceMenu
=
"db.json"
...
...
@@ -34,21 +34,13 @@ TW.conf = (function(TW){
// Related documents (topPapers) data source
// -----------------------------------------
TWConf
.
getRelatedDocs
=
tru
e
TWConf
.
getRelatedDocs
=
fals
e
TWConf
.
relatedDocsMax
=
10
TWConf
.
relatedDocsAPI
=
"http://127.0.0.1:5000/twitter_search"
TWConf
.
relatedDocsType
=
"
wosLocalDB"
// accepted: "twitter" | "wosLocalDB"
TWConf
.
relatedDocsType
=
"
twitter"
// accepted: "twitter" | "wosLocalDB"
// POSSible: "elastic"
TWConf
.
relatedDocsAPIS
=
{
// routes by corresponding type
"wosLocalDB"
:
"twbackends/phpAPI"
,
"twitter"
:
"http://127.0.0.1:5000/twitter_search"
}
// fallback topPapers API if none found by type
TWConf
.
relatedDocsAPI
=
"LOCALDB"
// =======================
// DATA FACETS AND LEGENDS
// =======================
...
...
@@ -114,8 +106,8 @@ TW.conf = (function(TW){
'weight'
:
{
'col'
:
"heatmap"
,
'n'
:
5
,
'binmode'
:
'samerange'
},
'Weighted Degree'
:
{
'col'
:
"heatmap"
,
'n'
:
8
,
'binmode'
:
'samerange'
},
'out-degree'
:
{
'col'
:
"heatmap"
,
'n'
:
3
,
'binmode'
:
'samepop'
},
'
countryuniform'
:
{
'col'
:
"cluster"
,
'binmode'
:
'off'
},
'
countrypareto'
:
{
'col'
:
"cluster"
,
'binmode'
:
'off'
},
'
CC'
:
{
'col'
:
"cluster"
,
'binmode'
:
'off'
},
'
ACR'
:
{
'col'
:
"cluster"
,
'binmode'
:
'off'
},
'cluster_universal_index'
:
{
'col'
:
"cluster"
,
'binmode'
:
'off'
},
'community_orphan'
:
{
'col'
:
"cluster"
,
'binmode'
:
'off'
}
...
...
@@ -135,7 +127,7 @@ TW.conf = (function(TW){
// when coloring method is "cluster", should the colors change each time ?
TWConf
.
randomizeClusterColors
=
fals
e
TWConf
.
randomizeClusterColors
=
tru
e
// default clustering attribute (<---> used for initial node colors)
TWConf
.
nodeClusAtt
=
"modularity_class"
...
...
@@ -155,14 +147,15 @@ TW.conf = (function(TW){
// =============
// Node typology: categories (resp. 0 and 1) will get these default labels
TWConf
.
catSem
=
"
term
"
;
TWConf
.
catSoc
=
"
person
"
;
TWConf
.
catSem
=
"
Terms
"
;
TWConf
.
catSoc
=
"
Document
"
;
// NB: these labels may be superseded by the input data's node types values
// cf. sortNodeTypes()
// Modules path
// ------------
TWConf
.
paths
=
{
'ourlibs'
:
'static/tinawebJS/twlibs'
,
'modules'
:
'twmodules'
}
Object
.
freeze
(
TWConf
.
paths
)
// /!\ to prevent path modification before load
...
...
@@ -202,7 +195,6 @@ TW.conf = (function(TW){
// TW.geomap = false;
// TW.twittertimeline = false;
TWConf
.
maxPastStates
=
5
;
// number of TW.states to remember (~CTRL-Z)
...
...
@@ -213,8 +205,8 @@ TW.conf = (function(TW){
// if fa2Available, the auto-run config:
TWConf
.
fa2Enabled
=
fals
e
;
// fa2 auto-run at start and after graph modified ?
TWConf
.
fa2Milliseconds
=
5
000
;
// duration of auto-run
TWConf
.
fa2Enabled
=
tru
e
;
// fa2 auto-run at start and after graph modified ?
TWConf
.
fa2Milliseconds
=
10
000
;
// duration of auto-run
TWConf
.
minNodesForAutoFA2
=
5
// graph size threshold to auto-run
...
...
@@ -293,7 +285,7 @@ TW.conf = (function(TW){
// em size range for neighbor nodes "tagcloud" (1 = "normal size")
TWConf
.
tagcloudFontsizeMin
=
.
8
;
TWConf
.
tagcloudFontsizeMax
=
2
;
TWConf
.
tagcloudFontsizeMax
=
1.5
;
TWConf
.
tagcloudSameLimit
=
50
// max displayed neighbors of the same type
TWConf
.
tagcloudOpposLimit
=
10
// max displayed neighbors of the opposite type
...
...
@@ -311,7 +303,7 @@ TW.conf = (function(TW){
initialShowAll
:
false
,
// show all nodes on bipartite case init (docs + terms in one view)
// show verbose console logs...
logFetchers
:
false
,
// ...about ajax/fetching of graph data
logFetchers
:
false
,
// ...about ajax/fetching of graph data
logParsers
:
false
,
// ...about parsing said data
logFacets
:
false
,
// ...about parsing node attribute:value facets
logSettings
:
false
,
// ...about settings at Tina and Sigma init time
...
...
twlibs/css/selection-panels.css
View file @
6a4e0439
...
...
@@ -150,6 +150,11 @@
/* ----------- */
.reldocs
{
display
:
none
;
}
#sidefold
{
position
:
absolute
;
left
:
0
;
...
...
twlibs/css/twjs.css
View file @
6a4e0439
...
...
@@ -277,6 +277,7 @@ p.micromessage{
#information
.information-vcard
{
border
:
2px
solid
#555
;
padding
:
2em
1em
.3em
1em
;
margin
:
1em
;
background-color
:
#fff
;
border-radius
:
.3em
;
}
...
...
twmain/Tinaweb.js
View file @
6a4e0439
...
...
@@ -1062,6 +1062,15 @@ var TinaWebJS = function ( sigmacanvas ) {
}
});
if
(
TW
.
conf
.
getRelatedDocs
)
{
let
reldocsEls
=
document
.
querySelectorAll
(
'.reldocs'
)
for
(
var
k
in
reldocsEls
)
{
if
(
reldocsEls
[
k
].
style
)
{
reldocsEls
[
k
].
style
.
display
=
'block'
}
}
}
if
(
TW
.
conf
.
filterSliders
)
{
// the indice of the first cat to be active (ex: '1')
...
...
twmain/enviroment.js
View file @
6a4e0439
...
...
@@ -1000,7 +1000,7 @@ function updateSearchLabels(id,name,type){
function
createWaitIcon
(
idname
,
width
)
{
let
icon
=
document
.
createElement
(
'img'
)
icon
.
src
=
'twlibs
/img/loader.gif'
icon
.
src
=
TW
.
conf
.
path
.
ourlibs
+
'
/img/loader.gif'
icon
.
style
.
position
=
'absolute'
icon
.
style
.
left
=
'0'
...
...
twmain/methods.js
View file @
6a4e0439
...
...
@@ -339,9 +339,9 @@ function htmlfied_nodesatts(elems){
if
(
swActual
(
node
.
type
)
==
'semantic'
){
information
+=
'<li><b>'
+
node
.
label
+
'</b></li>'
;
let
google
=
'<a href=http://www.google.com/#hl=en&source=hp&q=%20'
+
node
.
label
.
replace
(
" "
,
"+"
)
+
'%20><img src="
twlibs
/img/google.png"></img></a>'
;
let
wiki
=
'<a href=http://en.wikipedia.org/wiki/'
+
node
.
label
.
replace
(
" "
,
"_"
)
+
'><img src="
twlibs
/img/wikipedia.png"></img></a>'
;
let
flickr
=
'<a href=http://www.flickr.com/search/?w=all&q='
+
node
.
label
.
replace
(
" "
,
"+"
)
+
'><img src="
twlibs
/img/flickr.png"></img></a>'
;
let
google
=
'<a href=http://www.google.com/#hl=en&source=hp&q=%20'
+
node
.
label
.
replace
(
" "
,
"+"
)
+
'%20><img src="
'
+
TW
.
conf
.
paths
.
ourlibs
+
'
/img/google.png"></img></a>'
;
let
wiki
=
'<a href=http://en.wikipedia.org/wiki/'
+
node
.
label
.
replace
(
" "
,
"_"
)
+
'><img src="
'
+
TW
.
conf
.
paths
.
ourlibs
+
'
/img/wikipedia.png"></img></a>'
;
let
flickr
=
'<a href=http://www.flickr.com/search/?w=all&q='
+
node
.
label
.
replace
(
" "
,
"+"
)
+
'><img src="
'
+
TW
.
conf
.
paths
.
ourlibs
+
'
/img/flickr.png"></img></a>'
;
information
+=
'<li>'
+
google
+
" "
+
wiki
+
" "
+
flickr
+
'</li><br>'
;
semnodes
.
push
(
information
)
}
...
...
twpresets/settings_explorerjs.comex.js
View file @
6a4e0439
...
...
@@ -171,9 +171,11 @@ TW.conf = (function(TW){
TWConf
.
ModulesFlags
[
"crowdsourcingModule"
]
=
true
;
// Other optional functionalities
// -----------------------------
TWConf
.
filterSliders
=
true
// show sliders for nodes/edges subsets
// Other GUI options
// ------------------
TWConf
.
sidePanelSize
=
"300px"
// width of the side panel (def: 400px)
TWConf
.
filterSliders
=
true
// show sliders for nodes/edges subsets
TWConf
.
clusterColorsAtt
=
true
;
// show "Set colors" menu
...
...
twtools/adapt_html_paths.sh
View file @
6a4e0439
...
...
@@ -26,7 +26,7 @@ fi
if
[
-e
explorerjs.html
]
then
perl
-pse
's/ ((?:href|src)=[\x22\x27]?)(twlibs3?|twmain)/ $1$pathprefix$2/g'
--
-pathprefix
=
$newpathprefix
< explorerjs.html
>
explorerjs.prod.html
perl
-pse
's/ ((?:href|src)=[\x22\x27]?)(twlibs3?|twmain
|settings_explorerjs
)/ $1$pathprefix$2/g'
--
-pathprefix
=
$newpathprefix
< explorerjs.html
>
explorerjs.prod.html
echo
'created: explorerjs.prod.html'
exit
0
else
...
...
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