Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
df-aggregator
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Oleksandr Barabash
df-aggregator
Commits
4cac144a
Commit
4cac144a
authored
Dec 24, 2020
by
Corey Koval
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Access token optional
parent
7accf0a5
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
2 deletions
+13
-2
README.md
README.md
+1
-0
df-aggregator.py
df-aggregator.py
+10
-2
cesium.tpl
views/cesium.tpl
+2
-0
No files found.
README.md
View file @
4cac144a
...
...
@@ -46,6 +46,7 @@ Click the power button to enable/disable.
-
~Create a single line file named
```accesstoken.txt```
~
-
Turns out you can use a public token, you just can't use Cesium Assets.
Most people don't need to use assets.
-
The token is optional with --access_token=accesstoken.txt
-
[
Extended XML KerberosSDR Software
](
https://github.com/ckoval7/kerberossdr
)
-
This is available for both Qt4 (original version) and Qt5 (Ubuntu 20.04+). Just check out the appropriate branch.
...
...
df-aggregator.py
View file @
4cac144a
...
...
@@ -667,8 +667,6 @@ def server_static(filepath):
@get
(
'/cesium'
)
def
cesium
():
response
.
set_header
(
'Cache-Control'
,
'no-cache, no-store, must-revalidate, max-age=0'
)
with
open
(
'accesstoken.txt'
,
"r"
)
as
tokenfile
:
access_token
=
tokenfile
.
read
()
.
replace
(
'
\n
'
,
''
)
return
template
(
'cesium.tpl'
,
{
'access_token'
:
access_token
,
'epsilon'
:
ms
.
eps
,
...
...
@@ -1161,6 +1159,7 @@ if __name__ == '__main__':
Only applies when clustering is turned on. This creates larger CZML files."""
,
action
=
"store_true"
)
parser
.
add_option
(
"-o"
,
"--offline"
,
dest
=
"disable"
,
help
=
"Starts program with receiver turned off."
,
action
=
"store_false"
,
default
=
True
)
parser
.
add_option
(
"--access_token"
,
dest
=
"token_file"
,
help
=
"Cesium Access Token File"
,
metavar
=
"FILE"
)
parser
.
add_option
(
"--ip"
,
dest
=
"ipaddr"
,
help
=
"IP Address to serve from. Default 127.0.0.1"
,
metavar
=
"IP ADDRESS"
,
type
=
"str"
,
default
=
"127.0.0.1"
)
parser
.
add_option
(
"--port"
,
dest
=
"port"
,
help
=
"Port number to serve from. Default 8080"
,
...
...
@@ -1185,6 +1184,14 @@ if __name__ == '__main__':
ms
.
receiving
=
options
.
disable
ms
.
plotintersects
=
options
.
plotintersects
if
options
.
token_file
:
tokenfile
=
options
.
token_file
with
open
(
tokenfile
,
"r"
)
as
token
:
access_token
=
token
.
read
()
.
replace
(
'
\n
'
,
''
)
print
(
access_token
)
else
:
access_token
=
None
web
=
threading
.
Thread
(
target
=
start_server
,
args
=
(
options
.
ipaddr
,
options
.
port
))
web
.
daemon
=
True
web
.
start
()
...
...
@@ -1193,6 +1200,7 @@ if __name__ == '__main__':
dbwriter
.
daemon
=
True
dbwriter
.
start
()
try
:
###############################################
# Reds receivers from the database first, then
...
...
views/cesium.tpl
View file @
4cac144a
...
...
@@ -42,8 +42,10 @@
var
receiversDataSource
=
new
Cesium
.
CzmlDataSource
();
var
aoiDataSource
=
new
Cesium
.
CzmlDataSource
();
%
if
access_token
:
// Your access token can be found at: https://cesium.com/ion/tokens.
Cesium
.
Ion
.
defaultAccessToken
=
'{
{
access_token
}
}'
;
%
end
var
viewer
=
new
Cesium
.
Viewer
(
'cesiumContainer'
,
{
homeButton
:
false
,
timeline
:
false
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment