This commit is contained in:
2019-04-10 18:08:50 +08:00
parent 9623b70875
commit 6e7388ddf4
9 changed files with 71 additions and 81 deletions

View File

@@ -1,50 +1,5 @@
/*import red from '../res/js/red'*/
/*const getPlats = (callback) => {
red.getJSON("/meta/plat_list", {}, json => callback(json));
}
const getTableList = (callback) => {
red.getJSON("/meta/tablelist",{}, function (json) {
callback(json);
});
}
const getTableDetail = ({name}, callback) => {
red.getJSON("/meta/tableinfo",{name}, function (json) {
callback(json);
});
}
const getServiceList = (callback) => {
red.getJSON("/meta/service_list",{}, function (json) {
json = red.replacePoint(json);
callback(json);
});
}
const getServiceInfo = ({name}, callback) => {
red.getJSON("/meta/service_info",{name}, res => {
let row = red.replacePoint(res);
row.shows = row.shows || [];
row.exports = row.exports || [];
row.imports = row.imports || [];
row.filters = row.filters || [];
callback(row);
});
}
function getServiceDetail({name}, callback) {
red.getJSON("/meta/service_detail",{name}, function (json) {
json = red.replacePoint(json)
callback(json);
});
}*/
const meta = {
/*getPlats: (callback) => {
red.getJSON("/meta/plat_list", {}, json => callback(json));
},*/
getTableList(callback) {
red.getJSON("/meta/tablelist",{}, json => callback(json));
},
@@ -82,10 +37,9 @@ const meta = {
callback(json);
});
},
getCfg({name}, callback) {
red.getJSON("/meta/cfg",{name}, json => {
json = red.replacePoint(json)
callback(json);
getCfg({name}) {
return red.postX("/meta/cfg",{name}, res => {
return red.replacePoint(res)
});
},
getDataList({name, filters, orders, limit}, callback) {
@@ -94,14 +48,4 @@ const meta = {
callback(json)
})
}
}
/*
export {
getTableList,
getPlats,
getServiceDetail,
getServiceInfo,
getServiceList,
getTableDetail
}*/
}