Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
StrandLab2.net
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Container Registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Strand Lab
StrandLab2.net
Commits
d55934c1
Commit
d55934c1
authored
5 years ago
by
Gervaise Henry
Browse files
Options
Downloads
Patches
Plain Diff
Remove some doughnuts
parent
a335ace1
2 merge requests
!9
Develop
,
!8
Repository
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
layouts/custom/repository.html
+75
-152
75 additions, 152 deletions
layouts/custom/repository.html
with
75 additions
and
152 deletions
layouts/custom/repository.html
+
75
−
152
View file @
d55934c1
...
...
@@ -75,85 +75,38 @@
<script
src=
"https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.5.0/Chart.min.js"
></script>
<script>
$
(
function
()
{
var
repo
=
{{
index
.
Site
.
Data
.
repository
.
repository
}}
var
repo
=
{{
index
.
Site
.
Data
.
repository
.
repository
}
}
var
filters
=
{{
index
.
Site
.
Data
.
repository
.
filters
}}
$
(
"
#jstree
"
).
jstree
({
"
core
"
:
{
"
data
"
:
filters
,
"
themes
"
:
{
"
theme
"
:
"
default
"
,
"
dots
"
:
false
,
"
icons
"
:
false
},
},
"
checkbox
"
:
{
"
keep_selected_style
"
:
false
,
cascade
:
""
,
three_state
:
false
,
whole_node
:
false
,
tie_selection
:
false
$
(
"
#jstree
"
).
jstree
({
"
core
"
:
{
"
data
"
:
filters
,
"
themes
"
:
{
"
theme
"
:
"
default
"
,
"
dots
"
:
false
,
"
icons
"
:
false
},
"
plugins
"
:
[
"
themes
"
,
"
checkbox
"
]
})
},
"
checkbox
"
:
{
"
keep_selected_style
"
:
false
,
cascade
:
""
,
three_state
:
false
,
whole_node
:
false
,
tie_selection
:
false
},
"
plugins
"
:
[
"
themes
"
,
"
checkbox
"
]
})
$
(
"
#jstree
"
).
bind
(
"
check_node.jstree uncheck_node.jstree
"
,
function
(
e
,
data
)
{
var
checked
=
$
(
"
#jstree
"
).
jstree
(
"
get_checked
"
)
var
filter
=
[]
for
(
i
=
0
;
i
<
checked
.
length
;
i
++
)
{
for
(
j
=
0
;
j
<
filters
.
length
;
j
++
)
{
if
(
checked
[
i
]
==
filters
[
j
].
id
)
{
filter
.
push
(
filters
[
j
].
text
)
}
}
}
filtered
=
filterRepo
(
repo
,
checked
)
filterRepoGroups_out
=
filterRepoGroups
(
repo
,
filtered
)
filtered_dis
=
filterRepoGroups_out
[
0
]
filtered_bmi
=
filterRepoGroups_out
[
1
]
filtered_t2d
=
filterRepoGroups_out
[
2
]
filtered_eth
=
filterRepoGroups_out
[
3
]
filtered_age
=
filterRepoGroups_out
[
4
]
filtered_prv
=
filterRepoGroups_out
[
5
]
filtered_psa
=
filterRepoGroups_out
[
6
]
filtered_ari
=
filterRepoGroups_out
[
7
]
filtered_alb
=
filterRepoGroups_out
[
8
]
document
.
getElementById
(
"
total
"
).
innerHTML
=
filtered
.
length
if
(
checked
.
length
==
0
)
{
document
.
getElementById
(
"
filters
"
).
innerHTML
=
"
NO
"
}
else
{
document
.
getElementById
(
"
filters
"
).
innerHTML
=
filter
}
filterDoughnut_out
=
filterDoughnut
(
filtered_bmi
,
filtered_t2d
,
filtered_eth
,
filtered_age
,
filtered_prv
,
filtered_psa
,
filtered_ari
,
filtered_alb
)
doughnut_data_dis
=
filterDoughnut_out
[
0
]
doughnut_data_bmi
=
filterDoughnut_out
[
1
]
doughnut_data_t2d
=
filterDoughnut_out
[
2
]
doughnut_data_eth
=
filterDoughnut_out
[
3
]
doughnut_data_age
=
filterDoughnut_out
[
4
]
doughnut_data_prv
=
filterDoughnut_out
[
5
]
doughnut_data_psa
=
filterDoughnut_out
[
6
]
doughnut_data_ari
=
filterDoughnut_out
[
7
]
doughnut_data_alb
=
filterDoughnut_out
[
8
]
dis
.
destroy
()
dis
=
new
Chart
(
document
.
getElementById
(
"
doughnut-dis
"
),
{
type
:
"
doughnut
"
,
data
:
doughnut_data_dis
,
options
:
doughnut_options
})
bmi
.
destroy
()
bmi
=
new
Chart
(
document
.
getElementById
(
"
doughnut-bmi
"
),
{
type
:
"
doughnut
"
,
data
:
doughnut_data_bmi
,
options
:
doughnut_options
})
t2d
.
destroy
()
t2d
=
new
Chart
(
document
.
getElementById
(
"
doughnut-t2d
"
),
{
type
:
"
doughnut
"
,
data
:
doughnut_data_t2d
,
options
:
doughnut_options
})
eth
.
destroy
()
eth
=
new
Chart
(
document
.
getElementById
(
"
doughnut-eth
"
),
{
type
:
"
doughnut
"
,
data
:
doughnut_data_eth
,
options
:
doughnut_options
})
age
.
destroy
()
age
=
new
Chart
(
document
.
getElementById
(
"
doughnut-age
"
),
{
type
:
"
doughnut
"
,
data
:
doughnut_data_age
,
options
:
doughnut_options
})
prv
.
destroy
()
prv
=
new
Chart
(
document
.
getElementById
(
"
doughnut-prv
"
),
{
type
:
"
doughnut
"
,
data
:
doughnut_data_prv
,
options
:
doughnut_options
})
psa
.
destroy
()
psa
=
new
Chart
(
document
.
getElementById
(
"
doughnut-psa
"
),
{
type
:
"
doughnut
"
,
data
:
doughnut_data_psa
,
options
:
doughnut_options
})
ari
.
destroy
()
ari
=
new
Chart
(
document
.
getElementById
(
"
doughnut-ari
"
),
{
type
:
"
doughnut
"
,
data
:
doughnut_data_ari
,
options
:
doughnut_options
})
alb
.
destroy
()
alb
=
new
Chart
(
document
.
getElementById
(
"
doughnut-alb
"
),
{
type
:
"
doughnut
"
,
data
:
doughnut_data_alb
,
options
:
doughnut_options
})
tableData
(
repo
,
filtered
)
})
checked
=
[]
$
(
"
#jstree
"
).
bind
(
"
check_node.jstree uncheck_node.jstree
"
,
function
(
e
,
data
)
{
var
checked
=
$
(
"
#jstree
"
).
jstree
(
"
get_checked
"
)
var
filter
=
[]
for
(
i
=
0
;
i
<
checked
.
length
;
i
++
)
{
for
(
j
=
0
;
j
<
filters
.
length
;
j
++
)
{
if
(
checked
[
i
]
==
filters
[
j
].
id
)
{
filter
.
push
(
filters
[
j
].
text
)
}
}
}
filtered
=
filterRepo
(
repo
,
checked
)
filterRepoGroups_out
=
filterRepoGroups
(
repo
,
filtered
)
filtered_dis
=
filterRepoGroups_out
[
0
]
...
...
@@ -163,11 +116,13 @@
filtered_age
=
filterRepoGroups_out
[
4
]
filtered_prv
=
filterRepoGroups_out
[
5
]
filtered_psa
=
filterRepoGroups_out
[
6
]
filtered_ari
=
filterRepoGroups_out
[
7
]
filtered_alb
=
filterRepoGroups_out
[
8
]
document
.
getElementById
(
"
total
"
).
innerHTML
=
filtered
.
length
document
.
getElementById
(
"
filters
"
).
innerHTML
=
"
NO
"
filterDoughnut_out
=
filterDoughnut
(
filtered_bmi
,
filtered_t2d
,
filtered_eth
,
filtered_age
,
filtered_prv
,
filtered_psa
,
filtered_ari
,
filtered_alb
)
if
(
checked
.
length
==
0
)
{
document
.
getElementById
(
"
filters
"
).
innerHTML
=
"
NO
"
}
else
{
document
.
getElementById
(
"
filters
"
).
innerHTML
=
filter
}
filterDoughnut_out
=
filterDoughnut
(
filtered_bmi
,
filtered_t2d
,
filtered_eth
,
filtered_age
,
filtered_prv
,
filtered_psa
)
doughnut_data_dis
=
filterDoughnut_out
[
0
]
doughnut_data_bmi
=
filterDoughnut_out
[
1
]
doughnut_data_t2d
=
filterDoughnut_out
[
2
]
...
...
@@ -175,20 +130,52 @@
doughnut_data_age
=
filterDoughnut_out
[
4
]
doughnut_data_prv
=
filterDoughnut_out
[
5
]
doughnut_data_psa
=
filterDoughnut_out
[
6
]
doughnut_data_ari
=
filterDoughnut_out
[
7
]
doughnut_data_alb
=
filterDoughnut_out
[
8
]
dis
.
destroy
()
dis
=
new
Chart
(
document
.
getElementById
(
"
doughnut-dis
"
),
{
type
:
"
doughnut
"
,
data
:
doughnut_data_dis
,
options
:
doughnut_options
})
bmi
.
destroy
()
bmi
=
new
Chart
(
document
.
getElementById
(
"
doughnut-bmi
"
),
{
type
:
"
doughnut
"
,
data
:
doughnut_data_bmi
,
options
:
doughnut_options
})
t2d
.
destroy
()
t2d
=
new
Chart
(
document
.
getElementById
(
"
doughnut-t2d
"
),
{
type
:
"
doughnut
"
,
data
:
doughnut_data_t2d
,
options
:
doughnut_options
})
eth
.
destroy
()
eth
=
new
Chart
(
document
.
getElementById
(
"
doughnut-eth
"
),
{
type
:
"
doughnut
"
,
data
:
doughnut_data_eth
,
options
:
doughnut_options
})
age
.
destroy
()
age
=
new
Chart
(
document
.
getElementById
(
"
doughnut-age
"
),
{
type
:
"
doughnut
"
,
data
:
doughnut_data_age
,
options
:
doughnut_options
})
prv
.
destroy
()
prv
=
new
Chart
(
document
.
getElementById
(
"
doughnut-prv
"
),
{
type
:
"
doughnut
"
,
data
:
doughnut_data_prv
,
options
:
doughnut_options
})
psa
.
destroy
()
psa
=
new
Chart
(
document
.
getElementById
(
"
doughnut-psa
"
),
{
type
:
"
doughnut
"
,
data
:
doughnut_data_psa
,
options
:
doughnut_options
})
ari
=
new
Chart
(
document
.
getElementById
(
"
doughnut-ari
"
),
{
type
:
"
doughnut
"
,
data
:
doughnut_data_ari
,
options
:
doughnut_options
})
alb
=
new
Chart
(
document
.
getElementById
(
"
doughnut-alb
"
),
{
type
:
"
doughnut
"
,
data
:
doughnut_data_alb
,
options
:
doughnut_options
})
tableData
(
repo
,
filtered
)
})
checked
=
[]
filtered
=
filterRepo
(
repo
,
checked
)
filterRepoGroups_out
=
filterRepoGroups
(
repo
,
filtered
)
filtered_dis
=
filterRepoGroups_out
[
0
]
filtered_bmi
=
filterRepoGroups_out
[
1
]
filtered_t2d
=
filterRepoGroups_out
[
2
]
filtered_eth
=
filterRepoGroups_out
[
3
]
filtered_age
=
filterRepoGroups_out
[
4
]
filtered_prv
=
filterRepoGroups_out
[
5
]
filtered_psa
=
filterRepoGroups_out
[
6
]
document
.
getElementById
(
"
total
"
).
innerHTML
=
filtered
.
length
document
.
getElementById
(
"
filters
"
).
innerHTML
=
"
NO
"
filterDoughnut_out
=
filterDoughnut
(
filtered_bmi
,
filtered_t2d
,
filtered_eth
,
filtered_age
,
filtered_prv
,
filtered_psa
)
doughnut_data_dis
=
filterDoughnut_out
[
0
]
doughnut_data_bmi
=
filterDoughnut_out
[
1
]
doughnut_data_t2d
=
filterDoughnut_out
[
2
]
doughnut_data_eth
=
filterDoughnut_out
[
3
]
doughnut_data_age
=
filterDoughnut_out
[
4
]
doughnut_data_prv
=
filterDoughnut_out
[
5
]
doughnut_data_psa
=
filterDoughnut_out
[
6
]
dis
=
new
Chart
(
document
.
getElementById
(
"
doughnut-dis
"
),
{
type
:
"
doughnut
"
,
data
:
doughnut_data_dis
,
options
:
doughnut_options
})
bmi
=
new
Chart
(
document
.
getElementById
(
"
doughnut-bmi
"
),
{
type
:
"
doughnut
"
,
data
:
doughnut_data_bmi
,
options
:
doughnut_options
})
t2d
=
new
Chart
(
document
.
getElementById
(
"
doughnut-t2d
"
),
{
type
:
"
doughnut
"
,
data
:
doughnut_data_t2d
,
options
:
doughnut_options
})
eth
=
new
Chart
(
document
.
getElementById
(
"
doughnut-eth
"
),
{
type
:
"
doughnut
"
,
data
:
doughnut_data_eth
,
options
:
doughnut_options
})
age
=
new
Chart
(
document
.
getElementById
(
"
doughnut-age
"
),
{
type
:
"
doughnut
"
,
data
:
doughnut_data_age
,
options
:
doughnut_options
})
prv
=
new
Chart
(
document
.
getElementById
(
"
doughnut-prv
"
),
{
type
:
"
doughnut
"
,
data
:
doughnut_data_prv
,
options
:
doughnut_options
})
psa
=
new
Chart
(
document
.
getElementById
(
"
doughnut-psa
"
),
{
type
:
"
doughnut
"
,
data
:
doughnut_data_psa
,
options
:
doughnut_options
})
tableData
(
repo
,
filtered
)
})
var
doughnut_options
=
{
responsive
:
true
,
legend
:
{
...
...
@@ -588,14 +575,6 @@
filtered_psa_lr
=
[]
filtered_psa_hr
=
[]
filtered_psa_uk
=
[]
filtered_ari
=
[]
filtered_ari_ys
=
[]
filtered_ari_no
=
[]
filtered_ari_uk
=
[]
filtered_alb
=
[]
filtered_alb_ys
=
[]
filtered_alb_no
=
[]
filtered_alb_uk
=
[]
for
(
i
=
0
;
i
<
repo
.
length
;
i
++
)
{
if
(
filtered
.
includes
(
repo
[
i
].
PatientID
))
{
if
(
repo
[
i
][
"
Disease Status
"
]
==
"
Donor
"
)
{
...
...
@@ -706,26 +685,6 @@
if
(
repo
[
i
].
PSA
==
"
unknown
"
)
{
filtered_psa_uk
.
push
(
repo
[
i
].
PatientID
)
}
if
(
repo
[
i
][
"
5ARI
"
]
==
1
)
{
filtered_ari_ys
.
push
(
repo
[
i
].
PatientID
)
}
if
(
repo
[
i
][
"
5ARI
"
]
==
0
)
{
filtered_ari_no
.
push
(
repo
[
i
].
PatientID
)
}
if
(
repo
[
i
][
"
5ARI
"
]
==
"
unknown
"
)
{
filtered_ari_uk
.
push
(
repo
[
i
].
PatientID
)
}
if
(
repo
[
i
][
"
Alpha blocker
"
]
==
1
)
{
filtered_alb_ys
.
push
(
repo
[
i
].
PatientID
)
}
if
(
repo
[
i
][
"
Alpha blocker
"
]
==
0
)
{
filtered_alb_no
.
push
(
repo
[
i
].
PatientID
)
}
if
(
repo
[
i
][
"
Alpha blocker
"
]
==
"
unknown
"
)
{
filtered_alb_uk
.
push
(
repo
[
i
].
PatientID
)
}
}
}
filtered_dis
=
[
filtered_dis_d
.
length
,
filtered_dis_b
.
length
,
filtered_dis_c
.
length
]
...
...
@@ -735,8 +694,6 @@
filtered_age
=
[
filtered_age_40
.
length
,
filtered_age_50
.
length
,
filtered_age_60
.
length
,
filtered_age_70
.
length
,
filtered_age_80
.
length
,
filtered_age_90
.
length
,
filtered_age_100
.
length
,
filtered_age_uk
.
length
]
filtered_prv
=
[
filtered_prv_40
.
length
,
filtered_prv_50
.
length
,
filtered_prv_60
.
length
,
filtered_prv_uk
.
length
]
filtered_psa
=
[
filtered_psa_nm
.
length
,
filtered_psa_lr
.
length
,
filtered_psa_hr
.
length
,
filtered_psa_uk
.
length
]
filtered_ari
=
[
filtered_ari_ys
.
length
,
filtered_ari_no
.
length
,
filtered_ari_uk
.
length
]
filtered_alb
=
[
filtered_alb_ys
.
length
,
filtered_alb_no
.
length
,
filtered_alb_uk
.
length
]
return
[
filtered_dis
,
...
...
@@ -745,12 +702,10 @@
filtered_eth
,
filtered_age
,
filtered_prv
,
filtered_psa
,
filtered_ari
,
filtered_alb
filtered_psa
]
}
function
filterDoughnut
(
filtered_bmi
,
filtered_t2d
,
filtered_eth
,
filtered_age
,
filtered_prv
,
filtered_psa
,
filtered_ari
,
filtered_alb
)
{
function
filterDoughnut
(
filtered_bmi
,
filtered_t2d
,
filtered_eth
,
filtered_age
,
filtered_prv
,
filtered_psa
)
{
doughnut_data_dis
=
[]
doughnut_data_bmi
=
[]
doughnut_data_t2d
=
[]
...
...
@@ -758,8 +713,6 @@
doughnut_data_age
=
[]
doughnut_data_prv
=
[]
doughnut_data_psa
=
[]
doughnut_data_ari
=
[]
doughnut_data_alb
=
[]
doughnut_data_dis
=
{
labels
:
[
"
Donor (normal)
"
,
"
BPH
"
,
"
Prostate Cancer
"
],
datasets
:
[{
...
...
@@ -809,20 +762,6 @@
backgroundColor
:
[
"
#440154
"
,
"
#31688E
"
,
"
#35B779
"
,
"
#FDE725
"
]
}]
}
doughnut_data_ari
=
{
labels
:
[
"
Yes
"
,
"
No
"
,
"
Unknown
"
],
datasets
:
[{
data
:
filtered_ari
,
backgroundColor
:
[
"
#440154
"
,
"
#21908C
"
,
"
#FDE725
"
]
}]
}
doughnut_data_alb
=
{
labels
:
[
"
Yes
"
,
"
No
"
,
"
Unknown
"
],
datasets
:
[{
data
:
filtered_alb
,
backgroundColor
:
[
"
#440154
"
,
"
#21908C
"
,
"
#FDE725
"
]
}]
}
return
[
doughnut_data_dis
,
...
...
@@ -831,9 +770,7 @@
doughnut_data_eth
,
doughnut_data_age
,
doughnut_data_prv
,
doughnut_data_psa
,
doughnut_data_ari
,
doughnut_data_alb
doughnut_data_psa
]
}
function
tableData
(
repo
,
fitered
)
{
...
...
@@ -946,20 +883,6 @@
<canvas
id=
"doughnut-psa"
width=
"150"
height=
"150"
></canvas>
</div>
</div>
<div
class=
"col"
>
<div
class=
"panel_canvas"
style=
"text-align:center;"
>
<p>
5ARI Treatment
</p>
<hr>
<canvas
id=
"doughnut-ari"
width=
"150"
height=
"150"
></canvas>
</div>
</div>
<div
class=
"col"
>
<div
class=
"panel_canvas"
style=
"text-align:center;"
>
<p>
Alpha Blocker Treatment
</p>
<hr>
<canvas
id=
"doughnut-alb"
width=
"150"
height=
"150"
></canvas>
</div>
</div>
</div>
</div>
<hr>
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment