Merge branch 'develop'

This commit is contained in:
caishi 2021-07-30 17:03:19 +08:00
commit 9408ad7dcb
22 changed files with 1740 additions and 7 deletions

200
package-lock.json generated
View File

@ -2377,6 +2377,12 @@
} }
} }
}, },
"base16": {
"version": "1.0.0",
"resolved": "https://registry.npm.taobao.org/base16/download/base16-1.0.0.tgz",
"integrity": "sha1-4pf2DX7BAUp6lxo568ipjAtoHnA=",
"dev": true
},
"base64-js": { "base64-js": {
"version": "1.3.1", "version": "1.3.1",
"resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.3.1.tgz", "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.3.1.tgz",
@ -3869,6 +3875,23 @@
"warning": "^4.0.3" "warning": "^4.0.3"
} }
}, },
"cross-fetch": {
"version": "3.1.4",
"resolved": "https://registry.nlark.com/cross-fetch/download/cross-fetch-3.1.4.tgz",
"integrity": "sha1-lyPzo6JHv4uJA586OAqSROj6Lzk=",
"dev": true,
"requires": {
"node-fetch": "2.6.1"
},
"dependencies": {
"node-fetch": {
"version": "2.6.1",
"resolved": "https://registry.nlark.com/node-fetch/download/node-fetch-2.6.1.tgz?cache=0&sync_timestamp=1626684741221&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fnode-fetch%2Fdownload%2Fnode-fetch-2.6.1.tgz",
"integrity": "sha1-BFvTI2Mfdu0uK1VXM5RBa2OaAFI=",
"dev": true
}
}
},
"cross-spawn": { "cross-spawn": {
"version": "5.1.0", "version": "5.1.0",
"resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-5.1.0.tgz", "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-5.1.0.tgz",
@ -6214,6 +6237,41 @@
"bser": "2.1.1" "bser": "2.1.1"
} }
}, },
"fbemitter": {
"version": "3.0.0",
"resolved": "https://registry.npm.taobao.org/fbemitter/download/fbemitter-3.0.0.tgz",
"integrity": "sha1-ALKhr1QRJUqrQWzXX55iib7kv/M=",
"dev": true,
"requires": {
"fbjs": "^3.0.0"
},
"dependencies": {
"fbjs": {
"version": "3.0.0",
"resolved": "https://registry.npm.taobao.org/fbjs/download/fbjs-3.0.0.tgz?cache=0&sync_timestamp=1602048313843&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Ffbjs%2Fdownload%2Ffbjs-3.0.0.tgz",
"integrity": "sha1-CQcGf7P1enj0XZXx6s/8rNYjwWU=",
"dev": true,
"requires": {
"cross-fetch": "^3.0.4",
"fbjs-css-vars": "^1.0.0",
"loose-envify": "^1.0.0",
"object-assign": "^4.1.0",
"promise": "^7.1.1",
"setimmediate": "^1.0.5",
"ua-parser-js": "^0.7.18"
}
},
"promise": {
"version": "7.3.1",
"resolved": "https://registry.npm.taobao.org/promise/download/promise-7.3.1.tgz",
"integrity": "sha1-BktyYCsY+Q8pGSuLG8QY/9Hr078=",
"dev": true,
"requires": {
"asap": "~2.0.3"
}
}
}
},
"fbjs": { "fbjs": {
"version": "0.8.17", "version": "0.8.17",
"resolved": "https://registry.npmjs.org/fbjs/-/fbjs-0.8.17.tgz", "resolved": "https://registry.npmjs.org/fbjs/-/fbjs-0.8.17.tgz",
@ -6243,6 +6301,12 @@
} }
} }
}, },
"fbjs-css-vars": {
"version": "1.0.2",
"resolved": "https://registry.npm.taobao.org/fbjs-css-vars/download/fbjs-css-vars-1.0.2.tgz",
"integrity": "sha1-IWVRE2rgL+JVkyw+yHdfGOLAeLg=",
"dev": true
},
"fecha": { "fecha": {
"version": "2.3.3", "version": "2.3.3",
"resolved": "https://registry.npmjs.org/fecha/-/fecha-2.3.3.tgz", "resolved": "https://registry.npmjs.org/fecha/-/fecha-2.3.3.tgz",
@ -6687,6 +6751,42 @@
"readable-stream": "^2.3.6" "readable-stream": "^2.3.6"
} }
}, },
"flux": {
"version": "4.0.1",
"resolved": "https://registry.npm.taobao.org/flux/download/flux-4.0.1.tgz",
"integrity": "sha1-eENQKwKEHUqqU0rws3MDSh917lw=",
"dev": true,
"requires": {
"fbemitter": "^3.0.0",
"fbjs": "^3.0.0"
},
"dependencies": {
"fbjs": {
"version": "3.0.0",
"resolved": "https://registry.npm.taobao.org/fbjs/download/fbjs-3.0.0.tgz?cache=0&sync_timestamp=1602048313843&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Ffbjs%2Fdownload%2Ffbjs-3.0.0.tgz",
"integrity": "sha1-CQcGf7P1enj0XZXx6s/8rNYjwWU=",
"dev": true,
"requires": {
"cross-fetch": "^3.0.4",
"fbjs-css-vars": "^1.0.0",
"loose-envify": "^1.0.0",
"object-assign": "^4.1.0",
"promise": "^7.1.1",
"setimmediate": "^1.0.5",
"ua-parser-js": "^0.7.18"
}
},
"promise": {
"version": "7.3.1",
"resolved": "https://registry.npm.taobao.org/promise/download/promise-7.3.1.tgz",
"integrity": "sha1-BktyYCsY+Q8pGSuLG8QY/9Hr078=",
"dev": true,
"requires": {
"asap": "~2.0.3"
}
}
}
},
"flv.js": { "flv.js": {
"version": "1.5.0", "version": "1.5.0",
"resolved": "https://registry.npmjs.org/flv.js/-/flv.js-1.5.0.tgz", "resolved": "https://registry.npmjs.org/flv.js/-/flv.js-1.5.0.tgz",
@ -10330,6 +10430,12 @@
"resolved": "https://registry.npmjs.org/lodash.cond/-/lodash.cond-4.5.2.tgz", "resolved": "https://registry.npmjs.org/lodash.cond/-/lodash.cond-4.5.2.tgz",
"integrity": "sha1-9HGh2khr5g9quVXRcRVSPdHSVdU=" "integrity": "sha1-9HGh2khr5g9quVXRcRVSPdHSVdU="
}, },
"lodash.curry": {
"version": "4.1.1",
"resolved": "https://registry.npm.taobao.org/lodash.curry/download/lodash.curry-4.1.1.tgz",
"integrity": "sha1-JI42By7ekGUB11lmIAqG2riyMXA=",
"dev": true
},
"lodash.debounce": { "lodash.debounce": {
"version": "4.0.8", "version": "4.0.8",
"resolved": "https://registry.npmjs.org/lodash.debounce/-/lodash.debounce-4.0.8.tgz", "resolved": "https://registry.npmjs.org/lodash.debounce/-/lodash.debounce-4.0.8.tgz",
@ -10340,6 +10446,12 @@
"resolved": "https://registry.npmjs.org/lodash.defaults/-/lodash.defaults-4.2.0.tgz", "resolved": "https://registry.npmjs.org/lodash.defaults/-/lodash.defaults-4.2.0.tgz",
"integrity": "sha1-0JF4cW/+pN3p5ft7N/bwgCJ0WAw=" "integrity": "sha1-0JF4cW/+pN3p5ft7N/bwgCJ0WAw="
}, },
"lodash.flow": {
"version": "3.5.0",
"resolved": "https://registry.npm.taobao.org/lodash.flow/download/lodash.flow-3.5.0.tgz",
"integrity": "sha1-h79AKSuM+D5OjOGjrkIJ4gBxZ1o=",
"dev": true
},
"lodash.isequal": { "lodash.isequal": {
"version": "4.5.0", "version": "4.5.0",
"resolved": "https://registry.npmjs.org/lodash.isequal/-/lodash.isequal-4.5.0.tgz", "resolved": "https://registry.npmjs.org/lodash.isequal/-/lodash.isequal-4.5.0.tgz",
@ -13970,6 +14082,12 @@
"resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz",
"integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==" "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A=="
}, },
"pure-color": {
"version": "1.3.0",
"resolved": "https://registry.npm.taobao.org/pure-color/download/pure-color-1.3.0.tgz",
"integrity": "sha1-H+Bk+wrIUfDeYTIKi/eWg2Qi8z4=",
"dev": true
},
"purgecss": { "purgecss": {
"version": "2.1.2", "version": "2.1.2",
"resolved": "https://registry.npmjs.org/purgecss/-/purgecss-2.1.2.tgz", "resolved": "https://registry.npmjs.org/purgecss/-/purgecss-2.1.2.tgz",
@ -14741,6 +14859,18 @@
"prop-types": "^15.6.2" "prop-types": "^15.6.2"
} }
}, },
"react-base16-styling": {
"version": "0.6.0",
"resolved": "https://registry.npm.taobao.org/react-base16-styling/download/react-base16-styling-0.6.0.tgz",
"integrity": "sha1-7yFW1mz0E5aVyKFniGy2nqZgeSw=",
"dev": true,
"requires": {
"base16": "^1.0.0",
"lodash.curry": "^4.0.1",
"lodash.flow": "^3.3.0",
"pure-color": "^1.2.0"
}
},
"react-beautiful-dnd": { "react-beautiful-dnd": {
"version": "10.1.1", "version": "10.1.1",
"resolved": "https://registry.npmjs.org/react-beautiful-dnd/-/react-beautiful-dnd-10.1.1.tgz", "resolved": "https://registry.npmjs.org/react-beautiful-dnd/-/react-beautiful-dnd-10.1.1.tgz",
@ -15106,6 +15236,18 @@
"resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz", "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz",
"integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==" "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ=="
}, },
"react-json-view": {
"version": "1.21.3",
"resolved": "https://registry.npm.taobao.org/react-json-view/download/react-json-view-1.21.3.tgz",
"integrity": "sha1-8YQgnujxvzdPsMQbCBPP9UVJxHU=",
"dev": true,
"requires": {
"flux": "^4.0.1",
"react-base16-styling": "^0.6.0",
"react-lifecycles-compat": "^3.0.4",
"react-textarea-autosize": "^8.3.2"
}
},
"react-jss": { "react-jss": {
"version": "8.6.1", "version": "8.6.1",
"resolved": "https://registry.npmjs.org/react-jss/-/react-jss-8.6.1.tgz", "resolved": "https://registry.npmjs.org/react-jss/-/react-jss-8.6.1.tgz",
@ -15294,6 +15436,34 @@
"prop-types": "^15.5.4" "prop-types": "^15.5.4"
} }
}, },
"react-textarea-autosize": {
"version": "8.3.3",
"resolved": "https://registry.nlark.com/react-textarea-autosize/download/react-textarea-autosize-8.3.3.tgz?cache=0&sync_timestamp=1622628433420&other_urls=https%3A%2F%2Fregistry.nlark.com%2Freact-textarea-autosize%2Fdownload%2Freact-textarea-autosize-8.3.3.tgz",
"integrity": "sha1-9wkTlFNp2kU/1VTBaPa6rNH6BNg=",
"dev": true,
"requires": {
"@babel/runtime": "^7.10.2",
"use-composed-ref": "^1.0.0",
"use-latest": "^1.0.0"
},
"dependencies": {
"@babel/runtime": {
"version": "7.14.8",
"resolved": "https://registry.nlark.com/@babel/runtime/download/@babel/runtime-7.14.8.tgz",
"integrity": "sha1-cRmlb0IQGIUmlCkLn5FICXORtEY=",
"dev": true,
"requires": {
"regenerator-runtime": "^0.13.4"
}
},
"regenerator-runtime": {
"version": "0.13.9",
"resolved": "https://registry.nlark.com/regenerator-runtime/download/regenerator-runtime-0.13.9.tgz?cache=0&sync_timestamp=1626993001371&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fregenerator-runtime%2Fdownload%2Fregenerator-runtime-0.13.9.tgz",
"integrity": "sha1-iSV0Kpj/2QgUmI11Zq0wyjsmO1I=",
"dev": true
}
}
},
"react-transition-group": { "react-transition-group": {
"version": "2.9.0", "version": "2.9.0",
"resolved": "https://registry.npmjs.org/react-transition-group/-/react-transition-group-2.9.0.tgz", "resolved": "https://registry.npmjs.org/react-transition-group/-/react-transition-group-2.9.0.tgz",
@ -18389,6 +18559,12 @@
"integrity": "sha512-c3zayb8/kWWpycWYg87P71E1S1ZL6b6IJxfb5fvsUgsf0S2MVGaDhDXXjDMpdCpfWXqptc+4mXwmiy1ypXqRAA==", "integrity": "sha512-c3zayb8/kWWpycWYg87P71E1S1ZL6b6IJxfb5fvsUgsf0S2MVGaDhDXXjDMpdCpfWXqptc+4mXwmiy1ypXqRAA==",
"dev": true "dev": true
}, },
"ts-essentials": {
"version": "2.0.12",
"resolved": "https://registry.nlark.com/ts-essentials/download/ts-essentials-2.0.12.tgz",
"integrity": "sha1-yTA/PXT3X6dSjD1JuA4ImrCdh0U=",
"dev": true
},
"tslib": { "tslib": {
"version": "1.11.1", "version": "1.11.1",
"resolved": "https://registry.npmjs.org/tslib/-/tslib-1.11.1.tgz", "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.11.1.tgz",
@ -18898,6 +19074,30 @@
"resolved": "https://registry.npmjs.org/use/-/use-3.1.1.tgz", "resolved": "https://registry.npmjs.org/use/-/use-3.1.1.tgz",
"integrity": "sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ==" "integrity": "sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ=="
}, },
"use-composed-ref": {
"version": "1.1.0",
"resolved": "https://registry.npm.taobao.org/use-composed-ref/download/use-composed-ref-1.1.0.tgz",
"integrity": "sha1-kiDk6UqXt7AtfSfq6rCzcDRDi7w=",
"dev": true,
"requires": {
"ts-essentials": "^2.0.3"
}
},
"use-isomorphic-layout-effect": {
"version": "1.1.1",
"resolved": "https://registry.npm.taobao.org/use-isomorphic-layout-effect/download/use-isomorphic-layout-effect-1.1.1.tgz",
"integrity": "sha1-e7ZYkXDNKYehUgQvkIT57/t1wiU=",
"dev": true
},
"use-latest": {
"version": "1.2.0",
"resolved": "https://registry.npm.taobao.org/use-latest/download/use-latest-1.2.0.tgz",
"integrity": "sha1-pE9lcrgojgly7EEb3QhAraNm8jI=",
"dev": true,
"requires": {
"use-isomorphic-layout-effect": "^1.0.0"
}
},
"user-home": { "user-home": {
"version": "1.1.1", "version": "1.1.1",
"resolved": "https://registry.npm.taobao.org/user-home/download/user-home-1.1.1.tgz", "resolved": "https://registry.npm.taobao.org/user-home/download/user-home-1.1.1.tgz",

View File

@ -204,6 +204,7 @@
"node-sass": "^4.12.0", "node-sass": "^4.12.0",
"optimize-css-assets-webpack-plugin": "^5.0.3", "optimize-css-assets-webpack-plugin": "^5.0.3",
"purgecss": "^2.1.2", "purgecss": "^2.1.2",
"react-json-view": "^1.21.3",
"reqwest": "^2.0.5", "reqwest": "^2.0.5",
"resize-observer-polyfill": "^1.5.1", "resize-observer-polyfill": "^1.5.1",
"terser-webpack-plugin": "^2.3.5", "terser-webpack-plugin": "^2.3.5",

View File

@ -2424,10 +2424,16 @@ input::-ms-clear {
.color-grey-c { .color-grey-c {
color: #ccc !important; color: #ccc !important;
} }
a.hoverLine:hover{
text-decoration: underline;
}
.color-grey-cd { .color-grey-cd {
color: #cdcdcd !important; color: #cdcdcd !important;
} }
.color-grey-d {
color: #ddd;
}
.color-grey-9 { .color-grey-9 {
color: #999999 !important; color: #999999 !important;

View File

@ -1,8 +1,8 @@
@font-face { @font-face {
font-family: "iconfont"; /* Project id 2340181 */ font-family: "iconfont"; /* Project id 2340181 */
src: url('iconfont.woff2?t=1626838578464') format('woff2'), src: url('iconfont.woff2?t=1627378753360') format('woff2'),
url('iconfont.woff?t=1626838578464') format('woff'), url('iconfont.woff?t=1627378753360') format('woff'),
url('iconfont.ttf?t=1626838578464') format('truetype'); url('iconfont.ttf?t=1627378753360') format('truetype');
} }
.iconfont { .iconfont {
@ -13,6 +13,182 @@
-moz-osx-font-smoothing: grayscale; -moz-osx-font-smoothing: grayscale;
} }
.icon-duoxuanxuanzhong:before {
content: "\e88f";
}
.icon-cuowuicon:before {
content: "\e890";
}
.icon-daochu_xuanfu1:before {
content: "\e891";
}
.icon-chenggongicon:before {
content: "\e892";
}
.icon-weixuanzhongxiangyingicon:before {
content: "\e893";
}
.icon-bitianicon:before {
content: "\e895";
}
.icon-weixuanzhongxiangmubiaoqianicon:before {
content: "\e897";
}
.icon-liebiaoicon:before {
content: "\e898";
}
.icon-xialaanniu_icon:before {
content: "\e89a";
}
.icon-weixuanzhongqingqiuicon:before {
content: "\e89b";
}
.icon-xuanzhong3:before {
content: "\e89e";
}
.icon-xuanzechenggongicon:before {
content: "\e89f";
}
.icon-xiezuozheguanliicon:before {
content: "\e8a1";
}
.icon-xuanzhongxiangyingicon:before {
content: "\e8a2";
}
.icon-xuanzhongfenzhiicon:before {
content: "\e8a3";
}
.icon-bg:before {
content: "\e8a4";
}
.icon-xuanzhongjibenshezhiicon:before {
content: "\e8a5";
}
.icon-xuanzhongxiangmubiaoqianicon:before {
content: "\e8aa";
}
.icon-a-xuanzhongwebhookicon:before {
content: "\e8af";
}
.icon-xinzengmulu_xuantingicon:before {
content: "\e884";
}
.icon-xinzengyemian_morenicon:before {
content: "\e885";
}
.icon-zhankai_morenicon:before {
content: "\e889";
}
.icon-shanchu_tc_icon:before {
content: "\e88c";
}
.icon-wiki_icon:before {
content: "\e88d";
}
.icon-xinzengyemian_shubiaodianjiicon:before {
content: "\e88e";
}
.icon-daorumoban_icon:before {
content: "\e86f";
}
.icon-daochu_xuanfu:before {
content: "\e870";
}
.icon-fuceng:before {
content: "\e871";
}
.icon-cuowu:before {
content: "\e872";
}
.icon-chenggong1:before {
content: "\e873";
}
.icon-gengduo_icon:before {
content: "\e874";
}
.icon-fucengguanbi_icon:before {
content: "\e875";
}
.icon-fuzhi_icon:before {
content: "\e876";
}
.icon-shanchuicon:before {
content: "\e877";
}
.icon-a-lajitong_icon3x:before {
content: "\e878";
}
.icon-shouqi_morenicon:before {
content: "\e879";
}
.icon-huanying_icon:before {
content: "\e87a";
}
.icon-sousuo_shanchuicon:before {
content: "\e87b";
}
.icon-sousuo_icon:before {
content: "\e87d";
}
.icon-wendangyulan_icon:before {
content: "\e87e";
}
.icon-wenjianjia_icon:before {
content: "\e87f";
}
.icon-xialaanniu:before {
content: "\e880";
}
.icon-xinzengmulu_morenicon:before {
content: "\e882";
}
.icon-xinzengmulu_shubiaodianjiicon:before {
content: "\e883";
}
.icon-erciqueren_icon:before { .icon-erciqueren_icon:before {
content: "\e867"; content: "\e867";
} }

File diff suppressed because one or more lines are too long

View File

@ -5,6 +5,314 @@
"css_prefix_text": "icon-", "css_prefix_text": "icon-",
"description": "", "description": "",
"glyphs": [ "glyphs": [
{
"icon_id": "23144143",
"name": "多选选中",
"font_class": "duoxuanxuanzhong",
"unicode": "e88f",
"unicode_decimal": 59535
},
{
"icon_id": "23144144",
"name": "错误icon",
"font_class": "cuowuicon",
"unicode": "e890",
"unicode_decimal": 59536
},
{
"icon_id": "23144145",
"name": "导出_悬浮",
"font_class": "daochu_xuanfu1",
"unicode": "e891",
"unicode_decimal": 59537
},
{
"icon_id": "23144146",
"name": "成功icon",
"font_class": "chenggongicon",
"unicode": "e892",
"unicode_decimal": 59538
},
{
"icon_id": "23144147",
"name": "未选中响应icon",
"font_class": "weixuanzhongxiangyingicon",
"unicode": "e893",
"unicode_decimal": 59539
},
{
"icon_id": "23144149",
"name": "必填icon",
"font_class": "bitianicon",
"unicode": "e895",
"unicode_decimal": 59541
},
{
"icon_id": "23144151",
"name": "未选中项目标签icon",
"font_class": "weixuanzhongxiangmubiaoqianicon",
"unicode": "e897",
"unicode_decimal": 59543
},
{
"icon_id": "23144152",
"name": "列表icon",
"font_class": "liebiaoicon",
"unicode": "e898",
"unicode_decimal": 59544
},
{
"icon_id": "23144154",
"name": "下拉按钮_icon",
"font_class": "xialaanniu_icon",
"unicode": "e89a",
"unicode_decimal": 59546
},
{
"icon_id": "23144155",
"name": "未选中请求icon",
"font_class": "weixuanzhongqingqiuicon",
"unicode": "e89b",
"unicode_decimal": 59547
},
{
"icon_id": "23144156",
"name": "选中",
"font_class": "xuanzhong3",
"unicode": "e89e",
"unicode_decimal": 59550
},
{
"icon_id": "23144157",
"name": "选择成功icon",
"font_class": "xuanzechenggongicon",
"unicode": "e89f",
"unicode_decimal": 59551
},
{
"icon_id": "23144158",
"name": "协作者管理icon",
"font_class": "xiezuozheguanliicon",
"unicode": "e8a1",
"unicode_decimal": 59553
},
{
"icon_id": "23144159",
"name": "选中响应icon",
"font_class": "xuanzhongxiangyingicon",
"unicode": "e8a2",
"unicode_decimal": 59554
},
{
"icon_id": "23144160",
"name": "选中分支icon",
"font_class": "xuanzhongfenzhiicon",
"unicode": "e8a3",
"unicode_decimal": 59555
},
{
"icon_id": "23144161",
"name": "bg",
"font_class": "bg",
"unicode": "e8a4",
"unicode_decimal": 59556
},
{
"icon_id": "23144162",
"name": "选中基本设置icon",
"font_class": "xuanzhongjibenshezhiicon",
"unicode": "e8a5",
"unicode_decimal": 59557
},
{
"icon_id": "23144165",
"name": "选中项目标签icon",
"font_class": "xuanzhongxiangmubiaoqianicon",
"unicode": "e8aa",
"unicode_decimal": 59562
},
{
"icon_id": "23144167",
"name": "选中webhook icon",
"font_class": "a-xuanzhongwebhookicon",
"unicode": "e8af",
"unicode_decimal": 59567
},
{
"icon_id": "23046282",
"name": "新增目录_悬停icon",
"font_class": "xinzengmulu_xuantingicon",
"unicode": "e884",
"unicode_decimal": 59524
},
{
"icon_id": "23046283",
"name": "新增页面_默认icon",
"font_class": "xinzengyemian_morenicon",
"unicode": "e885",
"unicode_decimal": 59525
},
{
"icon_id": "23046287",
"name": "展开_默认icon",
"font_class": "zhankai_morenicon",
"unicode": "e889",
"unicode_decimal": 59529
},
{
"icon_id": "23046290",
"name": "shanchu_tc_icon",
"font_class": "shanchu_tc_icon",
"unicode": "e88c",
"unicode_decimal": 59532
},
{
"icon_id": "23046293",
"name": "wiki_icon",
"font_class": "wiki_icon",
"unicode": "e88d",
"unicode_decimal": 59533
},
{
"icon_id": "23046311",
"name": "新增页面_鼠标点击icon",
"font_class": "xinzengyemian_shubiaodianjiicon",
"unicode": "e88e",
"unicode_decimal": 59534
},
{
"icon_id": "23046244",
"name": "导入模版_icon",
"font_class": "daorumoban_icon",
"unicode": "e86f",
"unicode_decimal": 59503
},
{
"icon_id": "23046247",
"name": "导出_悬浮",
"font_class": "daochu_xuanfu",
"unicode": "e870",
"unicode_decimal": 59504
},
{
"icon_id": "23046249",
"name": "复层",
"font_class": "fuceng",
"unicode": "e871",
"unicode_decimal": 59505
},
{
"icon_id": "23046252",
"name": "错误",
"font_class": "cuowu",
"unicode": "e872",
"unicode_decimal": 59506
},
{
"icon_id": "23046254",
"name": "成功",
"font_class": "chenggong1",
"unicode": "e873",
"unicode_decimal": 59507
},
{
"icon_id": "23046255",
"name": "更多_icon",
"font_class": "gengduo_icon",
"unicode": "e874",
"unicode_decimal": 59508
},
{
"icon_id": "23046258",
"name": "复层关闭_icon",
"font_class": "fucengguanbi_icon",
"unicode": "e875",
"unicode_decimal": 59509
},
{
"icon_id": "23046262",
"name": "复制_icon",
"font_class": "fuzhi_icon",
"unicode": "e876",
"unicode_decimal": 59510
},
{
"icon_id": "23046268",
"name": "删除icon",
"font_class": "shanchuicon",
"unicode": "e877",
"unicode_decimal": 59511
},
{
"icon_id": "23046269",
"name": "垃圾桶_icon@3x",
"font_class": "a-lajitong_icon3x",
"unicode": "e878",
"unicode_decimal": 59512
},
{
"icon_id": "23046270",
"name": "收起_默认icon",
"font_class": "shouqi_morenicon",
"unicode": "e879",
"unicode_decimal": 59513
},
{
"icon_id": "23046271",
"name": "欢迎_icon",
"font_class": "huanying_icon",
"unicode": "e87a",
"unicode_decimal": 59514
},
{
"icon_id": "23046273",
"name": "搜索_删除icon",
"font_class": "sousuo_shanchuicon",
"unicode": "e87b",
"unicode_decimal": 59515
},
{
"icon_id": "23046275",
"name": "搜索_icon",
"font_class": "sousuo_icon",
"unicode": "e87d",
"unicode_decimal": 59517
},
{
"icon_id": "23046276",
"name": "文档预览_icon",
"font_class": "wendangyulan_icon",
"unicode": "e87e",
"unicode_decimal": 59518
},
{
"icon_id": "23046277",
"name": "文件夹_icon",
"font_class": "wenjianjia_icon",
"unicode": "e87f",
"unicode_decimal": 59519
},
{
"icon_id": "23046278",
"name": "下拉按钮",
"font_class": "xialaanniu",
"unicode": "e880",
"unicode_decimal": 59520
},
{
"icon_id": "23046280",
"name": "新增目录_默认icon",
"font_class": "xinzengmulu_morenicon",
"unicode": "e882",
"unicode_decimal": 59522
},
{
"icon_id": "23046281",
"name": "新增目录_鼠标点击icon",
"font_class": "xinzengmulu_shubiaodianjiicon",
"unicode": "e883",
"unicode_decimal": 59523
},
{ {
"icon_id": "22906287", "icon_id": "22906287",
"name": "二次确认_icon", "name": "二次确认_icon",

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,35 @@
import React from 'react';
import { AlignCenter } from '../layout';
import { Modal , Button } from 'antd';
import './Index.scss';
function DeleteBox({
visible ,
onCancel ,
onSuccess ,
title ,
subTitle,
content
}) {
return(
<Modal
visible={visible}
onCancel={onCancel}
title={title}
width="600px"
className="deleteBox"
footer={
<div>
<Button size={'large'} onClick={onCancel}>取消</Button>
<Button type={"danger"} size={"large"} onClick={onSuccess}>确认删除</Button>
</div>
}
>
<div className="desc">
<AlignCenter className="descMain"><i className="iconfont icon-shanchu_tc_icon mr10"></i>{content}</AlignCenter>
<p>{subTitle}</p>
</div>
</Modal>
)
}
export default DeleteBox;

View File

@ -0,0 +1,45 @@
.deleteBox{
.ant-modal-header{
background-color: #f8f8f8;
border-bottom: none;
.ant-modal-title{
text-align: left;
font-size: 20px;
}
}
.ant-modal-body{
padding:30px 50px;
p{
font-size: 16px;
line-height: 26px;
color:#666;
word-break: break-all;
}
.desc{
.descMain{
align-items: center;
justify-content: center;
font-size: 20px;
margin-bottom: 10px;
i{
font-size: 38px!important;
color:#DF0002
}
}
}
}
.ant-modal-footer{
border-top: none;
text-align: center;
padding-bottom: 40px;
button{
width: 120px;
margin:0px 20px;
&.ant-btn-danger{
background-color: #fff;
color: #DF0002;
border-color: #D0D0D0;
}
}
}
}

View File

@ -0,0 +1,62 @@
import React, {useEffect, useRef, useState} from 'react';
import * as monaco from 'monaco-editor/esm/vs/editor/editor.api.js';
import './Component.scss';
function Monaco(props) {
const {
style = { // dom
height: '400px',
},
value = '', //
onChange = () => { //
},
fontSize = 14, //
monacoOptions = {
scrollBeyondLastLine: false,
lineNumbers: "off",
wordWrap: true,
overviewRulerBorder: true,
lineHeight: 24,
readOnly:true
}, // monaco
language = 'html', // js ts sql css json html
} = props;
const editOrRef = useRef();
const ThisEditor = useRef();
useEffect(() => {
ThisEditor.current = monaco.editor.create(editOrRef.current, {
value: value || '',
language,
theme: "vs-grey",
fontSize: fontSize + 'px',
minimap: { //
enabled: false,
},
...monacoOptions,
});
ThisEditor.current.onDidChangeModelContent((e) => {
let newValue = ThisEditor.current.getValue();
onChange(newValue);
});
return () => {
ThisEditor.current.dispose();
ThisEditor.current = undefined; //
}
}, []);
useEffect(() => {
if (ThisEditor.current) {
ThisEditor.current.updateOptions({
fontSize: fontSize + 'px',
})
}
}, [fontSize]);
return (
<div style={style} ref={editOrRef}>
</div>
);
}
export default Monaco;

View File

@ -40,7 +40,11 @@ function SSH(props) {
if(result && result.data){ if(result && result.data){
props.showNotification("密钥删除成功!"); props.showNotification("密钥删除成功!");
setVisible(false); setVisible(false);
Init(); if(page>1 && (list && list.length===1)){
setPage(page-1);
}else{
Init();
}
} }
}).catch(error=>{}) }).catch(error=>{})
} }

View File

@ -20,6 +20,14 @@ const Setting = Loadable({
loader: () => import("./Setting"), loader: () => import("./Setting"),
loading: Loading, loading: Loading,
}); });
const WebhookNew = Loadable({
loader: () => import("./Webhooks/New"),
loading: Loading,
});
const Webhook = Loadable({
loader: () => import("./Webhooks/Index"),
loading: Loading,
});
const Collaborator = Loadable({ const Collaborator = Loadable({
loader: () => import("./Collaborator"), loader: () => import("./Collaborator"),
loading: Loading, loading: Loading,
@ -65,6 +73,18 @@ class Index extends Component {
</Link> </Link>
</p> </p>
</li> </li>
<li
className={
pathname.indexOf("setting/webhooks") > -1 ? "active" : ""
}
>
<p>
<Link to={`/projects/${owner}/${projectsId}/setting/webhooks`} className="w-100">
<i className="iconfont icon-a-xuanzhongwebhookicon font-18 mr10 color-grey-9"></i>
Webhooks
</Link>
</p>
</li>
<li <li
className={ className={
pathname.indexOf("setting/branch") > -1 ? "active" : "" pathname.indexOf("setting/branch") > -1 ? "active" : ""
@ -103,8 +123,27 @@ class Index extends Component {
</ul> </ul>
</Short> </Short>
<Long> <Long>
<Gap className="list-r-Info"> <Gap>
<Switch {...this.props}> <Switch {...this.props}>
{/* webhooks */}
<Route
path="/projects/:owner/:projectsId/setting/webhooks/new"
render={(props) => (
<WebhookNew {...this.props} {...props} {...this.state} />
)}
></Route>
<Route
path="/projects/:owner/:projectsId/setting/webhooks/:id"
render={(props) => (
<WebhookNew {...this.props} {...props} {...this.state} />
)}
></Route>
<Route
path="/projects/:owner/:projectsId/setting/webhooks"
render={(props) => (
<Webhook {...this.props} {...props} {...this.state} />
)}
></Route>
{/* 协作者 */} {/* 协作者 */}
<Route <Route
path="/projects/:owner/:projectsId/setting/collaborator" path="/projects/:owner/:projectsId/setting/collaborator"

View File

@ -0,0 +1,113 @@
import React, { useEffect, useState } from 'react';
import { Banner , FlexAJ } from '../../Component/layout';
import DeleteBox from '../../Component/DeleteModal/Index';
import './Index.scss';
import { Button , List, Pagination } from 'antd';
import { Link } from 'react-router-dom';
import axios from 'axios';
const limit = 15;
function Index(props) {
const [ data , setData ] = useState(undefined);
const [ page , setPage ] = useState(1);
const [ total , setTotal ] = useState(1);
const [ deleteId , setDeleteId ] = useState(undefined);
const [ visible , setVisible ] = useState(false);
const [ url , setUrl ] = useState(undefined);
const { owner , projectsId } = props.match.params;
useEffect(()=>{
if(owner && projectsId){
getData();
}
},[owner,projectsId,page])
function getData() {
const url = `/${owner}/${projectsId}/webhooks.json`;
axios.get(url,{
params:{page,limit}
}).then(result=>{
if(result && result.data){
setData(result.data.webhooks);
setTotal(result.data.total_count);
}
}).catch(error=>{})
}
function deleteFunc(id,url) {
setDeleteId(id);
setUrl(url);
setVisible(true);
}
function onSuccess() {
if(deleteId){
const url = `/${owner}/${projectsId}/webhooks/${deleteId}.json`;
axios.delete(url).then(result=>{
if(result){
props.showNotification("webhook删除成功");
if(page>1 && data.length === 1){
setPage(page-1);
}else{
getData();
}
setVisible(false);
}
}).catch(error=>{})
}
}
function addFunc() {
if(total >= 20){
return props.showNotification("webhooks数量已到上限请删除暂不使用的webhooks以进行添加操作");
}
props.history.push(`/projects/${owner}/${projectsId}/setting/webhooks/new`)
}
return(
<div>
<DeleteBox
visible={visible}
onCancel={()=>setVisible(false)}
onSuccess={onSuccess}
title="删除Webhook"
content="您确定要删除此Webhook吗"
subTitle={`删除后未来事件将不会推送至此Webhook地址${url}`}
/>
<Banner>
<FlexAJ>
<span>Webhooks</span>
<Button type="primary" size="large" onClick={addFunc}>添加Webhook</Button>
</FlexAJ>
</Banner>
<div className="hookpanel">
<p className="color-grey-3">每当特定事件如push代码合并请求被编辑发生时我们将通过webhook给您提供的远程URL发送post请求您可以在我们的<a className="color-blue hoverLine" target="_blank" href="https://forum.trustie.net/forums/3408/detail">webhooks指南</a>中了解更多信息</p>
{
data && data.length> 0 &&
<List>
{data.map((i,k)=>{
return(
<List.Item key={k}>
<i className="iconfont icon-a-xuanzhongwebhookicon color-grey-d mr12 font-17"></i>
<Link to={`/projects/${owner}/${projectsId}/setting/webhooks/${i.id}`} className="webName">{i.url}</Link>
<span>
<Button ghost type={"primary"} onClick={()=>{props.history.push(`/projects/${owner}/${projectsId}/setting/webhooks/${i.id}`)}}>编辑</Button>
<Button ghost className="ml20" type="danger" onClick={()=>{deleteFunc(i.id,i.url)}}>删除</Button>
</span>
</List.Item>
)
})}
</List>
}
{
total > limit &&
<div className="edu-txt-center mt20 mb20">
<Pagination current={page} total={total} onChange={e=>{setPage(e)}} pageSize={limit}/>
</div>
}
</div>
</div>
)
}
export default Index;

View File

@ -0,0 +1,171 @@
.hookpanel{
&>p{
padding:20px 25px 0px 20px;
}
.ant-list{
.ant-list-item{
padding:15px 20px;
&:last-child{
border-bottom: 1px solid #e8e8e8;
}
.webName{
flex:1;
margin-right: 15px;
word-break: break-all;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
}
}
}
.newPanel{
.ant-form .ant-form-item-label label{
font-size: 16px;
}
.has-success .ant-form-explain{
font-size: 12px;
color: #999;
line-height: 20px;
margin-top: 5px;
word-break: break-all;
}
.ant-form{
.ant-row{
padding:0px 194px 0px 20px;
&.topLine{
border-top: 1px solid #EEEEEE;
padding-top:20px;
margin-top: 25px;
}
&.bottomLine{
border-bottom: 1px solid #EEEEEE;
padding-bottom:20px;
margin-bottom: 25px;
.ant-checkbox + span{
font-size: 16px;
}
}
}
}
.eventCb{
padding:0px 194px 0px 45px;
.ant-checkbox-group{
width: 100%;
}
.colSpan{
display: flex;
flex-wrap: wrap;
&>span{
width: 50%;
margin:0px;
display: block;
&>span{
display: block;
padding-left: 24px;
margin-bottom: 20px;
font-size: 12px;
}
}
}
}
.ant-form-item-children{
display: block;
}
.ant-checkbox + span{
color: #333;
&>span{
color: #333333;
height: 20px;
line-height: 20px;
padding-left: 24px;
font-size: 12px;
display: block;
}
}
}
.deschead{
background: #FAFCFF;
border-radius: 4px 4px 0px 0px;
border: 1px solid rgba(42, 97, 255, 0.23);
height: 50px;
padding:0px 20px;
margin-top: 20px;
display: flex;
align-items: center;
justify-content: space-between;
}
.deschead.mg{
margin:20px!important;
padding:0px 12px;
}
.historyColl{
.ant-collapse-header{
background-color: #fff;
}
.panelHeader{
display: flex;
span{
width: 20%;
color: #333;
font-weight: 400;
}
.time{
text-align: right;
}
.name{
flex:1;
}
}
.ant-collapse-content-box{
background-color: #fff;
}
}
.contentMenu{
li{
font-weight: 500;
}
margin-left:14px;
}
.contentPanel{
.retitle{
font-size: 16px;
font-weight: 600;
color: #333333;
margin:20px 0px 10px!important;
}
.con{
background: #EEEEEE;
border-radius: 4px;
padding:15px;
max-height: 400px;
overflow: auto;
p{
font-size: 13px;
color:#333;
line-height: 28px;
&>span:first-child{
font-weight: 500;
}
}
}
.conEditor{
.overflow-guard{
border-radius: 4px;
}
.margin-view-overlays{
background-color: #eee;
&>div{
background-color: #eee;
}
}
.lines-content{
background-color: #eee;
}
.view-lines{
&>div{
background-color: #eee;
}
}
}
}

View File

@ -0,0 +1,336 @@
import React , { forwardRef, useEffect, useState } from 'react';
import { Form , Input , Button , Select , Radio , Checkbox } from 'antd';
import { Banner } from '../../Component/layout';
import { Link } from 'react-router-dom';
import axios from 'axios';
import PushHistory from './sub/PushHistory';
import DeleteBox from '../../Component/DeleteModal/Index';
import './Index.scss';
// ,"issue_assign","issue_label","issue_milestone","issue_comment","issue_only","fork",
//"pull_request_milestone","pull_request_sync","pull_request_comment","repository","pull_request_label"
const eventArray = [
"create","delete","push","pull_request_assign","pull_request_review","pull_request_only"
]
function New({ form , match , showNotification , history }) {
const [ httpValue , setHttpValue ] = useState("POST");
const [ posthttpValue , setPostHttpValue ] = useState("json");
const [ condition , setCondition ] = useState("push");
const [ event , setEvent ] = useState(["push"]);
const [ visible , setVisible ] = useState(false);
const [ data , setData ] = useState(undefined);
const [ eventFlag , setEventFlag ] = useState(false);
const { getFieldDecorator, validateFields , setFieldsValue } = form;
const { id , owner , projectsId } = match.params;
function compareArray(params) {
if(params && params.length > 0){
if(params.length === 1 && params[0] === "push"){
setEvent(['push']);
return "push";
}else if(params.length === eventArray.length){
setEvent(eventArray);
return "all";
}else{
setEvent([]);
return "forevent";
}
}
}
useEffect(()=>{
if(id){
Init();
}else{
let e = compareArray(event);
setCondition(e);
setFieldsValue({
url:"",
secret:"",
http_method:httpValue,
content_type:posthttpValue,
eventCondition:condition,
event:event,
branch_filter:"*",
active:true
})
}
},[id])
function Init() {
const url = `/${owner}/${projectsId}/webhooks/${id}/edit.json`;
axios.get(url).then(result=>{
if(result){
let e = compareArray(result.data.events);
setFieldsValue({
...result.data,
eventCondition:e,
active:result.data.is_active
})
setData(result.data);
setHttpValue(result.data.http_method);
setCondition(e);
setEvent(result.data.events);
}
}).catch(error=>{})
}
function changeHTTP(value) {
setHttpValue(value);
}
function changeCondition(e) {
setCondition(e.target.value);
if(e.target.value === "push"){
setEvent(["push"])
}else if(e.target.value === "all"){
setEvent(eventArray)
}else{
setEvent([])
}
}
function submit() {
validateFields((error,values)=>{
if(!error){
if(values.eventCondition === "forevent" && event.length === 0){
setEventFlag(true);
return;
}
let e = values.eventCondition === "push" ? ['push'] : values.eventCondition === "all" ? eventArray : event;
if(id){
//
const url = `/${owner}/${projectsId}/webhooks/${id}.json`;
axios.patch(url,{
webhook:{
...values,
events:e
}
}).then(result=>{
if(result){
showNotification("webhook更新成功");
history.push(`/projects/${owner}/${projectsId}/setting/webhooks`);
}
}).catch(error=>{})
}else{
//
const url = `/${owner}/${projectsId}/webhooks.json`;
axios.post(url,{
webhook:{
...values,
events:e
}
}).then(result=>{
if(result && result.data && result.data.id){
showNotification("webhook新建成功");
history.push(`/projects/${owner}/${projectsId}/setting/webhooks`);
}
}).catch(error=>{})
}
}
})
}
function checkAddr(rule, value, callback) {
let reg = /(http|ftp|https):\/\/[\w\-_]+(\.[\w\-_]+)+([\w\-\.,@?^=%&:/~\+#]*[\w\-\@?^=%&/~\+#])?/;
if(!value){
callback();
}
if (!reg.test(value)){
callback("请输入有效的URL");
}
callback();
}
function deleteFunc() {
if(id){
setVisible(true);
}
}
function onSuccess() {
if(id){
const url = `/${owner}/${projectsId}/webhooks/${id}.json`;
axios.delete(url).then(result=>{
if(result){
showNotification("webhook删除成功");
history.push(`/projects/${owner}/${projectsId}/setting/webhooks`);
}
}).catch(error=>{})
}
}
const radioStyle = {
display: 'block',
height: '30px',
lineHeight: '30px',
};
return(
<div className="newPanel">
<DeleteBox
visible={visible}
onCancel={()=>setVisible(false)}
onSuccess={onSuccess}
title="删除Webhook"
content="您确定要删除此Webhook吗"
subTitle={`删除后未来事件将不会推送至此Webhook地址${data && data.url}`}
/>
<Banner>
<Link to={`/projects/${owner}/${projectsId}/setting/webhooks`} className="color-blue">Webhooks</Link>
<i className="iconfont icon-youjiantou ml5 mr5 font-12"></i>
<span>{id ? "更新" : "添加"}Webhook</span>
</Banner>
<div>
<p className="deschead mg"><span>当webhook被触发时我们将向以下URL发送通知包括已选择事件的详细信息更多信息可查阅<a className="color-blue hoverLine" target="_blank" href="https://forum.trustie.net/forums/3408/detail">webhooks指南</a></span></p>
<Form>
<Form.Item label="目标URL" colon={false}>
{getFieldDecorator("url",{
rules:[
{required:true,message:"请输入目标URL"},
{
validator:checkAddr
}
]
})(
<Input placeholder="请输入目标URL" size="large"/>
)}
</Form.Item>
<Form.Item label="Webhook密钥" colon={false}>
{getFieldDecorator("secret",{
rules:[]
})(
<Input placeholder="请输入Webhook密钥" size="large" maxLength={"50"}/>
)}
</Form.Item>
<Form.Item label="Http请求方法" colon={false}>
{getFieldDecorator("http_method",{
rules:[]
})(
<Select onSelect={changeHTTP} size="large">
<Select.Option value="GET">GET</Select.Option>
<Select.Option value="POST">POST</Select.Option>
</Select>
)}
</Form.Item>
<Form.Item
label="POST请求类型"
colon={false}
style={{display:httpValue === "POST" ?"block":"none"}}
>
{getFieldDecorator("content_type",{
rules:[]
})(
<Select size="large">
<Select.Option value="json">application/json</Select.Option>
<Select.Option value="form">application/x-www-form-urlencoded</Select.Option>
</Select>
)}
</Form.Item>
<Form.Item label="您希望哪些事件触发此webhook" colon={false} className="topLine">
{getFieldDecorator("eventCondition",{
rules:[]
})(
<Radio.Group onChange={changeCondition}>
<Radio style={radioStyle} value="push">只是push事件</Radio>
<Radio style={radioStyle} value="all">所有事件</Radio>
<Radio style={radioStyle} value="forevent">自定义事件</Radio>
</Radio.Group>
)}
</Form.Item>
<div className="eventCb"
style={{display:condition === "forevent" ?"block":"none"}}
>
<Checkbox.Group value={event} onChange={(e)=>{setEvent(e)}}>
<p className="color-grey-3 mb10">代码库事件</p>
<div className="colSpan">
<span>
<Checkbox value="push">推送</Checkbox>
<span>git推送到存储库</span>
</span>
{/* <span>
<Checkbox value="repository">代码库</Checkbox>
<span>创建或删除代码库</span>
</span> */}
<span>
<Checkbox value="create">创建</Checkbox>
<span>创建分支或标签</span>
</span>
<span>
<Checkbox value="delete">删除</Checkbox>
<span>删除分支或标签</span>
</span>
</div>
<p className="color-grey-3 mt10 mb10">合并请求事件</p>
<div className="colSpan">
<span>
<Checkbox value="pull_request_only">合并请求</Checkbox>
<span>合并请求被打开被关闭被重新打开或被编辑</span>
</span>
<span>
<Checkbox value="pull_request_assign">合并请求分配</Checkbox>
<span>合并请求被分配或取消分配</span>
</span>
{/* <span>
<Checkbox value="pull_request_milestone">合并请求收入里程碑</Checkbox>
<span>合并请求被记录或取消记录于里程碑中</span>
</span> */}
{/* <span>
<Checkbox value="pull_request_comment">合并请求被评论</Checkbox>
<span>合并请求评论被创建编辑或删除</span>
</span> */}
{/* <span>
<Checkbox value="pull_request_label">合并请求标签</Checkbox>
<span>合并请求的标签被更新或清除</span>
</span> */}
<span>
<Checkbox value="pull_request_review">合并请求审查</Checkbox>
<span>合并请求被批准拒绝或提出审查意见审查人员的修改审查线程已解决或未解决</span>
</span>
{/* <span>
<Checkbox value="pull_request_sync">合并请求被同步</Checkbox>
<span>合并请求被同步</span>
</span> */}
</div>
</Checkbox.Group>
{ eventFlag && <span style={{color:"#DF0002"}}>请选择自定义事件</span>}
</div>
<Form.Item
label="分支过滤"
className="topLine"
help={'推送、创建,删除分支事件的分支白名单,使用 glob 模式匹配指定。若为空或 *则将报告所有分支的事件。语法文档见github.com/gobwas/glob。示例master,{master,release*}。'}
colon={false}
style={{marginTop:'15px'}}
>
{getFieldDecorator("branch_filter",{
rules:[]
})(
<Input size="large"/>
)}
</Form.Item>
<Form.Item
className="topLine bottomLine"
colon={false}
style={{height:"110px",paddingBottom:"0px"}}
>
{getFieldDecorator("active",{
valuePropName:"checked"
})(
<Checkbox>激活<span className="subCbDesc">激活后触发事件的信息将发送到此Webhook地址</span></Checkbox>
)}
</Form.Item>
<Button type="primary" onClick={submit} className="ml20" style={{width:id?"":"100px"}}>{id ? "更新Webhook":"添加"}</Button>
{
id && <Button type="danger" className="ml20" onClick={deleteFunc}>删除</Button>
}
</Form>
</div>
{ id && <PushHistory id={id} owner={owner} projectsId={projectsId} showNotification={showNotification}/> }
</div>
)
}
export default Form.create()(forwardRef(New));

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 778 B

View File

@ -0,0 +1,82 @@
import React, { useEffect, useState } from 'react';
import { Button, Collapse , Tooltip , Spin } from 'antd';
import axios from 'axios';
import Content from './historyContent';
import Fault from '../images/fault.png';
const { Panel } = Collapse;
function PushHistory({id,owner,projectsId,showNotification}) {
const [ list , setList ] = useState(undefined);
const [ isSpin , setIsSpin ] = useState(false);
useEffect(()=>{
if(id && owner && projectsId){
Init();
}
},[id,owner,projectsId])
function Init() {
const url = `/${owner}/${projectsId}/webhooks/${id}/tasks.json`;
axios.get(url,{
params:{page:1,limit:10}
}).then(result=>{
if(result && result.data){
setList(result.data.tasks);
setIsSpin(false);
}
}).catch(error=>{})
}
function testFunc() {
setIsSpin(true);
const url = `/${owner}/${projectsId}/webhooks/${id}/test.json`;
axios.post(url).then(result=>{
if(result && result.data){
// Init();
showNotification("测试推送已经加入到队列,请耐心等待数秒再刷新推送记录!");
setIsSpin(false);
}
}).catch(error=>{setIsSpin(false);})
}
return(
<div className="pt30">
<div className="deschead">
<span className="font-16">最近推送历史</span>
<span>
<a className="color-blue" onClick={Init}>刷新</a>
<Button type="primary" className="ml20" onClick={testFunc} loading={isSpin}>测试推送</Button>
</span>
</div>
{
list && list.length>0 &&
<Collapse accordion bordered={false} className="historyColl">
{
list.map((i,k)=>{
return(
<Panel header={
<div className="panelHeader">
{
i.is_succeed ?
<Tooltip title={<span className="pl20 pr20">响应成功类型{i.response_content && i.response_content.status}</span>}>
<i className="iconfont icon-chenggongicon font-14 mr10" style={{color:"#2DB44D"}}></i>
</Tooltip>
:
<img src={Fault} alt="" className="mr10" height="15px" style={{marginTop:"2px"}}/>
}
<span className="name">{i.uuid}</span>
{/* <span>{i.type}</span> */}
<span className="time">{i.delivered_time}</span>
</div>
}>
<Content request_content={i.request_content && i.request_content.headers} payload_content={i.payload_content} response_content={i.response_content}/>
</Panel>
)
})
}
</Collapse>
}
</div>
)
}
export default PushHistory;

View File

@ -0,0 +1,142 @@
import React, { useEffect, useState } from 'react';
import { Menu } from 'antd';
import Nodata from '../../../Nodata';
import ReactJson from 'react-json-view';
import Editor from "../../../Component/Monaco";
function HistoryContent({request_content,payload_content,response_content}) {
const [ key , setKey ] = useState("request");
const [ requestHeader , setRequestHeader ] = useState(undefined);
const [ responseHeader , setResponseHeader ] = useState(undefined);
useEffect(()=>{
if(request_content){
let arr = [];
Object.keys(request_content).map((item,key)=>{
arr.push({name:item,value:request_content[item],k:key});
})
setRequestHeader(arr);
}
},[request_content])
useEffect(()=>{
if(response_content && response_content.headers){
let arr = [];
Object.keys(response_content.headers).map((item,key)=>{
arr.push({name:item,value:response_content.headers[item],k:key});
})
setResponseHeader(arr);
}
},[response_content])
function isJSON(str) {
if (typeof str === 'string') {
try {
var obj=JSON.parse(str);
if(typeof obj === 'object' && obj ){
return true;
}else{
return false;
}
} catch(e) {
return false;
}
}
}
return(
<div className="contentPanel">
<div>
<Menu selectedKeys={[key]} onSelect={(e)=>setKey(e.key)} mode={"horizontal"} className="contentMenu">
<Menu.Item key={"request"}><i className="iconfont icon-weixuanzhongqingqiuicon font-15 mr5"></i>请求</Menu.Item>
<Menu.Item key={"response"}><i className="iconfont icon-xuanzhongxiangyingicon font-16 mr5"></i>响应</Menu.Item>
</Menu>
</div>
<div style={{paddingLeft:"16px"}}>
{
key === "request" ?
<div>
{
requestHeader && requestHeader.length > 0 &&
<div>
<p className="retitle">标题</p>
<div className="con">
{
requestHeader.map((i,k)=>{
return(
<p><span>{i.name}: </span><span>{i.value}</span></p>
)
})
}
</div>
</div>
}
{
payload_content &&
<div>
<p className="retitle">有效载荷</p>
<div className="con">
<ReactJson
src={payload_content}
name={false}
displayObjectSize={false}
displayDataTypes={false}
enableClipboard={false}
/>
</div>
</div>
}
</div>
:
<div>
{
(!responseHeader && ((response_content && !response_content.body) || !response_content))?
<Nodata _html="暂无数据~"/>
:""
}
{
responseHeader && responseHeader.length > 0 &&
<div>
<p className="retitle">标题</p>
<div className="con">
{
responseHeader.map((i,k)=>{
return(
<p><span>{i.name}: </span><span>{i.value}</span></p>
)
})
}
</div>
</div>
}
{
response_content && response_content.body &&
<div>
<p className="retitle">响应体</p>
{
isJSON(response_content.body) ?
<div className="con">
<ReactJson
enableClipboard={false}
src={JSON.parse(response_content.body)}
name={false}
displayObjectSize={false}
displayDataTypes={false}
/>
</div>
:
<div className="conEditor">
<Editor value={response_content.body}/>
</div>
}
</div>
}
</div>
}
</div>
</div>
)
}
export default HistoryContent;

View File

@ -257,4 +257,17 @@ form{
.group-setting-switch{ .group-setting-switch{
border: 1px solid #DDDDDD !important; border: 1px solid #DDDDDD !important;
background-color: #fff !important; background-color: #fff !important;
}
.ant-btn.ant-btn-background-ghost{
border-color: #D0D0D0;
}
.ant-btn.ant-btn-background-ghost.ant-btn-primary:hover{
background-color: #1890ff!important;
border-color: #1890ff;
color: #fff;
}
.ant-btn.ant-btn-background-ghost.ant-btn-danger:hover{
background-color: #DF0002!important;
border-color: #DF0002;
color: #fff;
} }