forked from qlik-demo-team/qdt-html-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
table.html
134 lines (126 loc) · 5.4 KB
/
table.html
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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
<!doctype html>
<!-- <html qva-bootstrap="false" lang="en"> -->
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>Simple html with qdt-components</title>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<meta name="HandheldFriendly" content="True">
<meta name="MobileOptimized" content="320">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<meta http-equiv="cleartype" content="on">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="index.css" />
<link rel="shortcut icon" href="favicon.ico" />
<script type="text/javascript" src="js/qdt-components.js"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/vs2015.min.css">
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/highlight.min.js"></script>
<script>hljs.initHighlightingOnLoad();</script>
</head>
<body>
<div class="qdt-html-template text-center">
<img src="banner_html5.jpg" class="banner">
<h3>This is a simple html page that uses <a href="https://github.com/qlik-demo-team/qdt-components">qdt-components</a> (1.1.62).</h3>
<ul>
<li><a href="index.html">Simple Object</a> |</li>
<li><a href="session-object.html">Session Object</a> | </li>
<li><a href="selection-toolbar.html">Selection Toolbar</a> | </li>
<li><a href="picasso.html">Picasso - Charts</a> | </li>
<li><a href="table.html">Table from Engine API</a> | </li>
<li><a href="kpi.html">KPI from Engine API</a></li>
</ul>
</div>
<div id="qdt1"></div>
<script type="text/javascript">
var qConfig = {
"config": {
"host": "sense-demo.qlik.com",
"secure": true,
"port": 443,
"prefix": "",
"appId": "133dab5d-8f56-4d40-b3e0-a6b401391bde"
},
"connections": {
"vizApi": true,
"engineApi": false
}
}
var viz2 = {
type: 'QdtViz',
props: {
type: 'table',
cols: [
'Case Owner',
'Employee Status',
"=dual(floor((vToday - [Employee Hire Date])/365) & 'y ' & floor(((vToday - [Employee Hire Date])/365 - floor((vToday - [Employee Hire Date])/365)) * 12) & 'm', vToday - [Employee Hire Date])",
"=Count( {$<Status -={'Closed'} >} Distinct %CaseId )",
"=Count( {$<[Case Is Closed] ={'True'} >} %CaseId )",
'=Count(Distinct [%CaseId])',
],
options: {
showTitles: true,
title: 'Resource Details',
},
height: '300px',
}
}
var QdtComponent = new window.QdtComponents(qConfig.config, qConfig.connections);
var element = document.getElementById('qdt1');
QdtComponent.render(viz2.type, viz2.props, element);
</script>
<div class="pt50">
<h5>Html</h5>
<pre><code class="html">
< head>
< script type="text/javascript" src="qdt-components.js">< /script>
< /head>
< body>
< div id="qdt1">< /div>
< /body>
</code></pre>
</div>
<div class="pt20">
<h5>Javascript</h5>
<pre><code class="javascript">
var qConfig = {
"config": {
"host": "your-server",
"secure": true,
"port": 443,
"prefix": "",
"appId": "133dab5d-8f56-4d40-b3e0-a6b401391bde"
},
"connections": {
"vizApi": true,
"engineApi": false
}
}
var viz2 = {
type: 'QdtViz',
props: {
type: 'table',
cols: [
'Case Owner',
'Employee Status',
"=dual(floor((vToday - [Employee Hire Date])/365) & 'y ' & floor(((vToday - [Employee Hire Date])/365 - floor((vToday - [Employee Hire Date])/365)) * 12) & 'm', vToday - [Employee Hire Date])",
"=Count( {$<Status -={'Closed'} >} Distinct %CaseId )",
"=Count( {$<[Case Is Closed] ={'True'} >} %CaseId )",
'=Count(Distinct [%CaseId])',
],
options: {
showTitles: true,
title: 'Resource Details',
},
height: '300px',
}
}
var QdtComponent = new window.QdtComponents(qConfig.config, qConfig.connections);
var element = document.getElementById('qdt1');
QdtComponent.render(viz2.type, viz2.props, element);
</code></pre>
</div>
</body>
</html>