Commit 684adb13 by san58

правка списка результирующих доменов

1 parent ab1f4534
......@@ -10,6 +10,7 @@ use yii\db\Expression;
use yii\helpers\Console;
use app\components\Collection;
use app\models\Host;
use app\models\Filter;
/**
* Парсинг запрещенных ресурсов в РФ.
......@@ -45,6 +46,7 @@ class WhoisController extends Controller
->select('id, domain')
->from('{{%host}}')
->where(['in', 'wis_status', [Host::STATUS_WIS_NONE, Host::STATUS_WIS_BUSY]])
->andWhere(['status'=> Filter::STATUS_ON])
->orderBy('rand()')
->limit($this->count)
->all();
......
......@@ -46,8 +46,11 @@ class HostFreeController extends Controller
*/
public function actionIndex()
{
$searchModel = new HostSearch(['wis_status' => Host::STATUS_WIS_FREE, 'status' => Filter::STATUS_ON ]);
$dataProvider = $searchModel->search(Yii::$app->request->queryParams);
/*'wis_status' => Host::STATUS_WIS_FREE, 'status' => Filter::STATUS_ON */
$params = Yii::$app->request->queryParams;
$params['wis_status']=Host::STATUS_WIS_FREE;
$searchModel = new HostSearch();
$dataProvider = $searchModel->search($params);
return $this->render('index', [
'searchModel' => $searchModel,
......
......@@ -56,6 +56,8 @@ class HostSearch extends Host
return $dataProvider;
}
var_dump($this->wis_status);
die;
// grid filtering conditions
$query->andFilterWhere([
'id' => $this->id,
......@@ -63,7 +65,7 @@ class HostSearch extends Host
//'csv_date' => $this->csv_date,
//'wis_date' => $this->wis_date,
'wis_status' => $this->wis_status,
'domain_expire' => $this->wis_status,
//'domain_expire' => $this->domain_expire,
'tix' => $this->tix,
'status' => $this->status
]);
......
......@@ -19,7 +19,7 @@ use app\models\Filter;
<?= $form->field($model, 'include', ['options' => ['class' => 'form-group col-xs-12']])->dropDownList(Filter::getIncludes()) ?>
<?= $form->field($model, 'status', ['options' => ['class' => 'form-group col-xs-12']])->dropDownList(Filter::getWisStatus()) ?>
<?= $form->field($model, 'status', ['options' => ['class' => 'form-group col-xs-12']])->dropDownList(Filter::getStatus()) ?>
<?= $form->field($model, 'type', ['options' => ['class' => 'form-group col-xs-12']])->dropDownList(Filter::getTypes()) ?>
......
......@@ -38,7 +38,7 @@ $this->params['breadcrumbs'][] = $this->title;
],
[
'attribute' => 'status',
'value' => $model::getWisStatus($model->status),
'value' => $model::getStatus($model->status),
],
[
'attribute' => 'type',
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!