Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding our merge from oslab-beta/master to open-source-labs/dev #149

Merged
merged 1,190 commits into from
Mar 9, 2022
Merged
Show file tree
Hide file tree
Changes from 36 commits
Commits
Show all changes
1190 commits
Select commit Hold shift + click to select a range
20a5611
Display SConfirmation on Frontend After Clicking Button
mjiang108 Jan 20, 2021
b4dd7fe
Rename files, variable names
mjiang108 Jan 20, 2021
ee2c59b
Merge pull request #8 from mattljiang/gRPC_Example
DerekQuoc Jan 20, 2021
eb2969c
add gRPC Status Codes Chart
kitloong1 Jan 20, 2021
f3da75b
Update pull_request_template.md
mjiang108 Jan 20, 2021
a17572e
turn off showlegend
kitloong1 Jan 20, 2021
5de16b7
Merge branch 'dev' into grpc-charts
kitloong1 Jan 20, 2021
5ad42bd
Horus implementation incomplete
hodesza Jan 21, 2021
e947229
Horus implementation
hodesza Jan 21, 2021
705a755
fix filenames bookClient.js and reverseProxy.proto
kitloong1 Jan 21, 2021
ee9f271
resolve merge conflicts
mjiang108 Jan 21, 2021
83e67f5
Set Up Client and Server Wrappers
mjiang108 Jan 21, 2021
b259bb9
client sends metadata to server when unwrapped, but not when wrapped
mjiang108 Jan 21, 2021
b60c142
Try Adding Metadata to Client Wrapper
mjiang108 Jan 21, 2021
79b915f
Try Adding Metadata to Client Wrapper (git add all files this time)
mjiang108 Jan 21, 2021
f4d517f
Horus is still in progress
hodesza Jan 21, 2021
c9fb90b
send id from bookClient to bookServer
mjiang108 Jan 21, 2021
a2ef87f
alter data in RouteChart
kitloong1 Jan 22, 2021
4876207
Client wrapper only send md in reverseproxy server
hodesza Jan 23, 2021
d5d303c
Merge branch 'Horus' of https://github.com/hodesza/Chronos into Horus
mjiang108 Jan 23, 2021
6199949
create metadata in reverseProxyServer and pass as parameter to wrappe…
mjiang108 Jan 23, 2021
fc0afea
gRPC Metadata Propagates Until End
mjiang108 Jan 23, 2021
dbaf1c9
add horus clientwrapper file to previous commit
mjiang108 Jan 23, 2021
c0d0fea
clean up clientwrapper
mjiang108 Jan 23, 2021
174c945
Update .gitignore
mjiang108 Jan 27, 2021
c114ae6
minor fix: add missing bracket
mjiang108 Jan 27, 2021
2b8c435
Revamp NPM package file structure
DerekQuoc Jan 27, 2021
12f9354
Merge pull request #10 from mattljiang/dev
mjiang108 Jan 27, 2021
3b7daf6
Add client and server wrappers
DerekQuoc Jan 28, 2021
9e006e3
intial setup for logsTable
kitloong1 Jan 29, 2021
4ab67b6
Update gRPC example wrappers
DerekQuoc Jan 29, 2021
1007701
Darkmode implemented
hodesza Jan 29, 2021
2e46077
Update comments in example servers
DerekQuoc Jan 29, 2021
e027335
test with hard corded data
kitloong1 Jan 29, 2021
f57bd71
fix hardcorded data to correct data type
kitloong1 Jan 29, 2021
e3a04de
Start PostgreSQL gRPC support
DerekQuoc Jan 29, 2021
9edeffa
Connect client wrapper to MongoDB
DerekQuoc Jan 30, 2021
806a325
works with data from mongodb
kitloong1 Jan 30, 2021
afa9431
Finished Dark/Light Mode Implementation
hodesza Jan 30, 2021
5ffe33c
Merge branch 'dev' into UI
hodesza Jan 30, 2021
3955c05
Trace Server Response
DerekQuoc Jan 30, 2021
449a96c
change connectMongoose to close old connection before making new conn…
mjiang108 Jan 30, 2021
3dafd3d
commit before switching to website branch
kitloong1 Jan 30, 2021
f0a2d5f
Fixed Dashboard Context
hodesza Feb 1, 2021
f2857bd
Updated App Instructions
hodesza Feb 1, 2021
96742e8
Test in progress of UI
hodesza Feb 1, 2021
567115b
Testing for Settings Component
hodesza Feb 2, 2021
43271f6
initial test add gRPCLogsTable
kitloong1 Feb 2, 2021
8fc170c
commit to fix electron issue
kitloong1 Feb 2, 2021
42a165a
Merge pull request #11 from hodesza/UI
mjiang108 Feb 2, 2021
75448cc
Merge pull request #14 from mattljiang/mongoose-reopen-connection
hodesza Feb 2, 2021
1496aa6
commit before pulling from dev
kitloong1 Feb 2, 2021
a8eaf8f
Update client tracing for gRPC
DerekQuoc Feb 2, 2021
e2122ca
Write server response trace to PostgreSQL support
DerekQuoc Feb 2, 2021
70620d3
Refactor gRPC examples
DerekQuoc Feb 2, 2021
876d304
Merge dev branch into npm_package branch
DerekQuoc Feb 2, 2021
a94e508
Cleanup code
DerekQuoc Feb 3, 2021
c841a3d
add GRPCCommunicationsModel.ts
kitloong1 Feb 3, 2021
4192dd2
GRPCStatusCodesChart works pointing to GRPCCommunicationModel.ts
kitloong1 Feb 3, 2021
6ef13de
Merge branch 'dev' into Static_files
hodesza Feb 3, 2021
23cdfed
switch back to one unified CommunicationModel
kitloong1 Feb 3, 2021
d4a986b
fix ResponseCodesChart
kitloong1 Feb 3, 2021
db8760f
Combine functionality of MongoDB models
DerekQuoc Feb 3, 2021
d1cb6e0
Health Data Corrected
hodesza Feb 3, 2021
4145e9d
finish ResponseCodesChart and RequestTypesChart
kitloong1 Feb 3, 2021
01cdfe9
merged from dev
kitloong1 Feb 3, 2021
aa12d69
merge logs and charts
kitloong1 Feb 3, 2021
17a7709
make PR
kitloong1 Feb 3, 2021
1c60b6c
remove unused icons from sidebar
mjiang108 Feb 3, 2021
1e3591c
change color scheme
mjiang108 Feb 3, 2021
cd8ac9d
Merge pull request #17 from DerekQuoc/npm_package
kitloong1 Feb 3, 2021
16db5d9
Reimplement health tracking in gRPC examples
DerekQuoc Feb 3, 2021
7b08a1b
change package-lock.json
kitloong1 Feb 3, 2021
13f65f2
remove unused files
kitloong1 Feb 3, 2021
6dbdc6d
remove dummy data
kitloong1 Feb 3, 2021
ef5b3ba
Merge branch 'logsandcharts' of https://github.com/kitloong1/Chronos …
hodesza Feb 3, 2021
76d1c7f
fix minor bugs
kitloong1 Feb 3, 2021
36d3205
Changed imports
hodesza Feb 3, 2021
6f0ff63
Merge branch 'kitloong1-logsandcharts' into dev
kitloong1 Feb 3, 2021
ab9bdc3
resolve merge conflicts
kitloong1 Feb 3, 2021
68b5239
Merge pull request #19 from kitloong1/logsandcharts
DerekQuoc Feb 3, 2021
23cdf7c
Resolved compile issues
hodesza Feb 3, 2021
5dd2aea
Merge branch 'dev' into Health
hodesza Feb 3, 2021
c54bffb
Merge branch 'dev' into styling
mjiang108 Feb 3, 2021
9961162
Update Main ReadMe.md
hodesza Feb 3, 2021
e19371d
Merge branch 'dev' into Static_files
hodesza Feb 3, 2021
51923b9
change settings css
mjiang108 Feb 3, 2021
9b7bcff
change color scheme for dark mode, change sidebar color
mjiang108 Feb 3, 2021
4a00482
Update README
hodesza Feb 3, 2021
4266ae8
update dark mode for copyright on settings page
mjiang108 Feb 3, 2021
8b39aa8
Merge pull request #13 from hodesza/Static_files
DerekQuoc Feb 3, 2021
96bf622
add back About and Contact page
mjiang108 Feb 3, 2021
03f2b22
Merge branch 'dev' into Health
hodesza Feb 3, 2021
a6e359d
Merge pull request #21 from hodesza/Health
mjiang108 Feb 4, 2021
a32206b
Improve gRPC examples
DerekQuoc Feb 4, 2021
46414e7
add dark mode for Contact and About
mjiang108 Feb 4, 2021
f42ca77
Update NPM package for REST examples
DerekQuoc Feb 4, 2021
f015788
Clean codebase of consoles and unnecessary
hodesza Feb 4, 2021
99fcbd4
Progress Update Readme
hodesza Feb 4, 2021
3c89556
Merge branch 'dev' into styling
mjiang108 Feb 4, 2021
06f4738
move copyright text
mjiang108 Feb 4, 2021
ebcda7c
Merge pull request #20 from mattljiang/styling
mjiang108 Feb 4, 2021
29446cb
Merge branch 'dev' of https://github.com/oslabs-beta/Chronos into dev
hodesza Feb 4, 2021
cb9bc14
Fix buttons layout issue #9
DerekQuoc Feb 4, 2021
e6fd01c
Clean up code
DerekQuoc Feb 4, 2021
0c41f92
Merge pull request #22 from hodesza/Health
DerekQuoc Feb 4, 2021
a3cabea
Merge gRPC example cleanup with dev
DerekQuoc Feb 4, 2021
65021f6
Merge pull request #23 from DerekQuoc/npm_package
kitloong1 Feb 4, 2021
6c3f2f5
Update README.md
mjiang108 Feb 4, 2021
019ebdb
Update README.md
mjiang108 Feb 4, 2021
34c7552
Update README.md
mjiang108 Feb 4, 2021
e0bd0c4
Update README.md
mjiang108 Feb 4, 2021
db04583
Testing not implemented
hodesza Feb 4, 2021
1de8274
Main Container testing implementation
hodesza Feb 4, 2021
96e4643
Remove implementation of main container testing
hodesza Feb 4, 2021
2594c53
Merge pull request #65 from oslabs-beta/dev
DerekQuoc Feb 4, 2021
0e86ed3
Remove console.logs and imports
hodesza Feb 4, 2021
d02272b
Update info on chronos.ServerWrapper functionality
hodesza Feb 4, 2021
7a54343
Add function comments for gRPC
DerekQuoc Feb 24, 2021
52451b9
Merge pull request #77 from DerekQuoc/comments
mjiang108 Feb 24, 2021
c64a141
update package-lock
brunoportela Apr 19, 2021
a593dbd
Merge pull request #1 from brunoportela/master
brunoportela Apr 19, 2021
395e69a
complete search functionality
brunoportela Apr 20, 2021
6398f46
Merge pull request #2 from brunoportela/searchFunc
brunoportela Apr 20, 2021
ee1ba38
Fix card info display - DB icons and Timestamp
brunoportela Apr 20, 2021
72334ba
Merge pull request #3 from brunoportela/sql-mongo-icon
J-DannyMartinez Apr 20, 2021
d71f3a0
update patches and minor changes / update style-loader MAJOR change
brunoportela Apr 22, 2021
4c77b31
mongoose conflict fix after typescript update
brunoportela Apr 22, 2021
92b3ced
upgrade [email protected] - MAJOR
brunoportela Apr 22, 2021
296e362
upgrade @grpc/[email protected]
brunoportela Apr 22, 2021
7b3cfd3
upgrade @types/[email protected]
brunoportela Apr 22, 2021
c71f21a
upgrade styled-components
brunoportela Apr 23, 2021
c601701
upgrade [email protected] - MAJOR
brunoportela Apr 23, 2021
fdbd1ed
upgrade [email protected]
brunoportela Apr 23, 2021
1db92fc
upgrade [email protected] - MAJOR
brunoportela Apr 23, 2021
dbce60e
upgrade [email protected]
brunoportela Apr 23, 2021
dbc916b
upgrade [email protected]
brunoportela Apr 23, 2021
ee67097
upgrade [email protected] - MAJOR
brunoportela Apr 24, 2021
9836a17
upgrade [email protected] - MAJOR
brunoportela Apr 24, 2021
1818fa2
upgrade [email protected] - MAJOR
brunoportela Apr 24, 2021
57e90ba
upgrade [email protected] - MAJOR
brunoportela Apr 24, 2021
7d2ae1b
upgrade [email protected] - MAJOR
brunoportela Apr 24, 2021
6bc85e2
upgrade @types/[email protected] @types/[email protected]
brunoportela Apr 26, 2021
e22be3c
upgrade [email protected]
brunoportela Apr 26, 2021
e0870e6
Merge pull request #4 from brunoportela/node_migration
brunoportela Apr 27, 2021
75d1934
display notification
brunoportela Apr 29, 2021
d526aa0
Merge pull request #5 from brunoportela/notification
brunoportela Apr 29, 2021
ba41cfb
to commit login changes
Apr 29, 2021
4bc13ec
to commit changes made in Home for frontLogin
Apr 29, 2021
2cea7fb
to commit login frontend changes
Apr 29, 2021
bee62ea
Merge pull request #7 from tngraves/frontLogin
J-DannyMartinez Apr 29, 2021
071f27e
to commit changes LoginContext
May 6, 2021
c60218a
to commit Home changes
May 6, 2021
bb38c1d
live update and display notifications based on last viewed database
brunoportela May 10, 2021
bf6a05b
code cleanup and clickedAt starting point
brunoportela May 11, 2021
d0d19e9
Merge pull request #9 from brunoportela/notificationAdjusts
brunoportela May 11, 2021
63de853
to commit live update and cleanup changes
May 11, 2021
2d6b3ab
logout button and new logged in modal
May 11, 2021
3076e64
logout button and a new logged in modal
May 11, 2021
1af3dac
Merge pull request #11 from tngraves/logOut
J-DannyMartinez May 11, 2021
2131ec4
Update package.json to have WSL compatibility
J-DannyMartinez May 11, 2021
d42550b
Login capabilities in Login Context not fully implemented
May 11, 2021
a482849
to commit changes to login context
May 11, 2021
f31d158
Update new features, node version in README
J-DannyMartinez May 11, 2021
e26dc15
Update Chronos version
J-DannyMartinez May 11, 2021
d38a700
Fix Chronos version
J-DannyMartinez May 11, 2021
31226ec
Merge pull request #12 from tngraves/logOut
J-DannyMartinez May 11, 2021
bc4b786
Update WSL compatibility
J-DannyMartinez May 11, 2021
56e172e
Merge pull request #13 from J-DannyMartinez/cleanup
J-DannyMartinez May 11, 2021
6ae2c8e
Update README.md
J-DannyMartinez May 11, 2021
85d8d91
Merge pull request #14 from oslabs-beta/J-DannyMartinez-patch-1
J-DannyMartinez May 11, 2021
2fb7114
Merge pull request #90 from oslabs-beta/master
J-DannyMartinez May 11, 2021
e4f2596
Update README.md
J-DannyMartinez May 12, 2021
bf8b4b1
Merge pull request #15 from open-source-labs/master
J-DannyMartinez May 12, 2021
e49fef3
Electron About section is updated
Nachiket1 May 13, 2021
b72427e
Merge branch 'master' into About
Nachiket1 May 13, 2021
1bfb974
Merge pull request #16 from Nachiket1/About
J-DannyMartinez May 13, 2021
6f93259
Merge pull request #95 from oslabs-beta/master
J-DannyMartinez May 13, 2021
b7ddb32
Updated package.json and package-lock.json
jessllee Feb 15, 2022
25cb026
Removed edits regarding M1 chip in README.
jessllee Feb 15, 2022
5baa5e7
fixed sidebar bug
williamowen65 Feb 15, 2022
103c7bb
got rid of dashboard button
williamowen65 Feb 15, 2022
bdffec8
created graph navigation
williamowen65 Feb 15, 2022
39270b1
Updated About, Applications, Contact, Header in components.
jessllee Feb 15, 2022
be7481e
Updated Applications.
jessllee Feb 15, 2022
3d09bec
Updated Applications.
jessllee Feb 15, 2022
ffe22fd
dynamic graphs with nav
williamowen65 Feb 15, 2022
040e3a6
Updated Contact in components.
jessllee Feb 15, 2022
e3d9f22
Merge pull request #1 from oslabs-beta/kirk_jessica/force_signup
williamowen65 Feb 15, 2022
4238ab1
Merge branch 'dev' of https://github.com/oslabs-beta/Chronos into UI/…
williamowen65 Feb 15, 2022
3c5dfdf
merged and fixed style issue.... FlexDirection capitalization
williamowen65 Feb 15, 2022
a147a3e
graph sizing work
williamowen65 Feb 16, 2022
a769b7c
Cleaned up LoginContext.tsx
jessllee Feb 16, 2022
fd31209
Cleaned up linting errors in ApplicationContext, CommsContext, Docker…
jessllee Feb 16, 2022
4357cc2
resize graphs on window resize
williamowen65 Feb 16, 2022
52bebb1
fixed nav bar (position)
williamowen65 Feb 16, 2022
813cbc3
Fixed more linting errors in components(Applications, Contact, Occupi…
jessllee Feb 16, 2022
8f8ee92
Fixing even more linting errors in containers(DashboardContainer, Sid…
jessllee Feb 16, 2022
8d23c38
titlebar position
williamowen65 Feb 16, 2022
300cbed
Created new files(FirstLaunch, LandingPageContainer). Attempting to c…
jessllee Feb 17, 2022
76f78d3
zindex on topbar
williamowen65 Feb 17, 2022
9094753
new pakcages
williamowen65 Feb 17, 2022
d94ae66
chart details
williamowen65 Feb 17, 2022
5d73078
attempting to get logic for titleBar min max and close
williamowen65 Feb 17, 2022
c194eff
Added functionality to title bar
williamowen65 Feb 17, 2022
27af7e1
titlebar Styles
williamowen65 Feb 17, 2022
fbf9cb1
Merge pull request #2 from oslabs-beta/UI/UX_Merge
jessllee Feb 17, 2022
9e73c6d
Successfully merged with UI/ux merge branch
jessllee Feb 17, 2022
507b7c6
Additional merge conflicts resolved in DashboardContainer, MainContai…
jessllee Feb 17, 2022
0c7342c
Linting error in Main.ts: moved import dashboard and import data up b…
jessllee Feb 17, 2022
27322b6
Merge pull request #3 from oslabs-beta/kirk_jessica/merge_attempt_wit…
astholden Feb 17, 2022
bd0bc2e
Search bar and topBar styles
williamowen65 Feb 17, 2022
34d5b92
Merge pull request #5 from oslabs-beta/topbarStyles
astholden Feb 22, 2022
0637df8
Saving before pull
Justinlkirk Feb 22, 2022
90b240a
Fixed merge conflicts
Justinlkirk Feb 22, 2022
c96e232
Got the redirect routes finished
Justinlkirk Feb 23, 2022
d09ad2c
Finished the login, sign up, awaiting approval, and admin creation pages
Justinlkirk Feb 24, 2022
77a783b
Got everything but automatic refreshing finished
Justinlkirk Feb 24, 2022
dd66094
saving before pull
Justinlkirk Feb 25, 2022
08d511c
Fixed all the typescript errors
Justinlkirk Feb 25, 2022
eb5dd99
Merge pull request #8 from oslabs-beta/fixing_ts
williamowen65 Feb 25, 2022
b122e44
Quick update
Justinlkirk Feb 26, 2022
bddd512
Merge branch 'quick_fix' of https://github.com/oslabs-beta/Chronos in…
williamowen65 Feb 26, 2022
8a974fb
temp chart fix
williamowen65 Feb 28, 2022
59c397d
SQL FIX
williamowen65 Feb 28, 2022
64eb649
multi select on start
williamowen65 Mar 1, 2022
35d93da
delete btn application styles
williamowen65 Mar 1, 2022
850bfb4
Finishing touches on login, signup, and profile
Justinlkirk Mar 1, 2022
9836fc4
semi colon
williamowen65 Mar 3, 2022
a395c81
Merge pull request #10 from oslabs-beta/fixing_login_freeze
astholden Mar 3, 2022
a8676c4
Merge branch 'dev' into graph-work
williamowen65 Mar 3, 2022
0891d9a
Merge branch 'graph-work' into dev
williamowen65 Mar 3, 2022
cde99fe
Merge pull request #12 from oslabs-beta/dev
williamowen65 Mar 3, 2022
b43bb71
Quick commit before pull
Justinlkirk Mar 4, 2022
5d8b9d5
npm run prepare now copies assets over
williamowen65 Mar 5, 2022
3f257cc
new scripts
williamowen65 Mar 5, 2022
aa41de3
executable works mostly works, with a few minor bugs.
williamowen65 Mar 7, 2022
271e3fe
added script
williamowen65 Mar 7, 2022
17ea16c
Added dependency injection
Justinlkirk Mar 7, 2022
ca86edb
Updated package json for readability
Justinlkirk Mar 7, 2022
07d447e
Finalized dependency injections schema
Justinlkirk Mar 7, 2022
dbfb74e
Finished testings suites on several components
Justinlkirk Mar 8, 2022
0001664
Merge branch 'master' into kirk/backend_testing
Justinlkirk Mar 8, 2022
a52eecf
Merge pull request #13 from oslabs-beta/kirk/backend_testing
astholden Mar 8, 2022
8e6dbb2
del svg
williamowen65 Mar 8, 2022
d909615
Co-authored-by: Justin Kirk <[email protected]>
williamowen65 Mar 8, 2022
df11d27
ready to share
williamowen65 Mar 8, 2022
1ddc77b
Merge pull request #15 from oslabs-beta/exe.testing_merge
Justinlkirk Mar 8, 2022
8268ad7
Merge pull request #144 from oslabs-beta/master
jessllee Mar 8, 2022
2af93a7
Delete users.json
Justinlkirk Mar 8, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 30 additions & 2 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
{
"globals": {
"NodeJS": true,
"JSX": true,
"Electron": true
},
"plugins": ["react", "prettier"],
"parser": "babel-eslint",
"parserOptions": {
Expand All @@ -16,6 +21,7 @@
},
"extends": ["airbnb", "eslint:recommended", "plugin:react/recommended", "prettier"],
"rules": {
"react/display-name": "off",
"prettier/prettier": "error",
"no-unused-vars": [
"warn",
Expand All @@ -35,6 +41,28 @@
"react/no-array-index-key": "warn",
"no-restricted-syntax": "off",
"guard-for-in": "off",
"no-param-reassign": "off"
"no-param-reassign": "off",
"import/extensions": [
"error",
"ignorePackages",
{
"js": "never",
"jsx": "never",
"ts": "never",
"tsx": "never",
"mjs": "never"
}
]
},
"settings": {
"import/extensions": [".js", ".mjs", ".jsx", ".ts", ".tsx"],
// "import/parsers": {
// "@typescript-eslint/parser": [".ts", ".tsx"]
// },
"import/resolver": {
"node": {
"extensions": [".js", ".jsx", ".ts", ".tsx"]
}
}
}
}
}
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -44,5 +44,4 @@ __tests__/**/__snapshots__
.Spotlight-V100
.Trashes
ehthumbs.db
Thumbs.db

Thumbs.db
1 change: 1 addition & 0 deletions app/assets/search.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
31 changes: 26 additions & 5 deletions app/charts/LatencyChart.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,35 @@
import React, { useContext } from 'react';
import React, { useContext, useEffect, useState } from 'react';
import Plot from 'react-plotly.js';
import { HealthContext } from '../context/HealthContext';
import { all, solo as soloStyle } from './sizeSwitch';

const LatencyChart = React.memo(() => {
interface GraphsContainerProps {
sizing: string;
}

interface SoloStyles {
height: number;
width: number;
}

const LatencyChart: React.FC<GraphsContainerProps> = React.memo(({ sizing }) => {
const { healthData } = useContext(HealthContext);

const [solo, setSolo] = useState<SoloStyles | null>(null);

setInterval(() => {
if (solo != soloStyle) {
setSolo(soloStyle);
}
}, 20);

const createChart = () => {
const yAxis: Array<number> = healthData.latency;

const sizeSwitch = sizing === 'all' ? all : solo;

console.log(sizeSwitch);

return (
<Plot
data={[
Expand All @@ -21,8 +43,7 @@ const LatencyChart = React.memo(() => {
]}
layout={{
title: 'Latency',
height: 300,
width: 300,
...sizeSwitch,
font: {
color: '#444d56',
size: 11.5,
Expand Down Expand Up @@ -56,7 +77,7 @@ const LatencyChart = React.memo(() => {
);
};

return <div className="chart">{createChart()}</div>;
return <div className="chart">{solo && createChart()}</div>;
});

export default LatencyChart;
35 changes: 27 additions & 8 deletions app/charts/MemoryChart.tsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,34 @@
import React, { useContext } from 'react';
import React, { useContext, useState, useEffect } from 'react';
import Plot from 'react-plotly.js';
import { HealthContext } from '../context/HealthContext';
import { all, solo as soloStyle } from './sizeSwitch';

const MemoryChart = React.memo(() => {
interface GraphsContainerProps {
sizing: string;
}

interface SoloStyles {
height: number;
width: number;
}

const MemoryChart: React.FC<GraphsContainerProps> = React.memo(({ sizing }) => {
const { healthData } = useContext(HealthContext);
const createChart = () => {
const free: number[] = healthData.freememory;
const used: number[] = healthData.usedmemory;
const active: number[] = healthData.activememory;

const [solo, setSolo] = useState<SoloStyles | null>(null);

setInterval(() => {
if (solo != soloStyle) {
setSolo(soloStyle);
}
}, 20);

const sizeSwitch = sizing === 'all' ? all : solo;

return (
<Plot
data={[
Expand Down Expand Up @@ -39,8 +59,7 @@ const MemoryChart = React.memo(() => {
]}
layout={{
title: 'Memory Traces',
height: 300,
width: 300,
...sizeSwitch,
font: {
color: '#444d56',
size: 11.5,
Expand All @@ -54,8 +73,8 @@ const MemoryChart = React.memo(() => {
x: 0.5,
y: -1.0,
font: {
size: 9
}
size: 9,
},
},
xaxis: {
tickmode: 'linear',
Expand All @@ -64,8 +83,8 @@ const MemoryChart = React.memo(() => {
title: 'Time Elapsed (min)',
},
yaxis: {
title: 'Bytes'
}
title: 'Bytes',
},
}}
/>
);
Expand Down
37 changes: 28 additions & 9 deletions app/charts/ProcessesChart.tsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,34 @@
import React, { useContext } from 'react';
import React, { useContext, useState, useEffect } from 'react';
import Plot from 'react-plotly.js';
import { HealthContext } from '../context/HealthContext';
import { all, solo as soloStyle } from './sizeSwitch';

const ProcessesChart = React.memo(() => {
interface GraphsContainerProps {
sizing: string;
}

interface SoloStyles {
height: number;
width: number;
}

const ProcessesChart: React.FC<GraphsContainerProps> = React.memo(({ sizing }) => {
const { healthData } = useContext(HealthContext);
const createChart = () => {
const runningProcesses: Array<number> = healthData.runningprocesses;
const blockedProcesses: Array<number> = healthData.blockedprocesses;
const sleepingProcesses: Array<number> = healthData.sleepingprocesses;

const [solo, setSolo] = useState<SoloStyles | null>(null);

setInterval(() => {
if (solo != soloStyle) {
setSolo(soloStyle);
}
}, 20);

const sizeSwitch = sizing === 'all' ? all : solo;

return (
<Plot
data={[
Expand Down Expand Up @@ -45,8 +65,7 @@ const ProcessesChart = React.memo(() => {
]}
layout={{
title: 'Process Overview',
height: 300,
width: 300,
...sizeSwitch,
font: {
color: '#444d56',
size: 11.5,
Expand All @@ -59,17 +78,17 @@ const ProcessesChart = React.memo(() => {
xanchor: 'center',
x: 0.5,
y: -1.0,
font: {
size: 9
}
font: {
size: 9,
},
},
xaxis: {
dtick: 10,
title: 'Time Elapsed (min)',
},
yaxis: {
title: 'Number of Processes'
}
title: 'Number of Processes',
},
}}
/>
);
Expand Down
31 changes: 25 additions & 6 deletions app/charts/SpeedChart.tsx
Original file line number Diff line number Diff line change
@@ -1,18 +1,38 @@
import React, { useContext } from 'react';
import React, { useContext, useEffect, useState } from 'react';
import Plot from 'react-plotly.js';
import { HealthContext } from '../context/HealthContext';
import moment from 'moment';
import { all, solo as soloStyle } from './sizeSwitch';

const SpeedChart = React.memo(() => {
interface GraphsContainerProps {
sizing: string;
}
interface SoloStyles {
height: number;
width: number;
}

const SpeedChart: React.FC<GraphsContainerProps> = React.memo(({ sizing }) => {
const { healthData } = useContext(HealthContext);
const { time, cpuspeed } = healthData;
const yAxis = cpuspeed;

const [solo, setSolo] = useState<SoloStyles | null>(null);

setInterval(() => {
if (solo != soloStyle) {
setSolo(soloStyle);
}
}, 20);

const createChart = () => {
let timeArr;
if (time !== undefined) {
timeArr = time.map((el: any) => moment(el).format('hh:mm A'));
}

const sizeSwitch = sizing === 'all' ? all : solo;

return (
<Plot
data={[
Expand All @@ -23,14 +43,13 @@ const SpeedChart = React.memo(() => {
type: 'scatter',
mode: 'lines+markers',
marker: {
color: '#3788fc'
color: '#3788fc',
},
},
]}
layout={{
title: 'Speed Chart',
height: 300,
width: 300,
...sizeSwitch,
font: {
color: '#444d56',
size: 11.5,
Expand Down Expand Up @@ -66,7 +85,7 @@ const SpeedChart = React.memo(() => {
);
};

return <div className="chart">{createChart()}</div>;
return <div className="chart">{solo && createChart()}</div>;
});

export default SpeedChart;
27 changes: 23 additions & 4 deletions app/charts/TemperatureChart.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,19 @@
import React, { useContext } from 'react';
import React, { useContext, useState, useEffect } from 'react';
import Plot from 'react-plotly.js';
import moment from 'moment';
import { HealthContext } from '../context/HealthContext';
import { all, solo as soloStyle } from './sizeSwitch';

const TemperatureChart = React.memo(() => {
interface GraphsContainerProps {
sizing: string;
}

interface SoloStyles {
height: number;
width: number;
}

const TemperatureChart: React.FC<GraphsContainerProps> = React.memo(({ sizing }) => {
const { healthData } = useContext(HealthContext);
const { time, cputemp } = healthData;

Expand All @@ -16,6 +26,16 @@ const TemperatureChart = React.memo(() => {
month = moment(time[0]).format('MMM Do');
}

const [solo, setSolo] = useState<SoloStyles | null>(null);

setInterval(() => {
if (solo != soloStyle) {
setSolo(soloStyle);
}
}, 20);

const sizeSwitch = sizing === 'all' ? all : solo;

return (
<Plot
data={[
Expand All @@ -33,8 +53,7 @@ const TemperatureChart = React.memo(() => {
config={{ responsive: true }}
layout={{
title: 'CPU Temperature',
height: 300,
width: 300,
...sizeSwitch,
font: {
color: '#444d56',
size: 11.5,
Expand Down
21 changes: 21 additions & 0 deletions app/charts/sizeSwitch.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
console.log(window.innerWidth);

let soloWidth = window.innerWidth > 800 ? 800 : window.innerWidth - 270;

window.addEventListener('resize', () => {
soloWidth = window.innerWidth > 800 ? 800 : window.innerWidth - 270;
solo = {
...solo,
width: soloWidth,
};
});

export const all = {
height: 300,
width: 300,
};

export let solo = {
height: 600,
width: soloWidth,
};
Loading