Skip to content

Commit

Permalink
Update class names to camelcase
Browse files Browse the repository at this point in the history
  • Loading branch information
Clivern committed Jul 9, 2019
1 parent 9ac499b commit 667fa5a
Show file tree
Hide file tree
Showing 100 changed files with 778 additions and 739 deletions.
4 changes: 2 additions & 2 deletions app/context_processors.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@
import os

# Local Library
from app.modules.entity.option_entity import Option_Entity
from app.modules.entity.option_entity import OptionEntity


def globals(request):

option_entity = Option_Entity()
option_entity = OptionEntity()

return {
"google_account": option_entity.get_value_by_key("google_analytics_account", ""),
Expand Down
4 changes: 2 additions & 2 deletions app/controllers/api/private/v1/admin/activity.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
from app.modules.core.request import Request
from app.modules.core.response import Response
from app.modules.validation.extension import ExtraRules
from app.modules.core.activity import Activity as Activity_Module
from app.modules.core.activity import Activity as ActivityModule


class Activities(View):
Expand All @@ -31,7 +31,7 @@ def __init__(self):
self.__response = Response()
self.__helpers = Helpers()
self.__form = Form()
self.__activity = Activity_Module()
self.__activity = ActivityModule()
self.__logger = self.__helpers.get_logger(__name__)
self.__form.add_validator(ExtraRules())

Expand Down
6 changes: 3 additions & 3 deletions app/controllers/api/private/v1/admin/builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
from app.modules.validation.extension import ExtraRules


class Builder_System_Metrics(View):
class BuilderSystemMetrics(View):

__request = None
__response = None
Expand Down Expand Up @@ -113,7 +113,7 @@ def delete(self, request, metric_id):
}], {}, self.__correlation_id))


class Builder_Components(View):
class BuilderComponents(View):

__request = None
__response = None
Expand Down Expand Up @@ -207,7 +207,7 @@ def delete(self, request, component_id):
}], {}, self.__correlation_id))


class Builder_Settings(View):
class BuilderSettings(View):

__request = None
__response = None
Expand Down
6 changes: 3 additions & 3 deletions app/controllers/api/private/v1/admin/component.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
from app.modules.core.request import Request
from app.modules.core.response import Response
from app.modules.validation.extension import ExtraRules
from app.modules.core.component import Component as Component_Module
from app.modules.core.component import Component as ComponentModule


class Components(View):
Expand All @@ -33,7 +33,7 @@ def __init__(self):
self.__response = Response()
self.__helpers = Helpers()
self.__form = Form()
self.__component = Component_Module()
self.__component = ComponentModule()
self.__logger = self.__helpers.get_logger(__name__)
self.__form.add_validator(ExtraRules())

Expand Down Expand Up @@ -168,7 +168,7 @@ def __init__(self):
self.__response = Response()
self.__helpers = Helpers()
self.__form = Form()
self.__component = Component_Module()
self.__component = ComponentModule()
self.__logger = self.__helpers.get_logger(__name__)
self.__form.add_validator(ExtraRules())

Expand Down
10 changes: 5 additions & 5 deletions app/controllers/api/private/v1/admin/component_group.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@
from app.modules.core.request import Request
from app.modules.core.response import Response
from app.modules.validation.extension import ExtraRules
from app.modules.core.component_group import Component_Group as Component_Group_Module
from app.modules.core.component_group import ComponentGroup as ComponentGroupModule


class Component_Groups(View):
class ComponentGroups(View):

__request = None
__response = None
Expand All @@ -33,7 +33,7 @@ def __init__(self):
self.__response = Response()
self.__helpers = Helpers()
self.__form = Form()
self.__component_group = Component_Group_Module()
self.__component_group = ComponentGroupModule()
self.__logger = self.__helpers.get_logger(__name__)
self.__form.add_validator(ExtraRules())

Expand Down Expand Up @@ -144,7 +144,7 @@ def __format_groups(self, groups):
return groups_list


class Component_Group(View):
class ComponentGroup(View):

__request = None
__response = None
Expand All @@ -160,7 +160,7 @@ def __init__(self):
self.__response = Response()
self.__helpers = Helpers()
self.__form = Form()
self.__component_group = Component_Group_Module()
self.__component_group = ComponentGroupModule()
self.__logger = self.__helpers.get_logger(__name__)
self.__form.add_validator(ExtraRules())

Expand Down
6 changes: 3 additions & 3 deletions app/controllers/api/private/v1/admin/incident.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
from app.modules.core.request import Request
from app.modules.core.response import Response
from app.modules.validation.extension import ExtraRules
from app.modules.core.incident import Incident as Incident_Module
from app.modules.core.incident import Incident as IncidentModule


class Incidents(View):
Expand All @@ -34,7 +34,7 @@ def __init__(self):
self.__response = Response()
self.__helpers = Helpers()
self.__form = Form()
self.__incident = Incident_Module()
self.__incident = IncidentModule()
self.__logger = self.__helpers.get_logger(__name__)
self.__form.add_validator(ExtraRules())

Expand Down Expand Up @@ -164,7 +164,7 @@ def __init__(self):
self.__response = Response()
self.__helpers = Helpers()
self.__form = Form()
self.__incident = Incident_Module()
self.__incident = IncidentModule()
self.__logger = self.__helpers.get_logger(__name__)
self.__form.add_validator(ExtraRules())

Expand Down
56 changes: 28 additions & 28 deletions app/controllers/api/private/v1/admin/incident_update.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@
from app.modules.core.response import Response
from app.modules.core.task import Task as Task_Module
from app.modules.validation.extension import ExtraRules
from app.modules.core.incident import Incident as Incident_Module
from app.modules.core.subscriber import Subscriber as Subscriber_Module
from app.modules.core.notification import Notification as Notification_Module
from app.modules.core.incident_update import Incident_Update as Incident_Update_Module
from app.modules.core.incident_update_component import Incident_Update_Component as Incident_Update_Component_Module
from app.modules.core.incident_update_notification import Incident_Update_Notification as Incident_Update_Notification_Module
from app.modules.core.incident import Incident as IncidentModule
from app.modules.core.subscriber import Subscriber as SubscriberModule
from app.modules.core.notification import Notification as NotificationModule
from app.modules.core.incident_update import IncidentUpdate as IncidentUpdateModule
from app.modules.core.incident_update_component import IncidentUpdateComponent as IncidentUpdateComponentModule
from app.modules.core.incident_update_notification import IncidentUpdateNotification as IncidentUpdateNotificationModule


class Incident_Updates(View):
class IncidentUpdates(View):

__request = None
__response = None
Expand All @@ -45,12 +45,12 @@ def __init__(self):
self.__response = Response()
self.__helpers = Helpers()
self.__form = Form()
self.__incident = Incident_Module()
self.__incident_update = Incident_Update_Module()
self.__incident = IncidentModule()
self.__incident_update = IncidentUpdateModule()
self.__task = Task_Module()
self.__notification = Notification_Module()
self.__subscriber = Subscriber_Module()
self.__incident_update_notification = Incident_Update_Notification_Module()
self.__notification = NotificationModule()
self.__subscriber = SubscriberModule()
self.__incident_update_notification = IncidentUpdateNotificationModule()
self.__logger = self.__helpers.get_logger(__name__)
self.__form.add_validator(ExtraRules())

Expand Down Expand Up @@ -110,7 +110,7 @@ def post(self, request, incident_id):
result = self.__incident_update.insert_one({
"notify_subscribers": self.__form.get_sinput("notify_subscribers"),
"datetime": DateTimeField().clean(self.__form.get_sinput("datetime")),
"total_suscribers": self.__subscriber.count_by_status(Subscriber_Module.VERIFIED),
"total_suscribers": self.__subscriber.count_by_status(SubscriberModule.VERIFIED),
"message": self.__form.get_sinput("message"),
"status": self.__form.get_sinput("status"),
"incident_id": incident_id
Expand Down Expand Up @@ -169,7 +169,7 @@ def __format_incident_updates(self, updates, incident_id):

notified_subscribers = self.__incident_update_notification.count_by_update_status(
update.id,
Incident_Update_Notification_Module.SUCCESS
IncidentUpdateNotificationModule.SUCCESS
)
progress = int(notified_subscribers/update.total_suscribers) * 100 if update.total_suscribers > 0 else 0

Expand All @@ -188,7 +188,7 @@ def __format_incident_updates(self, updates, incident_id):
return updates_list


class Incident_Update(View):
class IncidentUpdate(View):

__request = None
__response = None
Expand All @@ -204,7 +204,7 @@ def __init__(self):
self.__response = Response()
self.__helpers = Helpers()
self.__form = Form()
self.__incident_update = Incident_Update_Module()
self.__incident_update = IncidentUpdateModule()
self.__logger = self.__helpers.get_logger(__name__)
self.__form.add_validator(ExtraRules())

Expand Down Expand Up @@ -296,7 +296,7 @@ def delete(self, request, incident_id, update_id):
}], {}, self.__correlation_id))


class Incident_Updates_Notify(View):
class IncidentUpdatesNotify(View):

__request = None
__response = None
Expand All @@ -315,10 +315,10 @@ def __init__(self):
self.__response = Response()
self.__helpers = Helpers()
self.__form = Form()
self.__incident_update = Incident_Update_Module()
self.__incident_update = IncidentUpdateModule()
self.__task = Task_Module()
self.__notification = Notification_Module()
self.__subscriber = Subscriber_Module()
self.__notification = NotificationModule()
self.__subscriber = SubscriberModule()
self.__logger = self.__helpers.get_logger(__name__)
self.__form.add_validator(ExtraRules())

Expand All @@ -339,7 +339,7 @@ def post(self, request, incident_id, update_id):
"highlight": "Incident Update",
"notification": "notifying subscribers with the incident update",
"url": "#",
"type": Notification_Module.PENDING,
"type": NotificationModule.PENDING,
"delivered": False,
"user_id": self.__user_id,
"task_id": task.id
Expand All @@ -357,7 +357,7 @@ def post(self, request, incident_id, update_id):
}], {}, self.__correlation_id))


class Incident_Updates_Components(View):
class IncidentUpdatesComponents(View):

__request = None
__response = None
Expand All @@ -377,12 +377,12 @@ def __init__(self):
self.__response = Response()
self.__helpers = Helpers()
self.__form = Form()
self.__incident_update = Incident_Update_Module()
self.__incident_update = IncidentUpdateModule()
self.__task = Task_Module()
self.__notification = Notification_Module()
self.__subscriber = Subscriber_Module()
self.__notification = NotificationModule()
self.__subscriber = SubscriberModule()
self.__logger = self.__helpers.get_logger(__name__)
self.__incident_update_component = Incident_Update_Component_Module()
self.__incident_update_component = IncidentUpdateComponentModule()
self.__form.add_validator(ExtraRules())

def post(self, request, incident_id, update_id):
Expand Down Expand Up @@ -439,7 +439,7 @@ def post(self, request, incident_id, update_id):
}], {}, self.__correlation_id))


class Incident_Updates_Component(View):
class IncidentUpdatesComponent(View):

__request = None
__response = None
Expand All @@ -455,7 +455,7 @@ def __init__(self):
self.__response = Response()
self.__helpers = Helpers()
self.__form = Form()
self.__incident_update_component = Incident_Update_Component_Module()
self.__incident_update_component = IncidentUpdateComponentModule()
self.__logger = self.__helpers.get_logger(__name__)
self.__form.add_validator(ExtraRules())

Expand Down
10 changes: 5 additions & 5 deletions app/controllers/api/private/v1/admin/metric.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
from app.modules.core.request import Request
from app.modules.core.response import Response
from app.modules.validation.extension import ExtraRules
from app.modules.core.metric import Metric as Metric_Module
from app.modules.core.metric import Metric as MetricModule


class Metrics(View):
Expand All @@ -33,7 +33,7 @@ def __init__(self):
self.__response = Response()
self.__helpers = Helpers()
self.__form = Form()
self.__metric = Metric_Module()
self.__metric = MetricModule()
self.__logger = self.__helpers.get_logger(__name__)
self.__form.add_validator(ExtraRules())

Expand Down Expand Up @@ -192,7 +192,7 @@ def __init__(self):
self.__response = Response()
self.__helpers = Helpers()
self.__form = Form()
self.__metric = Metric_Module()
self.__metric = MetricModule()
self.__logger = self.__helpers.get_logger(__name__)
self.__form.add_validator(ExtraRules())

Expand Down Expand Up @@ -311,7 +311,7 @@ def delete(self, request, metric_id):
}], {}, self.__correlation_id))


class NewRelic_Apps(View):
class NewRelicApps(View):

__request = None
__response = None
Expand All @@ -327,7 +327,7 @@ def __init__(self):
self.__response = Response()
self.__helpers = Helpers()
self.__form = Form()
self.__metric = Metric_Module()
self.__metric = MetricModule()
self.__logger = self.__helpers.get_logger(__name__)
self.__form.add_validator(ExtraRules())

Expand Down
6 changes: 3 additions & 3 deletions app/controllers/api/private/v1/admin/notifications.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
from app.modules.util.humanize import Humanize
from app.modules.core.response import Response
from app.modules.validation.extension import ExtraRules
from app.modules.core.notification import Notification as Notification_Module
from app.modules.core.notification import Notification as NotificationModule


class LatestNotifications(View):
Expand All @@ -33,7 +33,7 @@ def __init__(self):
self.__logger = self.__helpers.get_logger(__name__)
self.__response = Response()
self.__request = Request()
self.__notification = Notification_Module()
self.__notification = NotificationModule()
self.__form.add_validator(ExtraRules())

def get(self, request):
Expand Down Expand Up @@ -85,7 +85,7 @@ def __init__(self):
self.__logger = self.__helpers.get_logger(__name__)
self.__response = Response()
self.__request = Request()
self.__notification = Notification_Module()
self.__notification = NotificationModule()
self.__humanize = Humanize()
self.__form.add_validator(ExtraRules())

Expand Down
4 changes: 2 additions & 2 deletions app/controllers/api/private/v1/admin/profile.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
from app.modules.core.request import Request
from app.modules.core.response import Response
from app.modules.validation.extension import ExtraRules
from app.modules.core.profile import Profile as Profile_Module
from app.modules.core.profile import Profile as ProfileModule


class Profile(View):
Expand All @@ -32,7 +32,7 @@ def __init__(self):
self.__response = Response()
self.__helpers = Helpers()
self.__form = Form()
self.__profile_module = Profile_Module()
self.__profile_module = ProfileModule()
self.__logger = self.__helpers.get_logger(__name__)
self.__form.add_validator(ExtraRules())

Expand Down
Loading

0 comments on commit 667fa5a

Please sign in to comment.