diff --git a/root/api/meta.js b/root/api/meta.js
index 424727b..eaa689a 100644
--- a/root/api/meta.js
+++ b/root/api/meta.js
@@ -45,39 +45,54 @@ const meta = {
getPlats: (callback) => {
red.getJSON("/meta/plat_list", {}, json => callback(json));
},
- getTableList: (callback) => {
- red.getJSON("/meta/tablelist",{}, function (json) {
- callback(json);
- });
+ getTableList(callback) {
+ red.getJSON("/meta/tablelist",{}, json => callback(json));
},
- getTableDetail: ({name}, callback) => {
- red.getJSON("/meta/tableinfo",{name}, function (json) {
- callback(json);
- });
+ getTableDetail({name}, callback) {
+ red.getJSON("/meta/tableinfo",{name}, json => callback(json));
},
- getServiceList: (callback) => {
- red.getJSON("/meta/service_list",{}, function (json) {
+ getServiceList(callback) {
+ red.getJSON("/meta/service_list",{}, json => {
json = red.replacePoint(json);
callback(json);
});
},
- getServiceInfo: ({name}, callback) => {
+ getServiceInfo({name}, callback) {
red.getJSON("/meta/service_info",{name}, res => {
- let row = red.replacePoint(res);
+ /*let row = red.replacePoint(res)
+ console.log(row)
+
+ //let [name, comment, table, edits, imports, shows, exports, filters] = red.replacePoint(res);
+
+
row.shows = row.shows || [];
row.exports = row.exports || [];
row.imports = row.imports || [];
- row.filters = row.filters || [];
+ row.filters = row.filters || [];*/
- callback(row);
+ let {name, comment, table, edits, imports, shows, exports, filters} = red.replacePoint(res)
+
+ callback({name, comment, table, edits, imports, shows, exports, filters});
});
},
- getServiceDetail: ({name}, callback) => {
- red.getJSON("/meta/service_detail",{name}, function (json) {
+ getServiceDetail({name}, callback) {
+ red.getJSON("/meta/service_detail",{name}, json => {
json = red.replacePoint(json)
callback(json);
});
+ },
+ getCfg({name}, callback) {
+ red.getJSON("/meta/cfg",{name}, json => {
+ json = red.replacePoint(json)
+ callback(json);
+ });
+ },
+ getDataList({name, filters, orders, limit}, callback) {
+ let fbean = red.replace$({name, filters, orders, limit})
+ red.getJSON("/data/list",{fBean: JSON.stringify(fbean)}, (json = {rows:[], total:0}) => {
+ callback(json)
+ })
}
}
diff --git a/root/metadata/dataList.html b/root/metadata/dataList.html
index b6ec484..89d2363 100644
--- a/root/metadata/dataList.html
+++ b/root/metadata/dataList.html
@@ -23,7 +23,7 @@
-
+
@@ -32,17 +32,17 @@