Skip to content
This repository was archived by the owner on Jul 6, 2022. It is now read-only.

Commit 72a6c53

Browse files
committed
replaced systems with json file; faye pub/sub working. Now for browser parsing of event.
1 parent b6bb6a4 commit 72a6c53

8 files changed

Lines changed: 54 additions & 41 deletions

File tree

‎app/js/Main.js‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,9 @@ $(function () {
77
Data.state.data_client.subscribe('/events', function(event) {
88
EventList.addEvent(event);
99
});
10+
log('Connected to local data client...');
1011
} catch(err) {
11-
console.log('Unable to connect to local data client...')
12+
log('Unable to connect to local data client...');
1213
}
1314

1415
});

‎app/js/client/Main.js‎

Lines changed: 36 additions & 29 deletions
Large diffs are not rendered by default.

‎app/js/client/UI.js‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -112,10 +112,10 @@ Handlebars.registerHelper('ui_icon', function(icon) {
112112
return 'question'
113113
});
114114

115-
Handlebars.registerHelper('reported', function(pilots, systems) {
115+
Handlebars.registerHelper('reported', function(pilots) {
116116
if (Object.keys(pilots).length > 1) {
117-
return Object.keys(pilots).length + ' hostiles reported in ' + systems[0];
117+
return Object.keys(pilots).length + ' hostiles ';
118118
} else {
119-
return Object.keys(pilots)[0] + ' reported in ' + systems[0];
119+
return Object.keys(pilots)[0];
120120
}
121121
});

‎app/styles/main.css‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -514,10 +514,12 @@ rect.status-hostile { stroke: #d9534f; fill: #74312f; }
514514
.event.scanShared { background-color:#332; border-bottom: 0.2rem solid #110; border-top: 0.16rem solid #553; }
515515
.event.reportShared { background-color:#332; border-bottom: 0.2rem solid #110; border-top: 0.16rem solid #553; }
516516
.event.error { background-color:#411; border-bottom: 0.2rem solid #200; border-top: 0.16rem solid #633; }
517-
.event.reportHostile { background-color:#411; border-bottom: 0.2rem solid #200; border-top: 0.16rem solid #633; }
518517
.event.hostileTimedOut { background-color:#AF5B00; border-bottom: 0.2rem solid #291E0E; border-top: 0.16rem solid #BD8942; }
519518
.event.updateHostile { background-color:#885000; border-bottom: 0.2rem solid #291E0E; border-top: 0.16rem solid #BD8942; }
519+
.event.sourcedClear,
520520
.event.reportClear { background-color:#366436; border-bottom: 0.2rem solid #222; border-top: 0.16rem solid #5cb85c; }
521+
.event.sourcedHostile,
522+
.event.reportHostile { background-color:#411; border-bottom: 0.2rem solid #200; border-top: 0.16rem solid #633; }
521523

522524
/*/
523525
/ / PANEL

‎app/templates/report.hbs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
{{else}}
88
<i class="fa fa-crosshairs"></i>
99
<span class="text">
10-
{{reported pilots systems}} by {{reporterName}}
10+
{{reported pilots}} reported in {{systemName}} by {{reporterName}}
1111
</span>
1212
{{/if}}
1313
<div class="right">

‎client/index.html‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,17 +17,17 @@
1717
<div id="top-bar">
1818
<span id="current-system">Standing Fleet</span>
1919
<div class="sub-bar right" id="top-menu">
20+
<div class="menu-button logs active" id="top-menu-logs">
21+
<i class="fa fa-align-justify"></i> <span>LOGS</span>
22+
</div>
2023
<div class="menu-button clipboard" id="top-menu-clipboard">
2124
<i class="fa fa-clipboard"></i> <span>CLIPBOARD</span>
2225
</div>
23-
<div class="menu-button logs" id="top-menu-logs">
24-
<i class="fa fa-align-justify"></i> <span>LOGS</span>
25-
</div>
2626
</div>
2727
</div>
2828
<div id="content-wrapper">
29-
<div id="clipboard" class="main-content active"><div class="list"></div></div>
30-
<div id="logs" class="main-content"><div class="list"></div></div>
29+
<div id="logs" class="main-content active"><div class="list"></div></div>
30+
<div id="clipboard" class="main-content"><div class="list"></div></div>
3131
</div>
3232
<div id="bottom-bar">
3333
<div class="sub-bar left" id="broadcast">

‎client/package.json‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@
1818
"elementtree": "^0.1.6",
1919
"faye": "^1.0.3",
2020
"file-tail": "^0.3.0",
21-
"moment": "^2.8.3"
21+
"moment": "^2.8.3",
22+
"request": "^2.47.0"
2223
},
2324
"devDependencies": {
2425
"node-webkit-builder": "^0.1.3"

‎server/views/main/index.jade‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,4 +60,6 @@ block content
6060

6161
script(type='text/javascript', src='/js/lib.js')
6262
script(type='text/javascript', src='/js/templates.js')
63+
- if (user)
64+
script(type='text/javascript', src='http://127.0.0.1:44444/client.js')
6365
script(type='text/javascript', src='/js/app.js')

0 commit comments

Comments
 (0)