diff --git a/package-lock.json b/package-lock.json index cf55df1ff..f5386af17 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "kuzzle-admin-console", - "version": "4.2.0", + "version": "4.3.0", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -1474,9 +1474,9 @@ } }, "@types/geojson": { - "version": "7946.0.7", - "resolved": "https://registry.npmjs.org/@types/geojson/-/geojson-7946.0.7.tgz", - "integrity": "sha512-wE2v81i4C4Ol09RtsWFAqg3BUitWbHSpSlIo+bNdsCJijO9sjme+zm+73ZMCa/qMC8UEERxzGbvmr1cffo2SiQ==" + "version": "7946.0.8", + "resolved": "https://registry.npmjs.org/@types/geojson/-/geojson-7946.0.8.tgz", + "integrity": "sha512-1rkryxURpr6aWP7R786/UQOkJ3PcpQiWkAXBmdWc7ryFWqN6a4xfK7BtjXvFBKO9LjQ+MWQSWxYeZX1OApnArA==" }, "@types/glob": { "version": "7.1.3", @@ -1501,9 +1501,9 @@ "integrity": "sha512-cxWFQVseBm6O9Gbw1IWb8r6OS4OhSt3hPZLkFApLjM8TEXROBuQGLAH2i2gZpcXdLBIrpXuTDhH7Vbm1iXmNGA==" }, "@types/leaflet": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/@types/leaflet/-/leaflet-1.7.0.tgz", - "integrity": "sha512-ltv5jR+VjKSMtoDkxH61Rsbo0zLU7iqyOXpVPkAX4F+79fg2eymC7t0msWsfNaEZO1FGTIQATCCCQe+ijWoicg==", + "version": "1.7.4", + "resolved": "https://registry.npmjs.org/@types/leaflet/-/leaflet-1.7.4.tgz", + "integrity": "sha512-a3qYlMwJ62+WRoiDmYODUD4KywA14jP2XohAkAWtELGuMAD3MohZa/MmIvQDqF52xNI9OYaY8BMsL+9z7yf2HQ==", "requires": { "@types/geojson": "*" } @@ -1922,6 +1922,87 @@ "tslint": "^5.20.1", "webpack": "^4.0.0", "yorkie": "^2.0.0" + }, + "dependencies": { + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "optional": true, + "requires": { + "color-convert": "^2.0.1" + } + }, + "chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "optional": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "optional": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "optional": true + }, + "fork-ts-checker-webpack-plugin-v5": { + "version": "npm:fork-ts-checker-webpack-plugin@5.2.1", + "resolved": "https://registry.npmjs.org/fork-ts-checker-webpack-plugin/-/fork-ts-checker-webpack-plugin-5.2.1.tgz", + "integrity": "sha512-SVi+ZAQOGbtAsUWrZvGzz38ga2YqjWvca1pXQFUArIVXqli0lLoDQ8uS0wg0kSpcwpZmaW5jVCZXQebkyUQSsw==", + "optional": true, + "requires": { + "@babel/code-frame": "^7.8.3", + "@types/json-schema": "^7.0.5", + "chalk": "^4.1.0", + "cosmiconfig": "^6.0.0", + "deepmerge": "^4.2.2", + "fs-extra": "^9.0.0", + "memfs": "^3.1.2", + "minimatch": "^3.0.4", + "schema-utils": "2.7.0", + "semver": "^7.3.2", + "tapable": "^1.0.0" + } + }, + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "optional": true + }, + "schema-utils": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-2.7.0.tgz", + "integrity": "sha512-0ilKFI6QQF5nxDZLFn2dMjvc4hjg/Wkg7rHd3jK6/A4a1Hl9VFdQWvgB1UMGoU94pad1P/8N7fMcEnLnSiju8A==", + "optional": true, + "requires": { + "@types/json-schema": "^7.0.4", + "ajv": "^6.12.2", + "ajv-keywords": "^3.4.1" + } + }, + "supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "optional": true, + "requires": { + "has-flag": "^4.0.0" + } + } } }, "@vue/cli-plugin-unit-mocha": { @@ -2243,6 +2324,21 @@ } } }, + "@vue/composition-api": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/@vue/composition-api/-/composition-api-1.2.4.tgz", + "integrity": "sha512-8LVV6O4slsroBhRKxly3em5H3D5Q+ggPG75lcilh5MfLGs69LEdwm6dKhSOXtQoSyMGF4Rq30E4DcouopM8Rxg==", + "requires": { + "tslib": "^2.3.0" + }, + "dependencies": { + "tslib": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.1.tgz", + "integrity": "sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw==" + } + } + }, "@vue/eslint-config-prettier": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/@vue/eslint-config-prettier/-/eslint-config-prettier-4.0.1.tgz", @@ -2468,8 +2564,8 @@ } }, "ace-builds": { - "version": "git://github.com/ajaxorg/ace-builds.git#5ad04a46e8e0981a65dd982693e5d19a2209311c", - "from": "git://github.com/ajaxorg/ace-builds.git#v1.4.7" + "version": "git+https://github.com/ajaxorg/ace-builds.git#5ad04a46e8e0981a65dd982693e5d19a2209311c", + "from": "git+https://github.com/ajaxorg/ace-builds.git#v1.4.7" }, "acorn": { "version": "6.4.2", @@ -7323,87 +7419,6 @@ } } }, - "fork-ts-checker-webpack-plugin-v5": { - "version": "npm:fork-ts-checker-webpack-plugin@5.2.1", - "resolved": "https://registry.npmjs.org/fork-ts-checker-webpack-plugin/-/fork-ts-checker-webpack-plugin-5.2.1.tgz", - "integrity": "sha512-SVi+ZAQOGbtAsUWrZvGzz38ga2YqjWvca1pXQFUArIVXqli0lLoDQ8uS0wg0kSpcwpZmaW5jVCZXQebkyUQSsw==", - "optional": true, - "requires": { - "@babel/code-frame": "^7.8.3", - "@types/json-schema": "^7.0.5", - "chalk": "^4.1.0", - "cosmiconfig": "^6.0.0", - "deepmerge": "^4.2.2", - "fs-extra": "^9.0.0", - "memfs": "^3.1.2", - "minimatch": "^3.0.4", - "schema-utils": "2.7.0", - "semver": "^7.3.2", - "tapable": "^1.0.0" - }, - "dependencies": { - "ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "optional": true, - "requires": { - "color-convert": "^2.0.1" - } - }, - "chalk": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz", - "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==", - "optional": true, - "requires": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - } - }, - "color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "optional": true, - "requires": { - "color-name": "~1.1.4" - } - }, - "color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "optional": true - }, - "has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "optional": true - }, - "schema-utils": { - "version": "2.7.0", - "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-2.7.0.tgz", - "integrity": "sha512-0ilKFI6QQF5nxDZLFn2dMjvc4hjg/Wkg7rHd3jK6/A4a1Hl9VFdQWvgB1UMGoU94pad1P/8N7fMcEnLnSiju8A==", - "optional": true, - "requires": { - "@types/json-schema": "^7.0.4", - "ajv": "^6.12.2", - "ajv-keywords": "^3.4.1" - } - }, - "supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "optional": true, - "requires": { - "has-flag": "^4.0.0" - } - } - } - }, "form-data": { "version": "2.3.3", "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz", @@ -9762,9 +9777,9 @@ }, "dependencies": { "ws": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/ws/-/ws-6.2.1.tgz", - "integrity": "sha512-GIyAXC2cB7LjvpgMt9EKS2ldqr0MTrORaleiOno6TweZ6r3TKtoFQWay/2PceJ3RuBasOHzXNn5Lrw1X0bEjqA==", + "version": "6.2.2", + "resolved": "https://registry.npmjs.org/ws/-/ws-6.2.2.tgz", + "integrity": "sha512-zmhltoSR8u1cnDsD43TX59mzoMZsLKqUweyYBAIvTngR3shc0W6aOZylZmq/7hqyVxPdi+5Ud2QInblgyE72fw==", "requires": { "async-limiter": "~1.0.0" } @@ -9772,12 +9787,19 @@ } }, "kuzzle-sdk-v7": { - "version": "npm:kuzzle-sdk@7.6.1", - "resolved": "https://registry.npmjs.org/kuzzle-sdk/-/kuzzle-sdk-7.6.1.tgz", - "integrity": "sha512-cSLvvuy6nu3Ra5EtZd+5+c8aFEgFBmjlZV6c9n/4GyGYSyOCTPvWWZ4tKBKaD6N9L1jsi+1acyUjKrzxr/xY8Q==", + "version": "npm:kuzzle-sdk@7.7.5", + "resolved": "https://registry.npmjs.org/kuzzle-sdk/-/kuzzle-sdk-7.7.5.tgz", + "integrity": "sha512-hUei7hm9CWPifAzXWliAZrkTtl6DFN2unqBxc4XkxGCQfUyCOe3QuwX0V+yZFdiFv7qVATFJAnchmbv8qryWfw==", "requires": { "min-req-promise": "^1.0.1", - "ws": "^7.4.4" + "ws": "^7.4.6" + }, + "dependencies": { + "ws": { + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.4.tgz", + "integrity": "sha512-zP9z6GXm6zC27YtspwH99T3qTG7bBFv2VIkeHstMLrLlDJuzA7tQ5ls3OJ1hOGGCzTQPniNJoHXIAOS0Jljohg==" + } } }, "kuzzle-vault": { @@ -16578,9 +16600,9 @@ } }, "vue-loader-v16": { - "version": "npm:vue-loader@16.2.0", - "resolved": "https://registry.npmjs.org/vue-loader/-/vue-loader-16.2.0.tgz", - "integrity": "sha512-TitGhqSQ61RJljMmhIGvfWzJ2zk9m1Qug049Ugml6QP3t0e95o0XJjk29roNEiPKJQBEi8Ord5hFuSuELzSp8Q==", + "version": "npm:vue-loader@16.5.0", + "resolved": "https://registry.npmjs.org/vue-loader/-/vue-loader-16.5.0.tgz", + "integrity": "sha512-WXh+7AgFxGTgb5QAkQtFeUcHNIEq3PGVQ8WskY5ZiFbWBkOwcCPRs4w/2tVyTbh2q6TVRlO3xfvIukUtjsu62A==", "optional": true, "requires": { "chalk": "^4.1.0", @@ -16598,9 +16620,9 @@ } }, "chalk": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz", - "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==", + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", "optional": true, "requires": { "ansi-styles": "^4.1.0", @@ -16708,20 +16730,9 @@ "integrity": "sha512-4gDntzrifFnCEvyoO8PqyJDmguXgVPxKiIxrBKjIowvL9l+N66196+72XVYR8BBf1Uv1Fgt3bGevJ+sEmxfZzw==" }, "vue2-leaflet": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/vue2-leaflet/-/vue2-leaflet-1.2.3.tgz", - "integrity": "sha512-dsmhswT6Xu2Nm59T64edvG0lpycSgIWQL3pUU7h6foP8QL+mSuT5gnhJGLO2mt+39w+HBTr4Rgz8bQvyELKVPA==", - "requires": { - "@types/leaflet": "^1.2.11", - "leaflet": "1.3.1" - }, - "dependencies": { - "leaflet": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/leaflet/-/leaflet-1.3.1.tgz", - "integrity": "sha512-adQOIzh+bfdridLM1xIgJ9VnJbAUY3wqs/ueF+ITla+PLQ1z47USdBKUf+iD9FuUA8RtlT6j6hZBfZoA6mW+XQ==" - } - } + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/vue2-leaflet/-/vue2-leaflet-2.7.1.tgz", + "integrity": "sha512-K7HOlzRhjt3Z7+IvTqEavIBRbmCwSZSCVUlz9u4Rc+3xGCLsHKz4TAL4diAmfHElCQdPPVdZdJk8wPUt2fu6WQ==" }, "vuedraggable": { "version": "2.24.3", diff --git a/package.json b/package.json index 5eec575cd..dd9f6ab8f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "kuzzle-admin-console", - "version": "4.2.0", + "version": "4.3.0", "description": "A handy administrative console for Kuzzle", "author": "The Kuzzle team ", "scripts": { @@ -19,6 +19,7 @@ "dependencies": { "@babel/plugin-proposal-optional-chaining": "^7.7.5", "@fortawesome/fontawesome-free": "^5.8.1", + "@types/leaflet": "^1.7.4", "@types/node": "^14.6.1", "@typescript-eslint/eslint-plugin": "^2.12.0", "@typescript-eslint/parser": "^2.12.0", @@ -29,10 +30,11 @@ "@vue/cli-plugin-unit-mocha": "^4.1.0", "@vue/cli-plugin-vuex": "^4.1.0", "@vue/cli-service": "^4.1.0", + "@vue/composition-api": "^1.2.4", "@vue/eslint-config-prettier": "^4.0.1", "@vue/eslint-config-typescript": "^5.0.1", "@vue/test-utils": "^1.0.0-beta.30", - "ace-builds": "git://github.com/ajaxorg/ace-builds.git#v1.4.7", + "ace-builds": "git+https://github.com/ajaxorg/ace-builds.git#v1.4.7", "apexcharts": "^3.22.2", "babel-polyfill": "^6.26.0", "bootstrap-vue": "^2.13.0", @@ -65,7 +67,7 @@ "vue-quill-editor": "^3.0.6", "vue-router": "^3.1.3", "vue-template-compiler": "^2.6.10", - "vue2-leaflet": "^1.0.2", + "vue2-leaflet": "^2.7.1", "vuedraggable": "^2.24.3", "vuejs-logger": "1.5.4", "vuelidate": "^0.7.5", diff --git a/src/assets/environment.scss b/src/assets/environment.scss index ab336a51b..8ce65289c 100644 --- a/src/assets/environment.scss +++ b/src/assets/environment.scss @@ -63,6 +63,6 @@ $colors: ( @each $name, $value in $colors { .EnvColor--#{$name} { - background-color: $value; + background-color: $value !important; } } diff --git a/src/components/Common/AutoFocusInput.vue b/src/components/Common/AutoFocusInput.vue deleted file mode 100644 index b8acab934..000000000 --- a/src/components/Common/AutoFocusInput.vue +++ /dev/null @@ -1,121 +0,0 @@ - - - diff --git a/src/components/Common/Environments/CreateEnvironment.vue b/src/components/Common/Environments/CreateEnvironment.vue index 53d413b32..012b1111e 100644 --- a/src/components/Common/Environments/CreateEnvironment.vue +++ b/src/components/Common/Environments/CreateEnvironment.vue @@ -127,7 +127,11 @@ import { validationMixin } from 'vuelidate' import { numeric, required } from 'vuelidate/lib/validators' import { isValidHostname, notIncludeScheme } from '../../../validators' -import { envColors, DEFAULT_COLOR } from '../../../vuex/modules/kuzzle/store' +import { + envColors, + DEFAULT_COLOR, + NO_ADMIN_WARNING_HOSTS +} from '../../../vuex/modules/kuzzle/store' const useHttps = window.location.protocol === 'https:' /** @@ -167,7 +171,8 @@ export default { port: 7512, color: null, ssl: useHttps, - backendMajorVersion: null + backendMajorVersion: null, + hideAdminWarning: false }, submitting: false } @@ -259,15 +264,15 @@ export default { } }, mounted() { - if (this.environmentId && this.environments[this.environmentId]) { - this.environment.name = this.environments[this.environmentId].name - this.environment.host = this.environments[this.environmentId].host - this.environment.port = this.environments[this.environmentId].port - this.environment.color = this.environments[this.environmentId].color - this.environment.ssl = this.environments[this.environmentId].ssl - this.environment.backendMajorVersion = this.environments[ - this.environmentId - ].backendMajorVersion + const currentEnv = this.environments[this.environmentId] + if (this.environmentId && currentEnv) { + this.environment.name = currentEnv.name + this.environment.host = currentEnv.host + this.environment.port = currentEnv.port + this.environment.color = currentEnv.color + this.environment.ssl = currentEnv.ssl + this.environment.backendMajorVersion = currentEnv.backendMajorVersion + this.environment.hideAdminWarning = currentEnv.hideAdminWarning this.$nextTick(() => this.showValidationErrors()) } else { this.environment.name = null @@ -276,6 +281,7 @@ export default { this.environment.color = DEFAULT_COLOR this.environment.ssl = useHttps this.environment.backendMajorVersion = null + this.environment.hideAdminWarning = false } }, methods: { @@ -316,7 +322,8 @@ export default { host: this.environment.host, port: parseInt(this.environment.port), ssl: this.environment.ssl, - backendMajorVersion: this.environment.backendMajorVersion + backendMajorVersion: this.environment.backendMajorVersion, + hideAdminWarning: this.environment.hideAdminWarning } }) } else { @@ -328,7 +335,12 @@ export default { host: this.environment.host, port: parseInt(this.environment.port), ssl: this.environment.ssl, - backendMajorVersion: this.environment.backendMajorVersion + backendMajorVersion: this.environment.backendMajorVersion, + hideAdminWarning: NO_ADMIN_WARNING_HOSTS.includes( + this.environment.host + ) + ? true + : false } }) } diff --git a/src/components/Common/Filters/BasicFilter.vue b/src/components/Common/Filters/BasicFilter.vue index cf3c5a7e5..890e0db85 100644 --- a/src/components/Common/Filters/BasicFilter.vue +++ b/src/components/Common/Filters/BasicFilter.vue @@ -12,7 +12,11 @@ v-if="groupIndex === filters.basic.length - 1" v-slot:footer > - + OR @@ -124,7 +128,7 @@ @@ -136,6 +140,7 @@ @@ -146,7 +151,7 @@ - +
- + ({ - text: a, - value: a - })) + return [ + { text: '_id', value: '_id' }, + ...Object.keys(this.mappingAttributes).map(a => ({ + text: a, + value: a + })) + ] }, sortAttributesValues() { return Object.keys(this.mappingAttributes) @@ -331,6 +339,28 @@ export default { } }, methods: { + isInvalidBlock(orBlock) { + return this.isInvalidStatement(orBlock.length - 1, orBlock) + }, + isInvalidStatement(filterIndex, orBlock) { + const statement = orBlock[filterIndex] + const operator = statement.operator + + switch (operator) { + case 'contains': + case 'not_contains': + case 'equal': + case 'not_equal': + return Boolean(!statement.attribute || !statement.value) + case 'exists': + case 'not_exists': + return Boolean(!statement.attribute) + case 'range': + return Boolean( + !statement.attribute || (!statement.gt_value && !statement.lt_value) + ) + } + }, setSortAttr(attribute) { this.$set(this.filters.sorting, 'attribute', attribute) }, diff --git a/src/components/Common/Filters/Filters.vue b/src/components/Common/Filters/Filters.vue index abf609f4f..1e61026b4 100644 --- a/src/components/Common/Filters/Filters.vue +++ b/src/components/Common/Filters/Filters.vue @@ -13,23 +13,21 @@ diff --git a/src/components/Data/Indexes/Page.vue b/src/components/Data/Indexes/Page.vue index f0cf0caea..e97271416 100644 --- a/src/components/Data/Indexes/Page.vue +++ b/src/components/Data/Indexes/Page.vue @@ -60,11 +60,12 @@ Filter - @@ -164,9 +165,11 @@ @create-successful="onCreateModalSuccess" /> - -
+ +
- - + + + +