Skip to content

Commit

Permalink
Merge pull request #18 from ppfeufer/development
Browse files Browse the repository at this point in the history
v2.2.1
  • Loading branch information
ppfeufer authored Sep 23, 2020
2 parents e1b19b2 + 21197d6 commit 3e962be
Show file tree
Hide file tree
Showing 12 changed files with 71 additions and 14 deletions.
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,17 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/)
and this project adheres to [Semantic Versioning](http://semver.org/).


## [2.2.1] - 2020-09-23

### Checked

- Compatibility with the upcoming changes in Alliance Auth v2.8.0 (Django 3)

### Changed

- Fleet type embed color is now a color picker in admin backend


## [2.2.0] - 2020-09-16

### Added
Expand Down
2 changes: 1 addition & 1 deletion fleetpings/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@

default_app_config = "fleetpings.apps.AaFleetpingsConfig"

__version__ = "2.2.0"
__version__ = "2.2.1"
__title__ = "Fleet Pings"
3 changes: 2 additions & 1 deletion fleetpings/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"""
settings for the admin backend
"""

from fleetpings.form import FleetTypeAdminForm
from fleetpings.models import (
FleetComm,
Webhook,
Expand Down Expand Up @@ -69,6 +69,7 @@ class FleetTypeAdmin(admin.ModelAdmin):
FleetTypeAdmin
"""

form = FleetTypeAdminForm
list_display = ("name", "embed_color", "notes", "is_enabled")
list_filter = ("is_enabled",)
filter_horizontal = ("restricted_to_group",)
Expand Down
11 changes: 11 additions & 0 deletions fleetpings/app_settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@
"AA_FLEETPINGS_USE_DOCTRINES_FROM_FITTINGS_MODULE", False
)

# AA-GDPR
AVOID_CDN = clean_setting("AVOID_CDN", False)


def get_site_url(): # regex sso url
"""
Expand Down Expand Up @@ -46,3 +49,11 @@ def fittings_installed() -> bool:
:return: bool
"""
return "fittings" in settings.INSTALLED_APPS


def avoid_cdn() -> bool:
"""
check if we should avpiod CDN usage
:return: bool
"""
return AVOID_CDN
25 changes: 25 additions & 0 deletions fleetpings/form.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# coding=utf-8

"""
form declarations
"""

from django.forms import ModelForm, TextInput
from fleetpings.models import FleetType


class FleetTypeAdminForm(ModelForm):
"""
form definitions for the FleetType form in admin
"""

class Meta:
"""
Meta
"""

model = FleetType
fields = "__all__"
widgets = {
"embed_color": TextInput(attrs={"type": "color"}),
}

This file was deleted.

2 changes: 1 addition & 1 deletion fleetpings/static/fleetpings/js/fleetpings.js
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,7 @@ jQuery(document).ready(function($) {
*
* @type Clipboard
*/
var clipboardFleetPingData = new Clipboard('button#copyFleetPing');
var clipboardFleetPingData = new ClipboardJS('button#copyFleetPing');

/**
* copy success
Expand Down
Loading

0 comments on commit 3e962be

Please sign in to comment.