Skip to content

Commit

Permalink
desc for dataset (#487) (#489)
Browse files Browse the repository at this point in the history
* desc for dataset

* fix wrong intro doc name

* removed the fifa keyword

* fix: style

---------

Co-authored-by: Wey Gu <weyl.gu@gmail.com>
Co-authored-by: Bruce <bruce.lu@vesoft.com>
  • Loading branch information
3 people authored Feb 23, 2023
1 parent dd042ea commit 43bd589
Show file tree
Hide file tree
Showing 5 changed files with 52 additions and 12 deletions.
11 changes: 10 additions & 1 deletion app/config/locale/en-US.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
11 changes: 10 additions & 1 deletion app/config/locale/zh-CN.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": "数据库连接有误,请重新配置",
Expand Down
23 changes: 16 additions & 7 deletions app/pages/Welcome/index.module.less
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@
box-shadow: 0 0 4px #ccc;
}
.withCoverContent {
height: 190px;
height: 240px;
padding: 16px 30px 20px;
display: flex;
flex-direction: column;
Expand All @@ -221,18 +221,27 @@
align-items: center;
}
.contentTitle {
flex: 1 1 auto;
padding: 18px 0 6px;
font-family: Roboto-Regular, sans-serif;
font-style: normal;
font-weight: 500;
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;
Expand All @@ -246,7 +255,7 @@
}
}
&.withCover {
height: 400px;
// height: 400px;
padding: 0;
display: block;
.actionWrapper {
Expand Down
15 changes: 14 additions & 1 deletion app/pages/Welcome/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ export type DatasetType = 'starter' | 'solution';
export interface DatasetItem {
type: DatasetType;
tags?: string[];
description: string;
spaceName: string;
fileName: string;
rename?: string;
Expand Down Expand Up @@ -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,
Expand All @@ -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,
Expand All @@ -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,
Expand All @@ -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,
Expand All @@ -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,
Expand All @@ -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,
Expand All @@ -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,
Expand All @@ -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,
Expand All @@ -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: {
Expand Down Expand Up @@ -351,6 +361,9 @@ function Welcome(props: IProps) {
</div>
</div>
<div className={styles.contentTitle}>{dataset.spaceName}</div>
<div className={styles.contentDescription}>
<span className={styles.descInner}>{dataset.description}</span>
</div>
<div className={styles.contentFooter}>
<div className={styles.actionWrapper}>
<Button
Expand Down
4 changes: 2 additions & 2 deletions public/datasets/fifa2022.ngql
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
CREATE SPACE IF NOT EXISTS `demo_fifa_2022` (partition_num = 3, replica_factor = 1, charset = utf8, collate = utf8_bin, vid_type = FIXED_STRING(32)) comment="https://www.siwei.io/chatgpt-and-nebulagraph-predict-fifa-world-cup/";
CREATE SPACE IF NOT EXISTS `demo_football_2022` (partition_num = 3, replica_factor = 1, charset = utf8, collate = utf8_bin, vid_type = FIXED_STRING(32)) comment="https://www.siwei.io/chatgpt-and-nebulagraph-predict-fifa-world-cup/";
:sleep 10;
USE `demo_fifa_2022`;
USE `demo_football_2022`;
CREATE TAG IF NOT EXISTS `Group` ( `name` string NOT NULL) ttl_duration = 0, ttl_col = "";
CREATE TAG IF NOT EXISTS `club` ( `name` string NOT NULL) ttl_duration = 0, ttl_col = "";
CREATE TAG IF NOT EXISTS `player` ( `name` string NOT NULL, `number` int64 NOT NULL, `position` string NOT NULL, `DOB` string NOT NULL, `caps` int64 NOT NULL, `goals` int64 NOT NULL, `age` int64 NOT NULL) ttl_duration = 0, ttl_col = "";
Expand Down

0 comments on commit 43bd589

Please sign in to comment.