forked from simpl-kist/SimPL_public
-
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
root
committed
Dec 4, 2017
0 parents
commit b1f8d68
Showing
1,319 changed files
with
641,382 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,95 @@ | ||
# Release Notes | ||
|
||
## v5.5.0 (2017-08-30) | ||
|
||
### Added | ||
- Added `same_site` to `session.php` config ([#4168](https://github.com/laravel/laravel/pull/4168)) | ||
- Added `TrustProxies` middleware ([e23a1d2](https://github.com/laravel/laravel/commit/e23a1d284f134bfce258cf736ea8667a407ba50c), [#4302](https://github.com/laravel/laravel/pull/4302)) | ||
- Autoload commands ([5d54c21](https://github.com/laravel/laravel/commit/5d54c21ea869a7a5b503f0899307e4728feed11b)) | ||
- Added Whoops ([#4364](https://github.com/laravel/laravel/pull/4364)) | ||
|
||
### Changed | ||
- Refactored exception handler (_too many commits_) | ||
- Renamed `ModelFactory.php` to `UserFactory.php` to encourage separate files ([67a8a11](https://github.com/laravel/laravel/commit/67a8a1157004c4373663ec4a9398780feb6d6fa4)) | ||
- Use `RefreshDatabase` trait ([a536402](https://github.com/laravel/laravel/commit/a536402228108da9423a0db1e0cf492f3f51c8b8), [#4373](https://github.com/laravel/laravel/pull/4373)) | ||
- Use Composer's `@php` directive ([#4278](https://github.com/laravel/laravel/pull/4278)) | ||
- Use `post-autoload-dump` ([2f4d726](https://github.com/laravel/laravel/commit/2f4d72699cdc9b7db953055287697a60b6d8b294)) | ||
- Try to build session cookie name from app name ([#4305](https://github.com/laravel/laravel/pull/4305)) | ||
|
||
### Fixed | ||
- Fixed Apache trailing slash redirect for subdirectory installs ([#4344](https://github.com/laravel/laravel/pull/4344)) | ||
|
||
### Removed | ||
- Dropped `bootstrap/autoload.php` ([#4226](https://github.com/laravel/laravel/pull/4226), [#4227](https://github.com/laravel/laravel/pull/4227), [100f71e](https://github.com/laravel/laravel/commit/100f71e71a24fd8f339a7687557b77dd872b054b)) | ||
- Emptied `$dontReport` array on exception handler ([758392c](https://github.com/laravel/laravel/commit/758392c30fa0b2651ca9409aebb040a64816dde4)) | ||
- Removed `TinkerServiceProvider` ([6db0f35](https://github.com/laravel/laravel/commit/6db0f350fbaa21b2acf788d10961aba983a19be2)) | ||
- Removed migrations from autoload classmap ([#4340](https://github.com/laravel/laravel/pull/4340)) | ||
|
||
|
||
## v5.4.30 (2017-07-20) | ||
|
||
### Changed | ||
- Simplified mix require ([#4283](https://github.com/laravel/laravel/pull/4283)) | ||
- Upgraded Laravel Mix to `^1.0` ([#4294](https://github.com/laravel/laravel/pull/4294)) | ||
- Upgraded `axios` and `cross-env` package ([#4299](https://github.com/laravel/laravel/pull/4299)) | ||
- Ignore Yarn error log ([#4322](https://github.com/laravel/laravel/pull/4322)) | ||
|
||
### Fixed | ||
- Use `app()->getLocale()` ([#4282](https://github.com/laravel/laravel/pull/4282)) | ||
- Use quotes in `app.scss` ([#4287](https://github.com/laravel/laravel/pull/4287)) | ||
|
||
|
||
## v5.4.23 (2017-05-11) | ||
|
||
### Added | ||
- Added SQL Server connection ([#4253](https://github.com/laravel/laravel/pull/4253), [#4254](https://github.com/laravel/laravel/pull/4254)) | ||
|
||
### Changed | ||
- Switch to using meta | ||
- Use CSRF token from `meta` tag, instead of `window.Laravel` object ([#4260](https://github.com/laravel/laravel/pull/4260)) | ||
- Log console error if CSRF token cannot be found ([1155245](https://github.com/laravel/laravel/commit/1155245a596113dc2cd0e9083603fa11df2eacd9)) | ||
|
||
### Fixed | ||
- Added missing `ipv4` and `ipv6` validation messages ([#4261](https://github.com/laravel/laravel/pull/4261)) | ||
|
||
|
||
## v5.4.21 (2017-04-28) | ||
|
||
### Added | ||
- Added `FILESYSTEM_DRIVER` and `FILESYSTEM_CLOUD` environment variables ([#4236](https://github.com/laravel/laravel/pull/4236)) | ||
|
||
### Changed | ||
- Use lowercase doctype ([#4241](https://github.com/laravel/laravel/pull/4241)) | ||
|
||
|
||
## v5.4.19 (2017-04-20) | ||
|
||
### Added | ||
- Added `optimize-autoloader` to `config` in `composer.json` ([#4189](https://github.com/laravel/laravel/pull/4189)) | ||
- Added `.vagrant` directory to `.gitignore` ([#4191](https://github.com/laravel/laravel/pull/4191)) | ||
- Added `npm run development` and `npm run prod` commands ([#4190](https://github.com/laravel/laravel/pull/4190), [#4193](https://github.com/laravel/laravel/pull/4193)) | ||
- Added `APP_NAME` environment variable ([#4204](https://github.com/laravel/laravel/pull/4204)) | ||
|
||
### Changed | ||
- Changed Laravel Mix version to `0.*` ([#4188](https://github.com/laravel/laravel/pull/4188)) | ||
- Add to axios defaults instead of overwriting them ([#4208](https://github.com/laravel/laravel/pull/4208)) | ||
- Added `string` validation rule to `RegisterController` ([#4212](https://github.com/laravel/laravel/pull/4212)) | ||
- Moved Vue inclusion from `bootstrap.js` to `app.js` ([17ec5c5](https://github.com/laravel/laravel/commit/17ec5c51d60bb05985f287f09041c56fcd41d9ce)) | ||
- Only load libraries if present ([d905b2e](https://github.com/laravel/laravel/commit/d905b2e7bede2967d37ed7b260cd9d526bb9cabd)) | ||
- Ignore the NPM debug log ([#4232](https://github.com/laravel/laravel/pull/4232)) | ||
- Use fluent middleware definition in `LoginController` ([#4229](https://github.com/laravel/laravel/pull/4229)) | ||
|
||
|
||
## v5.4.16 (2017-03-17) | ||
|
||
### Added | ||
- Added `unix_socket` to `mysql` in `config/database.php` ()[#4179](https://github.com/laravel/laravel/pull/4179)) | ||
- Added Pusher example code to `bootstrap.js` ([31c2623](https://github.com/laravel/laravel/commit/31c262301899b6cd1a4ce2631ad0e313b444b131)) | ||
|
||
### Changed | ||
- Use `smtp.mailtrap.io` as default `MAIL_HOST` ([#4182](https://github.com/laravel/laravel/pull/4182)) | ||
- Use `resource_path()` in `config/view.php` ([#4165](https://github.com/laravel/laravel/pull/4165)) | ||
- Use `cross-env` binary ([#4167](https://github.com/laravel/laravel/pull/4167)) | ||
|
||
### Removed | ||
- Remove index from password reset `token` column ([#4180](https://github.com/laravel/laravel/pull/4180)) |
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 @@ | ||
<?php | ||
|
||
namespace App; | ||
|
||
use Illuminate\Database\Eloquent\Model; | ||
|
||
class CmsEnvModel extends Model | ||
{ | ||
protected $table = 'vcms_env'; | ||
protected $primaryKey = 'var_key'; | ||
public $timestamps = false; | ||
public $incrementing = false; | ||
|
||
|
||
// | ||
} |
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,79 @@ | ||
<?php | ||
|
||
namespace App\Console\Commands; | ||
|
||
use Illuminate\Console\Command; | ||
use App\JobModel; | ||
use App\kCmsEnvModel; | ||
|
||
class kCmsMonitor extends Command | ||
{ | ||
/** | ||
* The name and signature of the console command. | ||
* | ||
* @var string | ||
*/ | ||
protected $signature = 'kCms:Monitor'; | ||
|
||
/** | ||
* The console command description. | ||
* | ||
* @var string | ||
*/ | ||
protected $description = 'Command description'; | ||
|
||
/** | ||
* Create a new command instance. | ||
* | ||
* @return void | ||
*/ | ||
public function __construct() | ||
{ | ||
parent::__construct(); | ||
} | ||
|
||
/** | ||
* Execute the console command. | ||
* | ||
* @return mixed | ||
*/ | ||
public function handle() | ||
{ | ||
$m = CmsEnvModel::get(); | ||
$env = Array(); | ||
foreach($m as $record){ | ||
$env[$record->var_key] = $record->var_value; | ||
} | ||
while(True){ | ||
$jobs = JobModel::whereNotNull('qinfo')-> // Jobs with qinfo are monitorable | ||
where("status","Running")-> | ||
get(['id','jobid','qinfo','pluginNext','output']); | ||
foreach($jobs as $job){ | ||
if(isset($jobs->qinfo)){ | ||
$qjobs = json_decode($jobs->qinfo); | ||
if(isset($qjobs)){ | ||
$allJobsFinished = true; | ||
foreach($qjobs as $qjob){ | ||
if(isset($output)) unset($output); | ||
exec($env['qstat']." ".$qjob->qid,$output); | ||
if($output[0]!=""){ | ||
$allJobsFinished = false; | ||
} | ||
} | ||
} | ||
} | ||
if($allJobsFinished){ // Running | ||
$job->update(["status","finished"]); | ||
/* pluginNext should be remove, call chains should be defined in plugin | ||
if( has PluginNext ){ | ||
callPlugin(pluginNext, job->output); | ||
}else{ | ||
} | ||
*/ | ||
}else{ | ||
// Log | ||
} | ||
} | ||
} | ||
} | ||
} |
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,42 @@ | ||
<?php | ||
|
||
namespace App\Console; | ||
|
||
use Illuminate\Console\Scheduling\Schedule; | ||
use Illuminate\Foundation\Console\Kernel as ConsoleKernel; | ||
|
||
class Kernel extends ConsoleKernel | ||
{ | ||
/** | ||
* The Artisan commands provided by your application. | ||
* | ||
* @var array | ||
*/ | ||
protected $commands = [ | ||
// | ||
]; | ||
|
||
/** | ||
* Define the application's command schedule. | ||
* | ||
* @param \Illuminate\Console\Scheduling\Schedule $schedule | ||
* @return void | ||
*/ | ||
protected function schedule(Schedule $schedule) | ||
{ | ||
// $schedule->command('inspire') | ||
// ->hourly(); | ||
} | ||
|
||
/** | ||
* Register the commands for the application. | ||
* | ||
* @return void | ||
*/ | ||
protected function commands() | ||
{ | ||
$this->load(__DIR__.'/Commands'); | ||
|
||
require base_path('routes/console.php'); | ||
} | ||
} |
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,53 @@ | ||
<?php | ||
|
||
namespace App\Exceptions; | ||
|
||
use Exception; | ||
use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler; | ||
|
||
class Handler extends ExceptionHandler | ||
{ | ||
/** | ||
* A list of the exception types that are not reported. | ||
* | ||
* @var array | ||
*/ | ||
protected $dontReport = [ | ||
// | ||
]; | ||
|
||
/** | ||
* A list of the inputs that are never flashed for validation exceptions. | ||
* | ||
* @var array | ||
*/ | ||
protected $dontFlash = [ | ||
'password', | ||
'password_confirmation', | ||
]; | ||
|
||
/** | ||
* Report or log an exception. | ||
* | ||
* This is a great spot to send exceptions to Sentry, Bugsnag, etc. | ||
* | ||
* @param \Exception $exception | ||
* @return void | ||
*/ | ||
public function report(Exception $exception) | ||
{ | ||
parent::report($exception); | ||
} | ||
|
||
/** | ||
* Render an exception into an HTTP response. | ||
* | ||
* @param \Illuminate\Http\Request $request | ||
* @param \Exception $exception | ||
* @return \Illuminate\Http\Response | ||
*/ | ||
public function render($request, Exception $exception) | ||
{ | ||
return parent::render($request, $exception); | ||
} | ||
} |
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,80 @@ | ||
<?php | ||
|
||
namespace App\Http\Controllers; | ||
|
||
use Illuminate\Http\Request; | ||
use App\CmsEnvModel; | ||
use App\SolverModel; | ||
use App\PluginModel; | ||
use App\JobModel; | ||
use App\Repository; | ||
class AdminController extends Controller | ||
{ | ||
public function index(){ | ||
return view("admin.index"); | ||
} | ||
public function jobs(){ | ||
$jobs = JobModel::get(['id','name','created_at','updated_at','output','pluginId']); | ||
return view("admin.jobs",compact('jobs')); | ||
} | ||
public function uploadFile(Request $request){ | ||
if( !$request->has('file') ){ | ||
return response()->json("File not passed!",422); | ||
} | ||
$filename = $request->file('file')->store("repository"); | ||
Repository::create([ | ||
'owner' => 1, | ||
'alias' => $request->file('file')->getClientOriginalName(), | ||
'filename' => $filename, | ||
]); | ||
} | ||
public function repository(){ | ||
$repos = Repository::get(); | ||
return view('admin.repository',compact('repos')); | ||
} | ||
public function general(){ | ||
$m = CmsEnvModel::get(); | ||
$env = Array(); | ||
foreach($m as $record){ | ||
$env[$record->var_key] = $record->var_value; | ||
} | ||
return view("admin.general",compact('env')); | ||
} | ||
public function users(){ | ||
return view("admin.users"); | ||
} | ||
public function pages(){ | ||
return view("admin.pages"); | ||
} | ||
public function plugins(){ | ||
$plugins = PluginModel::get(); | ||
return view("admin.plugins",compact('plugins')); | ||
} | ||
public function solvers(){ | ||
$solvers = SolverModel::get(); | ||
return view("admin.solvers",compact('solvers')); | ||
} | ||
public function saveEnv(){ | ||
foreach(['url','title','logo','header','footer','python','mpirun','qsub','qstat','qdel','jobdir'] as $param){ | ||
if(isset($_POST[$param])){ | ||
$env = CmsEnvModel::findOrNew($param); | ||
$env->var_key = $param; | ||
$env->var_value= $_POST[$param]; | ||
$env->save(); | ||
} | ||
} | ||
|
||
} | ||
public function saveSolver(){ | ||
$solver = new SolverModel; | ||
$solver->name = $_POST['name']; | ||
$solver->version = $_POST['version']; | ||
$solver->author = $_POST['author']; | ||
$solver->owner = 1; | ||
$solver->path = $_POST['path']; | ||
$solver->execcmd = $_POST['execcmd']; | ||
$solver->save(); | ||
return redirect(route('admin.solvers')); | ||
} | ||
// | ||
} |
Oops, something went wrong.