Skip to content
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

Adding PagerDuty icon to connectors cards #60805

Merged
merged 6 commits into from
Mar 31, 2020
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
4 changes: 1 addition & 3 deletions examples/alerting_example/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
{
"extends": "../../tsconfig.json",
"compilerOptions": {
"outDir": "./target",
"skipLibCheck": true,
"resolveJsonModule": true
"outDir": "./target"
},
"include": [
"index.ts",
Expand Down
25 changes: 25 additions & 0 deletions typings/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,27 @@ declare module '*.html' {
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> = {
[K in keyof T]: T[K] extends (...args: any[]) => any ? K : never;
}[keyof T];
Expand All @@ -37,3 +58,7 @@ type DeeplyMockedKeys<T> = {
: DeeplyMockedKeys<T[P]>;
} &
T;

type Writable<T> = {
-readonly [K in keyof T]: T[K];
};
12 changes: 0 additions & 12 deletions x-pack/legacy/plugins/canvas/types/webpack.d.ts

This file was deleted.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ beforeAll(() => {
describe('actionTypeRegistry.get() works', () => {
test('action type static data is as expected', () => {
expect(actionTypeModel.id).toEqual(ACTION_TYPE_ID);
expect(actionTypeModel.iconClass).toEqual('apps');
expect(actionTypeModel.iconClass).toEqual('test-file-stub');
});
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,12 @@ import {
ActionParamsProps,
} from '../../../types';
import { PagerDutyActionParams, PagerDutyActionConnector } from './types';
import pagerDutySvg from './pagerduty.svg';

export function getActionType(): ActionTypeModel {
return {
id: '.pagerduty',
iconClass: 'apps',
iconClass: pagerDutySvg,
selectMessage: i18n.translate(
'xpack.triggersActionsUI.components.builtinActionTypes.pagerDutyAction.selectMessageText',
{
Expand Down
12 changes: 12 additions & 0 deletions x-pack/typings/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,18 @@ declare module '*.html' {
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' {
function toPath(value: string | string[]): string[];
export = toPath;
Expand Down