forked from iti-framework/iTi-Flask
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
767 B
Python
22 lines
767 B
Python
from apiflask import APIBlueprint
|
|
from iti.applications.extensions import db, sys_log
|
|
from iti.applications.common.utils import success, page_schema, page
|
|
from iti.applications.models import (
|
|
IotAlertRule,
|
|
IotAlertRuleSchema,
|
|
)
|
|
from .schemas.alert_rule import (
|
|
AlertRuleQuery,
|
|
AlertRuleAddRequest,
|
|
AlertRuleUpdateRequest,
|
|
)
|
|
from iti.applications.common import ModelFilter
|
|
from iti.applications.common.exceptions.biz_exp import BizException
|
|
from flask_jwt_extended import jwt_required
|
|
from sqlalchemy import select, delete, exists
|
|
from sqlalchemy.sql.functions import func
|
|
from sqlalchemy.orm import noload
|
|
from iti.applications.common import permission
|
|
|
|
bp = APIBlueprint("iot_alert_rule", __name__, url_prefix="/alertRule", tag="告警规则")
|