| @@ -315,10 +315,11 @@ | ||
| 315 | 315 | /** |
| 316 | 316 | * Render logs db large size notice. |
| 317 | 317 | * |
| 318 | 318 | * @param int $limit DB size limit in MByte, default 300 MB. |
| 319 | + * @param string $which The page slug where the notice is displayed. | |
| 319 | 320 | */ |
| 320 | - public function render_logs_db_notice( $limit = 300 ) { | |
| 321 | + public function render_logs_db_notice( $limit = 300, $which = '' ) { | |
| 321 | 322 | if ( empty( $limit ) ) { |
| 322 | 323 | $limit = 300; // MB. |
| 323 | 324 | } |
| 324 | 325 | if ( MainWP_Utility::show_mainwp_message( 'notice', 'logs-db-size-large' ) ) { |
| @@ -324,13 +325,13 @@ | ||
| 324 | 325 | if ( MainWP_Utility::show_mainwp_message( 'notice', 'logs-db-size-large' ) ) { |
| 325 | 326 | $size = Log_DB_Helper::instance()->get_db_size(); |
| 326 | 327 | if ( $size >= $limit ) { |
| 327 | 328 | ?> |
| 328 | - <div class="ui yellow message"> | |
| 329 | + <div class="ui yellow message" <?php echo 'overview' === $which || 'client_overview' === $which ? 'style="margin: 1em;"' : ''; ?>> | |
| 329 | 330 | <i class="close icon mainwp-notice-dismiss" notice-id="logs-db-size-large"></i> |
| 330 | 331 | <?php |
| 331 | 332 | /* translators: 1: Database size in MB, 2: Opening anchor tag, 3: Closing anchor tag */ |
| 332 | - printf( esc_html__( 'Your Network Activity logs are using a lot of database space (%1$s MB). Go to %2$sMainWP > Settings > Network Activity Settings%3$s and enable Automatically archive logs, then set a Data retention period to keep the table size under control.', 'mainwp' ), esc_html( $size ), '<a href="admin.php?page=MainWPTools#mainwp-clear-archived-sites-changes-data">', '</a>' ); // NOSONAR - noopener - open safe. | |
| 333 | + printf( esc_html__( 'Your Network Activity logs are using a lot of database space (%1$s MB). Go to %2$sMainWP > Settings > Network Activity Settings%3$s and enable Automatically archive logs, then set a Data retention period to keep the table size under control.', 'mainwp' ), esc_html( $size ), '<a href="admin.php?page=SettingsInsights#field-log-enable-auto-archive">', '</a>' ); // NOSONAR - noopener - open safe. | |
| 333 | 334 | ?> |
| 334 | 335 | </div> |
| 335 | 336 | <?php |
| 336 | 337 | } |