From b43bf42efcb8df24f39358d2ee770cf2e23bec0d Mon Sep 17 00:00:00 2001 From: Eliot Berriot Date: Mon, 24 Jun 2019 15:31:11 +0200 Subject: [PATCH] Revert "Fixed broken logging" This reverts commit 68b21d706c750352fc5672595f595bd50286b5ae. --- api/config/settings/common.py | 2 +- api/funkwhale_api/manage/filters.py | 12 +---- .../dynamic_preferences_registry.py | 4 +- .../manage/moderation/DomainsTable.vue | 25 ++-------- front/src/views/admin/Settings.vue | 9 ---- front/src/views/admin/moderation/Base.vue | 23 +-------- .../views/admin/moderation/DomainsDetail.vue | 49 +------------------ .../views/admin/moderation/DomainsList.vue | 10 +--- 8 files changed, 13 insertions(+), 121 deletions(-) diff --git a/api/config/settings/common.py b/api/config/settings/common.py index 455a5822..8f2e00ad 100644 --- a/api/config/settings/common.py +++ b/api/config/settings/common.py @@ -46,7 +46,7 @@ logging.config.dictConfig( }, "loggers": { "funkwhale_api": { - "level": logging.getLevelName("LOGLEVEL"), + "level": LOGLEVEL, "handlers": ["console"], # required to avoid double logging with root logger "propagate": False, diff --git a/api/funkwhale_api/manage/filters.py b/api/funkwhale_api/manage/filters.py index 9e20a6af..984b8313 100644 --- a/api/funkwhale_api/manage/filters.py +++ b/api/funkwhale_api/manage/filters.py @@ -237,20 +237,10 @@ class ManageUploadFilterSet(filters.FilterSet): class ManageDomainFilterSet(filters.FilterSet): q = fields.SearchFilter(search_fields=["name"]) - allowed = filters.BooleanFilter() class Meta: model = federation_models.Domain - fields = ["name", "allowed"] - - def filter_allowed(self, qs, value): - """ - If value=false, we want to include object with value=null as well - """ - if value: - return qs.filter(allowed=True) - else: - return qs.filter(allowed__in=[False, None]) + fields = ["name"] class ManageActorFilterSet(filters.FilterSet): diff --git a/api/funkwhale_api/moderation/dynamic_preferences_registry.py b/api/funkwhale_api/moderation/dynamic_preferences_registry.py index 04a732f4..8d8237cb 100644 --- a/api/funkwhale_api/moderation/dynamic_preferences_registry.py +++ b/api/funkwhale_api/moderation/dynamic_preferences_registry.py @@ -19,8 +19,8 @@ class AllowListPublic(types.BooleanPreference): name = "allow_list_public" verbose_name = "Publish your allowed-domains list" help_text = ( - "If enabled, everyone will be able to retrieve the list of domains you allowed. " + "If enabled, everyone will be able to retrieve the list of domains you allowed. ", "This is useful on open setups, to help people decide if they want to join your pod, or to " - "make your moderation policy public." + "make your moderation policy public.", ) default = False diff --git a/front/src/components/manage/moderation/DomainsTable.vue b/front/src/components/manage/moderation/DomainsTable.vue index 08fff4cc..544d9115 100644 --- a/front/src/components/manage/moderation/DomainsTable.vue +++ b/front/src/components/manage/moderation/DomainsTable.vue @@ -6,14 +6,6 @@ -
- - -
-
- - -
- + @@ -36,14 +32,12 @@ import axios from 'axios' import DomainsTable from "@/components/manage/moderation/DomainsTable" export default { - props: ['allowListEnabled'], components: { DomainsTable }, data () { return { domainName: '', - domainAllowed: this.allowListEnabled ? true : null, isCreating: false, errors: [] } @@ -60,7 +54,7 @@ export default { let self = this this.isCreating = true this.errors = [] - axios.post('manage/federation/domains/', {name: this.domainName, allowed: this.domainAllowed}).then((response) => { + axios.post('manage/federation/domains/', {name: this.domainName}).then((response) => { this.isCreating = false this.$router.push({ name: "manage.moderation.domains.detail",