@jfvilas/plugin-kwirth-log 0.12.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +148 -0
- package/dist/api/KwirthLogClient.esm.js +65 -0
- package/dist/api/KwirthLogClient.esm.js.map +1 -0
- package/dist/api/types.esm.js +8 -0
- package/dist/api/types.esm.js.map +1 -0
- package/dist/assets/kwirth-log-component-not-found.svg +32 -0
- package/dist/assets/kwirthlog-logo.svg +23 -0
- package/dist/components/ClusterList/ClusterList.esm.js +30 -0
- package/dist/components/ClusterList/ClusterList.esm.js.map +1 -0
- package/dist/components/ComponentNotFound/ComponentNotFound.esm.js +60 -0
- package/dist/components/ComponentNotFound/ComponentNotFound.esm.js.map +1 -0
- package/dist/components/EntityKwirthLogContent/EntityKwirthLogContent.esm.js +304 -0
- package/dist/components/EntityKwirthLogContent/EntityKwirthLogContent.esm.js.map +1 -0
- package/dist/components/EntityKwirthLogContent/index.esm.js +2 -0
- package/dist/components/EntityKwirthLogContent/index.esm.js.map +1 -0
- package/dist/components/ObjectSelector/ObjectSelector.esm.js +84 -0
- package/dist/components/ObjectSelector/ObjectSelector.esm.js.map +1 -0
- package/dist/components/Options/Options.esm.js +20 -0
- package/dist/components/Options/Options.esm.js.map +1 -0
- package/dist/components/ShowError/ShowError.esm.js +20 -0
- package/dist/components/ShowError/ShowError.esm.js.map +1 -0
- package/dist/components/StatusLog/StatusLog.esm.js +10 -0
- package/dist/components/StatusLog/StatusLog.esm.js.map +1 -0
- package/dist/index.d.ts +39 -0
- package/dist/index.esm.js +4 -0
- package/dist/index.esm.js.map +1 -0
- package/dist/plugin.esm.js +33 -0
- package/dist/plugin.esm.js.map +1 -0
- package/dist/routes.esm.js +8 -0
- package/dist/routes.esm.js.map +1 -0
- package/package.json +90 -0
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import * as react from 'react';
|
|
2
|
+
import * as _backstage_core_plugin_api from '@backstage/core-plugin-api';
|
|
3
|
+
import { DiscoveryApi, FetchApi } from '@backstage/core-plugin-api';
|
|
4
|
+
export { isKubelogAvailable } from '@jfvilas/plugin-kubelog-common';
|
|
5
|
+
import { Entity } from '@backstage/catalog-model';
|
|
6
|
+
import { ClusterValidPods } from '@jfvilas/plugin-kwirth-common';
|
|
7
|
+
|
|
8
|
+
declare const kwirthLogPlugin: _backstage_core_plugin_api.BackstagePlugin<{
|
|
9
|
+
root: _backstage_core_plugin_api.RouteRef<undefined>;
|
|
10
|
+
}, {}, {}>;
|
|
11
|
+
declare const EntityKwirthLogContent: () => react.JSX.Element;
|
|
12
|
+
|
|
13
|
+
interface KwirthLogApi {
|
|
14
|
+
getResources(entity: Entity): Promise<any>;
|
|
15
|
+
requestAccess(entity: Entity, scopes: string[]): Promise<any>;
|
|
16
|
+
getVersion(): Promise<any>;
|
|
17
|
+
}
|
|
18
|
+
declare const kwirthLogApiRef: _backstage_core_plugin_api.ApiRef<KwirthLogApi>;
|
|
19
|
+
|
|
20
|
+
interface KwirthLogClientOptions {
|
|
21
|
+
discoveryApi: DiscoveryApi;
|
|
22
|
+
fetchApi: FetchApi;
|
|
23
|
+
}
|
|
24
|
+
declare class KwirthLogClient implements KwirthLogApi {
|
|
25
|
+
private readonly discoveryApi;
|
|
26
|
+
private readonly fetchApi;
|
|
27
|
+
constructor(options: KwirthLogClientOptions);
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
* @param entity
|
|
31
|
+
* @returns an array of clusters (with their correpsonding info) and a pod list for each, where the entity has been dicovered
|
|
32
|
+
*/
|
|
33
|
+
getVersion(): Promise<string>;
|
|
34
|
+
getResources(entity: Entity): Promise<ClusterValidPods>;
|
|
35
|
+
requestAccess(entity: Entity, scopes: string[]): Promise<ClusterValidPods>;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export { EntityKwirthLogContent, KwirthLogClient, kwirthLogApiRef, kwirthLogPlugin };
|
|
39
|
+
export type { KwirthLogApi, KwirthLogClientOptions };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { KwirthLogClient } from './api/KwirthLogClient.esm.js';
|
|
2
|
+
import { kwirthLogApiRef } from './api/types.esm.js';
|
|
3
|
+
import { createPlugin, createApiFactory, fetchApiRef, discoveryApiRef, createRoutableExtension } from '@backstage/core-plugin-api';
|
|
4
|
+
import { rootRouteRef } from './routes.esm.js';
|
|
5
|
+
|
|
6
|
+
const kwirthLogPlugin = createPlugin({
|
|
7
|
+
id: "kwirthlog",
|
|
8
|
+
apis: [
|
|
9
|
+
createApiFactory({
|
|
10
|
+
api: kwirthLogApiRef,
|
|
11
|
+
deps: {
|
|
12
|
+
discoveryApi: discoveryApiRef,
|
|
13
|
+
fetchApi: fetchApiRef
|
|
14
|
+
},
|
|
15
|
+
factory({ discoveryApi, fetchApi }) {
|
|
16
|
+
return new KwirthLogClient({ discoveryApi, fetchApi });
|
|
17
|
+
}
|
|
18
|
+
})
|
|
19
|
+
],
|
|
20
|
+
routes: {
|
|
21
|
+
root: rootRouteRef
|
|
22
|
+
}
|
|
23
|
+
});
|
|
24
|
+
const EntityKwirthLogContent = kwirthLogPlugin.provide(
|
|
25
|
+
createRoutableExtension({
|
|
26
|
+
name: "EntityKwirthLogContent",
|
|
27
|
+
component: () => import('./components/EntityKwirthLogContent/index.esm.js').then((m) => m.EntityKwirthLogContent),
|
|
28
|
+
mountPoint: rootRouteRef
|
|
29
|
+
})
|
|
30
|
+
);
|
|
31
|
+
|
|
32
|
+
export { EntityKwirthLogContent, kwirthLogPlugin };
|
|
33
|
+
//# sourceMappingURL=plugin.esm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plugin.esm.js","sources":["../src/plugin.ts"],"sourcesContent":["/*\r\nCopyright 2024 Julio Fernandez\r\n\r\nLicensed under the Apache License, Version 2.0 (the \"License\");\r\nyou may not use this file except in compliance with the License.\r\nYou may obtain a copy of the License at\r\n\r\n http://www.apache.org/licenses/LICENSE-2.0\r\n\r\nUnless required by applicable law or agreed to in writing, software\r\ndistributed under the License is distributed on an \"AS IS\" BASIS,\r\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\nSee the License for the specific language governing permissions and\r\nlimitations under the License.\r\n*/\r\nimport { kwirthLogApiRef, KwirthLogClient } from './api';\r\nimport { createApiFactory, createPlugin, createRoutableExtension } from '@backstage/core-plugin-api';\r\nimport { discoveryApiRef, fetchApiRef } from '@backstage/core-plugin-api';\r\nimport { rootRouteRef } from './routes';\r\n\r\nexport const kwirthLogPlugin = createPlugin({\r\n id: 'kwirthlog', \r\n apis: [\r\n createApiFactory({\r\n api: kwirthLogApiRef,\r\n deps: {\r\n discoveryApi: discoveryApiRef,\r\n fetchApi: fetchApiRef,\r\n },\r\n factory({ discoveryApi, fetchApi }) {\r\n return new KwirthLogClient({ discoveryApi, fetchApi });\r\n },\r\n }),\r\n ],\r\n routes: {\r\n root: rootRouteRef\r\n }\r\n});\r\n\r\nexport const EntityKwirthLogContent = kwirthLogPlugin.provide(\r\n createRoutableExtension({\r\n name: 'EntityKwirthLogContent',\r\n component: () =>\r\n import('./components/EntityKwirthLogContent').then(m => m.EntityKwirthLogContent),\r\n mountPoint: rootRouteRef\r\n })\r\n);\r\n"],"names":[],"mappings":";;;;;AAoBO,MAAM,kBAAkB,YAAa,CAAA;AAAA,EAC1C,EAAI,EAAA,WAAA;AAAA,EACJ,IAAM,EAAA;AAAA,IACJ,gBAAiB,CAAA;AAAA,MACf,GAAK,EAAA,eAAA;AAAA,MACL,IAAM,EAAA;AAAA,QACJ,YAAc,EAAA,eAAA;AAAA,QACd,QAAU,EAAA;AAAA,OACZ;AAAA,MACA,OAAQ,CAAA,EAAE,YAAc,EAAA,QAAA,EAAY,EAAA;AAClC,QAAA,OAAO,IAAI,eAAA,CAAgB,EAAE,YAAA,EAAc,UAAU,CAAA;AAAA;AACvD,KACD;AAAA,GACH;AAAA,EACA,MAAQ,EAAA;AAAA,IACN,IAAM,EAAA;AAAA;AAEV,CAAC;AAEM,MAAM,yBAAyB,eAAgB,CAAA,OAAA;AAAA,EACpD,uBAAwB,CAAA;AAAA,IACtB,IAAM,EAAA,wBAAA;AAAA,IACN,SAAA,EAAW,MACT,OAAO,kDAAqC,EAAE,IAAK,CAAA,CAAA,CAAA,KAAK,EAAE,sBAAsB,CAAA;AAAA,IAClF,UAAY,EAAA;AAAA,GACb;AACH;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"routes.esm.js","sources":["../src/routes.ts"],"sourcesContent":["/*\r\nCopyright 2024 Julio Fernandez\r\n\r\nLicensed under the Apache License, Version 2.0 (the \"License\");\r\nyou may not use this file except in compliance with the License.\r\nYou may obtain a copy of the License at\r\n\r\n http://www.apache.org/licenses/LICENSE-2.0\r\n\r\nUnless required by applicable law or agreed to in writing, software\r\ndistributed under the License is distributed on an \"AS IS\" BASIS,\r\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\nSee the License for the specific language governing permissions and\r\nlimitations under the License.\r\n*/\r\nimport { createRouteRef } from '@backstage/core-plugin-api';\r\n\r\nexport const rootRouteRef = createRouteRef({\r\n id: 'kwirthlog',\r\n});\r\n"],"names":[],"mappings":";;AAiBO,MAAM,eAAe,cAAe,CAAA;AAAA,EACzC,EAAI,EAAA;AACN,CAAC;;;;"}
|
package/package.json
ADDED
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@jfvilas/plugin-kwirth-log",
|
|
3
|
+
"version": "0.12.2",
|
|
4
|
+
"description": "Frontend plugin for viewing real-time Kubernetes logs in Backstage",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"Backstage",
|
|
7
|
+
"Kubernetes",
|
|
8
|
+
"log",
|
|
9
|
+
"observability",
|
|
10
|
+
"Kwirth",
|
|
11
|
+
"plugin"
|
|
12
|
+
],
|
|
13
|
+
"backstage": {
|
|
14
|
+
"role": "frontend-plugin",
|
|
15
|
+
"pluginId": "kwirth",
|
|
16
|
+
"pluginPackages": [
|
|
17
|
+
"@jfvilas/plugin-kwirth-log",
|
|
18
|
+
"@jfvilas/plugin-kwirth-backend",
|
|
19
|
+
"@jfvilas/plugin-kwirth-common"
|
|
20
|
+
]
|
|
21
|
+
},
|
|
22
|
+
"repository": {
|
|
23
|
+
"type": "git",
|
|
24
|
+
"url": "git+https://github.com/jfvilas/plugin-kwirth-log.git"
|
|
25
|
+
},
|
|
26
|
+
"publishConfig": {
|
|
27
|
+
"access": "public"
|
|
28
|
+
},
|
|
29
|
+
"license": "Apache-2.0",
|
|
30
|
+
"author": {
|
|
31
|
+
"name": "Julio Fernandez",
|
|
32
|
+
"url": "https://github.com/jfvilas",
|
|
33
|
+
"email": "jfvilas@outlook.com"
|
|
34
|
+
},
|
|
35
|
+
"sideEffects": false,
|
|
36
|
+
"exports": {
|
|
37
|
+
".": {
|
|
38
|
+
"import": "./dist/index.esm.js",
|
|
39
|
+
"types": "./dist/index.d.ts",
|
|
40
|
+
"default": "./dist/index.esm.js"
|
|
41
|
+
},
|
|
42
|
+
"./package.json": "./package.json"
|
|
43
|
+
},
|
|
44
|
+
"main": "./dist/index.esm.js",
|
|
45
|
+
"types": "./dist/index.d.ts",
|
|
46
|
+
"files": [
|
|
47
|
+
"dist"
|
|
48
|
+
],
|
|
49
|
+
"scripts": {
|
|
50
|
+
"build": "backstage-cli package build",
|
|
51
|
+
"clean": "backstage-cli package clean",
|
|
52
|
+
"lint": "backstage-cli package lint",
|
|
53
|
+
"prepack": "backstage-cli package prepack",
|
|
54
|
+
"postpack": "backstage-cli package postpack",
|
|
55
|
+
"start": "backstage-cli package start",
|
|
56
|
+
"test": "backstage-cli package test"
|
|
57
|
+
},
|
|
58
|
+
"dependencies": {
|
|
59
|
+
"@backstage/catalog-model": "^1.5.0",
|
|
60
|
+
"@backstage/core-components": "^0.14.9",
|
|
61
|
+
"@backstage/core-plugin-api": "^1.9.3",
|
|
62
|
+
"@backstage/frontend-plugin-api": "^0.7.0",
|
|
63
|
+
"@backstage/integration-react": "^1.1.29",
|
|
64
|
+
"@backstage/plugin-auth-react": "^0.1.4",
|
|
65
|
+
"@backstage/plugin-catalog-react": "^1.12.2",
|
|
66
|
+
"@jfvilas/kwirth-common": "^0.3.55",
|
|
67
|
+
"@material-ui/core": "^4.12.2",
|
|
68
|
+
"@material-ui/icons": "^4.9.1",
|
|
69
|
+
"@types/react": "^16.13.1 || ^17.0.0 || ^18.0.0",
|
|
70
|
+
"react-use": "^17.2.4"
|
|
71
|
+
},
|
|
72
|
+
"devDependencies": {
|
|
73
|
+
"@backstage/cli": "^0.26.11",
|
|
74
|
+
"@testing-library/dom": "^10.0.0",
|
|
75
|
+
"@testing-library/jest-dom": "^6.0.0",
|
|
76
|
+
"@testing-library/react": "^15.0.0",
|
|
77
|
+
"@types/lodash": "^4.14.151",
|
|
78
|
+
"@types/react-dom": "^18.2.19",
|
|
79
|
+
"canvas": "^2.11.2",
|
|
80
|
+
"react": "^16.13.1 || ^17.0.0 || ^18.0.0",
|
|
81
|
+
"react-dom": "^16.13.1 || ^17.0.0 || ^18.0.0",
|
|
82
|
+
"react-router-dom": "6.0.0-beta.0 || ^6.3.0"
|
|
83
|
+
},
|
|
84
|
+
"peerDependencies": {
|
|
85
|
+
"react": "^16.13.1 || ^17.0.0 || ^18.0.0",
|
|
86
|
+
"react-dom": "^16.13.1 || ^17.0.0 || ^18.0.0",
|
|
87
|
+
"react-router-dom": "6.0.0-beta.0 || ^6.3.0"
|
|
88
|
+
},
|
|
89
|
+
"module": "./dist/index.esm.js"
|
|
90
|
+
}
|