Skip to content

Commit

Permalink
chore(h5test): support allGroup api for openapi
Browse files Browse the repository at this point in the history
  • Loading branch information
huangyoukun committed Jun 5, 2018
1 parent f1825f8 commit 62d56b1
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 62d56b1

Please sign in to comment.