Skip to content

Commit

Permalink
Updated dashboard config for new es instance and update details a bit
Browse files Browse the repository at this point in the history
  • Loading branch information
akeldamas committed Aug 23, 2024
1 parent c857f59 commit 0d32c93
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 9 deletions.
48 changes: 42 additions & 6 deletions apps/rda/src/config/elasticSearch.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ const fieldConfig: Partial<RDTSearchUIProps> = {
export const elasticConfig = [
{
name: "RDA Catalogue",
url: "https://es.ohsmart.dansdemo.nl/dans-rda2",
url: "https://tiger.laurenstobias.com/rda",
fullTextFields: fieldConfig.fullTextFields,
fullTextHighlight: fieldConfig.fullTextHighlight,
resultBodyComponent: Rda2Result,
Expand All @@ -33,7 +33,7 @@ export const elasticConfig = [
<ListFacet
config={{
id: "indi",
field: "individuals.fullname.keyword",
field: "individuals.fullName.keyword",
title: {
en: "Individuals",
nl: "Individuen",
Expand Down Expand Up @@ -96,7 +96,7 @@ export const elasticConfig = [
<ListFacet
config={{
id: "wf",
field: "workflows.workflowstate.keyword",
field: "workflows.WorkflowState.keyword",
title: {
en: "Workflows",
nl: "Workflows",
Expand All @@ -108,7 +108,7 @@ export const elasticConfig = [
<PieChartFacet
config={{
id: "uritype",
field: "uritype.uritype.keyword",
field: "uri_type.uri_type.keyword",
title: {
en: "URI types",
nl: "URI types",
Expand All @@ -120,7 +120,7 @@ export const elasticConfig = [
<PieChartFacet
config={{
id: "subjects",
field: "subjects.keyword",
field: "subjects.keyword.keyword",
title: {
en: "Subjects",
nl: "Onderwerp",
Expand Down Expand Up @@ -165,6 +165,42 @@ export const elasticConfig = [
rows: 1,
}}
/>,
<ListFacet
config={{
id: "keywords-vocab",
field: "keywords.keyword.keyword",
title: {
en: "Keywords",
nl: "Trefwoorden",
},
cols: 2,
rows: 1,
}}
/>,
<PieChartFacet
config={{
id: "gorc-elements",
field: "gorc_elements.element.keyword",
title: {
en: "GORC Elements",
nl: "GORC Elementen",
},
cols: 3,
rows: 1,
}}
/>,
<PieChartFacet
config={{
id: "gorc-attributes",
field: "gorc_attributes.attribute.keyword",
title: {
en: "GORC Attributes",
nl: "GORC Attributen",
},
cols: 3,
rows: 1,
}}
/>,
<ListFacet
config={{
id: "pw",
Expand Down Expand Up @@ -205,7 +241,7 @@ export const elasticConfig = [
<ListFacet
config={{
id: "insttype",
field: "institutions.english_name.keyword",
field: "related_institutions.english_name.keyword",
title: {
en: "Related institutions",
nl: "Gerelateerde instellingen",
Expand Down
10 changes: 7 additions & 3 deletions apps/rda/src/pages/record/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,11 @@ function Metadata({
}) {
if (value == null) return null;

const _value = Array.isArray(value) ? value.join(" || ") : value;
let _value = Array.isArray(value) ? value.join(" || ") : value;

if (_value.length < 1) {
_value = "-"
}

return (
<div style={style}>
Expand All @@ -224,9 +228,9 @@ function Metadata({

export function MetadataList({ record }: { record: RdaRecord | Result }) {
const individuals =
record.individuals ? record.individuals.map((i: any) => i.fullname) : [];
record.individuals ? record.individuals.map((i: any) => i.fullName) : [];
const workflows =
record.workflows ? record.workflows.map((w: any) => w.workflowstate) : [];
record.workflows ? record.workflows.map((w: any) => w.WorkflowState) : [];
const rights =
record.rights ? record.rights.map((r: any) => r.description) : [];
const pathways =
Expand Down

0 comments on commit 0d32c93

Please sign in to comment.