Skip to content

Commit

Permalink
Merge pull request #254 from biothings/creid-portal
Browse files Browse the repository at this point in the history
CREID portal
  • Loading branch information
marcodarko authored May 1, 2024
2 parents 6174718 + f30e8f1 commit 488a3c1
Show file tree
Hide file tree
Showing 26 changed files with 885 additions and 499 deletions.
6 changes: 3 additions & 3 deletions nuxt-app/assets/css/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,12 @@
max-width: 200px;
}

.inputbox{
.inputbox {
border-bottom: 1px #e1e1e1 solid;
transition: all .5s;
transition: all 0.5s;
}

.inputbox:hover{
.inputbox:hover {
background-color: white;
}

Expand Down
31 changes: 31 additions & 0 deletions nuxt-app/assets/img/creid/icon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion nuxt-app/components/EditDescription.vue
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export default {
return method;
},
allowOutsideClick: () => !Swal.isLoading(),
backdrop: true
backdrop: true,
})
.then((result) => {
let payload = {
Expand Down
5 changes: 3 additions & 2 deletions nuxt-app/components/EditorClassBox.vue
Original file line number Diff line number Diff line change
Expand Up @@ -444,7 +444,8 @@
></small
>
<small v-if="propExists" class="text-danger"
>A property with this name already exists, any changes will replace existing value unless the property name changes.</small
>A property with this name already exists, any changes will
replace existing value unless the property name changes.</small
>
</div>
<div class="form-group">
Expand Down Expand Up @@ -531,7 +532,7 @@
class="btn btn-lg w-50 btn-success"
@click.prevent="submitNewProp()"
>
{{ addNewPropReady && !propExists ? 'Submit' : 'Update' }}
{{ addNewPropReady && !propExists ? "Submit" : "Update" }}
</button>
</div>
</form>
Expand Down
54 changes: 52 additions & 2 deletions nuxt-app/components/QueryBox.vue
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,18 @@
<ul style="list-style: none">
<li v-for="path in getPaths(q)">
<span v-for="(item, index) in path">
<a
<!-- <a
:class="[index !== path.length - 1 ? 'text-muted' : textColor]"
class="font-weight-bold"
:href="getBreadcrumbLink(item)"
v-text="item"
></a>
></a> -->
<span
:class="[index !== path.length - 1 ? 'text-muted' : textColor]"
class="font-weight-bold pointer"
@click="goTo(item)"
v-text="item"
></span>
<span v-if="index !== path.length - 1"
>&nbsp;<font-awesome-icon
icon="fas fa-caret-right"
Expand Down Expand Up @@ -141,6 +147,17 @@
</tbody>
</table>
</div>
<div
v-if="!q.properties && !validationView"
class="jumbotron d-flex justify-content-center align-items-center"
>
<div>
<p class="m-4">
This class does not define any new properties, instead all of its
properties are directly inherited from it's subclasses.
</p>
</div>
</div>
<div v-if="validationView && q.validation">
<ValidationBox :validation="q.validation"></ValidationBox>
</div>
Expand All @@ -150,6 +167,7 @@
<script>
import ValidationBox from "./ValidationBox.vue";
import { mapGetters, mapActions } from "vuex";
import Notify from "simple-notify";
export default {
name: "QueryBox",
Expand Down Expand Up @@ -238,6 +256,38 @@ export default {
}
return res;
},
goTo(string) {
let res = "";
let arr = [];
if (string.includes(":")) {
arr = string.split(":");
if (arr[0] == "schema") {
new Notify({
status: "warning",
title: "Navigation Unavailable",
text: "This class cannot be navigated to directly. Taking you to its homepage.",
effect: "fade",
speed: 300,
customClass: null,
customIcon: null,
showIcon: true,
showCloseButton: true,
autoclose: true,
autotimeout: 3000,
gap: 20,
distance: 20,
type: 1,
position: "right top",
});
this.$router.push("/ns/schema");
return;
}
res = `/ns/${arr[0]}/${arr[arr.length - 1]}`;
} else {
res = string;
}
this.$router.push(res);
},
getLink(qName) {
// console.log('getLink', qName)
try {
Expand Down
6 changes: 3 additions & 3 deletions nuxt-app/components/ResourceRegistryItem.vue
Original file line number Diff line number Diff line change
Expand Up @@ -126,9 +126,9 @@ export default {
return outbreakIcon;
} else if (guide.includes("n3c")) {
return n3cLogo;
} else if (guide.includes("nde")){
return nde
}else {
} else if (guide.includes("nde")) {
return nde;
} else {
return dde;
}
},
Expand Down
63 changes: 45 additions & 18 deletions nuxt-app/components/SchemaViewerForm.vue
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,11 @@ import woohoo from "@/assets/img/woohoo-01.svg";
import oh_no from "@/assets/img/oh_no-01.svg";
import dde_logo from "@/assets/img/dde-logo-o.svg";
import not_right from "@/assets/img/not_right-01.svg";
import broken from "@/assets/img/broken_root-01.svg"
import check_validation from "@/assets/img/check_validation-01.svg"
import check_range from "@/assets/img/check_range-01.svg"
import check_definition from "@/assets/img/check_definition-01.svg"
import check_label from "@/assets/img/label_issue-01.svg"
import broken from "@/assets/img/broken_root-01.svg";
import check_validation from "@/assets/img/check_validation-01.svg";
import check_range from "@/assets/img/check_range-01.svg";
import check_definition from "@/assets/img/check_definition-01.svg";
import check_label from "@/assets/img/label_issue-01.svg";
export default {
data: function () {
return {
Expand Down Expand Up @@ -163,45 +163,72 @@ export default {
let msg_html = "<div>";
switch (type) {
case "no_path_to_root":
msg_html += `<img src="` + broken +`" height="50px" alt="No path to root class"/>
msg_html +=
`<img src="` +
broken +
`" height="50px" alt="No path to root class"/>
<small class="text-primary d-block">Tip: A broken path can generate more errors,
we recommend fixing this first and see if this fixes other issues.</small>`;
break;
case "invalid_validation_schema":
msg_html += `<img src="` + check_validation + `" height="50px" alt="check validation"/>`;
msg_html +=
`<img src="` +
check_validation +
`" height="50px" alt="check validation"/>`;
break;
case "undefined_rangeincludes":
msg_html += `<img src="` + check_range +`" height="50px" alt="check rangeIncludes"/>`;
msg_html +=
`<img src="` +
check_range +
`" height="50px" alt="check rangeIncludes"/>`;
break;
case "non_class_or_property_@type":
msg_html += `<img src="` + check_range + `" height="50px" alt="check rangeIncludes"/>`;
msg_html +=
`<img src="` +
check_range +
`" height="50px" alt="check rangeIncludes"/>`;
break;
case "invalid_property":
msg_html += `<img src="` + check_definition + `" height="50px" alt="check definition"/>`;
msg_html +=
`<img src="` +
check_definition +
`" height="50px" alt="check definition"/>`;
break;
case "invalid_class":
msg_html += `<img src="` + check_definition + `" height="50px" alt="check definition"/>`;
msg_html +=
`<img src="` +
check_definition +
`" height="50px" alt="check definition"/>`;
break;
case "dup_label":
msg_html += `<img src="` + check_label + `" height="50px" alt="check labels"/>`;
msg_html +=
`<img src="` + check_label + `" height="50px" alt="check labels"/>`;
break;
case "unmatched_label":
msg_html += `<img src="` + check_label + `" height="50px" alt="check labels"/>`;
msg_html +=
`<img src="` + check_label + `" height="50px" alt="check labels"/>`;
break;
case "missing_rangeincludes":
msg_html += `<img src="` + check_range + `" height="50px" alt="check ranges"/>`;
msg_html +=
`<img src="` + check_range + `" height="50px" alt="check ranges"/>`;
break;
case "undefined_domainincludes_class":
msg_html += `<img src="` + check_definition + `" height="50px" alt="check definition"/>`;
msg_html +=
`<img src="` +
check_definition +
`" height="50px" alt="check definition"/>`;
break;
case "invalid_property_label":
msg_html += `<img src="` + check_label + `" height="50px" alt="check label"/>`;
msg_html +=
`<img src="` + check_label + `" height="50px" alt="check label"/>`;
break;
case "invalid_class_label":
msg_html += `<img src="` + check_label + `" height="50px" alt="check labels"/>`;
msg_html +=
`<img src="` + check_label + `" height="50px" alt="check labels"/>`;
break;
default:
msg_html += `<img src="` + not_right + `" height="50px" alt="oh no"/>`;
msg_html +=
`<img src="` + not_right + `" height="50px" alt="oh no"/>`;
break;
}
msg_html +=
Expand Down
2 changes: 1 addition & 1 deletion nuxt-app/components/global/AnyOf.vue
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ export default {
});
},
allowOutsideClick: () => !self.$swal.isLoading(),
backdrop: true
backdrop: true,
})
.then((result) => {
if (result.value) {
Expand Down
2 changes: 1 addition & 1 deletion nuxt-app/components/global/OneOf.vue
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ export default {
});
},
allowOutsideClick: () => !self.$swal.isLoading(),
backdrop: true
backdrop: true,
})
.then((result) => {
if (result.value) {
Expand Down
Loading

0 comments on commit 488a3c1

Please sign in to comment.