Merge branch 'feature_notification' of https://git.trustie.net/tongChong/forgeplus-react into feature_notification_xiesi
This commit is contained in:
commit
3a816ce5e5
|
@ -27,6 +27,11 @@ function NoticeContent({ visible, showNotification, resetUserInfo, current_user:
|
|||
resetUserInfo();
|
||||
}, [noticeUnreadCount,atUnreadCount]);
|
||||
|
||||
useEffect(()=>{
|
||||
setNoticePage(0);
|
||||
setAtPage(0);
|
||||
},[visible])
|
||||
|
||||
useEffect(() => {
|
||||
const params = {
|
||||
type: noticeType,
|
||||
|
|
|
@ -255,7 +255,11 @@ class Detail extends Component {
|
|||
open_devops: flag
|
||||
})
|
||||
}
|
||||
canvasChannel = () => {
|
||||
/**
|
||||
*
|
||||
* @param {*} deleteFlag :同步镜像需要提示成功,且未成功的情况下不需要删除项目
|
||||
*/
|
||||
canvasChannel = (deleteFlag) => {
|
||||
const name = window.location.hostname === "localhost" ? "testforgeplus.trustie.net" : window.location.hostname;
|
||||
const actioncable = require("actioncable");
|
||||
var project = this.state.project;
|
||||
|
@ -272,10 +276,15 @@ class Detail extends Component {
|
|||
console.log(`###### ---received data--- ######`);
|
||||
console.log(data);
|
||||
if (data) {
|
||||
if ( data.project && data.project.mirror_status === 2) {
|
||||
this.deleteProjectBack();
|
||||
if(deleteFlag){
|
||||
this.props.showNotification("镜像同步成功!");
|
||||
window.location.reload();
|
||||
}else{
|
||||
if (data.project && data.project.mirror_status === 2) {
|
||||
this.deleteProjectBack();
|
||||
}
|
||||
this.getDetail();
|
||||
}
|
||||
this.getDetail();
|
||||
this.setState({
|
||||
firstSync: false,
|
||||
secondSync: false
|
||||
|
@ -428,8 +437,10 @@ class Detail extends Component {
|
|||
const url = `/${owner}/${projectsId}/sync_mirror.json`;
|
||||
axios.post(url).then(result => {
|
||||
if (result && result.data && result.data.status === 0) {
|
||||
this.props.showNotification("镜像同步成功!");
|
||||
this.getProject(2);
|
||||
this.setState({
|
||||
secondSync:true
|
||||
})
|
||||
this.canvasChannel(true);
|
||||
} else {
|
||||
this.props.showNotification("镜像同步失败!");
|
||||
}
|
||||
|
|
|
@ -301,7 +301,7 @@ class MergeForm extends Component {
|
|||
initialValue: assigned_to_id,
|
||||
})(
|
||||
<Select placeholder="未选择审查人员" showSearch>
|
||||
{/* <Option key={0} value={""}>未选择审查人员</Option> */}
|
||||
<Option key={0} value={""}>未选择审查人员</Option>
|
||||
{this.renderSelect(members)}
|
||||
</Select>
|
||||
)}
|
||||
|
@ -316,7 +316,7 @@ class MergeForm extends Component {
|
|||
}
|
||||
showSearch
|
||||
>
|
||||
{/* <Option key={0} value={""}>{issue_versions && issue_versions.length > 0? "未选择里程碑": "请添加里程碑"}</Option> */}
|
||||
<Option key={0} value={""}>{issue_versions && issue_versions.length > 0? "未选择里程碑": "请添加里程碑"}</Option>
|
||||
{this.renderSelect(issue_versions)}
|
||||
</Select>
|
||||
)}
|
||||
|
@ -331,7 +331,7 @@ class MergeForm extends Component {
|
|||
}
|
||||
showSearch
|
||||
>
|
||||
{/* <Option key={0} value={""}>{issue_tags && issue_tags.length > 0 ? "未选择标记" : "请在仓库设置里添加标记"}</Option> */}
|
||||
<Option key={0} value={""}>{issue_tags && issue_tags.length > 0 ? "未选择标记" : "请在仓库设置里添加标记"}</Option>
|
||||
{this.renderSelect(issue_tags)}
|
||||
</Select>
|
||||
)}
|
||||
|
|
|
@ -262,7 +262,7 @@ class Setting extends Component {
|
|||
message: "请输入项目名称",
|
||||
},
|
||||
],
|
||||
})(<Input placeholder="请输入项目名称" maxLength={"50"}/>)}
|
||||
})(<Input placeholder="请输入项目名称" />)}
|
||||
</Form.Item>
|
||||
<div className="df" style={{ alignItems: "center" }}>
|
||||
<span className="mr20 mb15 font-16">可见性</span>
|
||||
|
@ -298,7 +298,8 @@ class Setting extends Component {
|
|||
rules: [],
|
||||
})(
|
||||
<Select>
|
||||
{CategoryList}
|
||||
<Option key={0} value={""}>未选择项目类别</Option>
|
||||
{CategoryList}
|
||||
</Select>
|
||||
)}
|
||||
</Form.Item>
|
||||
|
@ -306,10 +307,11 @@ class Setting extends Component {
|
|||
{getFieldDecorator("project_language_id", {
|
||||
rules: [],
|
||||
})(
|
||||
<Select>
|
||||
{LanguageList}
|
||||
</Select>
|
||||
)}
|
||||
<Select>
|
||||
<Option key={0} value={""}>未选择项目语言</Option>
|
||||
{LanguageList}
|
||||
</Select>
|
||||
)}
|
||||
</Form.Item>
|
||||
<Form.Item label="项目导航">
|
||||
{getFieldDecorator("project_units", {
|
||||
|
|
|
@ -198,7 +198,7 @@ class comments extends Component {
|
|||
</span>
|
||||
<span>
|
||||
{item.value && item.value.length > 0 ? (
|
||||
(item.detail === "标签" || item.detail === "标记") ? (
|
||||
item.detail === "标记"? (
|
||||
<span
|
||||
className="issue-tag-show"
|
||||
style={{ background: item.value[0].color }}
|
||||
|
|
Loading…
Reference in New Issue