Skip to content

Commit

Permalink
#85 remove commented out code
Browse files Browse the repository at this point in the history
Signed-off-by: David Radley <david_radley@uk.ibm.com>
  • Loading branch information
davidradl committed Mar 16, 2021
1 parent 1f74b1b commit 1b0f0b6
Show file tree
Hide file tree
Showing 10 changed files with 8 additions and 125 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,6 @@ export default function LineDisplay(props) {
}
};

// const expLine = props.expLine;

// const line = expLine.line;
// const lineDigest = expLine.lineDigest;
// const label = lineDigest.label;
// const gen = lineDigest.gen;
const line = props.line;
const label = line.name;
const gen = line.gen;
Expand All @@ -45,20 +39,8 @@ export default function LineDisplay(props) {
return (
<div className="instance-details-container">
<div className="instance-details-item">Line : {label}</div>
{/* {JSON.stringify(line)} */}
{/* <div className="instance-details-item">Version : {line.version}</div> */}
{/* <div className="instance-details-item">
Status : <InstanceStatusDisplay inst={line} />
</div> */}
{/* <div className="instance-details-item">
Properties :{" "}
{!line.properties ? (
"empty"
) : (
<InstancePropertiesDisplay properties={line.attributes} />
)}
</div> */}
<div className="instance-details-item">Description : {line.description}</div>

<div className="instance-details-item">Description : {line.description}</div>
<div className="instance-details-item">GUID : {line.guid}</div>
<div className="instance-details-item">Description : {line.description}</div>
Line End1 - {line.end1.name} :
Expand Down Expand Up @@ -91,8 +73,6 @@ export default function LineDisplay(props) {
}
</li>
<li className="details-sublist-item">instanceLicense : {systemAttributes.instanceLicense ? systemAttributes.instanceLicense : "empty"}</li>
{/* <li className="details-sublist-item">instanceProvenanceType : {entity.instanceProvenanceType ? entity.instanceProvenanceType : "empty"}</li>
<li className="details-sublist-item">replicatedBy : {entity.replicatedBy ? entity.replicatedBy : "empty"}</li> */}
</ul>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ export default function NodeDisplay(props) {
}
};


const node = props.node;
const label = node.name;
const description = node.description;
Expand All @@ -51,8 +50,7 @@ export default function NodeDisplay(props) {
<div className="instance-details-item">Qualified Name : {qualifiedName}</div>
<div className="instance-details-item">Type : {typeName}</div>
<div className="instance-details-item">Version : {systemAttributes.version}</div>
{/* <div className="instance-details-item">Status : <InstanceStatusDisplay inst={entity} /></div> */}
{/* TODO Node specific properties */}
{/* TODO Node specific properties */}

<button className="collapsible-non-bold" id="querySummary" onClick={flipSection}> Generation information : </button>
<div className="content">
Expand All @@ -75,8 +73,6 @@ export default function NodeDisplay(props) {
}
</li>
<li className="details-sublist-item">instanceLicense : {systemAttributes.instanceLicense ? systemAttributes.instanceLicense : "empty"}</li>
{/* <li className="details-sublist-item">instanceProvenanceType : {entity.instanceProvenanceType ? entity.instanceProvenanceType : "empty"}</li>
<li className="details-sublist-item">replicatedBy : {entity.replicatedBy ? entity.replicatedBy : "empty"}</li> */}
</ul>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -569,7 +569,6 @@ export default function Diagram(props) {
nodes.attr('cy',function(d) { return d.y = Math.max(node_margin, Math.min(height - node_margin, d.y)); });
nodes.attr('transform', function(d) { return "translate(" + d.x + "," + d.y + ")";});


/*
* Highlight a selected node, if it is the instance that has been selected or just loaded
* (in which case it is selected)
Expand Down Expand Up @@ -689,7 +688,6 @@ export default function Diagram(props) {
}
};


useEffect(
() => {
if ( d3Container.current ) {
Expand All @@ -709,7 +707,6 @@ export default function Diagram(props) {
[ loc_force, createMarker ]
)


useEffect(
() => {
if ( d3Container.current ) {
Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -160,8 +160,6 @@ export default function GraphControls(props) {

};



/*
* Handler for submit of traversal results modal
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,18 +75,6 @@ export default function HistoryResultHandler(props) {
{item.query}
</div>
</div>
{/* <div className="inscolumn">
<ul>
{item.instances.map(inst => (
<li key={inst.label}>{inst.category} {inst.label} ({inst.guid})
{ (inst.provenance === "refCopy" ||
inst.provenance === "home" ||
inst.provenance === "proxy")
? " ("+inst.provenance+")" : "" }
</li>
))}
</ul>
</div> */}
</div>
))}
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ export default function TraversalResultHandler(props) {

const interactionContext = useContext(InteractionContext);

const nodeTypes = props.nodeTypes;
const lineTypes = props.lineTypes;
const nodeTypes = props.nodeTypes;
const lineTypes = props.lineTypes;
const selectCallback = props.selectCallback;
const setAllCallback = props.setAllCallback;

Expand Down Expand Up @@ -122,8 +122,6 @@ export default function TraversalResultHandler(props) {
}

else {


let resultsDisplay = (

<div>
Expand Down Expand Up @@ -238,7 +236,6 @@ TraversalResultHandler.propTypes = {
onSubmit : PropTypes.func.isRequired,
selectCallback : PropTypes.func.isRequired,
setAllCallback : PropTypes.func.isRequired,
//spec : PropTypes.object,
nodeTypes : PropTypes.array,
lineTypes : PropTypes.array
};
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@ const InstanceRetrieval = (props) => {
const secondLastSegment = urlSegments[urlSegments.length - 2];
const nodeTypeKey = secondLastSegment.substring("visualise-".length);
console.log("nodeTypeKey" + nodeTypeKey);

//TODO pass through the onSuccess and onErrors
instancesContext.loadNode(guidToLoad, nodeTypeKey);
}
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -548,8 +548,8 @@ const InstancesContextProvider = (props) => {

/*
* Process lines...
* These are in a map of RexExpandedLine objects, inside of
* which are the RexLineDigest objects.
* These are in a map of NodeDigest objects, inside of
* which are the LineDigest objects.
* Anything that is known should be removed from the traversal.
* Anything new can remain and should be assigned the next gen.
*/
Expand Down Expand Up @@ -669,41 +669,7 @@ const InstancesContextProvider = (props) => {
reportFailedOperation("Get Node", message);
};

/*
* Callback for completion of loadLine
*/
// const _loadLine = useCallback(
// (json) => {
// if (json !== null) {
// if (json.relatedHTTPCode === 200) {
// /*
// * Should have an expandedLine, if the Line was not found the response
// * will have included a non 200 status code and a LineNotKnownException
// */
// let expLine = json.expandedLine;
// if (expLine !== null) {
// processRetrievedLine(expLine);
// return;
// }
// }
// }
// /*
// * On failure ...
// */
// reportFailedOperation("Get Line", json);
// },
// [processRetrievedLine, reportFailedOperation]
// );

/*
* Function to get Line by GUID from the specified repository server
*/
// const loadLine = (lineGUID) => {
// // repositoryServerContext.callPOST(
// // "instances/line",
// // { lineGUID : lineGUID },
// // _loadLine);
// };

const loadLine = (lineGUID, lineTypeKey) => {
console.log("loadLine");
if (lineTypeKey === undefined) {
Expand Down Expand Up @@ -750,19 +716,6 @@ const InstancesContextProvider = (props) => {
reportFailedOperation("Get Line", message);
};

/*
* Function to get Line by GUID from the repository
*/
// const loadLine = useCallback(
// (lineGUID) => {

// repositoryServerContext.repositoryPOST("instances/line",
// { lineGUID : lineGUID },
// _loadLine);
// },
// [_loadLine, repositoryServerContext]
// );

/*
* clearFocusInstance resets the category, instance, guid for the focus instance
* to a state in which nothing is selected - there is no focus.
Expand Down Expand Up @@ -1108,26 +1061,6 @@ const InstancesContextProvider = (props) => {

break;

// case "NodeSearch":
// /*
// * Format querySummary as "Node Search Expression [<expr>] <guid>"
// */
// querySummary = querySummary.concat(" Node Search: ");
// querySummary = querySummary.concat(
// " Expression [" + genContent.searchText + "]"
// );
// break;

// case "lineSearch":
// /*
// * Format querySummary as "Line Search Expression [<expr>] <guid>"
// */
// querySummary = querySummary.concat(" Line Search: ");
// querySummary = querySummary.concat(
// " Expression [" + genContent.searchText + "]"
// );
// break;

default:
/*
* Found a gen result with no operation type.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,10 +109,6 @@ const InteractionContextProvider = (props) => {
},
[]
);





return (
<InteractionContext.Provider
Expand Down

0 comments on commit 1b0f0b6

Please sign in to comment.