-
Notifications
You must be signed in to change notification settings - Fork 244
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2367 from CannonLock/SOFTWARE-5095
Software 5095
- Loading branch information
Showing
9 changed files
with
523 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
import {create_ul} from "../util.js"; | ||
import {TablePage} from "../table.js" | ||
|
||
const data_function = async () => { | ||
let data = await fetch("/vosummary/json").then(d => d.json()) | ||
return data | ||
} | ||
|
||
const columns = [ | ||
{ | ||
id: 'LongName', | ||
name: 'Long Name' | ||
}, { | ||
id: 'PrimaryURL', | ||
name: 'Primary URL' | ||
}, { | ||
id: 'FieldsOfScience', | ||
name: "FieldsOfScience", | ||
data: d => d, | ||
formatter: data => { | ||
if(!("FieldsOfScience" in data && data["FieldsOfScience"] != null)){ | ||
return "" | ||
} | ||
let list = [] | ||
for(const [key, value] of Object.entries(data["FieldsOfScience"])){ | ||
list = list.concat(value["Field"]) | ||
} | ||
return list.join(", ") | ||
}, | ||
html: data => { | ||
let key = "FieldsOfScience" | ||
if(key in data){ | ||
return create_ul(data[key]) | ||
} | ||
let d = document.createElement("span") | ||
d.innerText = "null" | ||
return d | ||
} | ||
}, { | ||
id: "DataFederations", | ||
name: 'Data Federation', | ||
hidden: true, | ||
data: d => d, | ||
html: data => { | ||
let key = "DataFederations" | ||
if(key in data){ | ||
return create_ul(data[key]) | ||
} | ||
let d = document.createElement("span") | ||
d.innerText = "null" | ||
return d | ||
} | ||
}, { | ||
id: 'OASIS', | ||
name: 'Oasis', | ||
hidden: true, | ||
data: d => d, | ||
html: data => { | ||
let key = "OASIS" | ||
if(key in data){ | ||
return create_ul(data[key]) | ||
} | ||
let d = document.createElement("span") | ||
d.innerText = "null" | ||
return d | ||
} | ||
}, { | ||
id: 'Credentials', | ||
name: 'Credentials', | ||
hidden: true, | ||
data: d => d, | ||
html: data => { | ||
let key = "Credentials" | ||
if(key in data && data[key]){ | ||
return create_ul(data[key]["TokenIssuers"]["TokenIssuer"]) | ||
} | ||
let d = document.createElement("span") | ||
d.innerText = "null" | ||
return d | ||
} | ||
} | ||
] | ||
|
||
const page = new TablePage(data_function, columns) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.