Commit a3480c78 authored by Kalinka's avatar Kalinka

Command/CronMultiOutCommand.php:

  - update caches on run
Controller/TransactionController.php:
  - show all Transactions
templates/:
  - Fix display stuff
wallet_additions.sql:
  - add cache update procedure
parent f4923b4c
......@@ -44,6 +44,8 @@ class CronMultiOutCommand extends Command
FROM transaction t
WHERE t.type = 0 AND t.subtype = 1 AND t.db_id IN (?) AND attachment_bytes IS NOT NULL';
const updateCaches = 'CALL cache_all();';
protected static $defaultName = 'explorer:cron:multiout';
/** @var Connection $connection*/
......@@ -113,6 +115,13 @@ class CronMultiOutCommand extends Command
$this->debug('=============================');
}
$this->debug('=============================');
$this->debug('Updating Caches:');
$this->debug('=============================');
$this->debug('=============================');
$caches = $this->connection->prepare(self::updateCaches);
$caches->execute();
$this->debug('=============================');
}
/**
......
......@@ -117,6 +117,7 @@ class BlockController extends AbstractController
*/
public function blockDetails($block_id) {
$con = $this->entityManager->getConnection();
// TODO: Fix TX Count!!
$stmt = $con->prepare(self::BlockDetails);
$stmt->bindValue(1, $block_id);
$stmt->execute();
......
This diff is collapsed.
......@@ -37,8 +37,8 @@
<div class="col-md-3"></div>
</div>
<div class="row">
<div class="col-md-2"></div>
<div class="col-md-8">
<div class="col-md-1"></div>
<div class="col-md-10">
<ul class="nav nav-tabs" id="accountTab" role="tablist">
<li class="nav-item">
<a class="nav-link active" id="tx-tab" data-toggle="tab" href="#tx" role="tab" aria-controls="tx" aria-selected="true">Transactions ({{ (account.count_sent + account.tx_count + account.mo_count + account.mos_count) }})</a>
......@@ -54,6 +54,6 @@
<div class="tab-pane fade" id="asset" role="tabpanel" aria-labelledby="asset-tab">Asset, to be done</div>
</div>
</div>
<div class="col-md-2"></div>
<div class="col-md-1"></div>
</div>
{% endblock %}
\ No newline at end of file
......@@ -56,24 +56,24 @@
<tr>
<td><a href="#">{{ transaction.id }}</a></td>
<td>{{ transaction.transaction_type }}</td>
<td>
<td style="text-align: center">
<a href="{{ path('account_details', {id: transaction.sender_id | toAccountId }) }}">
{{ transaction.sender_id | toRSAddress }}<br />{{ transaction.sender_name }}
</a>
</td>
<td>
<td style="text-align: center">
{% if transaction.recipient_id is not null %}
<a href="{{ path('account_details', {id: transaction.recipient_id | toAccountId }) }}">
{{ transaction.recipient_id | toRSAddress }}<br />{{ transaction.recipient_name }}
</a>
{% else%}
{% else %}
Multiple Recipients, <a href="#">Details</a>
{% endif %}
</td>
<td>{{ transaction.amount }}</td>
<td>{{ transaction.fee }}</td>
{% if route != "transactions_by_height" and route != "transactions_by_blockId" %}
<td><a href="{{ url('block_details', {'block_id': transaction.block_id}) }}">{{ transaction.height }}</a></td>
<td><a href="{{ url('block_details', {'block_id': transaction.block_id}) }}">#{{ transaction.height }}</a></td>
{% endif %}
<td>{{ transaction.unixtime | date ("Y-m-d H:i:s", "Europe/Berlin") }}</td>
</tr>
......
......@@ -68,6 +68,15 @@ DELIMITER ;
DELIMITER $$
CREATE PROCEDURE cache_all()
BEGIN
DROP TABLE IF EXISTS `ec_account`;
CREATE TABLE `ec_account` ( `id` BIGINT(20) NOT NULL , `name` VARCHAR(100) NOT NULL, INDEX `idx` (`id`)) ENGINE = MEMORY;
INSERT INTO ec_account (id, name) SELECT id,name FROM `account` WHERE latest = 1 AND name IS NOT NULL;
END$$
DELIMITER ;
DELIMITER $$
CREATE FUNCTION getTransactionType(type tinyint(4), subtype tinyint(4))
RETURNS char(100) DETERMINISTIC
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment