LogPanels

LogPanel

<LogPanel
  name="LogPanel"
  logs={logs}
  getLogs={dataMap['RPT.GTP.GETLOGS']()}
  getChart={dataMap['RPT.GTP.GETCHARTS']()}
/>

Name

Type

Default Value

Required

Description

name

string

--

Yes

The name of the visualization

logs

IObject[]

--

Yes

The logs types

getLogs

function

--

Yes

Call the function to get Log data

getChart

function

--

No

Call the function to get Log Chart data

selectedTimePeriod

number[]

[]

No

Set startTime and endTime for LogPanel, if the two values are changed, call getLogs and getChart again.

logs props

It needs use different logs for different APP. Below is the configuration of logs for ADC/GiFW/CGN/GTP app.

GTP

;[
  {
    key: 1,
    name: 'LOGS',
    viz: [
      {
        app: 'GTP',
        dataSource: 'RPT',
        endPoint: 'thunder-adc',
        metrics: 'fw_l4_pc',
        chartMetrics: 'system_telemetry_log_partition_metrics',
        name: 'LOGS',
      },
    ],
  },
]

ADC

;[
  {
    key: 1,
    name: 'LOGS',
    viz: [
      {
        app: 'adc',
        dataSource: 'RPT',
        endPoint: 'thunder-adc',
        metrics: 'accesslog',
        name: 'LOGS',
      },
    ],
  },
]

CGN

;[
  {
    key: 1,
    name: 'SESSION LOGS',
    viz: [
      {
        app: 'cgn',
        dataSource: 'RPT',
        endPoint: 'thunder-adc',
        metrics: 'cgn_l4_pc',
        chartMetrics: 'system_telemetry_log_device_status',
        name: 'SESSION LOGS',
      },
    ],
  },
  {
    key: 2,
    name: 'ERROR LOGS',
    viz: [
      {
        app: 'cgn',
        dataSource: 'RPT',
        endPoint: 'thunder-adc',
        metrics: 'cgn_summary_log_pe',
        name: 'ERROR LOGS',
      },
    ],
  },
]

GiFW

;[
  {
    key: 1,
    name: "NAT'D CONNECTION LOGS",
    viz: [
      {
        app: 'gifw',
        dataSource: 'RPT',
        endPoint: 'thunder-adc',
        metrics: 'cgn_l4_pc',
        chartMetrics: 'system_telemetry_log_device_status',
        name: "NAT'D CONNECTION LOGS",
      },
    ],
  },
  {
    key: 2,
    name: 'TRANSPARENT CONNECTION LOGS',
    viz: [
      {
        app: 'gifw',
        dataSource: 'RPT',
        endPoint: 'thunder-adc',
        metrics: 'fw_l4_pc',
        name: 'TRANSPARENT CONNECTION LOGS',
      },
    ],
  },
]

getLogs props

getLogs will call function with two paramaters log and options

getLogs(
  log: {
    getFilterQuery: function(startTime, endTime){return {...filter}},
    app: string,
    dataSource: string,
    endPoint: string,
    metrics: string},
  options: {
    start: number,
    count: number,
    filter: any}){}

and the function should return total, logs and filter counters

return {
  total: {ts_count: 100},
  logs: {AWmefMfI4RpgFwR1esNB: {...}},
  filter1: {...},
  filter2: {...},
  ...
}

getChart props

getChart will call function with two paramaters log and options

getChart(
  log: {
    getFilterQuery: function(startTime, endTime){return {...filter}},
    app: string,
    dataSource: string,
    endPoint: string,
    metrics: string},
  options: {
    start: number,
    count: number,
    filter: any}){}

and the function should return chart

{
  chart: {
    pc_sent_sum: {
      '1554925260000': 26,
      '1554925680000': 236,
      '1554926100000': 1073,
      '1554926520000': 897,
      '1554926940000': 836,
      '1554927360000': 914,
      '1554927780000': 937,
    }
  }
}

Actions

VIZ.LOG.LOAD.EXPANDROW

Name

Type

Description

type

string

The action type

logType

string

The type of LogPanel

record

IObject

The row object

callback

(data: IObject, totalCount?: number): void

The update the viz with new data

VIZ.LOG.LOAD.EXPANDROW.SUB

Name

Type

Description

type

string

The action type

options

string

The type of LogPanel

callback

(data: IObject, totalCount?: number): void

The update the viz with new data

VIZ.LOG.LOADMORE

Name

Type

Description

type

string

The action type

options

{page: number; pageSize: number; type: string}

The options for loading more

callback

(dataSouce: IObject[], totalCount: number): void

The update the viz with new data

VIZ.LOG.LOADMORE.SUB

Name

Type

Description

type

string

The action type

options

{page: number; pageSize: number; type: string, record: IObject}

The options for loading more

callback

(dataSouce: IObject[], totalCount: number): void

The update the viz with new data

VIZ.LOG.CHANGE.FILTERS

Name

Type

Description

type

string

The action type

filters

IObject[]

The selected filters

VIZ.LOG.CHANGE.LABEL

Name

Type

Description

type

string

The action type

label

string

The label in the header

VIZ.LOG.CHANGE.LABEL

Name

Type

Description

type

string

The action type

value

string

The search value which input in the header

VIZ.LOG.CLICK.DOWNLOAD

Call the action when click the download icon in the header

Name

Type

Description

type

string

The action type

VIZ.LOG.CLICK.HELP

Call the action when click the help icon in the header

Name

Type

Description

type

string

The action typ

Last updated

Was this helpful?