Skip to content

Commit

Permalink
Merge pull request #102 from ulitol97/master
Browse files Browse the repository at this point in the history
0.2.12
  • Loading branch information
ulitol97 authored May 13, 2022
2 parents 1ce8e5c + dae2616 commit b2c83d2
Show file tree
Hide file tree
Showing 6 changed files with 31 additions and 21 deletions.
2 changes: 1 addition & 1 deletion .env
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
REACT_APP_RDFSHAPE_HOST=https://api.rdfshape.weso.es
REACT_APP_RDFSHAPE_WS_HOST=wss://api.rdfshape.weso.es
REACT_APP_VERSION=0.2.11
REACT_APP_VERSION=0.2.12
2 changes: 1 addition & 1 deletion .env.development
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
REACT_APP_RDFSHAPE_HOST=http://localhost:8080
REACT_APP_RDFSHAPE_WS_HOST=ws://localhost:8080
REACT_APP_VERSION=0.2.11
REACT_APP_VERSION=0.2.12
28 changes: 14 additions & 14 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "rdfshape-client",
"version": "0.2.11",
"version": "0.2.12",
"private": true,
"dependencies": {
"3dshex": "^0.5.2",
Expand Down
2 changes: 1 addition & 1 deletion src/results/ResultValidateStream.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ function ResultValidateStream({
[API.queryParameters.streaming.date]:
result[API.queryParameters.streaming.date],
};
// Stream will to halt on invalid: invalidating result, the report is contained in itself and there's no date
// Stream will halt on invalid: invalidating result, the report is contained in itself and there's no date
else
return {
...result,
Expand Down
16 changes: 13 additions & 3 deletions src/shex/ShexValidate.js
Original file line number Diff line number Diff line change
Expand Up @@ -153,8 +153,18 @@ function ShexValidate(props) {
const { type, content } = messageData;
switch (type) {
case API.queryParameters.streaming.responseTypes.result:
// Result received, update result list with it if not errored
if (content.status != errored) setResults([content, ...results]);
// We got a result with an embedded error message, set error
if (!Array.isArray(content?.report?.shapeMap)) {
setStreamValidationError(
content?.report?.message ||
API.texts.streamingTexts.unknownError
);
// Stream was not stopped, so we disconnect ourselves
stopStreamingValidation();
}
// Result received, update result list with it after checking that it is not errored (and thus omitted)
else if (content.status != errored)
setResults([content, ...results]);
break;
case API.queryParameters.streaming.responseTypes.error:
// Stream was stopped, show/handle errors, set state...
Expand Down Expand Up @@ -531,7 +541,7 @@ function ShexValidate(props) {
</Button>
</Form>
</Col>
{loading || results || permalink || error ? (
{loading || results.length || permalink || error ? (
<Col className={"half-col"}>
{loading ? (
<ProgressBar
Expand Down

0 comments on commit b2c83d2

Please sign in to comment.