Skip to content

Commit 6cf3b59

Browse files
Merge pull request #154 from open-source-labs/dev
Dev
2 parents 2af93a7 + 2b247b0 commit 6cf3b59

File tree

107 files changed

+34094
-2394
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

107 files changed

+34094
-2394
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ coverage
88
__tests__/**/__snapshots__
99
# .env
1010
users.json
11+
test_users.json
1112

1213
# Compiled source #
1314
###################

README.md

Lines changed: 69 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,14 @@
77
![Build Passing](https://img.shields.io/badge/build-passing-blue)
88
[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](https://github.com/open-source-labs/Chronos)
99
![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)
10-
![Release: 5.1](https://img.shields.io/badge/Release-5.1-orange)
10+
![Release: 5.2](https://img.shields.io/badge/Release-5.1-orange)
1111

1212

1313
# Chronos
1414

1515
### :star: Star us on GitHub — it helps! :star:
1616

17-
Chronos is a comprehensive developer tool that monitors the health and web traffic of servers, microservices, and containers. Use Chronos to see real-time data monitoring and receive automated notifications over Slack or email.
17+
Chronos is a comprehensive developer tool that monitors the health and web traffic of servers, microservices, and containers. Use Chronos to see real-time data monitoring and receive automated notifications over Slack or email.
1818

1919
## Table of Contents
2020
- [Features](#features)
@@ -26,6 +26,7 @@ Chronos is a comprehensive developer tool that monitors the health and web traff
2626
- [Initialize Chronos Tracker](#initialize-chronos-tracker)
2727
- [Docker Configuration](#docker-configuration)
2828
- [Start Chronos](#start-chronos)
29+
- [Getting the Executable](#getting-the-chronos-executable)
2930
- [Notifications](#notifications)
3031
- [Slack](#slack)
3132
- [Email](#email)
@@ -35,43 +36,53 @@ Chronos is a comprehensive developer tool that monitors the health and web traff
3536
- [Microservices](#microservices)
3637
- [Docker](#docker)
3738
- [gRPC Branch](#grpc-branch)
39+
- [Splash Page](#chronoswebsite)
3840
- [Technologies](#technologies)
3941
- [License](#license)
4042

4143
#
42-
###### Return to [Top](#Chronos)
44+
###### Return to [Top](#chronos)
4345
<br>
4446

45-
## <img src ="./app/assets/fire.png" height=22 > New Features <img src ="./app/assets/fire.png" height=24>
46-
47-
- New UI Features
48-
- Developed search bar functionality to filter displayed databases
49-
- Login system for user authentication
50-
- Any errored connections will now show on the bell icon
51-
- Notification bell will update in real time
47+
## <img src ="./app/assets/fire.png" height=22 > What's New? <img src ="./app/assets/fire.png" height=24>
48+
49+
- New Feature
50+
- Chronos now comes in any OS .exe!
51+
- Overhauled Features
52+
- Authentication Enabling with Bcrypt
53+
- Stand-up times decreased
54+
- Side-by-side Server Comparisons
55+
- Color-hashing generates unique colors for each server connection
56+
- Improved navigation bar and buttons
57+
- Increased overall speed and responsiveness
58+
- Updated Features
59+
- Added React Testing Library
60+
- Removed Spectron and Enzyme
61+
- Added testing suites for unit, integration, and end-to-end testing
62+
- Refactored components for dependency injection
5263
- Bug Fixes
53-
- Fixed database icons to show the correct icon
64+
- Authentication now functioning properly
5465
## Features
5566

5667
- Distributed tracing enabled across microservices applications
5768
- Compatible with <img src="./app/assets/graphql-logo-color.png" alt="GraphQL" title="GraphQL" align="center" height="20" /></a>
58-
- Provides <a href="#"><img src="./app/assets/docker-logo-color.png" alt="Docker" title="Docker" align="center" height="20" /></a> container stats (e.g. ID, memory usage %, CPU usage %, running processes, etc.)
5969
- Supports <a href="#"><img src="./app/assets/postgres-logo-color.png" alt="PostgreSQL" title="PostgreSQL" align="center" height="20" /></a> and <img src="./app/assets/mongo-logo-color.png" alt="MongoDB" title="MongoDB" align="center" height="20" /></a> databases
6070
- Displays real-time temperature, speed, latency, and memory statistics
71+
- Display and compare multiple microservice metrics in a single graph
6172
#
62-
###### Return to [Top](#Chronos)
73+
###### Return to [Top](#chronos)
6374
<br>
6475

6576
## Demo
6677

67-
<a href="#"><img src="./app/assets/Chronos-Demo.gif" alt="Chronos-Demo" title="Chronos-Demo" align="center" height="500" /></a></a>
78+
<a href="#"><img src="./app/assets/enable_sign_up.gif" alt="Chronos-Demo" title="Chronos-Demo" align="center" height="500" /></a></a>
6879

6980
#
70-
###### Return to [Top](#Chronos)
81+
###### Return to [Top](#chronos)
7182
<br>
7283

7384
## Installation
74-
This is for the latest Chronos version **5.1 release and later**.
85+
This is for the latest Chronos version **5.2 release and later**.
7586

7687
- Stable release: 6.1.0
7788
- LTS release: 6.1.0
@@ -86,6 +97,22 @@ in the root directory.
8697
If you're installing Chronos into a microservices application, and you have different folders for each microservice, make sure you also run
8798
```npm rebuild```
8899
in each microservices folder **after you roll back to version 14.16.1.**
100+
101+
**If you wish to launch the Electron Application in an WSL2 envirronment(Ubuntu) you may need the following commands for an Electron window to appear**
102+
103+
- Install <a href='https://sourceforge.net/projects/vcxsrv/'>VcXsrv</a>
104+
105+
- Run the following command in the terminal
106+
107+
```
108+
sudo apt install libgconf-2-4 libatk1.0-0 libatk-bridge2.0-0 libgdk-pixbuf2.0-0 libgtk-3-0 libgbm-dev libnss3-dev libxss-dev
109+
```
110+
111+
- After running your VcXsrv instance, run the following command in the terminal
112+
```
113+
export DISPLAY="`sed -n 's/nameserver //p' /etc/resolv.conf`:0"
114+
```
115+
89116
<br>
90117

91118
### Install Dependencies
@@ -106,7 +133,7 @@ const chronos = require('chronos-tracker');
106133

107134
chronos.use({
108135
microservice: 'payments',
109-
interval: 2000,
136+
interval: 5000,
110137
dockerized: true,
111138
database: {
112139
connection: 'REST',
@@ -119,14 +146,16 @@ chronos.use({
119146

120147
The `microservice` property takes in a string. This should be the name of your server or microservice. For **Docker** containers, the name of the microservice should be the same as the name of the corresponding Docker container.
121148

122-
The `interval` property is optional and takes in an integer. This controls the Chronos monitoring frequency. If this is omitted, Chronos will defualt to recording server health every 2000 ms or 2 seconds.
149+
The `interval` property is optional and takes in an integer. This controls the Chronos monitoring frequency. If this is omitted, Chronos will default to recording server health every 60000 ms or 60 seconds.
123150

124151
The `dockerized` property is optional and should be specified as `true` if the server is running inside of a Docker container. Otherwise, this should be `false`. If omitted, Chronos will assume this server is not running in a container.
125152

126153
The `database` property is required and takes in the following:
127-
- `connection` which should be a string and only supports 'REST' and 'gRPC'
128-
- `type` which should be a string and only supports 'MongoDB' and 'PostgreSQL'.
129-
- `URI` which should be a connection string the database you intend Chronos to write and record data regarding health, HTTP route tracing, and container infomation to. A `.env` is recommended.
154+
- `connection` should be a string and only supports 'REST' and 'gRPC'
155+
- `type` should be a string and only supports 'MongoDB' and 'PostgreSQL'.
156+
- `URI` should be a connection string to the database where you intend Chronos to write and record data regarding health, HTTP route tracing, and container infomation.
157+
158+
_NOTE: A `.env` is recommended._
130159

131160
<!-- - `isDockerized`: Is this microservice running in a Docker container? Enter `yes` or `no`. The current default setting is `no`.
132161
- <img src="./app/assets/important.png" alt="Important" title="Important" align="center" height="20" /></a> When starting up the container, give it the same name that you used for the microservice, because the middleware finds the correct container ID of your container by matching the container name to the microservice name you input as 1st argument.
@@ -179,7 +208,7 @@ Wherever you create an instance of your server (see example below),
179208
console.log("Server running at http://127.0.0.1:30044");
180209
});
181210
```
182-
you will also need to require Chronos-tracker, Chronos-config, and dotenv.config(if this is used). For health data simply use Chronos.track()
211+
you will also need to require Chronos-tracker, Chronos-config, and dotenv.config(if this is used). For health data, simply use Chronos.track()
183212

184213

185214

@@ -211,7 +240,7 @@ const bookClient = new OrderToBookService('localhost:30044', grpc.credentials.cr
211240

212241
const ClientWrapper = chronos.ClientWrapper(bookClient, OrderToBookService);
213242
```
214-
Next wrap the gRPC server using Chronos
243+
Next wrap the gRPC server using Chronos
215244
```js
216245

217246
const ServerWrapper = chronos.ServerWrapper(server, Proto.protoname.service, {
@@ -230,7 +259,7 @@ Next wrap the gRPC server using Chronos
230259
callback(null, {});
231260
},
232261
});
233-
})
262+
234263
```
235264
For any request you wish to trace, require uuidv4 and write the following code where the initial gRPC request begins,
236265
```js
@@ -241,7 +270,7 @@ const createMeta = () => {
241270
return meta
242271
}
243272
```
244-
and then invoke createMeta as a third argument to any client method that is the beginning of the request path.
273+
and then, invoke createMeta as a third argument to any client method that is the beginning of the request path.
245274

246275
```js
247276
orderClient.AddOrder(
@@ -269,9 +298,9 @@ chronos.link(client, ServerWrapper);
269298

270299
Again, this step is **only applicable** if you are currently using <a href="#"><img src="./app/assets/docker-logo-color.png" alt="Docker" title="Docker" align="center" height="20" /></a> containers for your microservices.
271300

272-
<a href="#"><img src="./app/assets/important.png" alt="Important" title="Important" align="center" height="20" /></a> Give your containers the same names you pass as arguments for microservice names.
301+
<a href="#"><img src="./app/assets/important.png" alt="Important" title="Important" align="center" height="20" /></a> Give your containers the same names you pass in as arguments for microservice names.
273302

274-
<a href="#"><img src="./app/assets/important.png" alt="Important" title="Important" align="center" height="20" /></a> In order to have container stats saved to your database, along with other health info, bind volumes to this path when starting up the containers:
303+
<a href="#"><img src="./app/assets/important.png" alt="Important" title="Important" align="center" height="20" /></a> In order to have container statistics saved to your database along with other health info, bind volumes to this path when starting up the containers:
275304
```
276305
/var/run/docker.sock
277306
```
@@ -290,10 +319,13 @@ volumes:
290319

291320
### Start Chronos
292321

293-
Once you have configured and intialized Chronos Tracker, it will be automatically recording monitoring data when your servers are running. Finally, start the Chronos desktop app to view that data! After cloning our [GitHub repo](https://github.com/open-source-labs/Chronos), run `npm install` and `npm run both` to start Chronos. Alternatively, you can download an [executable for Mac](https://chronoslany.com/Chronos.dmg). Add your application in the Chronos app dashboard with the same URI you used in your Chronos Tracker configuration. Click on it and start monitoring!
322+
Once you have configured and intialized Chronos Tracker, it will automatically record monitoring data when your servers are running. Finally, start the Chronos desktop app to view that data! After cloning our [GitHub repo](https://github.com/open-source-labs/Chronos), run `npm install` and `npm run both` to start Chronos.
323+
324+
### Getting the Chronos Executable
325+
At the current moment, to get a copy of the executable that works on all OS, the steps are 1) clone the master branch, 2) run `npm i`, 3) run `npm run prepareDist`, 4) run `npm run package-any`, 5) navigate in your Chronos folder `./release-builds/resources` and click on `chronos.exe`. 6) optionally right click to create a shortcut.
294326

295327
#
296-
###### Return to [Top](#Chronos)
328+
###### Return to [Top](#chronos)
297329
<br>
298330

299331
## Notifications
@@ -351,7 +383,7 @@ notifications: [
351383
// ...
352384
```
353385
#
354-
###### Return to [Top](#Chronos)
386+
###### Return to [Top](#chronos)
355387
<br>
356388

357389
## Branches
@@ -388,10 +420,11 @@ Refer to the [README](link) in the `docker` folder for more details.
388420
### gRPC Branch
389421
The **'gRPC'** branch is the current codebase for the <a href="#"><img src="./app/assets/npm-logo-color.png" alt="NPM" title="NPM" align="center" height="20" /></a> package, which is what you will install in your own application in order to use Chronos. Download the <a href="#"><img src="./app/assets/npm-logo-color.png" alt="NPM" title="NPM" align="center" height="20" /></a> package [here](https://www.npmjs.com/package/chronos-tracker).
390422

391-
<br>
423+
## chronosWebsite
424+
This is the branch that holds the code base for the splash page. Edit the website by first running `git clone -b chronosWebsite https://github.com/open-source-labs/Chronos.git .` and then updating the aws S3 bucket with the changes.
392425

393426
#
394-
###### Return to [Top](#Chronos)
427+
###### Return to [Top](#chronos)
395428
<br>
396429

397430
## Technologies
@@ -418,22 +451,22 @@ The **'gRPC'** branch is the current codebase for the <a href="#"><img src="./ap
418451
- <a href="#"><img src="./app/assets/plotly-logo-color.png" alt="Plotly.js" title="Plotly.js" align="center" height="30" /></a>
419452

420453
#
421-
###### Return to [Top](#Chronos)
454+
###### Return to [Top](#chronos)
422455
<br>
423456

424457

425458
## Contributing
426459

427-
Development of Chronos is open source on GitHub through the tech accelerator umbrella OS Labs, and we are grateful to the community for contributing bugfixes and improvements. Read below to learn how you can take part in improving Chronos.
460+
Development of Chronos is open source on GitHub through the tech accelerator umbrella OS Labs, and we are grateful to the community for contributing bug fixes and improvements. Read below to learn how you can take part in improving Chronos.
428461

429462
- [Contributing](https://github.com/oslabs-beta/Chronos/blob/master/CONTRIBUTING.md)
430463
#
431-
###### Return to [Top](#Chronos)
464+
###### Return to [Top](#chronos)
432465
<br>
433466

434467

435468
## License
436469

437470
Chronos is <a href="#"><img src="./app/assets/mit-logo-color.png" alt="MIT" title="MIT" align="center" height="20" /></a> [licensed.](https://github.com/oslabs-beta/Chronos/blob/master/LICENSE.md)
438471
#
439-
###### Return to [Top](#Chronos)
472+
###### Return to [Top](#chronos)

This is the Command for the window

Lines changed: 0 additions & 1 deletion
This file was deleted.

__tests__/app/App.test.tsx

Lines changed: 0 additions & 25 deletions
This file was deleted.

__tests__/app/charts/DockerChart.test.tsx

Lines changed: 0 additions & 83 deletions
This file was deleted.

__tests__/app/charts/LatencyChart.test.tsx

Lines changed: 0 additions & 3 deletions
This file was deleted.

0 commit comments

Comments
 (0)