Skip to content

Commit

Permalink
Merge pull request clickvisual#867 from kl7sn/main
Browse files Browse the repository at this point in the history
docs: Docs repository consolidation
  • Loading branch information
kl7sn authored Jan 6, 2023
2 parents 0e0fa94 + fec32e3 commit 1763e09
Show file tree
Hide file tree
Showing 191 changed files with 5,665 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,4 @@ jobs:
token: ${{ secrets.RELEASE_TOKEN }}
delete-branch: true
commit-message: 'docs: update api docs'
title: update api docs
title: update api docs
23 changes: 23 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: docs
on:
push:
branches:
- 'master'
- 'feature/docker-ci'

jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout codebase
uses: actions/checkout@v2
- name: Setup node
uses: actions/setup-node@v2
- name: Build docs
run: cd docs && npm install && npm run docs:build
- name: Install ossutil
run: wget http://gosspublic.alicdn.com/ossutil/1.7.3/ossutil64 && chmod 755 ossutil64
- name: Config ossutil
run: ./ossutil64 config -e oss-cn-beijing.aliyuncs.com -i ${{ secrets.OSS_ACCESS_KEY_ID }} -k ${{ secrets.OSS_ACCESS_KEY_SECRET }}
- name: Upload docs
run: ./ossutil64 cp -r -f ./docs/.vuepress/dist/ oss://gocn-cdn/clickvisual/
1 change: 1 addition & 0 deletions api/internal/api/apiv1/base/table.go
Original file line number Diff line number Diff line change
Expand Up @@ -466,6 +466,7 @@ func QueryComplete(c *core.Context) {
return
}
res.SortRule, res.IsNeedSort = utils.GenerateFieldOrderRules(param.Query)
event.Event.InquiryCMDB(c.User(), db.OpnTablesLogsQuery, map[string]interface{}{"param": param})
c.JSONOK(res)
return
}
Expand Down
4 changes: 4 additions & 0 deletions api/internal/service/inquiry/clickhouse.go
Original file line number Diff line number Diff line change
Expand Up @@ -691,6 +691,10 @@ func (c *ClickHouse) GroupBy(param view.ReqQuery) (res map[string]uint64) {
key = v["f"].(string)
case *string:
key = *(v["f"].(*string))
case int16:
key = fmt.Sprintf("%d", v["f"].(int16))
case *int16:
key = fmt.Sprintf("%d", v["f"].(*int16))
case uint16:
key = fmt.Sprintf("%d", v["f"].(uint16))
case int32:
Expand Down
6 changes: 6 additions & 0 deletions docs/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
**/.DS_Store
.idea
.vscode
node_modules
docs/.vuepress/dist
.logs
322 changes: 322 additions & 0 deletions docs/docs/.vuepress/config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,322 @@
const moment = require("moment");
const path = require('path')
module.exports = {
locales: {
// 键名是该语言所属的子路径
// 作为特例,默认语言可以使用 '/' 作为其路径。
'/zh/': {
lang: 'zh-CN',
title: 'ClickVisual',
description: '轻量级的开源日志查询、分析、报警的可视化平台'
},
'/en/': {
lang: 'en-US', // 将会被设置为 <html> 的 lang 属性
title: 'ClickVisual',
description: 'A light weight web log visual analytic platform for clickhouse'
},
},
title: "ClickVisual",
description: "A light weight web log visual analytic platform for clickhouse",
head: [
["link", {rel: "icon", href: "/icon.png"}],
[
"meta",
{
name: "keywords",
content: "clickhouse,clickvisual",
},
],
["script",{},`
var _hmt = _hmt || [];
(function() {
var hm = document.createElement("script");
hm.src = "https://hm.baidu.com/hm.js?be62e5a14a3d1e00cbddf78c13d37d7f";
var s = document.getElementsByTagName("script")[0];
s.parentNode.insertBefore(hm, s);
})();
`]
],
configureWebpack: () => {
const NODE_ENV = process.env.NODE_ENV
//判断是否是生产环境
if(NODE_ENV === 'production'){
return {
output: {
publicPath: 'https://cdn.gocn.vip/clickvisual/'
},
resolve: {
//配置路径别名
alias: {
'public': path.resolve(__dirname, './public')
}
}
}
}else{
return {
resolve: {
//配置路径别名
alias: {
'public': path.resolve(__dirname, './public')
}
}
}
}
},
markdown: {
lineNumbers: true, // 代码块显示行号
},
themeConfig: {
locales: {
'/': {
nav: [
{
text: "首页",
link: "/zh/",
},
{
text: "文档",
link: "/zh/clickvisual/",
},
{
text: "API",
link: "https://clickvisual.gocn.vip/api",
},
{
text: "GitHub",
link: "https://github.com/clickvisual/clickvisual",
},
],
docsDir: "docs",
docsBranch: "master",
editLinks: true,
editLinkText: "在github.com上编辑此页",
},
'/zh/': {
nav: [
{
text: "首页",
link: "/zh/",
},
{
text: "文档",
link: "/zh/clickvisual/",
},
{
text: "API",
link: "https://clickvisual.gocn.vip/api",
},
{
text: "GitHub",
link: "https://github.com/clickvisual/clickvisual",
},
],
docsDir: "docs",
docsBranch: "master",
editLinks: true,
editLinkText: "在github.com上编辑此页",
sidebar: {
"/zh/clickvisual/": [
{
title: "快速开始",
collapsable: false, // 可选的, 默认值是 true,
children: [
"01quickstart/changelogs",
"/zh/clickvisual/",
"01quickstart/roadmap",
"01quickstart/experience-clickvisual-with-docker-compose",
"01quickstart/qa",
],
},
{
title: "应用安装",
collapsable: false, // 可选的, 默认值是 true,
children: [
"02install/quick-start",
"02install/clickvisual-configuration-description",
"02install/install-introduce",
"02install/install-require",
"02install/binary-installation",
"02install/docker-installation",
"02install/k8s-installation",
],
},
{
title: "日志采集",
collapsable: false, // 可选的, 默认值是 true,
children: [
"07collect/fluent-bit-configuration-reference",
"07collect/loggie-io",
],
},
{
title: "功能介绍",
collapsable: false, // 可选的, 默认值是 true,
children: [
"03funcintro/system-settings",
"03funcintro/instructions",
"03funcintro/alarm-function-configuration-description",
"03funcintro/bigdata",
"03funcintro/casbin",
"03funcintro/clickhouse-commonly-used-sql",
"03funcintro/template-gen",
],
},
{
title: "应用授权",
collapsable: false, // 可选的, 默认值是 true,
children: [
"04appauth/auth-intro",
"04appauth/clickvisual-auth",
"04appauth/auth-proxy",
"04appauth/gitlab-oauth2",
"04appauth/github-oauth2",
],
},
{
title: "架构原理",
collapsable: false, // 可选的, 默认值是 true,
children: [
"05arch/graphite-document-logging-architecture",
"05arch/clickvisual-intro-doc",
],
},
{
title: "加入我们",
collapsable: false, // 可选的, 默认值是 true,
children: [
"06join/env",
"06join/pr",
"06join/alert-push-channel",
],
},
]
},
sidebarDepth: 2,
lastUpdated: "上次更新",
serviceWorker: {
updatePopup: {
message: "发现新内容可用",
buttonText: "刷新",
},
},
},
"/en/": {
nav: [
{
text: "index",
link: "/en/",
},
{
text: "docs",
link: "/en/clickvisual/",
},
{
text: "GitHub",
link: "https://github.com/clickvisual/clickvisual",
},
],
docsDir: "docs",
docsBranch: "master",
editLinks: true,
editLinkText: "在github.com上编辑此页",
sidebar: {
"/en/clickvisual/": [
{
title: "快速开始",
collapsable: false, // 可选的, 默认值是 true,
children: [
"01quickstart/roadmap",
"01quickstart/what-is-the-clickvisual",
"01quickstart/quick-learning",
"01quickstart/experience-clickvisual-with-docker-compose",
"01quickstart/qa",
],
},
{
title: "代码贡献",
collapsable: false, // 可选的, 默认值是 true,
children: [
"06join/env",
"06join/pr",
"06join/alert-push-channel",
],
},
{
title: "应用安装",
collapsable: false, // 可选的, 默认值是 true,
children: [
"02install/install-introduce",
"02install/install-require",
"02install/binary-installation",
"02install/docker-installation",
"02install/k8s-installation",
],
},
{
title: "功能介绍",
collapsable: false, // 可选的, 默认值是 true,
children: [
"03funcintro/instructions",
"03funcintro/system-settings",
"03funcintro/subpath-configuration",
"03funcintro/cluster-mode",
"03funcintro/access-existing-tables",
"03funcintro/clickHouse-commonly-used-sql",
"03funcintro/fluent-bit-configuration-reference",
"03funcintro/alarm-function-configuration-description",
"03funcintro/clickvisual-configuration-description",
"03funcintro/template-gen",
],
},
{
title: "应用授权",
collapsable: false, // 可选的, 默认值是 true,
children: [
"04appauth/auth-intro",
"04appauth/clickvisual-auth",
"04appauth/auth-proxy",
"04appauth/gitlab-oauth2",
"04appauth/github-oauth2",
],
},
{
title: "架构原理",
collapsable: false, // 可选的, 默认值是 true,
children: [
"05arch/graphite-document-logging-architecture",
],
},
]
},
sidebarDepth: 2,
lastUpdated: "上次更新",
serviceWorker: {
updatePopup: {
message: "发现新内容可用",
buttonText: "刷新",
},
},
},
},
},
plugins: [
[
"@vuepress/last-updated",
{
transformer: (timestamp, lang) => {
// 不要忘了安装 moment
const moment = require("moment");
moment.locale("zh-cn");
return moment(timestamp).format("YYYY-MM-DD HH:mm:ss");
},
dateOptions: {
hours12: true,
},
},
],
"@vuepress/back-to-top",
"@vuepress/active-header-links",
"@vuepress/medium-zoom",
"@vuepress/nprogress",
],
};
Binary file added docs/docs/.vuepress/public/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/docs/.vuepress/public/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
17 changes: 17 additions & 0 deletions docs/docs/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
home: true
heroImage: https://cdn.gocn.vip/clickvisual/logo.png
heroText: ClickVisual
actionText: 快速上手 →
actionLink: /cn/clickvisual/
tagline: 轻量级日志查询、分析、报警可视化平台。
sidebar: auto
features:
- title: 简洁
details: 提供一站式应用可靠性的可视化的解决方案。
- title: 便捷
details: 既可以独立部署使用,也可作为插件集成到第三方系统。

footer: MIT Licensed | Copyright © 2022-present ClickVisual Authors
---

Loading

0 comments on commit 1763e09

Please sign in to comment.