diff --git a/index.html b/index.html
index 70d684c..a187753 100644
--- a/index.html
+++ b/index.html
@@ -26,6 +26,7 @@
Tribe Log
Travel Data
Shared Log
+ Databases
diff --git a/js/main.js b/js/main.js
index a5cc06c..37500aa 100644
--- a/js/main.js
+++ b/js/main.js
@@ -108,7 +108,9 @@ var viewmodel = ko.mapping.fromJS({
"S3KeyPrefix": ""
},
+ // Shared Log Tab
"SharedLogConfig": {
+ // Main Options
"FetchRateSec": 60,
"SnapshotCleanupSec": 900,
"SnapshotRateSec": 1800,
@@ -117,6 +119,8 @@ var viewmodel = ko.mapping.fromJS({
"MaxFileHistory": 10,
"HttpBackupURL": "",
"HttpAPIKey": "",
+
+ //S3 Options
"S3URL": "",
"S3AccessKeyId": "",
"S3SecretKey": "",
@@ -124,7 +128,40 @@ var viewmodel = ko.mapping.fromJS({
"S3KeyPrefix": ""
},
- "DatabaseConnections": [],
+ // Databases Tab
+ "DatabaseConnections": [
+ {
+ "Name": "Default",
+ "URL": "127.0.0.1",
+ "Port": 6390,
+ "Password": ""
+ },
+ {
+ "Name": "TribeDB",
+ "URL": "127.0.0.1",
+ "Port": 6390,
+ "Password": ""
+ },
+ {
+ "Name": "TravelDataDB",
+ "URL": "127.0.0.1",
+ "Port": 6390,
+ "Password": ""
+ },
+ {
+ "Name": "TerritoryDB",
+ "URL": "127.0.0.1",
+ "Port": 6390,
+ "Password": ""
+ },
+ {
+ "Name": "LogDB",
+ "URL": "127.0.0.1",
+ "Port": 6390,
+ "Password": ""
+ }
+ ],
+
"servers": [],
"spawnerOverrideTemplates": [],
"shipPaths": [],
@@ -153,4 +190,18 @@ function updateEditor() {
var interim = ko.mapping.toJS(viewmodel);
interim.coordsScaling = Number(interim.coordsScaling).toFixed(12);
editor.setValue(ko.toJSON(interim, null, 2));
+}
+
+function addDatabase() {
+ var newDB = {
+ "Name": ko.observable("NewDB"),
+ "URL": ko.observable("127.0.0.1"),
+ "Port": ko.observable(6390),
+ "Password": ko.observable("")
+ }
+ viewmodel.DatabaseConnections.push(newDB);
+}
+
+function removeDatabase(obj) {
+ viewmodel.DatabaseConnections.remove(obj);
}
\ No newline at end of file