Index: branches/wmf/1.19wmf1/extensions/ApiSandbox/ext.apiSandbox.js |
— | — | @@ -643,7 +643,11 @@ |
644 | 644 | success: function ( data ) { |
645 | 645 | var match = data.match( /<pre>[\s\S]*<\/pre>/ ); |
646 | 646 | if ( $.isArray( match ) ) { |
| 647 | + var time = data.match( /<!-- Served .*?in (\d+(\.\d+)?) secs. -->/ ); |
647 | 648 | data = match[0]; |
| 649 | + if ( $.isArray( time ) ) { |
| 650 | + data += '\n<br/>' + mw.html.escape( mw.msg( 'apisb-request-time', time[1] ) ); |
| 651 | + } |
648 | 652 | } else { |
649 | 653 | // some actions don't honor user-specified format |
650 | 654 | data = '<pre>' + mw.html.escape( data ) + '</pre>'; |
Index: branches/wmf/1.19wmf1/extensions/ApiSandbox/ApiSandbox.i18n.php |
— | — | @@ -40,6 +40,7 @@ |
41 | 41 | 'apisb-example' => 'Example', |
42 | 42 | 'apisb-examples' => 'Examples', |
43 | 43 | 'apisb-clear' => 'Clear', |
| 44 | + 'apisb-request-time' => 'Request time: $1', |
44 | 45 | ); |
45 | 46 | |
46 | 47 | /** Message documentation (Message documentation) |
— | — | @@ -76,6 +77,7 @@ |
77 | 78 | 'apisb-example' => 'Button text that will reveal the example list, used if the list contains only 1 entry. See also {{msg-mw|apisb-examples}}', |
78 | 79 | 'apisb-examples' => 'Button text that will reveal the example list, used if the list contains multiple entries. See also {{msg-mw|apisb-example}}', |
79 | 80 | 'apisb-clear' => 'Title of the button that clears all inputs', |
| 81 | + 'apisb-request-time' => 'TIme it took to process this request', |
80 | 82 | ); |
81 | 83 | |
82 | 84 | /** Afrikaans (Afrikaans) |
Index: branches/wmf/1.19wmf1/extensions/ApiSandbox/ApiSandbox.php |
— | — | @@ -40,6 +40,7 @@ |
41 | 41 | 'apisb-examples', |
42 | 42 | 'apisb-clear', |
43 | 43 | 'apisb-submit', |
| 44 | + 'apisb-request-time', |
44 | 45 | 'parentheses', |
45 | 46 | ), |
46 | 47 | 'dependencies' => array( |
Property changes on: branches/wmf/1.19wmf1/extensions/ApiSandbox |
___________________________________________________________________ |
Added: svn:mergeinfo |
47 | 48 | Merged /branches/new-installer/phase3/extensions/ApiSandbox:r43664-66004 |
48 | 49 | Merged /branches/JSTesting/extensions/ApiSandbox:r100352-107913 |
49 | 50 | Merged /branches/REL1_15/phase3/extensions/ApiSandbox:r51646 |
50 | 51 | Merged /branches/wmf/1.18wmf1/extensions/ApiSandbox:r97508 |
51 | 52 | Merged /branches/REL1_17/phase3/extensions/ApiSandbox:r81445,81448 |
52 | 53 | 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 |
53 | 54 | Merged /branches/sqlite/extensions/ApiSandbox:r58211-58321 |
54 | 55 | Merged /trunk/phase3/extensions/ApiSandbox:r111002,111029,111034,111062,111067,111076,111085,111128,111144,111251 |