Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
mediactl
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
medientechnik
ext-lib
mediactl
Commits
0baeb105
Commit
0baeb105
authored
8 months ago
by
David Huss
Browse files
Options
Downloads
Patches
Plain Diff
Minor cleanup
parent
ff04fccc
No related branches found
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/mediactl/main.py
+3
-3
3 additions, 3 deletions
src/mediactl/main.py
templates/index.html
+29
-38
29 additions, 38 deletions
templates/index.html
templates/power.html
+0
-45
0 additions, 45 deletions
templates/power.html
with
32 additions
and
86 deletions
src/mediactl/main.py
+
3
−
3
View file @
0baeb105
...
...
@@ -88,7 +88,7 @@ manager2 = ConnectionManager()
async
def
index
(
request
:
Request
):
return
templates
.
TemplateResponse
(
request
=
request
,
name
=
"
power
.html
"
,
name
=
"
index
.html
"
,
context
=
{
"
status
"
:
await
system
.
get_status
()},
mimetypes
=
custom_mimetype
,
)
...
...
This diff is collapsed.
Click to expand it.
templates/index.html
+
29
−
38
View file @
0baeb105
...
...
@@ -2,52 +2,43 @@
<head>
<title>
Ext Lib
</title>
<link
href=
"{{ url_for('static', path='/style.css') }}"
rel=
"stylesheet"
>
<link
href=
"{{ url_for('static', path='/fonts.css') }}"
rel=
"stylesheet"
>
<script
type=
"text/javascript"
crossorigin
src=
"{{ url_for('static', path='/reconnecting-websocket.min.js') }}"
></script>
<script
type=
"text/javascript"
crossorigin
src=
"{{ url_for('static', path='/modules/projector.js') }}"
></script>
<script
type=
"text/javascript"
crossorigin
src=
"{{ url_for('static', path='/modules/ahm.js') }}"
></script>
<script
type=
"text/javascript"
crossorigin
src=
"{{ url_for('static', path='/modules/kramer.js') }}"
></script>
<script
type=
"text/javascript"
crossorigin
src=
"{{ url_for('static', path='/modules/system.js') }}"
></script>
<script
type=
"text/javascript"
crossorigin
src=
"{{ url_for('static', path='/helpers.js') }}"
></script>
</head>
<body>
<body
id=
"page-power"
class=
"{{ status['system']['power']|replace(' ', '_') }}"
>
<header>
<div
id=
"connection-status-websocket"
class=
"led-wrapper state-unknown"
>
<div
class=
"led"
>
<div
class=
"status {{ status['system']['power'] }}"
id=
"status-system"
>
<p
class=
"status_title"
>
System
</p>
<div
class=
"led"
></div>
<p
class=
"status_text"
>
{{ status['system']['power'] }}
</p>
</div>
<p>
Websocket
</p>
<p
class=
"state"
>
unknown
</p>
<div
class=
"status {{ status['projector']['power'] }}"
id=
"status-projector"
>
<p
class=
"status_title"
>
Projector
</p>
<div
class=
"led"
></div>
<p
class=
"status_text"
>
{{ status['projector']['power'] }}
</p>
</div>
<div
id=
"connection-status-serial"
class=
"led-wrapper state-unknown"
>
<div
class=
"led"
>
<div
class=
"status {{ status['ahm']['power'] }}"
id=
"status-ahm"
>
<p
class=
"status_title"
>
DSP
</p>
<div
class=
"led"
></div>
<p
class=
"status_text"
>
{{ status['ahm']['power'] }}
</p>
</div>
<p>
RS-232
</p>
<p
class=
"state"
>
unknown
</p>
</div>
<div
id=
"connection-status-power"
class=
"led-wrapper state-unknown"
>
<div
class=
"led"
>
</div>
<p>
Power
</p>
<p
class=
"state"
>
unknown
</p>
</div>
<div
id=
"connection-status-shutter"
class=
"led-wrapper state-unknown"
>
<div
class=
"led"
>
</div>
<p>
Shutter
</p>
<p
class=
"state"
>
unknown
</p>
<div
class=
"title"
>
<h1>
Extended Library
</h1>
<p
class=
"time-display"
></p>
</div>
<button
id=
"power-button"
disabled
class=
"toggle-button"
data-active-command=
"power-off"
data-inactive-command=
"power-on"
data-active-label=
"Power<br>ON"
data-inactive-label=
"Power<br>OFF"
>
Power
</button>
<button
id=
"shutter-button"
disabled
class=
"toggle-button"
data-inactive-command=
"shutter-close"
data-active-command=
"shutter-open"
data-inactive-label=
"OPEN<br>Shutter"
data-active-label=
"CLOSE<br>Shutter"
>
Shutter
</button>
<button
id=
"testpattern-button"
disabled
class=
"toggle-button"
data-active-command=
"testpattern-off"
data-inactive-command=
"testpattern-green-grid"
data-active-label=
"Activate<br>Test Pattern"
data-inactive-label=
"Deactivate<br>Test Pattern"
>
Test Pattern
</button>
<h3
id=
"temperature"
></h3>
<h3
id=
"hours"
></h3>
<button
id=
"power-off-button"
class=
"rectangle-button danger"
>
POWER OFF
</button>
</header>
<h2>
Projector Log
</h2>
<div
id=
"log-wrapper"
>
<table
id=
"log"
>
<thead>
<th>
Time
</th>
<th>
Message
</th>
<th>
Type
</th>
</thead>
<tbody
id=
"log-body"
>
</tbody>
</table>
</div>
<main>
{# filled by JS #}
</main>
<script
src=
"{{ url_for('static', path='/ws.js') }}"
></script>
</body>
...
...
This diff is collapsed.
Click to expand it.
templates/power.html
deleted
100644 → 0
+
0
−
45
View file @
ff04fccc
<!DOCTYPE html>
<head>
<title>
Ext Lib
</title>
<link
href=
"{{ url_for('static', path='/style.css') }}"
rel=
"stylesheet"
>
<link
href=
"{{ url_for('static', path='/fonts.css') }}"
rel=
"stylesheet"
>
<script
type=
"text/javascript"
crossorigin
src=
"{{ url_for('static', path='/reconnecting-websocket.min.js') }}"
></script>
<script
type=
"text/javascript"
crossorigin
src=
"{{ url_for('static', path='/modules/projector.js') }}"
></script>
<script
type=
"text/javascript"
crossorigin
src=
"{{ url_for('static', path='/modules/ahm.js') }}"
></script>
<script
type=
"text/javascript"
crossorigin
src=
"{{ url_for('static', path='/modules/kramer.js') }}"
></script>
<script
type=
"text/javascript"
crossorigin
src=
"{{ url_for('static', path='/modules/system.js') }}"
></script>
<script
type=
"text/javascript"
crossorigin
src=
"{{ url_for('static', path='/helpers.js') }}"
></script>
</head>
<body
id=
"page-power"
class=
"{{ status['system']['power']|replace(' ', '_') }}"
>
<header>
<div
class=
"status {{ status['system']['power'] }}"
id=
"status-system"
>
<p
class=
"status_title"
>
System
</p>
<div
class=
"led"
></div>
<p
class=
"status_text"
>
{{ status['system']['power'] }}
</p>
</div>
<div
class=
"status {{ status['projector']['power'] }}"
id=
"status-projector"
>
<p
class=
"status_title"
>
Projector
</p>
<div
class=
"led"
></div>
<p
class=
"status_text"
>
{{ status['projector']['power'] }}
</p>
</div>
<div
class=
"status {{ status['ahm']['power'] }}"
id=
"status-ahm"
>
<p
class=
"status_title"
>
DSP
</p>
<div
class=
"led"
></div>
<p
class=
"status_text"
>
{{ status['ahm']['power'] }}
</p>
</div>
<div
class=
"title"
>
<h1>
Extended Library
</h1>
<p
class=
"time-display"
></p>
</div>
<button
id=
"power-off-button"
class=
"rectangle-button danger"
>
POWER OFF
</button>
</header>
<main>
{# filled by JS #}
</main>
<script
src=
"{{ url_for('static', path='/ws.js') }}"
></script>
</body>
</html>
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment