Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Clivern committed Jun 3, 2020
1 parent 2a2a1c2 commit d982d94
Show file tree
Hide file tree
Showing 13 changed files with 30 additions and 30 deletions.
2 changes: 1 addition & 1 deletion app/controllers/web/admin/activity.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def get(self, request):
self.__upgrade = Upgrade()
self.__acl = ACL()
self.autoload_options()
self.__context.autoload_user(request.user.id if request.user.is_authenticated else None)
self.autoload_user(request.user.id if request.user.is_authenticated else None)

self.context_push({
"page_title": _("Activity · %s") % self.context_get("app_name", os.getenv("APP_NAME", "Silverback"))
Expand Down
4 changes: 2 additions & 2 deletions app/controllers/web/admin/builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ def get(self, request):
self.__component = ComponentModule()
self.__component_group = ComponentGroupModule()
self.autoload_options()
self.__context.autoload_user(request.user.id if request.user.is_authenticated else None)
self.__context.load_options({
self.autoload_user(request.user.id if request.user.is_authenticated else None)
self.load_options({
"builder_headline": "",
"builder_favicon_url": "",
"builder_logo_url": "",
Expand Down
6 changes: 3 additions & 3 deletions app/controllers/web/admin/component.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def get(self, request):

self.__component = ComponentModule()
self.autoload_options()
self.__context.autoload_user(request.user.id if request.user.is_authenticated else None)
self.autoload_user(request.user.id if request.user.is_authenticated else None)
self.context_push({
"page_title": _("Components · %s") % self.context_get("app_name", os.getenv("APP_NAME", "Silverback"))
})
Expand All @@ -55,7 +55,7 @@ def get(self, request):

self.__component = ComponentModule()
self.autoload_options()
self.__context.autoload_user(request.user.id if request.user.is_authenticated else None)
self.autoload_user(request.user.id if request.user.is_authenticated else None)
self.context_push({
"page_title": _("Add a Component · %s") % self.context_get("app_name", os.getenv("APP_NAME", "Silverback")),
"groups": self.__component.get_all_groups()
Expand All @@ -79,7 +79,7 @@ def get(self, request, component_id):
raise Http404("Component not found.")

self.autoload_options()
self.__context.autoload_user(request.user.id if request.user.is_authenticated else None)
self.autoload_user(request.user.id if request.user.is_authenticated else None)
self.context_push({
"page_title": _("Edit Component · %s") % self.context_get("app_name", os.getenv("APP_NAME", "Silverback")),
"component": component,
Expand Down
6 changes: 3 additions & 3 deletions app/controllers/web/admin/component_group.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def get(self, request):

self.__component_group = ComponentGroupModule()
self.autoload_options()
self.__context.autoload_user(request.user.id if request.user.is_authenticated else None)
self.autoload_user(request.user.id if request.user.is_authenticated else None)
self.context_push({
"page_title": _("Component Groups · %s") % self.context_get("app_name", os.getenv("APP_NAME", "Silverback"))
})
Expand All @@ -55,7 +55,7 @@ def get(self, request):

self.__component_group = ComponentGroupModule()
self.autoload_options()
self.__context.autoload_user(request.user.id if request.user.is_authenticated else None)
self.autoload_user(request.user.id if request.user.is_authenticated else None)
self.context_push({
"page_title": _("Add a Component Group · %s") % self.context_get("app_name", os.getenv("APP_NAME", "Silverback"))
})
Expand All @@ -78,7 +78,7 @@ def get(self, request, group_id):
raise Http404("Component group not found.")

self.autoload_options()
self.__context.autoload_user(request.user.id if request.user.is_authenticated else None)
self.autoload_user(request.user.id if request.user.is_authenticated else None)
self.context_push({
"page_title": _("Edit Component Group · %s") % self.context_get("app_name", os.getenv("APP_NAME", "Silverback")),
"group": group
Expand Down
2 changes: 1 addition & 1 deletion app/controllers/web/admin/dashboard.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def get(self, request):

self.__dashboard = DashboardModule()
self.autoload_options()
self.__context.autoload_user(request.user.id if request.user.is_authenticated else None)
self.autoload_user(request.user.id if request.user.is_authenticated else None)
self.context_push({
"page_title": _("Dashboard · %s") % self.context_get("app_name", os.getenv("APP_NAME", "Silverback")),
"count": {
Expand Down
8 changes: 4 additions & 4 deletions app/controllers/web/admin/incident.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def get(self, request):
self.__component = ComponentModule()
self.__component_group = ComponentGroupModule()
self.autoload_options()
self.__context.autoload_user(request.user.id if request.user.is_authenticated else None)
self.autoload_user(request.user.id if request.user.is_authenticated else None)
self.context_push({
"page_title": _("Incidents · %s") % self.context_get("app_name", os.getenv("APP_NAME", "Silverback"))
})
Expand All @@ -64,7 +64,7 @@ def get(self, request):
self.__component = ComponentModule()
self.__component_group = ComponentGroupModule()
self.autoload_options()
self.__context.autoload_user(request.user.id if request.user.is_authenticated else None)
self.autoload_user(request.user.id if request.user.is_authenticated else None)
self.context_push({
"page_title": _("Add an Incident · %s") % self.context_get("app_name", os.getenv("APP_NAME", "Silverback"))
})
Expand All @@ -90,7 +90,7 @@ def get(self, request, incident_id):
raise Http404("Incident not found.")

self.autoload_options()
self.__context.autoload_user(request.user.id if request.user.is_authenticated else None)
self.autoload_user(request.user.id if request.user.is_authenticated else None)
self.context_push({
"page_title": _("Edit Incident · %s") % self.context_get("app_name", os.getenv("APP_NAME", "Silverback")),
"incident": incident
Expand All @@ -117,7 +117,7 @@ def get(self, request, incident_id):
raise Http404("Incident not found.")

self.autoload_options()
self.__context.autoload_user(request.user.id if request.user.is_authenticated else None)
self.autoload_user(request.user.id if request.user.is_authenticated else None)
self.context_push({
"page_title": _("View Incident · %s") % self.context_get("app_name", os.getenv("APP_NAME", "Silverback")),
"incident": incident
Expand Down
6 changes: 3 additions & 3 deletions app/controllers/web/admin/incident_update.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def get(self, request, incident_id):
raise Http404("Incident not found.")

self.autoload_options()
self.__context.autoload_user(request.user.id if request.user.is_authenticated else None)
self.autoload_user(request.user.id if request.user.is_authenticated else None)
self.context_push({
"page_title": _("Add Incident Update · %s") % self.context_get("app_name", os.getenv("APP_NAME", "Silverback")),
"incident": incident
Expand Down Expand Up @@ -99,7 +99,7 @@ def get(self, request, incident_id, update_id):
affected_components = self.__format_affected_components(self.__incident_update_component.get_all(update_id))

self.autoload_options()
self.__context.autoload_user(request.user.id if request.user.is_authenticated else None)
self.autoload_user(request.user.id if request.user.is_authenticated else None)
self.context_push({
"page_title": _("View Incident Update · %s") % self.context_get("app_name", os.getenv("APP_NAME", "Silverback")),
"update": update,
Expand Down Expand Up @@ -158,7 +158,7 @@ def get(self, request, incident_id, update_id):
raise Http404("Incident update not found.")

self.autoload_options()
self.__context.autoload_user(request.user.id if request.user.is_authenticated else None)
self.autoload_user(request.user.id if request.user.is_authenticated else None)
self.context_push({
"page_title": _("Edit Incident Update · %s") % self.context_get("app_name", os.getenv("APP_NAME", "Silverback")),
"update": update,
Expand Down
6 changes: 3 additions & 3 deletions app/controllers/web/admin/metric.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def get(self, request):

self.__metric = MetricModule()
self.autoload_options()
self.__context.autoload_user(request.user.id if request.user.is_authenticated else None)
self.autoload_user(request.user.id if request.user.is_authenticated else None)
self.context_push({
"page_title": _("Metrics · %s") % self.context_get("app_name", os.getenv("APP_NAME", "Silverback"))
})
Expand All @@ -56,7 +56,7 @@ def get(self, request):

self.__metric = MetricModule()
self.autoload_options()
self.__context.autoload_user(request.user.id if request.user.is_authenticated else None)
self.autoload_user(request.user.id if request.user.is_authenticated else None)
self.context_push({
"page_title": _("Add a Metric · %s") % self.context_get("app_name", os.getenv("APP_NAME", "Silverback"))
})
Expand All @@ -79,7 +79,7 @@ def get(self, request, metric_id):
raise Http404("Metric not found.")

self.autoload_options()
self.__context.autoload_user(request.user.id if request.user.is_authenticated else None)
self.autoload_user(request.user.id if request.user.is_authenticated else None)
self.context_push({
"page_title": _("Edit Metric · %s") % self.context_get("app_name", os.getenv("APP_NAME", "Silverback")),
"metric": metric
Expand Down
2 changes: 1 addition & 1 deletion app/controllers/web/admin/notification.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def get(self, request):

self.__acl = ACL()
self.autoload_options()
self.__context.autoload_user(request.user.id if request.user.is_authenticated else None)
self.autoload_user(request.user.id if request.user.is_authenticated else None)

self.context_push({
"page_title": _("Notification · %s") % self.context_get("app_name", os.getenv("APP_NAME", "Silverback"))
Expand Down
2 changes: 1 addition & 1 deletion app/controllers/web/admin/profile.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def get(self, request):
self.__profile = ProfileModule()
self.__user_id = request.user.id
self.autoload_options()
self.__context.autoload_user(request.user.id if request.user.is_authenticated else None)
self.autoload_user(request.user.id if request.user.is_authenticated else None)
self.context_push({
"page_title": _("Profile · %s") % self.context_get("app_name", os.getenv("APP_NAME", "Silverback"))
})
Expand Down
4 changes: 2 additions & 2 deletions app/controllers/web/admin/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ def get(self, request):
self.__upgrade = Upgrade()
self.__acl = ACL()
self.autoload_options()
self.__context.autoload_user(request.user.id if request.user.is_authenticated else None)
self.__context.load_options({
self.autoload_user(request.user.id if request.user.is_authenticated else None)
self.load_options({
"app_name": "",
"app_email": "",
"app_url": "",
Expand Down
6 changes: 3 additions & 3 deletions app/controllers/web/admin/subscriber.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def get(self, request):

self.__subscriber = SubscriberModule()
self.autoload_options()
self.__context.autoload_user(request.user.id if request.user.is_authenticated else None)
self.autoload_user(request.user.id if request.user.is_authenticated else None)
self.context_push({
"page_title": _("Subscribers · %s") % self.context_get("app_name", os.getenv("APP_NAME", "Silverback"))
})
Expand All @@ -55,7 +55,7 @@ def get(self, request):

self.__subscriber = SubscriberModule()
self.autoload_options()
self.__context.autoload_user(request.user.id if request.user.is_authenticated else None)
self.autoload_user(request.user.id if request.user.is_authenticated else None)
self.context_push({
"page_title": _("Add an Subscriber · %s") % self.context_get("app_name", os.getenv("APP_NAME", "Silverback"))
})
Expand All @@ -78,7 +78,7 @@ def get(self, request, subscriber_id):
raise Http404("Subscriber not found.")

self.autoload_options()
self.__context.autoload_user(request.user.id if request.user.is_authenticated else None)
self.autoload_user(request.user.id if request.user.is_authenticated else None)
self.context_push({
"page_title": _("Edit Subscriber · %s") % self.context_get("app_name", os.getenv("APP_NAME", "Silverback")),
"subscriber": subscriber
Expand Down
6 changes: 3 additions & 3 deletions app/controllers/web/admin/user.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def get(self, request):

self.__user = UserModule()
self.autoload_options()
self.__context.autoload_user(request.user.id if request.user.is_authenticated else None)
self.autoload_user(request.user.id if request.user.is_authenticated else None)
self.context_push({
"page_title": _("Users · %s") % self.context_get("app_name", os.getenv("APP_NAME", "Silverback"))
})
Expand All @@ -55,7 +55,7 @@ def get(self, request):

self.__user = UserModule()
self.autoload_options()
self.__context.autoload_user(request.user.id if request.user.is_authenticated else None)
self.autoload_user(request.user.id if request.user.is_authenticated else None)
self.context_push({
"page_title": _("Add a User · %s") % self.context_get("app_name", os.getenv("APP_NAME", "Silverback"))
})
Expand All @@ -78,7 +78,7 @@ def get(self, request, user_id):
raise Http404("User not found.")

self.autoload_options()
self.__context.autoload_user(request.user.id if request.user.is_authenticated else None)
self.autoload_user(request.user.id if request.user.is_authenticated else None)
self.context_push({
"page_title": _("Edit User · %s") % self.context_get("app_name", os.getenv("APP_NAME", "Silverback")),
"user": user
Expand Down

0 comments on commit d982d94

Please sign in to comment.