浏览代码

n增加feature列表页

huangsn 5 年之前
父节点
当前提交
07702ef1d4
共有 2 个文件被更改,包括 85 次插入1 次删除
  1. 8 1
      src/conf/config.js
  2. 77 0
      src/pages/fengkong/features/list.js

+ 8 - 1
src/conf/config.js

@@ -5,12 +5,14 @@ let auth = 'https://back-autht.weipaitang.com';
 let hostDev = 'http://back-admint.weipaitang.com';
 let us = 'http://back-apit.weipaitang.com';
 let sTaskJobLog = "http://10.3.7.11:16686"; // 定时任务日志跳转
+let thanos = "http://127.0.0.1:7070";
 
 if (document.domain === 'localhost') {
 
   // dc = 'http://localhost:8000/api'
   // dc = 'http://backend.wpt.local:8087'
   dc = 'http://back-apit.weipaitang.com';
+  thanos = "http://127.0.0.1:7070";
 } else if (document.domain === 'back-admint.wpt.la') {
   dc = 'http://back-apit.weipaitang.com';
   us = 'http://back-apit.weipaitang.com';
@@ -18,6 +20,7 @@ if (document.domain === 'localhost') {
   auth = 'https://back-autht.weipaitang.com';
   hostDev = 'http://back-admint.weipaitang.com';
   sTaskJobLog = "http://10.3.7.11:16686"; // 定时任务日志跳转
+  thanos = "http://thanost.weipaitang.la";
 } else if (document.domain === 'back-admint.weipaitang.com') {
   dc = 'http://back-apit.weipaitang.com';
   tc = 'http://back-apit.weipaitang.com';
@@ -25,6 +28,7 @@ if (document.domain === 'localhost') {
   us = 'http://back-apit.weipaitang.com';
   hostDev = 'http://back-admint.weipaitang.com';
   sTaskJobLog = "http://10.3.7.11:16686"; // 定时任务日志跳转
+  thanos = "http://thanost.weipaitang.la";
 } else if (document.domain === 'back-admin.wpt.la') {
   dc = 'http://back-admin.wpt.la/api';
   tc = 'http://back-admin.wpt.la/api';
@@ -32,6 +36,7 @@ if (document.domain === 'localhost') {
   us = 'http://back-api.weipaitang.com';
   hostDev = 'http://back-admin.wpt.la';
   sTaskJobLog = "http://10.3.7.11:16686"; // 定时任务日志跳转
+  thanos = "http://thanost.weipaitang.la";
 } else if (document.domain === 'back-admin.weipaitang.com') {
   dc = 'http://back-api.weipaitang.com';
   tc = 'http://back-api.weipaitang.com';
@@ -39,6 +44,7 @@ if (document.domain === 'localhost') {
   us = 'http://back-api.weipaitang.com';
   hostDev = 'http://back-admin.weipaitang.com';
   sTaskJobLog = "http://ms-trace.weipaitang.com"; // 定时任务日志跳转
+  thanos = "http://thanos-inside.wptqc.com";
 }
 
 export {
@@ -48,5 +54,6 @@ export {
   apiCdn,
   auth,
   hostDev,
-  sTaskJobLog
+  sTaskJobLog,
+  thanos
 }

+ 77 - 0
src/pages/fengkong/features/list.js

@@ -0,0 +1,77 @@
+import React from 'react'
+import { FilterTable } from 'wptpc-design'
+import { thanos } from '@/conf/config'
+
+const apiUrl = `${thanos}/thanos-admin/api/v1/feature/list`
+
+class SubJobList extends React.PureComponent {
+  state = {
+    showModal: false,
+    params: {}
+  }
+
+  filterSetting = {
+    isClearSearch: true,
+    formFields: [
+      {
+        label: '描述:',
+        type: 'input',
+        key: 'desc',
+        placeholder: '特征名称'
+      }
+    ]
+    // 在接口请求前,可以修改给接口的入参
+    // beforeSearchFunc: params => {
+    //   params.pageNum = params.pageNum
+    // }
+  }
+
+  // filtertable的列表配置
+  tableSetting = {
+    rowKey: 'alias',
+    isFrontPagination: true,
+    pagination: {
+      pageSize: 10
+    },
+    columnConfig: [
+      {
+        title: '名称',
+        dataIndex: 'name'
+      },
+      {
+        title: '描述',
+        dataIndex: 'description'
+      },
+      {
+        title: '是否输出',
+        dataIndex: 'overt'
+      },
+      {
+        title: '是否IO型特征',
+        dataIndex: 'io'
+      },
+      {
+        title: '数据类型',
+        dataIndex: 'returnType'
+      },
+      {
+        title: '类目',
+        dataIndex: 'category'
+      }
+    ],
+    getRefresh: refresh => {
+      this.refresh = refresh
+    }
+  }
+
+  render () {
+    return (
+      <div>
+        <FilterTable filterSetting={this.filterSetting} tableSetting={this.tableSetting} apiUrl={apiUrl}
+          isPage={false}/>
+      </div>
+    )
+  }
+}
+
+export default SubJobList