mirror of
https://gitee.com/fit2cloud-feizhiyun/MeterSphere.git
synced 2024-12-04 21:19:52 +08:00
fix(操作日志): 修复性能测试报告日志问题
This commit is contained in:
parent
3992b12f70
commit
3f20f5e834
@ -55,9 +55,7 @@ public class ReflexObjectUtil {
|
||||
column.setDepthDff(true);
|
||||
if (val != null) {
|
||||
try {
|
||||
if (f.getName().equals("loadConfiguration")) {
|
||||
val = "{\"" + "压力配置" + "\":" + val.toString() + "}";
|
||||
}
|
||||
// 格式化
|
||||
Gson gson = new GsonBuilder().setPrettyPrinting().create();
|
||||
JsonObject jsonObject = gson.fromJson(val.toString(), JsonObject.class);
|
||||
column.setOriginalValue(gson.toJson(jsonObject));
|
||||
@ -115,6 +113,9 @@ public class ReflexObjectUtil {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
if (StringUtils.isEmpty(JSON.toJSONString(originalColumns.get(i).getOriginalValue())) && StringUtils.isEmpty(JSON.toJSONString(newColumns.get(i).getOriginalValue()))) {
|
||||
continue;
|
||||
}
|
||||
// 深度对比
|
||||
DetailColumn column = new DetailColumn();
|
||||
BeanUtils.copyBean(column, originalColumns.get(i));
|
||||
|
@ -619,6 +619,11 @@ public class PerformanceTestService {
|
||||
public String getLogDetails(String id) {
|
||||
LoadTestWithBLOBs loadTest = loadTestMapper.selectByPrimaryKey(id);
|
||||
if (loadTest != null) {
|
||||
String loadConfiguration = loadTest.getLoadConfiguration();
|
||||
if (StringUtils.isNotEmpty(loadConfiguration)) {
|
||||
loadConfiguration = "{\"" + "压力配置" + "\":" + loadConfiguration + "}";
|
||||
}
|
||||
loadTest.setLoadConfiguration(loadConfiguration);
|
||||
List<DetailColumn> columns = ReflexObjectUtil.getColumns(loadTest, PerformanceReference.performanceColumns);
|
||||
OperatingLogDetails details = new OperatingLogDetails(JSON.toJSONString(loadTest.getId()), loadTest.getProjectId(), loadTest.getName(), loadTest.getCreateUser(), columns);
|
||||
return JSON.toJSONString(details);
|
||||
|
@ -7,10 +7,11 @@
|
||||
<el-checkbox v-model="isSelectAll" v-if="isShowEnable === true && items.length > 1"/>
|
||||
</el-row>
|
||||
<div class="kv-row item" v-for="(item, index) in items" :key="index">
|
||||
|
||||
<el-row type="flex" :gutter="20" justify="space-between" align="middle">
|
||||
<el-col class="kv-checkbox" v-if="isShowEnable">
|
||||
<el-checkbox v-if="!isDisable(index)" v-model="item.enable"
|
||||
:disabled="isReadOnly"/>
|
||||
:disabled="isReadOnly"/>
|
||||
</el-col>
|
||||
<span style="margin-left: 10px" v-else></span>
|
||||
|
||||
@ -42,7 +43,7 @@
|
||||
:fetch-suggestions="funcSearch"
|
||||
highlight-first-item
|
||||
show-word-limit>
|
||||
<i slot="suffix" class="el-input__icon el-icon-edit pointer" @click="advanced"></i>
|
||||
<i slot="suffix" class="el-input__icon el-icon-edit pointer" @click="advanced(item)"></i>
|
||||
</el-autocomplete>
|
||||
</div>
|
||||
</el-col>
|
||||
@ -52,7 +53,8 @@
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
<ms-api-variable-advance ref="variableAdvance"/>
|
||||
<ms-api-variable-advance :current-item="currentItem" :parameters="keyValues" ref="variableAdvance"/>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -88,6 +90,7 @@
|
||||
return {
|
||||
keyValues: [],
|
||||
loading: false,
|
||||
currentItem: {},
|
||||
isSelectAll: true
|
||||
}
|
||||
},
|
||||
@ -100,16 +103,17 @@
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
isSelectAll: function(to, from) {
|
||||
if(from == false && to == true) {
|
||||
isSelectAll: function (to, from) {
|
||||
if (from == false && to == true) {
|
||||
this.selectAll();
|
||||
} else if(from == true && to == false) {
|
||||
} else if (from == true && to == false) {
|
||||
this.invertSelect();
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
advanced() {
|
||||
advanced(item) {
|
||||
this.currentItem = item;
|
||||
this.$refs.variableAdvance.open();
|
||||
},
|
||||
funcFilter(queryString) {
|
||||
|
@ -355,9 +355,14 @@ export default {
|
||||
confirmButtonText: this.$t('commons.confirm'),
|
||||
callback: (action) => {
|
||||
if (action === 'confirm') {
|
||||
let ids = [];
|
||||
this.selectRows.forEach(row => {
|
||||
this._handleDeleteNoMsg(row);
|
||||
ids.push(row.id);
|
||||
});
|
||||
this.result = this.$post("/performance/report/batch/delete",{ids:ids}, () => {
|
||||
this.initTableData();
|
||||
});
|
||||
|
||||
this.$success(this.$t('commons.delete_success'));
|
||||
}
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user