forked from cBioPortal/cbioportal-frontend
-
Notifications
You must be signed in to change notification settings - Fork 3
/
my-index.ejs
61 lines (50 loc) · 1.66 KB
/
my-index.ejs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
<!DOCTYPE html>
<html class="cbioportal-frontend">
<head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8"/>
<link rel="icon" href="/images/cbioportal_icon.png"/>
<title>cBioPortal for Cancer Genomics</title>
<script>
window.devContext = true;
window.frontendConfig = {
}
localStorage.frontendConfig = JSON.stringify(
{
serverConfig:{
custom_tabs:[
{
title: 'Sync Tab',
id: 'customTab1',
location: 'PATIENT_PAGE',
mountCallback: `(div)=>{
$(div).html("tab for patient " + window.location.search.split("=").slice(-1))
}`,
},
{
title: 'Async Tab',
id: 'customTab2',
location: 'PATIENT_PAGE',
hideAsync: `()=>{
return new Promise((resolve)=>{
setTimeout(()=>{
resolve(true);
}, 2000);
});
}`,
},
]
}
}
);
function renderCustomTab1(div, tab){
$(div).append(`<div>this is the content for <strong>${tab.title}</strong></div>`);
}
</script>
<script src="/reactapp/common.bundle.js"></script>
<link href="/reactapp/prefixed-bootstrap.min.css" rel="stylesheet"></link>
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.css" rel="stylesheet" />
</head>
<body>
<div id="reactRoot"></div>
</body>
</html>