lvfengfree b92e1119ae fix: 修复菜单为空问题 - 移除后端过滤home路由的错误逻辑
- 修复RouteService中错误过滤home路由的问题
- 后端现在正确返回所有用户有权限的路由
- 添加设备管理相关功能(列表、在线监控、电源管理、远程监控)
- 添加详细的修复文档和重启脚本
- 更新权限配置脚本

问题根源:后端代码中有逻辑会过滤掉home路由,导致前端收到空数组,无法生成菜单
解决方案:移除过滤home路由的逻辑,让后端返回所有有权限的路由
2026-03-01 09:50:19 +08:00

98 lines
3.2 KiB
C++

//----------------------------------------------------------------------------
//
// Copyright (C) 2003 Intel Corporation
//
// File: OpenWsmanClient.h
//
// Contents: A wrapper class for openweman
//
//----------------------------------------------------------------------------
#ifndef __SOAP_WSMAN_CLIENT_H
#define __SOAP_WSMAN_CLIENT_H
#include "stdsoap2.h"
#include "WsmanClient.h"
namespace WsmanClientNamespace
{
class SoapWsmanClient : public WsmanClient
{
private:
struct soap *soap;
char* username;
char* password;
string endpoint;
// private functions
// creates a soap header
SOAP_ENV__Header* CreateSoapHeader(const string& resourceUri, const string& action, const NameValuePairs* selectors = NULL) const;
// deallocates a soap header
void DeleteSoapHeader(SOAP_ENV__Header* header) const;
// pulls the items of an enumeration context
void PullItems(const string &resourceUri, const string& enumerationContext, vector<string>& items, const NameValuePairs *s = NULL) const;
// checks for errors
bool CheckWsmanResponse(int soapRet, soap_dom_element& response, const string& action) const;
// check the enumeration response
bool ResourceNotFound(soap_dom_element& enumerationRes) const;
// Copy constructor is declared private
SoapWsmanClient(const SoapWsmanClient& cl);
// operator = is declared private
SoapWsmanClient& operator =(const SoapWsmanClient& cl);
public:
// Construct from params.
SoapWsmanClient(const char* endpoint,
const char* user_name = NULL,
const char* password = NULL,
struct soap* inSoap = NULL);
// Destructor.
virtual ~SoapWsmanClient();
// Identify.
virtual string Identify() const {throw exception("Function Not Supported");}
/// Creates a new instance of a resource.
string Create(const string &resourceUri, const string &data) const;
/// Delete a resource.
void Delete(const string &resourceUri, const NameValuePairs *s = NULL) const;
/// Enumerate resource.
void Enumerate(const string &resourceUri, vector<string> &enumRes, const NameValuePairs *s = NULL) const;
/// Retrieve a resource.
string Get(const string &resourceUri, const NameValuePairs *s = NULL) const;
/// Update a resource.
string Put(const string &resourceUri, const string &content, const NameValuePairs *s = NULL) const;
/// Invokes a method and returns the results of the method call.
string Invoke(const string &resourceUri, const string &methodName, const string &content, const NameValuePairs *s = NULL) const;
// Submit a subscription
string Subscribe(const string &resourceUri, const SubscribeInfo &info, string &identifier) const;
// Renew a subscription
string Renew(const string &identifier, float expire) const;
// Terminate a subscription
void Unsubscribe(const string &identifier) const;
// Renew a subscription
virtual string Renew(const string &resourceUri, const string &identifier, float expire, const NameValuePairs *s = NULL) const {throw exception("Function Not Supported");}
// Terminate a subscription
virtual void Unsubscribe(const string &resourceUri, const string &identifier, const NameValuePairs *s = NULL) const {throw exception("Function Not Supported");}
};
} // namespace WsmanClient
#endif