Skip to content

Commit

Permalink
Merge pull request #38 from SimCorp/develop
Browse files Browse the repository at this point in the history
Release 0.2.0
  • Loading branch information
hojelse authored Mar 30, 2021
2 parents fd73290 + 51364e8 commit 464ebb8
Show file tree
Hide file tree
Showing 19 changed files with 1,242 additions and 18,836 deletions.
1 change: 1 addition & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
NATS_URL=
28 changes: 28 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#se include a summary of the change and which issue it fixes. Please also include relevant motivation and context. List any dependencies that are required for this change. -->

# How was this tested?

<!-- Please describe the tests that you ran to verify your changes. Provide instructions, so we can reproduce. Please also list any relevant details for your test configuration. -->
* Step one etc.

# Type of change

Please check all boxes that apply to this change below.

| Type | Applies ✅|
| ------------------------ | :-------: |
| Backend | |
| Frontend | |
| Github/Ci/Admin | |
| Documentation required | |

# Checklist

Please follow the checklist below and check all completed items as you work on the PR.

I have..
- [ ] performed a self-review of my own code
- [ ] commented my code, particularly in hard-to-understand areas
- [ ] written documentation
- [ ] added automated tests
- [ ] merged dependencies to `develop
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ node_modules


# local env files
.env
.env.local
.env.*.local

Expand All @@ -16,6 +17,7 @@ pnpm-debug.log*
# Editor directories and files
.idea
.vscode
.ionide
*.suo
*.ntvs*
*.njsproj
Expand Down
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,18 @@
NATS Topology Visualiser is a visualization and monitoring tool for the open-source messaging system [NATS](https://github.com/nats-io).

## Development
### Dependancies
### Dependencies

- [.Net 5](https://dotnet.microsoft.com/download/dotnet/5.0)
- [Node.js and npm](https://nodejs.org/en/download/)

Install all further dependencies with `npm i -D`
### Setup

1. setup node packages by running `npm ci`

### Usage

1. Start backend with `dotnet run` from the sub directory `/backend/`
1. Compile and start backend with `npm run backend`

2. Serve front-end with `npm run serve` from the root directory `/`

Expand Down
28 changes: 0 additions & 28 deletions backend/Connection.cs

This file was deleted.

33 changes: 31 additions & 2 deletions backend/Controller.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
using static Microsoft.AspNetCore.Http.StatusCodes;
using backend.models;

namespace backend
{
Expand All @@ -20,9 +21,37 @@ public Controller()

[HttpGet]
[ProducesResponseType(Status200OK)]
public ActionResult<IEnumerable<Server>> Get()
public ActionResult<IEnumerable<Server>> GetVarz()
{
return Program.Servers;
return Program.servers;
}

[HttpGet("/connz")] //The route to the endpoint. Etc. localhost:5001/connz
[ProducesResponseType(Status200OK)]
public ActionResult<IEnumerable<Connection>> GetConnz()
{
return Program.connections;
}

[HttpGet("/routez")]
[ProducesResponseType(Status200OK)]
public ActionResult<IEnumerable<Route>> GetRoutez()
{
return Program.routes;
}

[HttpGet("/gatewayz")]
[ProducesResponseType(Status200OK)]
public ActionResult<IEnumerable<Gateway>> GetGatewayz()
{
return Program.gateways;
}

[HttpGet("/leafz")]
[ProducesResponseType(Status200OK)]
public ActionResult<IEnumerable<Leaf>> GetLeafz()
{
return Program.leafs;
}

}
Expand Down
Loading

0 comments on commit 464ebb8

Please sign in to comment.