181 |
182 |
191 |
192 |
193 |
194 |
195 |
196 | {'Timerange based on'}
197 |
198 |
227 |
228 |
234 | {!counter && (
235 |
236 | {'Field value to use'}
237 |
238 | )}
239 | {!counter && (
240 | 'No options found'}
250 | value={nocountervalSelected}
251 | />
252 | )}
253 |
254 |
255 |
261 |
262 | {table &&
263 | columns.map((el, idx) => (
264 |
265 |
266 | {'Field'}
267 |
268 | this.onColumnValue(e, idx)}
274 | options={this.searchOptions}
275 | // isSearchable={isSearchable}
276 | maxMenuHeight={500}
277 | placeholder={'Choose the field'}
278 | noOptionsMessage={() => 'No options found'}
279 | value={this.searchOptions.find(i => i.value === el.field)}
280 | />
281 | this.onColumnAliasValue(e, idx)}
286 | type="text"
287 | />
288 |
293 |
294 | ))}
295 | {table && (
296 |
304 | )}
305 |
306 | );
307 | }
308 |
309 | private migrateConfig() {
310 | if (this.props.query.query !== undefined) {
311 | this.props.query.queryUrl = this.props.query.query;
312 | this.props.query.datefield = parseInt(this.props.query.datefield.number, 10);
313 | this.props.query.dynamicsplit = parseInt(this.props.query.dynamicsplit.number, 10);
314 | if (this.props.query.nocounterval !== undefined && this.props.query.nocounterval.number !== undefined) {
315 | this.props.query.nocounterval = parseInt(this.props.query.nocounterval.number, 10);
316 | }
317 | delete this.props.query.query;
318 | this.props.query.columns = [];
319 |
320 | // No loop because error on access property
321 | // col_0
322 | if (
323 | this.props.query.col_0.number !== undefined &&
324 | this.props.query.col_0.number !== undefined &&
325 | parseInt(this.props.query.col_0.number, 10) !== 0
326 | ) {
327 | let alias = '';
328 | if (!this.props.query.col_0_alias !== undefined) {
329 | alias = this.props.query.col_0_alias;
330 | }
331 | this.props.query.columns.push({
332 | field: parseInt(this.props.query.col_0.number, 10),
333 | alias,
334 | });
335 | }
336 | delete this.props.query.col_0;
337 | delete this.props.query.col_0_alias;
338 |
339 | // col_1
340 | if (
341 | this.props.query.col_1.number !== undefined &&
342 | this.props.query.col_1.number !== undefined &&
343 | parseInt(this.props.query.col_1.number, 10) !== 0
344 | ) {
345 | let alias = '';
346 | if (!this.props.query.col_1_alias !== undefined) {
347 | alias = this.props.query.col_1_alias;
348 | }
349 | this.props.query.columns.push({
350 | field: parseInt(this.props.query.col_1.number, 10),
351 | alias,
352 | });
353 | }
354 | delete this.props.query.col_1;
355 | delete this.props.query.col_1_alias;
356 |
357 | // col_2
358 | if (
359 | this.props.query.col_2.number !== undefined &&
360 | this.props.query.col_2.number !== undefined &&
361 | parseInt(this.props.query.col_2.number, 10) !== 0
362 | ) {
363 | let alias = '';
364 | if (!this.props.query.col_2_alias !== undefined) {
365 | alias = this.props.query.col_2_alias;
366 | }
367 | this.props.query.columns.push({
368 | field: parseInt(this.props.query.col_2.number, 10),
369 | alias,
370 | });
371 | }
372 | delete this.props.query.col_2;
373 | delete this.props.query.col_2_alias;
374 |
375 | // col_3
376 | if (
377 | this.props.query.col_3.number !== undefined &&
378 | this.props.query.col_3.number !== undefined &&
379 | parseInt(this.props.query.col_3.number, 10) !== 0
380 | ) {
381 | let alias = '';
382 | if (!this.props.query.col_3_alias !== undefined) {
383 | alias = this.props.query.col_3_alias;
384 | }
385 | this.props.query.columns.push({
386 | field: parseInt(this.props.query.col_3.number, 10),
387 | alias,
388 | });
389 | }
390 | delete this.props.query.col_3;
391 | delete this.props.query.col_3_alias;
392 |
393 | // col_4
394 | if (
395 | this.props.query.col_4.number !== undefined &&
396 | this.props.query.col_4.number !== undefined &&
397 | parseInt(this.props.query.col_4.number, 10) !== 0
398 | ) {
399 | let alias = '';
400 | if (!this.props.query.col_4_alias !== undefined) {
401 | alias = this.props.query.col_4_alias;
402 | }
403 | this.props.query.columns.push({
404 | field: parseInt(this.props.query.col_4.number, 10),
405 | alias,
406 | });
407 | }
408 | delete this.props.query.col_4;
409 | delete this.props.query.col_4_alias;
410 |
411 | // col_5
412 | if (
413 | this.props.query.col_5.number !== undefined &&
414 | this.props.query.col_5.number !== undefined &&
415 | parseInt(this.props.query.col_5.number, 10) !== 0
416 | ) {
417 | let alias = '';
418 | if (!this.props.query.col_5_alias !== undefined) {
419 | alias = this.props.query.col_5_alias;
420 | }
421 | this.props.query.columns.push({
422 | field: parseInt(this.props.query.col_5.number, 10),
423 | alias,
424 | });
425 | }
426 | delete this.props.query.col_5;
427 | delete this.props.query.col_5_alias;
428 |
429 | // col_6
430 | if (
431 | this.props.query.col_6.number !== undefined &&
432 | this.props.query.col_6.number !== undefined &&
433 | parseInt(this.props.query.col_6.number, 10) !== 0
434 | ) {
435 | let alias = '';
436 | if (!this.props.query.col_6_alias !== undefined) {
437 | alias = this.props.query.col_6_alias;
438 | }
439 | this.props.query.columns.push({
440 | field: parseInt(this.props.query.col_6.number, 10),
441 | alias,
442 | });
443 | }
444 | delete this.props.query.col_6;
445 | delete this.props.query.col_6_alias;
446 |
447 | // col_7
448 | if (
449 | this.props.query.col_7.number !== undefined &&
450 | this.props.query.col_7.number !== undefined &&
451 | parseInt(this.props.query.col_7.number, 10) !== 0
452 | ) {
453 | let alias = '';
454 | if (!this.props.query.col_7_alias !== undefined) {
455 | alias = this.props.query.col_7_alias;
456 | }
457 | this.props.query.columns.push({
458 | field: parseInt(this.props.query.col_7.number, 10),
459 | alias,
460 | });
461 | }
462 | delete this.props.query.col_7;
463 | delete this.props.query.col_7_alias;
464 |
465 | // col_8
466 | if (
467 | this.props.query.col_8.number !== undefined &&
468 | this.props.query.col_8.number !== undefined &&
469 | parseInt(this.props.query.col_8.number, 10) !== 0
470 | ) {
471 | let alias = '';
472 | if (!this.props.query.col_8_alias !== undefined) {
473 | alias = this.props.query.col_8_alias;
474 | }
475 | this.props.query.columns.push({
476 | field: parseInt(this.props.query.col_8.number, 10),
477 | alias,
478 | });
479 | }
480 | delete this.props.query.col_8;
481 | delete this.props.query.col_8_alias;
482 |
483 | // col_9
484 | if (
485 | this.props.query.col_9.number !== undefined &&
486 | this.props.query.col_9.number !== undefined &&
487 | parseInt(this.props.query.col_9.number, 10) !== 0
488 | ) {
489 | let alias = '';
490 | if (!this.props.query.col_9_alias !== undefined) {
491 | alias = this.props.query.col_9_alias;
492 | }
493 | this.props.query.columns.push({
494 | field: parseInt(this.props.query.col_9.number, 10),
495 | alias,
496 | });
497 | }
498 | delete this.props.query.col_9;
499 | delete this.props.query.col_9_alias;
500 |
501 | // col_10
502 | if (
503 | this.props.query.col_10.number !== undefined &&
504 | this.props.query.col_10.number !== undefined &&
505 | parseInt(this.props.query.col_10.number, 10) !== 0
506 | ) {
507 | let alias = '';
508 | if (!this.props.query.col_10_alias !== undefined) {
509 | alias = this.props.query.col_10_alias;
510 | }
511 | this.props.query.columns.push({
512 | field: parseInt(this.props.query.col_10.number, 10),
513 | alias,
514 | });
515 | }
516 | delete this.props.query.col_10;
517 | delete this.props.query.col_10_alias;
518 |
519 | // col_11
520 | if (
521 | this.props.query.col_11.number !== undefined &&
522 | this.props.query.col_11.number !== undefined &&
523 | parseInt(this.props.query.col_11.number, 10) !== 0
524 | ) {
525 | let alias = '';
526 | if (!this.props.query.col_11_alias !== undefined) {
527 | alias = this.props.query.col_11_alias;
528 | }
529 | this.props.query.columns.push({
530 | field: parseInt(this.props.query.col_11.number, 10),
531 | alias,
532 | });
533 | }
534 | delete this.props.query.col_11;
535 | delete this.props.query.col_11_alias;
536 | }
537 | }
538 | }
539 |
--------------------------------------------------------------------------------
/src/datasource/img/logo.svg:
--------------------------------------------------------------------------------
1 |