Skip to content

Commit

Permalink
[Infra UI] Merge InfraOps feature branch (#24068) (#24127)
Browse files Browse the repository at this point in the history
  • Loading branch information
weltenwort authored Oct 17, 2018
1 parent 5836388 commit db8b865
Show file tree
Hide file tree
Showing 436 changed files with 27,376 additions and 59 deletions.
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,8 @@
"@kbn/pm": "link:packages/kbn-pm",
"@kbn/test-subj-selector": "link:packages/kbn-test-subj-selector",
"@kbn/ui-framework": "link:packages/kbn-ui-framework",
"@types/mustache": "^0.8.31",
"JSONStream": "1.1.1",
"abortcontroller-polyfill": "^1.1.9",
"angular": "1.6.9",
"angular-aria": "1.6.6",
Expand Down
13 changes: 8 additions & 5 deletions src/dev/ci_setup/git_setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -63,19 +63,22 @@ function checkout_sibling {

cloneAuthor="elastic"
cloneBranch="${PR_SOURCE_BRANCH:-${GIT_BRANCH#*/}}" # GIT_BRANCH starts with the repo, i.e., origin/master
cloneBranch="${cloneBranch:-master}" # fall back to CI branch if not testing a PR
if clone_target_is_valid ; then
return 0
fi

cloneBranch="$PR_TARGET_BRANCH"
cloneBranch="${PR_TARGET_BRANCH:-master}"
if clone_target_is_valid ; then
return 0
fi

# remove xpack_ prefix from target branch if all other options fail
cloneBranch="${PR_TARGET_BRANCH#xpack_}"
return 0
cloneBranch="master"
if clone_target_is_valid; then
return 0
fi

echo "failed to find a valid branch to clone"
return 1
}

function checkout_clone_target {
Expand Down
22 changes: 22 additions & 0 deletions src/type_definitions/react_virtualized.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
/*
* Licensed to Elasticsearch B.V. under one or more contributor
* license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright
* ownership. Elasticsearch B.V. licenses this file to you under
* the Apache License, Version 2.0 (the "License"); you may
* not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/

declare module 'react-virtualized' {
export type ListProps = any;
}
55 changes: 55 additions & 0 deletions src/ui/public/autocomplete_providers/index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
/*
* Licensed to Elasticsearch B.V. under one or more contributor
* license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright
* ownership. Elasticsearch B.V. licenses this file to you under
* the Apache License, Version 2.0 (the "License"); you may
* not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/

/**
* WARNING: these typings are incomplete
*/
import { StaticIndexPattern } from 'ui/index_patterns';

export type AutocompleteProvider = (
args: {
config: {
get(configKey: string): any;
};
indexPatterns: StaticIndexPattern[];
boolFilter: any;
}
) => GetSuggestions;

export type GetSuggestions = (
args: {
query: string;
selectionStart: number;
selectionEnd: number;
}
) => Promise<AutocompleteSuggestion[]>;

export type AutocompleteSuggestionType = 'field' | 'value' | 'operator' | 'conjunction';

export interface AutocompleteSuggestion {
description: string;
end: number;
start: number;
text: string;
type: AutocompleteSuggestionType;
}

export function addAutocompleteProvider(language: string, provider: AutocompleteProvider): void;

export function getAutocompleteProvider(language: string): AutocompleteProvider | undefined;
16 changes: 16 additions & 0 deletions src/ui/public/index_patterns/_index_pattern.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,20 @@
* under the License.
*/

/**
* WARNING: these types are incomplete
*/

export type IndexPattern = any;

export interface StaticIndexPatternField {
name: string;
type: string;
aggregatable: boolean;
searchable: boolean;
}

export interface StaticIndexPattern {
fields: StaticIndexPatternField[];
title: string;
}
2 changes: 1 addition & 1 deletion src/ui/public/index_patterns/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@
* under the License.
*/

export { IndexPattern } from './_index_pattern';
export { IndexPattern, StaticIndexPattern } from 'ui/index_patterns/_index_pattern';
48 changes: 48 additions & 0 deletions src/ui/public/kuery/ast/ast.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
/*
* Licensed to Elasticsearch B.V. under one or more contributor
* license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright
* ownership. Elasticsearch B.V. licenses this file to you under
* the Apache License, Version 2.0 (the "License"); you may
* not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/

/**
* WARNING: these typings are incomplete
*/

import { StaticIndexPattern } from 'ui/index_patterns';

export type KueryNode = any;

export interface KueryParseOptions {
helpers: {
[key: string]: any;
};
startRule: string;
}

type JsonValue = null | boolean | number | string | JsonObject | JsonArray;

interface JsonObject {
[key: string]: JsonValue;
}

interface JsonArray extends Array<JsonValue> {}

export function fromKueryExpression(
expression: string,
parseOptions?: KueryParseOptions
): KueryNode;

export function toElasticsearchQuery(node: KueryNode, indexPattern: StaticIndexPattern): JsonObject;
20 changes: 20 additions & 0 deletions src/ui/public/kuery/ast/index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
/*
* Licensed to Elasticsearch B.V. under one or more contributor
* license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright
* ownership. Elasticsearch B.V. licenses this file to you under
* the Apache License, Version 2.0 (the "License"); you may
* not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/

export * from 'ui/kuery/ast/ast';
20 changes: 20 additions & 0 deletions src/ui/public/kuery/index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
/*
* Licensed to Elasticsearch B.V. under one or more contributor
* license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright
* ownership. Elasticsearch B.V. licenses this file to you under
* the Apache License, Version 2.0 (the "License"); you may
* not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/

export * from 'ui/kuery/ast';
40 changes: 40 additions & 0 deletions src/ui/public/registry/feature_catalogue.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
/*
* Licensed to Elasticsearch B.V. under one or more contributor
* license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright
* ownership. Elasticsearch B.V. licenses this file to you under
* the Apache License, Version 2.0 (the "License"); you may
* not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/

export enum FeatureCatalogueCategory {
ADMIN = 'admin',
DATA = 'data',
OTHER = 'other',
}

interface FeatureCatalogueObject {
id: string;
title: string;
description: string;
icon: string;
path: string;
showOnHomePage: boolean;
category: FeatureCatalogueCategory;
}

type FeatureCatalogueRegistryFunction = () => FeatureCatalogueObject;

export const FeatureCatalogueRegistryProvider: {
register: (fn: FeatureCatalogueRegistryFunction) => void;
};
23 changes: 23 additions & 0 deletions src/ui/public/routes/index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
/*
* Licensed to Elasticsearch B.V. under one or more contributor
* license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright
* ownership. Elasticsearch B.V. licenses this file to you under
* the Apache License, Version 2.0 (the "License"); you may
* not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/

import { uiRoutes, UIRoutes } from 'ui/routes/routes';

export default uiRoutes;
export { UIRoutes };
38 changes: 38 additions & 0 deletions src/ui/public/routes/route_manager.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
/*
* Licensed to Elasticsearch B.V. under one or more contributor
* license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright
* ownership. Elasticsearch B.V. licenses this file to you under
* the Apache License, Version 2.0 (the "License"); you may
* not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/

/**
* WARNING: these types are incomplete
*/

interface RouteConfiguration {
controller?: string | ((...args: any[]) => void);
redirectTo?: string;
reloadOnSearch?: boolean;
resolve?: object;
template?: string;
}

interface RouteManager {
when(path: string, routeConfiguration: RouteConfiguration): RouteManager;
otherwise(routeConfiguration: RouteConfiguration): RouteManager;
defaults(path: string | RegExp, defaults: RouteConfiguration): RouteManager;
}

export default RouteManager;
27 changes: 27 additions & 0 deletions src/ui/public/routes/routes.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
/*
* Licensed to Elasticsearch B.V. under one or more contributor
* license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright
* ownership. Elasticsearch B.V. licenses this file to you under
* the Apache License, Version 2.0 (the "License"); you may
* not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/

import RouteManager from 'ui/routes/route_manager';

interface DefaultRouteManager extends RouteManager {
enable(): void;
}

export const uiRoutes: DefaultRouteManager;
export type UIRoutes = DefaultRouteManager;
1 change: 1 addition & 0 deletions x-pack/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@
/.aws-config.json
/.env
/.kibana-plugin-helpers.dev.*
!/plugins/infra/**/target
4 changes: 3 additions & 1 deletion x-pack/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import { spaces } from './plugins/spaces';
import { notifications } from './plugins/notifications';
import { kueryAutocomplete } from './plugins/kuery_autocomplete';
import { canvas } from './plugins/canvas';
import { infra } from './plugins/infra';

module.exports = function (kibana) {
return [
Expand All @@ -48,6 +49,7 @@ module.exports = function (kibana) {
indexManagement(kibana),
consoleExtensions(kibana),
notifications(kibana),
kueryAutocomplete(kibana)
kueryAutocomplete(kibana),
infra(kibana),
];
};
Loading

0 comments on commit db8b865

Please sign in to comment.