-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
bhavin
committed
Jan 31, 2019
0 parents
commit 4e052b1
Showing
34 changed files
with
9,770 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
/node_modules | ||
/vendor | ||
composer.lock | ||
.php_cs.cache |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
{ | ||
"name": "bhavinjr/auditor-view", | ||
"description": "laravel-auditor view", | ||
"type": "library", | ||
"keywords": [ | ||
"mongo", "audit", "laravel", "log", "user", "activity", "log viewer", "activity log viewer", "vue js log viewer", "laravel mongo" | ||
], | ||
"license": "MIT", | ||
"authors": [ | ||
{ | ||
"name": "bhavin", | ||
"email": "bhavinrudani94@gmail.com" | ||
} | ||
], | ||
"minimum-stability": "stable", | ||
"require": { | ||
"msonowal/laravel-auditor": "^0.2" | ||
}, | ||
"autoload": { | ||
"psr-4": { | ||
"Bhavinjr\\Viewdit\\": "src/" | ||
} | ||
}, | ||
"extra": { | ||
"laravel": { | ||
"providers": [ | ||
"Bhavinjr\\Viewdit\\Providers\\ViewditServiceProvider" | ||
] | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<?php | ||
|
||
return [ | ||
|
||
/* | ||
|-------------------------------------------------------------------------- | ||
| Viewdit Route Middleware | ||
|-------------------------------------------------------------------------- | ||
| | ||
| These middleware will get attached onto each Viewdit route, giving you | ||
| the chance to add your own middleware to this list or change any of | ||
| the existing middleware. Or, you can simply stick with this list. | ||
| | ||
*/ | ||
'middleware' => ['web'], | ||
|
||
/* | ||
|-------------------------------------------------------------------------- | ||
| List resources | ||
|-------------------------------------------------------------------------- | ||
| Paginate for the list resources with number of items per page | ||
*/ | ||
'paginate_limit' => 25, | ||
|
||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
{ | ||
"private": true, | ||
"scripts": { | ||
"dev": "npm run development", | ||
"development": "cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js", | ||
"watch": "cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --watch --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js", | ||
"watch-poll": "npm run watch -- --watch-poll", | ||
"hot": "cross-env NODE_ENV=development node_modules/webpack-dev-server/bin/webpack-dev-server.js --inline --hot --config=node_modules/laravel-mix/setup/webpack.config.js", | ||
"prod": "npm run production", | ||
"production": "cross-env NODE_ENV=production node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js" | ||
}, | ||
"dependencies": { | ||
"axios": "^0.15.3", | ||
"bootstrap": "^4.0.0-beta.2", | ||
"jquery": "^3.1.0", | ||
"moment": "^2.10.6", | ||
"popper.js": "^1.12", | ||
"vue": "^2.2.0", | ||
"vue-router": "^2.2.0", | ||
"vue2-datepicker": "^2.9.0" | ||
}, | ||
"devDependencies": { | ||
"cross-env": "^5.0.1", | ||
"es6-promise": "^4.0.5", | ||
"laravel-mix": "^1.4.2" | ||
} | ||
} |
Large diffs are not rendered by default.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"/js/app.js": "/js/app.js?id=80af38476508cc981a24", | ||
"/css/app.css": "/css/app.css?id=bcec80ad96af3cb8f987", | ||
"/js/app.js.map": "/js/app.js.map?id=7c557247be41e92ef8b9", | ||
"/css/app.css.map": "/css/app.css.map?id=5d0439ebaab1434c7ea0" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
# Auditor view | ||
|
||
Auditor view provides a dashboard for [msonowal/laravel-auditor](https://github.com/msonowal/laravel-auditor) package which is used for an activity log(Mongo DB) | ||
|
||
Auditor view is created using Vue Component. Structure and theme from [(laravel/horizon)](https://github.com/laravel/horizon) | ||
|
||
## Installation | ||
|
||
|
||
```bash | ||
composer require bhavinjr/auditor-view | ||
``` | ||
|
||
After installing Auditor view, publish its assets using the `vendor:publish` Artisan command: | ||
|
||
|
||
## Dashboard Authorization | ||
Auditor view exposes a dashboard at `/viewdit`. By default, you will only be able to access this dashboard in the local environment. To define a more specific access policy for the dashboard, you should use the `Viewdit::auth` method. The auth method accepts a callback which should return `true` or `false`, indicating whether the user should have access to the Viewdit dashboard: | ||
|
||
```bash | ||
use Bhavinjr\Viewdit\Viewdit; | ||
|
||
Viewdit::auth(function ($request) { | ||
return //true or false | ||
}); | ||
|
||
``` | ||
|
||
## Credits | ||
|
||
[laravel/horizon](https://github.com/laravel/horizon) and [msonowal/laravel-auditor](https://github.com/msonowal/laravel-auditor) | ||
|
||
## Contributing | ||
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change. | ||
|
||
Please make sure to update tests as appropriate. | ||
|
||
## License | ||
[MIT](https://choosealicense.com/licenses/mit/) |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
import Vue from 'vue'; | ||
import axios from 'axios' | ||
import moment from 'moment'; | ||
import router from './router'; | ||
import App from './components/App.vue'; | ||
|
||
window.$ = window.jQuery = require('jquery'); | ||
|
||
require('bootstrap'); | ||
|
||
$('body').tooltip({ | ||
selector: '[data-toggle=tooltip]' | ||
}); | ||
|
||
Vue.prototype.$http = axios.create(); | ||
|
||
Vue.component('loader', require('./components/Loader.vue')); | ||
|
||
Vue.config.errorHandler = function (err, vm, info) { | ||
console.error(err); | ||
}; | ||
|
||
Vue.filter('truncate', function (text, stop, clamp) { | ||
return text.slice(0, stop) + (stop < text.length ? clamp || '...' : '') | ||
}) | ||
|
||
new Vue({ | ||
el: '#root', | ||
|
||
router, | ||
|
||
/** | ||
* The component's data. | ||
*/ | ||
data() { | ||
return {} | ||
}, | ||
|
||
render: h => h(App), | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<template> | ||
<router-view/> | ||
</template> | ||
|
||
<script> | ||
export default { | ||
name: 'App' | ||
}; | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<template> | ||
<div v-if="yes" class="d-flex justify-content-center p-4"> | ||
<i class="icon mr-2"> | ||
<svg class="fill-primary spin"> | ||
<use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="#zondicon-refresh"></use> | ||
</svg> | ||
</i> | ||
<span>Loading...</span> | ||
</div> | ||
</template> | ||
|
||
<script> | ||
export default { | ||
props: ['yes'], | ||
} | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
<template> | ||
<div class="container-fluid"> | ||
<div id="mainHeader" class="pt-4 pb-4"> | ||
<div class="row"> | ||
<div class="col"> | ||
<img src="/vendor/viewdit/img/horizon.png"> | ||
<strong>Auditor</strong> <span>View</span> | ||
</div> | ||
</div> | ||
</div> | ||
|
||
<main class="mt-4 mb-4"> | ||
<div class="row"> | ||
<div class="col-md-1"> | ||
<main-sidebar/> | ||
</div> | ||
|
||
<div class="col-md-11"> | ||
<slot/> | ||
</div> | ||
</div> | ||
</main> | ||
</div> | ||
</template> | ||
|
||
<script> | ||
import MainSidebar from './MainSidebar.vue' | ||
export default { | ||
components: { | ||
MainSidebar, | ||
} | ||
} | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<template> | ||
<aside id="mainSidebar"> | ||
<ul class="nav flex-column"> | ||
<router-link tag="li" to="/dashboard" active-class="active" class="nav-item"> | ||
<a class="nav-link"> | ||
<i> | ||
<svg> | ||
<use xmlns:xlink="http://www.w3.org/1999/xlink" | ||
xlink:href="#zondicon-dashboard"></use> | ||
</svg> | ||
</i> | ||
Dashboard | ||
</a> | ||
</router-link> | ||
</ul> | ||
</aside> | ||
</template> |
Oops, something went wrong.