Skip to content

Commit

Permalink
[7.x] Uptime overview overhaul (#83406) (#84501)
Browse files Browse the repository at this point in the history
Co-authored-by: Kibana Machine <[email protected]>

Co-authored-by: Kibana Machine <[email protected]>
  • Loading branch information
shahzad31 and kibanamachine authored Nov 30, 2020
1 parent f866385 commit 8ca2ab1
Show file tree
Hide file tree
Showing 40 changed files with 1,126 additions and 786 deletions.
3 changes: 0 additions & 3 deletions x-pack/plugins/translations/translations/ja-JP.json
Original file line number Diff line number Diff line change
Expand Up @@ -20652,11 +20652,8 @@
"xpack.uptime.monitorList.defineConnector.description": "アラートを有効にするには、デフォルトのアラートアクションコネクターを定義してください。",
"xpack.uptime.monitorList.disableDownAlert": "ステータスアラートを無効にする",
"xpack.uptime.monitorList.downLineSeries.downLabel": "ダウン",
"xpack.uptime.monitorList.drawer.locations.statusDown": "{locations}でダウン",
"xpack.uptime.monitorList.drawer.locations.statusUp": "{locations}でアップ",
"xpack.uptime.monitorList.drawer.missingLocation": "一部のHeartbeatインスタンスには位置情報が定義されていません。Heartbeat構成への{link}。",
"xpack.uptime.monitorList.enabledAlerts.noAlert": "このモニターではアラートが有効ではありません。",
"xpack.uptime.monitorList.enabledAlerts.title": "有効なアラート:",
"xpack.uptime.monitorList.enableDownAlert": "ステータスアラートを有効にする",
"xpack.uptime.monitorList.expandDrawerButton.ariaLabel": "ID {id}のモニターの行を展開",
"xpack.uptime.monitorList.geoName.helpLinkAnnotation": "場所を追加",
Expand Down
3 changes: 0 additions & 3 deletions x-pack/plugins/translations/translations/zh-CN.json
Original file line number Diff line number Diff line change
Expand Up @@ -20672,11 +20672,8 @@
"xpack.uptime.monitorList.defineConnector.description": "要开始启用告警,请在以下位置定义默认告警操作连接器",
"xpack.uptime.monitorList.disableDownAlert": "禁用状态告警",
"xpack.uptime.monitorList.downLineSeries.downLabel": "关闭",
"xpack.uptime.monitorList.drawer.locations.statusDown": "在 {locations} 已关闭",
"xpack.uptime.monitorList.drawer.locations.statusUp": "在 {locations} 正运行",
"xpack.uptime.monitorList.drawer.missingLocation": "某些 Heartbeat 实例未定义位置。{link}到您的 Heartbeat 配置。",
"xpack.uptime.monitorList.enabledAlerts.noAlert": "没有为此监测启用告警。",
"xpack.uptime.monitorList.enabledAlerts.title": "已启用的告警:",
"xpack.uptime.monitorList.enableDownAlert": "启用状态告警",
"xpack.uptime.monitorList.expandDrawerButton.ariaLabel": "展开 ID {id} 的监测行",
"xpack.uptime.monitorList.geoName.helpLinkAnnotation": "添加位置",
Expand Down
11 changes: 8 additions & 3 deletions x-pack/plugins/uptime/common/runtime_types/monitor/state.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,14 @@ export const StateType = t.intersection([
up: t.number,
down: t.number,
}),
monitor: t.partial({
name: t.string,
}),
monitor: t.intersection([
t.partial({
name: t.string,
}),
t.type({
type: t.string,
}),
]),
}),
t.partial({
tls: t.partial({
Expand Down
40 changes: 22 additions & 18 deletions x-pack/plugins/uptime/public/apps/uptime_app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,11 @@ import {
import { store } from '../state';
import { kibanaService } from '../state/kibana_service';
import { ScopedHistory } from '../../../../../src/core/public';
import { EuiThemeProvider } from '../../../observability/public';

export interface UptimeAppColors {
danger: string;
dangerBehindText: string;
success: string;
gray: string;
range: string;
Expand Down Expand Up @@ -101,24 +103,26 @@ const Application = (props: UptimeAppProps) => {
<ReduxProvider store={store}>
<KibanaContextProvider services={{ ...core, ...plugins }}>
<Router history={props.history}>
<UptimeRefreshContextProvider>
<UptimeSettingsContextProvider {...props}>
<UptimeThemeContextProvider darkMode={darkMode}>
<UptimeStartupPluginsContextProvider {...startPlugins}>
<UptimeAlertsContextProvider>
<EuiPage className="app-wrapper-panel " data-test-subj="uptimeApp">
<RedirectAppLinks application={core.application}>
<main>
<UptimeAlertsFlyoutWrapper />
<PageRouter />
</main>
</RedirectAppLinks>
</EuiPage>
</UptimeAlertsContextProvider>
</UptimeStartupPluginsContextProvider>
</UptimeThemeContextProvider>
</UptimeSettingsContextProvider>
</UptimeRefreshContextProvider>
<EuiThemeProvider darkMode={darkMode}>
<UptimeRefreshContextProvider>
<UptimeSettingsContextProvider {...props}>
<UptimeThemeContextProvider darkMode={darkMode}>
<UptimeStartupPluginsContextProvider {...startPlugins}>
<UptimeAlertsContextProvider>
<EuiPage className="app-wrapper-panel " data-test-subj="uptimeApp">
<RedirectAppLinks application={core.application}>
<main>
<UptimeAlertsFlyoutWrapper />
<PageRouter />
</main>
</RedirectAppLinks>
</EuiPage>
</UptimeAlertsContextProvider>
</UptimeStartupPluginsContextProvider>
</UptimeThemeContextProvider>
</UptimeSettingsContextProvider>
</UptimeRefreshContextProvider>
</EuiThemeProvider>
</Router>
</KibanaContextProvider>
</ReduxProvider>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { FormattedMessage } from '@kbn/i18n/react';
import { Tls, X509Expiry } from '../../../../../common/runtime_types';
import { CERTIFICATES_ROUTE } from '../../../../../common/constants';
import { MonListDescription, MonListTitle } from './status_bar';
import { CertStatusColumn } from '../../../overview/monitor_list/cert_status_column';
import { CertStatusColumn } from '../../../overview/monitor_list/columns/cert_status_column';

interface Props {
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ export const FilterPopover = ({
const mItems = selectedItems.concat(allItems ?? []);
const newItems = mItems.filter((item, index) => mItems.indexOf(item) === index);
setItems(newItems);
setTempSelectedItems(selectedItems);
}, [allItems, selectedItems]);

useEffect(() => {
Expand All @@ -73,7 +74,7 @@ export const FilterPopover = ({
isDisabled={disabled && selectedItems.length === 0}
isSelected={tempSelectedItems.length > 0}
numFilters={items.length}
numActiveFilters={tempSelectedItems.length}
numActiveFilters={isOpen ? tempSelectedItems.length : selectedItems.length}
onClick={() => {
setIsOpen(!isOpen);
onFilterFieldChange(fieldName, tempSelectedItems);
Expand Down
Loading

0 comments on commit 8ca2ab1

Please sign in to comment.