build/static/js/225.ad2d4e22.chunk.js

1 line
4.2 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

(this.webpackJsonp=this.webpackJsonp||[]).push([[225],{qxpP:function(e,t,a){"use strict";a.r(t),a("Q9mQ");var n=a("diRs"),i=(a("Pwec"),a("CtXQ")),l=a("zLi2"),r=a.n(l),o=a("cDcd"),s=a.n(o),c=a("ProS"),m=a.n(c),u=(a("fLKP"),a("+oHS")),f=a.n(u),d=a("OWCx"),p=a.n(d),h=a("5PDf"),b=a.n(h),v=a("fHi0"),y=a.n(v),x=a("RXMP"),g=a.n(x),w=a("qjzJ"),S=a.n(w),E=a("HnXd"),L=a.n(E),j=a("LYCE"),k=a.n(j),D=a("04Ix"),_=a.n(D),z=a("JGtk");function O(e,t){var a=f()(e);if(p.a){var n=p()(e);t&&(n=b()(n).call(n,(function(t){return y()(e,t).enumerable}))),a.push.apply(a,n)}return a}function P(e){for(var t=1;t<arguments.length;t++){var a,n,i=null!=arguments[t]?arguments[t]:{};t%2?g()(a=O(Object(i),!0)).call(a,(function(t){_()(e,t,i[t])})):S.a?L()(e,S()(i)):g()(n=O(Object(i))).call(n,(function(t){k()(e,t,y()(i,t))}))}return e}var A=Object(z.a)();t.default=function(e){var t=e.owner,a=e.projectsId,l=Object(o.useState)({}),c=r()(l,2),u=c[0],f=c[1];return Object(o.useEffect)((function(){var e;(e={owner:t,repository:a},A({url:"https://testbd.trustie.net/maturityAnalyse/",method:"get",params:"testforgeplus.trustie.net"===window.location.hostname?P(P({},e),{},{env_url:"testforgeplus"}):e,withCredentials:!1})).then((function(e){var t,a,n,i,l,r;e.data&&e.data.main_score&&e.data.main_score.score>0&&(f(e.data.main_score),t=e.data,a=document.getElementById("compass"),n=m.a.init(a),i="#333",l="#aaa",r={tooltip:{textStyle:{fontWeight:"bolder"},formatter:function(e){return"mock"===e.data.validity?e.name+": 即将上线":e.data.description+": "+e.data.value[2]}},xAxis3D:{name:" ",type:"category",data:t.main_score.x_axis,interval:2,axisLine:{lineStyle:{width:1,color:i}},splitLine:{show:!0,interval:2},axisLabel:{interval:2,textStyle:{color:l,padding:[10,10,0,0]}},axisTick:{interval:2,length:1}},yAxis3D:{name:" ",type:"category",data:t.main_score.y_axis,axisLine:{lineStyle:{width:1,color:i}},axisTick:{interval:2,length:0},splitArea:{show:!0,areaStyle:{color:["rgba(255,247,207,0.5)","rgba(255,231,231,0.5)","rgba(226,226,226,0.5)"]}},axisLabel:{interval:2,textStyle:{color:l,padding:[10,0,0,0]}},splitLine:{show:!0,interval:2}},zAxis3D:{name:" ",type:"value",splitNumber:4,axisLine:{lineStyle:{width:.1,opacity:.5,color:i}},splitArea:{show:!0,areaStyle:{color:["#ffffff","#ffffff","#ffffff"]}},axisLabel:{show:!1},axisTick:{show:!1}},grid3D:{axisLine:{interval:1},axisPointer:{lineStyle:{opacity:.2},label:{show:!1}},splitLine:{interval:2},viewControl:{projection:"perspective",zoomSensitivity:0,rotateSensitivity:[1,0],distance:380,alpha:20,beta:25},height:300,right:-30,top:-50,bottom:0,boxWidth:180,boxDepth:180,boxHeight:150,environment:"none",light:{main:{intensity:.8,alpha:50},ambient:{intensity:.5}}},series:[{type:"bar3D",data:t.scores,shading:"realistic",bevelSize:.1,bevelSmoothness:2,barSize:13,label:{show:!1,fontSize:12,fontWeight:500,borderWidth:1,color:"#333",distance:-20,formatter:function(e){for(var t=e.data.description,a=Math.ceil(t.length/2),n=0;n<a;n++){var i=2*n,l=i+2;t.substring(i,l)}return 3}},itemStyle:{opacity:.95},emphasis:{label:{show:!1},itemStyle:{color:"#FFB800",opacity:.7}}}]},n.setOption(r))}))}),[]),u.score&&u.score>0?s.a.createElement("div",{className:"halfs"},s.a.createElement("div",{className:"font-16 color-ooo mb20"},"开源健康成熟度评分 (",u.score&&u.score.toFixed(2),")",s.a.createElement(n.a,{content:s.a.createElement("div",null,"开源健康成熟度评分,评估围绕以下维度对项目展开评估:",s.a.createElement("br",null),"稳健性:由安全警告,开发者数量,版本数评分反映。",s.a.createElement("br",null),"扩展性由许可证评分、fork数评分、点赞数评分、关注数评分反映。",s.a.createElement("br",null),"维护性:由未解决 issue 和已解决 issuecommit数评分反映。",s.a.createElement("br",null),s.a.createElement("br",null),"总体成熟度评分",s.a.createElement("br",null),"80-100分: 项目成熟,维护良好。",s.a.createElement("br",null),"60-80分: 项目稳定,有待改进。",s.a.createElement("br",null),"0-60分: 项目成长期,需要加强维护。",s.a.createElement("br",null))},s.a.createElement(i.a,{type:"question-circle",theme:"filled",className:"color-blue ml10 pointer"}))),s.a.createElement("div",{id:"compass",style:{height:"250px"}})):null}}}]);