diff --git a/graph/.editorconfig b/.editorconfig similarity index 100% rename from graph/.editorconfig rename to .editorconfig diff --git a/.env.example b/.env.example index cd06cc8..53d48bf 100644 --- a/.env.example +++ b/.env.example @@ -2,21 +2,22 @@ APP_NAME=Laravel APP_ENV=local APP_KEY= APP_DEBUG=true -APP_LOG_LEVEL=debug APP_URL=http://localhost +LOG_CHANNEL=stack + DB_CONNECTION=mysql DB_HOST=127.0.0.1 DB_PORT=3306 -DB_DATABASE=homestead -DB_USERNAME=homestead -DB_PASSWORD=secret +DB_DATABASE=laravel +DB_USERNAME=root +DB_PASSWORD= BROADCAST_DRIVER=log CACHE_DRIVER=file +QUEUE_CONNECTION=sync SESSION_DRIVER=file SESSION_LIFETIME=120 -QUEUE_DRIVER=sync REDIS_HOST=127.0.0.1 REDIS_PASSWORD=null @@ -28,8 +29,18 @@ MAIL_PORT=2525 MAIL_USERNAME=null MAIL_PASSWORD=null MAIL_ENCRYPTION=null +MAIL_FROM_ADDRESS=null +MAIL_FROM_NAME="${APP_NAME}" + +AWS_ACCESS_KEY_ID= +AWS_SECRET_ACCESS_KEY= +AWS_DEFAULT_REGION=us-east-1 +AWS_BUCKET= PUSHER_APP_ID= PUSHER_APP_KEY= PUSHER_APP_SECRET= PUSHER_APP_CLUSTER=mt1 + +MIX_PUSHER_APP_KEY="${PUSHER_APP_KEY}" +MIX_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}" diff --git a/.gitignore b/.gitignore index b6a4b86..75334d8 100644 --- a/.gitignore +++ b/.gitignore @@ -1,12 +1,11 @@ /node_modules -/public/hot -/public/storage +/public/* /storage/*.key /vendor -/.idea -/.vagrant +.env +.env.backup +.phpunit.result.cache Homestead.json Homestead.yaml npm-debug.log yarn-error.log -.env diff --git a/app/Http/Controllers/Search.php b/app/Http/Controllers/Search.php index ebc9a58..ddfb8d6 100644 --- a/app/Http/Controllers/Search.php +++ b/app/Http/Controllers/Search.php @@ -91,6 +91,57 @@ class Search extends Controller return Response::json($results); } + public function multiple() { + $type = Request::input('type', 0); + $search = Request::input('search',null); + + if ($type == 0) { + $u = DB::table('users') + ->where('name','=',$search) + ->select('name','id') + ->first(); + + $wh = ['user_id','=',$u->id]; + } + + if ($type == 1) { + $c = DB::table('computers') + ->where('computer','=',$search) + ->select('computer','id') + ->first(); + + $wh = ['computer_id','=',$c->id]; + } + + $data = DB::table('user_ip') + ->select('user_ip.ip as ip','u.name as name','c.computer as comp',DB::raw('MIN(`user_ip`.`created_at`) as f'),DB::raw('MAX(`user_ip`.`created_at`) as t')) + ->join('users as u', 'u.id', '=', 'user_ip.user_id') + ->join('computers as c','c.id','=','user_ip.computer_id') + ->groupBy('user_ip.ip','user_ip.user_id','user_ip.computer_id') + ->where([$wh]) + ->get(); + + return Response::json($data); + + } + + public function lastactive() + { + $time = strtotime("-15 minutes", time()); + $date = date("Y-m-d G:i:s", $time); + + $data = DB::table('user_ip') + ->select('user_ip.ip as ip','u.name as name','c.computer as comp',DB::raw('MIN(`user_ip`.`created_at`) as f'),DB::raw('MAX(`user_ip`.`created_at`) as t')) + ->join('users as u', 'u.id', '=', 'user_ip.user_id') + ->join('computers as c','c.id','=','user_ip.computer_id') + ->groupBy('user_ip.ip','user_ip.user_id','user_ip.computer_id') + ->where('user_ip.created_at','>=',$date) + ->orderBy('u.name') + ->get(); + + return view('lastactive')->with('data', $data); + } + public function search($var = null) { $ip = Request::input('ip'); diff --git a/composer.json b/composer.json index 675d820..2df8928 100644 --- a/composer.json +++ b/composer.json @@ -14,6 +14,7 @@ "laravel/tinker": "^2.0" }, "require-dev": { + "barryvdh/laravel-debugbar": "^3.2", "facade/ignition": "^1.4", "fzaninotto/faker": "^1.9.1", "laravel/ui": "^1.2", diff --git a/composer.lock b/composer.lock index 89d8e14..a4585d3 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "83153de0b10c42f671d4d55e7094f087", + "content-hash": "e5690fffa84fffe99cbde652157370e6", "packages": [ { "name": "dnoegel/php-xdg-base-dir", @@ -2997,6 +2997,74 @@ } ], "packages-dev": [ + { + "name": "barryvdh/laravel-debugbar", + "version": "v3.2.9", + "source": { + "type": "git", + "url": "https://github.com/barryvdh/laravel-debugbar.git", + "reference": "42d5da5379a7860093f8e4032167e4cb5ebec180" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/barryvdh/laravel-debugbar/zipball/42d5da5379a7860093f8e4032167e4cb5ebec180", + "reference": "42d5da5379a7860093f8e4032167e4cb5ebec180", + "shasum": "" + }, + "require": { + "illuminate/routing": "^5.5|^6|^7", + "illuminate/session": "^5.5|^6|^7", + "illuminate/support": "^5.5|^6|^7", + "maximebf/debugbar": "^1.15.1", + "php": ">=7.0", + "symfony/debug": "^3|^4|^5", + "symfony/finder": "^3|^4|^5" + }, + "require-dev": { + "laravel/framework": "5.5.x" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.2-dev" + }, + "laravel": { + "providers": [ + "Barryvdh\\Debugbar\\ServiceProvider" + ], + "aliases": { + "Debugbar": "Barryvdh\\Debugbar\\Facade" + } + } + }, + "autoload": { + "psr-4": { + "Barryvdh\\Debugbar\\": "src/" + }, + "files": [ + "src/helpers.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Barry vd. Heuvel", + "email": "barryvdh@gmail.com" + } + ], + "description": "PHP Debugbar integration for Laravel", + "keywords": [ + "debug", + "debugbar", + "laravel", + "profiler", + "webprofiler" + ], + "time": "2020-02-25T20:42:23+00:00" + }, { "name": "doctrine/instantiator", "version": "1.3.0", @@ -3435,6 +3503,67 @@ ], "time": "2020-02-13T21:12:28+00:00" }, + { + "name": "maximebf/debugbar", + "version": "v1.16.1", + "source": { + "type": "git", + "url": "https://github.com/maximebf/php-debugbar.git", + "reference": "58998b818c6567fac01e35b8a4b70c1a64530556" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/maximebf/php-debugbar/zipball/58998b818c6567fac01e35b8a4b70c1a64530556", + "reference": "58998b818c6567fac01e35b8a4b70c1a64530556", + "shasum": "" + }, + "require": { + "php": "^7.1", + "psr/log": "^1.0", + "symfony/var-dumper": "^2.6|^3|^4|^5" + }, + "require-dev": { + "phpunit/phpunit": "^5" + }, + "suggest": { + "kriswallsmith/assetic": "The best way to manage assets", + "monolog/monolog": "Log using Monolog", + "predis/predis": "Redis storage" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.16-dev" + } + }, + "autoload": { + "psr-4": { + "DebugBar\\": "src/DebugBar/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Maxime Bouroumeau-Fuseau", + "email": "maxime.bouroumeau@gmail.com", + "homepage": "http://maximebf.com" + }, + { + "name": "Barry vd. Heuvel", + "email": "barryvdh@gmail.com" + } + ], + "description": "Debug bar in the browser for php application", + "homepage": "https://github.com/maximebf/php-debugbar", + "keywords": [ + "debug", + "debugbar" + ], + "time": "2019-11-24T09:46:11+00:00" + }, { "name": "mockery/mockery", "version": "1.3.1", diff --git a/config/database.php b/config/database.php index b42d9b3..aeabec6 100644 --- a/config/database.php +++ b/config/database.php @@ -56,7 +56,7 @@ return [ 'collation' => 'utf8mb4_unicode_ci', 'prefix' => '', 'prefix_indexes' => true, - 'strict' => true, + 'strict' => false, 'engine' => null, 'options' => extension_loaded('pdo_mysql') ? array_filter([ PDO::MYSQL_ATTR_SSL_CA => env('MYSQL_ATTR_SSL_CA'), diff --git a/graph/.env.example b/graph/.env.example deleted file mode 100644 index 53d48bf..0000000 --- a/graph/.env.example +++ /dev/null @@ -1,46 +0,0 @@ -APP_NAME=Laravel -APP_ENV=local -APP_KEY= -APP_DEBUG=true -APP_URL=http://localhost - -LOG_CHANNEL=stack - -DB_CONNECTION=mysql -DB_HOST=127.0.0.1 -DB_PORT=3306 -DB_DATABASE=laravel -DB_USERNAME=root -DB_PASSWORD= - -BROADCAST_DRIVER=log -CACHE_DRIVER=file -QUEUE_CONNECTION=sync -SESSION_DRIVER=file -SESSION_LIFETIME=120 - -REDIS_HOST=127.0.0.1 -REDIS_PASSWORD=null -REDIS_PORT=6379 - -MAIL_DRIVER=smtp -MAIL_HOST=smtp.mailtrap.io -MAIL_PORT=2525 -MAIL_USERNAME=null -MAIL_PASSWORD=null -MAIL_ENCRYPTION=null -MAIL_FROM_ADDRESS=null -MAIL_FROM_NAME="${APP_NAME}" - -AWS_ACCESS_KEY_ID= -AWS_SECRET_ACCESS_KEY= -AWS_DEFAULT_REGION=us-east-1 -AWS_BUCKET= - -PUSHER_APP_ID= -PUSHER_APP_KEY= -PUSHER_APP_SECRET= -PUSHER_APP_CLUSTER=mt1 - -MIX_PUSHER_APP_KEY="${PUSHER_APP_KEY}" -MIX_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}" diff --git a/graph/.gitattributes b/graph/.gitattributes deleted file mode 100644 index 967315d..0000000 --- a/graph/.gitattributes +++ /dev/null @@ -1,5 +0,0 @@ -* text=auto -*.css linguist-vendored -*.scss linguist-vendored -*.js linguist-vendored -CHANGELOG.md export-ignore diff --git a/graph/.gitignore b/graph/.gitignore deleted file mode 100644 index 0f7df0f..0000000 --- a/graph/.gitignore +++ /dev/null @@ -1,12 +0,0 @@ -/node_modules -/public/hot -/public/storage -/storage/*.key -/vendor -.env -.env.backup -.phpunit.result.cache -Homestead.json -Homestead.yaml -npm-debug.log -yarn-error.log diff --git a/graph/.styleci.yml b/graph/.styleci.yml deleted file mode 100644 index 1db61d9..0000000 --- a/graph/.styleci.yml +++ /dev/null @@ -1,13 +0,0 @@ -php: - preset: laravel - disabled: - - unused_use - finder: - not-name: - - index.php - - server.php -js: - finder: - not-name: - - webpack.mix.js -css: true diff --git a/package.json b/package.json index 46e42e1..78d8aec 100644 --- a/package.json +++ b/package.json @@ -26,11 +26,13 @@ "dependencies": { "apexcharts": "^3.16.1", "font-awesome": "^4.7.0", + "js-cookie": "^2.2.1", "luxon": "^1.22.0", "moment": "^2.24.0", "vue-datetime": "^1.0.0-beta.11", "vue-dygraphs": "^0.1.2", "vue-suggestion": "^1.1.0", + "vue-table-dynamic": "^0.2.1", "weekstart": "^1.0.1" } } diff --git a/public/css/app.css b/public/css/app.css index 3bc7e18..8c99b04 100644 --- a/public/css/app.css +++ b/public/css/app.css @@ -14463,6 +14463,7 @@ a.text-dark:focus { border-top: none; max-height: 400px; overflow-y: auto; + z-index: 100; border-bottom: 1px solid #023d7b; } diff --git a/public/fonts/vendor/bootstrap-sass/bootstrap/glyphicons-halflings-regular.eot b/public/fonts/vendor/bootstrap-sass/bootstrap/glyphicons-halflings-regular.eot deleted file mode 100644 index b93a495..0000000 Binary files a/public/fonts/vendor/bootstrap-sass/bootstrap/glyphicons-halflings-regular.eot and /dev/null differ diff --git a/public/fonts/vendor/bootstrap-sass/bootstrap/glyphicons-halflings-regular.svg b/public/fonts/vendor/bootstrap-sass/bootstrap/glyphicons-halflings-regular.svg deleted file mode 100644 index 94fb549..0000000 --- a/public/fonts/vendor/bootstrap-sass/bootstrap/glyphicons-halflings-regular.svg +++ /dev/null @@ -1,288 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/public/fonts/vendor/bootstrap-sass/bootstrap/glyphicons-halflings-regular.ttf b/public/fonts/vendor/bootstrap-sass/bootstrap/glyphicons-halflings-regular.ttf deleted file mode 100644 index 1413fc6..0000000 Binary files a/public/fonts/vendor/bootstrap-sass/bootstrap/glyphicons-halflings-regular.ttf and /dev/null differ diff --git a/public/fonts/vendor/bootstrap-sass/bootstrap/glyphicons-halflings-regular.woff b/public/fonts/vendor/bootstrap-sass/bootstrap/glyphicons-halflings-regular.woff deleted file mode 100644 index 9e61285..0000000 Binary files a/public/fonts/vendor/bootstrap-sass/bootstrap/glyphicons-halflings-regular.woff and /dev/null differ diff --git a/public/fonts/vendor/bootstrap-sass/bootstrap/glyphicons-halflings-regular.woff2 b/public/fonts/vendor/bootstrap-sass/bootstrap/glyphicons-halflings-regular.woff2 deleted file mode 100644 index 64539b5..0000000 Binary files a/public/fonts/vendor/bootstrap-sass/bootstrap/glyphicons-halflings-regular.woff2 and /dev/null differ diff --git a/public/js/app.js b/public/js/app.js index 560e3ac..2a44bfd 100644 --- a/public/js/app.js +++ b/public/js/app.js @@ -2380,14 +2380,21 @@ __webpack_require__.r(__webpack_exports__); // // // +// +// +// /* harmony default export */ __webpack_exports__["default"] = ({ data: function data() { return { item: {}, type: null, + errors: {}, + success: false, + loaded: true, items: [], - itemTemplate: _item_multi_template_vue__WEBPACK_IMPORTED_MODULE_0__["default"] + itemTemplate: _item_multi_template_vue__WEBPACK_IMPORTED_MODULE_0__["default"], + csrf: document.querySelector('meta[name="csrf-token"]').getAttribute('content') }; }, methods: { @@ -2410,12 +2417,92 @@ __webpack_require__.r(__webpack_exports__); })["catch"](function (error) { console.log(error); }); + }, + submit: function submit() { + var _this2 = this; + + axios.get('search/multiple', { + params: { + type: this.type, + search: this.item.name + } + }).then(function (response) { + var data = []; + data.push(['IP Adresa', 'Meno PC', 'Uzivatel', 'Od', 'Do']); + + for (var index = 0; index < response.data.length; ++index) { + var row = response.data[index]; + data.push([row.ip, row.comp, row.name, moment(row.f).format('DD.MM.YYYY HH:mm'), moment(row.t).format('DD.MM.YYYY HH:mm')]); + } + + console.log(data); + _this2.$parent.$refs.table.params.data = data; + })["catch"](function (error) { + console.log(error); + }); } } }); /***/ }), +/***/ "./node_modules/babel-loader/lib/index.js?!./node_modules/vue-loader/lib/index.js?!./resources/js/components/SearchTable.vue?vue&type=script&lang=js&": +/*!**********************************************************************************************************************************************************************!*\ + !*** ./node_modules/babel-loader/lib??ref--4-0!./node_modules/vue-loader/lib??vue-loader-options!./resources/js/components/SearchTable.vue?vue&type=script&lang=js& ***! + \**********************************************************************************************************************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var vue_table_dynamic__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! vue-table-dynamic */ "./node_modules/vue-table-dynamic/dist/index.min.js"); +/* harmony import */ var vue_table_dynamic__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(vue_table_dynamic__WEBPACK_IMPORTED_MODULE_0__); +// +// +// +// +// +// +// + + +function sleep(time) { + return new Promise(function (resolve) { + return setTimeout(resolve, time); + }); +} + +/* harmony default export */ __webpack_exports__["default"] = ({ + name: 'ip-table', + props: ['table_data'], + data: function data() { + return { + params: { + data: [], + header: 'row', + showCheck: true + } + }; + }, + mounted: function mounted() { + // `this` points to the vm instance + console.log('created TABLE'); + }, + methods: { + onSelect: function onSelect(isChecked, index, data) { + console.log('onSelect: ', isChecked, index, data); + console.log('Selected:', data[1]); + Cookies.set('computer', data[1]); + console.log('Checked Data:', this.$refs.table.getCheckedRowDatas(true)); + } + }, + components: { + VueTableDynamic: vue_table_dynamic__WEBPACK_IMPORTED_MODULE_0___default.a + } +}); + +/***/ }), + /***/ "./node_modules/babel-loader/lib/index.js?!./node_modules/vue-loader/lib/index.js?!./resources/js/components/TempGraph.vue?vue&type=script&lang=js&": /*!********************************************************************************************************************************************************************!*\ !*** ./node_modules/babel-loader/lib??ref--4-0!./node_modules/vue-loader/lib??vue-loader-options!./resources/js/components/TempGraph.vue?vue&type=script&lang=js& ***! @@ -7076,7 +7163,7 @@ exports = module.exports = __webpack_require__(/*! ../../../node_modules/css-loa // module -exports.push([module.i, "\n.chart[data-v-a09bb154] {\n width: 100%;\n height: 300px;\n}\n", ""]); +exports.push([module.i, "\n.chart[data-v-a09bb154] {\r\n width: 100%;\r\n height: 300px;\n}\r\n", ""]); // exports @@ -7095,7 +7182,7 @@ exports = module.exports = __webpack_require__(/*! ../../../node_modules/css-loa // module -exports.push([module.i, "\n.chart[data-v-2bdd922d] {\n width: 100%;\n height: 300px;\n}\n", ""]); +exports.push([module.i, "\n.chart[data-v-2bdd922d] {\r\n width: 100%;\r\n height: 300px;\n}\r\n", ""]); // exports @@ -7114,7 +7201,7 @@ exports = module.exports = __webpack_require__(/*! ../../../node_modules/css-loa // module -exports.push([module.i, "\n.chart[data-v-2363d932] {\n width: 100%;\n height: 300px;\n}\n", ""]); +exports.push([module.i, "\n.chart[data-v-2363d932] {\r\n width: 100%;\r\n height: 300px;\n}\r\n", ""]); // exports @@ -7133,7 +7220,7 @@ exports = module.exports = __webpack_require__(/*! ../../../node_modules/css-loa // module -exports.push([module.i, "\n.chart[data-v-1b0190aa] {\n width: 100%;\n height: 300px;\n}\n", ""]); +exports.push([module.i, "\n.chart[data-v-1b0190aa] {\r\n width: 100%;\r\n height: 300px;\n}\r\n", ""]); // exports @@ -7152,7 +7239,7 @@ exports = module.exports = __webpack_require__(/*! ../../../node_modules/css-loa // module -exports.push([module.i, "\n.chart[data-v-0311229c] {\n width: 100%;\n height: 300px;\n}\n", ""]); +exports.push([module.i, "\n.chart[data-v-0311229c] {\r\n width: 100%;\r\n height: 300px;\n}\r\n", ""]); // exports @@ -7171,7 +7258,7 @@ exports = module.exports = __webpack_require__(/*! ../../../node_modules/css-loa // module -exports.push([module.i, "\n.chart[data-v-7da20202] {\n width: 100%;\n height: 300px;\n}\n", ""]); +exports.push([module.i, "\n.chart[data-v-7da20202] {\r\n width: 100%;\r\n height: 300px;\n}\r\n", ""]); // exports @@ -17873,6 +17960,184 @@ return jQuery; } ); +/***/ }), + +/***/ "./node_modules/js-cookie/src/js.cookie.js": +/*!*************************************************!*\ + !*** ./node_modules/js-cookie/src/js.cookie.js ***! + \*************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_RESULT__;/*! + * JavaScript Cookie v2.2.1 + * https://github.com/js-cookie/js-cookie + * + * Copyright 2006, 2015 Klaus Hartl & Fagner Brack + * Released under the MIT license + */ +;(function (factory) { + var registeredInModuleLoader; + if (true) { + !(__WEBPACK_AMD_DEFINE_FACTORY__ = (factory), + __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? + (__WEBPACK_AMD_DEFINE_FACTORY__.call(exports, __webpack_require__, exports, module)) : + __WEBPACK_AMD_DEFINE_FACTORY__), + __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); + registeredInModuleLoader = true; + } + if (true) { + module.exports = factory(); + registeredInModuleLoader = true; + } + if (!registeredInModuleLoader) { + var OldCookies = window.Cookies; + var api = window.Cookies = factory(); + api.noConflict = function () { + window.Cookies = OldCookies; + return api; + }; + } +}(function () { + function extend () { + var i = 0; + var result = {}; + for (; i < arguments.length; i++) { + var attributes = arguments[ i ]; + for (var key in attributes) { + result[key] = attributes[key]; + } + } + return result; + } + + function decode (s) { + return s.replace(/(%[0-9A-Z]{2})+/g, decodeURIComponent); + } + + function init (converter) { + function api() {} + + function set (key, value, attributes) { + if (typeof document === 'undefined') { + return; + } + + attributes = extend({ + path: '/' + }, api.defaults, attributes); + + if (typeof attributes.expires === 'number') { + attributes.expires = new Date(new Date() * 1 + attributes.expires * 864e+5); + } + + // We're using "expires" because "max-age" is not supported by IE + attributes.expires = attributes.expires ? attributes.expires.toUTCString() : ''; + + try { + var result = JSON.stringify(value); + if (/^[\{\[]/.test(result)) { + value = result; + } + } catch (e) {} + + value = converter.write ? + converter.write(value, key) : + encodeURIComponent(String(value)) + .replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g, decodeURIComponent); + + key = encodeURIComponent(String(key)) + .replace(/%(23|24|26|2B|5E|60|7C)/g, decodeURIComponent) + .replace(/[\(\)]/g, escape); + + var stringifiedAttributes = ''; + for (var attributeName in attributes) { + if (!attributes[attributeName]) { + continue; + } + stringifiedAttributes += '; ' + attributeName; + if (attributes[attributeName] === true) { + continue; + } + + // Considers RFC 6265 section 5.2: + // ... + // 3. If the remaining unparsed-attributes contains a %x3B (";") + // character: + // Consume the characters of the unparsed-attributes up to, + // not including, the first %x3B (";") character. + // ... + stringifiedAttributes += '=' + attributes[attributeName].split(';')[0]; + } + + return (document.cookie = key + '=' + value + stringifiedAttributes); + } + + function get (key, json) { + if (typeof document === 'undefined') { + return; + } + + var jar = {}; + // To prevent the for loop in the first place assign an empty array + // in case there are no cookies at all. + var cookies = document.cookie ? document.cookie.split('; ') : []; + var i = 0; + + for (; i < cookies.length; i++) { + var parts = cookies[i].split('='); + var cookie = parts.slice(1).join('='); + + if (!json && cookie.charAt(0) === '"') { + cookie = cookie.slice(1, -1); + } + + try { + var name = decode(parts[0]); + cookie = (converter.read || converter)(cookie, name) || + decode(cookie); + + if (json) { + try { + cookie = JSON.parse(cookie); + } catch (e) {} + } + + jar[name] = cookie; + + if (key === name) { + break; + } + } catch (e) {} + } + + return key ? jar[key] : jar; + } + + api.set = set; + api.get = function (key) { + return get(key, false /* read as raw */); + }; + api.getJSON = function (key) { + return get(key, true /* read as json */); + }; + api.remove = function (key, attributes) { + set(key, '', extend(attributes, { + expires: -1 + })); + }; + + api.defaults = {}; + + api.withConverter = init; + + return api; + } + + return init(function () {}); +})); + + /***/ }), /***/ "./node_modules/lodash/lodash.js": @@ -65945,90 +66210,97 @@ var render = function() { var _vm = this var _h = _vm.$createElement var _c = _vm._self._c || _h - return _c("div", { staticClass: "row form-group" }, [ - _c("label", { staticClass: "col-sm-2", attrs: { for: "ssel1" } }, [ - _vm._v("Typ") - ]), - _vm._v(" "), - _c("div", { staticClass: "col-sm-4" }, [ - _c( - "select", - { - directives: [ - { - name: "model", - rawName: "v-model", - value: _vm.type, - expression: "type" - } - ], - staticClass: "form-control", - attrs: { id: "ssel1" }, - on: { - change: function($event) { - var $$selectedVal = Array.prototype.filter - .call($event.target.options, function(o) { - return o.selected - }) - .map(function(o) { - var val = "_value" in o ? o._value : o.value - return val - }) - _vm.type = $event.target.multiple - ? $$selectedVal - : $$selectedVal[0] - } - } - }, - [ - _c("option", { attrs: { value: "0" } }, [_vm._v("Užívateľ")]), - _vm._v(" "), - _c("option", { attrs: { value: "1" } }, [_vm._v("Meno PC")]), - _vm._v(" "), - _c("option", { attrs: { value: "2" } }, [_vm._v("Ip adresa")]) - ] - ) - ]), - _vm._v(" "), - _c("div", { staticClass: "col-sm-6" }, [ - _c( - "div", - { staticClass: "input-group" }, - [ - _c("vue-suggestion", { - attrs: { - items: _vm.items, - setLabel: _vm.setLabel, - itemTemplate: _vm.itemTemplate - }, - on: { changed: _vm.inputChange, selected: _vm.itemSelected }, - model: { - value: _vm.item, - callback: function($$v) { - _vm.item = $$v - }, - expression: "item" - } - }), - _vm._v(" "), - _c("span", { staticClass: "input-group-append" }, [ - _c( - "button", + return _c("form", [ + _c("div", { staticClass: "row form-group" }, [ + _c("label", { staticClass: "col-sm-2", attrs: { for: "ssel1" } }, [ + _vm._v("Typ") + ]), + _vm._v(" "), + _c("div", { staticClass: "col-sm-4" }, [ + _c( + "select", + { + directives: [ { - staticClass: "btn btn-secondary", - attrs: { type: "button" }, - on: { - click: function($event) { - return _vm.displayResults() - } - } + name: "model", + rawName: "v-model", + value: _vm.type, + expression: "type" + } + ], + staticClass: "form-control", + attrs: { name: "type", id: "ssel1" }, + on: { + change: function($event) { + var $$selectedVal = Array.prototype.filter + .call($event.target.options, function(o) { + return o.selected + }) + .map(function(o) { + var val = "_value" in o ? o._value : o.value + return val + }) + _vm.type = $event.target.multiple + ? $$selectedVal + : $$selectedVal[0] + } + } + }, + [ + _c("option", { attrs: { value: "0" } }, [_vm._v("Užívateľ")]), + _vm._v(" "), + _c("option", { attrs: { value: "1" } }, [_vm._v("Meno PC")]), + _vm._v(" "), + _c("option", { attrs: { value: "2" } }, [_vm._v("Ip adresa")]) + ] + ) + ]), + _vm._v(" "), + _c("div", { staticClass: "col-sm-6" }, [ + _c( + "div", + { staticClass: "input-group" }, + [ + _c("vue-suggestion", { + attrs: { + items: _vm.items, + setLabel: _vm.setLabel, + itemTemplate: _vm.itemTemplate }, - [_vm._v("Zobraz")] - ) - ]) - ], - 1 - ) + on: { changed: _vm.inputChange, selected: _vm.itemSelected }, + model: { + value: _vm.item, + callback: function($$v) { + _vm.item = $$v + }, + expression: "item" + } + }), + _vm._v(" "), + _c("span", { staticClass: "input-group-append" }, [ + _c( + "button", + { + staticClass: "btn btn-secondary", + attrs: { type: "button" }, + on: { + click: function($event) { + return _vm.submit() + } + } + }, + [_vm._v("Zobraz")] + ) + ]) + ], + 1 + ), + _vm._v(" "), + _c("input", { + attrs: { type: "hidden", name: "_token" }, + domProps: { value: _vm.csrf } + }) + ]) ]) ]) } @@ -66037,6 +66309,40 @@ render._withStripped = true +/***/ }), + +/***/ "./node_modules/vue-loader/lib/loaders/templateLoader.js?!./node_modules/vue-loader/lib/index.js?!./resources/js/components/SearchTable.vue?vue&type=template&id=04a036eb&": +/*!**************************************************************************************************************************************************************************************************************!*\ + !*** ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./resources/js/components/SearchTable.vue?vue&type=template&id=04a036eb& ***! + \**************************************************************************************************************************************************************************************************************/ +/*! exports provided: render, staticRenderFns */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "render", function() { return render; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "staticRenderFns", function() { return staticRenderFns; }); +var render = function() { + var _vm = this + var _h = _vm.$createElement + var _c = _vm._self._c || _h + return _c( + "div", + { staticClass: "table", staticStyle: { width: "100%" } }, + [ + _c("vue-table-dynamic", { + attrs: { params: _vm.params }, + on: { select: _vm.onSelect } + }) + ], + 1 + ) +} +var staticRenderFns = [] +render._withStripped = true + + + /***/ }), /***/ "./node_modules/vue-loader/lib/loaders/templateLoader.js?!./node_modules/vue-loader/lib/index.js?!./resources/js/components/TempGraph.vue?vue&type=template&id=7da20202&scoped=true&": @@ -68614,6 +68920,17 @@ if (GlobalVue) { /***/ }), +/***/ "./node_modules/vue-table-dynamic/dist/index.min.js": +/*!**********************************************************!*\ + !*** ./node_modules/vue-table-dynamic/dist/index.min.js ***! + \**********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +!function(t,e){if(true)module.exports=e();else { var n, i; }}(window,(function(){return function(t){var e={};function i(n){if(e[n])return e[n].exports;var r=e[n]={i:n,l:!1,exports:{}};return t[n].call(r.exports,r,r.exports,i),r.l=!0,r.exports}return i.m=t,i.c=e,i.d=function(t,e,n){i.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i.t=function(t,e){if(1&e&&(t=i(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)i.d(n,r,function(e){return t[e]}.bind(null,r));return n},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="dist/",i(i.s=111)}([function(t,e){var i=t.exports={version:"2.6.11"};"number"==typeof __e&&(__e=i)},function(t,e){var i=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=i)},function(t,e,i){t.exports=!i(9)((function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}))},function(t,e){var i={}.hasOwnProperty;t.exports=function(t,e){return i.call(t,e)}},function(t,e,i){var n=i(19),r=i(45),o=i(35),a=Object.defineProperty;e.f=i(2)?Object.defineProperty:function(t,e,i){if(n(t),e=o(e,!0),n(i),r)try{return a(t,e,i)}catch(t){}if("get"in i||"set"in i)throw TypeError("Accessors not supported!");return"value"in i&&(t[e]=i.value),t}},function(t,e){t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var i=function(t,e){var i=t[1]||"",n=t[3];if(!n)return i;if(e&&"function"==typeof btoa){var r=(a=n,"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(a))))+" */"),o=n.sources.map((function(t){return"/*# sourceURL="+n.sourceRoot+t+" */"}));return[i].concat(o).concat([r]).join("\n")}var a;return[i].join("\n")}(e,t);return e[2]?"@media "+e[2]+"{"+i+"}":i})).join("")},e.i=function(t,i){"string"==typeof t&&(t=[[null,t,""]]);for(var n={},r=0;ri.parts.length&&(n.parts.length=i.parts.length)}else{var a=[];for(r=0;r0?n:i)(t)}},function(t,e,i){var n=i(33)("keys"),r=i(18);t.exports=function(t){return n[t]||(n[t]=r(t))}},function(t,e,i){var n=i(0),r=i(1),o=r["__core-js_shared__"]||(r["__core-js_shared__"]={});(t.exports=function(t,e){return o[t]||(o[t]=void 0!==e?e:{})})("versions",[]).push({version:n.version,mode:i(17)?"pure":"global",copyright:"© 2019 Denis Pushkarev (zloirock.ru)"})},function(t,e){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(t,e,i){var n=i(14);t.exports=function(t,e){if(!n(t))return t;var i,r;if(e&&"function"==typeof(i=t.toString)&&!n(r=i.call(t)))return r;if("function"==typeof(i=t.valueOf)&&!n(r=i.call(t)))return r;if(!e&&"function"==typeof(i=t.toString)&&!n(r=i.call(t)))return r;throw TypeError("Can't convert object to primitive value")}},function(t,e){e.f=Object.getOwnPropertySymbols},function(t,e){t.exports={}},function(t,e,i){var n=i(4).f,r=i(3),o=i(10)("toStringTag");t.exports=function(t,e,i){t&&!r(t=i?t:t.prototype,o)&&n(t,o,{configurable:!0,value:e})}},function(t,e,i){e.f=i(10)},function(t,e,i){var n=i(1),r=i(0),o=i(17),a=i(39),s=i(4).f;t.exports=function(t){var e=r.Symbol||(r.Symbol=o?{}:n.Symbol||{});"_"==t.charAt(0)||t in e||s(e,t,{value:a.f(t)})}},function(t,e,i){"use strict";e.__esModule=!0;var n=a(i(66)),r=a(i(11)),o="function"==typeof r.default&&"symbol"==typeof n.default?function(t){return typeof t}:function(t){return t&&"function"==typeof r.default&&t.constructor===r.default&&t!==r.default.prototype?"symbol":typeof t};function a(t){return t&&t.__esModule?t:{default:t}}e.default="function"==typeof r.default&&"symbol"===o(n.default)?function(t){return void 0===t?"undefined":o(t)}:function(t){return t&&"function"==typeof r.default&&t.constructor===r.default&&t!==r.default.prototype?"symbol":void 0===t?"undefined":o(t)}},function(t,e,i){var n=i(3),r=i(7),o=i(56)(!1),a=i(32)("IE_PROTO");t.exports=function(t,e){var i,s=r(t),A=0,l=[];for(i in s)i!=a&&n(s,i)&&l.push(i);for(;e.length>A;)n(s,i=e[A++])&&(~o(l,i)||l.push(i));return l}},function(t,e,i){var n=i(44);t.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==n(t)?t.split(""):Object(t)}},function(t,e){var i={}.toString;t.exports=function(t){return i.call(t).slice(8,-1)}},function(t,e,i){t.exports=!i(2)&&!i(9)((function(){return 7!=Object.defineProperty(i(46)("div"),"a",{get:function(){return 7}}).a}))},function(t,e,i){var n=i(14),r=i(1).document,o=n(r)&&n(r.createElement);t.exports=function(t){return o?r.createElement(t):{}}},function(t,e,i){"use strict";var n=i(17),r=i(13),o=i(48),a=i(8),s=i(37),A=i(70),l=i(38),c=i(73),u=i(10)("iterator"),f=!([].keys&&"next"in[].keys()),h=function(){return this};t.exports=function(t,e,i,d,p,g,v){A(i,e,d);var b,m,w,y=function(t){if(!f&&t in k)return k[t];switch(t){case"keys":case"values":return function(){return new i(this,t)}}return function(){return new i(this,t)}},x=e+" Iterator",C="values"==p,B=!1,k=t.prototype,D=k[u]||k["@@iterator"]||p&&k[p],z=D||y(p),I=p?C?y("entries"):z:void 0,M="Array"==e&&k.entries||D;if(M&&(w=c(M.call(new t)))!==Object.prototype&&w.next&&(l(w,x,!0),n||"function"==typeof w[u]||a(w,u,h)),C&&D&&"values"!==D.name&&(B=!0,z=function(){return D.call(this)}),n&&!v||!f&&!B&&k[u]||a(k,u,z),s[e]=z,s[x]=h,p)if(b={values:C?z:y("values"),keys:g?z:y("keys"),entries:I},v)for(m in b)m in k||o(k,m,b[m]);else r(r.P+r.F*(f||B),e,b);return b}},function(t,e,i){t.exports=i(8)},function(t,e,i){var n=i(19),r=i(71),o=i(34),a=i(32)("IE_PROTO"),s=function(){},A=function(){var t,e=i(46)("iframe"),n=o.length;for(e.style.display="none",i(72).appendChild(e),e.src="javascript:",(t=e.contentWindow.document).open(),t.write(" diff --git a/resources/js/components/SearchTable.vue b/resources/js/components/SearchTable.vue new file mode 100644 index 0000000..fecd43c --- /dev/null +++ b/resources/js/components/SearchTable.vue @@ -0,0 +1,42 @@ + + + \ No newline at end of file diff --git a/resources/sass/_suggest.scss b/resources/sass/_suggest.scss index 001b0e6..f264af0 100644 --- a/resources/sass/_suggest.scss +++ b/resources/sass/_suggest.scss @@ -29,6 +29,7 @@ border-top: none; max-height: 400px; overflow-y: auto; + z-index: 100; border-bottom: 1px solid #023d7b; } .vue-suggestion .vs__list .vs__list-item { diff --git a/resources/views/lastactive.blade.php b/resources/views/lastactive.blade.php new file mode 100644 index 0000000..5f31e59 --- /dev/null +++ b/resources/views/lastactive.blade.php @@ -0,0 +1,43 @@ +@extends('master') + +@section('title') +
+ Last active in 15 min +
+@stop + +@section('links') + +@stop + +@section('content') +@isset($data) + + + + + + + + + + + + + @foreach ($data as $r) + + + + + + + + @endforeach + + +
IPMeno PCUžívateľOdDo
{{$r->ip}}{{$r->comp}}{{$r->name}}{{$r->f}}{{$r->t}}
+@endisset + +@stop \ No newline at end of file diff --git a/resources/views/master.blade.php b/resources/views/master.blade.php index 93ab252..0e9797a 100644 --- a/resources/views/master.blade.php +++ b/resources/views/master.blade.php @@ -12,6 +12,11 @@ + + + @section('head') + + @show