Skip to content

Commit

Permalink
Merge branch 'main' of github.com:elastic/kibana into visualize-respe…
Browse files Browse the repository at this point in the history
…ct-managed-content
  • Loading branch information
drewdaemon committed Jan 30, 2024
2 parents 2862791 + 1aea4ba commit 9734ab8
Show file tree
Hide file tree
Showing 129 changed files with 557 additions and 10,575 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,14 @@

set -euo pipefail

# TODO: Safe to remove this after 2024-03-01 (https://github.com/elastic/kibana/issues/175904)
gsutil -m cp -r gs://elastic-bekitzur-kibana-coverage-live/previous_pointer/previous.txt . || echo "### Previous Pointer NOT FOUND?"

# TODO: Activate after the above is removed
#gsutil -m cp -r gs://elastic-kibana-coverage-live/previous_pointer/previous.txt . || echo "### Previous Pointer NOT FOUND?"

if [ -e ./previous.txt ]; then
mv previous.txt downloaded_previous.txt
echo "### downloaded_previous.txt"
cat downloaded_previous.txt
fi
fi
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,7 @@ collectPrevious() {
}
collectPrevious

gsutil cp previous.txt gs://elastic-bekitzur-kibana-coverage-live/previous_pointer/
# TODO: Safe to remove this after 2024-03-01 (https://github.com/elastic/kibana/issues/175904)
gsutil cp previous.txt gs://elastic-bekitzur-kibana-coverage-live/previous_pointer/

gsutil cp previous.txt gs://elastic-kibana-coverage-live/previous_pointer/
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,24 @@ set -euo pipefail

xs=("$@")

uploadPrefix="gs://elastic-bekitzur-kibana-coverage-live/"
# TODO: Safe to remove this after 2024-03-01 (https://github.com/elastic/kibana/issues/175904) - also clean up usages
uploadPrefix_old="gs://elastic-bekitzur-kibana-coverage-live/"
uploadPrefixWithTimeStamp_old="${uploadPrefix}${TIME_STAMP}/"

uploadPrefix="gs://elastic-kibana-coverage-live/"
uploadPrefixWithTimeStamp="${uploadPrefix}${TIME_STAMP}/"

uploadBase() {
for x in 'src/dev/code_coverage/www/index.html' 'src/dev/code_coverage/www/404.html'; do
gsutil -m -q cp -r -a public-read -z js,css,html "${x}" "${uploadPrefix}"
gsutil -m -q cp -r -a public-read -z js,css,html "${x}" "${uploadPrefix_old}"
done
}

uploadRest() {
for x in "${xs[@]}"; do
gsutil -m -q cp -r -a public-read -z js,css,html "target/kibana-coverage/${x}-combined" "${uploadPrefixWithTimeStamp}"
gsutil -m -q cp -r -a public-read -z js,css,html "target/kibana-coverage/${x}-combined" "${uploadPrefixWithTimeStamp_old}"
done
}

Expand Down
8 changes: 4 additions & 4 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -462,7 +462,7 @@ x-pack/plugins/index_lifecycle_management @elastic/platform-deployment-managemen
x-pack/plugins/index_management @elastic/platform-deployment-management
test/plugin_functional/plugins/index_patterns @elastic/kibana-data-discovery
x-pack/packages/kbn-infra-forge @elastic/obs-ux-management-team
x-pack/plugins/infra @elastic/infra-monitoring-ui @elastic/obs-ux-logs-team @elastic/obs-ux-infra_services-team
x-pack/plugins/infra @elastic/obs-ux-logs-team @elastic/obs-ux-infra_services-team
x-pack/plugins/ingest_pipelines @elastic/platform-deployment-management
src/plugins/input_control_vis @elastic/kibana-presentation
src/plugins/inspector @elastic/kibana-presentation
Expand Down Expand Up @@ -1041,9 +1041,9 @@ packages/kbn-monaco/src/esql @elastic/kibana-visualizations
/x-pack/plugins/infra/public/common @elastic/obs-ux-infra_services-team
/x-pack/plugins/infra/public/observability_logs @elastic/obs-ux-logs-team
/x-pack/plugins/infra/public/services @elastic/obs-ux-infra_services-team
/x-pack/test/functional/apps/infra @elastic/infra-monitoring-ui @elastic/obs-ux-infra_services-team
/x-pack/test/functional/apps/infra/logs @elastic/infra-monitoring-ui @elastic/obs-ux-logs-team
/x-pack/test/api_integration/apis/infra @elastic/infra-monitoring-ui @elastic/obs-ux-infra_services-team
/x-pack/test/functional/apps/infra @elastic/obs-ux-infra_services-team
/x-pack/test/functional/apps/infra/logs @elastic/obs-ux-logs-team
/x-pack/test/api_integration/apis/infra @elastic/obs-ux-infra_services-team

# Observability UX management team
x-pack/packages/observability/alert_details @elastic/obs-ux-management-team
Expand Down
2 changes: 1 addition & 1 deletion .github/stale.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ daysUntilStale: 180
daysUntilClose: false

# Only issues or pull requests with all of these labels are check if stale. Defaults to `[]` (disabled)
onlyLabels: ['Team:apm', 'Team:Infra Monitoring UI']
onlyLabels: ['Team:obs-ux-infra_services']

# Issues or Pull Requests with these labels will never be considered stale. Set to `[]` to disable
exemptLabels: ['technical debt', 'prevent stale']
Expand Down
2 changes: 1 addition & 1 deletion api_docs/infra.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import infraObj from './infra.devdocs.json';

This plugin visualizes data from Filebeat and Metricbeat, and integrates with other Observability solutions

Contact [@elastic/infra-monitoring-ui](https://github.com/orgs/elastic/teams/infra-monitoring-ui) for questions regarding this plugin.
Contact [@elastic/obs-ux-infra_services-team](https://github.com/orgs/elastic/teams/obs-ux-infra_services-team) for questions regarding this plugin.

**Code health stats**

Expand Down
2 changes: 1 addition & 1 deletion api_docs/plugin_directory.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana']
| <DocLink id="kibImageEmbeddablePluginApi" text="imageEmbeddable"/> | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | Image embeddable | 3 | 0 | 3 | 1 |
| <DocLink id="kibIndexLifecycleManagementPluginApi" text="indexLifecycleManagement"/> | [@elastic/platform-deployment-management](https://github.com/orgs/elastic/teams/platform-deployment-management) | - | 4 | 0 | 4 | 0 |
| <DocLink id="kibIndexManagementPluginApi" text="indexManagement"/> | [@elastic/platform-deployment-management](https://github.com/orgs/elastic/teams/platform-deployment-management) | - | 215 | 0 | 210 | 4 |
| <DocLink id="kibInfraPluginApi" text="infra"/> | [@elastic/infra-monitoring-ui](https://github.com/orgs/elastic/teams/infra-monitoring-ui) | This plugin visualizes data from Filebeat and Metricbeat, and integrates with other Observability solutions | 32 | 0 | 29 | 8 |
| <DocLink id="kibInfraPluginApi" text="infra"/> | [@elastic/obs-ux-infra_services-team](https://github.com/orgs/elastic/teams/obs-ux-infra_services-team) | This plugin visualizes data from Filebeat and Metricbeat, and integrates with other Observability solutions | 32 | 0 | 29 | 8 |
| <DocLink id="kibIngestPipelinesPluginApi" text="ingestPipelines"/> | [@elastic/platform-deployment-management](https://github.com/orgs/elastic/teams/platform-deployment-management) | - | 4 | 0 | 4 | 0 |
| inputControlVis | [@elastic/kibana-presentation](https://github.com/orgs/elastic/teams/kibana-presentation) | Adds Input Control visualization to Kibana | 0 | 0 | 0 | 0 |
| <DocLink id="kibInspectorPluginApi" text="inspector"/> | [@elastic/kibana-presentation](https://github.com/orgs/elastic/teams/kibana-presentation) | - | 127 | 2 | 100 | 4 |
Expand Down
3 changes: 0 additions & 3 deletions config/serverless.es.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,3 @@ xpack.ml.ad.enabled: false
xpack.ml.dfa.enabled: false
xpack.ml.nlp.enabled: true
xpack.ml.compatibleModuleType: 'search'

# Enable the embedded dev console for index management pages
xpack.index_management.enableEmbeddedConsole: true
3 changes: 3 additions & 0 deletions config/serverless.oblt.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,3 +84,6 @@ xpack.ml.ad.enabled: true
xpack.ml.dfa.enabled: false
xpack.ml.nlp.enabled: false
xpack.ml.compatibleModuleType: 'observability'

# Disable the embedded Dev Console
console.ui.embeddedEnabled: false
3 changes: 3 additions & 0 deletions config/serverless.security.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,3 +66,6 @@ xpack.ml.ad.enabled: true
xpack.ml.dfa.enabled: true
xpack.ml.nlp.enabled: false
xpack.ml.compatibleModuleType: 'security'

# Disable the embedded Dev Console
console.ui.embeddedEnabled: false
2 changes: 1 addition & 1 deletion config/serverless.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ guided_onboarding.enabled: false
# Other disabled plugins
xpack.canvas.enabled: false
data.search.sessions.enabled: false
advanced_settings.enabled: false
advanced_settings.globalSettingsEnabled: false

# Disable the browser-side functionality that depends on SecurityCheckupGetStateRoutes
xpack.security.showInsecureClusterWarning: false
Expand Down
2 changes: 1 addition & 1 deletion docs/developer/plugin-list.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ NOTE:
|{kib-repo}blob/{branch}/src/plugins/advanced_settings/README.md[advancedSettings]
|This plugin contains the advanced settings management section
|This plugin registers the management settings application
allowing users to configure their advanced settings, also known
as uiSettings within the code.
Expand Down
22 changes: 14 additions & 8 deletions docs/maps/connect-to-ems.asciidoc
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
[[maps-connect-to-ems]]
== Connect to Elastic Maps Service

:ems: Elastic Maps Service
:ems-docker-repo: docker.elastic.co/elastic-maps-service/elastic-maps-server-ubi8
:ems-docker-image: {ems-docker-repo}:{version}
:ems-headers-url: https://deployment-host

https://www.elastic.co/elastic-maps-service[Elastic Maps Service (EMS)] is a service that hosts
[[maps-connect-to-ems]]
== Connect to {ems}

https://www.elastic.co/elastic-maps-service[{ems} (EMS)] is a service that hosts
tile layers and vector shapes of administrative boundaries.
If you are using Kibana's out-of-the-box settings, Maps is already configured to use EMS.

If you are on a restricted or fully air-gapped environment, you may need to configure your firewall to enable access to EMS resources. Find below details on the domains and HTTP headers used by {ems}. Alternatively, {ems} can be <<disable-ems, disabled>> or <<elastic-maps-server, installed locally>>.

[float]
=== Domains

Expand Down Expand Up @@ -57,7 +60,8 @@ include::headers/file-data.asciidoc[]


[float]
=== Disable Elastic Maps Service
[id=disable-ems]
=== Disable {ems}

You might experience EMS connection issues if your Kibana server or browser are on a private network or
behind a firewall. If this happens, you can disable the EMS connection to avoid unnecessary EMS requests.
Expand All @@ -69,11 +73,13 @@ To disable EMS, change your <<settings, kibana.yml>> file.

[float]
[id=elastic-maps-server]
=== Host Elastic Maps Service locally
=== Host {ems} locally

NOTE: Find more details about installing Elastic components in an air-gapped environment in the {stack-ref}/air-gapped-install.html[Elastic Stack documentation].

If you cannot connect to Elastic Maps Service from the {kib} server or browser clients, and your cluster has the appropriate license level, you can opt to host the service on your own infrastructure.
If you cannot connect to {ems} from the {kib} server or browser clients, and your cluster has the appropriate license level, you can opt to host the service on your own infrastructure.

{hosted-ems} is a self-managed version of Elastic Maps Service offered as a Docker image that provides both the EMS basemaps and EMS boundaries. The image is bundled with basemaps up to zoom level 8. After connecting it to your {es} cluster for license validation, you have the option to download and configure a more detailed basemaps database.
{hosted-ems} is a self-managed version of {ems} offered as a Docker image that provides both the EMS basemaps and EMS boundaries. The image is bundled with basemaps up to zoom level 8. After connecting it to your {es} cluster for license validation, you have the option to download and configure a more detailed basemaps database.

You can use +docker pull+ to download the {hosted-ems} image from the Elastic Docker registry.

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -1041,7 +1041,7 @@
"pretty-ms": "6.0.0",
"prop-types": "^15.8.1",
"proxy-from-env": "1.0.0",
"puppeteer": "21.5.2",
"puppeteer": "21.9.0",
"query-string": "^6.13.2",
"rbush": "^3.0.1",
"re-resizable": "^6.9.9",
Expand Down
1 change: 0 additions & 1 deletion packages/kbn-generate-csv/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,3 @@

export { CsvGenerator } from './src/generate_csv';
export { CsvESQLGenerator, type JobParamsCsvESQL } from './src/generate_csv_esql';
export type { CsvPagingStrategy } from './types';
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import {
getSettingsMock,
} from '@kbn/management-settings-utilities/mocks/settings.mock';
import { UiSettingsScope } from '@kbn/core-ui-settings-common';
import { getSettingsCapabilitiesMock } from '@kbn/management-settings-utilities/mocks/capabilities.mock';
import { SettingsApplication as Component } from '../application';
import { SettingsApplicationProvider } from '../services';

Expand Down Expand Up @@ -43,6 +44,11 @@ const getSettingsApplicationStory = ({ hasGlobalSettings }: StoryProps) => (
getAllowlistedSettings={(scope: UiSettingsScope) =>
scope === 'namespace' ? getSettingsMock() : hasGlobalSettings ? getGlobalSettingsMock() : {}
}
getSections={() => []}
// @ts-ignore
getToastsService={() => null}
getCapabilities={getSettingsCapabilitiesMock}
setBadge={() => {}}
isCustomSetting={() => false}
isOverriddenSetting={() => false}
saveChanges={action('saveChanges')}
Expand Down
57 changes: 45 additions & 12 deletions packages/kbn-management/settings/application/application.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import { SettingsTabs } from '@kbn/management-settings-types/tab';
import { EmptyState } from './empty_state';
import { i18nTexts } from './i18n_texts';
import { Tab } from './tab';
import { readOnlyBadge } from './read_only_badge';
import { useScopeFields } from './hooks/use_scope_fields';
import { QueryInput, QueryInputProps } from './query_input';
import { useServices } from './services';
Expand Down Expand Up @@ -53,7 +54,8 @@ function getQueryParam(url: string) {
* Component for displaying the {@link SettingsApplication} component.
*/
export const SettingsApplication = () => {
const { addUrlToHistory } = useServices();
const { addUrlToHistory, getSections, getToastsService, getCapabilities, setBadge } =
useServices();

const queryParam = getQueryParam(window.location.href);
const [query, setQuery] = useState<Query>(Query.parse(queryParam));
Expand All @@ -68,7 +70,17 @@ export const SettingsApplication = () => {
const [spaceAllFields, globalAllFields] = useScopeFields();
const [spaceFilteredFields, globalFilteredFields] = useScopeFields(query);

const globalSettingsEnabled = globalAllFields.length > 0;
const {
spaceSettings: { save: canSaveSpaceSettings },
globalSettings: { save: canSaveGlobalSettings, show: canShowGlobalSettings },
} = getCapabilities();
if (!canSaveSpaceSettings || (!canSaveGlobalSettings && canShowGlobalSettings)) {
setBadge(readOnlyBadge);
}

// Only enabled the Global settings tab if there are any global settings
// and if global settings can be shown
const globalTabEnabled = globalAllFields.length > 0 && canShowGlobalSettings;

const tabs: SettingsTabs = {
[SPACE_SETTINGS_TAB_ID]: {
Expand All @@ -77,16 +89,19 @@ export const SettingsApplication = () => {
categoryCounts: getCategoryCounts(spaceAllFields),
callOutTitle: i18nTexts.spaceCalloutTitle,
callOutText: i18nTexts.spaceCalloutText,
sections: getSections('namespace'),
isSavingEnabled: canSaveSpaceSettings,
},
};
// Only add a Global settings tab if there are any global settings
if (globalSettingsEnabled) {
if (globalTabEnabled) {
tabs[GLOBAL_SETTINGS_TAB_ID] = {
name: i18nTexts.globalTabTitle,
fields: globalFilteredFields,
categoryCounts: getCategoryCounts(globalAllFields),
callOutTitle: i18nTexts.globalCalloutTitle,
callOutText: i18nTexts.globalCalloutText,
sections: getSections('global'),
isSavingEnabled: canSaveGlobalSettings,
};
}

Expand All @@ -110,7 +125,7 @@ export const SettingsApplication = () => {
</EuiFlexItem>
</EuiFlexGroup>
<EuiSpacer size="m" />
{globalSettingsEnabled && (
{globalTabEnabled && (
<>
<EuiTabs>
{Object.keys(tabs).map((id) => (
Expand All @@ -130,13 +145,31 @@ export const SettingsApplication = () => {
)}
<EuiSpacer size="xl" />
{selectedTab.fields.length ? (
<Form
fields={selectedTab.fields}
categoryCounts={selectedTab.categoryCounts}
isSavingEnabled={true}
onClearQuery={() => onQueryChange()}
scope={selectedTabId === SPACE_SETTINGS_TAB_ID ? 'namespace' : 'global'}
/>
<>
<Form
fields={selectedTab.fields}
categoryCounts={selectedTab.categoryCounts}
isSavingEnabled={selectedTab.isSavingEnabled}
onClearQuery={() => onQueryChange()}
scope={selectedTabId === SPACE_SETTINGS_TAB_ID ? 'namespace' : 'global'}
/>
<EuiSpacer size="l" />
{selectedTab.sections.length > 0 &&
selectedTab.sections.map(({ Component, queryMatch }, index) => {
if (queryMatch(query.text)) {
return (
<Component
key={`component-${index}`}
toasts={getToastsService()}
enableSaving={{
global: canSaveGlobalSettings,
namespace: canSaveSpaceSettings,
}}
/>
);
}
})}
</>
) : (
<EmptyState {...{ queryText: query?.text, onClearQuery: () => onQueryChange() }} />
)}
Expand Down
15 changes: 14 additions & 1 deletion packages/kbn-management/settings/application/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,22 @@ export const KibanaSettingsApplication = ({
settings,
theme,
history,
sectionRegistry,
application,
chrome,
}: SettingsApplicationKibanaDependencies) => (
<SettingsApplicationKibanaProvider
{...{ settings, theme, i18n, notifications, docLinks, history }}
{...{
settings,
theme,
i18n,
notifications,
docLinks,
history,
sectionRegistry,
application,
chrome,
}}
>
<SettingsApplication />
</SettingsApplicationKibanaProvider>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import {
getSettingsMock,
} from '@kbn/management-settings-utilities/mocks/settings.mock';
import { UiSettingsScope } from '@kbn/core-ui-settings-common';
import { getSettingsCapabilitiesMock } from '@kbn/management-settings-utilities/mocks/capabilities.mock';
import { SettingsApplicationProvider, SettingsApplicationServices } from '../services';

const createRootMock = () => {
Expand All @@ -42,10 +43,14 @@ export const createSettingsApplicationServicesMock = (
...createFormServicesMock(),
getAllowlistedSettings: (scope: UiSettingsScope) =>
scope === 'namespace' ? getSettingsMock() : hasGlobalSettings ? getGlobalSettingsMock() : {},
getSections: () => [],
getCapabilities: getSettingsCapabilitiesMock,
setBadge: jest.fn(),
isCustomSetting: () => false,
isOverriddenSetting: () => false,
subscribeToUpdates: () => new Subscription(),
addUrlToHistory: jest.fn(),
getToastsService: jest.fn(),
});

export const TestWrapper = ({
Expand Down
Loading

0 comments on commit 9734ab8

Please sign in to comment.