From 43bd58943a593daf03eb2c1a1a7535e78f608f46 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 23 Feb 2023 11:56:13 +0800 Subject: [PATCH] desc for dataset (#487) (#489) * desc for dataset * fix wrong intro doc name * removed the fifa keyword * fix: style --------- Co-authored-by: Wey Gu Co-authored-by: Bruce --- app/config/locale/en-US.json | 11 ++++++++++- app/config/locale/zh-CN.json | 11 ++++++++++- app/pages/Welcome/index.module.less | 23 ++++++++++++++++------- app/pages/Welcome/index.tsx | 15 ++++++++++++++- public/datasets/fifa2022.ngql | 4 ++-- 5 files changed, 52 insertions(+), 12 deletions(-) diff --git a/app/config/locale/en-US.json b/app/config/locale/en-US.json index 13d26e9e..41cbc2b3 100644 --- a/app/config/locale/en-US.json +++ b/app/config/locale/en-US.json @@ -73,7 +73,16 @@ "ngqlIntro": "NebulaGraph Query Language (nGQL)", "ngqlIntroTip": "nGQL is a declarative graph query language for NebulaGraph. It allows expressive and efficient graph patterns. ", "start": "Get Started", - "sketchIntro": "Schema drafting" + "sketchIntro": "Schema drafting", + "basketballplayerIntro": "A typical schema composed of two vertex types (player and team) and two edge types (serve and follow), widely referenced by documentation.", + "snsIntro": "Social Network Graph demo, new friend recommendation, feed generation, etc.", + "movieIntro": "Movie recommendation with CBF, ItemCF and UserCF in Graph.", + "datalineageIntro": "Metadata governance on NebulaGraph, data lineage query, data dependency analysis, etc.", + "idMappingIntro": "ID Mapping, Identity Resolution for a user system in Graph", + "fifa2022Intro": "2022 Football World Game knowledge graph, try predict the winner, assuming we don't know the result.", + "shareholdingIntro": "Shareholding graph, query the shareholding relationship of a company, and the relationship between the company and the shareholder.", + "openstackIntro": "A demo of AI Ops with Graph, taking OpenStack as an example, where all resources were included in one graph.", + "fraudDetectionIntro": "Fraud detection with Graph, taking loan application as an example" }, "warning": { "connectError": "Connection refused, please configure server again", diff --git a/app/config/locale/zh-CN.json b/app/config/locale/zh-CN.json index 32b055ed..f9ef4138 100644 --- a/app/config/locale/zh-CN.json +++ b/app/config/locale/zh-CN.json @@ -73,7 +73,16 @@ "ngqlIntro": "NebulaGraph 查询语言 (nGQL)", "ngqlIntroTip": "nGQL 是 NebulaGraph 使用的的声明式图查询语言,是为开发和运维人员设计的类 SQL 查询语言,易于学习。", "start": "快速开始", - "sketchIntro": "Schema 草图" + "sketchIntro": "Schema 草图", + "basketballplayerIntro": "最简单的示例图谱空间,最广泛被文档中引用的数据集", + "snsIntro": "社交网络示例图谱空间,包含用户、好友、帖子、评论等数据,新好友推荐、时间线生成、社交分析", + "movieIntro": "电影推荐图谱,尝试在图上做 CBF、ItemCF 和 UserCF 算法", + "datalineageIntro": "元数据管理实例数据集,血缘查询、血缘依赖分析、大数据治理", + "idMappingIntro": "ID Mapping,用户系统上的实体分析案例", + "fifa2022Intro": "面向关系而非复杂属性的世界杯图谱,尝试利用图算法预测冠军吧(假设我们还不知道冠军)", + "shareholdingIntro": "股权关系图谱,图上实做股权穿透、公司实控人分析、背景调查", + "openstackIntro": "图驱动的复杂基础设施智能运维实操,基于 OpenStack 全资源抓取图谱的例子", + "fraudDetectionIntro": "欺诈检测的图应用,以借贷场景为例" }, "warning": { "connectError": "数据库连接有误,请重新配置", diff --git a/app/pages/Welcome/index.module.less b/app/pages/Welcome/index.module.less index 889677ab..aacec17c 100644 --- a/app/pages/Welcome/index.module.less +++ b/app/pages/Welcome/index.module.less @@ -209,7 +209,7 @@ box-shadow: 0 0 4px #ccc; } .withCoverContent { - height: 190px; + height: 240px; padding: 16px 30px 20px; display: flex; flex-direction: column; @@ -221,7 +221,6 @@ align-items: center; } .contentTitle { - flex: 1 1 auto; padding: 18px 0 6px; font-family: Roboto-Regular, sans-serif; font-style: normal; @@ -229,10 +228,20 @@ font-size: 20px; color: #000; overflow: hidden; - word-break: break-all; - display: -webkit-box; - -webkit-line-clamp: 2; - -webkit-box-orient: vertical; + white-space: nowrap; + text-overflow: ellipsis; + } + .contentDescription { + font-weight: 300; + font-size: 14px; + color: #4F4F4F; + flex: 1 1 auto; + .descInner { + overflow: hidden; + display: -webkit-box; + -webkit-line-clamp: 3; + -webkit-box-orient: vertical; + } } .infoWrapper { color: #4f4f4f; @@ -246,7 +255,7 @@ } } &.withCover { - height: 400px; + // height: 400px; padding: 0; display: block; .actionWrapper { diff --git a/app/pages/Welcome/index.tsx b/app/pages/Welcome/index.tsx index 65eea80d..b425af90 100644 --- a/app/pages/Welcome/index.tsx +++ b/app/pages/Welcome/index.tsx @@ -66,6 +66,7 @@ export type DatasetType = 'starter' | 'solution'; export interface DatasetItem { type: DatasetType; tags?: string[]; + description: string; spaceName: string; fileName: string; rename?: string; @@ -110,6 +111,7 @@ const getDatasetList = (): DatasetItem[] => { { type: 'starter', tags: ['starter'], + description: intl.get('doc.basketballplayerIntro'), spaceName: 'demo_basketballplayer', fileName: 'basketballplayer', rename: undefined as unknown as string, @@ -123,6 +125,7 @@ const getDatasetList = (): DatasetItem[] => { { type: 'solution', tags: ['solution'], + description: intl.get('doc.shareholdingIntro'), spaceName: 'demo_shareholding', fileName: 'shareholding', rename: undefined as unknown as string, @@ -136,6 +139,7 @@ const getDatasetList = (): DatasetItem[] => { { type: 'starter', tags: ['starter'], + description: intl.get('doc.snsIntro'), spaceName: 'demo_sns', fileName: 'sns', rename: undefined as unknown as string, @@ -149,6 +153,7 @@ const getDatasetList = (): DatasetItem[] => { { type: 'solution', tags: ['solution'], + description: intl.get('doc.openstackIntro'), spaceName: 'demo_ai_ops', fileName: 'openstack', rename: undefined as unknown as string, @@ -162,6 +167,7 @@ const getDatasetList = (): DatasetItem[] => { { type: 'starter', tags: ['starter'], + description: intl.get('doc.datalineageIntro'), spaceName: 'demo_data_lineage', fileName: 'datalineage', rename: undefined as unknown as string, @@ -175,6 +181,7 @@ const getDatasetList = (): DatasetItem[] => { { type: 'starter', tags: ['starter'], + description: intl.get('doc.movieIntro'), spaceName: 'demo_movie_recommendation', fileName: 'movie', rename: undefined as unknown as string, @@ -188,6 +195,7 @@ const getDatasetList = (): DatasetItem[] => { { type: 'starter', tags: ['starter'], + description: intl.get('doc.idMappingIntro'), spaceName: 'demo_identity_resolution', fileName: 'id_mapping', rename: undefined as unknown as string, @@ -201,6 +209,7 @@ const getDatasetList = (): DatasetItem[] => { { type: 'solution', tags: ['solution'], + description: intl.get('doc.fraudDetectionIntro'), spaceName: 'demo_fraud_detection', fileName: 'fraud_detection', rename: undefined as unknown as string, @@ -214,7 +223,8 @@ const getDatasetList = (): DatasetItem[] => { { type: 'starter', tags: ['starter'], - spaceName: 'demo_fifa_2022', + description: intl.get('doc.fifa2022Intro'), + spaceName: 'demo_football_2022', fileName: 'fifa2022', rename: undefined as unknown as string, detail: { @@ -351,6 +361,9 @@ function Welcome(props: IProps) {
{dataset.spaceName}
+
+ {dataset.description} +