Skip to content

Commit

Permalink
[Uptime] Monitor availability reporting (#67790)
Browse files Browse the repository at this point in the history
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
  • Loading branch information
shahzad31 and elasticmachine authored Jun 16, 2020
1 parent f43d51d commit a9d73e8
Show file tree
Hide file tree
Showing 70 changed files with 3,125 additions and 1,672 deletions.
6 changes: 0 additions & 6 deletions x-pack/plugins/translations/translations/ja-JP.json
Original file line number Diff line number Diff line change
Expand Up @@ -16606,7 +16606,6 @@
"xpack.uptime.locationMap.locations.missing.message": "重要な位置情報構成がありません。{codeBlock}フィールドを使用して、アップタイムチェック用に一意の地域を作成できます。",
"xpack.uptime.locationMap.locations.missing.message1": "詳細については、ドキュメンテーションを参照してください。",
"xpack.uptime.locationMap.locations.missing.title": "地理情報の欠測",
"xpack.uptime.locationMap.locations.tags.others": "{otherLoc}その他 ...",
"xpack.uptime.locationName.helpLinkAnnotation": "場所を追加",
"xpack.uptime.ml.durationChart.exploreInMlApp": "ML アプリで探索",
"xpack.uptime.ml.enableAnomalyDetectionPanel.anomalyDetectionTitle": "異常検知",
Expand Down Expand Up @@ -16690,12 +16689,7 @@
"xpack.uptime.monitorStatusBar.locations.oneLocStatus": "{loc}場所での{status}",
"xpack.uptime.monitorStatusBar.locations.upStatus": "{loc}場所での{status}",
"xpack.uptime.monitorStatusBar.monitorUrlLinkAriaLabel": "監視 URL リンク",
"xpack.uptime.monitorStatusBar.sslCertificate.overview": "証明書概要",
"xpack.uptime.monitorStatusBar.sslCertificate.title": "証明書",
"xpack.uptime.monitorStatusBar.sslCertificateExpired.badgeContent": "{emphasizedText}が期限切れになりました",
"xpack.uptime.monitorStatusBar.sslCertificateExpired.label.ariaLabel": "{validityDate}に期限切れになりました",
"xpack.uptime.monitorStatusBar.sslCertificateExpiry.badgeContent": "{emphasizedText}が期限切れになります",
"xpack.uptime.monitorStatusBar.sslCertificateExpiry.label.ariaLabel": "{validityDate}に期限切れになります",
"xpack.uptime.monitorStatusBar.timestampFromNowTextAriaLabel": "最終確認からの経過時間",
"xpack.uptime.navigateToAlertingButton.content": "アラートを管理",
"xpack.uptime.navigateToAlertingUi": "Uptime を離れてアラート管理ページに移動します",
Expand Down
6 changes: 0 additions & 6 deletions x-pack/plugins/translations/translations/zh-CN.json
Original file line number Diff line number Diff line change
Expand Up @@ -16612,7 +16612,6 @@
"xpack.uptime.locationMap.locations.missing.message": "重要的地理位置配置缺失。您可以使用 {codeBlock} 字段为您的运行时间检查创建独特的地理区域。",
"xpack.uptime.locationMap.locations.missing.message1": "在我们的文档中获取更多的信息。",
"xpack.uptime.locationMap.locations.missing.title": "地理信息缺失",
"xpack.uptime.locationMap.locations.tags.others": "{otherLoc} 其他......",
"xpack.uptime.locationName.helpLinkAnnotation": "添加位置",
"xpack.uptime.ml.durationChart.exploreInMlApp": "在 ML 应用中浏览",
"xpack.uptime.ml.enableAnomalyDetectionPanel.anomalyDetectionTitle": "异常检测",
Expand Down Expand Up @@ -16696,12 +16695,7 @@
"xpack.uptime.monitorStatusBar.locations.oneLocStatus": "在 {loc} 位置{status}",
"xpack.uptime.monitorStatusBar.locations.upStatus": "在 {loc} 位置{status}",
"xpack.uptime.monitorStatusBar.monitorUrlLinkAriaLabel": "监测 URL 链接",
"xpack.uptime.monitorStatusBar.sslCertificate.overview": "证书概览",
"xpack.uptime.monitorStatusBar.sslCertificate.title": "证书",
"xpack.uptime.monitorStatusBar.sslCertificateExpired.badgeContent": "{emphasizedText}过期",
"xpack.uptime.monitorStatusBar.sslCertificateExpired.label.ariaLabel": "已于 {validityDate}过期",
"xpack.uptime.monitorStatusBar.sslCertificateExpiry.badgeContent": "{emphasizedText}过期",
"xpack.uptime.monitorStatusBar.sslCertificateExpiry.label.ariaLabel": "将于 {validityDate}过期",
"xpack.uptime.monitorStatusBar.timestampFromNowTextAriaLabel": "自上次检查以来经过的时间",
"xpack.uptime.navigateToAlertingButton.content": "管理告警",
"xpack.uptime.navigateToAlertingUi": "离开 Uptime 并前往“Alerting 管理”页面",
Expand Down
15 changes: 10 additions & 5 deletions x-pack/plugins/uptime/common/runtime_types/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,19 @@

import * as t from 'io-ts';

export const LocationType = t.partial({
export const LocationType = t.type({
lat: t.string,
lon: t.string,
});

export const CheckGeoType = t.partial({
name: t.string,
location: LocationType,
});
export const CheckGeoType = t.intersection([
t.type({
name: t.string,
}),
t.partial({
location: LocationType,
}),
]);

export const SummaryType = t.partial({
up: t.number,
Expand All @@ -34,5 +38,6 @@ export const DateRangeType = t.type({

export type Summary = t.TypeOf<typeof SummaryType>;
export type Location = t.TypeOf<typeof LocationType>;
export type GeoPoint = t.TypeOf<typeof CheckGeoType>;
export type StatesIndexStatus = t.TypeOf<typeof StatesIndexStatusType>;
export type DateRange = t.TypeOf<typeof DateRangeType>;
12 changes: 9 additions & 3 deletions x-pack/plugins/uptime/common/runtime_types/monitor/locations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,23 @@ import * as t from 'io-ts';
import { CheckGeoType, SummaryType } from '../common';

// IO type for validation
export const MonitorLocationType = t.partial({
export const MonitorLocationType = t.type({
up_history: t.number,
down_history: t.number,
timestamp: t.string,
summary: SummaryType,
geo: CheckGeoType,
timestamp: t.string,
});

// Typescript type for type checking
export type MonitorLocation = t.TypeOf<typeof MonitorLocationType>;

export const MonitorLocationsType = t.intersection([
t.type({ monitorId: t.string }),
t.type({
monitorId: t.string,
up_history: t.number,
down_history: t.number,
}),
t.partial({ locations: t.array(MonitorLocationType) }),
]);
export type MonitorLocations = t.TypeOf<typeof MonitorLocationsType>;
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ export const EXPIRES_SOON = i18n.translate('xpack.uptime.certs.expireSoon', {
defaultMessage: 'Expires soon',
});

export const EXPIRES = i18n.translate('xpack.uptime.certs.expires', {
defaultMessage: 'Expires',
});

export const SEARCH_CERTS = i18n.translate('xpack.uptime.certs.searchCerts', {
defaultMessage: 'Search certificates',
});
Expand Down
11 changes: 11 additions & 0 deletions x-pack/plugins/uptime/public/components/common/translations.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License;
* you may not use this file except in compliance with the Elastic License.
*/

import { i18n } from '@kbn/i18n';

export const URL_LABEL = i18n.translate('xpack.uptime.monitorList.table.url.name', {
defaultMessage: 'Url',
});
4 changes: 2 additions & 2 deletions x-pack/plugins/uptime/public/components/monitor/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

export * from './ml';
export * from './ping_list';
export * from './location_map';
export * from './monitor_status_details';
export * from './status_details/location_map';
export * from './status_details';
export * from './ping_histogram';
export * from './monitor_charts';
Loading

0 comments on commit a9d73e8

Please sign in to comment.