-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #664 from crawlab-team/release
Release
- Loading branch information
Showing
88 changed files
with
2,922 additions
and
366 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
package constants | ||
|
||
const ( | ||
ActionTypeVisit = "visit" | ||
ActionTypeInstallDep = "install_dep" | ||
ActionTypeInstallLang = "install_lang" | ||
ActionTypeViewDisclaimer = "view_disclaimer" | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package constants | ||
|
||
const ( | ||
OwnerTypeAll = "all" | ||
OwnerTypeMe = "me" | ||
OwnerTypePublic = "public" | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
package constants | ||
|
||
const ( | ||
ChallengeLogin7d = "login_7d" | ||
ChallengeLogin30d = "login_30d" | ||
ChallengeLogin90d = "login_90d" | ||
ChallengeLogin180d = "login_180d" | ||
ChallengeCreateCustomizedSpider = "create_customized_spider" | ||
ChallengeCreateConfigurableSpider = "create_configurable_spider" | ||
ChallengeCreateSchedule = "create_schedule" | ||
ChallengeCreateNodes = "create_nodes" | ||
ChallengeCreateUser = "create_user" | ||
ChallengeRunRandom = "run_random" | ||
ChallengeScrape1k = "scrape_1k" | ||
ChallengeScrape10k = "scrape_10k" | ||
ChallengeScrape100k = "scrape_100k" | ||
ChallengeInstallDep = "install_dep" | ||
ChallengeInstallLang = "install_lang" | ||
ChallengeViewDisclaimer = "view_disclaimer" | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,142 @@ | ||
[ | ||
{ | ||
"name": "login_7d", | ||
"title_cn": "连续登录 7 天", | ||
"title_en": "Logged-in for 7 days", | ||
"description_cn": "连续 7 天登录 Crawlab,即可完成挑战!", | ||
"description_en": "Logged-in for consecutive 7 days to complete the challenge", | ||
"difficulty": 1 | ||
}, | ||
{ | ||
"name": "login_30d", | ||
"title_cn": "连续登录 30 天", | ||
"title_en": "Logged-in for 30 days", | ||
"description_cn": "连续 30 天登录 Crawlab,即可完成挑战!", | ||
"description_en": "Logged-in for consecutive 30 days to complete the challenge", | ||
"difficulty": 2 | ||
}, | ||
{ | ||
"name": "login_90d", | ||
"title_cn": "连续登录 90 天", | ||
"title_en": "Logged-in for 90 days", | ||
"description_cn": "连续 90 天登录 Crawlab,即可完成挑战!", | ||
"description_en": "Logged-in for consecutive 90 days to complete the challenge", | ||
"difficulty": 3 | ||
}, | ||
{ | ||
"name": "login_180d", | ||
"title_cn": "连续登录 180 天", | ||
"title_en": "Logged-in for 180 days", | ||
"description_cn": "连续 180 天登录 Crawlab,即可完成挑战!", | ||
"description_en": "Logged-in for consecutive 180 days to complete the challenge", | ||
"difficulty": 4 | ||
}, | ||
{ | ||
"name": "create_customized_spider", | ||
"title_cn": "创建 1 个自定义爬虫", | ||
"title_en": "Create a customized spider", | ||
"description_cn": "在爬虫列表中,点击 '添加爬虫',选择 '自定义爬虫',输入相应的参数,点击添加,即可完成挑战!", | ||
"description_en": "In Spider List page, click 'Add Spider', select 'Customized Spider', enter params, click 'Add' to finish the challenge.", | ||
"difficulty": 1, | ||
"path": "/spiders" | ||
}, | ||
{ | ||
"name": "create_configurable_spider", | ||
"title_cn": "创建 1 个可配置爬虫", | ||
"title_en": "Create a configurable spider", | ||
"description_cn": "在爬虫列表中,点击 '添加爬虫',选择 '可配置爬虫',输入相应的参数,点击添加,即可完成挑战!", | ||
"description_en": "In Spider List page, click 'Add Spider', select 'Configurable Spider', enter params, click 'Add' to finish the challenge.", | ||
"difficulty": 1, | ||
"path": "/spiders" | ||
}, | ||
{ | ||
"name": "run_random", | ||
"title_cn": "用随机模式成功运行爬虫", | ||
"title_en": "Run a spider in random mode successfully", | ||
"description_cn": "在您创建好的爬虫中,导航到其对应的详情页(爬虫列表中点击爬虫),选择随机模式运行一个爬虫,并能运行成功。", | ||
"description_en": "In your created spiders, navigate to corresponding detail page (click spider in Spider List page), run a spider in random mode successfully.", | ||
"difficulty": 1, | ||
"path": "/spiders" | ||
}, | ||
{ | ||
"name": "scrape_1k", | ||
"title_cn": "抓取 1 千条数据", | ||
"title_en": "Scrape 1k records", | ||
"description_cn": "运行您创建好的爬虫,抓取 1 千条及以上的结果数据,即可完成挑战!", | ||
"description_en": "Run your created spiders, scrape 1k and more results to finish the challenge.", | ||
"difficulty": 2, | ||
"path": "/spiders" | ||
}, | ||
{ | ||
"name": "scrape_10k", | ||
"title_cn": "抓取 1 万条数据", | ||
"title_en": "Scrape 10k records", | ||
"description_cn": "运行您创建好的爬虫,抓取 1 万条及以上的结果数据,即可完成挑战!", | ||
"description_en": "Run your created spiders, scrape 10k and more results to finish the challenge.", | ||
"difficulty": 3, | ||
"path": "/spiders" | ||
}, | ||
{ | ||
"name": "scrape_100k", | ||
"title_cn": "抓取 10 万条数据", | ||
"title_en": "Scrape 100k records", | ||
"description_cn": "运行您创建好的爬虫,抓取 10 万条及以上的结果数据,即可完成挑战!", | ||
"description_en": "Run your created spiders, scrape 100k and more results to finish the challenge.", | ||
"difficulty": 4, | ||
"path": "/spiders" | ||
}, | ||
{ | ||
"name": "create_schedule", | ||
"title_cn": "创建 1 个定时任务", | ||
"title_en": "Create a schedule", | ||
"description_cn": "在定时任务列表中,创建一个定时任务,正确设置好 Cron 表达式,即可完成挑战!", | ||
"description_en": "In Schedule List page, create a schedule and configure cron expression to finish the task.", | ||
"difficulty": 1, | ||
"path": "/schedules" | ||
}, | ||
{ | ||
"name": "create_nodes", | ||
"title_cn": "创建 1 个节点集群", | ||
"title_en": "Create a node cluster", | ||
"description_cn": "按照文档的部署指南,部署含有 3 个节点的集群,即可完成挑战!", | ||
"description_en": "Deploy a 3-node cluster according to the deployment guidance in documentation to finish the task.", | ||
"difficulty": 3, | ||
"path": "/nodes" | ||
}, | ||
{ | ||
"name": "install_dep", | ||
"title_cn": "安装 1 个依赖", | ||
"title_en": "Install a dependency successfully", | ||
"description_cn": "在 '节点列表->安装' 或 '节点详情->安装' 中,搜索并安装所需的 1 个依赖,即可完成挑战!", | ||
"description_en": "In 'Node List -> Installation' or 'Node Detail -> Installation', search and install a dependency.", | ||
"difficulty": 3, | ||
"path": "/nodes" | ||
}, | ||
{ | ||
"name": "install_lang", | ||
"title_cn": "安装 1 个语言环境", | ||
"title_en": "Install a language successfully", | ||
"description_cn": "在 '节点列表->安装' 或 '节点详情->安装' 中,点击安装所需的 1 个语言环境,即可完成挑战!", | ||
"description_en": "In 'Node List -> Installation' or 'Node Detail -> Installation', install a language.", | ||
"difficulty": 3, | ||
"path": "/nodes" | ||
}, | ||
{ | ||
"name": "view_disclaimer", | ||
"title_cn": "阅读免责声明", | ||
"title_en": "View disclaimer", | ||
"description_cn": "在左侧菜单栏,点击 '免责声明' 查看其内容,即可完成挑战!", | ||
"description_en": "In the left side menu, click 'Disclaimer' and view its content to finish the challenge.", | ||
"difficulty": 1, | ||
"path": "/disclaimer" | ||
}, | ||
{ | ||
"name": "create_user", | ||
"title_cn": "创建 1 个用户", | ||
"title_en": "Create a user", | ||
"description_cn": "在用户管理页面中创建一个新用户,即可完成挑战!", | ||
"description_en": "In User Admin page, create a new user to finish the challenge.", | ||
"difficulty": 1, | ||
"path": "/users" | ||
} | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
package entity | ||
|
||
type RpcMessage struct { | ||
Id string `json:"id"` | ||
Method string `json:"method"` | ||
NodeId string `json:"node_id"` | ||
Params map[string]string `json:"params"` | ||
Timeout int `json:"timeout"` | ||
Result string `json:"result"` | ||
Error string `json:"error"` | ||
Id string `json:"id"` // 消息ID | ||
Method string `json:"method"` // 消息方法 | ||
NodeId string `json:"node_id"` // 节点ID | ||
Params map[string]string `json:"params"` // 参数 | ||
Timeout int `json:"timeout"` // 超时 | ||
Result string `json:"result"` // 结果 | ||
Error string `json:"error"` // 错误 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.