-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove customization settings for VAST18 (#2)
* remove: Customization for VAST18 * package clean
- Loading branch information
1 parent
433965a
commit 9f90c11
Showing
24 changed files
with
46 additions
and
933 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -58,4 +58,3 @@ typings/ | |
.env | ||
|
||
# customize configuration | ||
conf/db.js |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,110 +1,17 @@ | ||
import { | ||
connectMySQL, | ||
jsonpTransfer | ||
} from '../../util/base'; | ||
import { | ||
queryGraph, | ||
queryTest, | ||
queryClusterDots, | ||
queryTripFlow, | ||
queryTreeMap, | ||
queryAngleClusterStats, | ||
queryAbnormalStats | ||
queryTest | ||
} from '../../util/agg-utils'; | ||
import { | ||
mysqlParams | ||
} from '../../conf/db'; | ||
import { | ||
initAngleClusterParams, | ||
initTreeMapParams, | ||
initAbnormalStatsParams | ||
} from '../../util/params'; | ||
import path from 'path'; | ||
import fs from 'fs'; | ||
|
||
const mysqlPool = connectMySQL(mysqlParams); | ||
|
||
const testGraph = async (ctx, next) => { | ||
ctx.body = await queryTest(mysqlPool); | ||
} | ||
|
||
/** | ||
* 基本图查询后台 API 实现 | ||
* @param {*} ctx | ||
* @param {*} next | ||
*/ | ||
const basicGraph = async (ctx, next) => { | ||
let queryParams = ctx.query, | ||
cbFunc = queryParams.callback; | ||
|
||
const res = await queryGraph({ | ||
mysqlPool | ||
}, queryParams); | ||
return ctx.body = jsonpTransfer(res, queryParams); | ||
} | ||
|
||
const clusterDots = async (ctx, next) => { | ||
let queryParams = ctx.query, | ||
cbFunc = queryParams.callback; | ||
const test = async (ctx, next) => { | ||
let queryParams = ctx.query; | ||
|
||
const res = await queryClusterDots({ | ||
mysqlPool | ||
}, queryParams); | ||
const res = await queryTest(); | ||
return ctx.body = jsonpTransfer(res, queryParams); | ||
} | ||
|
||
const tripFlow = async (ctx, next) => { | ||
let queryParams = ctx.query, | ||
cbFunc = queryParams.callback; | ||
|
||
const res = await queryTripFlow({ | ||
mysqlPool | ||
}, queryParams); | ||
return ctx.body = jsonpTransfer(res, queryParams); | ||
} | ||
|
||
const treeMap = async (ctx, next) => { | ||
let params = ctx.query, | ||
cbFunc = params.callback; | ||
|
||
const queryParams = initTreeMapParams(params); | ||
|
||
let file = path.resolve(queryParams.ResFilePath, queryParams.ResFileName), | ||
ifResExist = fs.existsSync(file); | ||
|
||
// console.log("queryParams.seedStrength: ", queryParams.seedStrength) | ||
// let res = ifResExist ? JSON.parse(fs.readFileSync(file)) : await queryTreeMap(queryParams); | ||
let res = await queryTreeMap(queryParams); | ||
|
||
return ctx.body = jsonpTransfer(res, params); | ||
} | ||
|
||
const angleClusterStats = async (ctx, next) => { | ||
let params = ctx.query, | ||
cbFunc = params.callback; | ||
|
||
const queryParams = initAngleClusterParams(params); | ||
|
||
const res = await queryAngleClusterStats(queryParams); | ||
return ctx.body = jsonpTransfer(res, params); | ||
} | ||
|
||
const abnormalStats = async (ctx, next) => { | ||
let params = ctx.query, | ||
cbFunc = params.callback; | ||
|
||
const queryParams = initAbnormalStatsParams(params); | ||
|
||
const res = await queryAbnormalStats(queryParams); | ||
return ctx.body = jsonpTransfer(res, params); | ||
} | ||
|
||
export { | ||
testGraph, | ||
basicGraph, | ||
clusterDots, | ||
tripFlow, | ||
treeMap, | ||
angleClusterStats, | ||
abnormalStats | ||
test | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
const mysqlParams = { | ||
connectionLimit: 10, | ||
host: '192.168.0.1', | ||
user: 'root', | ||
password: '', | ||
database: '', | ||
debug: true | ||
} | ||
|
||
export { | ||
mysqlParams | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1 @@ | ||
body { | ||
/* background: yellow; */ | ||
/* background-image: url('../img/demo.png') */ | ||
} | ||
body {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +0,0 @@ | ||
// import d3 from 'd3'; | ||
|
||
// console.log('Updating'); | ||
|
||
// let t = () => { | ||
// return new Promise((resolve, reject) => { | ||
// resolve("Resolve ok"); | ||
// }); | ||
// } | ||
|
||
// t().then(res => { | ||
// alert(`Promise result: ${res}`) | ||
// }).catch(err => { | ||
// throw new Error("Err"); | ||
// }); | ||
|
||
// let asyncTest = async() => { | ||
// alert('Async before'); | ||
// let after = await t(); | ||
// alert(`Async result: ${after}`); | ||
// alert('Async after'); | ||
// } | ||
|
||
// alert("Normally Hi"); | ||
|
||
// asyncTest(); | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,7 @@ | ||
import { | ||
test as queryTest | ||
} from './methods/test'; | ||
import { | ||
queryGraph | ||
} from './methods/queryGraph'; | ||
import { | ||
queryClusterDots | ||
} from './methods/queryClusterDots'; | ||
import { | ||
queryTripFlow | ||
} from './methods/queryTripFlow'; | ||
import { | ||
queryTreeMap | ||
} from './methods/queryTreeMap'; | ||
import { | ||
queryAngleClusterStats | ||
} from './methods/queryAngleClusterStats'; | ||
import { | ||
queryAbnormalStats | ||
} from './methods/queryAbnormalStats'; | ||
|
||
export { | ||
queryTest, | ||
queryGraph, | ||
queryClusterDots, | ||
queryTripFlow, | ||
queryTreeMap, | ||
queryAngleClusterStats, | ||
queryAbnormalStats | ||
queryTest | ||
} |
Oops, something went wrong.