Skip to content

Commit

Permalink
Merge pull request #64 from idealista/develop
Browse files Browse the repository at this point in the history
Develop to Master
  • Loading branch information
Gkrlo authored Apr 11, 2018
2 parents 06ac991 + 1993069 commit 0882243
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 9 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ This project adheres to [Semantic Versioning](http://semver.org/) and [Keep a ch

## [Unreleased](https://github.com/idealista/prom2teams/tree/develop)


## [2.0.3](https://github.com/idealista/prom2teams/tree/2.0.3)
[Full Changelog](https://github.com/idealista/prom2teams/compare/2.0.2...2.0.3)
### Fixed
- *[#61](https://github.com/idealista/prom2teams/pull/63) Fix getting 404 errors - SERVER_NAME removed from flask app* @Gkrlo

## [2.0.2](https://github.com/idealista/prom2teams/tree/2.0.2)
[Full Changelog](https://github.com/idealista/prom2teams/compare/2.0.1...2.0.2)
### Fixed
Expand Down
2 changes: 1 addition & 1 deletion bin/wsgi.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@

if __name__ == "__main__":
host = application.config['HOST']
port = application.config['PORT']
port = int(application.config['PORT'])
application.run(host=host, port=port)
2 changes: 1 addition & 1 deletion prom2teams/app/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,4 @@ def init_app(application):


init_app(app)
log.info(app.config['APP_NAME'] + ' started on ' + app.config['SERVER_NAME'])
log.info('{} started on {}:{}'.format(app.config['APP_NAME'], app.config['HOST'], app.config['PORT']))
5 changes: 0 additions & 5 deletions prom2teams/app/configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,17 +34,12 @@ def _update_application_configuration(application, configuration):
if 'Log' in configuration and 'Path' in configuration['Log']:
application.config['LOG_FILE_PATH'] = configuration['Log']['Path']
if 'HTTP Server' in configuration:
_host, _port = application.config['SERVER_NAME'].split(':', 1)
if 'Host' in configuration['HTTP Server']:
_host = configuration['HTTP Server']['Host']
application.config['HOST'] = _host
if 'Port' in configuration['HTTP Server']:
_port = configuration['HTTP Server']['Port']
application.config['PORT'] = _port
if 'Name' in configuration['HTTP Server']:
application.config['SERVER_NAME'] = configuration['HTTP Server']['Name']
else:
application.config['SERVER_NAME'] = _host + ':' + _port


def _config_provided(filepath):
Expand Down
1 change: 0 additions & 1 deletion prom2teams/config/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
PORT = 8089
# Flask settings
DEBUG = False
SERVER_NAME = 'localhost:8089'

# Flask-Restplus settings
SWAGGER_UI_DOC_EXPANSION = 'list'
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def read_requirements_file():


setup(name='prom2teams',
version='2.0.2',
version='2.0.3',
description='Project that redirects Prometheus Alert Manager '
'notifications to Microsoft Teams',
long_description=readme,
Expand Down

0 comments on commit 0882243

Please sign in to comment.