@orchesty/connector-loki 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +7 -0
- package/LICENSE +190 -0
- package/coverage/clover.xml +106 -0
- package/coverage/coverage-final.json +4 -0
- package/coverage/lcov-report/base.css +224 -0
- package/coverage/lcov-report/block-navigation.js +87 -0
- package/coverage/lcov-report/favicon.png +0 -0
- package/coverage/lcov-report/index.html +146 -0
- package/coverage/lcov-report/prettify.css +1 -0
- package/coverage/lcov-report/prettify.js +2 -0
- package/coverage/lcov-report/sort-arrow-sprite.png +0 -0
- package/coverage/lcov-report/sorter.js +210 -0
- package/coverage/lcov-report/src/Batch/LokiGetQueryListBatch.ts.html +799 -0
- package/coverage/lcov-report/src/Batch/index.html +116 -0
- package/coverage/lcov-report/src/LokiApplication.ts.html +364 -0
- package/coverage/lcov-report/src/index.html +116 -0
- package/coverage/lcov-report/test/dataProvider.ts.html +139 -0
- package/coverage/lcov-report/test/index.html +116 -0
- package/coverage/lcov.info +203 -0
- package/dist/Batch/LokiGetQueryListBatch.d.ts +129 -0
- package/dist/Batch/LokiGetQueryListBatch.js +68 -0
- package/dist/LokiApplication.d.ts +21 -0
- package/dist/LokiApplication.js +98 -0
- package/dist/package.json +22 -0
- package/jest.config.js +13 -0
- package/package.json +22 -0
- package/src/Batch/LokiGetQueryListBatch.ts +238 -0
- package/src/Batch/__tests__/Data/LokiGetQueryListBatch/input.json +8 -0
- package/src/Batch/__tests__/Data/LokiGetQueryListBatch/mock.json +259 -0
- package/src/Batch/__tests__/Data/LokiGetQueryListBatch/output.json +43 -0
- package/src/Batch/__tests__/LokiGetQueryListBatch.ts +17 -0
- package/src/LokiApplication.ts +93 -0
- package/test/dataProvider.ts +18 -0
- package/tsconfig.json +8 -0
- package/tsconfig.prod.json +13 -0
- package/tsconfig.prod.tsbuildinfo +1 -0
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
|
|
2
|
+
<!doctype html>
|
|
3
|
+
<html lang="en">
|
|
4
|
+
|
|
5
|
+
<head>
|
|
6
|
+
<title>Code coverage report for test/dataProvider.ts</title>
|
|
7
|
+
<meta charset="utf-8" />
|
|
8
|
+
<link rel="stylesheet" href="../prettify.css" />
|
|
9
|
+
<link rel="stylesheet" href="../base.css" />
|
|
10
|
+
<link rel="shortcut icon" type="image/x-icon" href="../favicon.png" />
|
|
11
|
+
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
12
|
+
<style type='text/css'>
|
|
13
|
+
.coverage-summary .sorter {
|
|
14
|
+
background-image: url(../sort-arrow-sprite.png);
|
|
15
|
+
}
|
|
16
|
+
</style>
|
|
17
|
+
</head>
|
|
18
|
+
|
|
19
|
+
<body>
|
|
20
|
+
<div class='wrapper'>
|
|
21
|
+
<div class='pad1'>
|
|
22
|
+
<h1><a href="../index.html">All files</a> / <a href="index.html">test</a> dataProvider.ts</h1>
|
|
23
|
+
<div class='clearfix'>
|
|
24
|
+
|
|
25
|
+
<div class='fl pad1y space-right2'>
|
|
26
|
+
<span class="strong">100% </span>
|
|
27
|
+
<span class="quiet">Statements</span>
|
|
28
|
+
<span class='fraction'>10/10</span>
|
|
29
|
+
</div>
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
<div class='fl pad1y space-right2'>
|
|
33
|
+
<span class="strong">100% </span>
|
|
34
|
+
<span class="quiet">Branches</span>
|
|
35
|
+
<span class='fraction'>0/0</span>
|
|
36
|
+
</div>
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
<div class='fl pad1y space-right2'>
|
|
40
|
+
<span class="strong">100% </span>
|
|
41
|
+
<span class="quiet">Functions</span>
|
|
42
|
+
<span class='fraction'>1/1</span>
|
|
43
|
+
</div>
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
<div class='fl pad1y space-right2'>
|
|
47
|
+
<span class="strong">100% </span>
|
|
48
|
+
<span class="quiet">Lines</span>
|
|
49
|
+
<span class='fraction'>10/10</span>
|
|
50
|
+
</div>
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
</div>
|
|
54
|
+
<p class="quiet">
|
|
55
|
+
Press <em>n</em> or <em>j</em> to go to the next uncovered block, <em>b</em>, <em>p</em> or <em>k</em> for the previous block.
|
|
56
|
+
</p>
|
|
57
|
+
<template id="filterTemplate">
|
|
58
|
+
<div class="quiet">
|
|
59
|
+
Filter:
|
|
60
|
+
<input type="search" id="fileSearch">
|
|
61
|
+
</div>
|
|
62
|
+
</template>
|
|
63
|
+
</div>
|
|
64
|
+
<div class='status-line high'></div>
|
|
65
|
+
<pre><table class="coverage">
|
|
66
|
+
<tr><td class="line-count quiet"><a name='L1'></a><a href='#L1'>1</a>
|
|
67
|
+
<a name='L2'></a><a href='#L2'>2</a>
|
|
68
|
+
<a name='L3'></a><a href='#L3'>3</a>
|
|
69
|
+
<a name='L4'></a><a href='#L4'>4</a>
|
|
70
|
+
<a name='L5'></a><a href='#L5'>5</a>
|
|
71
|
+
<a name='L6'></a><a href='#L6'>6</a>
|
|
72
|
+
<a name='L7'></a><a href='#L7'>7</a>
|
|
73
|
+
<a name='L8'></a><a href='#L8'>8</a>
|
|
74
|
+
<a name='L9'></a><a href='#L9'>9</a>
|
|
75
|
+
<a name='L10'></a><a href='#L10'>10</a>
|
|
76
|
+
<a name='L11'></a><a href='#L11'>11</a>
|
|
77
|
+
<a name='L12'></a><a href='#L12'>12</a>
|
|
78
|
+
<a name='L13'></a><a href='#L13'>13</a>
|
|
79
|
+
<a name='L14'></a><a href='#L14'>14</a>
|
|
80
|
+
<a name='L15'></a><a href='#L15'>15</a>
|
|
81
|
+
<a name='L16'></a><a href='#L16'>16</a>
|
|
82
|
+
<a name='L17'></a><a href='#L17'>17</a>
|
|
83
|
+
<a name='L18'></a><a href='#L18'>18</a>
|
|
84
|
+
<a name='L19'></a><a href='#L19'>19</a></td><td class="line-coverage quiet"><span class="cline-any cline-yes">1x</span>
|
|
85
|
+
<span class="cline-any cline-yes">1x</span>
|
|
86
|
+
<span class="cline-any cline-yes">1x</span>
|
|
87
|
+
<span class="cline-any cline-yes">1x</span>
|
|
88
|
+
<span class="cline-any cline-yes">1x</span>
|
|
89
|
+
<span class="cline-any cline-neutral"> </span>
|
|
90
|
+
<span class="cline-any cline-yes">1x</span>
|
|
91
|
+
<span class="cline-any cline-yes">1x</span>
|
|
92
|
+
<span class="cline-any cline-neutral"> </span>
|
|
93
|
+
<span class="cline-any cline-neutral"> </span>
|
|
94
|
+
<span class="cline-any cline-neutral"> </span>
|
|
95
|
+
<span class="cline-any cline-neutral"> </span>
|
|
96
|
+
<span class="cline-any cline-neutral"> </span>
|
|
97
|
+
<span class="cline-any cline-yes">1x</span>
|
|
98
|
+
<span class="cline-any cline-yes">1x</span>
|
|
99
|
+
<span class="cline-any cline-neutral"> </span>
|
|
100
|
+
<span class="cline-any cline-yes">1x</span>
|
|
101
|
+
<span class="cline-any cline-neutral"> </span>
|
|
102
|
+
<span class="cline-any cline-neutral"> </span></td><td class="text"><pre class="prettyprint lang-js">import { appInstall, DEFAULT_USER } from '@orchesty/nodejs-connectors/test/DataProvider';
|
|
103
|
+
import { container } from '@orchesty/nodejs-connectors/test/TestAbstract';
|
|
104
|
+
import CoreFormsEnum from '@orchesty/nodejs-sdk/dist/lib/Application/Base/CoreFormsEnum';
|
|
105
|
+
import LokiGetQueryListBatch from '../src/Batch/LokiGetQueryListBatch';
|
|
106
|
+
import LokiApplication, { NAME as LOKI_APPLICATION, URL_KEY } from '../src/LokiApplication';
|
|
107
|
+
|
|
108
|
+
export default function init(): void {
|
|
109
|
+
appInstall(LOKI_APPLICATION, DEFAULT_USER, {
|
|
110
|
+
[CoreFormsEnum.AUTHORIZATION_FORM]: {
|
|
111
|
+
[URL_KEY]: 'http://127.0.0.1:3100',
|
|
112
|
+
},
|
|
113
|
+
});
|
|
114
|
+
|
|
115
|
+
const app = new LokiApplication();
|
|
116
|
+
container.setApplication(app);
|
|
117
|
+
|
|
118
|
+
container.setNode(new LokiGetQueryListBatch(), app);
|
|
119
|
+
}
|
|
120
|
+
</pre></td></tr></table></pre>
|
|
121
|
+
|
|
122
|
+
<div class='push'></div><!-- for sticky footer -->
|
|
123
|
+
</div><!-- /wrapper -->
|
|
124
|
+
<div class='footer quiet pad2 space-top1 center small'>
|
|
125
|
+
Code coverage generated by
|
|
126
|
+
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
127
|
+
at 2026-01-15T09:49:44.515Z
|
|
128
|
+
</div>
|
|
129
|
+
<script src="../prettify.js"></script>
|
|
130
|
+
<script>
|
|
131
|
+
window.onload = function () {
|
|
132
|
+
prettyPrint();
|
|
133
|
+
};
|
|
134
|
+
</script>
|
|
135
|
+
<script src="../sorter.js"></script>
|
|
136
|
+
<script src="../block-navigation.js"></script>
|
|
137
|
+
</body>
|
|
138
|
+
</html>
|
|
139
|
+
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
|
|
2
|
+
<!doctype html>
|
|
3
|
+
<html lang="en">
|
|
4
|
+
|
|
5
|
+
<head>
|
|
6
|
+
<title>Code coverage report for test</title>
|
|
7
|
+
<meta charset="utf-8" />
|
|
8
|
+
<link rel="stylesheet" href="../prettify.css" />
|
|
9
|
+
<link rel="stylesheet" href="../base.css" />
|
|
10
|
+
<link rel="shortcut icon" type="image/x-icon" href="../favicon.png" />
|
|
11
|
+
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
12
|
+
<style type='text/css'>
|
|
13
|
+
.coverage-summary .sorter {
|
|
14
|
+
background-image: url(../sort-arrow-sprite.png);
|
|
15
|
+
}
|
|
16
|
+
</style>
|
|
17
|
+
</head>
|
|
18
|
+
|
|
19
|
+
<body>
|
|
20
|
+
<div class='wrapper'>
|
|
21
|
+
<div class='pad1'>
|
|
22
|
+
<h1><a href="../index.html">All files</a> test</h1>
|
|
23
|
+
<div class='clearfix'>
|
|
24
|
+
|
|
25
|
+
<div class='fl pad1y space-right2'>
|
|
26
|
+
<span class="strong">100% </span>
|
|
27
|
+
<span class="quiet">Statements</span>
|
|
28
|
+
<span class='fraction'>10/10</span>
|
|
29
|
+
</div>
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
<div class='fl pad1y space-right2'>
|
|
33
|
+
<span class="strong">100% </span>
|
|
34
|
+
<span class="quiet">Branches</span>
|
|
35
|
+
<span class='fraction'>0/0</span>
|
|
36
|
+
</div>
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
<div class='fl pad1y space-right2'>
|
|
40
|
+
<span class="strong">100% </span>
|
|
41
|
+
<span class="quiet">Functions</span>
|
|
42
|
+
<span class='fraction'>1/1</span>
|
|
43
|
+
</div>
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
<div class='fl pad1y space-right2'>
|
|
47
|
+
<span class="strong">100% </span>
|
|
48
|
+
<span class="quiet">Lines</span>
|
|
49
|
+
<span class='fraction'>10/10</span>
|
|
50
|
+
</div>
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
</div>
|
|
54
|
+
<p class="quiet">
|
|
55
|
+
Press <em>n</em> or <em>j</em> to go to the next uncovered block, <em>b</em>, <em>p</em> or <em>k</em> for the previous block.
|
|
56
|
+
</p>
|
|
57
|
+
<template id="filterTemplate">
|
|
58
|
+
<div class="quiet">
|
|
59
|
+
Filter:
|
|
60
|
+
<input type="search" id="fileSearch">
|
|
61
|
+
</div>
|
|
62
|
+
</template>
|
|
63
|
+
</div>
|
|
64
|
+
<div class='status-line high'></div>
|
|
65
|
+
<div class="pad1">
|
|
66
|
+
<table class="coverage-summary">
|
|
67
|
+
<thead>
|
|
68
|
+
<tr>
|
|
69
|
+
<th data-col="file" data-fmt="html" data-html="true" class="file">File</th>
|
|
70
|
+
<th data-col="pic" data-type="number" data-fmt="html" data-html="true" class="pic"></th>
|
|
71
|
+
<th data-col="statements" data-type="number" data-fmt="pct" class="pct">Statements</th>
|
|
72
|
+
<th data-col="statements_raw" data-type="number" data-fmt="html" class="abs"></th>
|
|
73
|
+
<th data-col="branches" data-type="number" data-fmt="pct" class="pct">Branches</th>
|
|
74
|
+
<th data-col="branches_raw" data-type="number" data-fmt="html" class="abs"></th>
|
|
75
|
+
<th data-col="functions" data-type="number" data-fmt="pct" class="pct">Functions</th>
|
|
76
|
+
<th data-col="functions_raw" data-type="number" data-fmt="html" class="abs"></th>
|
|
77
|
+
<th data-col="lines" data-type="number" data-fmt="pct" class="pct">Lines</th>
|
|
78
|
+
<th data-col="lines_raw" data-type="number" data-fmt="html" class="abs"></th>
|
|
79
|
+
</tr>
|
|
80
|
+
</thead>
|
|
81
|
+
<tbody><tr>
|
|
82
|
+
<td class="file high" data-value="dataProvider.ts"><a href="dataProvider.ts.html">dataProvider.ts</a></td>
|
|
83
|
+
<td data-value="100" class="pic high">
|
|
84
|
+
<div class="chart"><div class="cover-fill cover-full" style="width: 100%"></div><div class="cover-empty" style="width: 0%"></div></div>
|
|
85
|
+
</td>
|
|
86
|
+
<td data-value="100" class="pct high">100%</td>
|
|
87
|
+
<td data-value="10" class="abs high">10/10</td>
|
|
88
|
+
<td data-value="100" class="pct high">100%</td>
|
|
89
|
+
<td data-value="0" class="abs high">0/0</td>
|
|
90
|
+
<td data-value="100" class="pct high">100%</td>
|
|
91
|
+
<td data-value="1" class="abs high">1/1</td>
|
|
92
|
+
<td data-value="100" class="pct high">100%</td>
|
|
93
|
+
<td data-value="10" class="abs high">10/10</td>
|
|
94
|
+
</tr>
|
|
95
|
+
|
|
96
|
+
</tbody>
|
|
97
|
+
</table>
|
|
98
|
+
</div>
|
|
99
|
+
<div class='push'></div><!-- for sticky footer -->
|
|
100
|
+
</div><!-- /wrapper -->
|
|
101
|
+
<div class='footer quiet pad2 space-top1 center small'>
|
|
102
|
+
Code coverage generated by
|
|
103
|
+
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
104
|
+
at 2026-01-15T09:49:44.515Z
|
|
105
|
+
</div>
|
|
106
|
+
<script src="../prettify.js"></script>
|
|
107
|
+
<script>
|
|
108
|
+
window.onload = function () {
|
|
109
|
+
prettyPrint();
|
|
110
|
+
};
|
|
111
|
+
</script>
|
|
112
|
+
<script src="../sorter.js"></script>
|
|
113
|
+
<script src="../block-navigation.js"></script>
|
|
114
|
+
</body>
|
|
115
|
+
</html>
|
|
116
|
+
|
|
@@ -0,0 +1,203 @@
|
|
|
1
|
+
TN:
|
|
2
|
+
SF:src/LokiApplication.ts
|
|
3
|
+
FN:19,(anonymous_10)
|
|
4
|
+
FN:25,(anonymous_11)
|
|
5
|
+
FN:29,(anonymous_12)
|
|
6
|
+
FN:33,(anonymous_13)
|
|
7
|
+
FN:37,(anonymous_14)
|
|
8
|
+
FN:41,(anonymous_15)
|
|
9
|
+
FN:51,(anonymous_16)
|
|
10
|
+
FN:85,(anonymous_17)
|
|
11
|
+
FNF:8
|
|
12
|
+
FNH:3
|
|
13
|
+
FNDA:1,(anonymous_10)
|
|
14
|
+
FNDA:2,(anonymous_11)
|
|
15
|
+
FNDA:0,(anonymous_12)
|
|
16
|
+
FNDA:0,(anonymous_13)
|
|
17
|
+
FNDA:0,(anonymous_14)
|
|
18
|
+
FNDA:0,(anonymous_15)
|
|
19
|
+
FNDA:1,(anonymous_16)
|
|
20
|
+
FNDA:0,(anonymous_17)
|
|
21
|
+
DA:1,1
|
|
22
|
+
DA:3,1
|
|
23
|
+
DA:4,1
|
|
24
|
+
DA:5,1
|
|
25
|
+
DA:6,1
|
|
26
|
+
DA:7,1
|
|
27
|
+
DA:8,1
|
|
28
|
+
DA:11,1
|
|
29
|
+
DA:12,1
|
|
30
|
+
DA:14,1
|
|
31
|
+
DA:16,1
|
|
32
|
+
DA:17,1
|
|
33
|
+
DA:19,1
|
|
34
|
+
DA:20,1
|
|
35
|
+
DA:23,1
|
|
36
|
+
DA:26,2
|
|
37
|
+
DA:30,0
|
|
38
|
+
DA:34,0
|
|
39
|
+
DA:38,0
|
|
40
|
+
DA:42,0
|
|
41
|
+
DA:63,1
|
|
42
|
+
DA:65,1
|
|
43
|
+
DA:67,1
|
|
44
|
+
DA:72,1
|
|
45
|
+
DA:73,0
|
|
46
|
+
DA:76,1
|
|
47
|
+
DA:77,0
|
|
48
|
+
DA:80,1
|
|
49
|
+
DA:82,1
|
|
50
|
+
DA:86,0
|
|
51
|
+
DA:87,0
|
|
52
|
+
LF:31
|
|
53
|
+
LH:23
|
|
54
|
+
BRDA:19,0,0,1
|
|
55
|
+
BRDA:19,0,1,1
|
|
56
|
+
BRDA:65,1,0,1
|
|
57
|
+
BRDA:65,1,1,0
|
|
58
|
+
BRDA:72,2,0,0
|
|
59
|
+
BRDA:72,2,1,1
|
|
60
|
+
BRDA:72,3,0,1
|
|
61
|
+
BRDA:72,3,1,0
|
|
62
|
+
BRDA:76,4,0,0
|
|
63
|
+
BRDA:76,4,1,1
|
|
64
|
+
BRDA:88,5,0,0
|
|
65
|
+
BRDA:88,5,1,0
|
|
66
|
+
BRDA:88,5,2,0
|
|
67
|
+
BRDA:88,5,3,0
|
|
68
|
+
BRF:14
|
|
69
|
+
BRH:6
|
|
70
|
+
end_of_record
|
|
71
|
+
TN:
|
|
72
|
+
SF:src/Batch/LokiGetQueryListBatch.ts
|
|
73
|
+
FN:9,(anonymous_1)
|
|
74
|
+
FN:16,(anonymous_2)
|
|
75
|
+
FN:20,(anonymous_3)
|
|
76
|
+
FN:57,(anonymous_4)
|
|
77
|
+
FN:58,(anonymous_5)
|
|
78
|
+
FN:63,(anonymous_6)
|
|
79
|
+
FN:69,(anonymous_7)
|
|
80
|
+
FN:70,(anonymous_8)
|
|
81
|
+
FN:71,(anonymous_9)
|
|
82
|
+
FNF:9
|
|
83
|
+
FNH:6
|
|
84
|
+
FNDA:1,(anonymous_1)
|
|
85
|
+
FNDA:1,(anonymous_2)
|
|
86
|
+
FNDA:1,(anonymous_3)
|
|
87
|
+
FNDA:3,(anonymous_4)
|
|
88
|
+
FNDA:15,(anonymous_5)
|
|
89
|
+
FNDA:9,(anonymous_6)
|
|
90
|
+
FNDA:0,(anonymous_7)
|
|
91
|
+
FNDA:0,(anonymous_8)
|
|
92
|
+
FNDA:0,(anonymous_9)
|
|
93
|
+
DA:1,1
|
|
94
|
+
DA:2,1
|
|
95
|
+
DA:4,1
|
|
96
|
+
DA:5,1
|
|
97
|
+
DA:7,1
|
|
98
|
+
DA:9,1
|
|
99
|
+
DA:10,1
|
|
100
|
+
DA:11,1
|
|
101
|
+
DA:14,1
|
|
102
|
+
DA:17,1
|
|
103
|
+
DA:21,1
|
|
104
|
+
DA:23,1
|
|
105
|
+
DA:25,1
|
|
106
|
+
DA:27,1
|
|
107
|
+
DA:28,0
|
|
108
|
+
DA:30,1
|
|
109
|
+
DA:31,0
|
|
110
|
+
DA:33,1
|
|
111
|
+
DA:34,1
|
|
112
|
+
DA:35,1
|
|
113
|
+
DA:36,1
|
|
114
|
+
DA:37,1
|
|
115
|
+
DA:39,1
|
|
116
|
+
DA:46,1
|
|
117
|
+
DA:48,1
|
|
118
|
+
DA:50,1
|
|
119
|
+
DA:51,0
|
|
120
|
+
DA:52,0
|
|
121
|
+
DA:55,1
|
|
122
|
+
DA:56,1
|
|
123
|
+
DA:57,3
|
|
124
|
+
DA:58,1
|
|
125
|
+
DA:59,15
|
|
126
|
+
DA:63,9
|
|
127
|
+
DA:64,1
|
|
128
|
+
DA:65,0
|
|
129
|
+
DA:66,0
|
|
130
|
+
DA:69,0
|
|
131
|
+
DA:70,0
|
|
132
|
+
DA:71,0
|
|
133
|
+
DA:74,1
|
|
134
|
+
LF:41
|
|
135
|
+
LH:32
|
|
136
|
+
BRDA:9,0,0,1
|
|
137
|
+
BRDA:9,0,1,1
|
|
138
|
+
BRDA:27,1,0,0
|
|
139
|
+
BRDA:27,1,1,1
|
|
140
|
+
BRDA:27,2,0,1
|
|
141
|
+
BRDA:27,2,1,1
|
|
142
|
+
BRDA:27,2,2,0
|
|
143
|
+
BRDA:28,3,0,0
|
|
144
|
+
BRDA:28,3,1,0
|
|
145
|
+
BRDA:28,4,0,0
|
|
146
|
+
BRDA:28,4,1,0
|
|
147
|
+
BRDA:30,5,0,0
|
|
148
|
+
BRDA:30,5,1,1
|
|
149
|
+
BRDA:30,6,0,1
|
|
150
|
+
BRDA:30,6,1,1
|
|
151
|
+
BRDA:30,6,2,0
|
|
152
|
+
BRDA:31,7,0,0
|
|
153
|
+
BRDA:31,7,1,0
|
|
154
|
+
BRDA:31,8,0,0
|
|
155
|
+
BRDA:31,8,1,0
|
|
156
|
+
BRDA:33,9,0,0
|
|
157
|
+
BRDA:33,9,1,1
|
|
158
|
+
BRDA:34,10,0,0
|
|
159
|
+
BRDA:34,10,1,1
|
|
160
|
+
BRDA:35,11,0,0
|
|
161
|
+
BRDA:35,11,1,1
|
|
162
|
+
BRDA:36,12,0,0
|
|
163
|
+
BRDA:36,12,1,1
|
|
164
|
+
BRDA:37,13,0,0
|
|
165
|
+
BRDA:37,13,1,1
|
|
166
|
+
BRDA:50,14,0,0
|
|
167
|
+
BRDA:50,14,1,1
|
|
168
|
+
BRDA:56,15,0,1
|
|
169
|
+
BRDA:56,15,1,0
|
|
170
|
+
BRDA:59,16,0,0
|
|
171
|
+
BRDA:59,16,1,15
|
|
172
|
+
BRDA:64,17,0,0
|
|
173
|
+
BRDA:64,17,1,1
|
|
174
|
+
BRDA:64,18,0,1
|
|
175
|
+
BRDA:64,18,1,1
|
|
176
|
+
BRDA:66,19,0,0
|
|
177
|
+
BRDA:66,19,1,0
|
|
178
|
+
BRDA:70,20,0,0
|
|
179
|
+
BRDA:70,20,1,0
|
|
180
|
+
BRF:44
|
|
181
|
+
BRH:19
|
|
182
|
+
end_of_record
|
|
183
|
+
TN:
|
|
184
|
+
SF:test/dataProvider.ts
|
|
185
|
+
FN:7,init
|
|
186
|
+
FNF:1
|
|
187
|
+
FNH:1
|
|
188
|
+
FNDA:1,init
|
|
189
|
+
DA:1,1
|
|
190
|
+
DA:2,1
|
|
191
|
+
DA:3,1
|
|
192
|
+
DA:4,1
|
|
193
|
+
DA:5,1
|
|
194
|
+
DA:7,1
|
|
195
|
+
DA:8,1
|
|
196
|
+
DA:14,1
|
|
197
|
+
DA:15,1
|
|
198
|
+
DA:17,1
|
|
199
|
+
LF:10
|
|
200
|
+
LH:10
|
|
201
|
+
BRF:0
|
|
202
|
+
BRH:0
|
|
203
|
+
end_of_record
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
import ABatchNode from '@orchesty/nodejs-sdk/dist/lib/Batch/ABatchNode';
|
|
2
|
+
import BatchProcessDto from '@orchesty/nodejs-sdk/dist/lib/Utils/BatchProcessDto';
|
|
3
|
+
export declare const NAME = "loki-get-query-list-batch";
|
|
4
|
+
declare enum Direction {
|
|
5
|
+
FORWARD = "forward",
|
|
6
|
+
BACKWARD = "backward"
|
|
7
|
+
}
|
|
8
|
+
export default class LokiGetQueryListBatch extends ABatchNode {
|
|
9
|
+
getName(): string;
|
|
10
|
+
processAction(dto: BatchProcessDto<IInput>): Promise<BatchProcessDto>;
|
|
11
|
+
}
|
|
12
|
+
type Duration = `${number}${'ns' | 'us' | 'µs' | 'ms' | 's' | 'm' | 'h'}`;
|
|
13
|
+
export interface IInput {
|
|
14
|
+
query: string;
|
|
15
|
+
limit?: number;
|
|
16
|
+
start?: number | string;
|
|
17
|
+
end?: number | string;
|
|
18
|
+
since?: Duration;
|
|
19
|
+
step?: string | number;
|
|
20
|
+
interval?: Duration | number;
|
|
21
|
+
direction?: Direction;
|
|
22
|
+
}
|
|
23
|
+
export interface IOutput {
|
|
24
|
+
status: string;
|
|
25
|
+
data: ({
|
|
26
|
+
resultType: 'matrix';
|
|
27
|
+
result: {
|
|
28
|
+
metric: Record<string, unknown>;
|
|
29
|
+
values: [number, string][];
|
|
30
|
+
}[];
|
|
31
|
+
} | {
|
|
32
|
+
resultType: 'streams';
|
|
33
|
+
result: {
|
|
34
|
+
stream: Record<string, unknown>;
|
|
35
|
+
values: [string, string][];
|
|
36
|
+
}[];
|
|
37
|
+
}) & {
|
|
38
|
+
stats: Statistics;
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
interface Statistics {
|
|
42
|
+
summary: {
|
|
43
|
+
bytesProcessedPerSecond: number;
|
|
44
|
+
linesProcessedPerSecond: number;
|
|
45
|
+
totalBytesProcessed: number;
|
|
46
|
+
totalLinesProcessed: number;
|
|
47
|
+
execTime: number;
|
|
48
|
+
queueTime: number;
|
|
49
|
+
subqueries: number;
|
|
50
|
+
totalEntriesReturned: number;
|
|
51
|
+
splits: number;
|
|
52
|
+
shards: number;
|
|
53
|
+
totalPostFilterLines: number;
|
|
54
|
+
totalStructuredMetadataBytesProcessed: number;
|
|
55
|
+
};
|
|
56
|
+
querier: {
|
|
57
|
+
store: Store;
|
|
58
|
+
};
|
|
59
|
+
ingester: {
|
|
60
|
+
totalReached: number;
|
|
61
|
+
totalChunksMatched: number;
|
|
62
|
+
totalBatches: number;
|
|
63
|
+
totalLinesSent: number;
|
|
64
|
+
store: Store;
|
|
65
|
+
};
|
|
66
|
+
cache: {
|
|
67
|
+
chunk: CacheStatistic;
|
|
68
|
+
index: CacheStatistic;
|
|
69
|
+
result: CacheStatistic;
|
|
70
|
+
statsResult: CacheStatistic;
|
|
71
|
+
volumeResult: CacheStatistic;
|
|
72
|
+
seriesResult: CacheStatistic;
|
|
73
|
+
labelResult: CacheStatistic;
|
|
74
|
+
instantMetricResult: CacheStatistic;
|
|
75
|
+
};
|
|
76
|
+
index: {
|
|
77
|
+
totalChunks: number;
|
|
78
|
+
postFilterChunks: number;
|
|
79
|
+
shardsDuration: number;
|
|
80
|
+
usedBloomFilters: boolean;
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
interface Store {
|
|
84
|
+
totalChunksRef: number;
|
|
85
|
+
totalChunksDownloaded: number;
|
|
86
|
+
chunksDownloadTime: number;
|
|
87
|
+
queryReferencedStructuredMetadata: boolean;
|
|
88
|
+
queryUsedV2Engine: boolean;
|
|
89
|
+
chunk: {
|
|
90
|
+
headChunkBytes: number;
|
|
91
|
+
headChunkLines: number;
|
|
92
|
+
decompressedBytes: number;
|
|
93
|
+
decompressedLines: number;
|
|
94
|
+
compressedBytes: number;
|
|
95
|
+
totalDuplicates: number;
|
|
96
|
+
postFilterLines: number;
|
|
97
|
+
headChunkStructuredMetadataBytes: number;
|
|
98
|
+
decompressedStructuredMetadataBytes: number;
|
|
99
|
+
};
|
|
100
|
+
chunkRefsFetchTime: number;
|
|
101
|
+
congestionControlLatency: number;
|
|
102
|
+
pipelineWrapperFilteredLines: number;
|
|
103
|
+
dataobj: {
|
|
104
|
+
prePredicateDecompressedRows: number;
|
|
105
|
+
prePredicateDecompressedBytes: number;
|
|
106
|
+
prePredicateDecompressedStructuredMetadataBytes: number;
|
|
107
|
+
postPredicateRows: number;
|
|
108
|
+
postPredicateDecompressedBytes: number;
|
|
109
|
+
postPredicateStructuredMetadataBytes: number;
|
|
110
|
+
postFilterRows: number;
|
|
111
|
+
pagesScanned: number;
|
|
112
|
+
pagesDownloaded: number;
|
|
113
|
+
pagesDownloadedBytes: number;
|
|
114
|
+
pageBatches: number;
|
|
115
|
+
totalRowsAvailable: number;
|
|
116
|
+
totalPageDownloadTime: number;
|
|
117
|
+
};
|
|
118
|
+
}
|
|
119
|
+
interface CacheStatistic {
|
|
120
|
+
entriesFound: number;
|
|
121
|
+
entriesRequested: number;
|
|
122
|
+
entriesStored: number;
|
|
123
|
+
bytesReceived: number;
|
|
124
|
+
bytesSent: number;
|
|
125
|
+
requests: number;
|
|
126
|
+
downloadTime: number;
|
|
127
|
+
queryLengthServed: number;
|
|
128
|
+
}
|
|
129
|
+
export {};
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.NAME = void 0;
|
|
7
|
+
const ABatchNode_1 = __importDefault(require("@orchesty/nodejs-sdk/dist/lib/Batch/ABatchNode"));
|
|
8
|
+
const HttpMethods_1 = require("@orchesty/nodejs-sdk/dist/lib/Transport/HttpMethods");
|
|
9
|
+
const ResultCode_1 = __importDefault(require("@orchesty/nodejs-sdk/dist/lib/Utils/ResultCode"));
|
|
10
|
+
const LokiApplication_1 = require("../LokiApplication");
|
|
11
|
+
exports.NAME = `${LokiApplication_1.NAME}-get-query-list-batch`;
|
|
12
|
+
var Direction;
|
|
13
|
+
(function (Direction) {
|
|
14
|
+
Direction["FORWARD"] = "forward";
|
|
15
|
+
Direction["BACKWARD"] = "backward";
|
|
16
|
+
})(Direction || (Direction = {}));
|
|
17
|
+
class LokiGetQueryListBatch extends ABatchNode_1.default {
|
|
18
|
+
getName() {
|
|
19
|
+
return exports.NAME;
|
|
20
|
+
}
|
|
21
|
+
async processAction(dto) {
|
|
22
|
+
const boundaryTimestamp = dto.getBatchCursor();
|
|
23
|
+
const { query, limit, start, end, since, interval, step, direction } = dto.getJsonData();
|
|
24
|
+
const params = new URLSearchParams({ query });
|
|
25
|
+
if (start || (boundaryTimestamp && direction === Direction.FORWARD)) {
|
|
26
|
+
params.set('start', (direction === Direction.FORWARD ? boundaryTimestamp || String(start) : String(start)));
|
|
27
|
+
}
|
|
28
|
+
if (end || (boundaryTimestamp && direction !== Direction.FORWARD)) {
|
|
29
|
+
params.set('end', (direction === Direction.FORWARD ? String(end) : boundaryTimestamp || String(end)));
|
|
30
|
+
}
|
|
31
|
+
if (limit)
|
|
32
|
+
params.set('limit', String(limit));
|
|
33
|
+
if (since)
|
|
34
|
+
params.set('since', since);
|
|
35
|
+
if (interval)
|
|
36
|
+
params.set('interval', String(interval));
|
|
37
|
+
if (step)
|
|
38
|
+
params.set('step', String(step));
|
|
39
|
+
if (direction)
|
|
40
|
+
params.set('direction', direction);
|
|
41
|
+
const requestDto = await this.getApplication().getRequestDto(dto, await this.getApplicationInstallFromProcess(dto), HttpMethods_1.HttpMethods.GET, `/loki/api/v1/query_range?${params}`);
|
|
42
|
+
const responseDto = await this.getSender().send(requestDto);
|
|
43
|
+
const { status, data } = responseDto.getJsonBody();
|
|
44
|
+
if (status !== 'success') {
|
|
45
|
+
dto.setStopProcess(ResultCode_1.default.STOP_AND_FAILED, 'Unexpected error occurred during LogQL query execution');
|
|
46
|
+
return dto;
|
|
47
|
+
}
|
|
48
|
+
const items = [];
|
|
49
|
+
if (data.resultType === 'streams') {
|
|
50
|
+
const result = data.result.flatMap((item) => item.values);
|
|
51
|
+
result.sort((a, b) => (direction === Direction.FORWARD
|
|
52
|
+
? Number(a[0]) - Number(b[0])
|
|
53
|
+
: Number(b[0]) - Number(a[0])));
|
|
54
|
+
items.push(...result.map((item) => item[1]));
|
|
55
|
+
if (result.length === (limit ?? 100)) {
|
|
56
|
+
const timestamp = Number(result[result.length - 1][0]);
|
|
57
|
+
dto.setBatchCursor(String(timestamp + (direction === Direction.FORWARD ? 1 : -1)));
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
else {
|
|
61
|
+
const result = data.result.flatMap((item) => item.values);
|
|
62
|
+
result.sort((a, b) => (direction === Direction.FORWARD ? a[0] - b[0] : b[0] - a[0]));
|
|
63
|
+
items.push(...result.map((item) => item[1]));
|
|
64
|
+
}
|
|
65
|
+
return dto.setItemList(items);
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
exports.default = LokiGetQueryListBatch;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { ApplicationInstall } from '@orchesty/nodejs-sdk/dist/lib/Application/Database/ApplicationInstall';
|
|
2
|
+
import FormStack from '@orchesty/nodejs-sdk/dist/lib/Application/Model/Form/FormStack';
|
|
3
|
+
import { ABasicApplication } from '@orchesty/nodejs-sdk/dist/lib/Authorization/Type/Basic/ABasicApplication';
|
|
4
|
+
import RequestDto from '@orchesty/nodejs-sdk/dist/lib/Transport/Curl/RequestDto';
|
|
5
|
+
import { HttpMethods } from '@orchesty/nodejs-sdk/dist/lib/Transport/HttpMethods';
|
|
6
|
+
import AProcessDto from '@orchesty/nodejs-sdk/dist/lib/Utils/AProcessDto';
|
|
7
|
+
export declare const NAME = "loki";
|
|
8
|
+
export declare const TENANT_KEY = "tenant";
|
|
9
|
+
export declare const URL_KEY = "url";
|
|
10
|
+
export declare enum LokiHeaders {
|
|
11
|
+
TENANT = "X-Scope-OrgID"
|
|
12
|
+
}
|
|
13
|
+
export default class LokiApplication extends ABasicApplication {
|
|
14
|
+
getName(): string;
|
|
15
|
+
getDescription(): string;
|
|
16
|
+
getPublicName(): string;
|
|
17
|
+
getLogo(): string;
|
|
18
|
+
getFormStack(): FormStack;
|
|
19
|
+
getRequestDto(dto: AProcessDto, applicationInstall: ApplicationInstall, method: HttpMethods, path?: string, data?: unknown): RequestDto;
|
|
20
|
+
isAuthorized(applicationInstall: ApplicationInstall): boolean;
|
|
21
|
+
}
|