Skip to content

Commit

Permalink
Merge pull request #313 from adamc-sp/bug-312-alerts
Browse files Browse the repository at this point in the history
Bug 312 alerts
  • Loading branch information
GavinMendelGleason authored Apr 29, 2024
2 parents d34edd5 + fe52996 commit 6bb7512
Show file tree
Hide file tree
Showing 9 changed files with 27 additions and 10 deletions.
17 changes: 16 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,22 @@ cp ENV.local .env

npm run build
```
You can find the builded version into terminusdb-dashboard/packages/tdb-dashboard/dist
You can find the built version into terminusdb-dashboard/packages/tdb-dashboard/dist

**Locally Developing the dashboard**

Running `npm run start` instead of `build` starts a server and watches for changes. Because of the way this is configured, you will need to go to `/dashboard` after connecting in browser

```sh
npm run start
```

There are some differences depending on how you are developing it, if you are just running the dashboard repo locally:

- Comment out the `@terminusdb/terminusdb-client` alias in the webpack config
- Update the env file to have the `BASE_URL` be empty (also generally useful since this is where the webpack server opens the new browser window), this will mean you don't have to go to `/dashboard` as above

There is some additional configuration needed if you are wanting to run with Auth0 Login, essentially you just need a proxy and to setup the right auth0 config. This will allow you to login but the token generated will not be valid so you will need to replace it manually with a valid one.

## Publishing

Expand Down
2 changes: 1 addition & 1 deletion packages/tdb-access-control-component/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@terminusdb/terminusdb-access-control-component",
"version": "6.0.10",
"version": "6.2.5",
"description": "Table for terminusdb",
"main": "src/index",
"module": "es6/index",
Expand Down
2 changes: 1 addition & 1 deletion packages/tdb-dashboard/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@terminusdb-live/tdb-dashboard",
"version": "6.0.10",
"version": "6.2.5",
"description": "react",
"homepage": "./",
"main": "src/index",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import React, {useRef, useState} from "react"
import {Modal, Button, Form} from "react-bootstrap"
import { Alerts } from "./Alerts"
import {ChangeRequest} from "../hooks/ChangeRequest"
import { TERMINUS_DANGER } from "./constants"
import { CHANGE_REQUEST_SUBMIT_REVIEW, CHANGE_REQUEST_MESSAGE_FOR_REVIEW } from "../cypress.constants"

export const SubmitChangeRequestModal = ({showModal, setShowModal , updateParent, updateChangeRequestID, operation}) => {
Expand Down Expand Up @@ -41,8 +42,7 @@ export const SubmitChangeRequestModal = ({showModal, setShowModal , updateParent
<Button variant="close" aria-label="Close" onClick={closeModal} />
</Modal.Header>
<Modal.Body className="p-3">
{errorMessage &&
<Alert variant="danger" onClose={() => setError(false)} dismissible>{errorMessage}</Alert>}
{errorMessage && <Alerts type={TERMINUS_DANGER} onCancel={() => setError(false)} message={errorMessage}/>}
<Form>
<Form.Group className="mb-3 tdb__input">
<Form.Control required
Expand Down
4 changes: 3 additions & 1 deletion packages/tdb-dashboard/webpack_dev.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,9 @@ module.exports = (env, argv) => ({
}
],"@babel/plugin-transform-react-jsx",
"@babel/plugin-proposal-export-default-from","@babel/plugin-transform-regenerator",
["@babel/plugin-transform-runtime"]
["@babel/plugin-transform-runtime"],
["@babel/plugin-proposal-private-property-in-object", { "loose": true }],
["@babel/plugin-proposal-private-methods", { "loose": true }],
]
}
},
Expand Down
2 changes: 1 addition & 1 deletion packages/tdb-documents-ui-template/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@terminusdb/terminusdb-documents-ui-template",
"version": "6.0.10",
"version": "6.2.5",
"description": "SDK to build Application from terminusdb documents",
"main": "src/index.js",
"module": "es6/index.js",
Expand Down
2 changes: 1 addition & 1 deletion packages/tdb-documents-ui/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@terminusdb/terminusdb-documents-ui",
"version": "6.0.10",
"version": "6.2.5",
"description": "SDK to build UI from terminusdb documents",
"main": "src/index.js",
"module": "es6/index",
Expand Down
2 changes: 1 addition & 1 deletion packages/tdb-react-components/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@terminusdb-live/tdb-react-components",
"version": "6.0.10",
"version": "6.2.5",
"description": "components tools for terminusdb",
"main": "src/index",
"module": "es6/index",
Expand Down
2 changes: 1 addition & 1 deletion packages/tdb-react-table/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@terminusdb/terminusdb-react-table",
"version": "6.0.10",
"version": "6.2.5",
"description": "Table for terminusdb",
"main": "src/index",
"module": "es6/index",
Expand Down

0 comments on commit 6bb7512

Please sign in to comment.