@@ -215,6 +215,29 @@ process.stdin.on('end', () => {
215
215
} ) ;
216
216
} ) ;
217
217
}
218
+
219
+ function getPoolStatsFromAPI ( ) {
220
+ return new Promise ( ( resolve , reject ) => {
221
+ var url = 'http://fylr.localhost:8081/api/v1/pool/1/stats?include_subpools=1&access_token=' + access_token
222
+ console . error ( "POOLSTATS" ) ;
223
+ fetch ( url , {
224
+ headers : {
225
+ 'Accept' : 'application/json'
226
+ } ,
227
+ } )
228
+ . then ( response => {
229
+ if ( response . ok ) {
230
+ resolve ( response . json ( ) ) ;
231
+ } else {
232
+ throwError ( "Fehler bei der Anfrage an /pool/stats " , '' ) ;
233
+ }
234
+ } )
235
+ . catch ( error => {
236
+ console . log ( error ) ;
237
+ throwError ( "Fehler bei der Anfrage an /pool/stats " , '' ) ;
238
+ } ) ;
239
+ } ) ;
240
+ }
218
241
219
242
async function fetchData ( ) {
220
243
const infoData = await Promise . all ( [
@@ -225,7 +248,8 @@ process.stdin.on('end', () => {
225
248
getTagInfoFromAPI ( ) ,
226
249
getPluginInfoFromAPI ( ) ,
227
250
getConfigFromAPI ( ) ,
228
- getConfigFromInspectAPI ( )
251
+ getConfigFromInspectAPI ( ) ,
252
+ getPoolStatsFromAPI ( )
229
253
] ) ;
230
254
231
255
let configinfo = infoData [ 6 ] ;
@@ -351,6 +375,7 @@ process.stdin.on('end', () => {
351
375
licenseDomains = licenseDomains . map ( ( s ) => s . trim ( ) ) ;
352
376
var externalURL = info . external_url ;
353
377
externalURL = externalURL . replace ( 'https://' , '' ) ;
378
+ externalURL = externalURL . replace ( 'https//' , '' ) ;
354
379
externalURL = externalURL . trim ( ) ;
355
380
if ( ! licenseDomains . includes ( externalURL ) ) {
356
381
result . license . domainConflict = true ;
@@ -421,7 +446,10 @@ process.stdin.on('end', () => {
421
446
// check if all objecttypes and tags, which are used in validation still exist!
422
447
const objecttypeList = infoData [ 2 ] . tables . map ( item => item . name ) ;
423
448
449
+ console . error ( " infoData[4]" ) ;
450
+ console . error ( infoData [ 4 ] ) ;
424
451
const tagList = infoData [ 4 ] . Tags . flatMap ( item => item . Tags . map ( tag => tag . Id ) ) ;
452
+
425
453
// check tags
426
454
let tagFilterFine = false ;
427
455
const tagfilter_select = sessionData . config . base . plugin [ 'custom-vzg-validationhub' ] . config [ 'VZG-Validationhub' ] . tagfilter_select ;
@@ -464,6 +492,9 @@ process.stdin.on('end', () => {
464
492
result . pluginsAllEnabled = false ;
465
493
result . pluginsDisabled = disabledPlugins ;
466
494
}
495
+
496
+ // poolstats
497
+ console . error ( infoData [ 8 ] ) ;
467
498
468
499
// parse info from settings (via session)
469
500
result . name = sessionData . instance . name ;
0 commit comments