File tree Expand file tree Collapse file tree 4 files changed +32
-7
lines changed
plugins/wpgraphql-logging Expand file tree Collapse file tree 4 files changed +32
-7
lines changed Original file line number Diff line number Diff line change 1- .settings_page_wpgraphql -logging # poststuff .postbox .inside h2 {
2- font-size : 1.3 em ;
1+ .graphql-logs_page_wpgraphql -logging # poststuff .postbox .inside h2 {
2+ font-size : 16.9 px ;
33 font-weight : 600 ;
44 padding-left : 0 ;
55}
Original file line number Diff line number Diff line change 1+ .wpgraphql-logging-view-header {
2+ display : flex;
3+ justify-content : space-between;
4+ align-items : center;
5+ margin-bottom : 20px ;
6+ }
7+
8+ .wpgraphql-logging-view-table pre .wpgraphql-logging-query ,
9+ .wpgraphql-logging-view-table pre .wpgraphql-logging-context ,
10+ .wpgraphql-logging-view-table pre .wpgraphql-logging-extra {
11+ white-space : pre-wrap;
12+ max-height : 540px ;
13+ overflow-y : scroll;
14+ padding : 15px ;
15+ border : 1px solid # ddd ;
16+ border-radius : 4px ;
17+ }
Original file line number Diff line number Diff line change 1313 */
1414?>
1515<div class="wrap">
16- <div style="display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; ">
16+ <div class="wpgraphql-logging-view-header ">
1717 <h1><?php esc_html_e ( 'Log Entry ' , 'wpgraphql-logging ' ); ?> </h1>
1818 <a href="
1919 <?php
3333 </a>
3434 </div>
3535
36- <table class="widefat striped">
36+ <table class="widefat striped wpgraphql-logging-view-table ">
3737 <tbody>
3838 <tr>
3939 <th><?php esc_html_e ( 'ID ' , 'wpgraphql-logging ' ); ?> </th>
6161 </tr>
6262 <tr>
6363 <th><?php esc_html_e ( 'Query ' , 'wpgraphql-logging ' ); ?> </th>
64- <td><pre style="overflow-x: auto; background: #f4f4f4; padding: 15px; border: 1px solid #ddd; border-radius: 4px; "><?php echo esc_html ( (string ) $ log ->get_query () ); ?> </pre></td>
64+ <td><pre class="wpgraphql-logging-query "><?php echo esc_html ( (string ) $ log ->get_query () ); ?> </pre></td>
6565 </tr>
6666 <tr>
6767 <th><?php esc_html_e ( 'Context ' , 'wpgraphql-logging ' ); ?> </th>
68- <td><pre><?php echo esc_html ( (string ) wp_json_encode ( $ log ->get_context (), JSON_PRETTY_PRINT ) ); ?> </pre></td>
68+ <td><pre class="wpgraphql-logging-context" ><?php echo esc_html ( (string ) wp_json_encode ( $ log ->get_context (), JSON_PRETTY_PRINT ) ); ?> </pre></td>
6969 </tr>
7070 <tr>
7171 <th><?php esc_html_e ( 'Extra ' , 'wpgraphql-logging ' ); ?> </th>
72- <td><pre><?php echo esc_html ( (string ) wp_json_encode ( $ log ->get_extra (), JSON_PRETTY_PRINT ) ); ?> </pre></td>
72+ <td><pre class="wpgraphql-logging-extra" ><?php echo esc_html ( (string ) wp_json_encode ( $ log ->get_extra (), JSON_PRETTY_PRINT ) ); ?> </pre></td>
7373 </tr>
7474 </tbody>
7575 </table>
Original file line number Diff line number Diff line change @@ -161,6 +161,14 @@ public function enqueue_admin_scripts_styles( string $hook_suffix ): void {
161161 );
162162 }
163163
164+ if ( file_exists ( trailingslashit ( WPGRAPHQL_LOGGING_PLUGIN_DIR ) . 'assets/css/view/wp-graphql-logging-view.css ' ) ) {
165+ wp_enqueue_style (
166+ 'wpgraphql-graphql-logging-view ' ,
167+ trailingslashit ( WPGRAPHQL_LOGGING_PLUGIN_URL ) . 'assets/css/view/wp-graphql-logging-view.css ' ,
168+ [],
169+ WPGRAPHQL_LOGGING_VERSION
170+ );
171+ }
164172
165173 // Allow other plugins to enqueue their own scripts/styles.
166174 do_action ( 'wpgraphql_logging_view_logs_admin_enqueue_scripts ' , $ hook_suffix );
You can’t perform that action at this time.
0 commit comments