forked from Gitlink/gitlink_help_center
Compare commits
No commits in common. "master" and "master" have entirely different histories.
|
|
@ -1,64 +0,0 @@
|
|||
version: 2
|
||||
name: test
|
||||
description: ""
|
||||
global:
|
||||
concurrent: 1
|
||||
trigger:
|
||||
webhook: gitlink@1.0.0
|
||||
event:
|
||||
- ref: pr
|
||||
ruleset:
|
||||
- param-ref: target_branch
|
||||
operator: EQ
|
||||
value: '"master"'
|
||||
ruleset-operator: AND
|
||||
workflow:
|
||||
- ref: start
|
||||
name: 开始
|
||||
task: start
|
||||
- ref: end
|
||||
name: 结束
|
||||
task: end
|
||||
needs:
|
||||
- ssh_cmd_0
|
||||
- ref: git_clone_0
|
||||
name: git clone
|
||||
task: git_clone@1.2.9
|
||||
input:
|
||||
remote_url: '"https://gitlink.org.cn/SheYuWu03/gitlink_help_center.git"'
|
||||
ref: '"refs/heads/master"'
|
||||
commit_id: '""'
|
||||
depth: 1
|
||||
needs:
|
||||
- start
|
||||
- ref: docker_image_build_0
|
||||
name: docker镜像构建
|
||||
task: docker_image_build@1.6.0
|
||||
input:
|
||||
docker_username: ((docker.username))
|
||||
docker_password: ((docker.password))
|
||||
image_name: '"registry.cn-guangzhou.aliyuncs.com/nudt_devops/gitlink_help_center"'
|
||||
image_tag: '"latest"'
|
||||
registry_address: '"registry.cn-guangzhou.aliyuncs.com"'
|
||||
docker_file: '"Dockerfile"'
|
||||
docker_build_path: '"."'
|
||||
workspace: git_clone_0.git_path
|
||||
image_push: true
|
||||
build_args: '""'
|
||||
needs:
|
||||
- git_clone_0
|
||||
- ref: ssh_cmd_0
|
||||
name: ssh执行命令
|
||||
task: ssh_cmd@1.1.1
|
||||
input:
|
||||
ssh_pass: ((ssh_key.ssh_pass))
|
||||
ssh_ip: '"116.62.120.115"'
|
||||
ssh_port: '"22"'
|
||||
ssh_user: '"root"'
|
||||
ssh_cmd: '"docker stop ghc_group6 && docker rm ghc_group6 && docker pull
|
||||
registry.cn-guangzhou.aliyuncs.com/nudt_devops/gitlink_help_center_group6:latest
|
||||
&& docker run -d -p 3000:3000 --name ghc_group6
|
||||
registry.cn-guangzhou.aliyuncs.com/nudt_devops/gitlink_help_center_group6:latest"'
|
||||
needs:
|
||||
- docker_image_build_0
|
||||
|
||||
|
|
@ -1,30 +0,0 @@
|
|||
version: 2
|
||||
name: 刘德华
|
||||
description: ""
|
||||
global:
|
||||
concurrent: 1
|
||||
workflow:
|
||||
- ref: start
|
||||
name: 开始
|
||||
task: start
|
||||
- ref: ssh_cmd_0
|
||||
name: ssh执行命令
|
||||
task: ssh_cmd@1.1.1
|
||||
input:
|
||||
ssh_pass: ((ssh_key.ssh_key))
|
||||
ssh_private_key: ((ssh_key.ssh_key))
|
||||
ssh_ip: '"116.62.120.115"'
|
||||
ssh_port: '"22"'
|
||||
ssh_user: '""'
|
||||
ssh_cmd: '"docker stop ghc_group6 && docker rm ghc_group6 && docker pull
|
||||
registry.cn-guangzhou.aliyuncs.com/nudt_devops/gitlink_help_center_group6:latest
|
||||
&& docker run -p 3000:3000 –name ghc_group6
|
||||
registry.cn-guangzhou.aliyuncs.com/nudt_devops/gitlink_help_center_group6:latest"'
|
||||
needs:
|
||||
- start
|
||||
- ref: end
|
||||
name: 结束
|
||||
task: end
|
||||
needs:
|
||||
- ssh_cmd_0
|
||||
|
||||
|
|
@ -1,62 +0,0 @@
|
|||
version: 2
|
||||
name: 发布更新
|
||||
description: ""
|
||||
global:
|
||||
concurrent: 1
|
||||
trigger:
|
||||
webhook: gitlink@1.0.0
|
||||
event:
|
||||
- ref: push
|
||||
ruleset-operator: AND
|
||||
workflow:
|
||||
- ref: start
|
||||
name: 开始
|
||||
task: start
|
||||
- ref: end
|
||||
name: 结束
|
||||
task: end
|
||||
needs:
|
||||
- git_push_0
|
||||
- ref: docker_image_build_0
|
||||
name: docker镜像构建
|
||||
task: docker_image_build@1.6.0
|
||||
input:
|
||||
docker_username: ((ssh_key.ssh_private_key))
|
||||
docker_password: ((ssh_key.ssh_private_key))
|
||||
image_name: '""'
|
||||
image_tag: '"latest"'
|
||||
registry_address: '""'
|
||||
docker_file: '"Dockerfile"'
|
||||
docker_build_path: '"."'
|
||||
workspace: '"."'
|
||||
image_push: true
|
||||
build_args: '""'
|
||||
needs:
|
||||
- start
|
||||
- ref: ssh_cmd_0
|
||||
name: ssh执行命令
|
||||
task: ssh_cmd@1.1.1
|
||||
input:
|
||||
ssh_pass: ((ssh_key.ssh_private_key))
|
||||
ssh_ip: '""'
|
||||
ssh_port: '"22"'
|
||||
ssh_user: '"root"'
|
||||
ssh_cmd: '""'
|
||||
needs:
|
||||
- docker_image_build_0
|
||||
- ref: git_push_0
|
||||
name: git_push
|
||||
task: sailstar/git_push@1.0.6
|
||||
input:
|
||||
username: ((ssh_key.ssh_private_key))
|
||||
password: ((ssh_key.ssh_private_key))
|
||||
remote_url: '""'
|
||||
remote_branch: '"master"'
|
||||
source_path: '""'
|
||||
target_dir: '""'
|
||||
commit_message: '"jianmu default commit message"'
|
||||
committer_name: '"jianmu"'
|
||||
committer_email: '"jianmu@example.com"'
|
||||
needs:
|
||||
- ssh_cmd_0
|
||||
|
||||
|
|
@ -1,58 +0,0 @@
|
|||
version: 2
|
||||
name: 添加功能流水线
|
||||
description: ""
|
||||
global:
|
||||
concurrent: 1
|
||||
trigger:
|
||||
webhook: gitlink@1.0.0
|
||||
event:
|
||||
- ref: pr
|
||||
ruleset:
|
||||
- param-ref: target_branch
|
||||
operator: EQ
|
||||
value: '"master"'
|
||||
ruleset-operator: AND
|
||||
workflow:
|
||||
- ref: start
|
||||
name: 开始
|
||||
task: start
|
||||
- ref: git_clone_0
|
||||
name: git clone
|
||||
task: git_clone@1.2.9
|
||||
input:
|
||||
remote_url: '"https://gitlink.org.cn/SheYuWu03/reposync.git"'
|
||||
ref: '"refs/heads/master"'
|
||||
commit_id: '""'
|
||||
depth: 1
|
||||
needs:
|
||||
- start
|
||||
- ref: docker_image_build_0
|
||||
name: docker镜像构建
|
||||
task: docker_image_build@1.6.0
|
||||
input:
|
||||
image_name: '""'
|
||||
image_tag: '"latest"'
|
||||
registry_address: '""'
|
||||
docker_file: '"Dockerfile"'
|
||||
docker_build_path: '"."'
|
||||
workspace: '"."'
|
||||
image_push: true
|
||||
build_args: '""'
|
||||
needs:
|
||||
- git_clone_0
|
||||
- ref: ssh_cmd_0
|
||||
name: ssh执行命令
|
||||
task: ssh_cmd@1.1.1
|
||||
input:
|
||||
ssh_ip: '""'
|
||||
ssh_port: '"22"'
|
||||
ssh_user: '"root"'
|
||||
ssh_cmd: '""'
|
||||
needs:
|
||||
- docker_image_build_0
|
||||
- ref: end
|
||||
name: 结束
|
||||
task: end
|
||||
needs:
|
||||
- ssh_cmd_0
|
||||
|
||||
10
Dockerfile
10
Dockerfile
|
|
@ -1,10 +0,0 @@
|
|||
FROM node:18-alpine
|
||||
LABEL maintainer="niezhiwei <3143901237@qq.com>"
|
||||
|
||||
WORKDIR /gitlink_help_center
|
||||
|
||||
COPY ./ /gitlink_help_center/
|
||||
|
||||
RUN yarn install
|
||||
RUN npm run build -- --locale zh-cn
|
||||
CMD ["npm", "run", "serve"]
|
||||
|
|
@ -9,20 +9,20 @@ sidebar_position: 9
|
|||
## Web IDE 核心能力
|
||||
对标有容器的标准版,极速版 IDE 主要在读、写、运行、提交等方面进行了探索:
|
||||
|
||||
**1. 读:**
|
||||
**1. 读:**
|
||||
- a. 适配了多种代码托管平台,例如 Gitlink、Github、Gitlab 等代码托管平台,业务可以非常方便的使用代码服务的能力
|
||||
- b. 内置了包括 Java、TS/JS、C++、Go、Python、Rust 等几十种常见语言的语法高亮支持
|
||||
- c. 支持了如 Git Blame、GitGraph 等代码阅读辅助插件
|
||||
|
||||
**2. 写:**
|
||||
**2. 写:**
|
||||
- a. 支持 HTML/CSS/JS/Markdown 等在线语言服务能力,支持错误诊断能力
|
||||
- b. 浏览器文件系统
|
||||
|
||||
**3. 运行:**
|
||||
**3. 运行:**
|
||||
- a. 支持基于 Skypack 的前端代码运行方案
|
||||
- b. 支持基于 Pyodide 的 Python 运行
|
||||
|
||||
**4. 提交:**
|
||||
**4. 提交:**
|
||||
- a. 支持 WebSCM,提供分支切换/新增、代码提交等能力
|
||||
|
||||
如果说以 CodeMirror、Monaco 为代表的浏览器 IDE 组件为 Web IDE 1.0,那拥有上述能力的极速版 Web IDE 就是 Web IDE 2.0。极速版 Web IDE 方案在蚂蚁内部与 2021 年 4 月上线,承接了代码阅读、代码评审、在线笔试、代码检查结果反馈、轻量在线研发等众多场景,同年 8 月 vscode.dev 和 github.dev 上线,与之相比,极速版 Web IDE 利用 OpenSumi 框架的高扩展性,业务可以更加深度的定制模块与插件,让业务有多的想象空间。
|
||||
|
|
@ -72,7 +72,7 @@ Gitlink 代码阅读场景虽然接入极速版 IDE 编辑器,但文件树、
|
|||

|
||||
<center>JS语言服务提示</center>
|
||||
|
||||
- 3.提供了 Java、Go、Python、C++、Php 的在线语言服务能力,支持简单的定义跳转、查找引用等功能,让大家更加方便的阅读代码
|
||||
- 3. 提供了 Java、Go、Python、C++、Php 的在线语言服务能力,支持简单的定义跳转、查找引用等功能,让大家更加方便的阅读代码
|
||||
|
||||

|
||||
<center>Python 查看引用</center>
|
||||
|
|
|
|||
|
|
@ -62,6 +62,6 @@ sidebar_position: 1
|
|||
|
||||
## 用户操作流程
|
||||
|
||||
.png)<br/>
|
||||
<br/>
|
||||
|
||||
<center>用户操作流程</center><br/>
|
||||
|
|
|
|||
|
|
@ -12,7 +12,6 @@ sidebar_position: 2
|
|||

|
||||
<br/>
|
||||
或在头像下拉列表中选择设置可以进入消息通知设置界面;
|
||||
|
||||

|
||||
|
||||
#### 2.进行通知设置
|
||||
|
|
|
|||
|
|
@ -58,13 +58,6 @@ module.exports = {
|
|||
position: 'left',
|
||||
label: '帮助中心'
|
||||
},
|
||||
{
|
||||
type: 'doc',
|
||||
docId: 'intro',
|
||||
position: 'right',
|
||||
label: '意见反馈',
|
||||
href:"/ratingpage"
|
||||
},
|
||||
// {
|
||||
// href: 'https://github.com/boxyhq',
|
||||
// position: 'right',
|
||||
|
|
|
|||
|
|
@ -1,93 +0,0 @@
|
|||
import React, { useState } from 'react';
|
||||
|
||||
|
||||
const SatisfactionRating = () => {
|
||||
const [selectedUsabilityRating, setSelectedUsabilityRating] = useState(-1);
|
||||
const [selectedHelpRating, setSelectedHelpRating] = useState(-1);
|
||||
const [comment, setComment] = useState('');
|
||||
|
||||
const usabilityRatings = ['非常满意', '比较满意', '一般', '不太满意', '非常不满意'];
|
||||
const helpRatings = ['很有帮助', '比较有帮助', '帮助不大', '毫无帮助'];
|
||||
|
||||
const handleUsabilityRatingClick = (index) => {
|
||||
setSelectedUsabilityRating(index);
|
||||
};
|
||||
|
||||
const handleHelpRatingClick = (index) => {
|
||||
setSelectedHelpRating(index);
|
||||
};
|
||||
|
||||
const handleSubmit = () => {
|
||||
if (selectedUsabilityRating === -1 || selectedHelpRating === -1) {
|
||||
alert('请对两个选项都进行选择!');
|
||||
} else {
|
||||
const usabilityRating = usabilityRatings[selectedUsabilityRating];
|
||||
const helpRating = helpRatings[selectedHelpRating];
|
||||
alert(`感谢您的反馈`);
|
||||
}
|
||||
};
|
||||
|
||||
return (
|
||||
<div style={{ maxWidth: '600px', margin: 'auto', textAlign: 'center' }}>
|
||||
<h2 style={{ marginBottom: '20px' }}>请留下您的意见</h2>
|
||||
<div style={{ display: 'flex', flexDirection: 'column', alignItems: 'center', marginBottom: '20px' }}>
|
||||
<h3>满意度:</h3>
|
||||
<div style={{ display: 'flex', justifyContent: 'center', marginBottom: '10px' }}>
|
||||
{usabilityRatings.map((rating, index) => (
|
||||
<button key={index} onClick={() => handleUsabilityRatingClick(index)} style={{ margin: '5px', padding: '10px 20px', backgroundColor: selectedUsabilityRating === index ? '#337ab7' : '#f0f0f0', color: selectedUsabilityRating === index ? '#ffffff' : '#333', border: 'none', borderRadius: '5px', cursor: 'pointer', boxShadow: '0px 3px 5px rgba(0,0,0,0.1)', transition: 'background-color 0.3s ease' }}>
|
||||
{rating}
|
||||
</button>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
<div style={{ display: 'flex', flexDirection: 'column', alignItems: 'center', marginBottom: '20px' }}>
|
||||
<h3>该文档对您是否有帮助?:</h3>
|
||||
<div style={{ display: 'flex', justifyContent: 'center', marginBottom: '10px' }}>
|
||||
{helpRatings.map((rating, index) => (
|
||||
<button key={index} onClick={() => handleHelpRatingClick(index)} style={{ margin: '5px', padding: '10px 20px', backgroundColor: selectedHelpRating === index ? '#337ab7' : '#f0f0f0', color: selectedHelpRating === index ? '#ffffff' : '#333', border: 'none', borderRadius: '5px', cursor: 'pointer', boxShadow: '0px 3px 5px rgba(0,0,0,0.1)', transition: 'background-color 0.3s ease' }}>
|
||||
{rating}
|
||||
</button>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
<div style={{marginBottom: '20px'}}>
|
||||
<h3>意见和建议:</h3>
|
||||
<textarea
|
||||
value={comment}
|
||||
onChange={(e) => setComment(e.target.value)}
|
||||
placeholder="写下想说的话"
|
||||
style={{
|
||||
width: '100%',
|
||||
height: '100px',
|
||||
padding: '10px',
|
||||
borderRadius: '5px',
|
||||
border: '1px solid #ccc',
|
||||
transition: 'box-shadow 0.3s, border-color 0.3s', // 添加过渡效果
|
||||
boxShadow: comment ? '0 0 5px rgba(81, 203, 238, 1)' : 'none', // 根据内容是否为空添加幽影效果
|
||||
borderColor: comment ? '#51cbee' : '#ccc', // 根据内容是否为空修改边框颜色
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
<button onClick={handleSubmit} style={{
|
||||
backgroundColor: '#337ab7',
|
||||
color: '#ffffff',
|
||||
padding: '10px 20px',
|
||||
border: 'none',
|
||||
borderRadius: '5px',
|
||||
cursor: 'pointer',
|
||||
boxShadow: '0px 3px 5px rgba(0,0,0,0.1)',
|
||||
transition: 'background-color 0.3s ease',
|
||||
':hover': {backgroundColor: '#286090'}
|
||||
}}>提交
|
||||
</button>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export default function HelloReactPage() {
|
||||
return (
|
||||
<div style={{display: 'flex', justifyContent: 'center', alignItems: 'center', height: '100vh', background: '#f9f9f9' }}>
|
||||
<SatisfactionRating />
|
||||
</div>
|
||||
);
|
||||
}
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 33 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 48 KiB |
Loading…
Reference in New Issue