Skip to content
Snippets Groups Projects
Commit da900725 authored by Tibo's avatar Tibo
Browse files

Cleaning...

parent cf071cd2
No related branches found
No related tags found
No related merge requests found
/client/target/
\ No newline at end of file
/client/target/
/web/nbproject/private/
\ No newline at end of file
......@@ -5,7 +5,7 @@ APP_DEBUG=true
APP_LOG_LEVEL=debug
APP_URL=http://localhost
DB_CONNECTION=mysql
DB_CONNECTION=sqlite
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=homestead
......@@ -23,8 +23,8 @@ REDIS_PASSWORD=null
REDIS_PORT=6379
MAIL_DRIVER=smtp
MAIL_HOST=smtp.mailtrap.io
MAIL_PORT=2525
MAIL_HOST=127.0.0.1
MAIL_PORT=1025
MAIL_USERNAME=null
MAIL_PASSWORD=null
MAIL_ENCRYPTION=null
......
# Monitoring - Webapp
## Installation
Requires PHP mongodb extension:
https://docs.mongodb.com/ecosystem/drivers/php/
https://pecl.php.net/package/mongodb
```
sudo pecl install mongodb-1.4.4
```
```
composer install
touch storage/app/db.sqlite
cp .env.example .env
php artisan migrate
php artisan key:generate
```
\ No newline at end of file
......@@ -10,7 +10,7 @@
"jenssegers/mongodb": "^3.3",
"laravel/framework": "5.5.*",
"laravel/tinker": "~1.0",
"laravelcollective/html": "~5.0"
"laravelcollective/html": "~5.0"
},
"require-dev": {
"filp/whoops": "~2.0",
......
......@@ -35,7 +35,8 @@ return [
'sqlite' => [
'driver' => 'sqlite',
'database' => env('DB_DATABASE', database_path('database.sqlite')),
//'database' => env('DB_DATABASE', database_path('database.sqlite')),
'database' => __DIR__ . '/../storage/app/db.sqlite',
'prefix' => '',
],
......@@ -71,9 +72,9 @@ return [
'driver' => 'mongodb',
'host' => env('DB_MONGO_HOST', 'localhost'),
'port' => env('DB_MONGO_PORT', 27017),
'database' => env('DB_MONGO_DATABASE', 'records'),
'username' => env('DB_MONGO_USERNAME', 'admin2'),
'password' => env('DB_MONGO_PASSWORD', 'admin'),
'database' => env('DB_MONGO_DATABASE', 'monitor'),
'username' => env('DB_MONGO_USERNAME', ''),
'password' => env('DB_MONGO_PASSWORD', ''),
'options' => array(
'db' => 'admin' // sets the authentication database required by mongo 3
)
......
include.path=${php.global.include.path}
php.version=PHP_70
source.encoding=UTF-8
src.dir=.
tags.asp=false
tags.short=false
web.root=.
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://www.netbeans.org/ns/project/1">
<type>org.netbeans.modules.php.project</type>
<configuration>
<data xmlns="http://www.netbeans.org/ns/php-project/1">
<name>web</name>
</data>
</configuration>
</project>
<p align="center"><img src="https://laravel.com/assets/img/components/logo-laravel.svg"></p>
<p align="center">
<a href="https://travis-ci.org/laravel/framework"><img src="https://travis-ci.org/laravel/framework.svg" alt="Build Status"></a>
<a href="https://packagist.org/packages/laravel/framework"><img src="https://poser.pugx.org/laravel/framework/d/total.svg" alt="Total Downloads"></a>
<a href="https://packagist.org/packages/laravel/framework"><img src="https://poser.pugx.org/laravel/framework/v/stable.svg" alt="Latest Stable Version"></a>
<a href="https://packagist.org/packages/laravel/framework"><img src="https://poser.pugx.org/laravel/framework/license.svg" alt="License"></a>
</p>
## About Laravel
Laravel is a web application framework with expressive, elegant syntax. We believe development must be an enjoyable and creative experience to be truly fulfilling. Laravel attempts to take the pain out of development by easing common tasks used in the majority of web projects, such as:
- [Simple, fast routing engine](https://laravel.com/docs/routing).
- [Powerful dependency injection container](https://laravel.com/docs/container).
- Multiple back-ends for [session](https://laravel.com/docs/session) and [cache](https://laravel.com/docs/cache) storage.
- Expressive, intuitive [database ORM](https://laravel.com/docs/eloquent).
- Database agnostic [schema migrations](https://laravel.com/docs/migrations).
- [Robust background job processing](https://laravel.com/docs/queues).
- [Real-time event broadcasting](https://laravel.com/docs/broadcasting).
Laravel is accessible, yet powerful, providing tools needed for large, robust applications.
## Learning Laravel
Laravel has the most extensive and thorough [documentation](https://laravel.com/docs) and video tutorial library of any modern web application framework, making it a breeze to get started learning the framework.
If you're not in the mood to read, [Laracasts](https://laracasts.com) contains over 1100 video tutorials on a range of topics including Laravel, modern PHP, unit testing, JavaScript, and more. Boost the skill level of yourself and your entire team by digging into our comprehensive video library.
## Laravel Sponsors
We would like to extend our thanks to the following sponsors for helping fund on-going Laravel development. If you are interested in becoming a sponsor, please visit the Laravel [Patreon page](http://patreon.com/taylorotwell):
- **[Vehikl](https://vehikl.com/)**
- **[Tighten Co.](https://tighten.co)**
- **[British Software Development](https://www.britishsoftware.co)**
- [Fragrantica](https://www.fragrantica.com)
- [SOFTonSOFA](https://softonsofa.com/)
- [User10](https://user10.com)
- [Soumettre.fr](https://soumettre.fr/)
- [CodeBrisk](https://codebrisk.com)
- [1Forge](https://1forge.com)
- [TECPRESSO](https://tecpresso.co.jp/)
- [Pulse Storm](http://www.pulsestorm.net/)
- [Runtime Converter](http://runtimeconverter.com/)
- [WebL'Agence](https://weblagence.com/)
## Contributing
Thank you for considering contributing to the Laravel framework! The contribution guide can be found in the [Laravel documentation](http://laravel.com/docs/contributions).
## Security Vulnerabilities
If you discover a security vulnerability within Laravel, please send an e-mail to Taylor Otwell via [taylor@laravel.com](mailto:taylor@laravel.com). All security vulnerabilities will be promptly addressed.
## License
The Laravel framework is open-sourced software licensed under the [MIT license](http://opensource.org/licenses/MIT).
@extends('layouts.app')
@section('content')
<div class="py-5">
<div class="container bg-light">
<div class="row bg-primary">
<div class="col-md-12">
<h3 class="display-5 text-light">Dashboard</h3>
</div>
<div class="py-5">
<div class="container bg-light">
<div class="row bg-primary">
<div class="col-md-12">
<h3 class="display-5 text-light">Dashboard</h3>
</div>
<div class="row my-1">
<div class="col-md-12"><a class="text-muted text-xs-center" href="org">
Look at your organizations
</a>
</div>
@foreach($organization as $org)
<div class="col-md-12">
<div class="card border">
<div class="card-header"> {{ $org->name }}<a class="text-dark"
href="{{ route('organization',$org->name) }}"><i
class="pull-right fa fa-lg fa-cog"></i></a></div>
<div class="card-body">
<table class="table">
<thead>
</div>
<div class="row my-1">
<div class="col-md-12">
<a class="text-muted text-xs-center" href="org">
Look at your organizations
</a>
</div>
@foreach($organization as $org)
<div class="col-md-12">
<div class="card border">
<div class="card-header">
{{ $org->name }}
<a class="text-dark" href="{{ route('organization',$org->name) }}">
<i class="pull-right fa fa-lg fa-cog"></i>
</a>
</div>
<div class="card-body">
<table class="table">
<thead>
<tr>
<th scope="col">Server</th>
<th scope="col">Disk</th>
<th scope="col">Reboot</th>
<th scope="col"></th>
</tr>
</thead>
<tbody>
@foreach ($org->servers as $server)
<tr>
<th scope="col">Server</th>
<th scope="col">Disk</th>
<th scope="col">Reboot</th>
<th scope="col"></th>
<th scope="row">{{ $server->name }}</th>
@if ($server->lastState["content"] != null)
<td>{{$server->lastState["diskOk"]}}</td>
<td>
@if($server->lastState["content"]->{"Reboot"})
<p>ok</p>
@else
<p>not ok</p>
@endif
</td>
<td></td>
@else
<td></td>
<td></td>
<td></td>
@endif
<td>
<a class="btn btn-secondary" href="{{ route('serverDetails', $server->id) }}">
Go to details
</a>
</td>
</tr>
</thead>
<tbody>
@foreach ($org->servers as $server)
<tr>
<th scope="row">{{ $server->name }}</th>
@if ($server->lastState["content"] != null)
<td>{{$server->lastState["diskOk"]}}</td>
<td>@if($server->lastState["content"]->{"Reboot"})
<p>ok</p>
@else
<p>not ok</p>
@endif</td>
<td></td>
@else
<td></td>
<td></td>
<td></td>
@endif
<td><a class="btn btn-secondary" href="{{ route('serverDetails',$server->id) }}">Go to details</a></td>
</tr>
@endforeach
</tbody>
</table>
</div>
@endforeach
</tbody>
</table>
</div>
</div>
@endforeach
</div>
</div>
@endforeach
</div>
</div>
</div>
@endsection
......@@ -85,12 +85,12 @@
<div class="links">
@if (Route::has('login'))
@auth
<a href="{{ url('/home') }}">Home</a>
@else
<a href="{{ route('login') }}">Login</a>
<a href="{{ route('register') }}">Register</a>
@endauth
@auth
<a href="{{ url('/home') }}">Home</a>
@else
<a href="{{ route('login') }}">Login</a>
<a href="{{ route('register') }}">Register</a>
@endauth
@endif
</div>
</div>
......
......@@ -19,38 +19,37 @@
<div id="app">
<nav class="navbar navbar-expand-md bg-primary navbar-dark">
<div class="container">
<a class="navbar-brand" href="{{ url('/') }}"><i
class="fa d-inline fa-lg fa-line-chart"></i><b>Monitoring</b></a>
<a class="navbar-brand" href="{{ url('/') }}">
<i class="fa d-inline fa-lg fa-line-chart"></i> <b>Monitoring</b>
</a>
<button class="navbar-toggler navbar-toggler-right" type="button" data-toggle="collapse"
data-target="#navbar2SupportedContent" aria-controls="navbar2SupportedContent" aria-expanded="false"
aria-label="Toggle navigation"><span class="navbar-toggler-icon"></span></button>
aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse text-center justify-content-end" id="navbar2SupportedContent">
<ul class="navbar-nav">
@guest
<li class="nav-item"><a class="nav-link" href="{{ route('login') }}">Login</a></li>
<li class="nav-item"><a class="nav-link" href="{{ route('register') }}">Register</a></li>
@else
<li class="nav-item"><a class="nav-link" href="{{ route('login') }}">Login</a></li>
<li class="nav-item"><a class="nav-link" href="{{ route('register') }}">Register</a></li>
@else
<li class="nav-item">
<a class="nav-link" href="{{ route('organizations') }}">
<i class="fa d-inline fa-lg fa-bookmark-o"></i>&nbsp;My organizations</a>
</li>
<li>
<a class="nav-link" href="{{ route('logout') }}"
onclick="event.preventDefault();
document.getElementById('logout-form').submit();">
Logout
</a>
<li class="nav-item">
<a class="nav-link" href="{{ route('organizations') }}"><i
class="fa d-inline fa-lg fa-bookmark-o"></i>&nbsp;My organizations</a>
</li>
<li>
<a class="nav-link" href="{{ route('logout') }}"
onclick="event.preventDefault();
document.getElementById('logout-form').submit();">
Logout
</a>
<form id="logout-form" action="{{ route('logout') }}" method="POST"
style="display: none;">
{{ csrf_field() }}
</form>
</li>
@endguest
<form id="logout-form" action="{{ route('logout') }}" method="POST"
style="display: none;">
{{ csrf_field() }}
</form>
</li>
@endguest
</ul>
</div>
</div>
......
......@@ -76,5 +76,4 @@
</div>
</div>
</div>
@endsection
......@@ -12,7 +12,7 @@
*/
Route::get('/', function () {
return view('welcome');
return view('index');
});
Auth::routes();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment