Márton Boros
4ff1d05dca
revamp settings
2013-02-18 08:21:43 +01:00
Alexander Ljungberg
b42813eb4c
Clean up imports.
2013-02-18 00:52:27 +00:00
Alexander Ljungberg
4d4d080d0d
Fixup previous commit.
...
Remove debug code left in.
2013-02-18 00:42:38 +00:00
Alexander Ljungberg
bd14239138
Fixed: crash if git update check failed.
...
If the git command to check if the latest update is in the currently checked out branch threw an exception, the exception would be handled but then the server would crash immediately afterwards.
With this fix the exception is just ignored.
2013-02-18 00:38:23 +00:00
Márton Boros
b95fc8d135
fix remove_asset to work if file isn't present
2013-02-16 17:21:19 +01:00
Márton Boros
d4520ac895
update backend for fileupload
2013-02-15 14:10:25 +01:00
Márton Boros
a29e5c617a
make api return assets
2013-02-14 21:51:15 +01:00
Márton Boros
22c1730e48
refactor models
2013-02-14 21:51:15 +01:00
Márton Boros
737ac876fb
remove unused
2013-02-14 21:51:15 +01:00
Zachary Jones
cb3e4b7f24
Use toggle switches for "Show Splash" and "Shuffle Playlist" on settings page. Closes #51
2013-02-13 23:01:58 -05:00
Zachary Jones
be7ec7568d
Remove commented out "resolution" references as they aren't part of the Asset schema.
2013-02-13 22:51:58 -05:00
Zachary Jones
ac104d7b03
Add better tolerance for null/None values and enforce that an Asset's duration must exist: if not it is defaulted to 10. Fixes #61 and #53
2013-02-13 22:35:51 -05:00
Viktor Petersson
40c3a694ca
Improve logic to hide 'Update Available' if we're unable to determine the current status.
2013-02-13 18:39:09 +01:00
Viktor Petersson
0aaa72d813
Merge branch 'screenly-ui' of github.com:wireload/screenly-ose into screenly-ui
2013-02-13 18:34:11 +01:00
Viktor Petersson
5c8e605494
Refined update checker to only check for updates once per day.
2013-02-13 18:33:56 +01:00
Zachary Jones
4bf7c90551
Refactor template response generation to allow us to add global context.
2013-02-13 10:35:24 -06:00
Zachary Jones
30cc3aa329
Replace splash page with a Haml equivalent.
2013-02-13 10:23:00 -06:00
Viktor Petersson
4d539b72e9
Implemented simple update checker. If the local SHA doesn't match the SHA of master, the 'Update Available' note will show up in the header.
...
This won't currently work, since we're working out of the screenly-ui branch.
2013-02-13 13:37:39 +01:00
Zachary Jones
bdf4081aaa
Merge branch 'screenly-ui' of github.com:wireload/screenly-ose into screenly-ui
...
Conflicts:
server.py
2013-02-12 14:05:12 -06:00
Márton Boros
bab76f1210
remove unused
2013-02-12 20:03:15 +01:00
Zachary Jones
a85933e285
Add ability to change Screenly settings via the /settings page. Closes #47
2013-02-12 12:50:30 -06:00
Zachary Jones
9b9c26205b
Restructure the way settings are stored so that we can reload them in-memory when they are changed.
2013-02-12 12:41:23 -06:00
Zachary Jones
68466bab69
Add initial asset deletion functionality.
2013-02-09 19:02:55 -06:00
Zachary Jones
4aedc3dd6a
Quick hack to set an Asset's ID.
...
Backbone assumes that a model's unique ID is called 'id' and as such uses the existence of this attribute to determine whether an instance is "new" or not, where new means it doesn't exist on the server. However, Screenly's Asset model does not follow this convention, instead using 'asset_id' as the field. I added an initialize method which simply sets the 'id' property to the value of 'asset_id' if it exists.
2013-02-09 15:43:27 -06:00
Zachary Jones
1dce4608ce
Merge branch 'master' into screenly-ui
...
Conflicts:
utils.py
2013-02-08 18:34:12 -06:00
Zachary Jones
f0f67356d2
Make node IP introspection more robust. Should solve #49
...
Try multiple network interfaces when determining the node's IP address. Also, show correct port according to the settings.listen_port value. Previously was hardcoded to 8080, which may not be true if you've customized your port.
2013-02-08 18:16:27 -06:00
Zachary Jones
5ad5a2c7bb
Initiate the database when the server starts so we can always be sure it has been.
...
Remove the two places prior where we were doing this. I found if you started the server fresh and visited any page other than the home page first you got errors. This will confirm that the database always exists.
2013-02-08 17:44:28 -06:00
Zachary Jones
f33b25d466
Add spaces to adhere to PEP 8 .
2013-02-08 17:43:14 -06:00
Viktor Petersson
2e8b4c42ce
Massaged the output for display information.
2013-02-08 13:38:32 +01:00
Viktor Petersson
d60931f477
Improved uptime logic.
2013-02-08 12:57:37 +01:00
Viktor Petersson
ba017a891d
Fine tuned disk calculation to also work on OS X ( http://stackoverflow.com/questions/787776/find-free-disk-space-in-python-on-os-x ).
2013-02-08 11:56:35 +01:00
Viktor Petersson
3f25e3be60
Added rounding to load average.
2013-02-08 11:50:51 +01:00
Zachary Jones
daa24fe945
Add initial, empty Settings page.
2013-02-07 15:41:46 -06:00
Zachary Jones
d2a23838a3
Make forms use multipart encoding so that files go through.
2013-02-05 15:59:35 -06:00
Zachary Jones
b8501ee240
Add simple, new Bootstrap-ized System Info page.
2013-02-04 17:25:59 -06:00
Zachary Jones
c599d709a5
Initial Edit Asset functionality with modal.
...
Some refactoring in progress to share the same modal view and template between add/edit operations.
2013-02-03 17:07:33 -06:00
Zachary Jones
c0e3a5dd0c
Cut off the microsecond portion of date.
...
Backbone doesn't return microseconds when you save(), though our Add system does return the ISO format including microseconds. We don't need that much precision for our purposes, so let's just strip it out if it is there.
2013-01-31 16:14:50 -06:00
Zachary Jones
4eea5eb1e0
Add import for json
...
Forgot to add this chunk previously.
2013-01-31 15:28:24 -06:00
Zachary Jones
1b9ec462a8
Add API endpoint to modify an asset using Backbone
2013-01-30 19:47:30 -06:00
Zachary Jones
47dfdee1af
Add time to Add Asset form.
...
The start and end date/time of the Asset is now saved to the database.
2013-01-29 16:03:23 -06:00
Zachary Jones
a72a6d72f1
Realized the URI was not being saved to the database.
2013-01-28 18:56:24 -06:00
Zachary Jones
9e9d4a583f
Preliminary Add Asset functionality.
...
Actually adds to the database now. However, we're using a regular POST form to create the new asset and return a redirect back to the index page. Uploading files with Backbone to an API is apparently tricky and there are complicated best practices I don't fully understand yet.
2013-01-26 19:29:17 -06:00
Zachary Jones
74727d5506
Remove 'resolution' key from Asset object.
...
Since we're not actually using resolution for anything at this point (it's not saved to the database), it's wasted. Awaiting further clarification.
2013-01-26 19:05:59 -06:00
Zachary Jones
aebddd0dad
Start work on creating an API that can be used to create new Assets via Backbone models.
2013-01-25 14:33:57 -06:00
Jeremy Mortis
cf73904fe4
Fix problem with uploading assets (issue #43 )
2013-01-24 14:50:00 -07:00
Zachary Jones
81768050ac
Merge branch 'master' into screenly-ui
...
Conflicts:
server.py
2013-01-24 14:59:17 -06:00
Zachary Jones
cc3a29de66
Updates for code readability and PEP 8.
2013-01-24 14:55:52 -06:00
Zachary Jones
176b984443
Merge branch 'master' into screenly-ui
...
Conflicts:
requirements.txt
server.py
2013-01-23 17:16:46 -06:00
Zachary Jones
e913e2f0f5
get_assets() is deprecated and no longer needed.
...
fetch_assets() performs the same function with more flexibility and should be used instead.
2013-01-23 16:37:22 -06:00
Alexander Ljungberg
282376a465
More tests. Simplify code.
2013-01-23 16:37:36 +00:00