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

Final merges completed #22

Closed
wants to merge 120 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
120 commits
Select commit Hold shift + click to select a range
9bec3a6
updated settings after trying the switch from dummy-micrsvc to master.
ajlee12 May 6, 2020
4420fdc
Added time-elapsed data (ms) next to points in RouteTrace rendering.
ajlee12 May 7, 2020
cb2b7a0
Changed some styling to display routeTimeDiff next to routeText (disp…
ajlee12 May 7, 2020
81106df
Implement first iteration of pie chart
Umius-Brian May 7, 2020
b8b3627
Commented out two cnsl.logs in SvcOverview; adding cnsl.logs in route…
ajlee12 May 7, 2020
46998d5
Changed Date.parse() to new Date() (better practice!)
ajlee12 May 7, 2020
98b491d
revamp2
alon25 May 8, 2020
2e7a23f
Re-render request, response, and speed charts
Umius-Brian May 8, 2020
0925717
Fix colors on request, response, and speed charts
Umius-Brian May 8, 2020
9c9eca6
Constructed avgDataObj with counts, totalTime, avgTime of requests tr…
ajlee12 May 8, 2020
5305df5
Re-render processes chart
Umius-Brian May 8, 2020
77a74a6
Re-render latency chart
Umius-Brian May 9, 2020
58a0a7d
Re-render temperature chart
Umius-Brian May 9, 2020
c956931
Rendered avg-time data in 3 categories (avgTime, totalTime, #of trips…
ajlee12 May 9, 2020
2a07ebe
Update legend orientation
Umius-Brian May 9, 2020
56fc2a6
Re-render all charts to friendly UI
Umius-Brian May 9, 2020
a18d1a7
Add tick labels and change temperature bar graph
Umius-Brian May 9, 2020
bcf891b
Modularization
alon25 May 9, 2020
d26f5f0
user settings json updated.
ajlee12 May 9, 2020
c60b251
Toggle Services
alon25 May 9, 2020
1fdb96e
setup ADD DELETE
alon25 May 9, 2020
370928e
Split CSS
alon25 May 10, 2020
61957a2
Split Stylesheets
alon25 May 11, 2020
e234320
last commit before merging into local master.
ajlee12 May 11, 2020
fbcd90e
Merge branch 'time-stamp'
ajlee12 May 11, 2020
8f37578
Managing App State
alon25 May 11, 2020
47c2ff4
Fixed MS buttons
alon25 May 11, 2020
ab5028e
Fixed Window Size
alon25 May 11, 2020
a277819
Graphs
alon25 May 11, 2020
d0a998e
Fixed Add Service Rendering
alon25 May 11, 2020
b7b1773
Before First Merge
alon25 May 11, 2020
8490097
Merge pull request #1 from ajlee12/master
ajlee12 May 11, 2020
9b269c5
Merged into master
alon25 May 11, 2020
7fd86b6
Merged Route Details
alon25 May 11, 2020
1540fb1
Stylesheets
alon25 May 11, 2020
eaacfe9
Merge pull request #3 from alon25/master
ajlee12 May 11, 2020
0178998
Add microservices traffic graph
Umius-Brian May 11, 2020
b5823c5
First merge
Umius-Brian May 11, 2020
4b23a2c
Merge pull request #4 from Umius-Brian/graph1
Umius-Brian May 11, 2020
295c6f3
master first merged
alon25 May 11, 2020
1f9b285
changes in user/settings
May 11, 2020
6af0ee6
merge
May 11, 2020
fc910fa
Change graph sizing before beginning UI configuration
Umius-Brian May 11, 2020
4fd9ccb
merged in new layout
May 11, 2020
46b0dcc
Styling changes
alon25 May 12, 2020
477f08d
Merge pull request #6 from alon25/staging
alon25 May 12, 2020
1e4127b
merge
May 12, 2020
ad5575c
committing before pulling down Alon latest updates (shrink charts to …
ajlee12 May 12, 2020
e178d10
Merge branch 'staging' of https://github.com/oslabs-beta/Chronos
ajlee12 May 12, 2020
207f957
Complete UX color and font overhaul
Umius-Brian May 12, 2020
d538a64
Updated color schemes for graphs
Umius-Brian May 12, 2020
9ce8003
Before style update
alon25 May 12, 2020
6991753
UI overhaul
Umius-Brian May 12, 2020
f239c91
Merge pull request #7 from Umius-Brian/graph1
Umius-Brian May 12, 2020
c99156f
Re-render UI to more techy colors
Umius-Brian May 12, 2020
5af6044
Updated tech colors
Umius-Brian May 12, 2020
06d7c79
Styling Updates
alon25 May 12, 2020
abc50da
styling before merge
alon25 May 13, 2020
29dd8a0
Merge pull request #8 from Umius-Brian/graph1
Umius-Brian May 13, 2020
06d0251
Styling Merged
alon25 May 13, 2020
03d9e60
Merge pull request #9 from alon25/staging
alon25 May 13, 2020
066669b
Style
alon25 May 13, 2020
f44452f
Merge pull request #10 from alon25/staging
alon25 May 13, 2020
fbd599b
new graphs
May 13, 2020
3f67898
merged new graph format
May 13, 2020
5ce8b93
rendering node circles d3
May 13, 2020
0a26d81
rendering circles
May 13, 2020
677b561
Merge pull request #11 from briannasookhoo/routesd3
briannasookhoo May 13, 2020
28ad2d5
committing changes in dist and settingsjson so I can switch branch.
ajlee12 May 13, 2020
7a6ff33
some force simulation added
May 14, 2020
a635394
Merge pull request #12 from briannasookhoo/routesd3
briannasookhoo May 14, 2020
3e72539
D3 Implementation
Umius-Brian May 14, 2020
dcbbc87
D3 Implementation
Umius-Brian May 14, 2020
3c63141
Render text onto route trace container
Umius-Brian May 14, 2020
8f48fc7
Move text closer to nodes
Umius-Brian May 14, 2020
9394f61
Merge pull request #13 from Umius-Brian/MVP-Features
Umius-Brian May 14, 2020
47c6edf
Merge branch 'staging' of https://github.com/oslabs-beta/Chronos
ajlee12 May 14, 2020
23b251d
Fix add and delete database pages
Umius-Brian May 14, 2020
702bd92
rendering labels with nodes
May 14, 2020
07ceaac
Merge branch 'staging' of https://github.com/oslabs-beta/Chronos into…
Umius-Brian May 14, 2020
768d174
Merge pull request #14 from briannasookhoo/routesd3
Umius-Brian May 14, 2020
6ef8b9b
Merge branch 'staging' of https://github.com/oslabs-beta/Chronos into…
Umius-Brian May 14, 2020
b40dce7
Merge pull request #15 from Umius-Brian/MVP-Features
briannasookhoo May 14, 2020
0d57987
getting link errors
May 14, 2020
e7f2488
Added docker stats chart & applied minimal styling.
ajlee12 May 14, 2020
230856e
Merge branch 'staging' of https://github.com/oslabs-beta/Chronos
ajlee12 May 14, 2020
52722d5
Merge branch 'docker-stats'
ajlee12 May 14, 2020
03cf112
Removed 2nd reverseproxy server
Umius-Brian May 14, 2020
7d46770
Merged docker-stats feature into latest UI revamp.
ajlee12 May 14, 2020
8b58d65
Merge pull request #16 from ajlee12/master
Umius-Brian May 14, 2020
43e013f
Merge branch 'staging' of https://github.com/oslabs-beta/Chronos into…
Umius-Brian May 14, 2020
7e9d182
rendering links
May 14, 2020
ee4a9f9
merged docker stats
May 14, 2020
df620b3
Merge pull request #17 from briannasookhoo/routesd3
Umius-Brian May 14, 2020
39c59a3
Add json file
Umius-Brian May 14, 2020
3fe4baf
Merge branch 'staging' of https://github.com/oslabs-beta/Chronos into…
Umius-Brian May 14, 2020
8b19c1e
Updates before MVP presentation
Umius-Brian May 14, 2020
beae2ca
Merge pull request #18 from Umius-Brian/MVP-Features
briannasookhoo May 14, 2020
f876cd7
Add TravisCI for testing and deployment
Umius-Brian May 16, 2020
1cb2025
Merge pull request #19 from Umius-Brian/MVP-Features
Umius-Brian May 16, 2020
65f34da
Fix yaml file
Umius-Brian May 16, 2020
eb623ec
Fix node rule for yaml file
Umius-Brian May 16, 2020
85f1193
Delete routes component
Umius-Brian May 16, 2020
961c920
Merge pull request #21 from Umius-Brian/MVP-Features
Umius-Brian May 16, 2020
7da51e4
Change darwin OS platform to linux
Umius-Brian May 16, 2020
316633b
Change TravisCI rules to regulate only OSX
Umius-Brian May 16, 2020
c3a6349
Configure to run without allowing failures
Umius-Brian May 16, 2020
7d2de3a
Merge pull request #22 from Umius-Brian/Stretch-Features
ajlee12 May 16, 2020
1dcd580
Fixed bug where app crashes when selected svc has no docker data. If …
ajlee12 May 17, 2020
02c6d35
Merge pull request #23 from ajlee12/master
Umius-Brian May 17, 2020
2990c6e
Change fonts and add labels
Umius-Brian May 21, 2020
9a4a71c
Update all chart titles, labels, and ticks
Umius-Brian May 21, 2020
f70e23c
Completed all graph formatting
Umius-Brian May 21, 2020
a317511
Updated all charts with appropriate fonts, labels, and ticks
Umius-Brian May 21, 2020
74d5e9d
Merge pull request #24 from Umius-Brian/Stretch-Features
ajlee12 May 21, 2020
00f4306
Remove excess files
Umius-Brian May 28, 2020
0f7c616
Fix Docker container stats display
Umius-Brian May 28, 2020
223bd7b
Delete copy of graphs file
Umius-Brian May 28, 2020
f68161e
Rebuild babel loader module config
Umius-Brian May 28, 2020
85af74e
Merge pull request #29 from Umius-Brian/Launch
ajlee12 May 28, 2020
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
Binary file modified .DS_Store
Binary file not shown.
5 changes: 3 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
node_modules
.eslintrc.js
package-lock.json
settings.json
.DS_Store
.DS_Store
user/settings.json
dist
10 changes: 10 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
language: node_js
node_js:
- "stable"
os:
osx
# jobs:
# allow_failures:
# - os: osx
install:
- npm install
94 changes: 60 additions & 34 deletions Main.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
// node requirements
const {
dialog, app, BrowserWindow, ipcMain,
} = require('electron');
const { dialog, app, BrowserWindow, ipcMain } = require('electron');
const fs = require('fs');
const path = require('path');
const connectSQL = require('./model/sql-connect');
Expand All @@ -20,9 +18,9 @@ function createWindow() {
// assign win to an instance of a new browser window.
win = new BrowserWindow({
// giving our window its width
width: 900,
width: 1920,
// giving our window its hieght
height: 800,
height: 1080,
// specify the path of the icon -- Which icon is this?.. note too tsure --> Ousman
icon: path.join(__dirname, 'app/assets/icons/icon.png'),
// enable node inegreation --> node intgeration, default is usally false --> Ousman
Expand All @@ -44,11 +42,16 @@ function createWindow() {
// read json from settings.json
fs.readFileSync(path.resolve(__dirname, './user/settings.json'), {
encoding: 'UTF-8',
}),
})
);
// reassign state.splash
state.splash = true;
fs.writeFileSync(path.resolve(__dirname, './user/settings.json'), JSON.stringify(state), { encoding: 'UTF-8' }); win = null;
fs.writeFileSync(
path.resolve(__dirname, './user/settings.json'),
JSON.stringify(state),
{ encoding: 'UTF-8' }
);
win = null;
});
}

Expand All @@ -62,11 +65,15 @@ app.on('window-all-closed', () => {
// read json from settings.json
fs.readFileSync(path.resolve(__dirname, './user/settings.json'), {
encoding: 'UTF-8',
}),
})
);
// reassign state.splash
state.splash = true;
fs.writeFileSync(path.resolve(__dirname, './user/settings.json'), JSON.stringify(state), { encoding: 'UTF-8' });
fs.writeFileSync(
path.resolve(__dirname, './user/settings.json'),
JSON.stringify(state),
{ encoding: 'UTF-8' }
);
// process platform is a property that return a string identifying the OS platform on which NodeJs process is running --> Ousman
if (process.platform !== 'darwin') {
// quits application
Expand All @@ -85,29 +92,33 @@ app.on('activate', () => {
// Fired by the useEffect hook inside of the Splash.jsx component, this message route will toggle
// splash property inside of settings.json to false once the Splash page renders itself just once
ipcMain.on('toggleSplash', (message) => {
//console.log('toggleSplash message received');
// console.log('toggleSplash message received');
const state = JSON.parse(
// read json from settings.json
fs.readFileSync(path.resolve(__dirname, './user/settings.json'), {
encoding: 'UTF-8',
}),
})
);
// reassign state.splash to false
state.splash = false;

// overwrite settings.json with false splash property
fs.writeFileSync(path.resolve(__dirname, './user/settings.json'), JSON.stringify(state), { encoding: 'UTF-8' });
fs.writeFileSync(
path.resolve(__dirname, './user/settings.json'),
JSON.stringify(state),
{ encoding: 'UTF-8' }
);

message.returnValue = state.splash;
});

ipcMain.on('checkSplash', (message) => {
//sconsole.log('checkSplash message received');
// sconsole.log('checkSplash message received');
const state = JSON.parse(
// read json from settings.json
fs.readFileSync(path.resolve(__dirname, './user/settings.json'), {
encoding: 'UTF-8',
}),
})
);

message.returnValue = state.splash;
Expand All @@ -116,13 +127,13 @@ ipcMain.on('checkSplash', (message) => {
// Load settings JSON and returns current setup status back to the render process.
// ipc 'setup' route --> Ousman
ipcMain.on('setup', (message) => {
//console.log('setup message received');
// console.log('setup message received');
// assigns state to the returned the object returned from settings.json --> Ousman
const state = JSON.parse(
// read json from settings.json
fs.readFileSync(path.resolve(__dirname, './user/settings.json'), {
encoding: 'UTF-8',
}),
})
);
// destructure setupRequired from state constant ---> Ousman
const { setupRequired } = state;
Expand All @@ -137,21 +148,24 @@ ipcMain.on('submit', (message, newService) => {
const state = JSON.parse(
fs.readFileSync(path.resolve(__dirname, './user/settings.json'), {
encoding: 'UTF-8',
}),
})
);

// Checks if setup is required by checking if the value for the state key 'setupRequired' is true
// Checks if setup is required by checking if the value for the state key 'setupRequired' is true
if (state.setupRequired) {
// If setup is required, the value for key 'setupRequired' is reassign to false and the value for key 'services' is reassign to an array with newService as its only element
state.setupRequired = false;
state.services = [JSON.parse(newService)];
} else {
// Else the newService is pushed into the services array
state.services.push(JSON.parse(newService));
}
}

// Rewrites user/settings.json to show state
fs.writeFileSync(path.resolve(__dirname, './user/settings.json'), JSON.stringify(state));
fs.writeFileSync(
path.resolve(__dirname, './user/settings.json'),
JSON.stringify(state)
);
});

// Load settings JSON and returns updated state back to the render process.
Expand All @@ -161,7 +175,7 @@ ipcMain.on('dashboard', (message) => {
const state = JSON.parse(
fs.readFileSync(path.resolve(__dirname, './user/settings.json'), {
encoding: 'UTF-8',
}),
})
);
// destructure services from state... what is services? --> Ousman
const { services } = state;
Expand All @@ -180,31 +194,36 @@ ipcMain.on('deleteService', (message, index) => {
let state = JSON.parse(
fs.readFileSync(path.resolve(__dirname, './user/settings.json'), {
encoding: 'UTF-8',
}),
})
);

// Send a response back with the updated services
const { splash } = state;
// Checks if there is more than one services in the services array
// Checks if there is more than one services in the services array
if (state.services.length > 1) {
// If true, removes the service at position 'index'
// If true, removes the service at position 'index'
state.services.splice(index, 1);
} else {
// Else reassign state to what the user/setting.json file was originally before any database was save
// Else reassign state to what the user/setting.json file was originally before any database was save
state = { setupRequired: true, services: ['hard', 'coded', 'in'], splash };
}

// Rewrites json from settings.json
fs.writeFileSync(path.resolve(__dirname, './user/settings.json'), JSON.stringify(state), { encoding: 'UTF-8' });
fs.writeFileSync(
path.resolve(__dirname, './user/settings.json'),
JSON.stringify(state),
{ encoding: 'UTF-8' }
);
message.sender.send('deleteResponse', state.services);
});


// Queries the database for communications information and returns it back to the render process.
ipcMain.on('overviewRequest', (message, index) => {
console.log('hello from overview request');
const { services } = JSON.parse(
fs.readFileSync(path.resolve(__dirname, './user/settings.json'), { encoding: 'UTF-8' }),
fs.readFileSync(path.resolve(__dirname, './user/settings.json'), {
encoding: 'UTF-8',
})
);

const databaseType = services[index][1];
Expand Down Expand Up @@ -233,14 +252,16 @@ ipcMain.on('overviewRequest', (message, index) => {
const errorAlert = {
type: 'error',
title: 'Error in Main process',
message: 'Database information could not be retreived. Check that table exists.',
message:
'Database information could not be retreived. Check that table exists.',
};

// after requiring dialog in the topmost section of main. We invoke the method showMessagebox passing the error object we created --> Ousman
dialog.showMessageBox(errorAlert);


message.sender.send(JSON.stringify('Database info could not be retreived.'));
message.sender.send(
JSON.stringify('Database info could not be retreived.')
);
} else {
console.log('Connected to SQL Database');
const queryResults = JSON.stringify(result.rows);
Expand All @@ -256,7 +277,9 @@ ipcMain.on('overviewRequest', (message, index) => {
ipcMain.on('detailsRequest', (message, index) => {
console.log('detailsRequest message received');
const databaseType = JSON.parse(
fs.readFileSync(path.resolve(__dirname, './user/settings.json'), { encoding: 'UTF-8' }),
fs.readFileSync(path.resolve(__dirname, './user/settings.json'), {
encoding: 'UTF-8',
})
).services[index][1];

if (databaseType === 'MongoDB') {
Expand All @@ -267,14 +290,18 @@ ipcMain.on('detailsRequest', (message, index) => {
const queryResults = JSON.stringify(data);
// Asynchronous event emitter used to transmit query results back to the render process.
message.sender.send('detailsResponse', queryResults);
console.log('Message Sent');
});
}

if (databaseType === 'SQL') {
const getHealth = 'SELECT * FROM healthInfo';
pool.query(getHealth, (err, result) => {
if (err) {
message.sender.send('detailsResponse', JSON.stringify('Database info could not be retreived.'));
message.sender.send(
'detailsResponse',
JSON.stringify('Database info could not be retreived.')
);
}
const queryResults = JSON.stringify(result.rows);
// Asynchronous event emitter used to transmit query results back to the render process.
Expand All @@ -283,4 +310,3 @@ ipcMain.on('detailsRequest', (message, index) => {
});
}
});

Loading