r112678 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r112677‎ | r112678 | r112679 >
Date:10:17, 29 February 2012
Author:hashar
Status:ok
Tags:
Comment:
MFT to 1.19wmf1 r112114

ApiSandbox: show request time
Modified paths:
  • /branches/wmf/1.19wmf1/extensions/ApiSandbox (modified) (history)
  • /branches/wmf/1.19wmf1/extensions/ApiSandbox/ApiSandbox.i18n.php (modified) (history)
  • /branches/wmf/1.19wmf1/extensions/ApiSandbox/ApiSandbox.php (modified) (history)
  • /branches/wmf/1.19wmf1/extensions/ApiSandbox/ext.apiSandbox.js (modified) (history)

Diff [purge]

Index: branches/wmf/1.19wmf1/extensions/ApiSandbox/ext.apiSandbox.js
@@ -643,7 +643,11 @@
644644 success: function ( data ) {
645645 var match = data.match( /<pre>[\s\S]*<\/pre>/ );
646646 if ( $.isArray( match ) ) {
 647+ var time = data.match( /<!-- Served .*?in (\d+(\.\d+)?) secs. -->/ );
647648 data = match[0];
 649+ if ( $.isArray( time ) ) {
 650+ data += '\n<br/>' + mw.html.escape( mw.msg( 'apisb-request-time', time[1] ) );
 651+ }
648652 } else {
649653 // some actions don't honor user-specified format
650654 data = '<pre>' + mw.html.escape( data ) + '</pre>';
Index: branches/wmf/1.19wmf1/extensions/ApiSandbox/ApiSandbox.i18n.php
@@ -40,6 +40,7 @@
4141 'apisb-example' => 'Example',
4242 'apisb-examples' => 'Examples',
4343 'apisb-clear' => 'Clear',
 44+ 'apisb-request-time' => 'Request time: $1',
4445 );
4546
4647 /** Message documentation (Message documentation)
@@ -76,6 +77,7 @@
7778 'apisb-example' => 'Button text that will reveal the example list, used if the list contains only 1 entry. See also {{msg-mw|apisb-examples}}',
7879 'apisb-examples' => 'Button text that will reveal the example list, used if the list contains multiple entries. See also {{msg-mw|apisb-example}}',
7980 'apisb-clear' => 'Title of the button that clears all inputs',
 81+ 'apisb-request-time' => 'TIme it took to process this request',
8082 );
8183
8284 /** Afrikaans (Afrikaans)
Index: branches/wmf/1.19wmf1/extensions/ApiSandbox/ApiSandbox.php
@@ -40,6 +40,7 @@
4141 'apisb-examples',
4242 'apisb-clear',
4343 'apisb-submit',
 44+ 'apisb-request-time',
4445 'parentheses',
4546 ),
4647 'dependencies' => array(
Property changes on: branches/wmf/1.19wmf1/extensions/ApiSandbox
___________________________________________________________________
Added: svn:mergeinfo
4748 Merged /branches/new-installer/phase3/extensions/ApiSandbox:r43664-66004
4849 Merged /branches/JSTesting/extensions/ApiSandbox:r100352-107913
4950 Merged /branches/REL1_15/phase3/extensions/ApiSandbox:r51646
5051 Merged /branches/wmf/1.18wmf1/extensions/ApiSandbox:r97508
5152 Merged /branches/REL1_17/phase3/extensions/ApiSandbox:r81445,81448
5253 Merged /trunk/extensions/ApiSandbox:r111043,111199,111218,111484,111575,111604,111659-111661,111668,111670,111688,111690,111698,111713,111715,111780,111796,111814,111947,112074,112114,112153,112160,112166,112260,112282,112360,112517,112571,112613,112628
5354 Merged /branches/sqlite/extensions/ApiSandbox:r58211-58321
5455 Merged /trunk/phase3/extensions/ApiSandbox:r111002,111029,111034,111062,111067,111076,111085,111128,111144,111251

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r112114Show request timemaxsem16:22, 22 February 2012

Status & tagging log