Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Alto
/
rkn
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
Commit 684adb13
authored
2021-06-07 12:52:20 +0300
by
san58
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
правка списка результирующих доменов
1 parent
ab1f4534
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
12 additions
and
5 deletions
commands/WhoisController.php
controllers/HostFreeController.php
models/HostSearch.php
views/filter/_form.php
views/filter/view.php
commands/WhoisController.php
View file @
684adb1
...
...
@@ -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
();
...
...
controllers/HostFreeController.php
View file @
684adb1
...
...
@@ -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
,
...
...
models/HostSearch.php
View file @
684adb1
...
...
@@ -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
]);
...
...
views/filter/_form.php
View file @
684adb1
...
...
@@ -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
::
get
Wis
Status
())
?>
<?=
$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
())
?>
...
...
views/filter/view.php
View file @
684adb1
...
...
@@ -38,7 +38,7 @@ $this->params['breadcrumbs'][] = $this->title;
],
[
'attribute'
=>
'status'
,
'value'
=>
$model
::
get
Wis
Status
(
$model
->
status
),
'value'
=>
$model
::
getStatus
(
$model
->
status
),
],
[
'attribute'
=>
'type'
,
...
...
Write
Preview
Styling with
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment