diff --git a/client/dist/css/chunk-5dff10a1.f9498b11.css b/client/dist/css/chunk-5dff10a1.f9498b11.css deleted file mode 100644 index 3cface4..0000000 --- a/client/dist/css/chunk-5dff10a1.f9498b11.css +++ /dev/null @@ -1 +0,0 @@ -.filter-panel[data-v-068ebd61]{border-bottom:1px dashed #e8e8e8}.el-form-item__label[data-v-068ebd61]{color:#313440}.el-select[data-v-068ebd61]{width:233px}.el-tag[data-v-068ebd61]{border-radius:2px!important;margin-right:1px;font-weight:700}h3[data-v-068ebd61]{color:#313440}.tag-count[data-v-068ebd61]{float:right;color:#313440} \ No newline at end of file diff --git a/client/dist/css/chunk-a8d299a6.846a7c45.css b/client/dist/css/chunk-a8d299a6.846a7c45.css new file mode 100644 index 0000000..0b7dbe0 --- /dev/null +++ b/client/dist/css/chunk-a8d299a6.846a7c45.css @@ -0,0 +1 @@ +.ignore-btn{margin-top:10px}a{color:#0366d6;text-decoration:none}a:hover{text-decoration:underline}.repo-language-color{margin-right:5px}.search-result-item .el-card{padding-top:20px!important}.project-info img{margin-right:5px} \ No newline at end of file diff --git a/client/dist/css/chunk-a8d299a6.d330bc6a.css b/client/dist/css/chunk-a8d299a6.d330bc6a.css deleted file mode 100644 index b42d2ed..0000000 --- a/client/dist/css/chunk-a8d299a6.d330bc6a.css +++ /dev/null @@ -1 +0,0 @@ -a{color:#0366d6;text-decoration:none}a:hover{text-decoration:underline}.repo-language-color{margin-right:5px}.search-result-item .el-card{padding-top:20px!important}.project-info img{margin-right:5px} \ No newline at end of file diff --git a/client/dist/css/chunk-ccdd2822.ab074283.css b/client/dist/css/chunk-ccdd2822.ab074283.css new file mode 100644 index 0000000..69697f5 --- /dev/null +++ b/client/dist/css/chunk-ccdd2822.ab074283.css @@ -0,0 +1 @@ +.filter-panel[data-v-73be8f21]{border-bottom:1px dashed #e8e8e8}.el-form-item__label[data-v-73be8f21]{color:#313440}.el-select[data-v-73be8f21]{width:233px}.el-tag[data-v-73be8f21]{border-radius:2px!important;margin-right:1px;font-weight:700}h3[data-v-73be8f21]{color:#313440}.tag-count[data-v-73be8f21]{float:right;color:#313440} \ No newline at end of file diff --git a/client/dist/index.html b/client/dist/index.html index 01f4e91..4134a3d 100644 --- a/client/dist/index.html +++ b/client/dist/index.html @@ -1 +1 @@ -Hawkeye
\ No newline at end of file +Hawkeye
\ No newline at end of file diff --git a/client/dist/js/app.39e49673.js b/client/dist/js/app.94811267.js similarity index 94% rename from client/dist/js/app.39e49673.js rename to client/dist/js/app.94811267.js index b99edf9..f26d947 100644 --- a/client/dist/js/app.39e49673.js +++ b/client/dist/js/app.94811267.js @@ -1 +1 @@ -(function(e){function t(t){for(var a,r,o=t[0],i=t[1],f=t[2],d=0,l=[];d0,expression:"selections.length > 0"}],attrs:{type:"danger",round:"",size:"mini"},on:{click:function(e){t.handleDelete(t.selections.map(function(t){return t._id}))}}},[t._v("忽略\n ")])],1)],1),s("el-table",{ref:"multipleTable",staticStyle:{width:"100%"},attrs:{stripe:"","tooltip-effect":"dark",data:t.results},on:{"selection-change":t.handleSelectionChange}},[s("el-table-column",{attrs:{type:"selection",width:"40"}}),s("el-table-column",{attrs:{label:"发现时间",width:"200"},scopedSlots:t._u([{key:"default",fn:function(e){return[s("i",{staticClass:"el-icon-time"}),t._v("\n "+t._s(t._f("dateFormat")(e.row.datetime))+"\n ")]}}])}),s("el-table-column",{attrs:{label:"项目",width:"250","show-overflow-tooltip":""},scopedSlots:t._u([{key:"default",fn:function(e){return[s("img",{staticClass:"avatar flex-shrink-0 mr-2",attrs:{src:e.row.avatar_url,width:"32",height:"32",alt:"@"+e.row.username}}),s("a",{staticClass:"link-gray-dark no-underline text-bold wb-break-all",attrs:{href:e.row.project_url,target:"_blank"}},[t._v(" "+t._s(e.row.project))])]}}])}),s("el-table-column",{attrs:{prop:"language",label:"语言","show-overflow-tooltip":""},scopedSlots:t._u([{key:"default",fn:function(e){return[s("span",{staticClass:"repo-language-color ml-0",staticStyle:{"background-color":"#555555"}}),t._v("\n "+t._s(e.row.language?e.row.language:"未知")+"\n ")]}}])}),s("el-table-column",{attrs:{prop:"filename",label:"文件名","show-overflow-tooltip":""},scopedSlots:t._u([{key:"default",fn:function(e){return[s("router-link",{attrs:{to:"/view/leakage/"+e.row._id,target:"_blank"}},[t._v("\n "+t._s(e.row.filename)+" "),s("i",{staticClass:"iconfont icon-prompt"})])]}}])}),s("el-table-column",{attrs:{label:"备注",width:"200","show-overflow-tooltip":""},scopedSlots:t._u([{key:"default",fn:function(e){return e.row.desc?[s("el-tag",{attrs:{size:"mini",type:e.row.security?"success":"danger","disable-transitions":""}},[t._v("\n "+t._s(e.row.desc)+"\n ")])]:void 0}}])}),s("el-table-column",{attrs:{label:"标签",width:"200","show-overflow-tooltip":""},scopedSlots:t._u([{key:"default",fn:function(e){return[s("router-link",{attrs:{to:"/view/tag/"+e.row.tag}},[s("el-tag",{attrs:{size:"mini"}},[t._v(t._s(e.row.tag))])],1)]}}])}),s("el-table-column",{attrs:{label:"Star/Fork",width:"300"},scopedSlots:t._u([{key:"default",fn:function(t){return[s("div",{staticClass:"project-info"},[s("img",{attrs:{src:"https://img.shields.io/github/issues/"+t.row.project+".svg",alt:""}}),s("img",{attrs:{src:"https://img.shields.io/github/forks/"+t.row.project+".svg",alt:""}}),s("img",{attrs:{src:"https://img.shields.io/github/stars/"+t.row.project+".svg",alt:""}})])]}}])}),s("el-table-column",{attrs:{label:"操作",width:"350"},scopedSlots:t._u([{key:"default",fn:function(e){return[s("el-button-group",[s("el-button",{attrs:{round:"",size:"mini"},on:{click:function(s){t.handleOpen("https://github.com/"+e.row.project+"/commits")}}},[s("i",{staticClass:"iconfont icon-github-fill"}),t._v("\n Commits\n ")]),s("el-button",{attrs:{round:"",size:"mini"},on:{click:function(s){t.handleOpen("https://github.com/"+e.row.project+"/search?utf8=✓&q=pass OR password OR passwd OR pwd OR smtp OR database")}}},[s("i",{staticClass:"iconfont icon-flashlight"}),t._v("\n 快速排查\n ")])],1)]}}])})],1)],1)},n=[],o=(s("25d7"),s("5a09"),s("3a0f"),s("a3a3"),s("4d0b"),{props:["results"],name:"results-table",data:function(){return{selections:[]}},methods:{handleOpen:function(t){window.open(t,"_blank")},handleSelectionChange:function(t){this.selections=t},ignoreLeakage:function(t){var e=this,s={security:1,ignore:1,desc:"",id:t};this.axios.patch(this.api.leakage,s).then().catch(function(t){e.$message.error(t.toString())})},handleDelete:function(t){var e=this;this.$confirm("此操作将忽略结果, 是否继续?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){t.forEach(function(t){e.ignoreLeakage(t)}),e.$message({type:"success",message:"处理成功"})}).catch(function(){e.$message({type:"error",message:"已取消"})})}}}),i=o,l=(s("eb42"),s("048f")),r=Object(l["a"])(i,a,n,!1,null,null,null);r.options.__file="ResultsTable.vue";e["default"]=r.exports},eb42:function(t,e,s){"use strict";var a=s("0a8a"),n=s.n(a);n.a}}]); \ No newline at end of file diff --git a/client/dist/js/chunk-a8d299a6.f1ab32dc.js b/client/dist/js/chunk-a8d299a6.f1ab32dc.js new file mode 100644 index 0000000..1afba11 --- /dev/null +++ b/client/dist/js/chunk-a8d299a6.f1ab32dc.js @@ -0,0 +1 @@ +(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-a8d299a6"],{"0a8a":function(t,e,n){},"25d7":function(t,e,n){for(var s=n("3a0f"),o=n("bd18"),a=n("7e22"),i=n("53da"),l=n("7228"),r=n("a495"),c=n("5761"),u=c("iterator"),f=c("toStringTag"),d=r.Array,g={CSSRuleList:!0,CSSStyleDeclaration:!1,CSSValueList:!1,ClientRectList:!1,DOMRectList:!1,DOMStringList:!1,DOMTokenList:!0,DataTransferItemList:!1,FileList:!1,HTMLAllCollection:!1,HTMLCollection:!1,HTMLFormElement:!1,HTMLSelectElement:!1,MediaList:!0,MimeTypeArray:!1,NamedNodeMap:!1,NodeList:!0,PaintRequestList:!1,Plugin:!1,PluginArray:!1,SVGLengthList:!1,SVGNumberList:!1,SVGPathSegList:!1,SVGPointList:!1,SVGStringList:!1,SVGTransformList:!1,SourceBufferList:!1,StyleSheetList:!0,TextTrackCueList:!1,TextTrackList:!1,TouchList:!1},h=o(g),p=0;p0,expression:"selections.length > 0"}],attrs:{type:"danger",round:"",size:"mini"},on:{click:function(e){t.handleIgnore(t.selections.map(function(t){return t._id}))}}},[t._v("忽略\n ")])],1)],1),n("el-table",{ref:"multipleTable",staticStyle:{width:"100%"},attrs:{stripe:"","tooltip-effect":"dark",data:t.results},on:{"selection-change":t.handleSelectionChange}},[n("el-table-column",{attrs:{type:"selection",width:"40"}}),n("el-table-column",{attrs:{label:"发现时间",width:"200"},scopedSlots:t._u([{key:"default",fn:function(e){return[n("i",{staticClass:"el-icon-time"}),t._v("\n "+t._s(t._f("dateFormat")(e.row.datetime))+"\n ")]}}])}),n("el-table-column",{attrs:{label:"项目",width:"250","show-overflow-tooltip":""},scopedSlots:t._u([{key:"default",fn:function(e){return[n("img",{staticClass:"avatar flex-shrink-0 mr-2",attrs:{src:e.row.avatar_url,width:"32",height:"32",alt:"@"+e.row.username}}),n("a",{staticClass:"link-gray-dark no-underline text-bold wb-break-all",attrs:{href:e.row.project_url,target:"_blank"}},[t._v(" "+t._s(e.row.project))])]}}])}),n("el-table-column",{attrs:{prop:"language",label:"语言","show-overflow-tooltip":""},scopedSlots:t._u([{key:"default",fn:function(e){return[n("span",{staticClass:"repo-language-color ml-0",staticStyle:{"background-color":"#555555"}}),t._v("\n "+t._s(e.row.language?e.row.language:"未知")+"\n ")]}}])}),n("el-table-column",{attrs:{prop:"filename",label:"文件名","show-overflow-tooltip":""},scopedSlots:t._u([{key:"default",fn:function(e){return[n("router-link",{attrs:{to:"/view/leakage/"+e.row._id,target:"_blank"}},[t._v("\n "+t._s(e.row.filename)+" "),n("i",{staticClass:"iconfont icon-prompt"})])]}}])}),n("el-table-column",{attrs:{label:"备注",width:"200","show-overflow-tooltip":""},scopedSlots:t._u([{key:"default",fn:function(e){return e.row.desc?[n("el-tag",{attrs:{size:"mini",type:e.row.security?"success":"danger","disable-transitions":""}},[t._v("\n "+t._s(e.row.desc)+"\n ")])]:void 0}}])}),n("el-table-column",{attrs:{label:"标签",width:"200","show-overflow-tooltip":""},scopedSlots:t._u([{key:"default",fn:function(e){return[n("router-link",{attrs:{to:"/view/tag/"+e.row.tag}},[n("el-tag",{attrs:{size:"mini"}},[t._v(t._s(e.row.tag))])],1)]}}])}),n("el-table-column",{attrs:{label:"Star/Fork",width:"300"},scopedSlots:t._u([{key:"default",fn:function(t){return[n("div",{staticClass:"project-info"},[n("img",{attrs:{src:"https://img.shields.io/github/issues/"+t.row.project+".svg",alt:""}}),n("img",{attrs:{src:"https://img.shields.io/github/forks/"+t.row.project+".svg",alt:""}}),n("img",{attrs:{src:"https://img.shields.io/github/stars/"+t.row.project+".svg",alt:""}})])]}}])}),n("el-table-column",{attrs:{label:"操作",width:"350"},scopedSlots:t._u([{key:"default",fn:function(e){return[n("el-button-group",[n("el-button",{attrs:{round:"",size:"mini"},on:{click:function(n){t.handleOpen("https://github.com/"+e.row.project+"/commits")}}},[n("i",{staticClass:"iconfont icon-github-fill"}),t._v("\n Commits\n ")]),n("el-button",{attrs:{round:"",size:"mini"},on:{click:function(n){t.handleOpen("https://github.com/"+e.row.project+"/search?utf8=✓&q=pass OR password OR passwd OR pwd OR smtp OR database")}}},[n("i",{staticClass:"iconfont icon-flashlight"}),t._v("\n 快速排查\n ")])],1)]}}])})],1)],1)},o=[],a=(n("25d7"),n("5a09"),{props:["results"],name:"results-table",data:function(){return{selections:[]}},methods:{handleOpen:function(t){window.open(t,"_blank")},handleSelectionChange:function(t){this.selections=t},ignoreLeakage:function(t){var e=this,n={security:1,ignore:1,desc:"",id:t};this.axios.patch(this.api.leakage,n).then(function(t){e.$emit("change")}).catch(function(t){e.$message.error(t.toString())})},handleIgnore:function(t){var e=this;this.$confirm("此操作将忽略结果, 是否继续?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){t.forEach(function(t){e.ignoreLeakage(t)}),e.$message({type:"success",message:"处理成功"})}).catch(function(){e.$message({type:"error",message:"已取消"})})}}}),i=a,l=(n("eb42"),n("048f")),r=Object(l["a"])(i,s,o,!1,null,null,null);r.options.__file="ResultsTable.vue";e["default"]=r.exports},eb42:function(t,e,n){"use strict";var s=n("0a8a"),o=n.n(s);o.a}}]); \ No newline at end of file diff --git a/client/dist/js/chunk-ccdd2822.fc5fb92c.js b/client/dist/js/chunk-ccdd2822.fc5fb92c.js new file mode 100644 index 0000000..e6381fb --- /dev/null +++ b/client/dist/js/chunk-ccdd2822.fc5fb92c.js @@ -0,0 +1 @@ +(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-ccdd2822"],{"51e8":function(t,e,a){"use strict";var s=a("fe84"),i=a.n(s);i.a},f95f:function(t,e,a){"use strict";a.r(e);var s=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"result"},[a("Dashboard",{attrs:{trend:t.trendData}}),a("el-card",{attrs:{shadow:"never"}},[a("el-form",{staticClass:"filter-panel"},[a("el-row",{attrs:{type:t.mobileClient?"":"flex"}},[a("el-col",{attrs:{xs:24,sm:24,md:24,lg:6,xl:6}},[a("el-form-item",{attrs:{label:"标签"}},[a("el-select",{attrs:{size:"small",filterable:"",clearable:"",placeholder:"请选择关键字"},on:{change:t.handleFilter,focus:function(e){t.fetchStatisticsData("tag")}},model:{value:t.filters.tag,callback:function(e){t.$set(t.filters,"tag",e)},expression:"filters.tag"}},t._l(t.statistics.tag,function(e){return a("el-option",{key:e._id,attrs:{value:e._id}},[t._v("\n "+t._s(e._id)+" "),a("span",{staticClass:"tag-count"},[t._v(t._s(e.value))])])}))],1)],1),a("el-col",{attrs:{xs:24,sm:24,md:24,lg:6,xl:6}},[a("el-form-item",{attrs:{label:"语言"}},[a("el-select",{attrs:{size:"small",filterable:"",clearable:"",placeholder:"请选择语言"},on:{change:t.handleFilter,focus:function(e){t.fetchStatisticsData("language")}},model:{value:t.filters.language,callback:function(e){t.$set(t.filters,"language",e)},expression:"filters.language"}},t._l(t.statistics.language,function(e){return a("el-option",{key:e._id,attrs:{value:e._id}},[t._v("\n "+t._s(e._id)+" "),a("span",{staticClass:"tag-count"},[t._v(t._s(e.value))])])}))],1)],1),a("el-col",{attrs:{xs:24,sm:24,md:24,lg:8,xl:8}},[a("el-form-item",{attrs:{label:"状态"}},[a("el-radio-group",{attrs:{size:"mini",fill:"#DDDDDD"},on:{change:t.handleFilter},model:{value:t.filters.status,callback:function(e){t.$set(t.filters,"status",e)},expression:"filters.status"}},[a("el-radio-button",{attrs:{label:{}}},[a("i",{staticClass:"iconfont icon-search"}),t._v("不限\n ")]),a("el-radio-button",{attrs:{label:{security:0,desc:{$exists:!1}}}},[a("i",{staticClass:"iconfont icon-feedback_fill"}),t._v("待审\n ")]),a("el-radio-button",{attrs:{label:{security:0,desc:{$exists:!0}}}},[a("i",{staticClass:"iconfont icon-flag_fill"}),t._v("确认\n ")]),a("el-radio-button",{attrs:{label:{security:1}}},[a("i",{staticClass:"iconfont icon-success_fill"}),t._v("误报\n ")])],1)],1)],1)],1)],1),a("ResultsTable",{attrs:{results:t.leakagesData},on:{change:t.handleChange}}),t.leakagesData?a("div",{staticClass:"page"},[a("el-pagination",{attrs:{"current-page":t.from,"page-sizes":[10,20,50,100],"page-size":t.limit,layout:"total,prev, pager, next, sizes, jumper",total:t.total},on:{"size-change":t.handleSizeChange,"current-change":t.handleCurrentChange}})],1):t._e()],1)],1)},i=[],n=(a("5a09"),a("3a0f"),a("a3a3"),a("4d0b"),function(){return a.e("chunk-597c8c4b").then(a.bind(null,"fb05"))}),l=function(){return a.e("chunk-a8d299a6").then(a.bind(null,"4ea0"))},r={data:function(){return{statistics:{tag:[],language:[]},filters:{status:{security:0,desc:{$exists:!1}},tag:this.$route.params.tag||""},trendData:{},leakagesData:[],total:10,limit:10,from:1}},methods:{handleFilter:function(){this.$router.push({name:"tag",params:{tag:this.filters.tag}}),this.from=1,this.fetchLeakagesData(),this.fetchTrend()},fetchStatisticsData:function(t){var e=this;this.axios.get(this.api.statistic,{params:{by:t,tag:this.filters.tag}}).then(function(a){e.statistics[t]=a.data.result}).catch(function(t){e.$message.error(t.toString())})},handleSizeChange:function(t){this.limit=t,this.from=1,this.fetchLeakagesData()},handleCurrentChange:function(t){this.from=t,this.fetchLeakagesData()},handleTagSelected:function(){this.fetchLeakagesData(),this.fetchTrend()},handleChange:function(){this.fetchTrend(),this.fetchLeakagesData()},fetchLeakagesData:function(){var t=this;this.axios.get(this.api.leakage,{params:{status:this.filters.status,tag:this.filters.tag,language:this.filters.language,limit:this.limit,from:this.from}}).then(function(e){t.leakagesData=e.data.result,t.total=e.data.total}).catch(function(e){t.$message.error(e.toString())})},fetchTrend:function(){var t=this;this.axios.get(this.api.trend,{params:{tag:this.filters.tag}}).then(function(e){t.trendData=e.data.result}).catch(function(e){t.$message.error(e.toString())})}},components:{Dashboard:n,ResultsTable:l},computed:{mobileClient:function(){return document.documentElement.clientWidth - +
- + 忽略 @@ -152,12 +152,14 @@ const form = {security: 1, ignore: 1, desc: "", id: id}; this.axios .patch(this.api.leakage, form) - .then() + .then(response => { + this.$emit('change') + }) .catch(error => { this.$message.error(error.toString()); }); }, - handleDelete(leakages) { + handleIgnore(leakages) { this.$confirm("此操作将忽略结果, 是否继续?", "提示", { confirmButtonText: "确定", cancelButtonText: "取消", @@ -183,6 +185,10 @@ };