Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[NEW FEATURE][WORK IN PROGRESS]Edit/Add/Delete Channels/Jobs #121

Open
wants to merge 31 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
bab004f
Stuff i've did
MatejMecka Dec 9, 2018
a083cb9
update pip file
MatejMecka Dec 10, 2018
7ea0d4f
no use for a file
MatejMecka Dec 10, 2018
9078fa3
update forms.py
MatejMecka Dec 10, 2018
19abdf5
convert to pascal case
MatejMecka Dec 10, 2018
93c9cf2
Merge branch 'master' into feat/editChannelsJobs
MatejMecka Dec 10, 2018
3ff2745
Document Channel and incomplete parts about Jobs
MatejMecka Dec 10, 2018
570b1c6
autopep8
MatejMecka Dec 10, 2018
4825dc8
codefactor issues fixing
MatejMecka Dec 10, 2018
185dc30
UPDATE README
MatejMecka Dec 10, 2018
cb7cd41
Update tests
MatejMecka Dec 10, 2018
4141bd7
Autopep8
MatejMecka Dec 10, 2018
d1658ea
CodeFactor issue
MatejMecka Dec 10, 2018
242a020
Rename Variable so Codefactor is happy
MatejMecka Dec 10, 2018
8099861
More Style Fixing
MatejMecka Dec 10, 2018
6358b9d
Final CodeFactor fix
MatejMecka Dec 10, 2018
7df6ef2
Add jobs
MatejMecka Dec 11, 2018
0f2e342
set up logging
MatejMecka Dec 11, 2018
971542f
updates
MatejMecka Dec 11, 2018
11c4a3b
Codefactor fixes
MatejMecka Dec 11, 2018
9965e53
delete uneceserarry print
MatejMecka Dec 11, 2018
07451f7
finalize?
MatejMecka Dec 12, 2018
0034ded
codefactor fixes
MatejMecka Dec 12, 2018
78bc3e9
replace with done method
MatejMecka Dec 12, 2018
86b2b20
Add Channels
MatejMecka Dec 12, 2018
d0e9d4f
remove storage.db
MatejMecka Dec 12, 2018
f8234b8
revert
MatejMecka Dec 12, 2018
a194a3e
update readme
MatejMecka Dec 12, 2018
8be137a
Update Tests
MatejMecka Dec 22, 2018
e69322f
Fix WTF issues with unit testing
MatejMecka Dec 24, 2018
3d37ec9
Improve the Tests so they can pass
MatejMecka Jan 15, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ google-api-python-client = "*"
"oauth2client" = "*"
"flask" = "*"
"Flask-SQLAlchemy" = "*"
"Flask-WTF" = "*"
"blinker"= "*"

[requires]
python_version = "3.4"
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,9 @@ Please go to [Nephos Config](https://github.com/thealphadollar/NephosConfig) rep
## Running the Web Interface
Nephos has a Web Interface that you can see how everything works. To get started set the enviorment `FLASK_APP` to the path where webServer.py is and run it with `flask run` and you can see the database entries in an instant!

Currently the web app offers for you to see which channels are jobs in the database and can be accessed by visiting the url flask provides with the following paths: `/channels` and `/jobs`
Currently the web app offers for you to see which channels are in the database and perform Update, Delete, Add Operations on them. To get started visit `\channels`

This Also applies for jobs where you can get started by visiting `\jobs`

## Developer Documentation
Developers can view the documentation that is present for users since it is detailed and one needs to read it in order to understand how Nephos functions. Along with that, docstrings have been placed in HTML format in
Expand Down
Binary file modified nephos/databases/storage.db
Binary file not shown.
Empty file removed nephos/storage.db
Empty file.
38 changes: 38 additions & 0 deletions nephos/web/info_panel/main/forms.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
"""
This are all the forms used in the Web app
"""
from flask_wtf import FlaskForm
from wtforms import StringField, validators, SubmitField, IntegerField


class ChannelForm(FlaskForm):
"""
This Is a Form used to create new channels and edit existing ones
"""
name = StringField('Channel Name', [validators.Length(min=2, max=50)])
ip = StringField('IP Address')
country_code = StringField(
'Country Code', [validators.Length(min=3, max=5,)])
lang = StringField('Language Code', [validators.Length(min=3, max=25)])
timezone = StringField('Timezone', [validators.Length(min=3, max=5)])
submit = SubmitField('Submit')


class DeleteForm(FlaskForm):
"""
This is a Form that confirms Deletions
"""
submit = SubmitField('Confirm')


class JobForm(FlaskForm):
"""
This is a Form used to created new jobs and edit existing ones
"""
name = StringField('Job Name', [validators.Length(min=2, max=50)])
channel_name = StringField('Channel Name', [validators.Length(min=2, max=50)])
start_time = StringField('Start Time [HH:MM]', [validators.Length(min=2, max=50)])
duration = IntegerField('Duration in Minutes', [])
rep = StringField('Run on [eg. 1010000 for monday and wednesday]',
[validators.Length(min=2, max=50)])
submit = SubmitField('Submit')
Loading