From 9ca33d5f1840e05b0f048f78aa8988dc82fc0c53 Mon Sep 17 00:00:00 2001 From: CODE <1650192445@qq.com> Date: Wed, 15 Nov 2023 11:05:19 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E5=90=AF=E7=94=A8=20kafka?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/app/lib/index.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/api/app/lib/index.js b/api/app/lib/index.js index c5401bf..8f9cf17 100644 --- a/api/app/lib/index.js +++ b/api/app/lib/index.js @@ -23,7 +23,7 @@ module.exports.entry = function (app, router, opts) { app.fs.utils = app.fs.utils || {}; app.fs.api.authAttr = app.fs.api.authAttr || {}; app.fs.api.logAttr = app.fs.api.logAttr || {}; - + // 顺序固定 ↓ redisConnect(app, opts) @@ -35,7 +35,7 @@ module.exports.entry = function (app, router, opts) { es(app, opts) - // kafka(app, opts) + kafka(app, opts) // clickHouse 数据库 client clickHouseClient(app, opts) @@ -55,7 +55,7 @@ module.exports.entry = function (app, router, opts) { router = routes(app, router, opts); - + }; module.exports.models = function (dc) { // dc = { orm: Sequelize对象, ORM: Sequelize, models: {} } @@ -69,7 +69,7 @@ module.exports.models = function (dc) { // dc = { orm: Sequelize对象, ORM: Seq AppInspection, ProjectApp, ProjectCorrelation, AppAlarm, App, AlarmAppearRecord, AlarmConfirmLog, EmailSendLog, LatestDynamicList, AlarmPushConfig, MaintenanceRecord, MaintenanceRecordExecuteUser, MaintenancePlanExecuteUser, MaintenancePlan, EquipmentMaintenanceRecord, EquipmentMaintenanceRecordProject, EquipmentMaintenanceRecordExecuteUser, ServerMaintenanceRecordRepairman, ServerMaintenanceRecord, - AlarmDataContinuityType, AlarmDataContinuity,AbnTypes,AbnReportParams + AlarmDataContinuityType, AlarmDataContinuity, AbnTypes, AbnReportParams } = dc.models; AppInspection.belongsTo(App, { foreignKey: 'projectAppId', targetKey: 'id' }); From 0e3abb007744d24ec82156c58a20e75037a6e1c0 Mon Sep 17 00:00:00 2001 From: lucas2 Date: Wed, 15 Nov 2023 11:09:37 +0800 Subject: [PATCH 2/2] =?UTF-8?q?update=20=203022=20=203021=20=203020=20?= =?UTF-8?q?=E6=9B=B4=E6=96=B0=20type=20code=E7=9A=84group=20=E4=B8=BA?= =?UTF-8?q?=E7=AD=96=E7=95=A5=E5=91=BD=E4=B8=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- script/3.5/schema/1.add_alarm_code.sql | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/script/3.5/schema/1.add_alarm_code.sql b/script/3.5/schema/1.add_alarm_code.sql index 7a13015..4405815 100644 --- a/script/3.5/schema/1.add_alarm_code.sql +++ b/script/3.5/schema/1.add_alarm_code.sql @@ -16,13 +16,13 @@ INSERT INTO t_alarm_group_unit("id","name", "group_id") VALUES (49,'数据毛刺 IF NOT EXISTS(SELECT 1 FROM t_alarm_type WHERE name='识别到数据异常中断,产生告警,并已将告警信息推送至运维服务工程师。' AND code='3020' ) THEN INSERT INTO t_alarm_type (code, name,description,category,enabled,alarm_group,alarm_group_unit,advice_problem) VALUES ('3020','识别到数据异常中断,产生告警,并已将告警信息推送至运维服务工程师。','数据中断',1,true, - 1,(select id from "t_alarm_group_unit" where name='数据中断' LIMIT 1),'非软件处理'); + 3,(select id from "t_alarm_group_unit" where name='数据中断' LIMIT 1),'非软件处理'); END IF; IF NOT EXISTS(SELECT 1 FROM t_alarm_code WHERE name='数据中断' AND type_code='30200001' ) THEN INSERT INTO t_alarm_code (code, name,type_code,level,enable,alarm_group,alarm_group_unit,advice_problem) VALUES ('30200001','数据中断','3020',1,true, - 1,(select id from "t_alarm_group_unit" where name='数据中断' LIMIT 1),'非软件处理'); + 3,(select id from "t_alarm_group_unit" where name='数据中断' LIMIT 1),'非软件处理'); END IF; -- 添加[数据异常趋势]告警类型 @@ -36,7 +36,7 @@ INSERT INTO t_alarm_group_unit("id","name", "group_id") VALUES (49,'数据毛刺 IF NOT EXISTS(SELECT 1 FROM t_alarm_code WHERE name='数据异常趋势' AND type_code='3021' ) THEN INSERT INTO t_alarm_code (code, name,type_code,level,enable,alarm_group,alarm_group_unit,advice_problem) VALUES ('30210001','数据异常趋势','3021',1,true, - 1,(select id from "t_alarm_group_unit" where name='数据异常趋势' LIMIT 1),'非软件处理'); + 3,(select id from "t_alarm_group_unit" where name='数据异常趋势' LIMIT 1),'非软件处理'); END IF; @@ -51,7 +51,7 @@ INSERT INTO t_alarm_group_unit("id","name", "group_id") VALUES (49,'数据毛刺 IF NOT EXISTS(SELECT 1 FROM t_alarm_code WHERE name='数据毛刺' AND type_code='3022' ) THEN INSERT INTO t_alarm_code (code, name,type_code,level,enable,alarm_group,alarm_group_unit,advice_problem) VALUES ('30220001','数据毛刺','3022',1,true, - 1,(select id from "t_alarm_group_unit" where name='数据毛刺' LIMIT 1),'非软件处理'); + 3,(select id from "t_alarm_group_unit" where name='数据毛刺' LIMIT 1),'非软件处理'); END IF; END