From 351c0018ea4cbf3c926ec482c1b0bcf78a601c13 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?zhaobing=E2=80=99?= Date: Wed, 6 Dec 2023 09:18:18 +0800 Subject: [PATCH] =?UTF-8?q?feat:=E6=8F=90=E4=BA=A4=E9=85=8D=E7=BD=AE?= =?UTF-8?q?=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/config.js | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/api/config.js b/api/config.js index b86e3d7..9285bb4 100644 --- a/api/config.js +++ b/api/config.js @@ -147,6 +147,17 @@ const ES_PLATFORM_NAME = process.env.ES_PLATFORM_NAME || flags.esPlatformName const ES_CONTINUITY_NAME = process.env.ES_CONTINUITY_NAME || flags.esContinuityName || 'anxincloud' || 'anxinyun'; +const ES_ANXINYUN_RAWS = process.env.ES_ANXINYUN_RAWS || flags.esAnxinyunRaws + || 'anxinyun' + || 'anxincloud' +const ES_ANXINYUN__VBRAWS = process.env.ES_ANXINYUN__VBRAWS || flags.esAnxinyunVbRaws + || 'anxinyun' + || 'anxincloud' +const ES_ANXINCLOUD_ALARMS = process.env.ES_ANXINCLOUD_ALARMS || flags.esAnxinCloudAlarms + || 'anxincloud' + || 'anxinyun'; + + const ANXINCLOUD_ES_NODES_REST = process.env.ANXINCLOUD_ES_NODES_REST || flags.es; // //business_key // const BUSINESS_KEY=process.env.BUSINESS_KEY||['160','161'] @@ -376,17 +387,17 @@ const product = { }, rawData: { rootURL: ANXINCLOUD_ES_NODES_REST.split(','), - index: `${PLATFORM_NAME}_raws`, + index: `${ES_ANXINYUN_RAWS}_raws`, type: flags.esType ? flags.esType : '_doc' }, vbRawData: { rootURL: ANXINCLOUD_ES_NODES_REST.split(','), - index: `${PLATFORM_NAME}_vbraws`, + index: `${ES_ANXINYUN__VBRAWS}_vbraws`, type: flags.esType ? flags.esType : '_doc' }, alarm: { rootURL: ANXINCLOUD_ES_NODES_REST.split(','), - index: `${PLATFORM_NAME}_alarms`, + index: `${ES_ANXINCLOUD_ALARMS}_alarms`, type: flags.esType ? flags.esType : '_doc' }, }