2.0.1 • Published 8 years ago

zabbix-react-component v2.0.1

Weekly downloads
3
License
ISC
Repository
github
Last release
8 years ago

zabbix-react-component

Overview

React components for Zabbix-API interaction. Works with backend API - zabbix-reactor.

Usage

specUrl - path to zabbix-reactor spec-file

import { OpenApiSwagger, HostConfig, HostGraph } from 'zabbix-react-component'

window.localStorage.setItem('token', 'test')

const specUrl = 'http://localhost:8002/spec/swagger.json'
const swg = new OpenApiSwagger(specUrl)

swg.connect((client, err) => {
  if (err) {
    ReactDOM.render(
      <div className='std-win'>no spec - <a href={specUrl}>{specUrl}</a> !</div>,
      document.getElementById('root')
    )
  }
  else {
    ReactDOM.render(
      <div>
        <HostConfig swgClient={client} headerTxt='HostConfig component' />
        <HostGraph swgClient={client} headerTxt='HostGraph component' />
      </div>,
      document.getElementById('root')
    )
  }
})

Dependencies

2.0.1

8 years ago

2.0.0

8 years ago

1.2.2

8 years ago

1.2.1

8 years ago

1.2.0

8 years ago

1.1.2

8 years ago

1.1.1

8 years ago

1.1.0

8 years ago

1.0.5

8 years ago

1.0.4

8 years ago

1.0.3

8 years ago

1.0.2

8 years ago

1.0.1

8 years ago

1.0.0

8 years ago