Compare commits

...

40 Commits

Author SHA1 Message Date
SheYuWu03 91d2cdffe2 feat: .devops/添加功能流水线.yml 2024-06-24 10:17:59 +00:00
吴舒先 55ea025f4a 测试流水线 2024-05-30 20:29:58 +08:00
吴舒先 06adfeb533 Merge branch 'master' of https://gitlink.org.cn/SheYuWu03/gitlink_help_center 2024-05-30 17:17:53 +08:00
SheYuWu03 22750d737e 测试流水线 2024-05-30 17:16:57 +08:00
吴舒先 fa4fbc235d 测试流水线 2024-05-30 17:12:25 +08:00
吴舒先 399a100045 Merge branch 'master' of https://gitlink.org.cn/SheYuWu03/gitlink_help_center 2024-05-30 17:08:16 +08:00
吴舒先 51558c70f0 冲突解决--通知设置.md 2024-05-30 17:08:02 +08:00
SheYuWu03 385d47c6f9 refactor: .devops/test.yml 2024-05-30 09:04:25 +00:00
SheYuWu03 5e53adf9a6 测试流水线 2024-05-30 17:05:37 +08:00
E4wel83hu 634b4fd256 更新 docusaurus.config.js,添加按钮 2024-05-30 16:58:09 +08:00
E4wel83hu 61fa10504f 添加意见反馈界面 2024-05-30 16:56:58 +08:00
wuxin21 b2b27fe0fe refactor: .devops/发布更新.yml 2024-05-29 03:09:55 +00:00
wuxin21 ff0d71a238 refactor: .devops/发布更新.yml 2024-05-29 03:09:40 +00:00
SheYuWu03 cc893c3ad0 refactor: .devops/test.yml 2024-05-29 02:54:33 +00:00
SheYuWu03 102cd94820 refactor: .devops/test.yml 2024-05-29 02:25:46 +00:00
SheYuWu03 a012cc9031 refactor: .devops/test.yml 2024-05-29 01:55:34 +00:00
SheYuWu03 56a77aaf87 refactor: .devops/test.yml 2024-05-29 01:50:05 +00:00
SheYuWu03 db57e499af refactor: .devops/test.yml 2024-05-29 01:47:10 +00:00
SheYuWu03 06180e71c4 refactor: .devops/test.yml 2024-05-29 01:40:31 +00:00
SheYuWu03 3e37a28df1 refactor: .devops/test.yml 2024-05-29 01:38:18 +00:00
SheYuWu03 778e0c5236 refactor: .devops/刘德华.yml 2024-05-29 01:29:21 +00:00
SheYuWu03 69847d3a31 refactor: .devops/刘德华.yml 2024-05-29 01:28:36 +00:00
SheYuWu03 f4ebbade15 refactor: .devops/test.yml 2024-05-29 01:24:24 +00:00
SheYuWu03 99e575124f refactor: .devops/test.yml 2024-05-29 01:18:50 +00:00
ashudia4 995f55ff23 refactor: .devops/test.yml 2024-05-28 16:40:58 +00:00
ashudia4 471f6ba976 ADD file via upload 2024-05-29 00:40:05 +08:00
ashudia4 d3ce661208 refactor: .devops/test.yml 2024-05-28 16:22:59 +00:00
ashudia4 4562fa5a6f refactor: .devops/刘德华.yml 2024-05-28 16:22:08 +00:00
ashudia4 b6d146dc44 refactor: .devops/刘德华.yml 2024-05-28 16:19:26 +00:00
ashudia4 f05bdeb776 refactor: .devops/刘德华.yml 2024-05-28 16:15:37 +00:00
ashudia4 5acab2c8ff refactor: .devops/test.yml 2024-05-28 16:15:07 +00:00
ashudia4 874c3f3c48 refactor: .devops/刘德华.yml 2024-05-28 16:06:54 +00:00
ashudia4 6baee56cf6 refactor: .devops/刘德华.yml 2024-05-28 14:37:38 +00:00
ashudia4 a47778e525 feat: .devops/刘德华.yml 2024-05-28 13:59:49 +00:00
ashudia4 3b86837d33 refactor: delete .devops/未命名项目.yml 2024-05-28 13:59:48 +00:00
ashudia4 e853bdb758 refactor: .devops/未命名项目.yml 2024-05-28 13:59:09 +00:00
ashudia4 614770ae9b feat: .devops/未命名项目.yml 2024-05-28 13:58:37 +00:00
E4wel83hu 3a49e66c3e 更新用户流程图 2024-05-28 16:17:45 +08:00
E4wel83hu 54e74dcf70 Delete static/img/di_san_fang/重晴鸟代码溯源/用户操作流程.png 2024-05-28 16:08:21 +08:00
E4wel83hu d5a7e6ec20 Update 重睛鸟代码溯源.md 2024-05-28 16:07:40 +08:00
8 changed files with 217 additions and 7 deletions

View File

@ -8,9 +8,9 @@ trigger:
event:
- ref: pr
ruleset:
- param-ref: source_branch
- param-ref: target_branch
operator: EQ
value: '""'
value: '"master"'
ruleset-operator: AND
workflow:
- ref: start
@ -35,12 +35,14 @@ workflow:
name: docker镜像构建
task: docker_image_build@1.6.0
input:
image_name: '""'
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_address: '"registry.cn-guangzhou.aliyuncs.com"'
docker_file: '"Dockerfile"'
docker_build_path: '"."'
workspace: '"."'
workspace: git_clone_0.git_path
image_push: true
build_args: '""'
needs:
@ -49,10 +51,14 @@ workflow:
name: ssh执行命令
task: ssh_cmd@1.1.1
input:
ssh_ip: '""'
ssh_pass: ((ssh_key.ssh_pass))
ssh_ip: '"116.62.120.115"'
ssh_port: '"22"'
ssh_user: '"root"'
ssh_cmd: '""'
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

30
.devops/刘德华.yml Normal file
View File

@ -0,0 +1,30 @@
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

View File

@ -21,6 +21,8 @@ workflow:
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: '""'
@ -35,6 +37,7 @@ workflow:
name: ssh执行命令
task: ssh_cmd@1.1.1
input:
ssh_pass: ((ssh_key.ssh_private_key))
ssh_ip: '""'
ssh_port: '"22"'
ssh_user: '"root"'
@ -45,6 +48,8 @@ workflow:
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: '""'

View File

@ -0,0 +1,58 @@
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 Normal file
View File

@ -0,0 +1,10 @@
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"]

View File

@ -58,6 +58,13 @@ module.exports = {
position: 'left',
label: '帮助中心'
},
{
type: 'doc',
docId: 'intro',
position: 'right',
label: '意见反馈',
href:"/ratingpage"
},
// {
// href: 'https://github.com/boxyhq',
// position: 'right',

93
src/pages/ratingpage.js Normal file
View File

@ -0,0 +1,93 @@
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>
);
}

1
test.md Normal file
View File

@ -0,0 +1 @@
### 测试文件###