Skip to content

Commit

Permalink
Merge branch 'master' into alerting/params-as-flattened
Browse files Browse the repository at this point in the history
  • Loading branch information
kibanamachine authored Feb 22, 2021
2 parents 9c1b890 + bdfa969 commit 6a47f1c
Show file tree
Hide file tree
Showing 148 changed files with 2,732 additions and 2,146 deletions.
4 changes: 2 additions & 2 deletions docs/apm/service-overview.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@ each dependency. By default, dependencies are sorted by _Impact_ to show the mos
If there is a particular dependency you are interested in, click *View service map* to view the related
<<service-maps, service map>>.

IMPORTANT: A known issue prevents Real User Monitoring (RUM) dependencies from being shown in the
*Dependencies* table. We are working on a fix for this issue.
NOTE: Displaying dependencies for services instrumented with the Real User Monitoring (RUM) agent
requires an agent version ≥ v5.6.3.

[role="screenshot"]
image::apm/images/spans-dependencies.png[Span type duration and dependencies]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ readonly links: {
};
readonly date: {
readonly dateMath: string;
readonly dateMathIndexNames: string;
};
readonly management: Record<string, string>;
readonly ml: Record<string, string>;
Expand All @@ -130,13 +131,15 @@ readonly links: {
createApiKey: string;
createPipeline: string;
createTransformRequest: string;
cronExpressions: string;
executeWatchActionModes: string;
indexExists: string;
openIndex: string;
putComponentTemplate: string;
painlessExecute: string;
painlessExecuteAPIContexts: string;
putComponentTemplateMetadata: string;
putSnapshotLifecyclePolicy: string;
putWatch: string;
updateTransform: string;
}>;
Expand All @@ -158,5 +161,7 @@ readonly links: {
}>;
readonly watcher: Record<string, string>;
readonly ccs: Record<string, string>;
readonly plugins: Record<string, string>;
readonly snapshotRestore: Record<string, string>;
};
```

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion docs/setup/docker.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,6 @@ The following settings have different default values when using the Docker
images:

[horizontal]
`server.name`:: `kibana`
`server.host`:: `"0.0.0.0"`
`elasticsearch.hosts`:: `http://elasticsearch:9200`
`monitoring.ui.container.elasticsearch.enabled`:: `true`
Expand Down
7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,6 @@
"content-disposition": "0.5.3",
"core-js": "^3.6.5",
"custom-event-polyfill": "^0.3.0",
"cypress-promise": "^1.1.0",
"cytoscape": "^3.10.0",
"cytoscape-dagre": "^2.2.2",
"d3-array": "1.2.4",
Expand Down Expand Up @@ -613,6 +612,8 @@
"cypress": "^6.2.1",
"cypress-cucumber-preprocessor": "^2.5.2",
"cypress-multi-reporters": "^1.4.0",
"cypress-pipe": "^2.0.0",
"cypress-promise": "^1.1.0",
"d3": "3.5.17",
"d3-cloud": "1.2.5",
"d3-scale": "1.0.7",
Expand Down Expand Up @@ -724,7 +725,7 @@
"loader-utils": "^1.2.3",
"log-symbols": "^2.2.0",
"lz-string": "^1.4.4",
"mapbox-gl": "^1.12.0",
"mapbox-gl": "1.13.1",
"mapbox-gl-draw-rectangle-mode": "^1.0.4",
"marge": "^1.0.1",
"memoize-one": "^5.0.0",
Expand Down Expand Up @@ -833,8 +834,8 @@
"val-loader": "^1.1.1",
"vega": "^5.19.1",
"vega-lite": "^4.17.0",
"vega-spec-injector": "^0.0.2",
"vega-schema-url-parser": "^2.1.0",
"vega-spec-injector": "^0.0.2",
"vega-tooltip": "^0.25.0",
"venn.js": "0.2.20",
"vinyl-fs": "^3.0.3",
Expand Down
13 changes: 9 additions & 4 deletions packages/kbn-analytics/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,13 @@
* Side Public License, v 1.
*/

export { ReportHTTP, Reporter, ReporterConfig } from './reporter';
export { UiCounterMetricType, METRIC_TYPE } from './metrics';
export { Report, ReportManager } from './report';
// Export types separately to the actual run-time objects
export type { ReportHTTP, ReporterConfig } from './reporter';
export type { UiCounterMetricType } from './metrics';
export type { Report } from './report';
export type { Storage } from './storage';

export { Reporter } from './reporter';
export { METRIC_TYPE } from './metrics';
export { ReportManager } from './report';
export { ApplicationUsageTracker } from './application_usage_tracker';
export { Storage } from './storage';
14 changes: 9 additions & 5 deletions packages/kbn-analytics/src/metrics/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,17 @@
* Side Public License, v 1.
*/

import { UiCounterMetric } from './ui_counter';
import { UserAgentMetric } from './user_agent';
import { ApplicationUsageMetric } from './application_usage';
import type { UiCounterMetric } from './ui_counter';
import type { UserAgentMetric } from './user_agent';
import type { ApplicationUsageMetric } from './application_usage';

export { UiCounterMetric, createUiCounterMetric, UiCounterMetricType } from './ui_counter';
// Export types separately to the actual run-time objects
export type { ApplicationUsageMetric } from './application_usage';
export type { UiCounterMetric, UiCounterMetricType } from './ui_counter';

export { createUiCounterMetric } from './ui_counter';
export { trackUsageAgent } from './user_agent';
export { createApplicationUsageMetric, ApplicationUsageMetric } from './application_usage';
export { createApplicationUsageMetric } from './application_usage';

export type Metric = UiCounterMetric | UserAgentMetric | ApplicationUsageMetric;
export enum METRIC_TYPE {
Expand Down
1 change: 1 addition & 0 deletions packages/kbn-ui-shared-deps/entry.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,3 +46,4 @@ export const LodashFp = require('lodash/fp');

// runtime deps which don't need to be copied across all bundles
export const TsLib = require('tslib');
export const KbnAnalytics = require('@kbn/analytics');
1 change: 1 addition & 0 deletions packages/kbn-ui-shared-deps/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,5 +57,6 @@ exports.externals = {
* runtime deps which don't need to be copied across all bundles
*/
tslib: '__kbnSharedDeps__.TsLib',
'@kbn/analytics': '__kbnSharedDeps__.KbnAnalytics',
};
exports.publicPathLoader = require.resolve('./public_path_loader');
26 changes: 26 additions & 0 deletions src/core/public/doc_links/doc_links_service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ export class DocLinksService {
const DOC_LINK_VERSION = injectedMetadata.getKibanaBranch();
const ELASTIC_WEBSITE_URL = 'https://www.elastic.co/';
const ELASTICSEARCH_DOCS = `${ELASTIC_WEBSITE_URL}guide/en/elasticsearch/reference/${DOC_LINK_VERSION}/`;
const PLUGIN_DOCS = `${ELASTIC_WEBSITE_URL}guide/en/elasticsearch/plugins/${DOC_LINK_VERSION}/`;

return deepFreeze({
DOC_LINK_VERSION,
Expand Down Expand Up @@ -126,6 +127,7 @@ export class DocLinksService {
addData: `${ELASTIC_WEBSITE_URL}guide/en/kibana/${DOC_LINK_VERSION}/connect-to-elasticsearch.html`,
kibana: `${ELASTIC_WEBSITE_URL}guide/en/kibana/${DOC_LINK_VERSION}/index.html`,
elasticsearch: {
indexModules: `${ELASTICSEARCH_DOCS}index-modules.html`,
mapping: `${ELASTICSEARCH_DOCS}mapping.html`,
remoteClusters: `${ELASTICSEARCH_DOCS}modules-remote-clusters.html`,
remoteClustersProxy: `${ELASTICSEARCH_DOCS}modules-remote-clusters.html#proxy-mode`,
Expand All @@ -145,6 +147,7 @@ export class DocLinksService {
},
date: {
dateMath: `${ELASTICSEARCH_DOCS}common-options.html#date-math`,
dateMathIndexNames: `${ELASTICSEARCH_DOCS}date-math-index-names.html`,
},
management: {
kibanaSearchSettings: `${ELASTIC_WEBSITE_URL}guide/en/kibana/${DOC_LINK_VERSION}/advanced-options.html#kibana-search-settings`,
Expand Down Expand Up @@ -239,16 +242,34 @@ export class DocLinksService {
createApiKey: `${ELASTICSEARCH_DOCS}security-api-create-api-key.html`,
createPipeline: `${ELASTICSEARCH_DOCS}put-pipeline-api.html`,
createTransformRequest: `${ELASTICSEARCH_DOCS}put-transform.html#put-transform-request-body`,
cronExpressions: `${ELASTICSEARCH_DOCS}cron-expressions.html`,
executeWatchActionModes: `${ELASTICSEARCH_DOCS}watcher-api-execute-watch.html#watcher-api-execute-watch-action-mode`,
indexExists: `${ELASTICSEARCH_DOCS}indices-exists.html`,
openIndex: `${ELASTICSEARCH_DOCS}indices-open-close.html`,
putComponentTemplate: `${ELASTICSEARCH_DOCS}indices-component-template.html`,
painlessExecute: `${ELASTIC_WEBSITE_URL}guide/en/elasticsearch/painless/${DOC_LINK_VERSION}/painless-execute-api.html`,
painlessExecuteAPIContexts: `${ELASTIC_WEBSITE_URL}guide/en/elasticsearch/painless/${DOC_LINK_VERSION}/painless-execute-api.html#_contexts`,
putComponentTemplateMetadata: `${ELASTICSEARCH_DOCS}indices-component-template.html#component-templates-metadata`,
putSnapshotLifecyclePolicy: `${ELASTICSEARCH_DOCS}slm-api-put-policy.html`,
putWatch: `${ELASTICSEARCH_DOCS}/watcher-api-put-watch.html`,
updateTransform: `${ELASTICSEARCH_DOCS}update-transform.html`,
},
plugins: {
azureRepo: `${PLUGIN_DOCS}repository-azure.html`,
gcsRepo: `${PLUGIN_DOCS}repository-gcs.html`,
hdfsRepo: `${PLUGIN_DOCS}repository-hdfs.html`,
s3Repo: `${PLUGIN_DOCS}repository-s3.html`,
snapshotRestoreRepos: `${PLUGIN_DOCS}repository.html`,
},
snapshotRestore: {
guide: `${ELASTICSEARCH_DOCS}snapshot-restore.html`,
changeIndexSettings: `${ELASTICSEARCH_DOCS}snapshots-restore-snapshot.html#change-index-settings-during-restore`,
createSnapshot: `${ELASTICSEARCH_DOCS}snapshots-take-snapshot.html`,
registerSharedFileSystem: `${ELASTICSEARCH_DOCS}snapshots-register-repository.html#snapshots-filesystem-repository`,
registerSourceOnly: `${ELASTICSEARCH_DOCS}snapshots-register-repository.html#snapshots-source-only-repository`,
registerUrl: `${ELASTICSEARCH_DOCS}snapshots-register-repository.html#snapshots-read-only-repository`,
restoreSnapshot: `${ELASTICSEARCH_DOCS}snapshots-restore-snapshot.html`,
},
},
});
}
Expand Down Expand Up @@ -368,6 +389,7 @@ export interface DocLinksStart {
};
readonly date: {
readonly dateMath: string;
readonly dateMathIndexNames: string;
};
readonly management: Record<string, string>;
readonly ml: Record<string, string>;
Expand All @@ -381,13 +403,15 @@ export interface DocLinksStart {
createApiKey: string;
createPipeline: string;
createTransformRequest: string;
cronExpressions: string;
executeWatchActionModes: string;
indexExists: string;
openIndex: string;
putComponentTemplate: string;
painlessExecute: string;
painlessExecuteAPIContexts: string;
putComponentTemplateMetadata: string;
putSnapshotLifecyclePolicy: string;
putWatch: string;
updateTransform: string;
}>;
Expand All @@ -409,5 +433,7 @@ export interface DocLinksStart {
}>;
readonly watcher: Record<string, string>;
readonly ccs: Record<string, string>;
readonly plugins: Record<string, string>;
readonly snapshotRestore: Record<string, string>;
};
}
5 changes: 5 additions & 0 deletions src/core/public/public.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -587,6 +587,7 @@ export interface DocLinksStart {
};
readonly date: {
readonly dateMath: string;
readonly dateMathIndexNames: string;
};
readonly management: Record<string, string>;
readonly ml: Record<string, string>;
Expand All @@ -600,13 +601,15 @@ export interface DocLinksStart {
createApiKey: string;
createPipeline: string;
createTransformRequest: string;
cronExpressions: string;
executeWatchActionModes: string;
indexExists: string;
openIndex: string;
putComponentTemplate: string;
painlessExecute: string;
painlessExecuteAPIContexts: string;
putComponentTemplateMetadata: string;
putSnapshotLifecyclePolicy: string;
putWatch: string;
updateTransform: string;
}>;
Expand All @@ -628,6 +631,8 @@ export interface DocLinksStart {
}>;
readonly watcher: Record<string, string>;
readonly ccs: Record<string, string>;
readonly plugins: Record<string, string>;
readonly snapshotRestore: Record<string, string>;
};
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ function generator({ imageFlavor }: TemplateContext) {
#
# Default Kibana configuration for docker target
server.name: kibana
server.host: "0.0.0.0"
elasticsearch.hosts: [ "http://elasticsearch:9200" ]
${!imageFlavor ? 'monitoring.ui.container.elasticsearch.enabled: true' : ''}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,10 @@ for x in functional jest; do
# Need to override COVERAGE_INGESTION_KIBANA_ROOT since json file has original intake worker path
export COVERAGE_INGESTION_KIBANA_ROOT=/dev/shm/workspace/kibana
fi

node scripts/ingest_coverage.js --verbose --path ${COVERAGE_SUMMARY_FILE} --vcsInfoPath ./VCS_INFO.txt --teamAssignmentsPath $TEAM_ASSIGN_PATH
# running in background to speed up ingestion
node scripts/ingest_coverage.js --verbose --path ${COVERAGE_SUMMARY_FILE} --vcsInfoPath ./VCS_INFO.txt --teamAssignmentsPath $TEAM_ASSIGN_PATH &
done
wait

echo "### Ingesting Code Coverage - Complete"
echo ""
1 change: 1 addition & 0 deletions src/plugins/dashboard/public/application/dashboard_app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -294,6 +294,7 @@ export function DashboardApp({
}}
viewMode={viewMode}
lastDashboardId={savedDashboardId}
clearUnsavedChanges={() => setUnsavedChanges(false)}
timefilter={data.query.timefilter.timefilter}
onQuerySubmit={(_payload, isUpdate) => {
if (isUpdate === false) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,7 @@ export class DashboardStateManager {
/**
* Resets the state back to the last saved version of the dashboard.
*/
public resetState() {
public resetState(resetViewMode: boolean) {
// In order to show the correct warning, we have to store the unsaved
// title on the dashboard object. We should fix this at some point, but this is how all the other object
// save panels work at the moment.
Expand All @@ -366,9 +366,14 @@ export class DashboardStateManager {
this.stateDefaults.query = this.lastSavedDashboardFilters.query;
// Need to make a copy to ensure they are not overwritten.
this.stateDefaults.filters = [...this.getLastSavedFilterBars()];

this.isDirty = false;
this.stateContainer.set(this.stateDefaults);

if (resetViewMode) {
this.stateContainer.set(this.stateDefaults);
} else {
const currentViewMode = this.stateContainer.get().viewMode;
this.stateContainer.set({ ...this.stateDefaults, viewMode: currentViewMode });
}
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ import { SavedObjectSaveOpts } from '../../services/saved_objects';
import { updateSavedDashboard } from './update_saved_dashboard';
import { DashboardStateManager } from '../dashboard_state_manager';

export type SavedDashboardSaveOpts = SavedObjectSaveOpts & { stayInEditMode?: boolean };

/**
* Saves the dashboard.
* @param toJson A custom toJson function. Used because the previous code used
Expand All @@ -23,7 +25,7 @@ export function saveDashboard(
toJson: (obj: any) => string,
timeFilter: TimefilterContract,
dashboardStateManager: DashboardStateManager,
saveOptions: SavedObjectSaveOpts
saveOptions: SavedDashboardSaveOpts
): Promise<string> {
const savedDashboard = dashboardStateManager.savedDashboard;
const appState = dashboardStateManager.appState;
Expand All @@ -36,7 +38,7 @@ export function saveDashboard(
// reset state only when save() was successful
// e.g. save() could be interrupted if title is duplicated and not confirmed
dashboardStateManager.lastSavedDashboardFilters = dashboardStateManager.getFilterState();
dashboardStateManager.resetState();
dashboardStateManager.resetState(!saveOptions.stayInEditMode);
}

return id;
Expand Down
Loading

0 comments on commit 6a47f1c

Please sign in to comment.