Skip to content

Commit

Permalink
Merge pull request #17525 from MauricioFauth/tables-style
Browse files Browse the repository at this point in the history
Fix tables spacing and colors
  • Loading branch information
MauricioFauth committed May 14, 2022
2 parents 2e4c69d + dc55543 commit af50673
Show file tree
Hide file tree
Showing 61 changed files with 164 additions and 149 deletions.
4 changes: 2 additions & 2 deletions js/src/server/status/monitor.js
Original file line number Diff line number Diff line change
Expand Up @@ -1934,7 +1934,7 @@ AJAX.registerOnload('server/status/monitor.js', function () {
function buildLogTable (data, groupInserts) {
var rows = data.rows;
var cols = [];
var $table = $('<table class="table table-light table-striped table-hover align-middle sortable"></table>');
var $table = $('<table class="table table-striped table-hover align-middle sortable"></table>');
var $tBody;
var $tRow;
var $tCell;
Expand Down Expand Up @@ -2132,7 +2132,7 @@ AJAX.registerOnload('server/status/monitor.js', function () {

if (data.profiling) {
var chartData = [];
var numberTable = '<table class="table table-sm table-light table-striped table-hover w-auto queryNums"><thead><tr><th>' + Messages.strStatus + '</th><th>' + Messages.strTime + '</th></tr></thead><tbody>';
var numberTable = '<table class="table table-sm table-striped table-hover w-auto queryNums"><thead><tr><th>' + Messages.strStatus + '</th><th>' + Messages.strTime + '</th></tr></thead><tbody>';
var duration;
var otherTime = 0;

Expand Down
2 changes: 1 addition & 1 deletion libraries/classes/BrowseForeigners.php
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ public function getHtmlForRelationalFieldSelection(
. '</fieldset>'
. '</form>';

$output .= '<table class="table table-light table-striped table-hover" id="browse_foreign_table">';
$output .= '<table class="table table-striped table-hover" id="browse_foreign_table">';

if (! is_array($foreignData['disp_row'])) {
return $output . '</tbody>'
Expand Down
2 changes: 1 addition & 1 deletion libraries/classes/Database/Routines.php
Original file line number Diff line number Diff line change
Expand Up @@ -1190,7 +1190,7 @@ private function handleExecuteRoutine(): void
$result = $this->dbi->storeResult();

if ($result !== false && $result->numRows() > 0) {
$output .= '<table class="table table-light table-striped w-auto"><tr>';
$output .= '<table class="table table-striped w-auto"><tr>';
foreach ($result->getFieldNames() as $field) {
$output .= '<th>';
$output .= htmlspecialchars($field);
Expand Down
2 changes: 1 addition & 1 deletion libraries/classes/Display/Results.php
Original file line number Diff line number Diff line change
Expand Up @@ -1290,7 +1290,7 @@ private function getFieldVisibilityParams(
$displayParams = $this->properties['display_params'];

// 1. Displays the full/partial text button (part 1)...
$buttonHtml = '<thead class="table-light"><tr>' . "\n";
$buttonHtml = '<thead><tr>' . "\n";

$emptyPreCondition = $displayParts['edit_lnk'] != self::NO_EDIT_OR_DELETE
&& $displayParts['del_lnk'] != self::NO_EDIT_OR_DELETE;
Expand Down
6 changes: 3 additions & 3 deletions libraries/classes/Engines/Innodb.php
Original file line number Diff line number Diff line change
Expand Up @@ -130,11 +130,11 @@ public function getPageBufferpool()
/** @var string[] $bytes */
$bytes = Util::formatByteDown($status['Innodb_buffer_pool_pages_total'] * $status['Innodb_page_size']);

$output = '<table class="table table-light table-striped table-hover w-auto float-start caption-top">' . "\n"
$output = '<table class="table table-striped table-hover w-auto float-start caption-top">' . "\n"
. ' <caption>' . "\n"
. ' ' . __('Buffer Pool Usage') . "\n"
. ' </caption>' . "\n"
. ' <tfoot class="table-light">' . "\n"
. ' <tfoot>' . "\n"
. ' <tr>' . "\n"
. ' <th colspan="2">' . "\n"
. ' ' . __('Total:') . ' '
Expand Down Expand Up @@ -189,7 +189,7 @@ public function getPageBufferpool()

$output .= ' </tbody>' . "\n"
. '</table>' . "\n\n"
. '<table class="table table-light table-striped table-hover w-auto ms-4 float-start caption-top">' . "\n"
. '<table class="table table-striped table-hover w-auto ms-4 float-start caption-top">' . "\n"
. ' <caption>' . "\n"
. ' ' . __('Buffer Pool Activity') . "\n"
. ' </caption>' . "\n"
Expand Down
2 changes: 1 addition & 1 deletion libraries/classes/StorageEngine.php
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,7 @@ public function getHtmlVariables()
. "\n"
. '</p>' . "\n";
} else {
$ret = '<table class="table table-light table-striped table-hover w-auto">'
$ret = '<table class="table table-striped table-hover w-auto">'
. "\n" . $ret . '</table>' . "\n";
}

Expand Down
2 changes: 1 addition & 1 deletion templates/columns_definitions/partitions.twig
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@
{% endif %}
</table>
{% if partition_details['partition_count'] > 1 %}
<table class="table table-light align-middle" id="partition_definition_table">
<table class="table align-middle" id="partition_definition_table">
<thead><tr>
<th>{% trans 'Partition' %}</th>
{% if partition_details['value_enabled'] %}
Expand Down
8 changes: 4 additions & 4 deletions templates/database/central_columns/main.twig
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
{{ get_hidden_inputs(db) }}
<input type="hidden" name="add_new_column" value="add_new_column">
<div class="table-responsive">
<table class="table table-light w-auto">
<thead class="table-light">
<table class="table w-auto">
<thead>
<tr>
<th></th>
<th class="" title="" data-column="name">
Expand Down Expand Up @@ -208,10 +208,10 @@
</form>
<div id="tableslistcontainer">
<form name="tableslistcontainer">
<table id="table_columns" class="table table-light table-striped table-hover tablesorter w-auto">
<table id="table_columns" class="table table-striped table-hover tablesorter w-auto">
{% set class = 'column_heading' %}
{% set title = 'Click to sort.' | trans %}
<thead class="table-light">
<thead>
<tr>
<th class="{{ class }}"></th>
<th class="hide"></th>
Expand Down
4 changes: 2 additions & 2 deletions templates/database/events/index.twig
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@
{% trans 'There are no events to display.' %}
</div>

<table id="eventsTable" class="table table-light table-striped table-hover{{ items is empty ? ' hide' }} w-auto data">
<thead class="table-light">
<table id="eventsTable" class="table table-striped table-hover{{ items is empty ? ' hide' }} w-auto data">
<thead>
<tr>
<th></th>
<th>{% trans 'Name' %}</th>
Expand Down
4 changes: 2 additions & 2 deletions templates/database/privileges/index.twig
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
</legend>

<div class="table-responsive jsresponsive">
<table class="table table-light table-striped table-hover w-auto">
<thead class="table-light">
<table class="table table-striped table-hover w-auto">
<thead>
<tr>
<th></th>
<th scope="col">{% trans 'User name' %}</th>
Expand Down
4 changes: 2 additions & 2 deletions templates/database/routines/index.twig
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@
{% trans 'There are no routines to display.' %}
</div>

<table id="routinesTable" class="table table-light table-striped table-hover{{ items is empty ? ' hide' }} data w-auto">
<thead class="table-light">
<table id="routinesTable" class="table table-striped table-hover{{ items is empty ? ' hide' }} data w-auto">
<thead>
<tr>
<th></th>
<th>{% trans 'Name' %}</th>
Expand Down
2 changes: 1 addition & 1 deletion templates/database/structure/body_for_table_summary.twig
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<tfoot id="tbl_summary_row" class="table-light">
<tfoot id="tbl_summary_row">
<tr>
<th class="d-print-none"></th>
<th class="tbl_num text-nowrap">
Expand Down
4 changes: 2 additions & 2 deletions templates/database/structure/show_create.twig
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
{% if tables.tables is not empty %}
<fieldset class="pma-fieldset">
<legend>{% trans 'Tables' %}</legend>
<table class="table table-light table-striped show_create">
<table class="table table-striped show_create">
<thead>
<tr>
<th>{% trans 'Table' %}</th>
Expand All @@ -26,7 +26,7 @@
{% if tables.views is not empty %}
<fieldset class="pma-fieldset">
<legend>{% trans 'Views' %}</legend>
<table class="table table-light table-striped show_create">
<table class="table table-striped show_create">
<thead>
<tr>
<th>{% trans 'View' %}</th>
Expand Down
4 changes: 2 additions & 2 deletions templates/database/structure/table_header.twig
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<form method="post" action="{{ url('/database/structure') }}" name="tablesForm" id="tablesForm">
{{ get_hidden_inputs(db) }}
<div class="table-responsive">
<table class="table table-light table-striped table-hover table-sm w-auto data">
<thead class="table-light">
<table class="table table-striped table-hover table-sm w-auto data">
<thead>
<tr>
<th class="d-print-none"></th>
<th>{{ sortable_table_header('Table'|trans, 'table') }}</th>
Expand Down
8 changes: 4 additions & 4 deletions templates/database/tracking/tables.twig
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
<form method="post" action="{{ url('/database/tracking') }}" name="trackedForm"
id="trackedForm" class="ajax">
{{ get_hidden_inputs(db) }}
<table id="versions" class="table table-light table-striped table-hover w-auto">
<thead class="table-light">
<table id="versions" class="table table-striped table-hover w-auto">
<thead>
<tr>
<th></th>
<th>{% trans 'Table' %}</th>
Expand Down Expand Up @@ -146,8 +146,8 @@
<form method="post" action="{{ url('/database/tracking') }}" name="untrackedForm"
id="untrackedForm" class="ajax">
{{ get_hidden_inputs(db) }}
<table id="noversions" class="table table-light table-striped table-hover w-auto">
<thead class="table-light">
<table id="noversions" class="table table-striped table-hover w-auto">
<thead>
<tr>
<th></th>
<th>{% trans 'Table' %}</th>
Expand Down
4 changes: 2 additions & 2 deletions templates/database/triggers/list.twig
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@
{% trans 'There are no triggers to display.' %}
</div>

<table id="triggersTable" class="table table-light table-striped table-hover{{ items is empty ? ' hide' }} w-auto data">
<thead class="table-light">
<table id="triggersTable" class="table table-striped table-hover{{ items is empty ? ' hide' }} w-auto data">
<thead>
<tr>
<th></th>
<th>{% trans 'Name' %}</th>
Expand Down
2 changes: 1 addition & 1 deletion templates/display/results/table.twig
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@
{% endif %}

<div class="table-responsive-md">
<table class="table table-light table-striped table-hover table-sm table_results data ajax w-auto" data-uniqueId="{{ unique_id }}">
<table class="table table-striped table-hover table-sm table_results data ajax w-auto" data-uniqueId="{{ unique_id }}">

{{ headers.button|raw }}
{{ headers.table_headers_for_columns|raw }}
Expand Down
4 changes: 2 additions & 2 deletions templates/indexes.twig
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@

{{ include('modals/preview_sql_confirmation.twig') }}
<div class="table-responsive jsresponsive">
<table class="table table-light table-striped table-hover table-sm w-auto align-middle" id="table_index">
<thead class="table-light">
<table class="table table-striped table-hover table-sm w-auto align-middle" id="table_index">
<thead>
<tr>
<th colspan="3" class="d-print-none">{% trans 'Action' %}</th>
<th>{% trans 'Keyname' %}</th>
Expand Down
2 changes: 1 addition & 1 deletion templates/relation/check_relations.twig
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
{% endapply %}
{% endif %}

<table class="table table-light table-striped">
<table class="table table-striped">
<tr>
<th class="text-start" scope="row">
<code>$cfg['Servers'][$i]['pmadb']</code>
Expand Down
2 changes: 1 addition & 1 deletion templates/server/binlog/index.twig
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@

{{ sql_message|raw }}

<table class="table table-light table-striped table-hover align-middle" id="binlogTable">
<table class="table table-striped table-hover align-middle" id="binlogTable">
<thead>
<tr>
<td colspan="6" class="text-center">
Expand Down
4 changes: 2 additions & 2 deletions templates/server/databases/index.twig
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@
{{ get_hidden_inputs(url_params) }}
<div class="table-responsive">
<table class="table table-striped table-hover w-auto">
<thead class="table-light">
<thead>
<tr>
{% if is_drop_allowed %}
<th></th>
Expand Down Expand Up @@ -247,7 +247,7 @@
{% endfor %}
</tbody>

<tfoot class="table-light">
<tfoot>
<tr>
<th colspan="{{ is_drop_allowed ? '3' : '2' }}">
{% trans 'Total:' %}
Expand Down
4 changes: 2 additions & 2 deletions templates/server/engines/index.twig
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
</div>

<div class="table-responsive">
<table class="table table-light table-striped table-hover w-auto">
<thead class="table-light">
<table class="table table-striped table-hover w-auto">
<thead>
<tr>
<th scope="col">{% trans 'Storage Engine' %}</th>
<th scope="col">{% trans 'Description' %}</th>
Expand Down
4 changes: 2 additions & 2 deletions templates/server/plugins/index.twig
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@
{% for type, list in plugins %}
<div class="row">
<div class="table-responsive col-12">
<table class="table table-light table-striped table-hover caption-top w-auto" id="plugins-{{ clean_types[type] }}">
<table class="table table-striped table-hover caption-top w-auto" id="plugins-{{ clean_types[type] }}">
<caption>
{{ type }}
</caption>
<thead class="table-light">
<thead>
<tr>
<th scope="col">{% trans 'Plugin' %}</th>
<th scope="col">{% trans 'Description' %}</th>
Expand Down
4 changes: 2 additions & 2 deletions templates/server/privileges/privileges_summary.twig
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
{{ legend }}
</legend>

<table class="table table-light table-striped table-hover w-auto">
<thead class="table-light">
<table class="table table-striped table-hover w-auto">
<thead>
<tr>
<th scope="col">{{ type_label }}</th>
<th scope="col">{% trans 'Privileges' %}</th>
Expand Down
4 changes: 2 additions & 2 deletions templates/server/privileges/users_overview.twig
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<form name="usersForm" id="usersForm" action="{{ url('/server/privileges') }}" method="post">
{{ get_hidden_inputs() }}
<div class="table-responsive">
<table id="userRightsTable" class="table table-light table-striped table-hover w-auto">
<thead class="table-light">
<table id="userRightsTable" class="table table-striped table-hover w-auto">
<thead>
<tr>
<th></th>
<th scope="col">{% trans 'User name' %}</th>
Expand Down
4 changes: 2 additions & 2 deletions templates/server/status/processes/list.twig
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<div class="responsivetable row">
<table id="tableprocesslist" class="table table-light table-striped table-hover sortable w-auto">
<thead class="table-light">
<table id="tableprocesslist" class="table table-striped table-hover sortable w-auto">
<thead>
<tr>
<th>{% trans 'Processes' %}</th>
{% for column in columns %}
Expand Down
4 changes: 2 additions & 2 deletions templates/server/status/queries/index.twig
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,13 @@
</div>

<div class="row">
<table id="serverStatusQueriesDetails" class="table table-light table-striped table-hover sortable col-md-4 col-12 w-auto">
<table id="serverStatusQueriesDetails" class="table table-striped table-hover sortable col-md-4 col-12 w-auto">
<colgroup>
<col class="namecol">
<col class="valuecol" span="3">
</colgroup>

<thead class="table-light">
<thead>
<tr>
<th scope="col">{% trans 'Statements' %}</th>
<th class="text-end" scope="col">{% trans %}#{% notes %}# = Amount of queries{% endtrans %}</th>
Expand Down
8 changes: 4 additions & 4 deletions templates/server/status/status/index.twig
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
<div class="row"><p>{{ 'This MySQL server has been running for %1$s. It started up on %2$s.'|trans|format(uptime, start_time) }}</p></div>

<div class="row align-items-start">
<table class="table table-light table-striped table-hover col-12 col-md-5 w-auto">
<thead class="table-light">
<table class="table table-striped table-hover col-12 col-md-5 w-auto">
<thead>
<tr>
<th scope="col">
{% trans 'Traffic' %}
Expand All @@ -30,8 +30,8 @@
</tbody>
</table>

<table class="table table-light table-striped table-hover col-12 col-md-6 w-auto">
<thead class="table-light">
<table class="table table-striped table-hover col-12 col-md-6 w-auto">
<thead>
<tr>
<th scope="col">{% trans 'Connections' %}</th>
<th class="text-end" scope="col">#</th>
Expand Down
4 changes: 2 additions & 2 deletions templates/server/status/variables/index.twig
Original file line number Diff line number Diff line change
Expand Up @@ -64,13 +64,13 @@
</div>

<div class="responsivetable row">
<table class="table table-light table-striped table-hover table-sm" id="serverStatusVariables">
<table class="table table-striped table-hover table-sm" id="serverStatusVariables">
<colgroup>
<col class="namecol">
<col class="valuecol">
<col class="descrcol">
</colgroup>
<thead class="table-light">
<thead>
<tr>
<th scope="col">{% trans 'Variable' %}</th>
<th scope="col">{% trans 'Value' %}</th>
Expand Down
4 changes: 2 additions & 2 deletions templates/server/user_groups/user_groups.twig
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
{% if has_rows %}
<form name="userGroupsForm" id="userGroupsForm" action="{{ action|raw }}" method="post">
{{ hidden_inputs|raw }}
<table class="table table-light table-striped table-hover">
<thead class="table-light">
<table class="table table-striped table-hover">
<thead>
<tr class="text-nowrap">
<th scope="col">
{% trans 'User groups' %}
Expand Down
4 changes: 2 additions & 2 deletions templates/server/variables/index.twig
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
} only %}

<div class="table-responsive">
<table id="serverVariables" class="table table-light table-striped table-hover table-sm">
<thead class="table-light">
<table id="serverVariables" class="table table-striped table-hover table-sm">
<thead>
<tr>
<th scope="col">{% trans 'Action' %}</th>
<th scope="col">{% trans 'Variable' %}</th>
Expand Down
Loading

0 comments on commit af50673

Please sign in to comment.