Edit GetStack api.
This commit is contained in:
@@ -49,6 +49,17 @@ void DeleteTraceAppRequest::setAppId(const std::string& appId)
|
||||
setParameter("AppId", appId);
|
||||
}
|
||||
|
||||
std::string DeleteTraceAppRequest::getPid()const
|
||||
{
|
||||
return pid_;
|
||||
}
|
||||
|
||||
void DeleteTraceAppRequest::setPid(const std::string& pid)
|
||||
{
|
||||
pid_ = pid;
|
||||
setParameter("Pid", pid);
|
||||
}
|
||||
|
||||
std::string DeleteTraceAppRequest::getType()const
|
||||
{
|
||||
return type_;
|
||||
|
||||
@@ -60,3 +60,14 @@ void GetStackRequest::setRpcID(const std::string& rpcID)
|
||||
setParameter("RpcID", rpcID);
|
||||
}
|
||||
|
||||
std::string GetStackRequest::getPid()const
|
||||
{
|
||||
return pid_;
|
||||
}
|
||||
|
||||
void GetStackRequest::setPid(const std::string& pid)
|
||||
{
|
||||
pid_ = pid;
|
||||
setParameter("Pid", pid);
|
||||
}
|
||||
|
||||
|
||||
@@ -57,16 +57,11 @@ void GetStackResult::parse(const std::string &payload)
|
||||
stackInfoObject.exception = valueStackInfoStackInfoItem["Exception"].asString();
|
||||
if(!valueStackInfoStackInfoItem["Line"].isNull())
|
||||
stackInfoObject.line = valueStackInfoStackInfoItem["Line"].asString();
|
||||
auto allExtInfoNode = allStackInfoNode["ExtInfo"]["ExtInfoItem"];
|
||||
for (auto allStackInfoNodeExtInfoExtInfoItem : allExtInfoNode)
|
||||
{
|
||||
StackInfoItem::ExtInfoItem extInfoObject;
|
||||
if(!allStackInfoNodeExtInfoExtInfoItem["Type"].isNull())
|
||||
extInfoObject.type = allStackInfoNodeExtInfoExtInfoItem["Type"].asString();
|
||||
if(!allStackInfoNodeExtInfoExtInfoItem["Info"].isNull())
|
||||
extInfoObject.info = allStackInfoNodeExtInfoExtInfoItem["Info"].asString();
|
||||
stackInfoObject.extInfo.push_back(extInfoObject);
|
||||
}
|
||||
auto extInfoNode = value["ExtInfo"];
|
||||
if(!extInfoNode["Type"].isNull())
|
||||
stackInfoObject.extInfo.type = extInfoNode["Type"].asString();
|
||||
if(!extInfoNode["Info"].isNull())
|
||||
stackInfoObject.extInfo.info = extInfoNode["Info"].asString();
|
||||
stackInfo_.push_back(stackInfoObject);
|
||||
}
|
||||
|
||||
|
||||
@@ -60,6 +60,17 @@ void ImportCustomAlertRulesRequest::setContactGroupIds(const std::string& contac
|
||||
setParameter("ContactGroupIds", contactGroupIds);
|
||||
}
|
||||
|
||||
std::string ImportCustomAlertRulesRequest::getTemplateAlertConfig()const
|
||||
{
|
||||
return templateAlertConfig_;
|
||||
}
|
||||
|
||||
void ImportCustomAlertRulesRequest::setTemplateAlertConfig(const std::string& templateAlertConfig)
|
||||
{
|
||||
templateAlertConfig_ = templateAlertConfig;
|
||||
setParameter("TemplateAlertConfig", templateAlertConfig);
|
||||
}
|
||||
|
||||
std::string ImportCustomAlertRulesRequest::getProxyUserId()const
|
||||
{
|
||||
return proxyUserId_;
|
||||
@@ -71,14 +82,3 @@ void ImportCustomAlertRulesRequest::setProxyUserId(const std::string& proxyUserI
|
||||
setParameter("ProxyUserId", proxyUserId);
|
||||
}
|
||||
|
||||
std::string ImportCustomAlertRulesRequest::getTemplageAlertConfig()const
|
||||
{
|
||||
return templageAlertConfig_;
|
||||
}
|
||||
|
||||
void ImportCustomAlertRulesRequest::setTemplageAlertConfig(const std::string& templageAlertConfig)
|
||||
{
|
||||
templageAlertConfig_ = templageAlertConfig;
|
||||
setParameter("TemplageAlertConfig", templageAlertConfig);
|
||||
}
|
||||
|
||||
|
||||
@@ -78,11 +78,19 @@ void SearchAlertRulesResult::parse(const std::string &payload)
|
||||
alertRuleEntityObject.updateTime = std::stol(pageBeanNodeAlertRulesAlertRuleEntity["UpdateTime"].asString());
|
||||
if(!pageBeanNodeAlertRulesAlertRuleEntity["UserId"].isNull())
|
||||
alertRuleEntityObject.userId = pageBeanNodeAlertRulesAlertRuleEntity["UserId"].asString();
|
||||
if(!pageBeanNodeAlertRulesAlertRuleEntity["Title"].isNull())
|
||||
alertRuleEntityObject.title = pageBeanNodeAlertRulesAlertRuleEntity["Title"].asString();
|
||||
if(!pageBeanNodeAlertRulesAlertRuleEntity["ContactGroupIds"].isNull())
|
||||
alertRuleEntityObject.contactGroupIds = pageBeanNodeAlertRulesAlertRuleEntity["ContactGroupIds"].asString();
|
||||
auto alarmContextNode = value["AlarmContext"];
|
||||
if(!alarmContextNode["AlarmContentTemplate"].isNull())
|
||||
alertRuleEntityObject.alarmContext.alarmContentTemplate = alarmContextNode["AlarmContentTemplate"].asString();
|
||||
if(!alarmContextNode["AlarmContentSubTitle"].isNull())
|
||||
alertRuleEntityObject.alarmContext.alarmContentSubTitle = alarmContextNode["AlarmContentSubTitle"].asString();
|
||||
if(!alarmContextNode["Content"].isNull())
|
||||
alertRuleEntityObject.alarmContext.content = alarmContextNode["Content"].asString();
|
||||
if(!alarmContextNode["SubTitle"].isNull())
|
||||
alertRuleEntityObject.alarmContext.subTitle = alarmContextNode["SubTitle"].asString();
|
||||
auto alertRuleNode = value["AlertRule"];
|
||||
if(!alertRuleNode["Operator"].isNull())
|
||||
alertRuleEntityObject.alertRule._operator = alertRuleNode["Operator"].asString();
|
||||
@@ -137,6 +145,9 @@ void SearchAlertRulesResult::parse(const std::string &payload)
|
||||
auto allAlertWays = value["AlertWays"]["AlertWay"];
|
||||
for (auto value : allAlertWays)
|
||||
alertRuleEntityObject.alertWays.push_back(value.asString());
|
||||
auto allAlertWay = value["AlertWay"]["AlertWay"];
|
||||
for (auto value : allAlertWay)
|
||||
alertRuleEntityObject.alertWay.push_back(value.asString());
|
||||
pageBean_.alertRules.push_back(alertRuleEntityObject);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user