Skip to content

kangasta/fdbk-data-display

Repository files navigation

fdbk-data-display

CI Deploy Maintainability Test Coverage

React app to display data provided by an API in fdbk statistics format. See fdbk/examples/net_status for an example.

Development

Getting stared

To get development server running on your machine, run:

# Install dependencies and start dev server
npm install
npm start

Before committing

The code is linted and unit tested with:

# Lint
npm run lint
# or
npm run lint -- --fix
# to also fix automatically fixable errors

# Unit test
npm test
# or
npm test -- --coverage
# to also get coverage analysis

To create production build:

# Build
npm run build

# Build with non-root public URL
echo 'PUBLIC_URL="/${path}/#/"' > .env
npm run build -- --public-url /${path}/

Interface Types

The fdbk interfaces are defined by JSONSchema documents in fdbk repository and converted to TypeScript definitions with json-schema-to-typescript. For example to create statistics types, cd into fdbk repository root and run:

json2ts fdbk/schemas/statistics-out.json > Statistics.ts
json2ts fdbk/schemas/topic.json > Topic.ts

Replace the file in src/Types with produced file.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages