Skip to content

Commit

Permalink
[front] Modify some db icons and colors
Browse files Browse the repository at this point in the history
Signed-off-by: min.tian <[email protected]>
  • Loading branch information
alwayslove2013 authored and XuanYang-cn committed Jul 12, 2023
1 parent 5cbd524 commit 934f153
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 7 deletions.
6 changes: 4 additions & 2 deletions vectordb_bench/frontend/components/get_results/saveAsImage.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,17 @@ def saveAsImage(container, pageName):
const buttons = Array.from(streamlitDoc.querySelectorAll('.stButton > button'));
const imgButton = buttons.find(el => el.innerText === '{buttonText}');
imgButton.innerText = 'Creating Image...';
if (imgButton)
imgButton.innerText = 'Creating Image...';
html2canvas(stApp, {{ allowTaint: false, useCORS: true }}).then(function (canvas) {{
a = document.createElement('a');
a.href = canvas.toDataURL("image/jpeg", 1.0).replace("image/jpeg", "image/octet-stream");
a.download = '{pageName}.png';
a.click();
imgButton.innerText = '{buttonText}';
if (imgButton)
imgButton.innerText = '{buttonText}';
}})
</script>""",
height=0,
Expand Down
14 changes: 9 additions & 5 deletions vectordb_bench/frontend/const/styles.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,23 +32,27 @@ def getPatternShape(i):
FAVICON = "https://assets.zilliz.com/favicon_f7f922fe27.png"
HEADER_ICON = "https://assets.zilliz.com/vdb_benchmark_db790b5387.png"

# RedisCloud icon: https://assets.zilliz.com/Redis_Cloud_74b8bfef39.png
# Elasticsearch icon: https://assets.zilliz.com/elasticsearch_beffeadc29.png
# Chroma icon: https://assets.zilliz.com/chroma_ceb3f06ed7.png
DB_TO_ICON = {
DB.Milvus: "https://assets.zilliz.com/milvus_c30b0d1994.png",
DB.ZillizCloud: "https://assets.zilliz.com/zilliz_5f4cc9b050.png",
DB.ElasticCloud: "https://assets.zilliz.com/elasticsearch_beffeadc29.png",
DB.ElasticCloud: "https://assets.zilliz.com/Elatic_Cloud_dad8d6a3a3.png",
DB.Pinecone: "https://assets.zilliz.com/pinecone_94d8154979.png",
DB.QdrantCloud: "https://assets.zilliz.com/qdrant_b691674fcd.png",
DB.WeaviateCloud: "https://assets.zilliz.com/weaviate_4f6f171ebe.png",
DB.PgVector: "https://assets.zilliz.com/milvus_c30b0d1994.png",
DB.PgVector: "https://assets.zilliz.com/PG_Vector_d464f2ef5f.png",
}


# RedisCloud color: #0D6EFD
# Chroma color: #FFC107
COLOR_MAP = {
DB.Milvus.value: "#0DCAF0",
DB.ZillizCloud.value: "#0D6EFD",
DB.ElasticCloud.value: "#fdc613",
DB.ElasticCloud.value: "#04D6C8",
DB.Pinecone.value: "#6610F2",
DB.QdrantCloud.value: "#D91AD9",
DB.WeaviateCloud.value: "#20C997",
DB.PgVector.value: "#999",
DB.PgVector.value: "#4C779A",
}

0 comments on commit 934f153

Please sign in to comment.