feat(docs): new docs site by vuepress2 (#2220)
@ -0,0 +1,21 @@
|
|||||||
|
name: auto prettier
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
paths:
|
||||||
|
- 'site-vuepress/**'
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
prettier:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
ref: ${{ github.head_ref }}
|
||||||
|
|
||||||
|
- name: Prettify code
|
||||||
|
uses: creyD/prettier_action@v4.2
|
||||||
|
with:
|
||||||
|
prettier_options: --config ./site-vuepress/.prettierrc.json --ignore-path ./site-vuepress/.prettierignore --write ./site-vuepress
|
@ -0,0 +1,3 @@
|
|||||||
|
node_modules
|
||||||
|
.temp
|
||||||
|
.cache
|
@ -0,0 +1,2 @@
|
|||||||
|
.cache
|
||||||
|
.temp
|
@ -0,0 +1,3 @@
|
|||||||
|
{
|
||||||
|
"tabWidth": 2
|
||||||
|
}
|
@ -0,0 +1,14 @@
|
|||||||
|
<h1>Arthas 文档网站<sub>(power by vuepress)</sub></h1>
|
||||||
|
|
||||||
|
## 项目运行
|
||||||
|
|
||||||
|
```shell
|
||||||
|
# 安装依赖
|
||||||
|
npm install
|
||||||
|
|
||||||
|
# 启动项目
|
||||||
|
npm run docs:dev
|
||||||
|
|
||||||
|
# 发布项目(打包到 docs/.vuepress/dist 目录)
|
||||||
|
npm run docs:build
|
||||||
|
```
|
@ -0,0 +1,53 @@
|
|||||||
|
import { defineClientConfig } from "@vuepress/client";
|
||||||
|
import { usePageData } from "@vuepress/client";
|
||||||
|
import oldContributorsData from "./oldContributorsData.json";
|
||||||
|
|
||||||
|
const addOldDocsContributors = () => {
|
||||||
|
const page = usePageData();
|
||||||
|
if (!page.value.git) return;
|
||||||
|
const filePath = page.value.filePathRelative;
|
||||||
|
const contributors = page.value.git.contributors;
|
||||||
|
const oldContributors = oldContributorsData[filePath];
|
||||||
|
|
||||||
|
const haveSameContributor = (contributors, oldContributor) => {
|
||||||
|
return contributors.find(
|
||||||
|
(contributor) =>
|
||||||
|
contributor.name === oldContributor.name &&
|
||||||
|
contributor.email === oldContributor.email
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
if (oldContributors) {
|
||||||
|
oldContributors.forEach((oldContributor) => {
|
||||||
|
if (!haveSameContributor(contributors, oldContributor)) {
|
||||||
|
contributors.push(oldContributor);
|
||||||
|
} else {
|
||||||
|
haveSameContributor(contributors, oldContributor).commits +=
|
||||||
|
oldContributor.commits;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// sort contributors by commits
|
||||||
|
contributors?.sort((a, b) => b.commits - a.commits);
|
||||||
|
};
|
||||||
|
|
||||||
|
export default defineClientConfig({
|
||||||
|
enhance({ router }) {
|
||||||
|
router.afterEach((to, from) => {
|
||||||
|
if (to.fullPath !== from.fullPath) {
|
||||||
|
addOldDocsContributors();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
router.beforeEach((to, from, next) => {
|
||||||
|
if (typeof _hmt != "undefined") {
|
||||||
|
if (to.path && to.fullPath !== from.fullPath) {
|
||||||
|
_hmt.push(["_trackPageview", to.fullPath]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
next();
|
||||||
|
});
|
||||||
|
},
|
||||||
|
});
|
@ -0,0 +1,109 @@
|
|||||||
|
const { localTheme } = require("./theme/index");
|
||||||
|
|
||||||
|
const { copyCodePlugin } = require("vuepress-plugin-copy-code2");
|
||||||
|
const { redirectPlugin } = require("vuepress-plugin-redirect");
|
||||||
|
const { searchPlugin } = require("@vuepress/plugin-search");
|
||||||
|
|
||||||
|
module.exports = {
|
||||||
|
title: "arthas",
|
||||||
|
description: "arthas user document",
|
||||||
|
head: require("./configs/head"),
|
||||||
|
locales: {
|
||||||
|
"/": {
|
||||||
|
lang: "zh-CN",
|
||||||
|
title: "arthas",
|
||||||
|
description: "arthas 使用文档",
|
||||||
|
},
|
||||||
|
"/en/": {
|
||||||
|
lang: "en-US",
|
||||||
|
title: "arthas",
|
||||||
|
description: "arthas user document",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
theme: localTheme({
|
||||||
|
logo: "/images/arthas_light.png",
|
||||||
|
logoDark: "/images/arthas_dark.png",
|
||||||
|
repo: "alibaba/arthas",
|
||||||
|
docsDir: "site-vuepress/docs",
|
||||||
|
docsBranch: "master",
|
||||||
|
|
||||||
|
locales: {
|
||||||
|
"/": {
|
||||||
|
selectLanguageName: "简体中文",
|
||||||
|
selectLanguageText: "Languages",
|
||||||
|
editLinkText: "在 GitHub 上编辑此页",
|
||||||
|
lastUpdated: "上次更新",
|
||||||
|
contributorsText: "贡献者",
|
||||||
|
backToHome: "回到首页",
|
||||||
|
warning: "注意",
|
||||||
|
tip: "提示",
|
||||||
|
danger: "警告",
|
||||||
|
// 404 page
|
||||||
|
notFound: [
|
||||||
|
"这里什么都没有",
|
||||||
|
"我们怎么到这来了?",
|
||||||
|
"这是一个 404 页面",
|
||||||
|
"看起来我们进入了错误的链接",
|
||||||
|
],
|
||||||
|
backToHome: "返回首页",
|
||||||
|
openInNewWindow: "在新窗口打开",
|
||||||
|
toggleColorMode: "切换颜色模式",
|
||||||
|
toggleSidebar: "切换侧边栏",
|
||||||
|
navbar: require("./configs/navbar/zh"),
|
||||||
|
sidebar: require("./configs/sidebar/zh"),
|
||||||
|
sidebarDepth: 0,
|
||||||
|
},
|
||||||
|
"/en/": {
|
||||||
|
selectLanguageName: "English",
|
||||||
|
selectLanguageText: "Languages",
|
||||||
|
editLinkText: "Edit this page on GitHub",
|
||||||
|
navbar: require("./configs/navbar/en"),
|
||||||
|
sidebar: require("./configs/sidebar/en"),
|
||||||
|
sidebarDepth: 0,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}),
|
||||||
|
plugins: [
|
||||||
|
copyCodePlugin({
|
||||||
|
showInMobile: false,
|
||||||
|
pure: true,
|
||||||
|
locales: {
|
||||||
|
"/": {
|
||||||
|
hint: "复制代码",
|
||||||
|
},
|
||||||
|
"/en/": {
|
||||||
|
hint: "Copy code",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}),
|
||||||
|
searchPlugin({
|
||||||
|
locales: {
|
||||||
|
"/": {
|
||||||
|
placeholder: "搜索文档",
|
||||||
|
},
|
||||||
|
"/en/": {
|
||||||
|
placeholder: "Search Docs",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}),
|
||||||
|
redirectPlugin({
|
||||||
|
config: (app) => {
|
||||||
|
const redirects = Object.fromEntries(
|
||||||
|
app.pages
|
||||||
|
.filter((page) => page.path.startsWith("/en/doc/"))
|
||||||
|
.map((page) => [
|
||||||
|
page.path.replace(/^\/en\/doc\//, "/doc/en/"),
|
||||||
|
page.path,
|
||||||
|
])
|
||||||
|
);
|
||||||
|
|
||||||
|
delete redirects["/doc/en/"];
|
||||||
|
redirects["/doc/en/index.html"] = "/en/doc/index.html";
|
||||||
|
redirects["/en-us/index.html"] = "/en/index.html";
|
||||||
|
redirects["/zh-cn/index.html"] = "/index.html";
|
||||||
|
|
||||||
|
return redirects;
|
||||||
|
},
|
||||||
|
}),
|
||||||
|
],
|
||||||
|
};
|
@ -0,0 +1,20 @@
|
|||||||
|
module.exports = [
|
||||||
|
["link", { rel: "icon", href: "/images/favicon.ico" }],
|
||||||
|
[
|
||||||
|
"meta",
|
||||||
|
{ name: "viewport", content: "width=device-width, initial-scale=1.0" },
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"script",
|
||||||
|
{},
|
||||||
|
`
|
||||||
|
var _hmt = _hmt || [];
|
||||||
|
(function() {
|
||||||
|
var hm = document.createElement("script");
|
||||||
|
hm.src = "https://hm.baidu.com/hm.js?d5c5e25b100f0eb51a4c35c8a86ea9b4";
|
||||||
|
var s = document.getElementsByTagName("script")[0];
|
||||||
|
s.parentNode.insertBefore(hm, s);
|
||||||
|
})();
|
||||||
|
`,
|
||||||
|
],
|
||||||
|
];
|
@ -0,0 +1,52 @@
|
|||||||
|
module.exports = [
|
||||||
|
{
|
||||||
|
text: "HOME",
|
||||||
|
link: "/en/",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
text: "ONLINE TUTORIALS",
|
||||||
|
link: "/doc/arthas-tutorials.html?language=en&id=arthas-basics",
|
||||||
|
target: "_blank",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
text: "DOCS",
|
||||||
|
link: "/en/doc",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
text: "SOLUTIONS",
|
||||||
|
children: [
|
||||||
|
{
|
||||||
|
text: "Microservice solutions",
|
||||||
|
link: "https://cn.aliyun.com/product/aliware/mse?spm=arthas.topbar.0.0.0",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
text: "Distributed transaction solutions",
|
||||||
|
link: "https://www.aliyun.com/aliware/txc?spm=arthas.topbar.0.0.0",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
text: "High-availability solution",
|
||||||
|
link: "https://www.aliyun.com/product/ahas?spm=arthas.topbar.0.0.0",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
text: "Serverless solution for miscoservices",
|
||||||
|
link: "https://cn.aliyun.com/product/aliware/sae?spm=arthas.topbar.0.0.0",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
text: "PaaS solution",
|
||||||
|
link: "https://www.aliyun.com/product/edas?spm=arthas.topbar.0.0.0",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
text: "Service mesh solution",
|
||||||
|
link: "https://www.aliyun.com/product/servicemesh?spm=arthas.topbar.0.0.0",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
text: "DOWNLOAD",
|
||||||
|
link: "/en/doc/download.md",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
text: "COMMUNITY",
|
||||||
|
link: "https://github.com/alibaba/arthas/issues",
|
||||||
|
},
|
||||||
|
];
|
@ -0,0 +1,52 @@
|
|||||||
|
module.exports = [
|
||||||
|
{
|
||||||
|
text: "首页",
|
||||||
|
link: "/",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
text: "在线教程",
|
||||||
|
link: "/doc/arthas-tutorials.html?language=cn&id=arthas-basics",
|
||||||
|
target: "_blank",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
text: "文档",
|
||||||
|
link: "/doc/",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
text: "解决方案",
|
||||||
|
children: [
|
||||||
|
{
|
||||||
|
text: "微服务解决方案",
|
||||||
|
link: "https://cn.aliyun.com/product/aliware/mse?spm=arthas.topbar.0.0.0",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
text: "分布式事务解决方案",
|
||||||
|
link: "https://www.aliyun.com/aliware/txc?spm=arthas.topbar.0.0.0",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
text: "高可用解决方案",
|
||||||
|
link: "https://www.aliyun.com/product/ahas?spm=arthas.topbar.0.0.0",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
text: "微服务Serverless解决方案",
|
||||||
|
link: "https://cn.aliyun.com/product/aliware/sae?spm=arthas.topbar.0.0.0",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
text: "PaaS解决方案",
|
||||||
|
link: "https://www.aliyun.com/product/edas?spm=arthas.topbar.0.0.0",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
text: "服务网格解决方案",
|
||||||
|
link: "https://www.aliyun.com/product/servicemesh?spm=arthas.topbar.0.0.0",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
text: "下载",
|
||||||
|
link: "/doc/download.md",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
text: "社区",
|
||||||
|
link: "https://github.com/alibaba/arthas/issues",
|
||||||
|
},
|
||||||
|
];
|
@ -0,0 +1,148 @@
|
|||||||
|
module.exports = {
|
||||||
|
"/en/doc": [
|
||||||
|
{
|
||||||
|
text: "DOCS",
|
||||||
|
children: [
|
||||||
|
"/en/doc/README.md",
|
||||||
|
"/en/doc/quick-start.md",
|
||||||
|
"/en/doc/install-detail.md",
|
||||||
|
"/en/doc/download.md",
|
||||||
|
"/en/doc/advanced-use.md",
|
||||||
|
{
|
||||||
|
text: "Other features",
|
||||||
|
collapsible: true,
|
||||||
|
children: [
|
||||||
|
"/en/doc/async.md",
|
||||||
|
"/en/doc/save-log.md",
|
||||||
|
"/en/doc/batch-support.md",
|
||||||
|
{
|
||||||
|
text: "How to use ognl",
|
||||||
|
link: "",
|
||||||
|
children: [
|
||||||
|
{
|
||||||
|
text: "Basic ognl example",
|
||||||
|
link: "https://github.com/alibaba/arthas/issues/11",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
text: "Ognl special uses",
|
||||||
|
link: "https://github.com/alibaba/arthas/issues/71",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
text: "Commands",
|
||||||
|
collapsible: true,
|
||||||
|
link: "/en/doc/commands.md",
|
||||||
|
children: [
|
||||||
|
{
|
||||||
|
text: "jvm",
|
||||||
|
collapsible: false,
|
||||||
|
children: [
|
||||||
|
"/en/doc/dashboard.md",
|
||||||
|
"/en/doc/thread.md",
|
||||||
|
"/en/doc/jvm.md",
|
||||||
|
"/en/doc/memory.md",
|
||||||
|
"/en/doc/sysprop.md",
|
||||||
|
"/en/doc/sysenv.md",
|
||||||
|
"/en/doc/vmoption.md",
|
||||||
|
"/en/doc/perfcounter.md",
|
||||||
|
"/en/doc/logger.md",
|
||||||
|
"/en/doc/mbean.md",
|
||||||
|
"/en/doc/getstatic.md",
|
||||||
|
"/en/doc/ognl.md",
|
||||||
|
"/en/doc/heapdump.md",
|
||||||
|
"/en/doc/vmtool.md",
|
||||||
|
],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
text: "class/classloader",
|
||||||
|
collapsible: false,
|
||||||
|
children: [
|
||||||
|
"/en/doc/sc.md",
|
||||||
|
"/en/doc/sm.md",
|
||||||
|
"/en/doc/jad.md",
|
||||||
|
"/en/doc/classloader.md",
|
||||||
|
"/en/doc/mc.md",
|
||||||
|
"/en/doc/dump.md",
|
||||||
|
"/en/doc/retransform.md",
|
||||||
|
"/en/doc/redefine.md",
|
||||||
|
],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
text: "monitor/watch/trace - related",
|
||||||
|
collapsible: false,
|
||||||
|
children: [
|
||||||
|
"/en/doc/monitor.md",
|
||||||
|
"/en/doc/watch.md",
|
||||||
|
"/en/doc/trace.md",
|
||||||
|
"/en/doc/stack.md",
|
||||||
|
"/en/doc/tt.md",
|
||||||
|
],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
text: "other",
|
||||||
|
collapsible: false,
|
||||||
|
children: [
|
||||||
|
"/en/doc/profiler.md",
|
||||||
|
"/en/doc/cat.md",
|
||||||
|
"/en/doc/echo.md",
|
||||||
|
"/en/doc/grep.md",
|
||||||
|
"/en/doc/base64.md",
|
||||||
|
"/en/doc/tee.md",
|
||||||
|
"/en/doc/pwd.md",
|
||||||
|
"/en/doc/auth.md",
|
||||||
|
"/en/doc/options.md",
|
||||||
|
],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
text: "Basic",
|
||||||
|
collapsible: false,
|
||||||
|
children: [
|
||||||
|
"/en/doc/help.md",
|
||||||
|
"/en/doc/cls.md",
|
||||||
|
"/en/doc/session.md",
|
||||||
|
"/en/doc/reset.md",
|
||||||
|
"/en/doc/history.md",
|
||||||
|
"/en/doc/quit.md",
|
||||||
|
"/en/doc/stop.md",
|
||||||
|
{
|
||||||
|
text: "keymap",
|
||||||
|
link: "/en/doc/keymap.md",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
"/en/doc/web-console.md",
|
||||||
|
"/en/doc/tunnel.md",
|
||||||
|
"/en/doc/http-api.md",
|
||||||
|
"/en/doc/docker.md",
|
||||||
|
"/en/doc/spring-boot-starter.md",
|
||||||
|
"/en/doc/idea-plugin.md",
|
||||||
|
"/en/doc/faq.md",
|
||||||
|
{
|
||||||
|
text: "User cases",
|
||||||
|
link: "https://github.com/alibaba/arthas/issues?q=label%3Auser-case",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
text: "Start me at github",
|
||||||
|
link: "https://github.com/alibaba/arthas",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
text: "Compile and debug/CONTRIBUTING",
|
||||||
|
link: "https://github.com/alibaba/arthas/blob/master/CONTRIBUTING.md",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
text: "Release Notes",
|
||||||
|
link: "https://github.com/alibaba/arthas/releases",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
text: "Contact us",
|
||||||
|
link: "/en/doc/contact-us.md",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
],
|
||||||
|
};
|
@ -0,0 +1,152 @@
|
|||||||
|
module.exports = {
|
||||||
|
"/doc/": [
|
||||||
|
{
|
||||||
|
text: "文档",
|
||||||
|
children: [
|
||||||
|
"/doc/README.md",
|
||||||
|
"/doc/quick-start.md",
|
||||||
|
{
|
||||||
|
text: "在线教程(阿里云)",
|
||||||
|
link: "https://start.aliyun.com/handson-lab?category=arthas",
|
||||||
|
},
|
||||||
|
"/doc/install-detail.md",
|
||||||
|
"/doc/download.md",
|
||||||
|
"/doc/advanced-use.md",
|
||||||
|
{
|
||||||
|
text: "其他特性",
|
||||||
|
collapsible: true,
|
||||||
|
children: [
|
||||||
|
"/doc/async.md",
|
||||||
|
"/doc/save-log.md",
|
||||||
|
"/doc/batch-support.md",
|
||||||
|
{
|
||||||
|
text: "ognl 表达式用法",
|
||||||
|
link: "",
|
||||||
|
children: [
|
||||||
|
{
|
||||||
|
text: "活用ognl表达式",
|
||||||
|
link: "https://github.com/alibaba/arthas/issues/11",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
text: "一些ognl特殊用法",
|
||||||
|
link: "https://github.com/alibaba/arthas/issues/71",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
text: "命令列表",
|
||||||
|
collapsible: true,
|
||||||
|
link: "/doc/commands.md",
|
||||||
|
children: [
|
||||||
|
{
|
||||||
|
text: "jvm相关",
|
||||||
|
collapsible: false,
|
||||||
|
children: [
|
||||||
|
"/doc/dashboard.md",
|
||||||
|
"/doc/thread.md",
|
||||||
|
"/doc/jvm.md",
|
||||||
|
"/doc/memory.md",
|
||||||
|
"/doc/sysprop.md",
|
||||||
|
"/doc/sysenv.md",
|
||||||
|
"/doc/vmoption.md",
|
||||||
|
"/doc/perfcounter.md",
|
||||||
|
"/doc/logger.md",
|
||||||
|
"/doc/mbean.md",
|
||||||
|
"/doc/getstatic.md",
|
||||||
|
"/doc/ognl.md",
|
||||||
|
"/doc/heapdump.md",
|
||||||
|
"/doc/vmtool.md",
|
||||||
|
],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
text: "class/classloader相关",
|
||||||
|
collapsible: false,
|
||||||
|
children: [
|
||||||
|
"/doc/sc.md",
|
||||||
|
"/doc/sm.md",
|
||||||
|
"/doc/jad.md",
|
||||||
|
"/doc/classloader.md",
|
||||||
|
"/doc/mc.md",
|
||||||
|
"/doc/dump.md",
|
||||||
|
"/doc/retransform.md",
|
||||||
|
"/doc/redefine.md",
|
||||||
|
],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
text: "monitor/watch/trace相关",
|
||||||
|
collapsible: false,
|
||||||
|
children: [
|
||||||
|
"/doc/monitor.md",
|
||||||
|
"/doc/watch.md",
|
||||||
|
"/doc/trace.md",
|
||||||
|
"/doc/stack.md",
|
||||||
|
"/doc/tt.md",
|
||||||
|
],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
text: "其他",
|
||||||
|
collapsible: false,
|
||||||
|
children: [
|
||||||
|
"/doc/profiler.md",
|
||||||
|
"/doc/cat.md",
|
||||||
|
"/doc/echo.md",
|
||||||
|
"/doc/grep.md",
|
||||||
|
"/doc/base64.md",
|
||||||
|
"/doc/tee.md",
|
||||||
|
"/doc/pwd.md",
|
||||||
|
"/doc/auth.md",
|
||||||
|
"/doc/options.md",
|
||||||
|
],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
text: "基础命令",
|
||||||
|
collapsible: false,
|
||||||
|
children: [
|
||||||
|
"/doc/help.md",
|
||||||
|
"/doc/cls.md",
|
||||||
|
"/doc/session.md",
|
||||||
|
"/doc/reset.md",
|
||||||
|
"/doc/history.md",
|
||||||
|
"/doc/quit.md",
|
||||||
|
"/doc/stop.md",
|
||||||
|
{
|
||||||
|
text: "keymap",
|
||||||
|
link: "/doc/keymap.md",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
"/doc/web-console.md",
|
||||||
|
"/doc/tunnel.md",
|
||||||
|
"/doc/http-api.md",
|
||||||
|
"/doc/docker.md",
|
||||||
|
"/doc/spring-boot-starter.md",
|
||||||
|
"/doc/idea-plugin.md",
|
||||||
|
"/doc/faq.md",
|
||||||
|
{
|
||||||
|
text: "用户案列",
|
||||||
|
link: "https://github.com/alibaba/arthas/issues?q=label%3Auser-case",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
text: "Start me at github",
|
||||||
|
link: "https://github.com/alibaba/arthas",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
text: "编译调试/参与贡献",
|
||||||
|
link: "https://github.com/alibaba/arthas/blob/master/CONTRIBUTING.md",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
text: "Release Notes",
|
||||||
|
link: "https://github.com/alibaba/arthas/releases",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
text: "QQ群/钉钉群",
|
||||||
|
link: "/doc/contact-us.md",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
],
|
||||||
|
};
|
Before Width: | Height: | Size: 199 KiB After Width: | Height: | Size: 199 KiB |
Before Width: | Height: | Size: 312 KiB After Width: | Height: | Size: 312 KiB |
Before Width: | Height: | Size: 58 KiB After Width: | Height: | Size: 58 KiB |
Before Width: | Height: | Size: 150 KiB After Width: | Height: | Size: 150 KiB |
Before Width: | Height: | Size: 244 KiB After Width: | Height: | Size: 244 KiB |
After Width: | Height: | Size: 16 KiB |
After Width: | Height: | Size: 5.5 KiB |
After Width: | Height: | Size: 5.5 KiB |
After Width: | Height: | Size: 791 KiB |
Before Width: | Height: | Size: 57 KiB After Width: | Height: | Size: 57 KiB |
Before Width: | Height: | Size: 21 KiB After Width: | Height: | Size: 21 KiB |
Before Width: | Height: | Size: 57 KiB After Width: | Height: | Size: 57 KiB |
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 17 KiB |
Before Width: | Height: | Size: 6.2 KiB After Width: | Height: | Size: 6.2 KiB |
Before Width: | Height: | Size: 88 KiB After Width: | Height: | Size: 88 KiB |
Before Width: | Height: | Size: 56 KiB After Width: | Height: | Size: 56 KiB |
Before Width: | Height: | Size: 6.9 KiB After Width: | Height: | Size: 6.9 KiB |
Before Width: | Height: | Size: 39 KiB After Width: | Height: | Size: 39 KiB |
After Width: | Height: | Size: 121 KiB |
Before Width: | Height: | Size: 40 KiB After Width: | Height: | Size: 40 KiB |
Before Width: | Height: | Size: 27 KiB After Width: | Height: | Size: 27 KiB |
After Width: | Height: | Size: 9.5 KiB |
After Width: | Height: | Size: 12 KiB |
After Width: | Height: | Size: 11 KiB |
After Width: | Height: | Size: 8.2 KiB |
After Width: | Height: | Size: 9.7 KiB |
After Width: | Height: | Size: 18 KiB |
After Width: | Height: | Size: 7.2 KiB |
After Width: | Height: | Size: 13 KiB |
After Width: | Height: | Size: 49 KiB |
@ -0,0 +1,3 @@
|
|||||||
|
.site-name.can-hide {
|
||||||
|
display: none;
|
||||||
|
}
|
@ -0,0 +1,115 @@
|
|||||||
|
<script>
|
||||||
|
/* eslint-disable import/first, import/no-duplicates, import/order */
|
||||||
|
import { defineComponent } from "vue";
|
||||||
|
|
||||||
|
export default defineComponent({
|
||||||
|
inheritAttrs: false,
|
||||||
|
});
|
||||||
|
/* eslint-enable import/order */
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
import GitHub from "./icons/GitHub.vue";
|
||||||
|
|
||||||
|
import { useSiteData } from "@vuepress/client";
|
||||||
|
import { isLinkHttp, isLinkMailto, isLinkTel } from "@vuepress/shared";
|
||||||
|
import { computed, toRefs } from "vue";
|
||||||
|
import { useRoute } from "vue-router";
|
||||||
|
|
||||||
|
const props = defineProps({
|
||||||
|
item: {
|
||||||
|
type: Object,
|
||||||
|
required: true,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
const route = useRoute();
|
||||||
|
const site = useSiteData();
|
||||||
|
const { item } = toRefs(props);
|
||||||
|
|
||||||
|
// if the link has http protocol
|
||||||
|
const hasHttpProtocol = computed(() => isLinkHttp(item.value.link));
|
||||||
|
// if the link has non-http protocol
|
||||||
|
const hasNonHttpProtocol = computed(
|
||||||
|
() => isLinkMailto(item.value.link) || isLinkTel(item.value.link)
|
||||||
|
);
|
||||||
|
// resolve the `target` attr
|
||||||
|
const linkTarget = computed(() => {
|
||||||
|
if (hasNonHttpProtocol.value) return undefined;
|
||||||
|
if (item.value.target) return item.value.target;
|
||||||
|
if (hasHttpProtocol.value) return "_blank";
|
||||||
|
return undefined;
|
||||||
|
});
|
||||||
|
// if the `target` attr is '_blank'
|
||||||
|
const isBlankTarget = computed(() => linkTarget.value === "_blank");
|
||||||
|
// is `<RouterLink>` or not
|
||||||
|
const isRouterLink = computed(
|
||||||
|
() =>
|
||||||
|
!hasHttpProtocol.value && !hasNonHttpProtocol.value && !isBlankTarget.value
|
||||||
|
);
|
||||||
|
// resolve the `rel` attr
|
||||||
|
const linkRel = computed(() => {
|
||||||
|
if (hasNonHttpProtocol.value) return undefined;
|
||||||
|
if (item.value.rel) return item.value.rel;
|
||||||
|
if (isBlankTarget.value) return "noopener noreferrer";
|
||||||
|
return undefined;
|
||||||
|
});
|
||||||
|
// resolve the `aria-label` attr
|
||||||
|
const linkAriaLabel = computed(() => item.value.ariaLabel || item.value.text);
|
||||||
|
|
||||||
|
// should be active when current route is a subpath of this link
|
||||||
|
const shouldBeActiveInSubpath = computed(() => {
|
||||||
|
const localeKeys = Object.keys(site.value.locales);
|
||||||
|
if (localeKeys.length) {
|
||||||
|
return !localeKeys.some((key) => key === item.value.link);
|
||||||
|
}
|
||||||
|
return item.value.link !== "/";
|
||||||
|
});
|
||||||
|
// if this link is active in subpath
|
||||||
|
const isActiveInSubpath = computed(() => {
|
||||||
|
if (!shouldBeActiveInSubpath.value) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return route.path.startsWith(item.value.link);
|
||||||
|
});
|
||||||
|
|
||||||
|
// if this link is active
|
||||||
|
const isActive = computed(() => {
|
||||||
|
if (!isRouterLink.value) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (item.value.activeMatch) {
|
||||||
|
return new RegExp(item.value.activeMatch).test(route.path);
|
||||||
|
}
|
||||||
|
return isActiveInSubpath.value;
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<RouterLink
|
||||||
|
v-if="isRouterLink"
|
||||||
|
:class="{ 'router-link-active': isActive }"
|
||||||
|
:to="item.link"
|
||||||
|
:aria-label="linkAriaLabel"
|
||||||
|
v-bind="$attrs"
|
||||||
|
>
|
||||||
|
<slot name="before" />
|
||||||
|
{{ item.text }}
|
||||||
|
<slot name="after" />
|
||||||
|
</RouterLink>
|
||||||
|
<a
|
||||||
|
v-else
|
||||||
|
class="external-link"
|
||||||
|
:href="item.link"
|
||||||
|
:rel="linkRel"
|
||||||
|
:target="linkTarget"
|
||||||
|
:aria-label="linkAriaLabel"
|
||||||
|
v-bind="$attrs"
|
||||||
|
>
|
||||||
|
<slot name="before" />
|
||||||
|
<GitHub v-if="item.text === 'GitHub'" />
|
||||||
|
<span v-else>{{ item.text }}</span>
|
||||||
|
<AutoLinkExternalIcon v-if="isBlankTarget && item.text !== 'GitHub'" />
|
||||||
|
<slot name="after" />
|
||||||
|
</a>
|
||||||
|
</template>
|
@ -0,0 +1,72 @@
|
|||||||
|
<template>
|
||||||
|
<a class="my-badge" :href="URL" target="_blank">
|
||||||
|
<component :is="comp" />
|
||||||
|
|
||||||
|
<span>{{ number }}</span>
|
||||||
|
</a>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
import { useThemeLocaleData } from "@vuepress/theme-default/lib/client/composables";
|
||||||
|
import { ref } from "vue";
|
||||||
|
|
||||||
|
const props = defineProps({
|
||||||
|
comp: {
|
||||||
|
type: Object,
|
||||||
|
required: true,
|
||||||
|
},
|
||||||
|
data: {
|
||||||
|
type: Number,
|
||||||
|
required: true,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
const number = ref(0);
|
||||||
|
|
||||||
|
// add number to number until number is equal to data
|
||||||
|
var t = setInterval(() => {
|
||||||
|
number.value += 234;
|
||||||
|
if (number.value >= props.data) {
|
||||||
|
number.value = props.data;
|
||||||
|
clearInterval(t);
|
||||||
|
}
|
||||||
|
}, 1);
|
||||||
|
|
||||||
|
const themeData = useThemeLocaleData();
|
||||||
|
const repoURL = `https://github.com/${themeData.value.repo}`;
|
||||||
|
const repoStarsURL = repoURL;
|
||||||
|
const repoForksURL = `${repoURL}/fork`;
|
||||||
|
|
||||||
|
let URL = repoURL;
|
||||||
|
switch (props.comp.name) {
|
||||||
|
case "Star":
|
||||||
|
URL = repoStarsURL;
|
||||||
|
break;
|
||||||
|
case "Fork":
|
||||||
|
URL = repoForksURL;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.my-badge {
|
||||||
|
width: fit-content;
|
||||||
|
width: -webkit-fit-content;
|
||||||
|
width: -moz-fit-content;
|
||||||
|
padding: 5px;
|
||||||
|
margin: 0 10px;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
border-radius: 5px;
|
||||||
|
color: var(--c-text);
|
||||||
|
background-color: rgba(89, 95, 101, 0.2);
|
||||||
|
user-select: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (max-width: 719px) {
|
||||||
|
.my-badge {
|
||||||
|
margin: 0 5px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
@ -0,0 +1,18 @@
|
|||||||
|
<script setup>
|
||||||
|
import HomeUserBoards from "./HomeUserBoards.vue";
|
||||||
|
import HomeFeatures from "./HomeFeatures.vue";
|
||||||
|
import HomeHero from "./HomeHero.vue";
|
||||||
|
|
||||||
|
import HomeContent from "@theme/HomeContent.vue";
|
||||||
|
import HomeFooter from "@theme/HomeFooter.vue";
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<main class="home">
|
||||||
|
<HomeHero />
|
||||||
|
<HomeFeatures />
|
||||||
|
<HomeContent />
|
||||||
|
<HomeUserBoards />
|
||||||
|
<HomeFooter />
|
||||||
|
</main>
|
||||||
|
</template>
|
@ -0,0 +1,38 @@
|
|||||||
|
<template>
|
||||||
|
<div class="badges">
|
||||||
|
<Badge :comp="Star" :data="star" />
|
||||||
|
<Badge :comp="Fork" :data="fork" />
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
import Star from "./icons/Star.vue";
|
||||||
|
import Fork from "./icons/Fork.vue";
|
||||||
|
import Badge from "./Badge.vue";
|
||||||
|
|
||||||
|
import { ref, onBeforeMount } from "vue";
|
||||||
|
|
||||||
|
const star = ref(29582);
|
||||||
|
const fork = ref(6494);
|
||||||
|
|
||||||
|
const getData = async () => {
|
||||||
|
const { forks, stargazers_count } = await fetch(
|
||||||
|
"https://api.github.com/repos/alibaba/arthas"
|
||||||
|
).then((res) => res.json());
|
||||||
|
|
||||||
|
star.value = stargazers_count;
|
||||||
|
fork.value = forks;
|
||||||
|
};
|
||||||
|
|
||||||
|
onBeforeMount(getData);
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
.badges {
|
||||||
|
width: 100%;
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
</style>
|
@ -0,0 +1,36 @@
|
|||||||
|
<script setup>
|
||||||
|
import { usePageFrontmatter } from "@vuepress/client";
|
||||||
|
import { isArray } from "@vuepress/shared";
|
||||||
|
import { computed } from "vue";
|
||||||
|
|
||||||
|
const frontmatter = usePageFrontmatter();
|
||||||
|
const features = computed(() => {
|
||||||
|
if (isArray(frontmatter.value.features)) {
|
||||||
|
return frontmatter.value.features;
|
||||||
|
}
|
||||||
|
return [];
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<div v-if="features.length" class="features">
|
||||||
|
<div v-for="feature in features" :key="feature.title" class="feature">
|
||||||
|
<div v-if="feature.icon" class="icon">{{ feature.icon }}</div>
|
||||||
|
<h2>{{ feature.title }}</h2>
|
||||||
|
<p>{{ feature.details }}</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
.icon {
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
margin-bottom: 20px;
|
||||||
|
border-radius: 6px;
|
||||||
|
width: 48px;
|
||||||
|
height: 48px;
|
||||||
|
font-size: 30px;
|
||||||
|
}
|
||||||
|
</style>
|
@ -0,0 +1,102 @@
|
|||||||
|
<script setup>
|
||||||
|
import HomeBadges from "./HomeBadges.vue";
|
||||||
|
|
||||||
|
import AutoLink from "@theme/AutoLink.vue";
|
||||||
|
import {
|
||||||
|
ClientOnly,
|
||||||
|
usePageFrontmatter,
|
||||||
|
useSiteLocaleData,
|
||||||
|
withBase,
|
||||||
|
} from "@vuepress/client";
|
||||||
|
import { isArray } from "@vuepress/shared";
|
||||||
|
import { computed, h } from "vue";
|
||||||
|
import { useDarkMode } from "@vuepress/theme-default/lib/client/composables";
|
||||||
|
|
||||||
|
const frontmatter = usePageFrontmatter();
|
||||||
|
const siteLocale = useSiteLocaleData();
|
||||||
|
const isDarkMode = useDarkMode();
|
||||||
|
|
||||||
|
const heroImage = computed(() => {
|
||||||
|
if (isDarkMode.value && frontmatter.value.heroImageDark !== undefined) {
|
||||||
|
return frontmatter.value.heroImageDark;
|
||||||
|
}
|
||||||
|
return frontmatter.value.heroImage;
|
||||||
|
});
|
||||||
|
|
||||||
|
const heroText = computed(() => {
|
||||||
|
if (frontmatter.value.heroText === null) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
return frontmatter.value.heroText || siteLocale.value.title || "Hello";
|
||||||
|
});
|
||||||
|
|
||||||
|
const heroAlt = computed(
|
||||||
|
() => frontmatter.value.heroAlt || heroText.value || "hero"
|
||||||
|
);
|
||||||
|
|
||||||
|
const tagline = computed(() => {
|
||||||
|
if (frontmatter.value.tagline === null) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
return (
|
||||||
|
frontmatter.value.tagline ||
|
||||||
|
siteLocale.value.description ||
|
||||||
|
"Welcome to your VuePress site"
|
||||||
|
);
|
||||||
|
});
|
||||||
|
|
||||||
|
const actions = computed(() => {
|
||||||
|
if (!isArray(frontmatter.value.actions)) {
|
||||||
|
return [];
|
||||||
|
}
|
||||||
|
|
||||||
|
return frontmatter.value.actions.map(({ text, link, type = "primary" }) => ({
|
||||||
|
text,
|
||||||
|
link,
|
||||||
|
type,
|
||||||
|
}));
|
||||||
|
});
|
||||||
|
|
||||||
|
const HomeHeroImage = () => {
|
||||||
|
if (!heroImage.value) return null;
|
||||||
|
const img = h("img", {
|
||||||
|
src: withBase(heroImage.value),
|
||||||
|
style: "width: 60%;",
|
||||||
|
alt: heroAlt.value,
|
||||||
|
});
|
||||||
|
if (frontmatter.value.heroImageDark === undefined) {
|
||||||
|
return img;
|
||||||
|
}
|
||||||
|
// wrap hero image with <ClientOnly> to avoid ssr-mismatch
|
||||||
|
// when using a different hero image in dark mode
|
||||||
|
return h(ClientOnly, () => img);
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<header class="hero">
|
||||||
|
<HomeHeroImage />
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<h1 v-if="heroText" id="main-title">
|
||||||
|
{{ heroText }}
|
||||||
|
</h1>
|
||||||
|
|
||||||
|
<p v-if="tagline" class="description">
|
||||||
|
{{ tagline }}
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<HomeBadges />
|
||||||
|
|
||||||
|
<p v-if="actions.length" class="actions">
|
||||||
|
<AutoLink
|
||||||
|
v-for="action in actions"
|
||||||
|
:key="action.text"
|
||||||
|
class="action-button"
|
||||||
|
:class="[action.type]"
|
||||||
|
:item="action"
|
||||||
|
/>
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</header>
|
||||||
|
</template>
|
@ -0,0 +1,37 @@
|
|||||||
|
<template>
|
||||||
|
<div class="user-boards" v-if="imgs">
|
||||||
|
<h1>{{ pageData.users_title }}</h1>
|
||||||
|
<p v-html="pageData.users_details"></p>
|
||||||
|
<div class="user-logos">
|
||||||
|
<UserBoard v-for="img in imgs" :key="img.logo" :img="img" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
import UserBoard from "./UserBoard.vue";
|
||||||
|
|
||||||
|
import { toRaw } from "vue";
|
||||||
|
import { usePageFrontmatter, usePageLang } from "@vuepress/client";
|
||||||
|
|
||||||
|
const pageData = usePageFrontmatter();
|
||||||
|
const imgs = toRaw(pageData.value.users) || [];
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.user-boards {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
border-top: 1px solid var(--c-border);
|
||||||
|
padding: 1.2rem 0;
|
||||||
|
margin-top: 20px;
|
||||||
|
|
||||||
|
.user-logos {
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
@ -0,0 +1,127 @@
|
|||||||
|
<script setup>
|
||||||
|
import Translate from "./icons/Translate.vue";
|
||||||
|
|
||||||
|
import AutoLink from "@theme/AutoLink.vue";
|
||||||
|
import DropdownTransition from "@theme/DropdownTransition.vue";
|
||||||
|
import { computed, ref, toRefs, watch } from "vue";
|
||||||
|
import { useRoute } from "vue-router";
|
||||||
|
|
||||||
|
const props = defineProps({
|
||||||
|
item: {
|
||||||
|
type: Object,
|
||||||
|
required: true,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
const { item } = toRefs(props);
|
||||||
|
|
||||||
|
const dropdownAriaLabel = computed(
|
||||||
|
() => item.value.ariaLabel || item.value.text
|
||||||
|
);
|
||||||
|
|
||||||
|
const open = ref(false);
|
||||||
|
const route = useRoute();
|
||||||
|
watch(
|
||||||
|
() => route.path,
|
||||||
|
() => {
|
||||||
|
open.value = false;
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Open the dropdown when user tab and click from keyboard.
|
||||||
|
*
|
||||||
|
* Use event.detail to detect tab and click from keyboard.
|
||||||
|
* The Tab + Click is UIEvent > KeyboardEvent, so the detail is 0.
|
||||||
|
*
|
||||||
|
* @see https://developer.mozilla.org/en-US/docs/Web/API/UIEvent/detail
|
||||||
|
*/
|
||||||
|
const handleDropdown = (e) => {
|
||||||
|
const isTriggerByTab = e.detail === 0;
|
||||||
|
if (isTriggerByTab) {
|
||||||
|
open.value = !open.value;
|
||||||
|
} else {
|
||||||
|
open.value = false;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
const isLastItemOfArray = (item, arr) => arr[arr.length - 1] === item;
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<div class="navbar-dropdown-wrapper" :class="{ open }">
|
||||||
|
<button
|
||||||
|
class="navbar-dropdown-title"
|
||||||
|
type="button"
|
||||||
|
:aria-label="dropdownAriaLabel"
|
||||||
|
@click="handleDropdown"
|
||||||
|
>
|
||||||
|
<Translate v-if="item.text === 'Languages'" />
|
||||||
|
<span class="title" v-else>{{ item.text }}</span>
|
||||||
|
<span class="arrow down" />
|
||||||
|
</button>
|
||||||
|
|
||||||
|
<button
|
||||||
|
class="navbar-dropdown-title-mobile"
|
||||||
|
type="button"
|
||||||
|
:aria-label="dropdownAriaLabel"
|
||||||
|
@click="open = !open"
|
||||||
|
>
|
||||||
|
<Translate v-if="item.text === 'Languages'" />
|
||||||
|
<span class="title" v-else>{{ item.text }}</span>
|
||||||
|
<span class="arrow" :class="open ? 'down' : 'right'" />
|
||||||
|
</button>
|
||||||
|
|
||||||
|
<DropdownTransition>
|
||||||
|
<ul v-show="open" class="navbar-dropdown">
|
||||||
|
<li
|
||||||
|
v-for="child in item.children"
|
||||||
|
:key="child.text"
|
||||||
|
class="navbar-dropdown-item"
|
||||||
|
>
|
||||||
|
<template v-if="child.children">
|
||||||
|
<h4 class="navbar-dropdown-subtitle">
|
||||||
|
<AutoLink
|
||||||
|
v-if="child.link"
|
||||||
|
:item="child"
|
||||||
|
@focusout="
|
||||||
|
isLastItemOfArray(child, item.children) &&
|
||||||
|
child.children.length === 0 &&
|
||||||
|
(open = false)
|
||||||
|
"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<span v-else>{{ child.text }}</span>
|
||||||
|
</h4>
|
||||||
|
|
||||||
|
<ul class="navbar-dropdown-subitem-wrapper">
|
||||||
|
<li
|
||||||
|
v-for="grandchild in child.children"
|
||||||
|
:key="grandchild.link"
|
||||||
|
class="navbar-dropdown-subitem"
|
||||||
|
>
|
||||||
|
<AutoLink
|
||||||
|
:item="grandchild"
|
||||||
|
@focusout="
|
||||||
|
isLastItemOfArray(grandchild, child.children) &&
|
||||||
|
isLastItemOfArray(child, item.children) &&
|
||||||
|
(open = false)
|
||||||
|
"
|
||||||
|
/>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<template v-else>
|
||||||
|
<AutoLink
|
||||||
|
:item="child"
|
||||||
|
@focusout="
|
||||||
|
isLastItemOfArray(child, item.children) && (open = false)
|
||||||
|
"
|
||||||
|
/>
|
||||||
|
</template>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</DropdownTransition>
|
||||||
|
</div>
|
||||||
|
</template>
|
@ -0,0 +1,21 @@
|
|||||||
|
<template>
|
||||||
|
<img class="users-logo" :src="img.logo" />
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
defineProps({
|
||||||
|
img: {
|
||||||
|
type: Object,
|
||||||
|
required: true,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.users-logo {
|
||||||
|
max-width: 140px;
|
||||||
|
object-fit: contain;
|
||||||
|
margin: 10px;
|
||||||
|
user-select: none;
|
||||||
|
}
|
||||||
|
</style>
|
@ -0,0 +1,42 @@
|
|||||||
|
<template>
|
||||||
|
<svg
|
||||||
|
version="1.1"
|
||||||
|
id="Layer_1"
|
||||||
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||||
|
x="0px"
|
||||||
|
y="0px"
|
||||||
|
viewBox="131 -131 512 512"
|
||||||
|
style="
|
||||||
|
enable-background: new 131 -131 512 512;
|
||||||
|
height: 1rem;
|
||||||
|
fill: var(--c-text);
|
||||||
|
"
|
||||||
|
xml:space="preserve"
|
||||||
|
>
|
||||||
|
<g id="XMLID_2_">
|
||||||
|
<path
|
||||||
|
id="XMLID_8_"
|
||||||
|
d="M312.8,317c0-8.5-3.4-16.2-9.4-23s-13.7-9.4-23-9.4c-9.3,0-16.2,3.4-23,9.4c-6,6-9.4,13.7-9.4,23
|
||||||
|
s3.4,16.2,9.4,23c6,6,13.7,9.4,23,9.4c9.3,0,16.2-3.4,23-9.4C310.2,334,312.8,325.5,312.8,317z M312.8-67c0-8.5-3.4-16.2-9.4-23
|
||||||
|
c-6-6-13.7-9.4-23-9.4c-9.3,0-16.2,3.4-23,9.4c-6,6-9.4,13.7-9.4,23c0,8.5,3.4,16.2,9.4,23c6,6,13.7,9.4,23,9.4
|
||||||
|
c9.3,0,16.2-3.4,23-9.4C310.2-49.9,312.8-58.5,312.8-67z M526.1-24.3c0-8.5-3.4-16.2-9.4-23s-13.7-9.4-23-9.4s-16.2,3.4-23,9.4
|
||||||
|
s-9.4,13.7-9.4,23s3.4,16.2,9.4,23c6,6,13.7,9.4,23,9.4s16.2-3.4,23-9.4C522.7-8.1,526.1-15.8,526.1-24.3z M557.7-24.3
|
||||||
|
c0,11.9-2.6,22.2-8.5,32.4s-13.7,17.9-23,23c-0.9,64-25.6,110.1-75.1,138.2c-15.4,8.5-37.5,17.1-67.4,27.3
|
||||||
|
c-28.2,8.5-46.9,17.1-56.3,23.9c-9.4,6.8-13.7,17.9-13.7,33.3v8.5c9.4,6,17.9,13.7,23,23c5.1,9.4,8.5,20.5,8.5,32.4
|
||||||
|
c0,17.9-6,33.3-18.8,45.2c-12.8,11.9-28.1,18.1-46.1,18.1s-33.3-6-45.2-18.8s-18.8-27.3-18.8-45.2c0-11.9,2.6-22.2,8.5-32.4
|
||||||
|
c6-10.2,13.7-17.9,23-23V-11.5c-9.4-6-17.9-13.7-23-23s-8.5-20.6-8.5-32.5c0-17.9,6-33.3,18.8-45.2c12.8-11.9,27.3-18.8,45.2-18.8
|
||||||
|
c17.9,0,33.3,6,45.2,18.8s18.8,27.3,18.8,45.2c0,11.9-2.6,22.2-8.5,32.4c-5.9,10.2-13.7,17.9-23,23V154c11.9-6,29-11.9,51.2-18.8
|
||||||
|
c11.9-3.4,22.2-6.8,29-10.2c6.8-3.4,15.4-6,23.9-10.2s15.4-8.5,19.6-12.8s9.4-10.2,13.7-17.1s7.7-14.5,9.4-23
|
||||||
|
c1.7-8.5,2.6-18.8,2.6-30.7c-9.4-6-17.9-13.7-23-23s-8.5-20.5-8.5-32.4c0-17.9,6-33.3,18.8-45.2c12.8-12.8,27.3-18.8,45.2-18.8
|
||||||
|
s33.3,6,45.2,18.8C551.7-57.6,557.7-42.3,557.7-24.3z"
|
||||||
|
/>
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
name: "Fork",
|
||||||
|
};
|
||||||
|
</script>
|
@ -0,0 +1,19 @@
|
|||||||
|
<template>
|
||||||
|
<svg
|
||||||
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||||
|
viewBox="0 0 24 24"
|
||||||
|
style="height: 1.25rem; width: 1.25rem; vertical-align: bottom"
|
||||||
|
>
|
||||||
|
<path
|
||||||
|
fill="currentColor"
|
||||||
|
d="M12 2A10 10 0 0 0 2 12c0 4.42 2.87 8.17 6.84 9.5c.5.08.66-.23.66-.5v-1.69c-2.77.6-3.36-1.34-3.36-1.34c-.46-1.16-1.11-1.47-1.11-1.47c-.91-.62.07-.6.07-.6c1 .07 1.53 1.03 1.53 1.03c.87 1.52 2.34 1.07 2.91.83c.09-.65.35-1.09.63-1.34c-2.22-.25-4.55-1.11-4.55-4.92c0-1.11.38-2 1.03-2.71c-.1-.25-.45-1.29.1-2.64c0 0 .84-.27 2.75 1.02c.79-.22 1.65-.33 2.5-.33c.85 0 1.71.11 2.5.33c1.91-1.29 2.75-1.02 2.75-1.02c.55 1.35.2 2.39.1 2.64c.65.71 1.03 1.6 1.03 2.71c0 3.82-2.34 4.66-4.57 4.91c.36.31.69.92.69 1.85V21c0 .27.16.59.67.5C19.14 20.16 22 16.42 22 12A10 10 0 0 0 12 2Z"
|
||||||
|
></path>
|
||||||
|
</svg>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
name: "MdiGithub",
|
||||||
|
};
|
||||||
|
</script>
|
@ -0,0 +1,32 @@
|
|||||||
|
<template>
|
||||||
|
<svg
|
||||||
|
version="1.1"
|
||||||
|
id="Layer_1"
|
||||||
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||||
|
x="0px"
|
||||||
|
y="0px"
|
||||||
|
viewBox="0 0 512 512"
|
||||||
|
style="
|
||||||
|
enable-background: new 0 0 512 512;
|
||||||
|
height: 1rem;
|
||||||
|
fill: var(--c-text);
|
||||||
|
"
|
||||||
|
xml:space="preserve"
|
||||||
|
>
|
||||||
|
<g>
|
||||||
|
<path
|
||||||
|
d="M175.1,168.9L13.7,186.8c-5.8,0.7-11,4.6-12.9,10.5c-1.9,5.9,0,12.1,4.3,16c48,43.8,120.1,109.4,120.1,109.4
|
||||||
|
c-0.1,0-19.8,95.4-32.9,159.1c-1.1,5.8,1,11.9,6,15.5c5,3.7,11.4,3.7,16.5,0.9C171.3,466,256,417.7,256,417.7l141.1,80.5
|
||||||
|
c5.1,2.8,11.6,2.8,16.6-0.9c5-3.7,7.1-9.7,6-15.5l-32.8-159.1L507,213.4c4.3-4,6.2-10.2,4.3-16.1c-1.9-5.9-7.1-9.8-12.9-10.4
|
||||||
|
c-64.6-7.2-161.5-18-161.5-18L269.9,20.8c-2.5-5.3-7.8-9-14-9c-6.2,0-11.5,3.7-13.9,9L175.1,168.9z"
|
||||||
|
/>
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
name: "Star",
|
||||||
|
};
|
||||||
|
</script>
|
@ -0,0 +1,15 @@
|
|||||||
|
<template>
|
||||||
|
<svg
|
||||||
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||||
|
width="1em"
|
||||||
|
height="1em"
|
||||||
|
style="height: 1.25rem; width: 1.25rem; vertical-align: bottom"
|
||||||
|
viewBox="0 0 24 24"
|
||||||
|
>
|
||||||
|
<path
|
||||||
|
fill="currentColor"
|
||||||
|
d="M13.35 22q-.6 0-.862-.387q-.263-.388-.063-.963l3.65-9.675q.15-.4.563-.688Q17.05 10 17.5 10q.425 0 .85.287q.425.288.575.688l3.65 9.675q.2.575-.062.963q-.263.387-.888.387q-.275 0-.5-.175q-.225-.175-.325-.425l-.85-2.45H15.1l-.875 2.45q-.1.25-.35.425q-.25.175-.525.175Zm2.35-4.8h3.6l-1.75-4.95h-.1ZM7.15 8.55q.4.725.85 1.337q.45.613 1.05 1.263q1.1-1.2 1.825-2.462Q11.6 7.425 12.1 6H2q-.425 0-.712-.287Q1 5.425 1 5t.288-.713Q1.575 4 2 4h6V3q0-.425.288-.713Q8.575 2 9 2t.713.287Q10 2.575 10 3v1h6q.425 0 .712.287Q17 4.575 17 5t-.288.713Q16.425 6 16 6h-1.9q-.525 1.775-1.425 3.45q-.9 1.675-2.225 3.15l2.4 2.45l-.75 2.05L9 14l-4.3 4.3q-.275.275-.7.275q-.425 0-.7-.275q-.275-.275-.275-.7q0-.425.275-.7l4.35-4.35q-.675-.775-1.25-1.563q-.575-.787-1.025-1.662Q5.1 8.8 5.35 8.4t.875-.4q.25 0 .525.162q.275.163.4.388Z"
|
||||||
|
></path>
|
||||||
|
</svg>
|
||||||
|
</template>
|
@ -0,0 +1,18 @@
|
|||||||
|
const { defaultTheme } = require("@vuepress/theme-default");
|
||||||
|
const { path } = require("@vuepress/utils");
|
||||||
|
|
||||||
|
exports.localTheme = (options) => {
|
||||||
|
return {
|
||||||
|
name: "vuepress-theme-arthas",
|
||||||
|
extends: defaultTheme(options),
|
||||||
|
|
||||||
|
alias: {
|
||||||
|
"@theme/Home.vue": path.resolve(__dirname, "components/Home.vue"),
|
||||||
|
"@theme/NavbarDropdown.vue": path.resolve(
|
||||||
|
__dirname,
|
||||||
|
"components/NavbarDropdown.vue"
|
||||||
|
),
|
||||||
|
"@theme/AutoLink.vue": path.resolve(__dirname, "components/AutoLink.vue"),
|
||||||
|
},
|
||||||
|
};
|
||||||
|
};
|
@ -0,0 +1,53 @@
|
|||||||
|
---
|
||||||
|
home: true
|
||||||
|
heroImage: /images/arthas_light.png
|
||||||
|
heroImageDark: /images/arthas_dark.png
|
||||||
|
heroText: null
|
||||||
|
tagline: "Java 应用诊断利器"
|
||||||
|
actions:
|
||||||
|
- text: 快速入门
|
||||||
|
link: /doc/quick-start.html
|
||||||
|
type: primary
|
||||||
|
- text: 查看github
|
||||||
|
link: https://github.com/alibaba/arthas
|
||||||
|
type: secondary
|
||||||
|
features:
|
||||||
|
- icon: 🖥
|
||||||
|
title: Dashboard
|
||||||
|
details: 实时查看系统的运行状况。
|
||||||
|
- icon: 🔬
|
||||||
|
title: 查看入参/返回值/异常
|
||||||
|
details: 查看函数调用的参数,返回值和异常。
|
||||||
|
- icon: 🔩
|
||||||
|
title: 在线热更新
|
||||||
|
details: jad/sc/redefine 一条龙热更新代码。
|
||||||
|
- icon: 🩺
|
||||||
|
title: 类冲突
|
||||||
|
details: 秒解类冲突问题,定位类加载路径。
|
||||||
|
- icon: ⚡️
|
||||||
|
title: 性能热点
|
||||||
|
details: 快速定位应用的热点,生成火焰图。
|
||||||
|
- icon: 📡
|
||||||
|
title: WebConsole
|
||||||
|
details: 在线诊断,点开网页诊断线上应用。
|
||||||
|
users_title: "用户"
|
||||||
|
users_details: "请在 <a href='https://github.com/alibaba/arthas/issues/111' target='_blank'>Wanted: who's using arthas</a> 上提供信息来帮助Arthas做的更好。"
|
||||||
|
users:
|
||||||
|
- name: Alibaba Group
|
||||||
|
logo: /images/users/users_alibaba.png
|
||||||
|
- name: Didiglobal
|
||||||
|
logo: /images/users/users_didi.png
|
||||||
|
- name: Kaola
|
||||||
|
logo: /images/users/users_kaola.png
|
||||||
|
- name: Qunar
|
||||||
|
logo: /images/users/users_qunar.png
|
||||||
|
- name: Telecom
|
||||||
|
logo: /images/users/users_telecom.png
|
||||||
|
- name: Weidian
|
||||||
|
logo: /images/users/users_weidian.png
|
||||||
|
- name: ICBC
|
||||||
|
logo: /images/users/users_icbc.png
|
||||||
|
- name: Chinaums
|
||||||
|
logo: /images/users/users_yinlian.png
|
||||||
|
footer: Apache-2.0 license | Copyright 2018-present, Alibaba Middleware Group, and contributors
|
||||||
|
---
|
@ -0,0 +1,43 @@
|
|||||||
|
# 表达式核心变量
|
||||||
|
|
||||||
|
无论是匹配表达式也好、观察表达式也罢,他们核心判断变量都是围绕着一个 Arthas 中的通用通知对象 `Advice` 进行。
|
||||||
|
|
||||||
|
它的简略代码结构如下
|
||||||
|
|
||||||
|
```java
|
||||||
|
public class Advice {
|
||||||
|
|
||||||
|
private final ClassLoader loader;
|
||||||
|
private final Class<?> clazz;
|
||||||
|
private final ArthasMethod method;
|
||||||
|
private final Object target;
|
||||||
|
private final Object[] params;
|
||||||
|
private final Object returnObj;
|
||||||
|
private final Throwable throwExp;
|
||||||
|
private final boolean isBefore;
|
||||||
|
private final boolean isThrow;
|
||||||
|
private final boolean isReturn;
|
||||||
|
|
||||||
|
// getter/setter
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
这里列一个表格来说明不同变量的含义
|
||||||
|
|
||||||
|
| 变量名 | 变量解释 |
|
||||||
|
| --------: | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||||
|
| loader | 本次调用类所在的 ClassLoader |
|
||||||
|
| clazz | 本次调用类的 Class 引用 |
|
||||||
|
| method | 本次调用方法反射引用 |
|
||||||
|
| target | 本次调用类的实例 |
|
||||||
|
| params | 本次调用参数列表,这是一个数组,如果方法是无参方法则为空数组 |
|
||||||
|
| returnObj | 本次调用返回的对象。当且仅当 `isReturn==true` 成立时候有效,表明方法调用是以正常返回的方式结束。如果当前方法无返回值 `void`,则值为 null |
|
||||||
|
| throwExp | 本次调用抛出的异常。当且仅当 `isThrow==true` 成立时有效,表明方法调用是以抛出异常的方式结束。 |
|
||||||
|
| isBefore | 辅助判断标记,当前的通知节点有可能是在方法一开始就通知,此时 `isBefore==true` 成立,同时 `isThrow==false` 和 `isReturn==false`,因为在方法刚开始时,还无法确定方法调用将会如何结束。 |
|
||||||
|
| isThrow | 辅助判断标记,当前的方法调用以抛异常的形式结束。 |
|
||||||
|
| isReturn | 辅助判断标记,当前的方法调用以正常返回的形式结束。 |
|
||||||
|
|
||||||
|
所有变量都可以在表达式中直接使用,如果在表达式中编写了不符合 OGNL 脚本语法或者引入了不在表格中的变量,则退出命令的执行;用户可以根据当前的异常信息修正`条件表达式`或`观察表达式`
|
||||||
|
|
||||||
|
- 特殊用法请参考:[https://github.com/alibaba/arthas/issues/71](https://github.com/alibaba/arthas/issues/71)
|
||||||
|
- OGNL 表达式官网:[https://commons.apache.org/proper/commons-ognl/language-guide.html](https://commons.apache.org/proper/commons-ognl/language-guide.html)
|
@ -0,0 +1,7 @@
|
|||||||
|
# cls
|
||||||
|
|
||||||
|
清空当前屏幕区域。
|
||||||
|
|
||||||
|
::: tip
|
||||||
|
非终端模式下使用 cls 指令,会提示"Command 'cls' is only support tty session."。
|
||||||
|
:::
|
@ -0,0 +1,50 @@
|
|||||||
|
# 命令列表
|
||||||
|
|
||||||
|
- [dashboard](dashboard.md)
|
||||||
|
- [thread](thread.md)
|
||||||
|
- [jvm](jvm.md)
|
||||||
|
- [memory](memory.md)
|
||||||
|
- [sysprop](sysprop.md)
|
||||||
|
- [sysenv](sysenv.md)
|
||||||
|
- [vmoption](vmoption.md)
|
||||||
|
- [perfcounter](perfcounter.md)
|
||||||
|
- [logger](logger.md)
|
||||||
|
- [mbean](mbean.md)
|
||||||
|
- [getstatic](getstatic.md)
|
||||||
|
- [ognl](ognl.md)
|
||||||
|
- [sc](sc.md)
|
||||||
|
- [sm](sm.md)
|
||||||
|
- [dump](dump.md)
|
||||||
|
- [heapdump](heapdump.md)
|
||||||
|
- [vmtool](vmtool.md)
|
||||||
|
- [jad](jad.md)
|
||||||
|
- [classloader](classloader.md)
|
||||||
|
- [mc](mc.md)
|
||||||
|
- [retransform](retransform.md)
|
||||||
|
- [redefine](redefine.md)
|
||||||
|
- [monitor](monitor.md)
|
||||||
|
- [watch](watch.md)
|
||||||
|
- [trace](trace.md)
|
||||||
|
- [stack](stack.md)
|
||||||
|
- [tt](tt.md)
|
||||||
|
- [profiler](profiler.md)
|
||||||
|
- [cat](cat.md)
|
||||||
|
- [echo](echo.md)
|
||||||
|
- [grep](grep.md)
|
||||||
|
- [base64](base64.md)
|
||||||
|
- [tee](tee.md)
|
||||||
|
- [pwd](pwd.md)
|
||||||
|
- [auth](auth.md)
|
||||||
|
- [options](options.md)
|
||||||
|
|
||||||
|
### Arthas 基础命令
|
||||||
|
|
||||||
|
- [help](help.md)
|
||||||
|
- [cls](cls.md)
|
||||||
|
- [session](session.md)
|
||||||
|
- [reset](reset.md)
|
||||||
|
- [version](version.md)
|
||||||
|
- [history](history.md)
|
||||||
|
- [quit](quit.md)
|
||||||
|
- [stop](stop.md)
|
||||||
|
- [keymap](keymap.md)
|
@ -1,10 +1,10 @@
|
|||||||
grep
|
# grep
|
||||||
===
|
|
||||||
|
|
||||||
[`grep`在线教程](https://arthas.aliyun.com/doc/arthas-tutorials.html?language=cn&id=command-grep)
|
[`grep`在线教程](https://arthas.aliyun.com/doc/arthas-tutorials.html?language=cn&id=command-grep)
|
||||||
|
|
||||||
> 类似传统的`grep`命令。
|
::: tip
|
||||||
|
类似传统的`grep`命令。
|
||||||
|
:::
|
||||||
|
|
||||||
```
|
```
|
||||||
USAGE:
|
USAGE:
|
@ -0,0 +1,31 @@
|
|||||||
|
# history
|
||||||
|
|
||||||
|
打印命令历史。
|
||||||
|
|
||||||
|
::: tip
|
||||||
|
历史指令会通过一个名叫 history 的文件持久化,所以 history 指令可以查看当前 arthas 服务器的所有历史命令,而不仅只是当前次会话使用过的命令。
|
||||||
|
:::
|
||||||
|
|
||||||
|
### 参数说明
|
||||||
|
|
||||||
|
| 参数名称 | 参数说明 |
|
||||||
|
| -------: | :---------------------- |
|
||||||
|
| [c:] | 清空历史指令 |
|
||||||
|
| [n:] | 显示最近执行的 n 条指令 |
|
||||||
|
|
||||||
|
### 使用参考
|
||||||
|
|
||||||
|
```
|
||||||
|
#查看最近执行的3条指令
|
||||||
|
$ history 3
|
||||||
|
269 thread
|
||||||
|
270 cls
|
||||||
|
271 history 3
|
||||||
|
```
|
||||||
|
|
||||||
|
```
|
||||||
|
#清空指令
|
||||||
|
$ history -c
|
||||||
|
$ history 3
|
||||||
|
1 history 3
|
||||||
|
```
|