Skip to content

Commit

Permalink
fix: фильтры переведены, прибран css, добавлены подсказки
Browse files Browse the repository at this point in the history
  • Loading branch information
popstas committed Nov 18, 2018
1 parent 76987cb commit 3d30dcd
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 22 deletions.
28 changes: 14 additions & 14 deletions assets/js/presets/filters.conf.js
Original file line number Diff line number Diff line change
@@ -1,36 +1,36 @@
module.exports = [
{
name: 'prod',
name: 'Боевые сайты',
q: 'prod=1',
groups: ['main']
},
{
name: 'приоритетные клиенты',
name: 'Приоритетные клиенты',
q: 'prod=1&meta_client_priority<3',
groups: ['main']
},
{
name: 'bitrix',
name: 'Bitrix',
q: 'engine=bitrix&prod=1',
groups: ['bitrix']
},
{
name: 'drupal',
name: 'Drupal',
q: 'engine=drupal&prod=1',
groups: ['modules']
},
{
name: 'without cron',
name: 'Без cron',
q: 'engine=drupal&prod=1&cron=0',
groups: ['cron']
},
{
name: 'without git',
name: 'Без git',
q: 'prod=1&git=0',
groups: ['git']
},
{
name: 'dirty git',
name: 'Грязный git',
q: 'prod=1&git=1&git_clean=0',
groups: ['git']
},
Expand All @@ -40,37 +40,37 @@ module.exports = [
groups: ['seo']
},
{
name: 'without https',
name: 'Без HTTPS',
q: 'https=0&prod=1',
groups: ['service']
},
{
name: 'drupal without cache',
name: 'Drupal без кэша анонимов',
q: 'engine=drupal&prod=1&cache=0&boost=0',
groups: ['cache']
},
{
name: 'drupal without js min',
name: 'Drupal без js min',
q: 'engine=drupal&prod=1&preprocess_js=0',
groups: ['cache']
},
{
name: 'yandex_maps',
name: 'Яндекс.карты на главке',
q: 'yandex_maps=1',
groups: ['perf']
},
{
name: 'lighthouse_performance',
name: 'Быстрый PageSpeed',
q: 'prod=1&lighthouse_performance>50',
groups: ['perf', 'lighthouse']
},
{
name: 'кликабельные телефоны',
name: 'Кликабельные телефоны',
q: 'prod=1&tel_links>0',
groups: ['service']
},
{
name: 'продан pagespeed',
name: 'Продан PageSpeed',
q: 'prod=1&meta_pagespeed>0',
groups: ['service', 'lighthouse']
}
Expand Down
11 changes: 11 additions & 0 deletions pages/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,16 @@
background: none;
font-weight: normal;
}

&__columns{
display: block;
margin-left: 18px;
}

&__filters{
// display: inline;
margin-left: 18px;
}
}

&__field {
Expand Down Expand Up @@ -90,6 +100,7 @@
border-bottom: 1px dashed;
padding: 0;
margin-right: 1em;
font-weight: normal;
}
}

Expand Down
21 changes: 13 additions & 8 deletions pages/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,25 @@
<div class="field-group" v-for="group in fieldGroups" :key="group.name">
<div class="field-group__name">
{{ group.name }}
<button class="field-group__all-button" @click="setPreset({name: 'all', columns: [...['domain_idn'],...group.fields.map(f => f.name)]});" :title="group.fields.map(f => f.comment).join('\n')">all</button>
</div>

<div class="field-group__columns">
<button class="column-presets__button"
v-for="preset in columnPresets" :key="preset.name" v-if="preset.groups.indexOf(group.name) !== -1"
@click="setPreset(preset);" v-html="preset.name" :title="preset.columns.join('\n')">
<button class="column-presets__button field-group__all-button" @click="setPreset({name: 'all', columns: [...['domain_idn'],...group.fields.map(f => f.name)]});"
:title="'Вывести колонки:\n' + group.fields.map(f => f.comment).join('\n')">all
</button>

<div class="field-group__columns">

<button class="column-presets__button"
v-for="preset in columnPresets" :key="preset.name" v-if="preset.groups.indexOf(group.name) !== -1"
@click="setPreset(preset);" v-html="preset.name" :title="'Вывести колонки:\n' + preset.columns.join('\n')">
</button>
</div>
</div>


<div class="field-group__filters">
<button class="filter-presets__button"
v-for="preset in filterPresets" :key="preset.name" v-if="preset.groups.indexOf(group.name) !== -1"
@click="q = preset.q" v-html="preset.name" :title="preset.q">
@click="q = preset.q" v-html="preset.name" :title="'Отфильтровать:\n' + preset.q">
</button>
</div>

Expand Down Expand Up @@ -121,7 +126,7 @@ export default {
filterable: ['domain_idn'],
perPage: this.filteredSites.length,
perPageValues: [100, 250, 500],
columnsDropdown: true,
// columnsDropdown: true,
rowClassCallback(row) {
if (row.error) return 'danger';
// return 'success';
Expand Down

0 comments on commit 3d30dcd

Please sign in to comment.