Skip to content

Commit

Permalink
Merge branch 'release/1.5.6'
Browse files Browse the repository at this point in the history
  • Loading branch information
Henjuro committed Nov 17, 2018
2 parents 80578b0 + d524be2 commit bcccdae
Show file tree
Hide file tree
Showing 11 changed files with 45 additions and 50 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
#Changelog
* 1.5.6:
* Improvements:
* Carriers added to dps group
* Removed now useless fileinput for TypeIds update
* Fixes:
* Fixed fleet view not working
* Changes:
* Made default logfile location the cwd
* 1.5.5:
* Improvements:
* Added rules for sorting titans/supers into dps
Expand Down
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ For library licenses see licenses folder


# Installation
1. install python 3.6
1. install python >=3.6
2. install all the requirements by doing pip install -r requirements.txt
3. install your database connection library
4. run `python main.py` to create a default confige file
Expand All @@ -22,19 +22,19 @@ For library licenses see licenses folder
7. open `config\config.cfg` in your favorite text editor
8. configure the settings in the `config.cfg`
9. run `python manager.py db upgrade` which creates the database schema
10. run `python setup_basic.py` to create needed scopes
11. execute `python create_admin.py` to create the initial admin account.
10. execute `python create_admin.py` to create the initial admin account.
Enter the character name of your main character as account name, then enter the same name as character to associate.
When asked for more characters just press enter without entering anything.
Further admin accounts can be created over the account management on the website
12. create a folder called `sde` in the waitlists base dir (this is where sde data uploads are saved)
13. Use the command `pybabel compile -d translations` to compile the translation files.
11. create a folder called `sde` in the waitlists base dir (this is where sde data uploads are saved)
12. Use the command `pybabel compile -d translations` to compile the translation files.
13. Got to `static\js\config\` and create a `stattool_config.js` (an example file is in there with the options)
14. Start the waitlist with `python main.py` and visit it to login with the character that was setup as adming in the previous step.
15. Now configure groups and permissions :)
16. Import needed static data! You can find the interface for it under `Setting`->`Static Data Import`.
The Eve Static Date Export can be found at [Eve Resources](https://developers.eveonline.com/resource/resources).
Mandatory are: typeIDs.yaml, staStations.yaml and updating systems and constellations!
The systems and constellations are updated via esi and can take quite a while.
Mandatory are: staStations.yaml and upating typeIds, systems and constellations!
The typeIds, systems and constellations are updated via esi and can take quite a while.
Updating systems and constellations can fail quietly, so check the error log afterwards.
17. If you write any improvements committing code back to this project is very much appreciated!

Expand Down
6 changes: 3 additions & 3 deletions config/logger.base.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"handlers": {
"error": {
"class": "logging.handlers.TimedRotatingFileHandler",
"filename": "/var/log/pywaitlist/error.log",
"filename": "error.log",
"formatter": "main",
"level": "ERROR",
"when": "midnight",
Expand All @@ -17,7 +17,7 @@
},
"info": {
"class": "logging.handlers.TimedRotatingFileHandler",
"filename": "/var/log/pywaitlist/info.log",
"filename": "info.log",
"formatter": "main",
"level": "INFO",
"filters": ["info_and_warning"],
Expand All @@ -27,7 +27,7 @@
},
"debug": {
"class": "logging.handlers.TimedRotatingFileHandler",
"filename": "/var/log/pywaitlist/debug.log",
"filename": "debug.log",
"formatter": "main",
"level": "DEBUG",
"filters": ["only_debug"],
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ bcrypt>=3.1.1
blinker>=1.4
gevent>=1.3.1
requests>=2.18.4
esipy>=0.4.3
esipy==0.5.0
Flask-Assets>=0.12
Flask-htmlmin>=1.2
Flask-Login>=0.4.1
Expand Down
23 changes: 11 additions & 12 deletions static/js/fleetview/fleetview.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ if (!waitlist) {
}

waitlist.fleetview = (function(){
let exports = {}; // going to hold our exports

let getMetaData = waitlist.base.getMetaData;
// holds the index database we are using
let db;
Expand Down Expand Up @@ -187,7 +189,7 @@ waitlist.fleetview = (function(){
if (notFoundIds.length > 0) {
const promis = getShipInfo(notFoundIds);
promis.then(function(value) {
value.forEach(function (element) {
value.body.forEach(function (element) {
const nameData = element;
const shipStore = db.transaction('ships', 'readwrite').objectStore('ships');
shipStore.add(nameData).onsuccess = function (event) {
Expand Down Expand Up @@ -257,7 +259,7 @@ waitlist.fleetview = (function(){
if (!('result' in event.target) || event.target.result === undefined) {
const promis = getCharacterInfo(charID);
promis.then(function(value) {
const character = value;
const character = value.body;
character.characterID = charID;
const characterStore = db.transaction('characters', 'readwrite').objectStore('characters');
characterStore.add(character).onsuccess = function (event) {
Expand Down Expand Up @@ -289,30 +291,27 @@ waitlist.fleetview = (function(){
}

function getShipInfo(shipIDs) {
return window.clientv2.apis.Universe.post_universe_names({ids: shipIDs}, {responseContentType: 'application/json'});
return exports.esi_client.apis.Universe.post_universe_names({ids: shipIDs}, {responseContentType: 'application/json'});
}

function getCharacterInfo(characterID) {
return window.clientv4.apis.Character.get_characters_character_id({character_id: characterID}, {responseContentType: 'application/json'});
return exports.esi_client.apis.Character.get_characters_character_id({character_id: characterID}, {responseContentType: 'application/json'});
}

$(document).ready(function() {
window.clientv4 = new SwaggerClient("https://esi.tech.ccp.is/v4/swagger.json")
new SwaggerClient(getMetaData('local-esi-json'))
.then((client) => {
exports.esi_client = client;
})
.catch((event) => {
console.log("SwaggerError");
console.log(event);
}
);

window.clientv2 = new SwaggerClient("https://esi.tech.ccp.is/v2/swagger.json")
.catch((event) => {
console.log("SwaggerError");
console.log(event);
}
);
// make sure translations are loaded
i18nloaded.then(() => {
setupDB();
});
});
return exports;
})();
File renamed without changes.
27 changes: 12 additions & 15 deletions templates/settings/fleetspy/spy.html
Original file line number Diff line number Diff line change
@@ -1,19 +1,18 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.1/css/bootstrap.min.css" integrity="sha384-WskhaSGFgHYWDcbwN70/dfYBj47jz9qbsMId/iRN3ewGhXQFZCSftd1LZCfmhktB" crossorigin="anonymous">
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js" integrity="sha256-hwg4gsxgFZhOsEEamdOYGBf13FyQuiTwlAQgxVSNgt4=" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.0/umd/popper.min.js" integrity="sha384-cs/chFZiN24E4KMATLdqdvsezGxaGsi4hLGOzlXwp5UZB1LY//20VyM2taTB4QvJ" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.1/js/bootstrap.min.js" integrity="sha384-smHYKdLADwkXOn1EmN1qk/HfnUcbVRZyYmZ4qpPea6sjB/pTJ0euyQp0Mk8ck+5T" crossorigin="anonymous"></script>
{% assets filters="babili", output="gen/fleetview.%(version)s.js", "js/swagger-client.min.js", "js/fleetview/fleetview.js" %}
{% extends "base.html" %}

{% block title %}{{ _('Overview') }}{% endblock %}

{% block head %}
<meta name="fleet-spy" content="{{url_for('fleet.print_fleet', fleetid=-1)}}">
<meta name="local-esi-json" content="{{ url_for('static', filename='swagger.json') }}">
{{ super() }}
{% assets filters="babili", output="gen/fleetview.%(version)s.js", "js/fleetview/fleetview.js" %}
<script type="text/javascript" src="{{ ASSET_URL }}"></script>
{% endassets %}
{% endblock %}

<meta name="fleet-spy" content="{{url_for('fleet.print_fleet', fleetid=-1)}}">
<body>
<div class="container">
{% block container_data %}
<div class="row" id="controls">
<div class="input-group">
<select autocomplete="off" class="form-control" id="fleetSelect">
Expand All @@ -34,6 +33,4 @@
</tbody>
</table>
</div>
</div>
</body>
</html>
{% endblock %}
9 changes: 0 additions & 9 deletions templates/settings/sde.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,6 @@
<div class="row mb-3">
<form class="form-inline" action="{{url_for('sde.update_type_ids')}}" method="post" enctype="multipart/form-data">
<input type="hidden" name="_csrf_token" value="{{ csrf_token() }}">
<div class="input-group mr-1">
<div class="input-group-prepend">
<span class="input-group-text">typeIDs.yaml</span>
</div>
<div class="custom-file">
<input type="file" name="file" data-target="#typeid-file-label" class="custom-file-input" id="typeid-file">
<label id="typeid-file-label" class="custom-file-label" data-content="Choose file..." for="typeid-file"></label>
</div>
</div>
<button type="submit" class="btn btn-primary">{{ _('Update typeIDs') }}</button>
</form>
</div>
Expand Down
2 changes: 1 addition & 1 deletion waitlist/data/version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
version = "1.5.5-$Format:%h$"
version = "1.5.6-$Format:%h$"
2 changes: 1 addition & 1 deletion waitlist/storage/modules.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
47271: "Leshark"
}

dps_groups = {659: 'Supercarrier', 30: 'Titan'}
dps_groups = {659: 'Supercarrier', 30: 'Titan', 547: 'Carrier'}
logi_groups = {1538: 'Force Auxiliary'}
sniper_groups = {}

Expand Down
2 changes: 1 addition & 1 deletion waitlist/utility/swagger/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@ def header_to_datetime(header) -> datetime:
def get_api() -> App:
global cached_api
if cached_api is None:
cached_api = App.create('resources/swagger.json')
cached_api = App.create('static/swagger.json')
return cached_api

0 comments on commit bcccdae

Please sign in to comment.