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

Harbor Assignment App #2

Open
wants to merge 48 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
d4516fe
removing node_modules so that node_modules could be added to .gitignore
vmote Feb 19, 2023
63a28ae
added node_modules to .gitignore so we don't have to see them in chan…
vmote Feb 19, 2023
2cb5064
up and running react app with boilerplate code - thanks to create-rea…
vmote Feb 19, 2023
2645a57
added .env file for default port for react app so it doesn't collied …
vmote Feb 19, 2023
8c28950
This is the component architecture I intend to follow
vmote Feb 19, 2023
cab0e3e
Added all icons to use them in components
vmote Feb 19, 2023
165c89b
Created basic layout
vmote Feb 19, 2023
c4ffc51
implemented sidebar component
vmote Feb 19, 2023
472999d
added unit tests for sidebar item component
vmote Feb 19, 2023
3362e3a
removed unused items from index.html that were producing console errors
vmote Feb 19, 2023
13c1bc1
Added testnet view component
vmote Feb 19, 2023
9dcc5f4
added testnet header and listing component
vmote Feb 19, 2023
16285f4
implemented testnet card component. It is quite a div soup.
vmote Feb 19, 2023
da200c0
Layout now adapts to smaller screens
vmote Feb 19, 2023
0499ab9
insert new line character at the end of the file to stop git from com…
vmote Feb 19, 2023
6b3e6cd
implemented dropdown component
vmote Feb 19, 2023
d3e0628
Made sure dropdown closes
vmote Feb 19, 2023
d518dff
bringing compnents to life by loading API payload data
vmote Feb 20, 2023
b268285
adding cors to API server so that it can serve data cross-origin
vmote Feb 20, 2023
95c7043
changed API payload a bit to demonstrate all types of testnet cards
vmote Feb 20, 2023
51df010
dropdown status fix
vmote Feb 20, 2023
664cd7d
corrected testnet sorting
vmote Feb 20, 2023
79703ea
implemented blockchain icon array component
vmote Feb 20, 2023
7b78d3a
use 'work sans' font
vmote Feb 20, 2023
a1428a9
adapting the layout for ultra small devices
vmote Feb 20, 2023
0235f19
refactor css
vmote Feb 20, 2023
d4ac0e6
Added routing to make future route addition easy
vmote Feb 20, 2023
7431a37
css adjustments
vmote Feb 20, 2023
1d316b1
Added prop type checking and unit tests for the components
vmote Feb 21, 2023
61d5fcb
use enums for sort and filter values
vmote Feb 21, 2023
4e3470f
don't create snapshots yet, it is annoying
vmote Feb 21, 2023
62ad972
created a reusable custom hook for fetching data
vmote Feb 21, 2023
0830474
Add error boundaries so that error in one component doesn't break the…
vmote Feb 21, 2023
aa30292
added bg color to main view
vmote Feb 21, 2023
e685917
commiting node_modules back into repo to avoid seeing them in PR
vmote Feb 21, 2023
401fb44
removing unnecessary packages
vmote Feb 21, 2023
73382e5
misc changes
vmote Feb 21, 2023
7b3fce2
added unit tests for few more components
vmote Feb 21, 2023
bebd8d1
imporved performance by memoizing the components to avoid re-rendering
vmote Feb 21, 2023
f85c712
used useCallback to avoid unneccesary re-renders
vmote Feb 21, 2023
51a03df
testnet card list should not flicker
vmote Feb 22, 2023
663d983
fix layout for smaller screens, improve rendering for testnet view co…
vmote Feb 22, 2023
5495e72
added comments in test file
vmote Feb 22, 2023
4c480ce
Added loader for main view
vmote Feb 23, 2023
d2bde30
cosmetic changes
vmote Feb 23, 2023
ef7a6c2
added comments for better understanding
vmote Feb 23, 2023
07d1f06
removed unused variables, added missing dependency, corrected dropdow…
vmote Feb 23, 2023
20e8d22
Added readme file for the app
vmote Feb 23, 2023
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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/node_modules
62 changes: 45 additions & 17 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
const express = require("express");
const cors = require('cors');
const app = express();
const port = 3000;

app.use(cors());

const data = {
testnet: [
{
Expand All @@ -14,7 +17,7 @@ const data = {
testnet_off_chain_actors: [
{
name: "routerCache",
status: "RUNNING",
status: "UPDATING",
__typename: "testnet_off_chain_actor",
},
{
Expand All @@ -34,6 +37,21 @@ const data = {
status: "RUNNING",
__typename: "testnet_chain",
},
{
chain: "polygon",
status: "RUNNING",
__typename: "testnet_chain",
},
{
chain: "fantom",
status: "RUNNING",
__typename: "testnet_chain",
},
{
chain: "avalance",
status: "RUNNING",
__typename: "testnet_chain",
},
],
testnet_image: {
project_id: "763db951-01d2-455e-8c45-08b839f2248b",
Expand All @@ -52,14 +70,14 @@ const data = {
testnet_off_chain_actors: [
{
name: "routerCache",
status: "RUNNING",
status: "UPDATING",
__typename: "testnet_off_chain_actor",
},
],
testnet_chains: [
{
chain: "polygon",
status: "RUNNING",
status: "UPDATING",
__typename: "testnet_chain",
},
],
Expand Down Expand Up @@ -100,6 +118,16 @@ const data = {
status: "RUNNING",
__typename: "testnet_chain",
},
{
chain: "polygon",
status: "RUNNING",
__typename: "testnet_chain",
},
{
chain: "fantom",
status: "RUNNING",
__typename: "testnet_chain",
},
],
testnet_image: {
project_id: "763db951-01d2-455e-8c45-08b839f2248b",
Expand Down Expand Up @@ -133,31 +161,31 @@ const data = {
{
name: "law-sky",
id: "9254c708-493d-44c0-867d-4d5b6942ee83",
status: "STOPPED",
status: "FAILED",
endpoint: "13.126.17.254",
created_at: "2022-10-27T09:10:26.589076+00:00",
updated_at: "2022-10-27T09:27:10.180768+00:00",
testnet_off_chain_actors: [
{
name: "routerCache",
status: "STOPPED",
status: "FAILED",
__typename: "testnet_off_chain_actor",
},
{
name: "ipfs",
status: "STOPPED",
status: "FAILED",
__typename: "testnet_off_chain_actor",
},
{
name: "sequencerCache",
status: "STOPPED",
status: "FAILED",
__typename: "testnet_off_chain_actor",
},
],
testnet_chains: [
{
chain: "ethereum",
status: "STOPPED",
status: "FAILED",
__typename: "testnet_chain",
},
],
Expand All @@ -171,31 +199,31 @@ const data = {
{
name: "wheat-height",
id: "80942ccf-1e6b-4874-9a64-69d2ac826c87",
status: "STOPPED",
status: "KILLED",
endpoint: "35.154.227.230",
created_at: "2022-10-27T09:10:00.379698+00:00",
updated_at: "2022-10-27T09:31:20.021792+00:00",
testnet_off_chain_actors: [
{
name: "sequencerCache",
status: "STOPPED",
status: "KILLED",
__typename: "testnet_off_chain_actor",
},
{
name: "routerCache",
status: "STOPPED",
status: "KILLED",
__typename: "testnet_off_chain_actor",
},
{
name: "ipfs",
status: "STOPPED",
status: "KILLED",
__typename: "testnet_off_chain_actor",
},
],
testnet_chains: [
{
chain: "ethereum",
status: "STOPPED",
status: "KILLED",
__typename: "testnet_chain",
},
],
Expand Down Expand Up @@ -794,24 +822,24 @@ const data = {
testnet_off_chain_actors: [
{
name: "routerCache",
status: "PENDING",
status: "UPDATING",
__typename: "testnet_off_chain_actor",
},
{
name: "messageQueue",
status: "PENDING",
status: "UPDATING",
__typename: "testnet_off_chain_actor",
},
{
name: "ipfs",
status: "PENDING",
status: "UPDATING",
__typename: "testnet_off_chain_actor",
},
],
testnet_chains: [
{
chain: "ethereum",
status: "PENDING",
status: "UPDATING",
__typename: "testnet_chain",
},
],
Expand Down
Loading