Skip to content

Commit

Permalink
Merge pull request #100 from huangyoukun/master
Browse files Browse the repository at this point in the history
 chore(h5test): support allGroup api for openapi
  • Loading branch information
RobinzZH authored Jun 5, 2018
2 parents dd31d7f + f79edb7 commit 756012e
Showing 1 changed file with 14 additions and 4 deletions.
18 changes: 14 additions & 4 deletions bin/tsw/util/auto-report/TEReport.js
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,10 @@ this.list = function(group) {
const map = {};

arr.forEach(function(v) {
if (group && v.group !== group) {
return;
}

if (!map[v.ip]) {
map[v.ip] = true;
res.push(v);
Expand All @@ -134,9 +138,7 @@ this.list = function(group) {
order: -65536,
// owner: "TSW",
groupName: group,
ip: 'alpha',
moduleId: 0,
moduleName: 'null'
ip: 'alpha'
});

res.sort(function(a, b) {
Expand All @@ -153,8 +155,16 @@ this.list = function(group) {
this.getAllGroup = function() {

const defer = Deferred.create();
let getLogJsonDefer;

// 开平对应的存储
if (context.appid && context.appkey) {
getLogJsonDefer = postOpenapi.getLogJson(`${context.appid}/tsw/h5test`);
} else {
getLogJsonDefer = post.getLogJson('group.h5test');
}

post.getLogJson('group.h5test').done(function(arr) {
getLogJsonDefer.done(function(arr) {

const res = [];
const map = {};
Expand Down

0 comments on commit 756012e

Please sign in to comment.