From 2b2a53752cb94a4b55620026a4af911308f8ca22 Mon Sep 17 00:00:00 2001 From: "tangyu1018@163.com" Date: Sun, 11 Dec 2016 01:05:48 +0800 Subject: [PATCH] fixed for compile and adjust web monitor --- NFComm/NFMessageDefine/NFProtocolDefine.hpp | 1 - .../NFCGSSwichServerModule.cpp | 1 - Tool/NF_Web_Monitor/NF_Web_Frame.js | 28 ++++++++----------- .../assets/css/paper-dashboard.css | 6 ++++ Tool/NF_Web_Monitor/index.html | 8 +++--- 5 files changed, 21 insertions(+), 23 deletions(-) diff --git a/NFComm/NFMessageDefine/NFProtocolDefine.hpp b/NFComm/NFMessageDefine/NFProtocolDefine.hpp index c9db178118..4bc6a2b2a1 100644 --- a/NFComm/NFMessageDefine/NFProtocolDefine.hpp +++ b/NFComm/NFMessageDefine/NFProtocolDefine.hpp @@ -830,7 +830,6 @@ class Player static const std::string& OnlineTime(){ static std::string xOnlineTime = "OnlineTime"; return xOnlineTime; } // object static const std::string& TotalLineTime(){ static std::string xTotalLineTime = "TotalLineTime"; return xTotalLineTime; } // object static const std::string& GMLevel(){ static std::string xGMLevel = "GMLevel"; return xGMLevel; } // int - static const std::string& LoadPropertyFinish(){ static std::string xLoadPropertyFinish = "LoadPropertyFinish"; return xLoadPropertyFinish; } // int static const std::string& GameID(){ static std::string xGameID = "GameID"; return xGameID; } // int static const std::string& GateID(){ static std::string xGateID = "GateID"; return xGateID; } // int static const std::string& GuildID(){ static std::string xGuildID = "GuildID"; return xGuildID; } // object diff --git a/NFServer/NFGameLogicPlugin/NFCGSSwichServerModule.cpp b/NFServer/NFGameLogicPlugin/NFCGSSwichServerModule.cpp index 3af01b4d7b..54c4c36fd2 100644 --- a/NFServer/NFGameLogicPlugin/NFCGSSwichServerModule.cpp +++ b/NFServer/NFGameLogicPlugin/NFCGSSwichServerModule.cpp @@ -128,7 +128,6 @@ void NFCGSSwichServerModule::OnReqSwichServer(const int nSockIndex, const int nM return; } - pObject->SetPropertyInt(NFrame::Player::LoadPropertyFinish(), 1); pObject->SetPropertyInt(NFrame::Player::GateID(), nGateID); pObject->SetPropertyInt(NFrame::Player::GameID(), pPluginManager->GetAppID()); diff --git a/Tool/NF_Web_Monitor/NF_Web_Frame.js b/Tool/NF_Web_Monitor/NF_Web_Frame.js index dc1f6314e9..9d05203629 100644 --- a/Tool/NF_Web_Monitor/NF_Web_Frame.js +++ b/Tool/NF_Web_Monitor/NF_Web_Frame.js @@ -33,7 +33,7 @@ html_ServerLine_temp = "\
\
\

{$serverName}

\ -

Online Count

\ +

Online Count [Now {$NowCount}]

\
\
\
\ @@ -73,7 +73,7 @@ html_ServerInfoTable_temp = "\
\
" var html_ServerInfoTableTr = "\ - \ + \ {$RowID}\ {$RowKey}\ {$RowValue}\ @@ -194,6 +194,7 @@ function showServerStatus(ServerNameList, ServerStatusList, UpdateTimeList, Serv html_ServerLine += html_ServerLine_temp.replace("{$serverName}", ServerNameList[i]); html_ServerLine = html_ServerLine.replace("{$serverNameId}", ServerNameList[i] + "ID"); + html_ServerLine = html_ServerLine.replace("{$NowCount}", ServerOnlineList[i][0][ServerOnlineList[i][0].length-1]); } document.getElementById("serverContent").innerHTML = "
" + html_ServerStatus + "
" + html_ServerLine; @@ -266,41 +267,39 @@ function showServerInfoTable(CurrentServerID, ServerNameList, ServerStatusList, html_ServerInfoTable_Tr = html_ServerInfoTable_Tr.replace("{$RowValue}", ServerIDList[i]); html_tbody += html_ServerInfoTable_Tr; html_ServerInfoTable_Tr = html_ServerInfoTableTr; - html_ServerInfoTable_Tr = html_ServerInfoTable_Tr.replace("{$RowID}", "1"); + html_ServerInfoTable_Tr = html_ServerInfoTable_Tr.replace("{$RowID}", "2"); html_ServerInfoTable_Tr = html_ServerInfoTable_Tr.replace("{$RowKey}", "ServerName"); html_ServerInfoTable_Tr = html_ServerInfoTable_Tr.replace("{$RowValue}", ServerNameList[i]); html_tbody += html_ServerInfoTable_Tr; html_ServerInfoTable_Tr = html_ServerInfoTableTr; - html_ServerInfoTable_Tr = html_ServerInfoTable_Tr.replace("{$RowID}", "1"); + html_ServerInfoTable_Tr = html_ServerInfoTable_Tr.replace("{$RowID}", "3"); html_ServerInfoTable_Tr = html_ServerInfoTable_Tr.replace("{$RowKey}", "ServerIP"); html_ServerInfoTable_Tr = html_ServerInfoTable_Tr.replace("{$RowValue}", ServerIPList[i]); html_tbody += html_ServerInfoTable_Tr; html_ServerInfoTable_Tr = html_ServerInfoTableTr; - html_ServerInfoTable_Tr = html_ServerInfoTable_Tr.replace("{$RowID}", "1"); + html_ServerInfoTable_Tr = html_ServerInfoTable_Tr.replace("{$RowID}", "4"); html_ServerInfoTable_Tr = html_ServerInfoTable_Tr.replace("{$RowKey}", "ServerPort"); html_ServerInfoTable_Tr = html_ServerInfoTable_Tr.replace("{$RowValue}", ServerPortList[i]); html_tbody += html_ServerInfoTable_Tr; html_ServerInfoTable_Tr = html_ServerInfoTableTr; - html_ServerInfoTable_Tr = html_ServerInfoTable_Tr.replace("{$RowID}", "1"); + html_ServerInfoTable_Tr = html_ServerInfoTable_Tr.replace("{$RowID}", "5"); html_ServerInfoTable_Tr = html_ServerInfoTable_Tr.replace("{$RowKey}", "ServerOnlineCount"); html_ServerInfoTable_Tr = html_ServerInfoTable_Tr.replace("{$RowValue}", serverOnlineList[i][0][serverOnlineList[i][0].length - 1]); html_tbody += html_ServerInfoTable_Tr; html_ServerInfoTable_Tr = html_ServerInfoTableTr; if(ServerStatusList[i] == 1) { - html_ServerInfoTable_Tr = html_ServerInfoTable_Tr.replace("{$RowID}", "1"); + html_ServerInfoTable_Tr = html_ServerInfoTable_Tr.replace("{$RowID}", "6"); html_ServerInfoTable_Tr = html_ServerInfoTable_Tr.replace("{$RowKey}", "ServerStatus"); html_ServerInfoTable_Tr = html_ServerInfoTable_Tr.replace("{$RowValue}", "Online"); } else { - html_ServerInfoTable_Tr = html_ServerInfoTable_Tr.replace("{$RowID}", "1"); + html_ServerInfoTable_Tr = html_ServerInfoTable_Tr.replace("{$RowID}", "6"); html_ServerInfoTable_Tr = html_ServerInfoTable_Tr.replace("{$RowKey}", "ServerStatus"); html_ServerInfoTable_Tr = html_ServerInfoTable_Tr.replace("{$RowValue}", "Offline"); } html_tbody += html_ServerInfoTable_Tr; - html_ServerInfoTable = html_ServerInfoTable.replace("{$InfoTableTr}", html_tbody); - if(ServerStatusList[i] == 1) { @@ -313,15 +312,10 @@ function showServerInfoTable(CurrentServerID, ServerNameList, ServerStatusList, html_ServerInfoTable = html_ServerInfoTable.replace("{$ServerStatus}", "Offline"); } - html_ServerInfoTable += html_ServerInfoTable_temp.replace("{$TableTitle}", ServerNameList[i] + " Extra Information"); - html_ServerInfoTable = html_ServerInfoTable.replace("{$TableDescript}", "TBD"); - - var dataList = ServerInfoExt[i]; - html_tbody = ""; $.each(dataList, function (i, item) { html_ServerInfoTable_Tr = html_ServerInfoTableTr; - html_ServerInfoTable_Tr = html_ServerInfoTable_Tr.replace("{$RowID}", i); + html_ServerInfoTable_Tr = html_ServerInfoTable_Tr.replace("{$RowID}", i+7); $.each(item, function (key, value){ html_ServerInfoTable_Tr = html_ServerInfoTable_Tr.replace("{$RowKey}", key); html_ServerInfoTable_Tr = html_ServerInfoTable_Tr.replace("{$RowValue}", value); @@ -584,7 +578,7 @@ $(document).ready(function(){ $.notify({ icon: 'ti-gift', - message: "Welcome to NoahGameFrame Web Monitor." + message: "Welcome to NoahFrame Web Monitor." },{ type: 'info', diff --git a/Tool/NF_Web_Monitor/assets/css/paper-dashboard.css b/Tool/NF_Web_Monitor/assets/css/paper-dashboard.css index f01f26634b..475e18f5ba 100644 --- a/Tool/NF_Web_Monitor/assets/css/paper-dashboard.css +++ b/Tool/NF_Web_Monitor/assets/css/paper-dashboard.css @@ -1249,6 +1249,12 @@ textarea.form-control { .table-striped tbody > tr:nth-of-type(2n) { background-color: #FFFCF5; } +.table-striped tbody > tr:nth-of-type(2n+7) { + background-color: #AFF; +} +.table-striped tbody > tr:nth-of-type(2n+8) { + background-color: #CFF; +} .table-striped > thead > tr > th, .table-striped > tbody > tr > th, .table-striped > tfoot > tr > th, diff --git a/Tool/NF_Web_Monitor/index.html b/Tool/NF_Web_Monitor/index.html index 44d9dc8465..89611b915c 100644 --- a/Tool/NF_Web_Monitor/index.html +++ b/Tool/NF_Web_Monitor/index.html @@ -6,7 +6,7 @@ - NoahGameFrame Web Monitor + NoahFrame Web Monitor @@ -44,7 +44,7 @@