Skip to content

Remove commented code and update min reqd version #22

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 6, 2023
Merged
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
18 changes: 9 additions & 9 deletions dist/MANIFEST.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ Hash: SHA512
"signedByOrgName": "parseable",
"plugin": "parseable-parseable-datasource",
"version": "1.0.2",
"time": 1677758691010,
"time": 1678091287733,
"keyId": "7e4d0c6a708866e7",
"files": {
"LICENSE": "20b067f86de375aae6db0f283ab2e65de24d537733b89bd58432c101259d84cf",
"CHANGELOG.md": "ba613d6f914b27dce9ace4d8c0cb074273c9eb6c536d8e7ac24c5ce6ae941fd0",
"module.js.map": "528461b3e766c887e2a6800c1276bee7801224beb1feb497f323913b0a32163f",
"plugin.json": "43b0538abbf9a312a5d212f11236a2cb6dc61f1f248c67838ee87cbd0a73e5d7",
"module.js.map": "98ca780abf736bc47e7fbf2e5b3e534fca3acb7899bd6769f99fdff694477dc1",
"plugin.json": "9aeb4b12dc39425b139e9818c0b9f4c30314de6387bf5c8802deb7e36eed6a57",
"README.md": "030a05e0d49d3746ef272d53c99936e3b98e3219a1cac96ca1df48ddee475934",
"img/configuration.png": "c545a51bcc88809b2b4f87aac517a7d27ad61281344b0485c9826370b915b4d8",
"img/log-view-text.png": "8c6555af9c391cb1a8368c79b9bcc7386887beeea061e3483b0e020feec9d73d",
Expand All @@ -38,10 +38,10 @@ Hash: SHA512
Version: OpenPGP.js v4.10.10
Comment: https://openpgpjs.org

wrgEARMKAAYFAmQAkOMAIQkQfk0ManCIZucWIQTzOyW2kQdOhGNlcPN+TQxq
cIhm5/XKAgdPQ1Nxylk8UlM/6cn/51cRH86D24N2LUTOTIvg9JIj02RcQ1Nz
UpcZZ1kirEzB9LFrqLlZtTd1F5AbZZYdK1z1pwIJAYLnsOX5TA4mi0VrS0AS
3I6IIrmywu2HxeMR0NjBYrGHnrgIB/SFwIKmV0zipaU1UNApomVcNdrS8MBg
SS2x0S9F
=LKAR
wrkEARMKAAYFAmQFpBcAIQkQfk0ManCIZucWIQTzOyW2kQdOhGNlcPN+TQxq
cIhm501IAgkB1WA0MsZjjYjtnXs7zy1JWvJ4jz79wCupBo3Q4bW6oJu50ArI
uxDUCnCN8KxlGHFNiKSQeFlPdsgm9GNjKhgbf6MCCQFf7Cz902ksGnQSHlnA
KmXHsXRNJYsI165Y9pJA5jQUQfDf71br0nPoggUtHU2cKpJvUrE9amF2zoHn
hcEDcrB/Gw==
=JuLg
-----END PGP SIGNATURE-----
2 changes: 1 addition & 1 deletion dist/module.js.map

Large diffs are not rendered by default.

7 changes: 4 additions & 3 deletions dist/plugin.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
"info": {
"description": "Parseable is an open source, Kubernetes native, log storage and observability platform. This plugin allows you to visualize your Parseable logs in Grafana.",
"author": {
"name": "Parseable Team <[email protected]>"
"name": "Parseable Team",
"url": "https://parseable.io"
},
"keywords": ["datasource", "logging", "log observability", "log analytics", "parseable"],
"logos": {
Expand All @@ -25,7 +26,7 @@
{"name": "Log Dashboard", "path": "img/log-visualisation.png"}
],
"version": "1.0.2",
"updated": "2023-03-02"
"updated": "2023-03-06"
},
"routes": [
{
Expand All @@ -40,7 +41,7 @@
}
],
"dependencies": {
"grafanaDependency": "^9.2.5",
"grafanaDependency": "^9.0.0",
"plugins": []
}
}
Binary file modified releases/parseable-datasource-1.0.2.zip
Binary file not shown.
2 changes: 1 addition & 1 deletion releases/parseable-datasource-1.0.2.zip.sha1
Original file line number Diff line number Diff line change
@@ -1 +1 @@
83db49cb38e84d21d9408ba53d46e23f782f426a
c79c4576d9db03184ff77ca9f0b67795ed1d9cd4
48 changes: 0 additions & 48 deletions src/datasource.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,7 @@ import {
DataQueryResponse,
DataSourceApi,
DataSourceInstanceSettings,
// MutableDataFrame,
// DataFrame,
toDataFrame,
// FieldType,
// guessFieldTypeFromValue,
} from '@grafana/data';
import { lastValueFrom, of } from 'rxjs';
import { catchError, map } from 'rxjs/operators';
Expand All @@ -20,7 +16,6 @@ import {
QueryEditorMode,
StreamName,
StreamList,
//Fields,
StreamSchemaResponse,
StreamStatsResponse
} from './types';
Expand Down Expand Up @@ -95,49 +90,6 @@ export class DataSource extends DataSourceApi<MyQuery, MyDataSourceOptions> {
return getBackendSrv().fetch<T>(options);
}

// arrayToDataFrame(array: any[]): DataFrame {
// let dataFrame: MutableDataFrame = new MutableDataFrame();
// if (array.length > 0) {
// const fields = Object.keys(array[0]).map(field => {
// return { name: field, type: guessFieldTypeFromValue(array[0][field]) };
// });

// toDataFrame(array);
// let timeFieldFound = false;
// for (const field of fields) {
// // Check for p_timestamp first
// // because if it is present we want to use this field
// // as we know the format (ISO8601)
// if (field.name.toLowerCase() === 'p_timestamp') {
// field.type = FieldType.time;
// timeFieldFound = true;
// break;
// }
// }
// // fallback to other possible time fields
// // if p_timestamp is not present
// if (!timeFieldFound) {
// for (const field of fields) {
// if (field.name.toLowerCase() === 'time') {
// field.type = FieldType.time;
// } else if (field.name.toLowerCase() === 'datetime') {
// field.type = FieldType.time;
// } else if (field.name.toLowerCase() === 'timestamp') {
// field.type = FieldType.time;
// } else if (field.name.toLowerCase() === 'date') {
// field.type = FieldType.time;
// }
// }
// }

// dataFrame = new MutableDataFrame({ fields });
// array.forEach((row, index) => {
// dataFrame.appendRow(Object.values(row));
// });
// }
// return dataFrame;
// }

async listStreams(): Promise<StreamList[]> {
return lastValueFrom(
this.doFetch({
Expand Down
5 changes: 3 additions & 2 deletions src/plugin.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
"info": {
"description": "Parseable is an open source, Kubernetes native, log storage and observability platform. This plugin allows you to visualize your Parseable logs in Grafana.",
"author": {
"name": "Parseable Team <[email protected]>"
"name": "Parseable Team",
"url": "https://parseable.io"
},
"keywords": ["datasource", "logging", "log observability", "log analytics", "parseable"],
"logos": {
Expand Down Expand Up @@ -40,7 +41,7 @@
}
],
"dependencies": {
"grafanaDependency": "^9.2.5",
"grafanaDependency": "^9.0.0",
"plugins": []
}
}