Skip to content

Commit

Permalink
feat(dashboard): Dashboards backend implementation (#1884)
Browse files Browse the repository at this point in the history
  • Loading branch information
Kerem Sahin authored Nov 23, 2020
1 parent 5d08314 commit 4d8320e
Show file tree
Hide file tree
Showing 47 changed files with 3,805 additions and 3 deletions.
4 changes: 3 additions & 1 deletion docker/elasticsearch-setup/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,13 @@ FROM jwilder/dockerize:0.6.1

RUN apk add --no-cache curl

COPY corpuser-index-config.json dataprocess-index-config.json dataset-index-config.json /
COPY chart-index-config.json corpuser-index-config.json dashboard-index-config.json dataprocess-index-config.json dataset-index-config.json /

CMD dockerize \
-wait http://$ELASTICSEARCH_HOST:$ELASTICSEARCH_PORT \
-timeout 120s \
curl -XPUT $ELASTICSEARCH_HOST:$ELASTICSEARCH_PORT/chartdocument --data @chart-index-config.json && \
curl -XPUT $ELASTICSEARCH_HOST:$ELASTICSEARCH_PORT/corpuserinfodocument --data @corpuser-index-config.json && \
curl -XPUT $ELASTICSEARCH_HOST:$ELASTICSEARCH_PORT/dashboarddocument --data @dashboard-index-config.json && \
curl -XPUT $ELASTICSEARCH_HOST:$ELASTICSEARCH_PORT/dataprocessdocument --data @dataprocess-index-config.json && \
curl -XPUT $ELASTICSEARCH_HOST:$ELASTICSEARCH_PORT/datasetdocument --data @dataset-index-config.json
142 changes: 142 additions & 0 deletions docker/elasticsearch-setup/chart-index-config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,142 @@
{
"settings": {
"index": {
"analysis": {
"filter": {
"autocomplete_filter": {
"type": "edge_ngram",
"min_gram": "3",
"max_gram": "20"
},
"custom_delimiter": {
"split_on_numerics": "false",
"split_on_case_change": "false",
"type": "word_delimiter",
"preserve_original": "true",
"catenate_words": "false"
}
},
"normalizer": {
"custom_normalizer": {
"filter": [
"lowercase",
"asciifolding"
],
"type": "custom"
}
},
"analyzer": {
"comma_pattern": {
"filter": [
"lowercase"
],
"type": "custom",
"tokenizer": "comma_tokenizer"
},
"comma_pattern_ngram": {
"filter": [
"lowercase",
"autocomplete_filter"
],
"type": "custom",
"tokenizer": "comma_tokenizer"
},
"delimit_edgengram": {
"filter": [
"lowercase",
"custom_delimiter",
"autocomplete_filter"
],
"tokenizer": "whitespace"
},
"delimit": {
"filter": [
"lowercase",
"custom_delimiter"
],
"tokenizer": "whitespace"
},
"lowercase_keyword": {
"filter": [
"lowercase"
],
"type": "custom",
"tokenizer": "keyword"
}
},
"tokenizer": {
"comma_tokenizer": {
"pattern": ",",
"type": "pattern"
}
}
}
}
},
"mappings": {
"doc": {
"properties": {
"access": {
"type": "keyword",
"fields": {
"ngram": {
"type": "text",
"analyzer": "delimit_edgengram"
}
}
},
"description": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword"
}
}
},
"owners": {
"type": "text",
"fields": {
"ngram": {
"type": "text",
"analyzer": "comma_pattern_ngram"
}
},
"analyzer": "comma_pattern"
},
"queryType": {
"type": "keyword"
},
"title": {
"type": "keyword",
"fields": {
"delimited": {
"type": "text",
"analyzer": "delimit"
},
"ngram": {
"type": "text",
"analyzer": "delimit_edgengram"
}
},
"normalizer": "custom_normalizer"
},
"tool": {
"type": "keyword",
"fields": {
"ngram": {
"type": "text",
"analyzer": "delimit_edgengram"
}
}
},
"type": {
"type": "keyword"
},
"urn": {
"type": "keyword",
"normalizer": "custom_normalizer"
}
}
}
}
}
136 changes: 136 additions & 0 deletions docker/elasticsearch-setup/dashboard-index-config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,136 @@
{
"settings": {
"index": {
"analysis": {
"filter": {
"autocomplete_filter": {
"type": "edge_ngram",
"min_gram": "3",
"max_gram": "20"
},
"custom_delimiter": {
"split_on_numerics": "false",
"split_on_case_change": "false",
"type": "word_delimiter",
"preserve_original": "true",
"catenate_words": "false"
}
},
"normalizer": {
"custom_normalizer": {
"filter": [
"lowercase",
"asciifolding"
],
"type": "custom"
}
},
"analyzer": {
"comma_pattern": {
"filter": [
"lowercase"
],
"type": "custom",
"tokenizer": "comma_tokenizer"
},
"comma_pattern_ngram": {
"filter": [
"lowercase",
"autocomplete_filter"
],
"type": "custom",
"tokenizer": "comma_tokenizer"
},
"delimit_edgengram": {
"filter": [
"lowercase",
"custom_delimiter",
"autocomplete_filter"
],
"tokenizer": "whitespace"
},
"delimit": {
"filter": [
"lowercase",
"custom_delimiter"
],
"tokenizer": "whitespace"
},
"lowercase_keyword": {
"filter": [
"lowercase"
],
"type": "custom",
"tokenizer": "keyword"
}
},
"tokenizer": {
"comma_tokenizer": {
"pattern": ",",
"type": "pattern"
}
}
}
}
},
"mappings": {
"doc": {
"properties": {
"access": {
"type": "keyword",
"fields": {
"ngram": {
"type": "text",
"analyzer": "delimit_edgengram"
}
}
},
"description": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword"
}
}
},
"owners": {
"type": "text",
"fields": {
"ngram": {
"type": "text",
"analyzer": "comma_pattern_ngram"
}
},
"analyzer": "comma_pattern"
},
"title": {
"type": "keyword",
"fields": {
"delimited": {
"type": "text",
"analyzer": "delimit"
},
"ngram": {
"type": "text",
"analyzer": "delimit_edgengram"
}
},
"normalizer": "custom_normalizer"
},
"tool": {
"type": "keyword",
"fields": {
"ngram": {
"type": "text",
"analyzer": "delimit_edgengram"
}
}
},
"urn": {
"type": "keyword",
"normalizer": "custom_normalizer"
}
}
}
}
}
Loading

0 comments on commit 4d8320e

Please sign in to comment.