diff options
-rw-r--r-- | indra/newview/llfloatertopobjects.cpp | 64 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/floater_top_objects.xml | 28 |
2 files changed, 53 insertions, 39 deletions
diff --git a/indra/newview/llfloatertopobjects.cpp b/indra/newview/llfloatertopobjects.cpp index 87d048c15b..08997d58cb 100644 --- a/indra/newview/llfloatertopobjects.cpp +++ b/indra/newview/llfloatertopobjects.cpp @@ -168,9 +168,11 @@ void LLFloaterTopObjects::handleReply(LLMessageSystem *msg, void** data) F32 score; std::string name_buf; std::string owner_buf; + std::string parcel_buf("unknown"); F32 mono_score = 0.f; bool have_extended_data = false; S32 public_urls = 0; + F32 script_memory = 0.f; msg->getU32Fast(_PREHASH_ReportData, _PREHASH_TaskLocalID, task_local_id, block); msg->getUUIDFast(_PREHASH_ReportData, _PREHASH_TaskID, task_id, block); @@ -180,12 +182,18 @@ void LLFloaterTopObjects::handleReply(LLMessageSystem *msg, void** data) msg->getF32Fast(_PREHASH_ReportData, _PREHASH_Score, score, block); msg->getStringFast(_PREHASH_ReportData, _PREHASH_TaskName, name_buf, block); msg->getStringFast(_PREHASH_ReportData, _PREHASH_OwnerName, owner_buf, block); + if(msg->has("DataExtended")) { have_extended_data = true; msg->getU32("DataExtended", "TimeStamp", time_stamp, block); msg->getF32("DataExtended", "MonoScore", mono_score, block); msg->getS32("DataExtended", "PublicURLs", public_urls, block); + if (msg->getSize("DataExtended", "ParcelName") > 0) + { + msg->getString("DataExtended", "ParcelName", parcel_buf, block); + msg->getF32("DataExtended", "Size", script_memory, block); + } } LLSD element; @@ -193,13 +201,14 @@ void LLFloaterTopObjects::handleReply(LLMessageSystem *msg, void** data) element["id"] = task_id; LLSD columns; - columns[0]["column"] = "score"; - columns[0]["value"] = llformat("%0.3f", score); - columns[0]["font"] = "SANSSERIF"; + S32 column_num = 0; + columns[column_num]["column"] = "score"; + columns[column_num]["value"] = llformat("%0.3f", score); + columns[column_num++]["font"] = "SANSSERIF"; - columns[1]["column"] = "name"; - columns[1]["value"] = name_buf; - columns[1]["font"] = "SANSSERIF"; + columns[column_num]["column"] = "name"; + columns[column_num]["value"] = name_buf; + columns[column_num++]["font"] = "SANSSERIF"; // Owner names can have trailing spaces sent from server LLStringUtil::trim(owner_buf); @@ -215,28 +224,33 @@ void LLFloaterTopObjects::handleReply(LLMessageSystem *msg, void** data) // ...just strip out legacy "Resident" name owner_buf = LLCacheName::cleanFullName(owner_buf); } - columns[2]["column"] = "owner"; - columns[2]["value"] = owner_buf; - columns[2]["font"] = "SANSSERIF"; - - columns[3]["column"] = "location"; - columns[3]["value"] = llformat("<%0.1f,%0.1f,%0.1f>", location_x, location_y, location_z); - columns[3]["font"] = "SANSSERIF"; - columns[4]["column"] = "time"; - columns[4]["type"] = "date"; - columns[4]["value"] = LLDate((time_t)time_stamp); - columns[4]["font"] = "SANSSERIF"; + columns[column_num]["column"] = "owner"; + columns[column_num]["value"] = owner_buf; + columns[column_num++]["font"] = "SANSSERIF"; + + columns[column_num]["column"] = "location"; + columns[column_num]["value"] = llformat("<%0.1f,%0.1f,%0.1f>", location_x, location_y, location_z); + columns[column_num++]["font"] = "SANSSERIF"; + + columns[column_num]["column"] = "parcel"; + columns[column_num]["value"] = parcel_buf; + columns[column_num++]["font"] = "SANSSERIF"; + + columns[column_num]["column"] = "time"; + columns[column_num]["type"] = "date"; + columns[column_num]["value"] = LLDate((time_t)time_stamp); + columns[column_num++]["font"] = "SANSSERIF"; if (mCurrentMode == STAT_REPORT_TOP_SCRIPTS && have_extended_data) { - columns[5]["column"] = "mono_time"; - columns[5]["value"] = llformat("%0.3f", mono_score); - columns[5]["font"] = "SANSSERIF"; + columns[column_num]["column"] = "memory"; + columns[column_num]["value"] = llformat("%0.0f", (script_memory / 1000.f)); + columns[column_num++]["font"] = "SANSSERIF"; - columns[6]["column"] = "URLs"; - columns[6]["value"] = llformat("%d", public_urls); - columns[6]["font"] = "SANSSERIF"; + columns[column_num]["column"] = "URLs"; + columns[column_num]["value"] = llformat("%d", public_urls); + columns[column_num++]["font"] = "SANSSERIF"; } element["columns"] = columns; list->addElement(element); @@ -260,7 +274,6 @@ void LLFloaterTopObjects::handleReply(LLMessageSystem *msg, void** data) { setTitle(getString("top_scripts_title")); list->setColumnLabel("score", getString("scripts_score_label")); - list->setColumnLabel("mono_time", getString("scripts_mono_time_label")); LLUIString format = getString("top_scripts_text"); format.setArg("[COUNT]", llformat("%d", total_count)); @@ -271,7 +284,8 @@ void LLFloaterTopObjects::handleReply(LLMessageSystem *msg, void** data) { setTitle(getString("top_colliders_title")); list->setColumnLabel("score", getString("colliders_score_label")); - list->setColumnLabel("mono_time", ""); + list->setColumnLabel("URLs", ""); + list->setColumnLabel("memory", ""); LLUIString format = getString("top_colliders_text"); format.setArg("[COUNT]", llformat("%d", total_count)); getChild<LLUICtrl>("title_text")->setValue(LLSD(format)); diff --git a/indra/newview/skins/default/xui/en/floater_top_objects.xml b/indra/newview/skins/default/xui/en/floater_top_objects.xml index 4dfdcd15c7..1e4224d3f2 100644 --- a/indra/newview/skins/default/xui/en/floater_top_objects.xml +++ b/indra/newview/skins/default/xui/en/floater_top_objects.xml @@ -23,10 +23,6 @@ Time </floater.string> <floater.string - name="scripts_mono_time_label"> - Mono Time - </floater.string> - <floater.string name="top_colliders_title"> Top Colliders </floater.string> @@ -68,31 +64,35 @@ <scroll_list.columns label="Score" name="score" - width="55" /> + width="45" /> <scroll_list.columns label="Name" name="name" - width="140" /> + width="130" /> <scroll_list.columns label="Owner" name="owner" - width="105" /> + width="100" /> <scroll_list.columns label="Location" name="location" - width="130" /> + width="120" /> + <scroll_list.columns + label="Parcel" + name="parcel" + width="120" /> <scroll_list.columns label="Time" name="time" - width="150" /> - <scroll_list.columns - label="Mono Time" - name="mono_time" - width="100" /> + width="130" /> <scroll_list.columns label="URLs" name="URLs" - width="100" /> + width="40" /> + <scroll_list.columns + label="Memory (KB)" + name="memory" + width="40" /> <scroll_list.commit_callback function="TopObjects.CommitObjectsList" /> </scroll_list> |