diff --git a/api/tacticalrmm/autotasks/models.py b/api/tacticalrmm/autotasks/models.py index b78e3448ec..f2bd5ed2e5 100644 --- a/api/tacticalrmm/autotasks/models.py +++ b/api/tacticalrmm/autotasks/models.py @@ -92,13 +92,8 @@ class AutomatedTask(BaseAuditModel): # deprecated timeout = models.PositiveIntegerField(blank=True, default=120) -<<<<<<< HEAD # format -> {"actions": [{"type": "script", "script": 1, "name": "Script Name", "timeout": 90, "script_args": []}, {"type": "cmd", "command": "whoami", "timeout": 90}]} actions = JSONField(default=list) -======= - # format -> {"actions": [{"type": "script", "pk": 1, "shell": "powershell", "timeout": 90, "script_args": []}, {"type": "cmd", "command": "whoami"}]} - actions = JSONField(default=dict) ->>>>>>> massive cleanup of files and restructure of integrations design assigned_check = models.ForeignKey( "checks.Check", null=True, @@ -366,13 +361,9 @@ def generate_nats_task_payload(self, editing=False): "multiple_instances": self.task_instance_policy if self.task_instance_policy else 0, -<<<<<<< HEAD "delete_expired_task_after": self.remove_if_not_scheduled if self.expire_date else False, -======= - "delete_expired_task_after": self.remove_if_not_scheduled, ->>>>>>> massive cleanup of files and restructure of integrations design "start_when_available": self.run_asap_after_missed if self.task_type != "runonce" else True, diff --git a/api/tacticalrmm/autotasks/serializers.py b/api/tacticalrmm/autotasks/serializers.py index b632b135bc..5153486902 100644 --- a/api/tacticalrmm/autotasks/serializers.py +++ b/api/tacticalrmm/autotasks/serializers.py @@ -11,7 +11,6 @@ class TaskSerializer(serializers.ModelSerializer): schedule = serializers.ReadOnlyField() last_run = serializers.ReadOnlyField(source="last_run_as_timezone") alert_template = serializers.SerializerMethodField() -<<<<<<< HEAD run_time_date = serializers.DateTimeField(format="iso-8601", required=False) expire_date = serializers.DateTimeField( format="iso-8601", allow_null=True, required=False @@ -83,14 +82,6 @@ def validate(self, data): del data["monthly_weeks_of_month"] if "assigned_check" in data: del data["assigned_check"] -======= - run_time_date = serializers.DateTimeField(format="iso-8601") - expire_date = serializers.DateTimeField(format="iso-8601", allow_null=True) - - def validate(self, data): - - if "task_type" not in data: ->>>>>>> massive cleanup of files and restructure of integrations design return data # run_time_date required @@ -104,104 +95,64 @@ def validate(self, data): # daily task type validation if data["task_type"] == "daily": -<<<<<<< HEAD if "daily_interval" not in data or not data["daily_interval"]: -======= - if not data["daily_interval"]: ->>>>>>> massive cleanup of files and restructure of integrations design raise serializers.ValidationError( f"daily_interval is required for task_type '{data['task_type']}'" ) # weekly task type validation -<<<<<<< HEAD elif data["task_type"] == "weekly": if "weekly_interval" not in data or not data["weekly_interval"]: -======= - if data["task_type"] == "weekly": - if not data["weekly_interval"]: ->>>>>>> massive cleanup of files and restructure of integrations design raise serializers.ValidationError( f"weekly_interval is required for task_type '{data['task_type']}'" ) -<<<<<<< HEAD if "run_time_bit_weekdays" not in data or not data["run_time_bit_weekdays"]: -======= - if not data["run_time_bit_weekdays"]: ->>>>>>> massive cleanup of files and restructure of integrations design raise serializers.ValidationError( f"run_time_bit_weekdays is required for task_type '{data['task_type']}'" ) # monthly task type validation -<<<<<<< HEAD elif data["task_type"] == "monthly": if ( "monthly_months_of_year" not in data or not data["monthly_months_of_year"] ): -======= - if data["task_type"] == "monthly": - if not data["monthly_months_of_year"]: ->>>>>>> massive cleanup of files and restructure of integrations design raise serializers.ValidationError( f"monthly_months_of_year is required for task_type '{data['task_type']}'" ) -<<<<<<< HEAD if "monthly_days_of_month" not in data or not data["monthly_days_of_month"]: -======= - if not data["monthly_days_of_month"]: ->>>>>>> massive cleanup of files and restructure of integrations design raise serializers.ValidationError( f"monthly_days_of_month is required for task_type '{data['task_type']}'" ) # monthly day of week task type validation -<<<<<<< HEAD elif data["task_type"] == "monthlydow": if ( "monthly_months_of_year" not in data or not data["monthly_months_of_year"] ): -======= - if data["task_type"] == "monthlydow": - if not data["monthly_months_of_year"]: ->>>>>>> massive cleanup of files and restructure of integrations design raise serializers.ValidationError( f"monthly_months_of_year is required for task_type '{data['task_type']}'" ) -<<<<<<< HEAD if ( "monthly_weeks_of_month" not in data or not data["monthly_weeks_of_month"] ): -======= - if not data["monthly_weeks_of_month"]: ->>>>>>> massive cleanup of files and restructure of integrations design raise serializers.ValidationError( f"monthly_weeks_of_month is required for task_type '{data['task_type']}'" ) -<<<<<<< HEAD if "run_time_bit_weekdays" not in data or not data["run_time_bit_weekdays"]: -======= - if not data["run_time_bit_weekdays"]: ->>>>>>> massive cleanup of files and restructure of integrations design raise serializers.ValidationError( f"run_time_bit_weekdays is required for task_type '{data['task_type']}'" ) # check failure task type validation -<<<<<<< HEAD elif data["task_type"] == "checkfailure": if "assigned_check" not in data or not data["assigned_check"]: -======= - if data["task_type"] == "checkfailure": - if not data["assigned_check"]: ->>>>>>> massive cleanup of files and restructure of integrations design raise serializers.ValidationError( f"assigned_check is required for task_type '{data['task_type']}'" ) diff --git a/api/tacticalrmm/integrations/meraki/urls.py b/api/tacticalrmm/integrations/meraki/urls.py index 9d50734706..417021255a 100644 --- a/api/tacticalrmm/integrations/meraki/urls.py +++ b/api/tacticalrmm/integrations/meraki/urls.py @@ -8,10 +8,7 @@ path('/devices_summary//', views.GetDevicesSummary.as_view()), path('/networks/uplinks/', views.GetNetworkUplinks.as_view()), path('/top_clients//', views.GetTopClients.as_view()), -<<<<<<< HEAD -======= path('/client//', views.GetClient.as_view()), ->>>>>>> 5a541b0209a0de11b20c5d153af1efa9333fd4ab path('/applications/traffic//', views.GetNetworkApplicationTraffic.as_view()), path('/clients/traffic//', views.GetNetworkClientTraffic.as_view()), path('/clients//policy/', views.GetClientPolicy.as_view()), diff --git a/api/tacticalrmm/integrations/meraki/views.py b/api/tacticalrmm/integrations/meraki/views.py index 46f7ec8547..a932f7f51f 100644 --- a/api/tacticalrmm/integrations/meraki/views.py +++ b/api/tacticalrmm/integrations/meraki/views.py @@ -7,15 +7,6 @@ class GetOrganizations(APIView): permission_classes = [IsAuthenticated] -<<<<<<< HEAD -<<<<<<< HEAD - -======= - ->>>>>>> 5a541b0209a0de11b20c5d153af1efa9333fd4ab -======= - ->>>>>>> allow Meraki integration dashboard at client level as well as agent def get(self, request, format=None): integration = Integration.objects.get(name="Cisco Meraki") @@ -126,8 +117,7 @@ def get(self, request, pk, timespan, format=None): return Response(result) -<<<<<<< HEAD -======= + class GetClient(APIView): permission_classes = [IsAuthenticated] @@ -146,9 +136,7 @@ def get(self, request, pk, mac, format=None): return Response(result) except ValueError: return Response() - ->>>>>>> 5a541b0209a0de11b20c5d153af1efa9333fd4ab class GetNetworkApplicationTraffic(APIView): permission_classes = [IsAuthenticated] @@ -215,11 +203,6 @@ def put(self, request, network_id, client_mac, format=None): integration = Integration.objects.get(name="Cisco Meraki") request_dict = {"devicePolicy": request.data['devicePolicy']} -<<<<<<< HEAD - print(request.data) -======= - ->>>>>>> 5a541b0209a0de11b20c5d153af1efa9333fd4ab payload = json.dumps(request_dict, indent=4) result = requests.put( diff --git a/api/tacticalrmm/integrations/models.py b/api/tacticalrmm/integrations/models.py index af27cd936a..67661d11cc 100644 --- a/api/tacticalrmm/integrations/models.py +++ b/api/tacticalrmm/integrations/models.py @@ -7,14 +7,7 @@ class Integration(models.Model): configuration = models.JSONField(null=True, blank=True) data = models.JSONField(null=True, blank=True) enabled = models.BooleanField(default=False) -<<<<<<< HEAD -<<<<<<< HEAD -======= client_org_related = models.BooleanField(default=False) ->>>>>>> 5a541b0209a0de11b20c5d153af1efa9333fd4ab -======= - client_org_related = models.BooleanField(default=False) ->>>>>>> allow Meraki integration dashboard at client level as well as agent def __str__(self): return self.name diff --git a/api/tacticalrmm/integrations/serializers.py b/api/tacticalrmm/integrations/serializers.py index b270e8efaa..34e218b2b6 100644 --- a/api/tacticalrmm/integrations/serializers.py +++ b/api/tacticalrmm/integrations/serializers.py @@ -5,25 +5,9 @@ class GetIntegrationsSerializer(serializers.ModelSerializer): class Meta: model = Integration -<<<<<<< HEAD -<<<<<<< HEAD - fields = ('id', 'name', 'description', 'configuration', 'enabled') -======= fields = ('id', 'name', 'description', 'configuration', 'enabled', 'client_org_related') ->>>>>>> 5a541b0209a0de11b20c5d153af1efa9333fd4ab -======= - fields = ('id', 'name', 'description', 'configuration', 'enabled', 'client_org_related') ->>>>>>> allow Meraki integration dashboard at client level as well as agent class GetIntegrationSerializer(serializers.ModelSerializer): class Meta: model = Integration -<<<<<<< HEAD -<<<<<<< HEAD - fields = ('id', 'name', 'description', 'configuration', 'enabled') -======= - fields = ('id', 'name', 'description', 'configuration', 'enabled', 'client_org_related') ->>>>>>> 5a541b0209a0de11b20c5d153af1efa9333fd4ab -======= fields = ('id', 'name', 'description', 'configuration', 'enabled', 'client_org_related') ->>>>>>> allow Meraki integration dashboard at client level as well as agent diff --git a/api/tacticalrmm/integrations/snipeit/views.py b/api/tacticalrmm/integrations/snipeit/views.py index 840d98508d..97189051ed 100644 --- a/api/tacticalrmm/integrations/snipeit/views.py +++ b/api/tacticalrmm/integrations/snipeit/views.py @@ -96,13 +96,7 @@ def delete(self, request, asset_id, format=None): result = requests.delete( integration.base_url + "hardware/" + asset_id, -<<<<<<< HEAD -<<<<<<< HEAD - json=payload, -======= ->>>>>>> 5a541b0209a0de11b20c5d153af1efa9333fd4ab -======= ->>>>>>> checkin/checkout and delete asset + headers={ "Accept": "application/json", "Content-Type": "application/json", @@ -140,15 +134,7 @@ def post(self, request, asset_id, format=None): payload = { "id": asset_id, "checkout_to_type": request.data['checkout_to_type'], -<<<<<<< HEAD -<<<<<<< HEAD - "assigned_user": 3, -======= - "assigned_user": request.data['assigned_user'], ->>>>>>> 5a541b0209a0de11b20c5d153af1efa9333fd4ab -======= "assigned_user": request.data['assigned_user'], ->>>>>>> allow Meraki integration dashboard at client level as well as agent "checkout_at": request.data['checkout_at'], "expected_checkin": request.data['expected_checkin'], "note": request.data['note'] diff --git a/api/tacticalrmm/tacticalrmm/settings.py b/api/tacticalrmm/tacticalrmm/settings.py index 7925c0cb36..f84d3600a8 100644 --- a/api/tacticalrmm/tacticalrmm/settings.py +++ b/api/tacticalrmm/tacticalrmm/settings.py @@ -24,11 +24,7 @@ # https://github.com/wh1te909/rmmagent LATEST_AGENT_VER = "1.7.2" -<<<<<<< HEAD MESH_VER = "0.9.66" -======= -MESH_VER = "0.9.65" ->>>>>>> massive cleanup of files and restructure of integrations design NATS_SERVER_VER = "2.6.6" diff --git a/web/src/components/agents/AgentActionMenu.vue b/web/src/components/agents/AgentActionMenu.vue index c7756ad27a..04a8bd771c 100644 --- a/web/src/components/agents/AgentActionMenu.vue +++ b/web/src/components/agents/AgentActionMenu.vue @@ -47,64 +47,20 @@ -<<<<<<< HEAD -<<<<<<< HEAD -<<<<<<< HEAD -<<<<<<< HEAD -======= -<<<<<<< HEAD -======= ->>>>>>> resolve conflicts -======= ->>>>>>> 5a541b0209a0de11b20c5d153af1efa9333fd4ab -======= ->>>>>>> resolve final conflicts Integrations -<<<<<<< HEAD -<<<<<<< HEAD - -======= - ->>>>>>> allow Meraki integration dashboard at client level as well as agent - -<<<<<<< HEAD -<<<<<<< HEAD -======= ->>>>>>> 2c9d413a1a0d4d3715ac77ea408c94d156899e83 ->>>>>>> massive cleanup of files and restructure of integrations design -======= ->>>>>>> resolve conflicts -======= ->>>>>>> 5a541b0209a0de11b20c5d153af1efa9333fd4ab -======= ->>>>>>> resolve final conflicts Send Command -<<<<<<< HEAD -<<<<<<< HEAD -<<<<<<< HEAD - -======= -<<<<<<< HEAD -======= - ->>>>>>> 2c9d413a1a0d4d3715ac77ea408c94d156899e83 ->>>>>>> massive cleanup of files and restructure of integrations design -======= ->>>>>>> 5a541b0209a0de11b20c5d153af1efa9333fd4ab -======= ->>>>>>> resolve final conflicts @@ -234,25 +190,7 @@