Skip to content

Commit

Permalink
sonar release
Browse files Browse the repository at this point in the history
  • Loading branch information
fudax committed Jan 14, 2020
1 parent ec80c65 commit 2489ebd
Show file tree
Hide file tree
Showing 20 changed files with 92 additions and 116 deletions.
23 changes: 23 additions & 0 deletions src/assets/icon/demo_index.html
Original file line number Diff line number Diff line change
Expand Up @@ -414,6 +414,12 @@ <h1 class="logo"><a href="https://www.iconfont.cn/" title="iconfont 首页" targ
<div class="code-name">&amp;#xe601;</div>
</li>

<li class="dib">
<span class="icon iconfont">&#xe668;</span>
<div class="name">radar</div>
<div class="code-name">&amp;#xe668;</div>
</li>

</ul>
<div class="article markdown">
<h2 id="unicode-">Unicode 引用</h2>
Expand Down Expand Up @@ -1040,6 +1046,15 @@ <h3 id="-">第三步:挑选相应图标并获取字体编码,应用于页面
</div>
</li>

<li class="dib">
<span class="icon iconfont icon-radar"></span>
<div class="name">
radar
</div>
<div class="code-name">.icon-radar
</div>
</li>

</ul>
<div class="article markdown">
<h2 id="font-class-">font-class 引用</h2>
Expand Down Expand Up @@ -1581,6 +1596,14 @@ <h3 id="-">第二步:挑选相应图标并获取类名,应用于页面:</h
<div class="code-name">#icon-icon-product</div>
</li>

<li class="dib">
<svg class="icon svg-icon" aria-hidden="true">
<use xlink:href="#icon-radar"></use>
</svg>
<div class="name">radar</div>
<div class="code-name">#icon-radar</div>
</li>

</ul>
<div class="article markdown">
<h2 id="symbol-">Symbol 引用</h2>
Expand Down
16 changes: 10 additions & 6 deletions src/assets/icon/iconfont.css

Large diffs are not rendered by default.

Binary file modified src/assets/icon/iconfont.eot
Binary file not shown.
2 changes: 1 addition & 1 deletion src/assets/icon/iconfont.js

Large diffs are not rendered by default.

7 changes: 7 additions & 0 deletions src/assets/icon/iconfont.json
Original file line number Diff line number Diff line change
Expand Up @@ -452,6 +452,13 @@
"font_class": "icon-product",
"unicode": "e601",
"unicode_decimal": 58881
},
{
"icon_id": "5924896",
"name": "radar",
"font_class": "radar",
"unicode": "e668",
"unicode_decimal": 58984
}
]
}
3 changes: 3 additions & 0 deletions src/assets/icon/iconfont.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/assets/icon/iconfont.ttf
Binary file not shown.
Binary file modified src/assets/icon/iconfont.woff
Binary file not shown.
Binary file modified src/assets/icon/iconfont.woff2
Binary file not shown.
1 change: 0 additions & 1 deletion src/components/sep/opr/Problem.vue
Original file line number Diff line number Diff line change
Expand Up @@ -1665,7 +1665,6 @@ export default {
improveOne: _self.currentProblem.improveOne,
improveTwo: _self.currentProblem.improveTwo.selected,
improvePlanTo: _self.currentProblem.improvePlanTo,
improveDetail: _self.currentProblem.detail,
improveDetail: _self.currentProblem.improveDetail,
detail: _self.currentProblem.detail
})
Expand Down
69 changes: 20 additions & 49 deletions src/components/sep/opr/Sonar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@
</el-breadcrumb>
</div>

<el-card class="box-card" shadow="hover">
<el-card shadow="hover">
<div class="sonar-form" id="sonarList">
<el-form v-model="qform" :inline="true" size="small" label-width="100px">
<el-form-item label="实例项目名称" prop="projectKey">
<el-input v-model="qform.projectKey" placeholder="请输入" clearable></el-input>
</el-form-item>
<el-form-item style="float:right">
<el-button v-no-more-click type="primary" icon="el-icon-search" @click="querySonarHistories()">查询</el-button>
<el-button v-no-more-click type="primary" icon="el-icon-data-analysis" @click="dialogSonarVisible = true">立即扫描
<el-button v-no-more-click size="mini" type="primary" icon="el-icon-search" @click="querySonarHistories()">查询</el-button>
<el-button v-no-more-click size="mini" type="primary" icon="iconfont icon-radar" @click="dialogSonarVisible = true">立即扫描
</el-button>
</el-form-item>
</el-form>
Expand All @@ -26,7 +26,7 @@
:data="sonarScanResults"
empty-text="暂无扫描记录"
:max-height="tableHeight"
size="medium"
size="small"
stripe
:border="showBorder"
v-loading="queryLoading"
Expand All @@ -37,43 +37,34 @@
</el-table-column>
<el-table-column prop="gitBranch" label="分支版本" align="center">
</el-table-column>
<el-table-column prop="submitter" label="触发人" width="80" align="center">
<el-table-column prop="submitter" label="触发人" width="90" align="center">
</el-table-column>
<el-table-column prop="startTime" label="提交时间" width="150" align="center">
<el-table-column prop="startTime" label="提交时间" width="140" align="center">
</el-table-column>
<el-table-column prop="analysisStatus" label="扫描结果" width="80" align="center">
<el-table-column prop="analysisStatus" label="扫描结果" width="90" align="center">
<template slot-scope="scope">
<span class="red" v-if="scope.row.analysisStatus==='ERROR'"><b> {{"未通过"}} </b></span>
<span class="green" v-else-if="scope.row.analysisStatus==='OK'"><b> {{"通过"}} </b></span>
<span class="wait" v-else><b> {{"暂无数据"}} </b></span>
<el-tag type="danger" size="small" effect="dark" v-if="scope.row.analysisStatus==='ERROR'">质量欠佳</el-tag>
<el-tag type="success" size="small" effect="dark" v-else-if="scope.row.analysisStatus==='OK'">质量良好</el-tag>
<el-tag type="info" size="small" effect="dark" v-else>暂无数据</el-tag>
</template>
</el-table-column>
<el-table-column prop="ncloc" label="代码行数" width="100" align="center">
<el-table-column prop="ncloc" label="代码行数" width="80" align="center">
</el-table-column>
<el-table-column prop="coverage" label="单元测试覆盖率" width="110" align="center">
<template slot-scope="scope">
<span class="red" v-if="scope.row.coverage===0"><b> {{0}} </b></span>
<span v-else-if="scope.row.coverage===null"><b> {{""}} </b></span>
<span class="wait" v-else><b> {{scope.row.coverage+"%"}} </b></span>
</template>
<el-table-column prop="coverage" label="单测覆盖率" width="90" align="center">
</el-table-column>
<el-table-column prop="duplicatedLinesDensity" label="重复比例" width="100" align="center">
<template slot-scope="scope">
<span v-if="scope.row.duplicatedLinesDensity===null"><b> {{""}} </b></span>
<span class="green" v-else-if="scope.row.duplicatedLinesDensity<25"><b> {{scope.row.duplicatedLinesDensity+"%"}} </b></span>
<span class="common" v-else-if="scope.row.duplicatedLinesDensity>=25 && scope.row.duplicatedLinesDensity<=40"><b> {{scope.row.duplicatedLinesDensity+"%"}} </b></span>
<span class="red" v-else-if="scope.row.duplicatedLinesDensity>=40"><b> {{scope.row.duplicatedLinesDensity+"%"}} </b></span>
</template>
<el-table-column prop="duplicatedLinesDensity" label="重复比例" width="80" align="center">
</el-table-column>
<el-table-column prop="codeSmells" label="潜在问题" width="100" align="center">
<el-table-column prop="codeSmells" label="坏味道" width="80" align="center">
</el-table-column>
<el-table-column prop="bugs" label="缺陷数(bug)" width="100" align="center">
<el-table-column prop="bugs" label="缺陷数" width="80" align="center">
</el-table-column>
<el-table-column prop="vulnerabilities" label="安全威胁" width="100" align="center">
<el-table-column prop="vulnerabilities" label="安全漏洞" width="80" align="center">
</el-table-column>
<el-table-column prop="sqaleIndex" label="技术债(小时)" width="110px" align="center">
<el-table-column prop="hotspots" label="命中热点" width="80" align="center">
</el-table-column>
<el-table-column label="详情" width="80px" align="center">
<el-table-column prop="sqaleIndex" label="技术债(小时)" width="100" align="center">
</el-table-column>
<el-table-column label="详情" width="80" align="center">
<template slot-scope="scope">
<el-button v-no-more-click type="text" @click="viewDetail(scope.row)">查看详情</el-button>
</template>
Expand Down Expand Up @@ -257,24 +248,4 @@ export default {
.demo-form-inline {
padding: 10px 30px 10px 10px;
}
.box-card {
width: 100%;
}
.red {
color: #a70f27;
}
.green {
color: #4ca720;
}
.wait {
color: #1671a7;
}
.common {
color: #3799a7;
}
</style>
71 changes: 21 additions & 50 deletions src/components/sep/opr/SonarScan.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<el-breadcrumb-item>代码扫描</el-breadcrumb-item>
</el-breadcrumb>
</div>
<el-card class="box-card" shadow="hover">
<el-card shadow="hover">
<div slot="header" class="clearfix">
<span style="font-size: 15px">代码扫描</span>
<el-button v-no-more-click style="float:right; padding:3px 0;margin-left:12px" type="text" icon="el-icon-right" @click="releaseQuery(),dialogSonarVisible = true">立即扫描
Expand All @@ -21,48 +21,39 @@
<div v-if="sonarScanResults.length > 0">
<el-collapse v-model="activeNames" v-for="sonarScanResult in sonarScanResults" :key="sonarScanResult.id">
<el-collapse-item :title="'Sonar扫描版本: '+sonarScanResult.projectVersion" :name="sonarScanResult.projectVersion">
<el-table :data="sonarScanResult.sonarScanHistorys" empty-text="暂无扫描记录">
<el-table-column prop="projectKey" label="实例项目名称" width="180" align="center">
<el-table :data="sonarScanResult.sonarScanHistorys" size="small" empty-text="暂无扫描记录" :highlight-current-row="false">
<el-table-column prop="projectKey" label="实例项目名称" align="center">
</el-table-column>
<el-table-column prop="gitBranch" label="分支版本" width="80" align="center">
<el-table-column prop="gitBranch" label="分支版本" align="center">
</el-table-column>
<el-table-column prop="submitter" label="触发人" width="80" align="center">
<el-table-column prop="submitter" label="触发人" width="90" align="center">
</el-table-column>
<el-table-column prop="startTime" label="提交时间" width="150" align="center">
<el-table-column prop="startTime" label="提交时间" width="140" align="center">
</el-table-column>
<el-table-column prop="analysisStatus" label="扫描结果" min-width="8%" align="center">
<el-table-column prop="analysisStatus" label="扫描结果" width="90" align="center">
<template slot-scope="scope">
<span class="red" v-if="scope.row.analysisStatus==='ERROR'"><b> {{"未通过"}} </b></span>
<span class="green" v-else-if="scope.row.analysisStatus==='OK'"><b> {{"通过"}} </b></span>
<span class="wait" v-else><b> {{"暂无数据"}} </b></span>
<el-tag type="danger" size="small" effect="dark" v-if="scope.row.analysisStatus==='ERROR'">质量欠佳</el-tag>
<el-tag type="success" size="small" effect="dark" v-else-if="scope.row.analysisStatus==='OK'">质量良好</el-tag>
<el-tag type="info" size="small" effect="dark" v-else>暂无数据</el-tag>
</template>
</el-table-column>
<el-table-column prop="ncloc" label="代码行数" min-width="8%" align="center">
<el-table-column prop="ncloc" label="代码行数" width="80" align="center">
</el-table-column>
<el-table-column prop="coverage" label="单元测试覆盖率" width="110" align="center">
<template slot-scope="scope">
<span class="red" v-if="scope.row.coverage===0"><b> {{0}} </b></span>
<span v-else-if="scope.row.coverage===null"><b> {{""}} </b></span>
<span class="wait" v-else><b> {{scope.row.coverage+"%"}} </b></span>
</template>
<el-table-column prop="coverage" label="单测覆盖率" width="90" align="center">
</el-table-column>
<el-table-column prop="duplicatedLinesDensity" label="重复比例" min-width="8%" align="center">
<template slot-scope="scope">
<span v-if="scope.row.duplicatedLinesDensity===null"><b> {{""}} </b></span>
<span class="green" v-else-if="scope.row.duplicatedLinesDensity<25"><b> {{scope.row.duplicatedLinesDensity+"%"}} </b></span>
<span class="common" v-else-if="scope.row.duplicatedLinesDensity>=25 && scope.row.duplicatedLinesDensity<=40"><b> {{scope.row.duplicatedLinesDensity+"%"}} </b></span>
<span class="red" v-else-if="scope.row.duplicatedLinesDensity>=40"><b> {{scope.row.duplicatedLinesDensity+"%"}} </b></span>
</template>
<el-table-column prop="duplicatedLinesDensity" label="重复比例" width="80" align="center">
</el-table-column>
<el-table-column prop="codeSmells" label="潜在问题" min-width="8%" align="center">
<el-table-column prop="codeSmells" label="坏味道" width="80" align="center">
</el-table-column>
<el-table-column prop="bugs" label="缺陷数(bug)" min-width="8%" align="center">
<el-table-column prop="bugs" label="缺陷数" width="80" align="center">
</el-table-column>
<el-table-column prop="vulnerabilities" label="安全威胁" min-width="8%" align="center">
<el-table-column prop="vulnerabilities" label="安全漏洞" width="80" align="center">
</el-table-column>
<el-table-column prop="sqaleIndex" label="技术债(小时)" min-width="8%" align="center">
<el-table-column prop="hotspots" label="命中热点" width="80" align="center">
</el-table-column>
<el-table-column label="详情" min-width="8%" align="center">
<el-table-column prop="sqaleIndex" label="技术债(小时)" width="100" align="center">
</el-table-column>
<el-table-column label="详情" width="80" align="center">
<template slot-scope="scope">
<el-button v-no-more-click type="text" @click="viewDetail(scope.row)">查看详情</el-button>
</template>
Expand Down Expand Up @@ -164,7 +155,7 @@ export default {
return;
}
this.querySonarHistories(this);
}, 1000)
}, 5000)
},
methods: {
Expand Down Expand Up @@ -265,24 +256,4 @@ export default {
.demo-form-inline {
padding: 10px 30px 10px 10px;
}
.box-card {
width: 100%;
}
.red {
color: #a70f27;
}
.green {
color: #4ca720;
}
.wait {
color: #1671a7;
}
.common {
color: #3799a7;
}
</style>
2 changes: 0 additions & 2 deletions src/components/sep/test/report/ReleaseReport.vue
Original file line number Diff line number Diff line change
Expand Up @@ -679,10 +679,8 @@ export default {
type: "warning"
})
.then(() => {
alert("哈?你觉得我会在一个Demo上实现这个?-_#!");
})
.catch(() => {
alert("对自己的测试没自信了吧?怂了吧?哈哈! -_#!");
});
},
Expand Down
2 changes: 1 addition & 1 deletion src/components/util/minder/script/protocol/freemind.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
link.click();
document.body.removeChild(link);
} catch (err) {
alert(err);
console.log(err);
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/components/util/minder/script/protocol/json.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ function exportJson(minder) {
link.click();
document.body.removeChild(link);
} catch (err) {
alert(err);
console.log(err);
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/components/util/minder/script/protocol/markdown.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ function exportMarkdown(minder) {
link.click();
document.body.removeChild(link);
} catch (err) {
alert(err);
console.log(err);
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/components/util/minder/script/protocol/plain.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
link.click();
document.body.removeChild(link);
} catch (err) {
alert(err);
console.log(err);
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/components/util/minder/script/protocol/png.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ function downloadImage(fileURI, fileName) {
link.click();
document.body.removeChild(link);
} catch (err) {
alert(err);
console.log(err);
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/components/util/minder/script/protocol/svg.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ function downloadSVG(fileURI, fileName) {
link.click();
document.body.removeChild(link);
} catch (err) {
alert(err);
console.log(err);
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/util/TableExport.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,6 @@ export default function ExportCsv(data, columns, fileName) {
link.click();
document.body.removeChild(link); // Required for FF
} catch (err) {
alert(err);
console.log(err);
}
}

0 comments on commit 2489ebd

Please sign in to comment.