An open API service indexing awesome lists of open source software.

https://github.com/redhatinsights/malware-detection-frontend

Frontend for the Insights Yara (aka: cautious-octo-garbanzo) Application
https://github.com/redhatinsights/malware-detection-frontend

Last synced: about 2 months ago
JSON representation

Frontend for the Insights Yara (aka: cautious-octo-garbanzo) Application

Awesome Lists containing this project

README

        

[![Build Status](https://app.travis-ci.com/RedHatInsights/malware-detection-frontend.svg?branch=master)](https://app.travis-ci.com/RedHatInsights/malware-detection-frontend)

# malware-detection-frontend

Malware Detection for Red Hat Insights products that includes Patternfly 4 and shared cloud.redhat.com utilities.

## Getting Started

There is a [comprehensive quick start guide in the Storybook Documentation](https://github.com/RedHatInsights/insights-frontend-storybook/blob/master/src/docs/welcome/quickStart/DOC.md) to setting up an Insights environment complete with:

- [Insights Chroming](https://github.com/RedHatInsights/insights-chrome)
- [Insights Proxy](https://github.com/RedHatInsights/insights-proxy)

Note: You will need to set up the Insights environment if you want to develop with the malware-detection-frontend app due to the consumption of the chroming service as well as setting up your global/app navigation through the API

## Developing

### First time setup
1. Make sure you have [`Node.js`](https://nodejs.org/en/) and [`npm`](https://www.npmjs.com/) installed
2. Run [script to patch your `/etc/hosts`](https://github.com/RedHatInsights/insights-proxy/blob/master/scripts/patch-etc-hosts.sh)
3. Make sure you are using [Red Hat proxy](http://hdn.corp.redhat.com/proxy.pac)
4. Clone this repository
5. Run ```npm install``` to install dependencies

### Running the application

1. ```npm run start```
- starts webpack bundler and serves the files with webpack dev server

OR

2. ```npm run start```
- with CI beta env

3. visit ```https://prod.foo.redhat.com:1337/insights/malware/```

### Testing

- `npm run verify` will run linters and tests
- Travis is used to test the build for this code
- You are always notified on failed builds
- You are only notified on successful builds if the build before it failed
- By default, both `push` events as well as `pull_request` events send notifications
- Travis is defaulted to notify #insights-bots
## Deploying

- The Platform team is using Travis to deploy the application
- The Platform team will help you set up the Travis instance if this is the route you are wanting to take

## Testing federated modules with another application

If you want to test Malware with another application deployed locally, you can utilise `LOCAL_APPS` environment variable and deploy the needed application on separate ports. To learn more about the variable, see https://github.com/RedHatInsights/frontend-components/tree/master/packages/config#running-multiple-local-frontend-applications.

### Example

We'll take for example [insights-inventory-frontend](https://github.com/RedHatInsights/insights-inventory-frontend).

Open new terminal, navigate to Inventory repository, and run it on a separate port without proxy:

```
npm run start -- --port=8003
```

In a separate terminal, run Malware with proxy enabled and list Inventory:

```
LOCAL_APPS=inventory:8003~http npm run start:proxy
```

## Running locally
Have [insights-proxy](https://github.com/RedHatInsights/insights-proxy) installed under PROXY_PATH (only necessary if your not using start:proxy)

```shell
SPANDX_CONFIG="./profiles/local-frontend.js" bash $PROXY_PATH/scripts/run.sh
```

Have [yara-backend](https://github.com/RedHatInsights/yara-backend) installed and run ```docker-compose up```