Coder Social home page Coder Social logo

sipcapture / homer-view-react Goto Github PK

View Code? Open in Web Editor NEW
10.0 8.0 6.0 3.3 MB

Experimental React Viewer for HEP APIs

License: GNU Affero General Public License v3.0

JavaScript 97.42% HTML 2.18% Dockerfile 0.16% CSS 0.02% Shell 0.01% SCSS 0.21%
homer sipcapture hep react viewer qxip

homer-view-react's Introduction

HOMER-View

Experimental Stand-Alone React Viewer for HOMER API 7.x

ezgif com-optimize 24

Requirements

Installation

  1. Clone this repository
  2. cd homer-view-react
  3. Run npm install to install dependencies
  4. Run npm run build to build application
  5. Start the development server npm run start
  6. Access the application at http://localhost:3000/

Manual Configuration (not required for docker)

  1. copy the example file from example/view-config.js to src/config/index.js
  2. copy the example file from example/proxy-config.js to proxy/config.js
  3. open proxy/config.js and configure your HOMER API parameters (API url, username and password)
  4. start proxy: cd proxy; npm install && npm start

Docker

See the example folder for a working example

URL Parameters

The Application accepts the following URL parameters defining search settings:

  • from: start time in milliseconds
  • to: stop time in milliseconds
  • callid: callid string or array
  • tabs: visibile tabs, options
    • messages
    • qos
    • flow
    • logs
    • export

Example

  • http://localhost:3000/?from=1550706099000&to=1550707799000&[email protected]&tabs=messages,qos

Made by Humans

This Open-Source project is made possible by actual Humans without corporate sponsors, angels or patreons.
If you use this software in production, please consider supporting its development with contributions or donations

Donate

homer-view-react's People

Contributors

adubovikov avatar almukhametovd avatar dependabot[bot] avatar lmangani avatar olegpinchuk avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

homer-view-react's Issues

v0.1.2 docker image from master not working

Hello, we're trying to run the latest docker master image, but we're getting this error and then the container stops:

# docker run sipcapture/homer-view:master
Cannot match against 'undefined' or 'null'

If we change to the latest image (version 0.1.1) it works fine, any ideas what can be causing this?
Thanks.

Docker - 401 Unauthorized at 9088 port

Hey, im using the docker from example directory as follows

proxy-config.js

var config = {
        debug: true,
        apiUrl: 'http://host-ip:9080',
        apiSess: 'http://host-ip:9080/api/v3/auth',
        apiAuthJWT: true,
        apiUser: 'admin',
        apiPass: 'pass',
        timeOut: 1800, // seconds
        proxyHost: '0.0.0.0',
        proxyPort: 8765
};

module.exports = config;

and default view-config.js as placed in example directory

const ENV = "DEV";
const DEBUGGING = true;

const configs = {
  DEV: {
    env: "DEV",
    debugging: DEBUGGING,
    serverUrl: "http://"+ window.location.hostname +":8765/api/v3/"
  },
  UI: {
    availableTabs: ["messages", "flow", "qos", "logs", "export"]
  }
};

export default configs;

First of all the opened ports are 8765 and 9088

8765 is working fine

9088 shows this
image
and in web console says 401 unauthorized and "login required"

Configuration File

The current configuration file is unclear. There should be a single js configuration file for the application.

At this time:

  • /src/config/config.js seems ineffective
  • src/config/index.js seems effective

RTCP Type 34 as UNKOWN

Currently, Type 34 reports (possibly others) are displayed as UNKNOWN.
It should return instead the HEP type corresponding to the packet.

error

Dear:
when run npm run build,have the following error:
image

Fix Warnings

The application starts with numerous warnings, @almukhametovd please check it out for a cleanup

Compiled with warnings.

Docker - Using Auth Token from Homer in Homer-view

Hey,

i dont want to use the proxy but use a generated Auth Token from Homer. i the homer api accepts requests only if the token is in the header and not a prameter in the url request.

So how can i use the viewer with the auth-token?

Thank you

Undefined binding(s) detected when compiling SELECT query

Hey guys

I've been playing out with the react-view app, and I found out some issues when I was testing with our homer setup in Telnyx.

I was using the example, and pointing the proxy to one of our homer web app, and I was getting this error when trying to make requests:
http://localhost:9081/?from=1553629228&to=1553802028&callid=0c438bf9-65ef-4896-a5eb-a1072dc3afdd&tabs=messages,qos
{"statusCode":503,"error":"Service Unavailable","message":"fail to get data main:Error: fail to get data fullError: Undefined binding(s) detected when compiling SELECT query: select \"id\", \"sid\", \"protocol_header\", \"data_header\", \"raw\", ROUND(EXTRACT(epoch FROM create_date)*1000) as create_date from \"hep_proto_100_default\" where \"sid\" in (?, ?) and \"create_date\" between ? and ?"}

I've been able to reproduce on local with a fresh setup: https://github.com/enzoqtvf/homer7-docker/tree/master/heplify-server/hom7-hep-prom-graf-view
(I would be happy to open a pull request to add it to your docker examples if you guys want it)
You can run the docker-compose up and then open that url:
http://localhost:9081/?from=1553629228&to=1553802028&callid=0c438bf9-65ef-4896-a5eb-a1072dc3afdd&tabs=messages,qos

And check network interaction you will see a 503 coming back from the homer web app

Let me know if you guys need any other indication :)

Thanks !

Catch Errors

Currently the App remains looping/loading when requests are failing.
@almukhametovd please implement error handling for failed Axios posts and print out the cause.

Feature: Allow message popup in Mermaid

We should experiment with clickable items in Mermaid, ie:

Link

 A(Start)-->B(Do some stuff); 
  B(Take some rest)-->C(do more);
  click B "http://www.github.com" "This is a link"

Function

 A(Start)-->B(Do some stuff); 
  B(Take some rest)-->C(do more);
  click B "javascript:alert('you clicked me!')" "This is a link"

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.