Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions plugins/NinjaOne/v1/cspell.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"words": ["ninjarmm", "ninjaone", "bitlocker", "antivirus", "vulnerability", "vulnerabilities", "quarantined", "quarantinedthreatscount", "loggedin", "submask"]
}
43 changes: 43 additions & 0 deletions plugins/NinjaOne/v1/custom_types.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
[
{
"name": "NinjaOne Organization",
<<<<<<< Updated upstream
"sourceType": "NinjaOne",
=======
"sourceType": "ninja-one",
>>>>>>> Stashed changes
"icon": "building",
"singular": "Organization",
"plural": "Organizations"
},
{
"name": "NinjaOne Device",
<<<<<<< Updated upstream

Check failure on line 15 in plugins/NinjaOne/v1/custom_types.json

View check run for this annotation

Claude / Claude Code Review

Unresolved git merge conflict markers in committed files

Nearly every file in this PR contains unresolved git merge conflict markers (<<<<<<< Updated upstream, =======, >>>>>>> Stashed changes), making the JSON syntactically invalid and unparseable. The entire plugin is non-functional as submitted — all data streams, dashboards, custom types, scopes, and index definitions will fail to load. The author must resolve all conflicts and recommit clean files before this PR can be merged.
Comment on lines +1 to +15
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔴 Nearly every file in this PR contains unresolved git merge conflict markers (<<<<<<< Updated upstream, =======, >>>>>>> Stashed changes), making the JSON syntactically invalid and unparseable. The entire plugin is non-functional as submitted — all data streams, dashboards, custom types, scopes, and index definitions will fail to load. The author must resolve all conflicts and recommit clean files before this PR can be merged.

Extended reasoning...

What the bug is and how it manifests

The PR introduces a new NinjaOne plugin, but the files were committed while containing unresolved git merge conflict markers. Specifically, the conflict marker lines "<<<<<<< Updated upstream", "=======", and ">>>>>>> Stashed changes" appear verbatim throughout the committed files. A JSON parser will immediately reject any file containing these markers because they are not valid JSON syntax.

The specific code path that triggers it

Every time the plugin framework attempts to parse a plugin configuration file, it will call a JSON parser on the file contents. For example, custom_types.json starts with valid JSON ("[") but lines 4-8 contain raw conflict markers. Any JSON parser will throw a parse error when it encounters the conflict marker as a token. The same pattern repeats across 36+ files including all data streams, dashboards, scopes, index definitions, metadata, and ui.json.

Why existing code does not prevent it

Git conflict markers are plain text inserted by git during a failed or unresolved merge/rebase. There is no automatic mechanism in git to prevent committing files with conflict markers unless a pre-commit hook is configured to check for them. The developer appears to have run a git stash and then merged upstream changes, resulting in conflicts that were never resolved before committing.

What the impact would be

The impact is total: the plugin cannot function at all. Affected files include custom_types.json (custom object types won't register), all 25+ data stream JSON files (no data streams available), all 9 dashboard files (no dashboards), scopes.json (no scopes), indexDefinitions/default.json (no index/import), manifest.json (default content won't load), metadata.json (plugin metadata invalid), and ui.json (configuration UI broken). Zero functionality will work.

How to fix it

The author must resolve all merge conflicts in every affected file. They should: (1) run "git grep -l" to find all files with unresolved conflicts, (2) for each file, decide which version (upstream or stashed) is correct and manually merge, (3) remove all conflict marker lines, (4) verify each JSON file parses correctly using a JSON validator, and (5) re-commit the corrected files.

Step-by-step proof

Take custom_types.json as a concrete example. A JSON parser processes the file token by token:

  1. "[" — valid array start
  2. "{" — valid object start
  3. "name": "NinjaOne Organization" — valid string property
  4. "<<<<<<< Updated upstream" — PARSE ERROR: the angle bracket character is not valid JSON; the parser aborts immediately

This happens at line 4 of the very first file in the plugin. Every other affected file fails similarly when the parser reaches a conflict marker. Verified by multiple reviewers who grepped the repository and confirmed 36 files are affected.

"sourceType": "NinjaOne",
=======
"sourceType": "ninja-one",
>>>>>>> Stashed changes
"icon": "desktop",
"singular": "Device",
"plural": "Devices"
},
{
<<<<<<< Updated upstream
"name": "NinjaOne Ticket Board",
"sourceType": "NinjaOne",
=======
"name": "NinjaOne Location",
"sourceType": "ninja-one",
"icon": "map-marker-alt",
"singular": "Location",
"plural": "Locations"
},
{
"name": "NinjaOne Ticket Board",
"sourceType": "ninja-one",
>>>>>>> Stashed changes
"icon": "kanban",
"singular": "Ticket Board",
"plural": "Ticket Boards"
}
]
136 changes: 136 additions & 0 deletions plugins/NinjaOne/v1/dataStreams/activities.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,136 @@
{
"name": "activities",
"displayName": "Activities",
"baseDataSourceName": "httpRequestUnscoped",
"config": {
"httpMethod": "get",
"paging": {
<<<<<<< Updated upstream
"mode": "none"
},
"expandInnerObjects": false,
"endpointPath": "/v2/activities",
"pathToData": "activities",
"getArgs": [],
"headers": []
},
=======
"mode": "token",
"pageSize": {
"realm": "queryArg",
"path": "pageSize",
"value": "1000"
},
"in": {
"realm": "payload",
"path": "lastActivityId"
},
"out": {
"realm": "queryArg",
"path": "olderThan"
}
},
"expandInnerObjects": true,
"endpointPath": "/v2/activities",
"pathToData": "activities",
"getArgs": [
{
"key": "after",
"value": "{{timeframe.start}}"
},
{
"key": "before",
"value": "{{timeframe.end}}"
}
],
"headers": []
},
"metadata": [
{
"name": "activityTime",
"displayName": "Activity Time",
"shape": [
"date",
{
"timeZone": "Etc/UTC"
}
]
},
{
"name": "activity",
"displayName": "Activity",
"shape": "string",
"role": "label"
},
{
"name": "activityId",
"displayName": "Activity ID",
"shape": "number",
"role": "id",
"visible": false
},
{
"name": "description",
"displayName": "Description",
"shape": "string"
},
{
"name": "activityType",
"displayName": "Activity Type",
"shape": "string"
},
{
"name": "source",
"displayName": "Source",
"shape": "string"
},
{
"name": "deviceId",
"displayName": "Device ID",
"shape": "string"
},
{
"name": "deviceName",
"displayName": "Device Name",
"shape": "string"
},
{
"name": "organizationId",
"displayName": "Organization ID",
"shape": "string"
},
{
"name": "organizationName",
"displayName": "Organization Name",
"shape": "string"
},
{
"name": "userId",
"displayName": "User ID",
"shape": "string"
},
{
"name": "userName",
"displayName": "User Name",
"shape": "string"
},
{
"pattern": ".*"
}
],
>>>>>>> Stashed changes
"timeframes": [
"last1hour",
"last12hours",
"last24hours",
"last7days",
"last30days",
"thisMonth",
"thisQuarter",
"thisYear",
"lastMonth",
"lastQuarter",
"lastYear",
"none"
]
}
153 changes: 153 additions & 0 deletions plugins/NinjaOne/v1/dataStreams/alerts.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,153 @@
{
"name": "alerts",
"displayName": "Alerts",
<<<<<<< Updated upstream
=======
"description": "Active alerts and triggered conditions",
>>>>>>> Stashed changes
"baseDataSourceName": "httpRequestUnscoped",
"config": {
"httpMethod": "get",
"paging": {
"mode": "none"
},
<<<<<<< Updated upstream
"expandInnerObjects": false,
=======
"expandInnerObjects": true,
>>>>>>> Stashed changes
"endpointPath": "/v2/alerts",
"pathToData": "",
"getArgs": [],
"headers": []
},
<<<<<<< Updated upstream
"timeframes": [
"last1hour",
"last12hours",
"last24hours",
"last7days",
"last30days",
"thisMonth",
"thisQuarter",
"thisYear",
"lastMonth",
"lastQuarter",
"lastYear",
=======
"metadata": [
{
"name": "conditionHealthStatus",
"displayName": "Health Status",
"shape": [
"state",
{
"map": {
"error": ["UNHEALTHY"],
"warning": ["NEEDS_ATTENTION"],
"success": ["HEALTHY"],
"unknown": ["UNKNOWN"]
}
}
]
},
{
"name": "uid",
"displayName": "Alert ID",
"shape": "string",
"role": "id",
"visible": false
},
{
"name": "sourceName",
"displayName": "Alert Name",
"shape": "string",
"role": "label"
},
{
"name": "message",
"displayName": "Message",
"shape": "string"
},
{
"name": "subject",
"displayName": "Subject",
"shape": "string"
},
{
"name": "severity",
"displayName": "Severity",
"shape": "string"
},
{
"name": "sourceType",
"displayName": "Source Type",
"shape": "string"
},
{
"name": "createTime",
"displayName": "Created At",
"shape": [
"date",
{
"timeZone": "Etc/UTC"
}
]
},
{
"name": "updateTime",
"displayName": "Updated At",
"shape": [
"date",
{
"timeZone": "Etc/UTC"
}
]
},
{
"name": "device_id",
"displayName": "Device ID",
"shape": "string",
"visible": false
},
{
"name": "device_displayName",
"displayName": "Device",
"shape": "string"
},
{
"name": "device_organizationId",
"displayName": "Organization ID",
"shape": "string",
"visible": false
},
{
"name": "device_references_organization_name",
"displayName": "Organization",
"shape": "string"
},
{
"name": "device_locationId",
"displayName": "Location ID",
"shape": "string",
"visible": false
},
{
"name": "device_references_location_name",
"displayName": "Location",
"shape": "string"
},
{
"name": "device_offline",
"displayName": "Device Offline",
"shape": "boolean"
},
{
"pattern": ".*"
}
],
"timeframes": [
>>>>>>> Stashed changes
"none"
]
}
Loading