Skip to content

Commit

Permalink
fixed for compile and adjust web monitor
Browse files Browse the repository at this point in the history
  • Loading branch information
tangyu1018 committed Dec 10, 2016
1 parent 0075a17 commit 2b2a537
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 23 deletions.
1 change: 0 additions & 1 deletion NFComm/NFMessageDefine/NFProtocolDefine.hpp
Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion NFServer/NFGameLogicPlugin/NFCGSSwichServerModule.cpp
Expand Up @@ -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());

Expand Down
28 changes: 11 additions & 17 deletions Tool/NF_Web_Monitor/NF_Web_Frame.js
Expand Up @@ -33,7 +33,7 @@ html_ServerLine_temp = "\
<div class='card'>\
<div class='header'>\
<h4 class='title'>{$serverName}</h4>\
<p class='category'>Online Count</p>\
<p class='category'>Online Count [Now {$NowCount}]</p>\
</div>\
<div class='content'>\
<div id='{$serverNameId}' class='ct-chart'></div>\
Expand Down Expand Up @@ -73,7 +73,7 @@ html_ServerInfoTable_temp = "\
</div>\
</div>"
var html_ServerInfoTableTr = "\
<tr id='InfoTableTr'>\
<tr id='InfoTableTr' class='table-tr-extra'>\
<td>{$RowID}</td>\
<td>{$RowKey}</td>\
<td>{$RowValue}</td>\
Expand Down Expand Up @@ -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 = "<div class='row'>" + html_ServerStatus + "</div>" + html_ServerLine;

Expand Down Expand Up @@ -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)
{
Expand All @@ -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);
Expand Down Expand Up @@ -584,7 +578,7 @@ $(document).ready(function(){

$.notify({
icon: 'ti-gift',
message: "Welcome to <b>NoahGameFrame Web Monitor</b>."
message: "Welcome to <b>NoahFrame Web Monitor</b>."

},{
type: 'info',
Expand Down
6 changes: 6 additions & 0 deletions Tool/NF_Web_Monitor/assets/css/paper-dashboard.css
Expand Up @@ -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,
Expand Down
8 changes: 4 additions & 4 deletions Tool/NF_Web_Monitor/index.html
Expand Up @@ -6,7 +6,7 @@
<link rel="icon" type="image/png" sizes="96x96" href="assets/img/favicon.png">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />

<title>NoahGameFrame Web Monitor</title>
<title>NoahFrame Web Monitor</title>

<meta content='width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0' name='viewport' />
<meta name="viewport" content="width=device-width" />
Expand Down Expand Up @@ -44,7 +44,7 @@
<div class="sidebar-wrapper">
<div class="logo">
<a href="index.html" class="simple-text">
Noah Game Frame
Noah Frame
</a>
</div>

Expand Down Expand Up @@ -114,7 +114,7 @@

<li>
<a href="http://www.noahframe.com/">
NoahGameFrame
NoahFrame
</a>
</li>
<li>
Expand All @@ -123,7 +123,7 @@
</a>
</li>
<li>
<a href="https://github.com/ketoo/NoahGameFrame">
<a href="https://github.com/ketoo/NoahFrame">
github
</a>
</li>
Expand Down

0 comments on commit 2b2a537

Please sign in to comment.