mirror of
https://github.com/elastic/kibana.git
synced 2025-06-27 18:51:07 -04:00
Adding PagerDuty icon to connectors cards (#60805)
* adding PagerDuty icon to connectors cards * Fix jest * remove unnecessary global typings from canvas and sync global typings in xpack with oss Co-authored-by: Andrea Del Rio <delrio.andre@gmail.com> Co-authored-by: spalger <spalger@users.noreply.github.com> Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
This commit is contained in:
parent
477ce93d17
commit
7d97ead26e
7 changed files with 54 additions and 17 deletions
|
@ -1,9 +1,7 @@
|
||||||
{
|
{
|
||||||
"extends": "../../tsconfig.json",
|
"extends": "../../tsconfig.json",
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"outDir": "./target",
|
"outDir": "./target"
|
||||||
"skipLibCheck": true,
|
|
||||||
"resolveJsonModule": true
|
|
||||||
},
|
},
|
||||||
"include": [
|
"include": [
|
||||||
"index.ts",
|
"index.ts",
|
||||||
|
|
25
typings/index.d.ts
vendored
25
typings/index.d.ts
vendored
|
@ -23,6 +23,27 @@ declare module '*.html' {
|
||||||
export default template;
|
export default template;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
declare module '*.png' {
|
||||||
|
const content: string;
|
||||||
|
// eslint-disable-next-line import/no-default-export
|
||||||
|
export default content;
|
||||||
|
}
|
||||||
|
|
||||||
|
declare module '*.svg' {
|
||||||
|
const content: string;
|
||||||
|
// eslint-disable-next-line import/no-default-export
|
||||||
|
export default content;
|
||||||
|
}
|
||||||
|
|
||||||
|
// allow JSON files to be imported directly without lint errors
|
||||||
|
// see: https://github.com/palantir/tslint/issues/1264#issuecomment-228433367
|
||||||
|
// and: https://github.com/Microsoft/TypeScript/wiki/Breaking-Changes#arbitrary-expressions-are-forbidden-in-export-assignments-in-ambient-contexts
|
||||||
|
declare module '*.json' {
|
||||||
|
const json: any;
|
||||||
|
// eslint-disable-next-line import/no-default-export
|
||||||
|
export default json;
|
||||||
|
}
|
||||||
|
|
||||||
type MethodKeysOf<T> = {
|
type MethodKeysOf<T> = {
|
||||||
[K in keyof T]: T[K] extends (...args: any[]) => any ? K : never;
|
[K in keyof T]: T[K] extends (...args: any[]) => any ? K : never;
|
||||||
}[keyof T];
|
}[keyof T];
|
||||||
|
@ -37,3 +58,7 @@ type DeeplyMockedKeys<T> = {
|
||||||
: DeeplyMockedKeys<T[P]>;
|
: DeeplyMockedKeys<T[P]>;
|
||||||
} &
|
} &
|
||||||
T;
|
T;
|
||||||
|
|
||||||
|
type Writable<T> = {
|
||||||
|
-readonly [K in keyof T]: T[K];
|
||||||
|
};
|
||||||
|
|
12
x-pack/legacy/plugins/canvas/types/webpack.d.ts
vendored
12
x-pack/legacy/plugins/canvas/types/webpack.d.ts
vendored
|
@ -1,12 +0,0 @@
|
||||||
/*
|
|
||||||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
||||||
* or more contributor license agreements. Licensed under the Elastic License;
|
|
||||||
* you may not use this file except in compliance with the Elastic License.
|
|
||||||
*/
|
|
||||||
|
|
||||||
declare module '*.png';
|
|
||||||
|
|
||||||
declare module '*.svg' {
|
|
||||||
const content: string;
|
|
||||||
export = content;
|
|
||||||
}
|
|
|
@ -0,0 +1,13 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!-- Generator: Adobe Illustrator 23.0.4, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||||
|
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
||||||
|
viewBox="0 0 120.6 175" style="enable-background:new 0 0 120.6 175;" xml:space="preserve">
|
||||||
|
<style type="text/css">
|
||||||
|
.st0{fill:#06AC38;}
|
||||||
|
</style>
|
||||||
|
<g>
|
||||||
|
<rect y="128.4" class="st0" width="25.7" height="46.6"/>
|
||||||
|
<path class="st0" d="M96.5,8.6C82.8,1.2,73.2,0,50.7,0H0v106.1h25.7H29h21.5c20,0,35-1.2,48.2-10c14.4-9.5,21.9-25.4,21.9-43.8
|
||||||
|
C120.6,32.5,111.4,16.6,96.5,8.6z M56.4,83.9H25.7V22.7l29-0.2c26.4-0.2,39.6,9,39.6,30.1C94.3,75.3,77.9,83.9,56.4,83.9z"/>
|
||||||
|
</g>
|
||||||
|
</svg>
|
After Width: | Height: | Size: 729 B |
|
@ -30,7 +30,7 @@ beforeAll(() => {
|
||||||
describe('actionTypeRegistry.get() works', () => {
|
describe('actionTypeRegistry.get() works', () => {
|
||||||
test('action type static data is as expected', () => {
|
test('action type static data is as expected', () => {
|
||||||
expect(actionTypeModel.id).toEqual(ACTION_TYPE_ID);
|
expect(actionTypeModel.id).toEqual(ACTION_TYPE_ID);
|
||||||
expect(actionTypeModel.iconClass).toEqual('apps');
|
expect(actionTypeModel.iconClass).toEqual('test-file-stub');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -25,11 +25,12 @@ import {
|
||||||
ActionParamsProps,
|
ActionParamsProps,
|
||||||
} from '../../../types';
|
} from '../../../types';
|
||||||
import { PagerDutyActionParams, PagerDutyActionConnector } from './types';
|
import { PagerDutyActionParams, PagerDutyActionConnector } from './types';
|
||||||
|
import pagerDutySvg from './pagerduty.svg';
|
||||||
|
|
||||||
export function getActionType(): ActionTypeModel {
|
export function getActionType(): ActionTypeModel {
|
||||||
return {
|
return {
|
||||||
id: '.pagerduty',
|
id: '.pagerduty',
|
||||||
iconClass: 'apps',
|
iconClass: pagerDutySvg,
|
||||||
selectMessage: i18n.translate(
|
selectMessage: i18n.translate(
|
||||||
'xpack.triggersActionsUI.components.builtinActionTypes.pagerDutyAction.selectMessageText',
|
'xpack.triggersActionsUI.components.builtinActionTypes.pagerDutyAction.selectMessageText',
|
||||||
{
|
{
|
||||||
|
|
12
x-pack/typings/index.d.ts
vendored
12
x-pack/typings/index.d.ts
vendored
|
@ -10,6 +10,18 @@ declare module '*.html' {
|
||||||
export default template;
|
export default template;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
declare module '*.png' {
|
||||||
|
const content: string;
|
||||||
|
// eslint-disable-next-line import/no-default-export
|
||||||
|
export default content;
|
||||||
|
}
|
||||||
|
|
||||||
|
declare module '*.svg' {
|
||||||
|
const content: string;
|
||||||
|
// eslint-disable-next-line import/no-default-export
|
||||||
|
export default content;
|
||||||
|
}
|
||||||
|
|
||||||
declare module 'lodash/internal/toPath' {
|
declare module 'lodash/internal/toPath' {
|
||||||
function toPath(value: string | string[]): string[];
|
function toPath(value: string | string[]): string[];
|
||||||
export = toPath;
|
export = toPath;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue