Merge branch 'dev' of gitlab.corp.qunar.com:mfe/yapi into dev

This commit is contained in:
suxiaoxin 2017-10-16 16:58:43 +08:00
commit cd748b6f42
4 changed files with 7 additions and 7 deletions

View File

@ -105,7 +105,7 @@ class groupController extends baseController {
result = yapi.commons.fieldSelect(result, ['_id', 'group_name', 'group_desc', 'uid', 'members','type']);
let username = this.getUsername();
yapi.commons.saveLog({
content: `<a href="/user/profile/${this.getUid()}">${username}</a> 新增了分组 "${params.group_name}"`,
content: `<a href="/user/profile/${this.getUid()}">${username}</a> 新增了分组 <a href="/group/${result._id}">${params.group_name}</a>`,
type: 'group',
uid: this.getUid(),
username: username,

View File

@ -485,7 +485,7 @@ class interfaceController extends baseController {
if (data.catid) {
this.catModel.get(+data.catid).then((cate) => {
yapi.commons.saveLog({
content: `<a href="/user/profile/${this.getUid()}">${username}</a> 更新了分类 <a href="/project/${cate.project_id}/interface/api/cat_${data.catid}">${cate.name}</a> 下的接口 <a href="project/${cate.project_id}/interface/api/${id}">${interfaceData.title}</a>`,
content: `<a href="/user/profile/${this.getUid()}">${username}</a> 更新了分类 <a href="/project/${cate.project_id}/interface/api/cat_${data.catid}">${cate.name}</a> 下的接口 <a href="/project/${cate.project_id}/interface/api/${id}">${interfaceData.title}</a>`,
type: 'project',
uid: this.getUid(),
username: username,
@ -497,7 +497,7 @@ class interfaceController extends baseController {
let cateid = interfaceData.catid;
this.catModel.get(cateid).then((cate) => {
yapi.commons.saveLog({
content: `<a href="/user/profile/${this.getUid()}">${username}</a> 更新了分类 <a href="/project/${cate.project_id}/interface/api/cat_${cateid}">${cate.name}</a> 下的接口 <a href="project/${cate.project_id}/interface/api/${id}>${interfaceData.title}</a>`,
content: `<a href="/user/profile/${this.getUid()}">${username}</a> 更新了分类 <a href="/project/${cate.project_id}/interface/api/cat_${cateid}">${cate.name}</a> 下的接口 <a href="/project/${cate.project_id}/interface/api/${id}>${interfaceData.title}</a>`,
type: 'project',
uid: this.getUid(),
username: username,
@ -701,7 +701,7 @@ class interfaceController extends baseController {
let username = this.getUsername();
yapi.commons.saveLog({
content: `<a href="/user/profile/${this.getUid()}">${username}</a> 删除了分类 <a href="/project/${catData.project_id}/interface/api/cat_${id}">${catData.name}</a> 及该分类下的接口`,
content: `<a href="/user/profile/${this.getUid()}">${username}</a> 删除了分类 "${catData.name}" 及该分类下的接口`,
type: 'project',
uid: this.getUid(),
username: username,

View File

@ -527,7 +527,7 @@ class interfaceColController extends baseController{
await this.caseModel.delByCol(id);
let username = this.getUsername();
yapi.commons.saveLog({
content: `<a href="/user/profile/${this.getUid()}">${username}</a> 删除了接口集 <a href="/project/${colData.project_id}/interface/col/${id}">${colData.name}</a> 及其下面的接口`,
content: `<a href="/user/profile/${this.getUid()}">${username}</a> 删除了接口集 ${colData.name} 及其下面的接口`,
type: 'project',
uid: this.getUid(),
username: username,
@ -564,7 +564,7 @@ class interfaceColController extends baseController{
let username = this.getUsername();
this.colModel.get(caseData.col_id).then((col)=>{
yapi.commons.saveLog({
content: `<a href="/user/profile/${this.getUid()}">${username}</a> 删除了接口集 <a href="/project/${caseData.project_id}/interface/col/${caseData.col_id}">${col.name}</a> 下的接口 <a href="/project/${caseData.project_id}/interface/case/${caseid}">${caseData.casename}</a>`,
content: `<a href="/user/profile/${this.getUid()}">${username}</a> 删除了接口集 <a href="/project/${caseData.project_id}/interface/col/${caseData.col_id}">${col.name}</a> 下的接口 ${caseData.casename}`,
type: 'project',
uid: this.getUid(),
username: username,

View File

@ -48,7 +48,7 @@ class logController extends baseController {
projectLogList.forEach((item, index)=>{
item = item.toObject();
if(item.type === 'project'){
item.content = `在 <a href="/group/${item.typeid}">${projectDatas[item.typeid].name}</a> 项目: ` + item.content;
item.content = `在 <a href="/project/${item.typeid}">${projectDatas[item.typeid].name}</a> 项目: ` + item.content;
}
projectLogList[index] = item;
})