Skip to content

Commit

Permalink
fix: 🔨 viewer parent classes, dashboard badge
Browse files Browse the repository at this point in the history
  • Loading branch information
marcodarko committed Aug 30, 2024
1 parent a0ee632 commit a7fc915
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 40 deletions.
1 change: 1 addition & 0 deletions nuxt-app/assets/css/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -412,6 +412,7 @@ body {

.source-badge div:first-child {
background: #ccc;
color: #000;
background: -moz-linear-gradient(
top,
rgba(204, 204, 204, 1) 1%,
Expand Down
79 changes: 39 additions & 40 deletions nuxt-app/pages/ns/[namespace]/[[query]].vue
Original file line number Diff line number Diff line change
Expand Up @@ -942,48 +942,47 @@ export default {
},
findClass(query) {
let self = this;
if (self.namespace === "schema") {
console.log("SCHEMA.org case");
axios(
self.apiUrl +
"/api/registry/" +
self.namespace +
"/" +
self.query +
"?v"
)
.then((res) => {
var payload = {};
payload["schema"] = res.data;
self.$store.commit("saveSchemaForViewer", payload);
this.userSchema = res.data;
for (var i = 0; i < self.userSchema["hits"].length; i++) {
if (self.userSchema["hits"][i]["name"] === query) {
// console.log("MATCH",self.userSchema['hits'][i])
let q = self.userSchema["hits"][i];
self.getParentsOf(q);
var payload = {};
payload["queryContent"] = q;
self.$store.commit("checkIFValidationView", payload);
}
axios(
self.apiUrl +
"/api/registry/" +
self.namespace +
"/" +
self.query +
"?v"
)
.then((res) => {
var payload = {};
payload["schema"] = res.data;
self.$store.commit("saveSchemaForViewer", payload);
this.userSchema = res.data;
for (var i = 0; i < self.userSchema["hits"].length; i++) {
if (self.userSchema["hits"][i]["name"] === query) {
// console.log("MATCH",self.userSchema['hits'][i])
let q = self.userSchema["hits"][i];
self.getParentsOf(q);
var payload = {};
payload["queryContent"] = q;
self.$store.commit("checkIFValidationView", payload);
}
return false;
})
.catch((err) => {
throw err;
});
} else {
for (var i = 0; i < self.userSchema["hits"].length; i++) {
if (
self.userSchema["hits"][i]["name"] === query ||
self.userSchema["hits"][i]["label"] == query
) {
let found = self.userSchema["hits"][i];
return found;
}
}
return false;
}
return false;
})
.catch((err) => {
throw err;
});
// else {
// console.log('FINDING PARENT', query)
// for (var i = 0; i < self.userSchema["hits"].length; i++) {
// if (
// self.userSchema["hits"][i]["name"] === query ||
// self.userSchema["hits"][i]["label"] == query
// ) {
// let found = self.userSchema["hits"][i];
// return found;
// }
// }
// return false;
// }
},
findProp(query) {
let self = this;
Expand Down

0 comments on commit a7fc915

Please sign in to comment.