hklhai / dashboard

dashboard
0 stars 0 forks source link

文本类、数值类视图 #35

Closed hklhai closed 5 years ago

hklhai commented 5 years ago

文本类新建

POST http://127.0.0.1:8090/show/visualizeAdd { "visualize": { "type": "text", "visualizename": "文本测试", "vwheredesc": "文本显示内容", "prefixwhere": "prefix", "suffixwhere": "suffix" } }

数据结构

POST http://localhost:8090/show/visualizeData { "integerId": 114 }

return: { "vid": 114, "x": null, "y": null, "h": null, "w": null, "did": null, "visualizename": "文本测试", "xname": null, "yname": null, "showKey": null, "showValue": null, "showLabel": null, "columnList": null, "orientYList": null, "orientXList": null, "type": "text", "echarttitle": null, "legendShow": null, "legendPos": null, "legendOrient": null, "tooltipShow": null, "background": null, "echartTitPos": null, "echartTitColor": null, "xName": null, "xAxisLabel": null, "xAxisLine": null, "xSplitLine": null, "xInverse": null, "alignWithLabel": null, "xToy": null, "dataZoom": null, "yAxisLabel": null, "yAxisLine": null, "ySplitLine": null, "yInverse": null, "max": null, "min": null, "outOfRangeColor": null, "controllerColor": null, "subTit": null, "ylineColor": null, "ynameColor": null, "yaxisLabelPos": null, "xlineColor": null, "xnameColor": null, "xaxisLabelPos": null, "xstart": null, "xend": null, "ystart": null, "yend": null, "legendType": null, "legendSelData": null, "xBoundaryGap": null, "vwheredesc": "文本显示内容", "prefixwhere": "prefix", "suffixwhere": "suffix", "countValue": null }

hklhai commented 5 years ago

检验数值-语句是否合法

POST http://127.0.0.1:8090/show/sqlCountValid { "vid": 115, "vwhere": "select count(1) from emp", "dbid": 2 }

Return: { "code": 0, "message": "SQL语句合法!", "modelList": null }

POST http://127.0.0.1:8090/show/sqlCountValid { "vid": 115, "vwhere": "select count(1) from emp111", "dbid": 2 }

Return: { "code": 0, "message": "SQL语句不合法!", "modelList": null }

hklhai commented 5 years ago

添加数值类

POST http://127.0.0.1:8090/show/visualizeAdd { "visualize": { "type": "number", "visualizename": "数值测试", "dbid": 2, "vwhere": "select count(1) from emp", "vwheredesc": "数值显示内容", "prefixwhere": "prefix", "suffixwhere": "suffix" } }

数据接口

POST http://localhost:8090/show/visualizeData { "integerId": 115 }

Return: { "vid": 115, "x": null, "y": null, "h": null, "w": null, "did": null, "visualizename": "数值测试", "xname": null, "yname": null, "showKey": null, "showValue": null, "showLabel": null, "columnList": null, "orientYList": null, "orientXList": null, "type": "number", "echarttitle": null, "legendShow": null, "legendPos": null, "legendOrient": null, "tooltipShow": null, "background": null, "echartTitPos": null, "echartTitColor": null, "xName": null, "xAxisLabel": null, "xAxisLine": null, "xSplitLine": null, "xInverse": null, "alignWithLabel": null, "xToy": null, "dataZoom": null, "yAxisLabel": null, "yAxisLine": null, "ySplitLine": null, "yInverse": null, "max": null, "min": null, "outOfRangeColor": null, "controllerColor": null, "subTit": null, "ylineColor": null, "ynameColor": null, "yaxisLabelPos": null, "xlineColor": null, "xnameColor": null, "xaxisLabelPos": null, "xstart": null, "xend": null, "ystart": null, "yend": null, "legendType": null, "legendSelData": null, "xBoundaryGap": null, "vwheredesc": "数值显示内容", "prefixwhere": "prefix", "suffixwhere": "suffix", "countValue": 14 }

aym19900825 commented 5 years ago

@hklhai 1、sql验证接口需提供参数vid,即新增完成后验证sql语法的合法性,验证完了我应该调哪个接口去运行这个sql,视图的save接口? 2、‘/show/visualizeData‘数据接口无数据返回,虽然显示200,但是无数据