diff --git a/airtime_mvc/public/css/addmedia.css b/airtime_mvc/public/css/addmedia.css new file mode 100644 index 000000000..d53d8c453 --- /dev/null +++ b/airtime_mvc/public/css/addmedia.css @@ -0,0 +1,66 @@ +@CHARSET "UTF-8"; + +#recent_uploads_wrapper +{ + width: 100%; +} + /* + position: absolute; + left: 5px; + right: 5px; + bottom: 5px; + margin: 0px; + height: 350px; +} +.dataTables_scrollHeadInner > table:nth-child(1) +{ + margin: 0px; +} +*/ + +#recent_uploads h2 +{ + font-size: 1.7em; +} + +#recent_uploads_table +{ + width: 100%; +} + +#recent_uploads_table_wrapper +{ + width: 100%; +} + +table#recent_uploads_table td +{ + cursor: auto; +} + +#recent_uploads_filter +{ + float: right; + margin-top: 10px; + margin-right: 3px; +} +#recent_uploads_table_length +{ + margin: 5px; +} + +/** Vertically align radio buttons with the labels */ +#recent_uploads_filter input[type='radio'] { + vertical-align: middle; + margin-top: -3px; +} + +#recent_uploads_filter label { + padding: 0px; +} + +#recent_uploads_table .deleteFileAction +{ + text-decoration: underline; + cursor: pointer; +} diff --git a/python_apps/airtime_analyzer/airtime_analyzer/airtime_analyzer.py b/python_apps/airtime_analyzer/airtime_analyzer/airtime_analyzer.py index 9c6f746e1..66933f55a 100644 --- a/python_apps/airtime_analyzer/airtime_analyzer/airtime_analyzer.py +++ b/python_apps/airtime_analyzer/airtime_analyzer/airtime_analyzer.py @@ -10,19 +10,18 @@ from message_listener import MessageListener class AirtimeAnalyzerServer: # Constants - _CONFIG_PATH = '/etc/airtime/airtime.conf' _LOG_PATH = "/var/log/airtime/airtime_analyzer.log" # Variables _log_level = logging.INFO - def __init__(self, debug=False): + def __init__(self, config_path, debug=False): # Configure logging self.setup_logging(debug) # Read our config file - rabbitmq_config = self.read_config_file() + rabbitmq_config = self.read_config_file(config_path) # Start listening for RabbitMQ messages telling us about newly # uploaded files. @@ -55,9 +54,8 @@ class AirtimeAnalyzerServer: rootLogger.addHandler(consoleHandler) - def read_config_file(self): + def read_config_file(self, config_path): config = ConfigParser.SafeConfigParser() - config_path = AirtimeAnalyzerServer._CONFIG_PATH try: config.readfp(open(config_path)) except IOError as e: diff --git a/python_apps/airtime_analyzer/bin/airtime_analyzer b/python_apps/airtime_analyzer/bin/airtime_analyzer index 23865fdc6..85266e9b0 100755 --- a/python_apps/airtime_analyzer/bin/airtime_analyzer +++ b/python_apps/airtime_analyzer/bin/airtime_analyzer @@ -6,12 +6,14 @@ import os import airtime_analyzer.airtime_analyzer as aa VERSION = "1.0" +DEFAULT_CONFIG_PATH = '/etc/airtime/airtime.conf' print "Airtime Analyzer " + VERSION parser = argparse.ArgumentParser() parser.add_argument("-d", "--daemon", help="run as a daemon", action="store_true") parser.add_argument("--debug", help="log full debugging output", action="store_true") +parser.add_argument("--rmq-config-file", help="specify a configuration file with RabbitMQ settings (default is /etc/airtime/airtime.conf)") args = parser.parse_args() '''Ensure media_monitor isn't running before we start, because it'll move newly uploaded @@ -33,10 +35,15 @@ def check_if_media_monitor_is_running(): check_if_media_monitor_is_running() +#Default config file path +config_path = DEFAULT_CONFIG_PATH +if args.rmq_config_file: + config_path = args.rmq_config_file + if args.daemon: with daemon.DaemonContext(): - analyzer = aa.AirtimeAnalyzerServer(debug=args.debug) + analyzer = aa.AirtimeAnalyzerServer(config_path=config_path, debug=args.debug) else: # Run without daemonizing - analyzer = aa.AirtimeAnalyzerServer(debug=args.debug) + analyzer = aa.AirtimeAnalyzerServer(config_path=config_path, debug=args.debug)