I have a simple page that I converted from Simple XML to HTML. It does some searches to a DB and gives the results in a few panels.
Now I need to provide a way to configure parts of the app after it's deployed. For instance in the following search, I need to read the database name from some type of config so that the `dbquery` is done on the correct database.
var search1 = new SearchManager({
"id": "search1",
"cancelOnUnload": true,
"latest_time": "now",
"search": "| dbquery Database1 limit=1000 \"SELECT COUNT(*) FROM table1 WHERE status = 0;\"",
"status_buckets": 0,
"earliest_time": "0",
"app": utils.getCurrentApp(),
"auto_cancel": 90,
"preview": true
}, {tokens: true, tokenNamespace: "submitted"});
Right now it's hard-coded as Database1, but I'd like instead to get that from a config - and also provide a page where an admin user of the app can specify settings like this.
↧