diff --git a/CHANGELOG.md b/CHANGELOG.md index 860aac1c78..161d05de49 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ All notable changes to this project will be documented in this file. This projec + [#128](https://github.com/luyadev/luya-module-admin/issues/128) A new indicator display the amount of time left until the user is logged out automatically. Also every keystroke inside any text field will reset the logout timer to null. No more timeouts while working! + [#126](https://github.com/luyadev/luya-module-admin/issues/126) Provide option to eager load api model relations. + [#20](https://github.com/luyadev/luya-module-admin/issues/20) New option `--sync-requests-count` for proxy command. ++ [#144](https://github.com/luyadev/luya-module-admin/pull/144) Proxy command ask for large table sync. ### Fixed diff --git a/src/proxy/ClientTable.php b/src/proxy/ClientTable.php index c2acd2e2fc..aac8e95b80 100644 --- a/src/proxy/ClientTable.php +++ b/src/proxy/ClientTable.php @@ -20,6 +20,8 @@ */ class ClientTable extends BaseObject { + const LARGE_TABLE_PROMPT = 10000; + private $_data; /** @@ -120,6 +122,12 @@ public function getContentRowCount() */ public function syncData() { + if (Yii::$app->controller->interactive && $this->getRows() > self::LARGE_TABLE_PROMPT) { + if (Console::confirm("{$this->getName()} has {$this->getRows()} entries. Do you want continue table sync?", true) === false) { + return; + } + } + $sqlMode = $this->prepare(); try {