aa-structures


Nameaa-structures JSON
Version 1.3.5 PyPI version JSON
download
home_pagehttps://gitlab.com/ErikKalkoken/aa-structures
SummaryApp for managing Eve Online structures with Alliance Auth
upload_time2020-07-03 22:11:11
maintainer
docs_urlNone
authorErik Kalkoken
requires_python~=3.6
licenseMIT
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Structures

App for managing Eve Online structures with
Alliance Auth.

![release](https://img.shields.io/pypi/v/aa-structures?label=release) ![python](https://img.shields.io/pypi/pyversions/aa-structures) ![django](https://img.shields.io/pypi/djversions/aa-structures?label=django) ![pipeline](https://gitlab.com/ErikKalkoken/aa-structures/badges/master/pipeline.svg) ![coverage](https://gitlab.com/ErikKalkoken/aa-structures/badges/master/coverage.svg) ![license](https://img.shields.io/badge/license-MIT-green) ![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)

## Contents

- [Overview](#overview)
- [Features Summary](#features-summary)
- [Screenshots](#screenshots)
- [Installation](#installation)
- [Updating](#updating)
- [Features](#features)
- [Settings](#settings)
- [Permissions](#permissions)
- [Service monitoring](#service-monitoring)
- [Admin tool](#admin-tools)
- [Change Log](CHANGELOG.md)

## Overview

This app is for managing Eve Online structures with [Alliance Auth](https://gitlab.com/allianceauth/allianceauth) (AA). It allows all member corporations to see a current list of all their structures in Auth and also get structure related notification on Discord.

## Features Summary

Structures adds the following main features to Alliance Auth:

- Structure browser with a detailed list of all structures owned by member corporations, automatically synced with the game server
- Structures include all Upwell structures, Custom Offices and Starbases / POSes
- Automatically forwards structure notifications to Discord channels as alerts
- Notification categories include Upwell Structures, Moon Mining, Customs Offices, Starbases and Sovereignty
- Automatically adds timers from notifications to Alliance Auth timerboard app (if installed)
- Permissions define which structures are visible to a user based on organization membership
- Self-defined tags help to better organize structures
- Interface for 3rd party monitoring of the services status
- Chinese :cn:, English :us: and German :de: localization

*We are looking for help with translating Structures for more languages incl. French, Korean, Russian, and Spanish. If you are interested please sign up on our [Transifex project](https://www.transifex.com/kalkoken-apps/aa-structures/).*

## Screenshots

Here is an example for the structure browser:

![StructureList](https://i.imgur.com/WtiRap3.png)

This is an example for a notification posted on Discord:

![Notification example](https://i.imgur.com/OrJsQfW.png)

## Installation

**Important**: This app is a plugin for Alliance Auth. If you don't have Alliance Auth running already, please install it first before proceeding. (see the official [AA installation guide](https://allianceauth.readthedocs.io/en/latest/installation/auth/allianceauth/) for details)

### Step 1 - Install app

Make sure you are in the virtual environment (venv) of your Alliance Auth installation. Then install the newest release from PyPI:

```bash
pip install aa-structures
```

### Step 2 - Update Eve Online app

Update the Eve Online app used for authentication in your AA installation to include the following scopes:

```plain
esi-assets.read_corporation_assets.v1
esi-characters.read_notifications.v1
esi-corporations.read_starbases.v1
esi-corporations.read_structures.v1
esi-planets.read_customs_offices.v1
esi-universe.read_structures.v1
```

### Step 3 - Configure AA settings

Configure your AA settings (`local.py`) as follows:

- Add `'structures'` to `INSTALLED_APPS`
- Add below lines to your settings file:

```python
CELERYBEAT_SCHEDULE['structures_update_all_structures'] = {
    'task': 'structures.tasks.update_all_structures',
    'schedule': crontab(minute='*/30'),
}
CELERYBEAT_SCHEDULE['structures_fetch_all_notifications'] = {
    'task': 'structures.tasks.fetch_all_notifications',
    'schedule': crontab(minute='*/5'),
}
CELERYBEAT_SCHEDULE['structures_send_all_new_notifications'] = {
    'task': 'structures.tasks.send_all_new_notifications',
    'schedule': crontab(minute='*/1'),
}
```

- Optional: Add additional settings if you want to change any defaults. See [Settings](#settings) for the full list.

### Step 4 - Celery worker configuration

This app uses celery for critical functions like refreshing data from ESI. We strongly recommend to enable the following additional settings for celery workers to enable proper logging and to protect against potential memory leaks:

- To enable logging of celery tasks up to info level: `-l info`

- To automatically restart workers that grow above 256 MB: `--max-memory-per-child 262144`

Here is how an example config would look for workers in your `supervisor conf`:

```plain
command=/home/allianceserver/venv/auth/bin/celery -A myauth worker -l info --max-memory-per-child 262144
```

Note that you need to restart the supervisor service itself to activate these changes.

e.g. on Ubuntu:

```bash
systemctl restart supervisor
```

### Step 5 - Finalize installation into AA

Run migrations & copy static files

```bash
python manage.py migrate
python manage.py collectstatic
```

Restart your supervisor services for AA

### Step 6 - Setup permissions

Now you can setup permissions in Alliance Auth for your users.

See section [Permissions](#permissions) below for details.

### Step 7 - Setup notifications to Discord

The setup and configuration for Discord webhooks is done on the admin page under **Structures**.

To setup notifications you first need to add the Discord webhook that point to the channel you want notifications to appear to **Webhooks**. We would recommend that you also enable `is_default` for your main webhook, so that newly added structure owners automatically use this webhook. Alternatively you need to manually assign webhooks to existing owners after they have been added (see below).

Finally to verify that your webhook is correctly setup you can send a test notification. This is one of the available actions on Webhooks page.

### Step 8 - Add structure owners

Next you need to add your first structure owner with the character that will be used for fetching structures. Just open the Structures app and click on "Add Structure Owner". Note that only users with the appropriate permission will be able to see and use this function and that the character needs to be a director.

Once a structure owner is set the app will start fetching the corporation structures and related notifications. Wait a minute and then reload the structure list page to see the result.

You will need to add every corporation as Structure Owner to include their structures and notifications in the app.

Note that as admin you can review all structures and notifications on the admin panel.

## Updating

To update your existing installation of Structures first enable your virtual environment.

Then run the following commands from your AA project directory (the one that contains `manage.py`).

```bash
pip install -U aa-structures
```

```bash
python manage.py migrate
```

```bash
python manage.py collectstatic
```

Finally restart your AA supervisor services.

## Features

In this section you find a detailed description of the following key features:

- [Localization](#localization)
- [Notifications](#notifications)
- [Power Modes](#power-modes)
- [Pings](#pings)
- [Structure tags](#structure-tags)
- [Timers](#timers)

### Localization

Structures has full localization for languages support by Alliance Auth. This chapter describes how to set the language for different parts of the app:

#### UI

To switch the UI to your preferred language simply use the language switcher from Auth.

#### Notifications on Discord

The language for notifications on Discord can be chosen by configuring the language property for the respective Webhook. The default language will be used if no language is configured for a Webhook.

#### Default language

The default language will be used when no specific language have been configured or no language can be determined. The default language can be defined with the setting `STRUCTURES_DEFAULT_LANGUAGE`.

The following parts of the app will use localization with the default language:

- Timers
- Name of Custom Offices

### Notifications

#### Message rendering on Discord

All notification types are classified in into one of four semantic categories. These categories determine the color of the notification on Discord and whether pings are created.

Category | Color | Ping
-- | -- | --
success | green | None
info | blue | None
warning | yellow | @here
danger | red | @everyone

The mapping between notification types and semantic categories is predefined and can at the moment not be individually configured.

But it is possible to turn off pinging for all notifications per webhook and/or per owner on the admin site.

#### Supported notification types

The following Eve Online notification types are currently supported (names are from ESI):

##### Moon Mining

- MoonminingAutomaticFracture
- MoonminingExtractionCancelled
- MoonminingExtractionFinished
- MoonminingExtractionStarted
- MoonminingLaserFired

##### Upwell Structures

- OwnershipTransferred
- StructureAnchoring
- StructureDestroyed
- StructureFuelAlert
- StructureLostArmor
- StructureLostShields
- StructureOnline
- StructureServicesOffline
- StructureUnanchoring
- StructureUnderAttack
- StructureWentHighPower
- StructureWentLowPower

##### POCOs

- OrbitalAttacked
- OrbitalReinforced

##### Starbases

- TowerAlertMsg
- TowerResourceAlertMsg

##### Sovereignty

- EntosisCaptureStarted
- SovAllClaimAquiredMsg
- SovCommandNodeEventStarted
- SovStructureReinforced
- SovStructureDestroyed

### Power Modes

Structures will display the current power mode of an Upwell structure if it can be determined.

Current supported power modes are:

- Full Power
- Low Power
- Abandoned

Note that the power modes are inferred, since ESI does not provide the current power mode of structures. So they may not be 100% accurate.

If it is unclear wether a structure is "Low Power" or "Abandoned", the power mode will be shown as "Abandoned?". This usually happens if a structure already was on "Low Power" before this update has been installed, so the app has no information when it was last online. As mitigation you can manually update the field "last online at" for a structure on the admin site.

### Structure tags

Structure tags are colored text labels that can be attached to individual structures. Their main purpose is to provide an easy way to organize structures. Tags are shown below the name on the structure list and you can filter the structure list by tags.

For example you might be responsible for fueling structures in your alliance and there are a couple structures that you do not need to care about. With structure tags you can just apply a tag like "fueling" to those structures that you need to manage and then filter the structure list to only see those.

There are two kinds of structure tags: Custom tags and generated tags

#### Custom tags

Custom tags are created by users. You can created them on the admin panel under Structure tags, give them any name, color and define its order. Existing structure tags can be assigned to a structure on the structures page within the admin panel.

You can also define custom tags as default. Default tags are automatically added to every newly added structure. Furthermore you enable default tags to be your default tag filter to be active when opening the structure list (see [Settings](#settings))

#### Generated tags

Generated tags are automatically created by and added to structures by the system. These tags are calculated based on properties of a structure. The purpose of generated tags is to provide additional information and filter options for structures in the structure list.

There are currently two types of generated tags:

- space type: Shows which space type the structure is in, e.g. null sec or low sec
- sov: Shows that the owner of that structures has sovereignty in the respective solar system

### Timers

**Structures** will automatically create friendly timers from  notifications for Alliance Auth's Structure Timers app. This feature can be configured via [Settings](#settings).

Timers can be created from the following notification types:

- OrbitalReinforced
- MoonminingExtractionStarted
- SovStructureReinforced
- StructureAnchoring (excluding structures anchored in null sec)
- StructureLostArmor
- StructureLostShields

## Settings

Here is a list of available settings for this app. They can be configured by adding them to your AA settings file (`local.py`).

Note that all settings are optional and the app will use the documented default settings if they are not used.

Name | Description | Default
-- | -- | --
`STRUCTURES_ADD_TIMERS`| Whether to automatically add timers for certain notifications on the timerboard (will have no effect if [aa-timerboard](https://allianceauth.readthedocs.io/en/latest/features/timerboard/) app is not installed). Will create timers from anchoring, lost shield and lost armor notifications  | True
`STRUCTURES_ADMIN_NOTIFICATIONS_ENABLED`| whether admins will get notifications about import events like when someone adds a structure owner | True
`STRUCTURES_DEFAULT_TAGS_FILTER_ENABLED`| Enable default tags filter for structure list as default | False
`STRUCTURES_DEFAULT_LANGUAGE`| Sets the default language to be used in case no language can be determined. e.g. this language will be used when creating timers. Please use the language codes as defined in the base.py settings file. | en
`STRUCTURES_FEATURE_CUSTOMS_OFFICES`| Enable / disable custom offices feature | True
`STRUCTURES_FEATURE_STARBASES`| Enable / disable starbases feature | True
`STRUCTURES_FORWARDING_SYNC_GRACE_MINUTES`| Max time in minutes since last successful notification forwarding before service is reported as down  | 5
`STRUCTURES_HOURS_UNTIL_STALE_NOTIFICATION`| Defines after how many hours a notification is regarded as stale. Stale notifications are no longer sent automatically. | 24
`STRUCTURES_MOON_EXTRACTION_TIMERS_ENABLED`| whether to create / remove timers from moon extraction notifications  | True
`STRUCTURES_NOTIFICATION_MAX_RETRIES`| Max number of retries after a HTTP error occurred incl. rate limiting  | 3
`STRUCTURES_NOTIFICATION_SYNC_GRACE_MINUTES`| Max time in minutes since last successful notifications sync before service is reported as down  | 15
`STRUCTURES_NOTIFICATION_WAIT_SEC`| Default wait time in seconds before retrying after HTTP error (not used for rate limits)  | 5
`STRUCTURES_REPORT_NPC_ATTACKS`| Enable / disable sending notifications for attacks by NPCs (structure reinforcements are still reported) | True
`STRUCTURES_SHOW_FUEL_EXPIRES_RELATIVE`| Enable / disable whether fuel expire is shown as relative figure | True
`STRUCTURES_STRUCTURE_SYNC_GRACE_MINUTES`| Max time in minutes since last successful structures sync before service is reported as down  | 120
`STRUCTURES_TASKS_TIME_LIMIT`| Hard timeout for tasks in seconds to reduce task accumulation during outages | 7200
`STRUCTURES_TIMERS_ARE_CORP_RESTRICTED`| whether created timers are corp restricted on the timerboard  | False

## Permissions

This is an overview of all permissions used by this app:

Name | Purpose | Code
-- | -- | --
Can access this app and view | User can access the app and see the structure list. He will only be able to see structures belonging to corporations of his characters. We would suggest to enable this permission for the Member state |  `general.basic_access`
Can view alliance structures | User can view all structures belonging to corporation in the alliance of the user. |  `general.view_alliance_structures`
Can view all structures | User can see all structures in the system |  `general.view_all_structures`
Can add new structure owner | User can add a corporation with it's structures |  `general.add_structure_owner`

## Service monitoring

Alliances may want to rely on getting prompt notifications on Discord to keep their assets save. However, an app like Structures is fully dependant on external services like the Eve API (ESI) to stay operational.

In order stay alliance apprised about any potential service outages, this app has a simple HTTP interface that enables monitoring of it's service status by a 3rd party monitoring application. (e.g. [Uptimerobot](https://www.uptimerobot.com)).

The monitoring route is: `[your AA URL]/structures/service_status/`

Status | Reporting | Condition
-- | -- | --
Up | HTTP 200 and the text `service is up` | Tasks for updating of structures, updating of notifications and forwarding to webhooks have last run within the configured grace period and there are no errors
Down | HTTP 500 and the text `service is down` | Above condition for "up" not met

By default the status of all existing owners will be included in determining the overall status. However, it's also possible to manually exclude owners by setting the property "Is included in service status".

## Admin tools

### Admin site

Most admin tools are accessible on the admin site through actions. e.g. you can sent specific notifications or force a sync with the eve server for an owner.

See the respective actions list on the admin site for details.

### Management commands

Some admin tools are available only as Django management command:

- **structures_purge_all**: This task will purge ALL data of the structures app. Run this command before trying to reverse migrations (e.g. `migrate structures zero` for de-installation) or you will run into foreign key constraints.
- **structures_updatesde**: This command will reload all locally stored Eve Online data from the Eve Online server.
            

Raw data

            {
    "_id": null,
    "home_page": "https://gitlab.com/ErikKalkoken/aa-structures",
    "name": "aa-structures",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "~=3.6",
    "maintainer_email": "",
    "keywords": "",
    "author": "Erik Kalkoken",
    "author_email": "kalkoken87@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/c5/9a/c71d801391fccf9ada6357da9a78fca094836e0b0875c5048df58283db36/aa-structures-1.3.5.tar.gz",
    "platform": "",
    "description": "# Structures\n\nApp for managing Eve Online structures with\nAlliance Auth.\n\n![release](https://img.shields.io/pypi/v/aa-structures?label=release) ![python](https://img.shields.io/pypi/pyversions/aa-structures) ![django](https://img.shields.io/pypi/djversions/aa-structures?label=django) ![pipeline](https://gitlab.com/ErikKalkoken/aa-structures/badges/master/pipeline.svg) ![coverage](https://gitlab.com/ErikKalkoken/aa-structures/badges/master/coverage.svg) ![license](https://img.shields.io/badge/license-MIT-green) ![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)\n\n## Contents\n\n- [Overview](#overview)\n- [Features Summary](#features-summary)\n- [Screenshots](#screenshots)\n- [Installation](#installation)\n- [Updating](#updating)\n- [Features](#features)\n- [Settings](#settings)\n- [Permissions](#permissions)\n- [Service monitoring](#service-monitoring)\n- [Admin tool](#admin-tools)\n- [Change Log](CHANGELOG.md)\n\n## Overview\n\nThis app is for managing Eve Online structures with [Alliance Auth](https://gitlab.com/allianceauth/allianceauth) (AA). It allows all member corporations to see a current list of all their structures in Auth and also get structure related notification on Discord.\n\n## Features Summary\n\nStructures adds the following main features to Alliance Auth:\n\n- Structure browser with a detailed list of all structures owned by member corporations, automatically synced with the game server\n- Structures include all Upwell structures, Custom Offices and Starbases / POSes\n- Automatically forwards structure notifications to Discord channels as alerts\n- Notification categories include Upwell Structures, Moon Mining, Customs Offices, Starbases and Sovereignty\n- Automatically adds timers from notifications to Alliance Auth timerboard app (if installed)\n- Permissions define which structures are visible to a user based on organization membership\n- Self-defined tags help to better organize structures\n- Interface for 3rd party monitoring of the services status\n- Chinese :cn:, English :us: and German :de: localization\n\n*We are looking for help with translating Structures for more languages incl. French, Korean, Russian, and Spanish. If you are interested please sign up on our [Transifex project](https://www.transifex.com/kalkoken-apps/aa-structures/).*\n\n## Screenshots\n\nHere is an example for the structure browser:\n\n![StructureList](https://i.imgur.com/WtiRap3.png)\n\nThis is an example for a notification posted on Discord:\n\n![Notification example](https://i.imgur.com/OrJsQfW.png)\n\n## Installation\n\n**Important**: This app is a plugin for Alliance Auth. If you don't have Alliance Auth running already, please install it first before proceeding. (see the official [AA installation guide](https://allianceauth.readthedocs.io/en/latest/installation/auth/allianceauth/) for details)\n\n### Step 1 - Install app\n\nMake sure you are in the virtual environment (venv) of your Alliance Auth installation. Then install the newest release from PyPI:\n\n```bash\npip install aa-structures\n```\n\n### Step 2 - Update Eve Online app\n\nUpdate the Eve Online app used for authentication in your AA installation to include the following scopes:\n\n```plain\nesi-assets.read_corporation_assets.v1\nesi-characters.read_notifications.v1\nesi-corporations.read_starbases.v1\nesi-corporations.read_structures.v1\nesi-planets.read_customs_offices.v1\nesi-universe.read_structures.v1\n```\n\n### Step 3 - Configure AA settings\n\nConfigure your AA settings (`local.py`) as follows:\n\n- Add `'structures'` to `INSTALLED_APPS`\n- Add below lines to your settings file:\n\n```python\nCELERYBEAT_SCHEDULE['structures_update_all_structures'] = {\n    'task': 'structures.tasks.update_all_structures',\n    'schedule': crontab(minute='*/30'),\n}\nCELERYBEAT_SCHEDULE['structures_fetch_all_notifications'] = {\n    'task': 'structures.tasks.fetch_all_notifications',\n    'schedule': crontab(minute='*/5'),\n}\nCELERYBEAT_SCHEDULE['structures_send_all_new_notifications'] = {\n    'task': 'structures.tasks.send_all_new_notifications',\n    'schedule': crontab(minute='*/1'),\n}\n```\n\n- Optional: Add additional settings if you want to change any defaults. See [Settings](#settings) for the full list.\n\n### Step 4 - Celery worker configuration\n\nThis app uses celery for critical functions like refreshing data from ESI. We strongly recommend to enable the following additional settings for celery workers to enable proper logging and to protect against potential memory leaks:\n\n- To enable logging of celery tasks up to info level: `-l info`\n\n- To automatically restart workers that grow above 256 MB: `--max-memory-per-child 262144`\n\nHere is how an example config would look for workers in your `supervisor conf`:\n\n```plain\ncommand=/home/allianceserver/venv/auth/bin/celery -A myauth worker -l info --max-memory-per-child 262144\n```\n\nNote that you need to restart the supervisor service itself to activate these changes.\n\ne.g. on Ubuntu:\n\n```bash\nsystemctl restart supervisor\n```\n\n### Step 5 - Finalize installation into AA\n\nRun migrations & copy static files\n\n```bash\npython manage.py migrate\npython manage.py collectstatic\n```\n\nRestart your supervisor services for AA\n\n### Step 6 - Setup permissions\n\nNow you can setup permissions in Alliance Auth for your users.\n\nSee section [Permissions](#permissions) below for details.\n\n### Step 7 - Setup notifications to Discord\n\nThe setup and configuration for Discord webhooks is done on the admin page under **Structures**.\n\nTo setup notifications you first need to add the Discord webhook that point to the channel you want notifications to appear to **Webhooks**. We would recommend that you also enable `is_default` for your main webhook, so that newly added structure owners automatically use this webhook. Alternatively you need to manually assign webhooks to existing owners after they have been added (see below).\n\nFinally to verify that your webhook is correctly setup you can send a test notification. This is one of the available actions on Webhooks page.\n\n### Step 8 - Add structure owners\n\nNext you need to add your first structure owner with the character that will be used for fetching structures. Just open the Structures app and click on \"Add Structure Owner\". Note that only users with the appropriate permission will be able to see and use this function and that the character needs to be a director.\n\nOnce a structure owner is set the app will start fetching the corporation structures and related notifications. Wait a minute and then reload the structure list page to see the result.\n\nYou will need to add every corporation as Structure Owner to include their structures and notifications in the app.\n\nNote that as admin you can review all structures and notifications on the admin panel.\n\n## Updating\n\nTo update your existing installation of Structures first enable your virtual environment.\n\nThen run the following commands from your AA project directory (the one that contains `manage.py`).\n\n```bash\npip install -U aa-structures\n```\n\n```bash\npython manage.py migrate\n```\n\n```bash\npython manage.py collectstatic\n```\n\nFinally restart your AA supervisor services.\n\n## Features\n\nIn this section you find a detailed description of the following key features:\n\n- [Localization](#localization)\n- [Notifications](#notifications)\n- [Power Modes](#power-modes)\n- [Pings](#pings)\n- [Structure tags](#structure-tags)\n- [Timers](#timers)\n\n### Localization\n\nStructures has full localization for languages support by Alliance Auth. This chapter describes how to set the language for different parts of the app:\n\n#### UI\n\nTo switch the UI to your preferred language simply use the language switcher from Auth.\n\n#### Notifications on Discord\n\nThe language for notifications on Discord can be chosen by configuring the language property for the respective Webhook. The default language will be used if no language is configured for a Webhook.\n\n#### Default language\n\nThe default language will be used when no specific language have been configured or no language can be determined. The default language can be defined with the setting `STRUCTURES_DEFAULT_LANGUAGE`.\n\nThe following parts of the app will use localization with the default language:\n\n- Timers\n- Name of Custom Offices\n\n### Notifications\n\n#### Message rendering on Discord\n\nAll notification types are classified in into one of four semantic categories. These categories determine the color of the notification on Discord and whether pings are created.\n\nCategory | Color | Ping\n-- | -- | --\nsuccess | green | None\ninfo | blue | None\nwarning | yellow | @here\ndanger | red | @everyone\n\nThe mapping between notification types and semantic categories is predefined and can at the moment not be individually configured.\n\nBut it is possible to turn off pinging for all notifications per webhook and/or per owner on the admin site.\n\n#### Supported notification types\n\nThe following Eve Online notification types are currently supported (names are from ESI):\n\n##### Moon Mining\n\n- MoonminingAutomaticFracture\n- MoonminingExtractionCancelled\n- MoonminingExtractionFinished\n- MoonminingExtractionStarted\n- MoonminingLaserFired\n\n##### Upwell Structures\n\n- OwnershipTransferred\n- StructureAnchoring\n- StructureDestroyed\n- StructureFuelAlert\n- StructureLostArmor\n- StructureLostShields\n- StructureOnline\n- StructureServicesOffline\n- StructureUnanchoring\n- StructureUnderAttack\n- StructureWentHighPower\n- StructureWentLowPower\n\n##### POCOs\n\n- OrbitalAttacked\n- OrbitalReinforced\n\n##### Starbases\n\n- TowerAlertMsg\n- TowerResourceAlertMsg\n\n##### Sovereignty\n\n- EntosisCaptureStarted\n- SovAllClaimAquiredMsg\n- SovCommandNodeEventStarted\n- SovStructureReinforced\n- SovStructureDestroyed\n\n### Power Modes\n\nStructures will display the current power mode of an Upwell structure if it can be determined.\n\nCurrent supported power modes are:\n\n- Full Power\n- Low Power\n- Abandoned\n\nNote that the power modes are inferred, since ESI does not provide the current power mode of structures. So they may not be 100% accurate.\n\nIf it is unclear wether a structure is \"Low Power\" or \"Abandoned\", the power mode will be shown as \"Abandoned?\". This usually happens if a structure already was on \"Low Power\" before this update has been installed, so the app has no information when it was last online. As mitigation you can manually update the field \"last online at\" for a structure on the admin site.\n\n### Structure tags\n\nStructure tags are colored text labels that can be attached to individual structures. Their main purpose is to provide an easy way to organize structures. Tags are shown below the name on the structure list and you can filter the structure list by tags.\n\nFor example you might be responsible for fueling structures in your alliance and there are a couple structures that you do not need to care about. With structure tags you can just apply a tag like \"fueling\" to those structures that you need to manage and then filter the structure list to only see those.\n\nThere are two kinds of structure tags: Custom tags and generated tags\n\n#### Custom tags\n\nCustom tags are created by users. You can created them on the admin panel under Structure tags, give them any name, color and define its order. Existing structure tags can be assigned to a structure on the structures page within the admin panel.\n\nYou can also define custom tags as default. Default tags are automatically added to every newly added structure. Furthermore you enable default tags to be your default tag filter to be active when opening the structure list (see [Settings](#settings))\n\n#### Generated tags\n\nGenerated tags are automatically created by and added to structures by the system. These tags are calculated based on properties of a structure. The purpose of generated tags is to provide additional information and filter options for structures in the structure list.\n\nThere are currently two types of generated tags:\n\n- space type: Shows which space type the structure is in, e.g. null sec or low sec\n- sov: Shows that the owner of that structures has sovereignty in the respective solar system\n\n### Timers\n\n**Structures** will automatically create friendly timers from  notifications for Alliance Auth's Structure Timers app. This feature can be configured via [Settings](#settings).\n\nTimers can be created from the following notification types:\n\n- OrbitalReinforced\n- MoonminingExtractionStarted\n- SovStructureReinforced\n- StructureAnchoring (excluding structures anchored in null sec)\n- StructureLostArmor\n- StructureLostShields\n\n## Settings\n\nHere is a list of available settings for this app. They can be configured by adding them to your AA settings file (`local.py`).\n\nNote that all settings are optional and the app will use the documented default settings if they are not used.\n\nName | Description | Default\n-- | -- | --\n`STRUCTURES_ADD_TIMERS`| Whether to automatically add timers for certain notifications on the timerboard (will have no effect if [aa-timerboard](https://allianceauth.readthedocs.io/en/latest/features/timerboard/) app is not installed). Will create timers from anchoring, lost shield and lost armor notifications  | True\n`STRUCTURES_ADMIN_NOTIFICATIONS_ENABLED`| whether admins will get notifications about import events like when someone adds a structure owner | True\n`STRUCTURES_DEFAULT_TAGS_FILTER_ENABLED`| Enable default tags filter for structure list as default | False\n`STRUCTURES_DEFAULT_LANGUAGE`| Sets the default language to be used in case no language can be determined. e.g. this language will be used when creating timers. Please use the language codes as defined in the base.py settings file. | en\n`STRUCTURES_FEATURE_CUSTOMS_OFFICES`| Enable / disable custom offices feature | True\n`STRUCTURES_FEATURE_STARBASES`| Enable / disable starbases feature | True\n`STRUCTURES_FORWARDING_SYNC_GRACE_MINUTES`| Max time in minutes since last successful notification forwarding before service is reported as down  | 5\n`STRUCTURES_HOURS_UNTIL_STALE_NOTIFICATION`| Defines after how many hours a notification is regarded as stale. Stale notifications are no longer sent automatically. | 24\n`STRUCTURES_MOON_EXTRACTION_TIMERS_ENABLED`| whether to create / remove timers from moon extraction notifications  | True\n`STRUCTURES_NOTIFICATION_MAX_RETRIES`| Max number of retries after a HTTP error occurred incl. rate limiting  | 3\n`STRUCTURES_NOTIFICATION_SYNC_GRACE_MINUTES`| Max time in minutes since last successful notifications sync before service is reported as down  | 15\n`STRUCTURES_NOTIFICATION_WAIT_SEC`| Default wait time in seconds before retrying after HTTP error (not used for rate limits)  | 5\n`STRUCTURES_REPORT_NPC_ATTACKS`| Enable / disable sending notifications for attacks by NPCs (structure reinforcements are still reported) | True\n`STRUCTURES_SHOW_FUEL_EXPIRES_RELATIVE`| Enable / disable whether fuel expire is shown as relative figure | True\n`STRUCTURES_STRUCTURE_SYNC_GRACE_MINUTES`| Max time in minutes since last successful structures sync before service is reported as down  | 120\n`STRUCTURES_TASKS_TIME_LIMIT`| Hard timeout for tasks in seconds to reduce task accumulation during outages | 7200\n`STRUCTURES_TIMERS_ARE_CORP_RESTRICTED`| whether created timers are corp restricted on the timerboard  | False\n\n## Permissions\n\nThis is an overview of all permissions used by this app:\n\nName | Purpose | Code\n-- | -- | --\nCan access this app and view | User can access the app and see the structure list. He will only be able to see structures belonging to corporations of his characters. We would suggest to enable this permission for the Member state |  `general.basic_access`\nCan view alliance structures | User can view all structures belonging to corporation in the alliance of the user. |  `general.view_alliance_structures`\nCan view all structures | User can see all structures in the system |  `general.view_all_structures`\nCan add new structure owner | User can add a corporation with it's structures |  `general.add_structure_owner`\n\n## Service monitoring\n\nAlliances may want to rely on getting prompt notifications on Discord to keep their assets save. However, an app like Structures is fully dependant on external services like the Eve API (ESI) to stay operational.\n\nIn order stay alliance apprised about any potential service outages, this app has a simple HTTP interface that enables monitoring of it's service status by a 3rd party monitoring application. (e.g. [Uptimerobot](https://www.uptimerobot.com)).\n\nThe monitoring route is: `[your AA URL]/structures/service_status/`\n\nStatus | Reporting | Condition\n-- | -- | --\nUp | HTTP 200 and the text `service is up` | Tasks for updating of structures, updating of notifications and forwarding to webhooks have last run within the configured grace period and there are no errors\nDown | HTTP 500 and the text `service is down` | Above condition for \"up\" not met\n\nBy default the status of all existing owners will be included in determining the overall status. However, it's also possible to manually exclude owners by setting the property \"Is included in service status\".\n\n## Admin tools\n\n### Admin site\n\nMost admin tools are accessible on the admin site through actions. e.g. you can sent specific notifications or force a sync with the eve server for an owner.\n\nSee the respective actions list on the admin site for details.\n\n### Management commands\n\nSome admin tools are available only as Django management command:\n\n- **structures_purge_all**: This task will purge ALL data of the structures app. Run this command before trying to reverse migrations (e.g. `migrate structures zero` for de-installation) or you will run into foreign key constraints.\n- **structures_updatesde**: This command will reload all locally stored Eve Online data from the Eve Online server.",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "App for managing Eve Online structures with Alliance Auth",
    "version": "1.3.5",
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "md5": "ec31fd4c6b31e7002425bdb4afb5728c",
                "sha256": "82e1101f60a8fbe25b7dbe2b19473498a38cca453b1745f600b3b918195cdd8a"
            },
            "downloads": -1,
            "filename": "aa-structures-1.3.5.tar.gz",
            "has_sig": false,
            "md5_digest": "ec31fd4c6b31e7002425bdb4afb5728c",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "~=3.6",
            "size": 164079,
            "upload_time": "2020-07-03T22:11:11",
            "upload_time_iso_8601": "2020-07-03T22:11:11.154155Z",
            "url": "https://files.pythonhosted.org/packages/c5/9a/c71d801391fccf9ada6357da9a78fca094836e0b0875c5048df58283db36/aa-structures-1.3.5.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2020-07-03 22:11:11",
    "github": false,
    "gitlab": true,
    "bitbucket": false,
    "gitlab_user": null,
    "gitlab_project": "ErikKalkoken",
    "lcname": "aa-structures"
}
        
Elapsed time: 0.14265s