mirror of
https://github.com/vale981/dirkules
synced 2025-03-06 01:41:38 -05:00
more things for samba
This commit is contained in:
parent
a4bde716ab
commit
8f85bb7d6c
5 changed files with 49 additions and 4 deletions
|
@ -3,6 +3,7 @@ import os
|
||||||
from apscheduler.jobstores.memory import MemoryJobStore
|
from apscheduler.jobstores.memory import MemoryJobStore
|
||||||
|
|
||||||
baseDir = os.path.abspath(os.path.dirname(__file__))
|
baseDir = os.path.abspath(os.path.dirname(__file__))
|
||||||
|
staticDir = os.path.join(baseDir, 'static')
|
||||||
|
|
||||||
SQLALCHEMY_DATABASE_URI = 'sqlite:///' + os.path.join(baseDir, 'dirkules.db')
|
SQLALCHEMY_DATABASE_URI = 'sqlite:///' + os.path.join(baseDir, 'dirkules.db')
|
||||||
SQLALCHEMY_TRACK_MODIFICATIONS = False
|
SQLALCHEMY_TRACK_MODIFICATIONS = False
|
||||||
|
|
11
dirkules/static/conf/samba_global.conf
Normal file
11
dirkules/static/conf/samba_global.conf
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
socket options = TCP_NODELAY
|
||||||
|
security = user
|
||||||
|
encrypt passwords = yes
|
||||||
|
invalid users = root
|
||||||
|
usershare allow guests = no
|
||||||
|
log file = /var/log/samba/log.%m
|
||||||
|
max log size = 1000
|
||||||
|
log level = 3
|
||||||
|
unix extensions = yes
|
||||||
|
time server = yes
|
||||||
|
server role = standalone server
|
|
@ -4,5 +4,9 @@
|
||||||
{{ super() }}
|
{{ super() }}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
{% block body %}
|
{% block body %}
|
||||||
HAHA
|
<a href="{{ url_for('samba_global') }}">
|
||||||
|
<div class="ui primary labeled icon button">
|
||||||
|
<i class="plus icon"></i> Samba Global conf
|
||||||
|
</div>
|
||||||
|
</a>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
15
dirkules/templates/samba_global.html
Normal file
15
dirkules/templates/samba_global.html
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
{% extends "base.html" %}
|
||||||
|
{% block title %}Dashboard{% endblock %}
|
||||||
|
{% block head %}
|
||||||
|
{{ super() }}
|
||||||
|
{% endblock %}
|
||||||
|
{% block body %}
|
||||||
|
<div class="ui container">
|
||||||
|
<t2>Feste Bestandteile der<i> Samba global conf</i></t2>
|
||||||
|
<div class="ui segment">
|
||||||
|
{% for line in conf %}
|
||||||
|
{{ line }}<br>
|
||||||
|
{% endfor %}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{% endblock %}
|
|
@ -6,6 +6,7 @@ from dirkules.models import Drive, Cleaning
|
||||||
import dirkules.viewManager.viewManager as viewManager
|
import dirkules.viewManager.viewManager as viewManager
|
||||||
from dirkules.validation.validators import CleaningForm
|
from dirkules.validation.validators import CleaningForm
|
||||||
from sqlalchemy import asc, collate
|
from sqlalchemy import asc, collate
|
||||||
|
from dirkules.config import staticDir
|
||||||
|
|
||||||
|
|
||||||
@app.route('/', methods=['GET'])
|
@app.route('/', methods=['GET'])
|
||||||
|
@ -22,9 +23,6 @@ def drives():
|
||||||
dbDrives.append(d)
|
dbDrives.append(d)
|
||||||
return render_template('drives.html', drives=dbDrives)
|
return render_template('drives.html', drives=dbDrives)
|
||||||
|
|
||||||
@app.route('/samba', methods=['GET'])
|
|
||||||
def samba():
|
|
||||||
return render_template('samba.html')
|
|
||||||
|
|
||||||
@app.route('/about', methods=['GET'])
|
@app.route('/about', methods=['GET'])
|
||||||
def about():
|
def about():
|
||||||
|
@ -71,3 +69,19 @@ def add_cleaning():
|
||||||
viewManager.create_cleaning_obj(form.jobname.data, form.path.data, form.active.data)
|
viewManager.create_cleaning_obj(form.jobname.data, form.path.data, form.active.data)
|
||||||
return redirect(url_for('cleaning'))
|
return redirect(url_for('cleaning'))
|
||||||
return render_template('add_cleaning.html', form=form)
|
return render_template('add_cleaning.html', form=form)
|
||||||
|
|
||||||
|
@app.route('/samba', methods=['GET'])
|
||||||
|
def samba():
|
||||||
|
return render_template('samba.html')
|
||||||
|
|
||||||
|
@app.route('/samba/global', methods=['GET'])
|
||||||
|
def samba_global():
|
||||||
|
file = open(staticDir + "/conf/samba_global.conf")
|
||||||
|
conf = list()
|
||||||
|
while True:
|
||||||
|
line = file.readline()
|
||||||
|
if line != '':
|
||||||
|
conf.append(line.rstrip())
|
||||||
|
else:
|
||||||
|
break
|
||||||
|
return render_template('samba_global.html', conf=conf)
|
Loading…
Add table
Reference in a new issue