Fix warning and update api-reports
Signed-off-by: Julio Zynger <julio.zynger@soundcloud.com>
This commit is contained in:
committed by
Fredrik Adelöw
parent
7bb98ee655
commit
b6fdf5c5f3
@@ -17,7 +17,8 @@
|
||||
import { ConfigApi, DiscoveryApi } from '@backstage/core-plugin-api';
|
||||
import { AggregatedError, NotFoundInInstance } from '../types';
|
||||
|
||||
type Options = {
|
||||
/** @public */
|
||||
export type PeriskopApiOptions = {
|
||||
discoveryApi: DiscoveryApi;
|
||||
configApi: ConfigApi;
|
||||
};
|
||||
@@ -36,7 +37,7 @@ export class PeriskopApi {
|
||||
private readonly discoveryApi: DiscoveryApi;
|
||||
private readonly instances: PeriskopInstance[];
|
||||
|
||||
constructor(options: Options) {
|
||||
constructor(options: PeriskopApiOptions) {
|
||||
this.discoveryApi = options.discoveryApi;
|
||||
this.instances = options.configApi
|
||||
.getConfigArray('periskop.instances')
|
||||
|
||||
@@ -21,3 +21,4 @@ export {
|
||||
PERISKOP_NAME_ANNOTATION,
|
||||
} from './components/PeriskopErrorsTable';
|
||||
export * from './api/index';
|
||||
export * from './types';
|
||||
|
||||
@@ -14,12 +14,15 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/** @public */
|
||||
export interface AggregatedError {
|
||||
aggregation_key: string;
|
||||
total_count: number;
|
||||
severity: string;
|
||||
latest_errors: ErrorInstance[];
|
||||
}
|
||||
|
||||
/** @public */
|
||||
export interface ErrorInstance {
|
||||
error: Error;
|
||||
uuid: string;
|
||||
@@ -27,22 +30,29 @@ export interface ErrorInstance {
|
||||
severity: string;
|
||||
http_context: HttpContext;
|
||||
}
|
||||
|
||||
/** @public */
|
||||
export interface Error {
|
||||
class: string;
|
||||
message: string;
|
||||
stacktrace?: string[];
|
||||
cause?: Error | null;
|
||||
}
|
||||
|
||||
/** @public */
|
||||
export interface HttpContext {
|
||||
request_method: string;
|
||||
request_url: string;
|
||||
request_headers: RequestHeaders;
|
||||
request_body: string;
|
||||
}
|
||||
|
||||
/** @public */
|
||||
export interface RequestHeaders {
|
||||
[k: string]: string;
|
||||
}
|
||||
|
||||
/** @public */
|
||||
export interface NotFoundInInstance {
|
||||
body: string;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user