Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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 .babelrc
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"presets": ["@babel/preset-react", "@babel/preset-env"],
"plugins": [
"@babel/plugin-proposal-optional-chaining",
["transform-imports", { "@nio/ui-kit": { "transform": "@nio/ui-kit/dist/components/${member}", "preventFullImport": true } }]
]
}
8 changes: 7 additions & 1 deletion .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,13 @@
"env": {
"browser": true
},
"plugins": [
"react-hooks"
],
"rules": {
"strict": 0,
"react-hooks/rules-of-hooks": "error",
"react-hooks/exhaustive-deps": 0,
"camelcase": 0,
"array-callback-return": 0,
"react/require-extension": 0,
Expand All @@ -28,6 +34,6 @@
"jsx-a11y/click-events-have-key-events": 0,
"jsx-a11y/anchor-is-valid": 0,
"no-param-reassign": 0,
"max-lines": ["warn", {"max": 100, "skipComments": false}]
"max-lines": ["warn", {"max": 135, "skipComments": false}]
}
}
2 changes: 1 addition & 1 deletion .sass-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ rules:
no-color-hex: 0
no-color-keywords: 1
no-color-literals: 0
no-combinators: 1
no-combinators: 0
no-css-comments: 1
no-debug: 1
no-disallowed-properties: 1
Expand Down
10 changes: 4 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,19 +18,17 @@ Follow these steps to create a simple UI to interact with your HarperDB instance

1. In your terminal, clone the UI scaffold, enter the directory, and install dependencies.
```
git clone https://github.com/harperdb/ui-scaffold.git my-project
cd my-project
git clone https://github.com/harperdb/hdbms.git
cd hdbms
npm i -s
```

1. In the root of the project, rename `config.js.example` to `config.js`, and fill out the details for your HarperDB instance.

1. Start the project.
```
npm start
```

1. Visit the project at https://0.0.0.0:3000.
1. Visit the project at http://localhost:3000.
- The development web server uses a self-signed certificate, and you may see a warning about the site being insecure. In your local development environment, it is safe to click "Advanced" > "proceed to site anyway."

You’ll see a simple UI with the result of a `describe_all` operation.
1. Log into the mock instances with admin/Abc1234!
81 changes: 81 additions & 0 deletions mock_data/LMS_API.aws_regions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
{
"statusCode": 200,
"body": [
{
"label": "US East (N. Virginia)",
"value": "us-east-1"
},
{
"label": "US East (Ohio)",
"value": "us-east-2"
},
{
"label": "US West (N. California)",
"value": "us-west-1"
},
{
"label": "US West (Oregon)",
"value": "us-west-2"
},
{
"label": "Asia Pacific (Hong Kong)",
"value": "ap-east-1"
},
{
"label": "Asia Pacific (Mumbai)",
"value": "ap-south-1"
},
{
"label": "Asia Pacific (Osaka-Local)",
"value": "ap-northeast-3"
},
{
"label": "Asia Pacific (Seoul)",
"value": "ap-northeast-2"
},
{
"label": "Asia Pacific (Singapore)",
"value": "ap-southeast-1"
},
{
"label": "Asia Pacific (Sydney)",
"value": "ap-southeast-2"
},
{
"label": "Asia Pacific (Tokyo)",
"value": "ap-northeast-1"
},
{
"label": "Canada (Central)",
"value": "ca-central-1"
},
{
"label": "Europe (Frankfurt)",
"value": "eu-central-1"
},
{
"label": "Europe (Ireland)",
"value": "eu-west-1"
},
{
"label": "Europe (London)",
"value": "eu-west-2"
},
{
"label": "Europe (Paris)",
"value": "eu-west-3"
},
{
"label": "Europe (Stockholm)",
"value": "eu-north-1"
},
{
"label": "Middle East (Bahrain)",
"value": "me-south-1"
},
{
"label": "South America (São Paulo)",
"value": "sa-east-1"
}
]
}
52 changes: 52 additions & 0 deletions mock_data/LMS_API.customer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
{
"statusCode": 200,
"body": {
"id": "customer-guid-1",
"name": "customer name",
"customer_hubspot_id": "guid",
"stripe_customer_object": {
"balance": 0,
"delinquent": true,
"discount": {},
"id": "string",
"sources": {
"data": [

]
},
"subscriptions": {
"data": [
{
"billing_cycle_anchor": 0,
"billing_thresholds": {},
"cancel_at": 0,
"cancel_at_period_end": true,
"canceled_at": 0,
"created": 0,
"current_period_end": 0,
"current_period_start": 0,
"customer": "string",
"default_payment_method": "string",
"default_source": "string",
"discount": {},
"ended_at": 0,
"id": "string",
"items": {
"data": [
{}
]
},
"latest_invoice": {},
"metadata": {},
"next_pending_invoice_item_invoice": 0,
"plan": "string",
"quantity": 0,
"schedule": {},
"start_date": 0,
"status": "active"
}
]
}
}
}
}
40 changes: 40 additions & 0 deletions mock_data/LMS_API.customer_users.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
{
"statusCode": 200,
"body": [
{
"user_id": "user-guid-1",
"firstname": "First1",
"lastname": "Last1",
"email": "user1@harperdb.io",
"customer_id": "customer-id-guid"
},
{
"user_id": "user-guid-2",
"firstname": "First2",
"lastname": "Last2",
"email": "user2@harperdb.io",
"customer_id": "customer-id-guid"
},
{
"user_id": "user-guid-3",
"firstname": "First3",
"lastname": "Last3",
"email": "user3@harperdb.io",
"customer_id": "customer-id-guid"
},
{
"user_id": "user-guid-4",
"firstname": "First4",
"lastname": "Last4",
"email": "user4@harperdb.io",
"customer_id": "customer-id-guid"
},
{
"user_id": "user-guid-5",
"firstname": "First5",
"lastname": "Last5",
"email": "user5@harperdb.io",
"customer_id": "customer-id-guid"
}
]
}
Loading