1.0.0 • Published 3 years ago

flowmon-ddos-visualizations-lib v1.0.0

Weekly downloads
-
License
MIT
Repository
-
Last release
3 years ago

Library Template

This template serves as a base for the visualization libraries.

Development info

(remove this whole section later on, as well as the rename script)

Changing the lib name

In order to change the library name, run the rename.sh script:

./rename.sh -n new-lib-name

The script changes the library name in all the necessary files (provided that the project has the initial example name!).

Deploying the library to the NPM repository

Set the following in the .nprmc file:

  registry=https://nexus.csirt.muni.cz/repository/tractor-npm-hosted/
  email=info@kypo.cz
  always-auth=true
  _auth=dHJhY3Rvci11cGxvYWRlcjozIStfPUdEW047WX1oczpfQm0=

In Windwos, you can set the properties via the console using the following command:

npm set <key> <value>

such as:

npm set registry https://nexus.csirt.muni.cz/repository/tractor-npm-hosted/

After you build the project, publish the package. The commands go as follows:

npm run build
npm publish --registry=https://nexus.csirt.muni.cz/repository/tractor-npm-hosted/

Documentation

To run the detailed guide and component documentation, run the following in the root library directory:

npm install
npm start

By default, the application guide will be ready in the browser on http://localhost:6060/

Run example application locally

You can run an example app to see the expected visualization layout. Just run:

npm install
npm run build
cd example
npm start

By default, the example application will be ready in the browser on http://localhost:3000/

Install the library

When the library is deployed in the Nexus NPM repository, it can be used in a project via the following command:

npm install --save flowmon-ddos-visualizations-lib

Usage

import React, { Component } from 'react'

import Demo from 'flowmon-ddos-visualizations-lib'
import 'flowmon-ddos-visualizations-lib/dist/index.css'

class Example extends Component {
  render() {
    return <Demo />
  }
}

License

Copyright © 2020 NC3 / TRACTOR

Licensed under the MIT License