Skip to content
Open
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
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
/plugins/Huntress/ @Deenk
/plugins/IncidentIO/ @noorulkhan-n
/plugins/Ivanti-ITSM/ @shawn149
/plugins/LaunchDarkly/ @clarkd
/plugins/MetOffice/ @blackgrouse
/plugins/Notion/ @clarkd
/plugins/Phare/ @vinbab
Expand Down
11 changes: 11 additions & 0 deletions plugins/LaunchDarkly/v1/configValidation.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"steps": [
{
"displayName": "Authenticate",
"dataStream": { "name": "callerIdentity" },
"required": true,
"error": "Could not authenticate with LaunchDarkly. Check that the access token is valid and that the selected instance matches the one you sign in to.",
"success": "Connected to LaunchDarkly successfully."
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"displayName": "Project contains Environment",
"source": { "types": "Environment" },
"target": { "types": "Project" },
"conditions": [{ "sourceProperty": "projectKey", "operator": "equals", "targetProperty": "rawId" }],
"labels": { "forward": "in", "reverse": "contains" }
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"displayName": "Project contains Flag",
"source": { "types": "Flag" },
"target": { "types": "Project" },
"conditions": [{ "sourceProperty": "projectKey", "operator": "equals", "targetProperty": "rawId" }],
"labels": { "forward": "in", "reverse": "contains" }
}
23 changes: 23 additions & 0 deletions plugins/LaunchDarkly/v1/custom_types.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
[
{
"name": "Project",
"sourceType": "Project",
"icon": "folder",
"singular": "Project",
"plural": "Projects"
},
{
"name": "Environment",
"sourceType": "Environment",
"icon": "layer-group",
"singular": "Environment",
"plural": "Environments"
},
{
"name": "Flag",
"sourceType": "Flag",
"icon": "flag",
"singular": "Flag",
"plural": "Flags"
}
]
67 changes: 67 additions & 0 deletions plugins/LaunchDarkly/v1/dataStreams/accountUsage.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
{
"name": "accountUsage",
"displayName": "Account Usage",
"description": "Account usage over time, such as monthly active users, contexts or SDK service connections",
"tags": ["Usage"],
"baseDataSourceName": "httpRequestUnscoped",
"config": {
"httpMethod": "get",
"endpointPath": "usage/{{metric}}",
"getArgs": [
{ "key": "from", "value": "{{timeframe.unixStart * 1000}}" },
{ "key": "to", "value": "{{timeframe.unixEnd * 1000}}" },
{ "key": "groupBy", "value": "{{groupBy || null}}" },
{
"key": "projectKey",
"value": "{{(project && project[0] && project[0].rawId && project[0].rawId[0]) || null}}"
}
],
"headers": [{ "key": "LD-API-Version", "value": "beta" }],
"postRequestScript": "accountUsage.js"
},
"matches": "none",
"ui": [
{
"type": "choiceChips",
"name": "metric",
"label": "Metric",
"defaultValue": "total-mau",
"validation": { "required": true },
"options": [
{ "value": "total-mau", "label": "Monthly active users" },
{ "value": "total-contexts", "label": "Contexts" },
{ "value": "service-connections", "label": "Service connections" }
]
},
{
"type": "choiceChips",
"name": "groupBy",
"label": "Group by (optional)",
"options": [
{ "value": "projectId", "label": "Project" },
{ "value": "environmentId", "label": "Environment" },
{ "value": "sdkName", "label": "SDK" }
]
},
{
"type": "objects",
"name": "project",
"label": "Project (optional)",
"matches": { "sourceType": { "type": "oneOf", "values": ["Project"] } }
}
],
"metadata": [
{ "name": "time", "displayName": "Time", "shape": "date", "role": "timestamp" },
{ "name": "group", "displayName": "Group", "role": "label" },
{ "name": "value", "displayName": "Value", "shape": "number", "role": "value" }
],
"timeframes": [
"last7days",
"last30days",
"thisMonth",
"lastMonth",
"thisQuarter",
"lastQuarter",
"thisYear"
]
}
78 changes: 78 additions & 0 deletions plugins/LaunchDarkly/v1/dataStreams/approvalRequests.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
{
"name": "approvalRequests",
"displayName": "Approval Requests",
"description": "Approval requests for flag changes, with their review status",
"tags": ["Activity", "Approvals"],
"baseDataSourceName": "httpRequestUnscoped",
"config": {
"httpMethod": "get",
"endpointPath": "approval-requests",
"getArgs": [
{
"key": "filter",
"value": "{{reviewStatus && reviewStatus !== 'all' ? 'reviewStatus anyOf [\"' + reviewStatus + '\"]' : null}}"
}
],
"paging": {
"mode": "offset",
"pageSize": { "realm": "queryArg", "path": "limit", "value": "100" },
"offset": {
"mode": "row",
"rowCountIn": { "realm": "payloadArraySize", "path": "items" },
"base": 0
},
"out": { "realm": "queryArg", "path": "offset" }
},
"postRequestScript": "approvalRequests.js"
},
"ui": [
{
"name": "reviewStatus",
"label": "Review status",
"type": "radio",
"defaultValue": "all",
"options": [
{ "value": "all", "label": "All" },
{ "value": "pending", "label": "Pending" },
{ "value": "approved", "label": "Approved" },
{ "value": "declined", "label": "Declined" }
]
}
],
"matches": "none",
"metadata": [
{ "name": "approvalId", "displayName": "Approval ID", "visible": false },
{ "name": "description", "displayName": "Description", "role": "label" },
{ "name": "createdAt", "displayName": "Created", "shape": "date" },
{
"name": "reviewState",
"displayName": "Review Health",
"shape": [
"state",
{
"map": {
"success": ["Approved"],
"warning": ["Pending"],
"error": ["Declined"]
}
}
]
},
{ "name": "reviewStatus", "displayName": "Review Status" },
{ "name": "status", "displayName": "Status" },
{ "name": "requestorId", "displayName": "Requestor ID" },
{ "name": "projectKey", "displayName": "Project" },
{ "name": "environmentKey", "displayName": "Environment" },
{ "name": "resourceKind", "displayName": "Resource Kind" },
{ "name": "flagId", "displayName": "Flag ID", "visible": false },
{ "sourceId": "flagId", "sourceType": "Flag", "name": "flagKey" },
{ "name": "flagKey", "displayName": "Flag" },
{ "name": "instructions", "displayName": "Changes" },
{ "name": "executionDate", "displayName": "Scheduled For", "shape": "date" },
{ "name": "appliedDate", "displayName": "Applied", "shape": "date" },
{ "name": "reviewers", "displayName": "Reviewers", "shape": "number" },
{ "name": "approvals", "displayName": "Approvals", "shape": "number" },
{ "name": "declines", "displayName": "Declines", "shape": "number" }
],
"timeframes": false
}
66 changes: 66 additions & 0 deletions plugins/LaunchDarkly/v1/dataStreams/auditLog.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
{
"name": "auditLog",
"displayName": "Audit Log",
"description": "Changes made in LaunchDarkly, such as flag updates, with who made them",
"tags": ["Activity", "Audit"],
"baseDataSourceName": "httpRequestUnscoped",
"config": {
"httpMethod": "get",
"endpointPath": "auditlog",
"getArgs": [
{ "key": "after", "value": "{{timeframe.unixStart * 1000}}" },
{
"key": "spec",
"value": "{{ (() => { const f = flag && flag[0]; const e = environment && environment[0]; const p = typeof project !== 'undefined' && project && project[0]; const u = (v) => (Array.isArray(v) ? v[0] : v); if (f) { return 'proj/' + u(f.projectKey) + ':env/' + ((e && u(e.environmentKey)) || '*') + ':flag/' + u(f.flagKey); } if (e) { return 'proj/' + u(e.projectKey) + ':env/' + u(e.environmentKey) + ':flag/*'; } if (p) { return 'proj/' + u(p.rawId) + ':env/*:flag/*'; } return null; })() }}"
}
],
"paging": {
"mode": "token",
"pageSize": { "realm": "queryArg", "path": "limit", "value": "20" },
"in": { "realm": "payload", "path": "items.19.date" },
"out": { "realm": "queryArg", "path": "before" }
},
"postRequestScript": "auditLog.js"
},
"ui": [
{
"type": "objects",
"name": "project",
"label": "Project (optional)",
"matches": { "sourceType": { "type": "oneOf", "values": ["Project"] } }
},
{
"type": "objects",
"name": "flag",
"label": "Flag (optional)",
"matches": { "sourceType": { "type": "oneOf", "values": ["Flag"] } }
},
{
"type": "objects",
"name": "environment",
"label": "Environment (optional)",
"matches": { "sourceType": { "type": "oneOf", "values": ["Environment"] } }
}
],
"matches": "none",
"metadata": [
{ "name": "id", "displayName": "ID", "visible": false },
{ "name": "date", "displayName": "Date", "shape": "date", "role": "timestamp" },
{ "name": "title", "displayName": "Change", "role": "label" },
{ "name": "description", "displayName": "Details" },
{ "name": "kind", "displayName": "Resource Type" },
{ "name": "action", "displayName": "Action" },
{ "name": "member", "displayName": "Changed By" },
{ "name": "project", "displayName": "Project" },
{ "name": "environment", "displayName": "Environment" },
{ "name": "flagId", "displayName": "Flag ID", "visible": false },
{ "sourceId": "flagId", "sourceType": "Flag", "name": "flagKey" },
{ "name": "flagKey", "displayName": "Flag" },
{
"name": "link",
"displayName": "Link",
"shape": ["url", { "label": "Open in LaunchDarkly" }]
}
],
"timeframes": true
}
17 changes: 17 additions & 0 deletions plugins/LaunchDarkly/v1/dataStreams/callerIdentity.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"name": "callerIdentity",
"displayName": "Caller Identity",
"description": "The account and access token used by this data source",
"tags": ["Accounts"],
"baseDataSourceName": "httpRequestUnscoped",
"config": { "httpMethod": "get", "endpointPath": "caller-identity" },
"matches": "none",
"metadata": [
{ "name": "accountId", "displayName": "Account ID", "role": "value" },
{ "name": "tokenName", "displayName": "Token Name", "role": "label" },
{ "name": "tokenKind", "displayName": "Token Kind" },
{ "name": "serviceToken", "displayName": "Service Token", "shape": "boolean" }
],
"timeframes": false,
"visibility": { "type": "hidden" }
}
33 changes: 33 additions & 0 deletions plugins/LaunchDarkly/v1/dataStreams/environments.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{
"name": "environments",
"displayName": "Environments",
"description": "Environments in a LaunchDarkly project",
"tags": ["Organization"],
"baseDataSourceName": "httpRequestScopedSingle",
"config": {
"httpMethod": "get",
"endpointPath": "projects/{{object.rawId}}/environments",
"paging": {
"mode": "offset",
"pageSize": { "realm": "queryArg", "path": "limit", "value": "100" },
"offset": {
"mode": "row",
"rowCountIn": { "realm": "payloadArraySize", "path": "items" },
"base": 0
},
"out": { "realm": "queryArg", "path": "offset" }
},
"postRequestScript": "environments.js"
},
"matches": { "sourceType": { "type": "oneOf", "values": ["Project"] } },
"metadata": [
{ "name": "environmentId", "displayName": "Environment ID", "visible": false },
{ "sourceId": "environmentId", "sourceType": "Environment", "name": "name" },
{ "name": "name", "displayName": "Name", "role": "label" },
{ "name": "environmentKey", "displayName": "Key" },
{ "name": "projectKey", "displayName": "Project Key" },
{ "name": "critical", "displayName": "Critical", "shape": "boolean" },
{ "name": "tagList", "displayName": "Tags" }
],
"timeframes": false
}
33 changes: 33 additions & 0 deletions plugins/LaunchDarkly/v1/dataStreams/flagEnvironments.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{
"name": "flagEnvironments",
"displayName": "Flag Environments",
"description": "State of a feature flag in each environment of its project",
"tags": ["Status", "Configuration"],
"baseDataSourceName": "httpRequestScopedSingle",
"config": {
"httpMethod": "get",
"endpointPath": "flags/{{object.projectKey}}/{{object.flagKey}}",
"postRequestScript": "flagEnvironments.js"
},
"matches": { "sourceType": { "type": "oneOf", "values": ["Flag"] } },
"metadata": [
{ "name": "environmentId", "displayName": "Environment ID", "visible": false },
{ "name": "environment", "displayName": "Environment", "role": "label" },
{ "name": "environmentKey", "displayName": "Key" },
{ "name": "on", "displayName": "On", "shape": "boolean" },
{
"name": "status",
"displayName": "Status",
"shape": ["state", { "map": { "success": ["On"], "unknown": ["Off"] } }]
},
{ "name": "servingVariation", "displayName": "Serving Variation" },
{ "name": "offVariation", "displayName": "Off Variation" },
{ "name": "rules", "displayName": "Rules", "shape": "number" },
{ "name": "targets", "displayName": "Targets", "shape": "number" },
{ "name": "prerequisites", "displayName": "Prerequisites", "shape": "number" },
{ "name": "lastModified", "displayName": "Last Modified", "shape": "date" },
{ "name": "version", "displayName": "Version", "shape": "number" },
{ "sourceId": "environmentId", "sourceType": "Environment", "name": "environment" }
],
"timeframes": false
}
33 changes: 33 additions & 0 deletions plugins/LaunchDarkly/v1/dataStreams/flagEvaluations.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{
"name": "flagEvaluations",
"displayName": "Flag Evaluations",
"description": "Evaluation counts for a feature flag over time, by variation",
"tags": ["Usage", "Analytics"],
"baseDataSourceName": "httpRequestScopedSingle",
"config": {
"httpMethod": "get",
"endpointPath": "usage/evaluations/{{object.projectKey}}/{{environmentKey || 'production'}}/{{object.flagKey}}",
"getArgs": [
{ "key": "from", "value": "{{timeframe.unixStart * 1000}}" },
{ "key": "to", "value": "{{timeframe.unixEnd * 1000}}" }
],
"headers": [{ "key": "LD-API-Version", "value": "beta" }],
"postRequestScript": "flagEvaluations.js"
},
"ui": [
{
"name": "environmentKey",
"label": "Environment key",
"type": "text",
"defaultValue": "production",
"placeholder": "production"
}
],
"matches": { "sourceType": { "type": "oneOf", "values": ["Flag"] } },
"metadata": [
{ "name": "time", "displayName": "Time", "shape": "date", "role": "timestamp" },
{ "name": "variation", "displayName": "Variation", "role": "label" },
{ "name": "evaluations", "displayName": "Evaluations", "shape": "number", "role": "value" }
],
"timeframes": true
}
Loading
Loading