setting up remote server capabilities
parent
80d74af7a3
commit
3fa904df64
@ -0,0 +1,35 @@
|
|||||||
|
"""add remote servers
|
||||||
|
|
||||||
|
Revision ID: 92b2ce4b6c87
|
||||||
|
Revises: f6f695a38339
|
||||||
|
Create Date: 2022-01-03 01:20:39.066496
|
||||||
|
|
||||||
|
"""
|
||||||
|
from alembic import op
|
||||||
|
import sqlalchemy as sa
|
||||||
|
|
||||||
|
|
||||||
|
# revision identifiers, used by Alembic.
|
||||||
|
revision = '92b2ce4b6c87'
|
||||||
|
down_revision = 'f6f695a38339'
|
||||||
|
branch_labels = None
|
||||||
|
depends_on = None
|
||||||
|
|
||||||
|
|
||||||
|
def upgrade():
|
||||||
|
# ### commands auto generated by Alembic - please adjust! ###
|
||||||
|
op.create_table('remotes',
|
||||||
|
sa.Column('id', sa.Integer(), nullable=False),
|
||||||
|
sa.Column('create_date', sa.DateTime(), nullable=True),
|
||||||
|
sa.Column('last_sync_date', sa.DateTime(), nullable=True),
|
||||||
|
sa.Column('paused', sa.Boolean(), nullable=True),
|
||||||
|
sa.Column('endpoint', sa.String(length=120), nullable=True),
|
||||||
|
sa.PrimaryKeyConstraint('id')
|
||||||
|
)
|
||||||
|
# ### end Alembic commands ###
|
||||||
|
|
||||||
|
|
||||||
|
def downgrade():
|
||||||
|
# ### commands auto generated by Alembic - please adjust! ###
|
||||||
|
op.drop_table('remotes')
|
||||||
|
# ### end Alembic commands ###
|
@ -0,0 +1,34 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
{% include 'includes/head.html' %}
|
||||||
|
<body>
|
||||||
|
<section class="section">
|
||||||
|
<div class="container">
|
||||||
|
{% include 'includes/navbar.html' %}
|
||||||
|
|
||||||
|
<div class="screen">
|
||||||
|
<form method="POST" enctype="multipart/form-data" class="site-form" action="{{ url_for('meta.remotes') }}" style="padding-top:1.5em;">
|
||||||
|
<div class="field">
|
||||||
|
<label class="label">Remote Server</label>
|
||||||
|
<div class="control">
|
||||||
|
<input class="input" type="text" placeholder="https://suchwowx.xyz" name="endpoint">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="field is-grouped">
|
||||||
|
<div class="control">
|
||||||
|
<button class="button is-primary">Submit</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
{% if remotes %}
|
||||||
|
<hr>
|
||||||
|
{% for remote in remotes %}
|
||||||
|
<p>{{ remote.endpoint }} - last synced: {{ remote.last_sync_date | humanize }} <a href="{{ url_for('meta.delete_remote', remote_id=remote.id) }}">x</a></p>
|
||||||
|
{% endfor %}
|
||||||
|
{% endif %}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
{% include 'includes/footer.html' %}
|
||||||
|
</body>
|
||||||
|
</html>
|
Loading…
Reference in New Issue