Skip to content
This repository has been archived by the owner on Jun 10, 2024. It is now read-only.

#85 Initial version of Glossary Author explorer #108

Merged
merged 26 commits into from
Mar 16, 2021
Merged
Show file tree
Hide file tree
Changes from 22 commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
118b3f7
#41 handle incorrect server in url
davidradl Feb 25, 2021
8db7aab
Merge branch 'main' of https://github.com/odpi/egeria-react-ui into main
davidradl Feb 25, 2021
d339f52
#89 fix merge issues
davidradl Feb 25, 2021
12cb908
#85 initial commit of glossary author visualisation
davidradl Mar 5, 2021
fd453b8
#85 putting something on the canvas with errors
davidradl Mar 5, 2021
a46d481
#85 putting 1 node on the canvas with errors
davidradl Mar 6, 2021
db06699
#85 remove duplicate graph button
davidradl Mar 6, 2021
afdde5e
#85 remove duplicate graph button
davidradl Mar 6, 2021
a823821
#85 populate properties of initial node
davidradl Mar 6, 2021
9e61577
#85 correct node type value
davidradl Mar 6, 2021
2fd96d1
#85 show 1 level of traversal
davidradl Mar 11, 2021
b4d9a8b
#85 add labels to links in diagram
davidradl Mar 11, 2021
0fda4ec
#87 Add commented out code around icons. Activate later
davidradl Mar 11, 2021
ccdd89e
#95 correct clear and undo in glossary author visualisation
davidradl Mar 12, 2021
8ec0e3f
#4829 Fix undo processing
davidradl Mar 12, 2021
cfa352d
#95 change clear to refresh the page
davidradl Mar 14, 2021
ad54b28
#95 display line
davidradl Mar 14, 2021
27bacda
#95 add icons
davidradl Mar 15, 2021
123c8ab
#85 correct category hierarchy
davidradl Mar 16, 2021
353397e
Merge branch 'main' of https://github.com/odpi/egeria-react-ui into g…
davidradl Mar 16, 2021
1f74b1b
#85 remove references to rex or repository from Glove
davidradl Mar 16, 2021
1b0f0b6
#85 remove commented out code
davidradl Mar 16, 2021
d0ef860
#85 underline selected label
davidradl Mar 16, 2021
87eec21
#85 remove unnecessary code
davidradl Mar 16, 2021
1cd2eea
#85 fix readme typos
davidradl Mar 16, 2021
463135d
#85 remove readme blank lines
davidradl Mar 16, 2021
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
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,12 @@ export default function GlossaryQuickTerms(props) {
setRestCallInProgress(false);
let workingTermsWithStatus = [];
for (let i = 0; i < terms.length; i++) {
console.log("json.result[i] " + json.result[i]);
let workingTermWithStatus = terms[i];
if (terms[i].name.trim() === "") {
workingTermWithStatus.status = "Error - blank name";
} else if (json.result[i].relatedHTTPCode === "200") {
workingTermWithStatus = json.result[i].result[0];
// workingTermWithStatus = json.result[i].result[0];
workingTermWithStatus.status = "Success";
} else {
workingTermWithStatus.status = "Error";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ export async function issueRestCreate(url, body, onSuccessful, onError) {
} else {
// got nothing
msg =
"Error. Create request succeded but there were no results. Contact your administrator to review the server logs for errors.";
"Error. Create request succeeded but there were no results. Contact your administrator to review the server logs for errors.";
}
} else {
msg = processErrorJson("Create", json, response);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import { IdentificationContext } from "../../../../contexts/IdentificationContex
import Add32 from "../../../../images/carbon/Egeria_add_32";
import Delete32 from "../../../../images/carbon/Egeria_delete_32";
import Edit32 from "../../../../images/carbon/Egeria_edit_32";
import DataVis32 from "../../../../images/carbon/Egeria_datavis_32";
import ParentChild32 from "../../../../images/carbon/Egeria_parent_child_32";

import Term32 from "../../../../images/odpi/Egeria_term_32";
Expand Down Expand Up @@ -157,6 +158,9 @@ const GlossaryAuthorCategoriesNavigation = (props) => {
function getEditNodeUrl() {
return props.match.url + "/categories/edit-category/" + selectedNodeGuid;
}
function getGraphNodeUrl() {
return props.match.url + "/categories/visualise-category/" + selectedNodeGuid;
}
const isSelected = (nodeGuid) => {
return nodeGuid === selectedNodeGuid;
};
Expand All @@ -182,6 +186,12 @@ const GlossaryAuthorCategoriesNavigation = (props) => {
<Edit32 kind="primary" />
</Link>
)}
{selectedNodeGuid && (
<Link to={getGraphNodeUrl()}>
<DataVis32 kind="primary" />
</Link>
)}

{selectedNodeGuid && <Delete32 onClick={() => onClickDelete()} />}
</div>
</article>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import { IdentificationContext } from "../../../../contexts/IdentificationContex
import Add32 from "../../../../images/carbon/Egeria_add_32";
import Delete32 from "../../../../images/carbon/Egeria_delete_32";
import Edit32 from "../../../../images/carbon/Egeria_edit_32";
import DataVis32 from "../../../../images/carbon/Egeria_datavis_32";
import ParentChild32 from "../../../../images/carbon/Egeria_parent_child_32";
import Term32 from "../../../../images/odpi/Egeria_term_32";

Expand Down Expand Up @@ -157,6 +158,9 @@ const GlossaryAuthorChildCategoriesNavigation = (props) => {
function getEditNodeUrl() {
return props.match.url + "/categories/edit-category/" + selectedNodeGuid;
}
function getGraphNodeUrl() {
return props.match.url + "/categories/visualise-category/" + selectedNodeGuid;
}
const isSelected = (nodeGuid) => {
return nodeGuid === selectedNodeGuid;
};
Expand All @@ -182,6 +186,11 @@ const GlossaryAuthorChildCategoriesNavigation = (props) => {
<Edit32 kind="primary" />
</Link>
)}
{selectedNodeGuid && (
<Link to={getGraphNodeUrl()}>
<DataVis32 kind="primary" />
</Link>
)}
{selectedNodeGuid && <Delete32 onClick={() => onClickDelete()} />}
</div>
</article>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
/* SPDX-License-Identifier: Apache-2.0 */
/* Copyright Contributors to the ODPi Egeria project. */
import React from "react";
import GlossaryAuthorVisualisation from "../visualisation/GlossaryAuthorVisualisation";

export default function GlossaryAuthorGraphNavigation(props) {
return (
<GlossaryAuthorVisualisation/>
);
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,15 @@ import CategoryAuthorNavigation from "./GlossaryAuthorNavigation";
import GlossaryAuthorCategoriesNavigation from "./GlossaryAuthorCategoriesNavigation";
import GlossaryAuthorChildCategoriesNavigation from "./GlossaryAuthorChildCategoriesNavigation";
import GlossaryAuthorTermsNavigation from "./GlossaryAuthorTermsNavigation";
import GlossaryAuthorGraphNavigation from "./GlossaryAuthorGraphNavigation";
// children components
import GlossaryChildren from "../GlossaryChildren";
import CategoryChildren from "../CategoryChildren";
// create glossary
// create glossary
import CreateGlossary from "../create/CreateGlossary";
// update glossary
import UpdateGlossary from "../update/UpdateGlossary";
// create Terms components
// create Terms components
import CreateTerm from "../create/CreateTerm";
import CreateTermWizard from "../wizards/CreateTermWizard";
import CreateCategorizedTerm from "../create/CreateCategorizedTerm";
Expand All @@ -36,7 +37,7 @@ import UpdateCategory from "../update/UpdateCategory";
export default function GlossaryAuthorRoutes({ glossaryAuthorURL }) {
console.log("glossaryAuthorURL=" + glossaryAuthorURL);

// the top paths
// the top paths
function getGlossariesPath() {
let path;
const currentLocationArray = glossaryAuthorURL.split("/");
Expand Down Expand Up @@ -96,6 +97,7 @@ export default function GlossaryAuthorRoutes({ glossaryAuthorURL }) {
console.log("getCategoriesAddPath " + path);
return path;
}

// top path + edit
function getGlossariesEditPath() {
return getGlossariesPath() + "/edit-glossary/:guidtoedit";
Expand All @@ -107,24 +109,40 @@ export default function GlossaryAuthorRoutes({ glossaryAuthorURL }) {
return getCategoriesPath() + "/edit-category/:guidtoedit";
}

// top path + graph
function getGlossariesGraphPath() {
return getGlossariesPath() + "/visualise-glossary/:startguidforgraph";
}
function getTermsGraphPath() {
return getTermsPath()+ "/visualise-term/:startguidforgraph";
}
function getCategoriesGraphPath() {
return getCategoriesPath() + "/visualise-category/:startguidforgraph";
}

// quickterms for glossary
function getGlossaryQuickTermsPath() {
const path = getGlossariesPath() + "/:glossaryguid/quick-terms";
console.log("getQuickTerms " + path);
return path;
}
// quickterms for category
function getCategoryQuickTermsPath() {
const path = getCategoriesPath() + "/:categoryguid/quick-category-terms";
console.log("getCategoryQuickTerms " + path);
return path;
}
// quickterms for category
function getCategoryQuickTermsPath() {
const path = getCategoriesPath() + "/:categoryguid/quick-category-terms";
console.log("getCategoryQuickTerms " + path);
return path;
}
// glossary children
function getGlossaryChildrenPath() {
const path = getGlossariesPath() + "/:glossaryguid/children";
console.log("getGlossaryChildren " + path);
return path;
}
function getGlossaryChildrenGraphPath() {
const path = getGlossariesPath() + "/visualise-glossary/:startguidforgraph";
console.log("getGlossaryChildren " + path);
return path;
}
function getGlossaryChildrenAddTermPath() {
const path = getGlossaryTermsChildrenPath() + "/add-term";
console.log("getGlossaryChildrenAddTermPath() " + path);
Expand Down Expand Up @@ -157,53 +175,64 @@ export default function GlossaryAuthorRoutes({ glossaryAuthorURL }) {
console.log("getGlossaryCategoriesChildrenPath " + path);
return path;
}
// category children
function getCategoryChildrenPath() {
const path = getCategoriesPath() + "/:categoryguid/children";
console.log("getCategoriesChildren " + path);
return path;
}
function getCategoryChildrenAddTermPath() {
const path = getCategoryTermsChildrenPath() + "/add-term";
console.log("getCategoryChildrenAddTermPath() " + path);
return path;
}
function getCategoryChildrenAddCategoryPath() {
const path = getCategoryCategoriesChildrenPath() + "/add-category";
console.log("getCategoryChildrenAddCategoryPath() " + path);
return path;
}
function getCategoryChildrenEditTermPath() {
const path = getCategoryTermsChildrenPath() + "/edit-term/:guidtoedit";
console.log("getCategoryChildrenEditTermPath() " + path);
return path;
}
function getCategoryChildrenEditCategoryPath() {
const path =
getCategoryCategoriesChildrenPath() + "/edit-category/:guidtoedit";
console.log("getCategoryChildrenEditCategoryPath() " + path);
return path;
}

function getCategoryTermsChildrenPath() {
const path = getCategoryChildrenPath() + "/terms";
console.log("getCategoryTermsChildrenPath " + path);
return path;
}
function getCategoryCategoriesChildrenPath() {
const path = getCategoryChildrenPath() + "/categories/children";
console.log("getCategoryCategoriesChildrenPath " + path);
return path;
}
// category children
function getCategoryChildrenPath() {
const path = getCategoriesPath() + "/:categoryguid/children";
console.log("getCategoriesChildren " + path);
return path;
}
function getCategoryChildrenGraphPath() {
const path = getCategoriesPath() + "/visualise-category/:startguidforgraph";
console.log("getCategoriesChildrenGraph " + path);
return path;
}
function getCategoryChildrenAddTermPath() {
const path = getCategoryTermsChildrenPath() + "/add-term";
console.log("getCategoryChildrenAddTermPath() " + path);
return path;
}
function getCategoryChildrenAddCategoryPath() {
const path = getCategoryCategoriesChildrenPath() + "/add-category";
console.log("getCategoryChildrenAddCategoryPath() " + path);
return path;
}
function getCategoryChildrenEditTermPath() {
const path = getCategoryTermsChildrenPath() + "/edit-term/:guidtoedit";
console.log("getCategoryChildrenEditTermPath() " + path);
return path;
}
function getCategoryChildrenEditCategoryPath() {
const path =
getCategoryCategoriesChildrenPath() + "/edit-category/:guidtoedit";
console.log("getCategoryChildrenEditCategoryPath() " + path);
return path;
}

function getCategoryTermsChildrenPath() {
const path = getCategoryChildrenPath() + "/terms";
console.log("getCategoryTermsChildrenPath " + path);
return path;
}
function getCategoryCategoriesChildrenPath() {
const path = getCategoryChildrenPath() + "/categories/children";
console.log("getCategoryCategoriesChildrenPath " + path);
return path;
}

return (
<Switch>
<Route path={getGlossariesAddPath()} component={CreateGlossary}></Route>
<Route path={getTermsAddPath()} component={CreateTermWizard}></Route>
<Route path={getCategoriesAddPath()} component={CreateCategoryWizard}></Route>
<Route
path={getCategoriesAddPath()}
component={CreateCategoryWizard}
></Route>
<Route path={getGlossariesEditPath()} component={UpdateGlossary}></Route>
<Route path={getGlossariesGraphPath()} component={GlossaryAuthorGraphNavigation}></Route>
<Route path={getTermsEditPath()} component={UpdateTerm}></Route>
<Route path={getTermsGraphPath()} component={GlossaryAuthorGraphNavigation}></Route>
<Route path={getCategoriesEditPath()} component={UpdateCategory}></Route>
<Route path={getCategoriesGraphPath()} component={GlossaryAuthorGraphNavigation}></Route>
<Redirect path={glossaryAuthorURL} exact to={getGlossariesPath()} />
<Route
exact
Expand Down Expand Up @@ -241,11 +270,18 @@ export default function GlossaryAuthorRoutes({ glossaryAuthorURL }) {
component={UpdateCategory}
></Route>

<Route path={getGlossaryQuickTermsPath()} component={GlossaryQuickTerms}></Route>
<Route
path={getGlossaryQuickTermsPath()}
component={GlossaryQuickTerms}
></Route>
<Route
path={getGlossaryChildrenPath()}
component={GlossaryChildren}
></Route>
<Route
path={getGlossaryChildrenGraphPath()}
component={GlossaryAuthorGraphNavigation}
></Route>
<Route
path={getGlossaryTermsChildrenPath()}
component={GlossaryAuthorTermsNavigation}
Expand All @@ -269,7 +305,11 @@ export default function GlossaryAuthorRoutes({ glossaryAuthorURL }) {
component={CategoryChildren}
exact
></Route>
<Route
<Route
path={getCategoryChildrenGraphPath()}
component={GlossaryAuthorGraphNavigation}
></Route>
<Route
path={getCategoryChildrenAddTermPath()}
exact
component={CreateCategorizedTerm}
Expand All @@ -290,7 +330,10 @@ export default function GlossaryAuthorRoutes({ glossaryAuthorURL }) {
component={UpdateCategory}
></Route>

<Route path={getCategoryQuickTermsPath()} component={CreateCategorizedQuickTerms}></Route>
<Route
path={getCategoryQuickTermsPath()}
component={CreateCategorizedQuickTerms}
></Route>
<Route
path={getCategoryTermsChildrenPath()}
component={GlossaryAuthorTermsNavigation}
Expand All @@ -299,8 +342,9 @@ export default function GlossaryAuthorRoutes({ glossaryAuthorURL }) {
path={getCategoryCategoriesChildrenPath()}
component={GlossaryAuthorChildCategoriesNavigation}
></Route>

<Route path="/" render={() => <h1>Route not recognised</h1>}></Route>
{/* <Route render={() => <h1>Route not recognised!!</h1>}></Route> */}
</Switch>
);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import { IdentificationContext } from "../../../../contexts/IdentificationContex
import Add32 from "../../../../images/carbon/Egeria_add_32";
import Delete32 from "../../../../images/carbon/Egeria_delete_32";
import Edit32 from "../../../../images/carbon/Egeria_edit_32";
import DataVis32 from "../../../../images/carbon/Egeria_datavis_32";
import Term32 from "../../../../images/odpi/Egeria_term_32";
import { LocalNodeCard, NodeCardSection } from "../NodeCard/NodeCard";
import { withRouter } from "react-router-dom";
Expand Down Expand Up @@ -148,6 +149,10 @@ const GlossaryAuthorTermsNavigation = (props) => {
function getEditNodeUrl() {
return props.match.url + "/terms/edit-term/" + selectedNodeGuid;
}
function getGraphNodeUrl() {
return props.match.url + "/terms/visualise-term/" + selectedNodeGuid;
}

const isSelected = (nodeGuid) => {
return nodeGuid === selectedNodeGuid;
};
Expand All @@ -168,6 +173,11 @@ const GlossaryAuthorTermsNavigation = (props) => {
<Edit32 kind="primary" />
</Link>
)}
{selectedNodeGuid && (
<Link to={getGraphNodeUrl()}>
<DataVis32 kind="primary" />
</Link>
)}
{selectedNodeGuid && <Delete32 onClick={() => onClickDelete()} />}
</div>
</article>
Expand Down
Loading