-
Notifications
You must be signed in to change notification settings - Fork 86
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
17 changed files
with
175 additions
and
65 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
import React, { useContext } from 'react'; | ||
import { useTranslation } from 'react-i18next'; | ||
import DocumentDrawer from '@/components/DocumentDrawer'; | ||
import { CommonStateContext } from '@/App'; | ||
|
||
interface Props { | ||
src: string; | ||
} | ||
|
||
export default function HelpLink(props: Props) { | ||
const { t, i18n } = useTranslation(); | ||
const { darkMode } = useContext(CommonStateContext); | ||
const { src } = props; | ||
|
||
return ( | ||
<a | ||
className='text-12' | ||
onClick={() => { | ||
DocumentDrawer({ | ||
language: i18n.language, | ||
darkMode, | ||
title: t('common:page_help'), | ||
type: 'iframe', | ||
documentPath: src, | ||
}); | ||
}} | ||
> | ||
{t('common:page_help')} | ||
</a> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
import React, { useContext } from 'react'; | ||
import { QuestionCircleOutlined } from '@ant-design/icons'; | ||
import { Tooltip } from 'antd'; | ||
import { useTranslation } from 'react-i18next'; | ||
import DocumentDrawer from '@/components/DocumentDrawer'; | ||
import { CommonStateContext } from '@/App'; | ||
import { DatasourceCateEnum } from '@/utils/constant'; | ||
|
||
// @ts-ignore | ||
import { proDocumentPathMap } from 'plus:/constants'; | ||
|
||
interface Props { | ||
datasourceCate?: string; | ||
} | ||
|
||
const documentPathMap = { | ||
[DatasourceCateEnum.prometheus]: 'https://flashcat.cloud/docs/content/flashcat-monitor/nightingale-v7/usage/timing-indicators/instant-query/open-source/prometheus/', | ||
[DatasourceCateEnum.tdengine]: 'https://flashcat.cloud/docs/content/flashcat-monitor/nightingale-v7/usage/timing-indicators/instant-query/open-source/tdengine/', | ||
[DatasourceCateEnum.elasticsearch]: 'https://flashcat.cloud/docs/content/flashcat-monitor/nightingale-v7/usage/log-analysis/open-source/elasticserch/', | ||
...(proDocumentPathMap || {}), | ||
}; | ||
|
||
export default function index(props: Props) { | ||
const { t, i18n } = useTranslation('explorer'); | ||
const { darkMode } = useContext(CommonStateContext); | ||
const { datasourceCate } = props; | ||
|
||
if (!datasourceCate || (datasourceCate && !documentPathMap[datasourceCate])) return null; | ||
|
||
return ( | ||
<span className='ant-input-group-addon'> | ||
<Tooltip title={t('help')}> | ||
<QuestionCircleOutlined | ||
onClick={() => { | ||
DocumentDrawer({ | ||
language: i18n.language, | ||
darkMode, | ||
title: t('help'), | ||
type: 'iframe', | ||
documentPath: documentPathMap[datasourceCate], | ||
}); | ||
}} | ||
/> | ||
</Tooltip> | ||
</span> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,71 +1,69 @@ | ||
const ja_JP = { | ||
title: "即時クエリ", | ||
add_btn: "クエリパネルを追加", | ||
query_btn: "クエリ実行", | ||
query_tab: "クエリ", | ||
addPanel: "パネルを追加", | ||
title: '即時クエリ', | ||
add_btn: 'クエリパネルを追加', | ||
query_btn: 'クエリ実行', | ||
query_tab: 'クエリ', | ||
addPanel: 'パネルを追加', | ||
log: { | ||
search_placeholder: "検索フィールド", | ||
available: "選択可能フィールド", | ||
selected: "選択済みフィールド", | ||
interval: "間隔", | ||
search_placeholder: '検索フィールド', | ||
available: '選択可能フィールド', | ||
selected: '選択済みフィールド', | ||
interval: '間隔', | ||
mode: { | ||
indexPatterns: "インデックスパターン", | ||
indices: "インデックス", | ||
indexPatterns: 'インデックスパターン', | ||
indices: 'インデックス', | ||
}, | ||
hideChart: "チャートを非表示", | ||
showChart: "チャートを表示", | ||
fieldValues_topn: "トップ5の値", | ||
fieldValues_topnNoData: | ||
"このフィールドはマッピングに存在しますが、表示される500ドキュメントに存在しません", | ||
copyToClipboard: "クリップボードにコピー", | ||
show_conext: "コンテキストを表示", | ||
context: "ログコンテキスト", | ||
limit: "結果数", | ||
hideChart: 'チャートを非表示', | ||
showChart: 'チャートを表示', | ||
fieldValues_topn: 'トップ5の値', | ||
fieldValues_topnNoData: 'このフィールドはマッピングに存在しますが、表示される500ドキュメントに存在しません', | ||
copyToClipboard: 'クリップボードにコピー', | ||
show_conext: 'コンテキストを表示', | ||
context: 'ログコンテキスト', | ||
limit: '結果数', | ||
sort: { | ||
NEWEST_FIRST: "最新のものから", | ||
OLDEST_FIRST: "最古のものから", | ||
NEWEST_FIRST: '最新のものから', | ||
OLDEST_FIRST: '最古のものから', | ||
}, | ||
download: "ログをダウンロード", | ||
export: "レコードをエクスポート", | ||
download: 'ログをダウンロード', | ||
export: 'レコードをエクスポート', | ||
log_download: { | ||
title: "ダウンロード", | ||
download_title: "ログデータをダウンロード", | ||
range: "時間範囲", | ||
filter: "検索語句", | ||
format: "データ形式", | ||
time_sort: "ログの並べ替え", | ||
count: "ログの数", | ||
time_sort_desc: "時間降順", | ||
time_sort_asc: "時間昇順", | ||
all: "全て", | ||
custom: "カスタム", | ||
custom_validated: "数は1-65535の間でなければなりません", | ||
all_quantity: "合計約", | ||
createSuccess: "タスク作成成功", | ||
title: 'ダウンロード', | ||
download_title: 'ログデータをダウンロード', | ||
range: '時間範囲', | ||
filter: '検索語句', | ||
format: 'データ形式', | ||
time_sort: 'ログの並べ替え', | ||
count: 'ログの数', | ||
time_sort_desc: '時間降順', | ||
time_sort_asc: '時間昇順', | ||
all: '全て', | ||
custom: 'カスタム', | ||
custom_validated: '数は1-65535の間でなければなりません', | ||
all_quantity: '合計約', | ||
createSuccess: 'タスク作成成功', | ||
}, | ||
log_export: { | ||
title: | ||
"レコードをエクスポート(オンラインエクスポートファイルは3日間保持)", | ||
fileName: "ファイル名", | ||
create_time: "作成時間", | ||
describe: "ファイル説明", | ||
status: "状態", | ||
status0: "待機中", | ||
status1: "生成済み", | ||
status2: "ファイルが期限切れ", | ||
operation: "操作", | ||
delSuccess: "タスクが削除されました", | ||
del_btn_tips: "削除してよろしいですか?", | ||
del_btn: "削除", | ||
emptyText: | ||
"エクスポートレコードが見つかりません。ログクエリを実行し、ダウンロードをクリックしてください。", | ||
title: 'レコードをエクスポート(オンラインエクスポートファイルは3日間保持)', | ||
fileName: 'ファイル名', | ||
create_time: '作成時間', | ||
describe: 'ファイル説明', | ||
status: '状態', | ||
status0: '待機中', | ||
status1: '生成済み', | ||
status2: 'ファイルが期限切れ', | ||
operation: '操作', | ||
delSuccess: 'タスクが削除されました', | ||
del_btn_tips: '削除してよろしいですか?', | ||
del_btn: '削除', | ||
emptyText: 'エクスポートレコードが見つかりません。ログクエリを実行し、ダウンロードをクリックしてください。', | ||
}, | ||
}, | ||
historicalRecords: { | ||
button: "歴史レコード", | ||
searchPlaceholder: "歴史レコードを検索", | ||
button: '歴史レコード', | ||
searchPlaceholder: '歴史レコードを検索', | ||
}, | ||
help: 'データソースヘルプを表示', | ||
}; | ||
|
||
export default ja_JP; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -63,5 +63,6 @@ const zh_CN = { | |
button: '历史记录', | ||
searchPlaceholder: '搜索历史记录', | ||
}, | ||
help: '使用说明', | ||
}; | ||
export default zh_CN; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -63,6 +63,7 @@ const zh_HK = { | |
button: '歷史記錄', | ||
searchPlaceholder: '搜索歷史記錄', | ||
}, | ||
help: '使用說明', | ||
}; | ||
|
||
export default zh_HK; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.