display sdr devices
This commit is contained in:
parent
5282b5f8df
commit
fb90a4e54b
@ -18,3 +18,7 @@ body {
|
|||||||
.row .map-input {
|
.row .map-input {
|
||||||
margin: 15px 15px 0;
|
margin: 15px 15px 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.device {
|
||||||
|
margin-top: 20px;
|
||||||
|
}
|
||||||
|
@ -16,5 +16,8 @@ ${header}
|
|||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
<h1>SDR device settings</h1>
|
<h1>SDR device settings</h1>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="col-12">
|
||||||
|
${devices}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</body>
|
</body>
|
@ -49,6 +49,25 @@ class SettingsController(AdminController):
|
|||||||
|
|
||||||
|
|
||||||
class SdrSettingsController(AdminController):
|
class SdrSettingsController(AdminController):
|
||||||
|
def template_variables(self):
|
||||||
|
variables = super().template_variables()
|
||||||
|
variables["devices"] = self.render_devices()
|
||||||
|
return variables
|
||||||
|
|
||||||
|
def render_devices(self):
|
||||||
|
def render_devicde(device_id, config):
|
||||||
|
return """
|
||||||
|
<div class="card device bg-dark text-white">
|
||||||
|
<div class="card-header">
|
||||||
|
{device_name}
|
||||||
|
</div>
|
||||||
|
<div class="card-body">
|
||||||
|
device settings go here
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
""".format(device_name=config["name"])
|
||||||
|
return "".join(render_devicde(key, value) for key, value in Config.get()["sdrs"].items())
|
||||||
|
|
||||||
def indexAction(self):
|
def indexAction(self):
|
||||||
self.serve_template("sdrsettings.html", **self.template_variables())
|
self.serve_template("sdrsettings.html", **self.template_variables())
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user