diff --git a/.gitignore b/.gitignore index 2eff344..5f87871 100644 --- a/.gitignore +++ b/.gitignore @@ -6,4 +6,5 @@ tmp .DS_Store .idea .sass-cache -/vendor/ \ No newline at end of file +/vendor/ +api/*.sqlite3 \ No newline at end of file diff --git a/README.md b/README.md index a503705..024da11 100644 --- a/README.md +++ b/README.md @@ -1 +1,10 @@ -# virl-scheduler \ No newline at end of file +# virl-scheduler +Setup instructions + +* make sure bower, composer and npm are available on command line +* run **npm update** in virl-scheduler root directory (only if you want to test in devmodes, apache is enough otherwise) +* run **bower update** in virl-scheduler root directory, afterwards verify **bower_components** directory was created +* run **composer update** in virl-scheduler root directory, afterwards verify **vendor** directory was created +* configure apache to use **virl-scheduler** and **index.html** as webroot (make sure rewrite engine is on and .htaccess files are parsed by apache) + +Change hostname for **VIRLRestangular factory** in **app/topologyManager.js** to your VIRL-API-Hostname or IP-Address. diff --git a/api/index.php b/api/index.php index 8c9d894..9dfa146 100644 --- a/api/index.php +++ b/api/index.php @@ -59,7 +59,7 @@ $app->delete('/plannedsims/{id}', function (Request $request, Response $response $array = array($id); $query->execute($array); - return $response->withJson(array("statusText"=>"Simulation mit id ".$id." erfolgreich gelöscht.")); + return $response->withJson(array("statusText"=>"Successfully deleted simulation with id ".$id.".")); }); @@ -100,6 +100,6 @@ $app->post('/plannedsims/new', function (Request $request, Response $response) { $sth = $this->db->prepare('INSERT INTO simulations (timestamp, topo_xml,sessionname,token,username,repeat_interval,repeat_count) VALUES (?, ?, ?,?,?,?,0);'); $sth->execute([intval($timestamp),$XML,$sessionName,$token,$username,$repeat]); - return $response->withJson(array("statusText"=>"Simulation erfolgreich hinzugefügt.")); + return $response->withJson(array("statusText"=>"Successfully added simulation startup.")); }); $app->run(); \ No newline at end of file diff --git a/app/index/controllers/IndexCtrl.js b/app/index/controllers/IndexCtrl.js index f4e44c0..a9096bc 100644 --- a/app/index/controllers/IndexCtrl.js +++ b/app/index/controllers/IndexCtrl.js @@ -54,7 +54,7 @@ angular.module('topologyManager').controller('IndexCtrl', function($scope,VIRLRe }, function(response) { console.log(response); - $scope.addAlert(response.statusText,"danger"); + $scope.addAlert(response.data.statusText,"danger"); }); }; diff --git a/composer.lock b/composer.lock index d833ded..c209386 100644 --- a/composer.lock +++ b/composer.lock @@ -4,23 +4,26 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], - "hash": "6f5d3d05d70b58db9144bb1ca70c8698", + "hash": "0b9550b2cfb4a7517c773cd732b9ecf2", "content-hash": "3b0766dbcef4dfb1a4a2012fef8611d8", "packages": [ { "name": "container-interop/container-interop", - "version": "1.1.0", + "version": "1.2.0", "source": { "type": "git", "url": "https://github.com/container-interop/container-interop.git", - "reference": "fc08354828f8fd3245f77a66b9e23a6bca48297e" + "reference": "79cbf1341c22ec75643d841642dd5d6acd83bdb8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/container-interop/container-interop/zipball/fc08354828f8fd3245f77a66b9e23a6bca48297e", - "reference": "fc08354828f8fd3245f77a66b9e23a6bca48297e", + "url": "https://api.github.com/repos/container-interop/container-interop/zipball/79cbf1341c22ec75643d841642dd5d6acd83bdb8", + "reference": "79cbf1341c22ec75643d841642dd5d6acd83bdb8", "shasum": "" }, + "require": { + "psr/container": "^1.0" + }, "type": "library", "autoload": { "psr-4": { @@ -32,20 +35,21 @@ "MIT" ], "description": "Promoting the interoperability of container objects (DIC, SL, etc.)", - "time": "2014-12-30 15:22:37" + "homepage": "https://github.com/container-interop/container-interop", + "time": "2017-02-14 19:40:03" }, { "name": "nikic/fast-route", - "version": "v1.0.1", + "version": "v1.2.0", "source": { "type": "git", "url": "https://github.com/nikic/FastRoute.git", - "reference": "8ea928195fa9b907f0d6e48312d323c1a13cc2af" + "reference": "b5f95749071c82a8e0f58586987627054400cdf6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nikic/FastRoute/zipball/8ea928195fa9b907f0d6e48312d323c1a13cc2af", - "reference": "8ea928195fa9b907f0d6e48312d323c1a13cc2af", + "url": "https://api.github.com/repos/nikic/FastRoute/zipball/b5f95749071c82a8e0f58586987627054400cdf6", + "reference": "b5f95749071c82a8e0f58586987627054400cdf6", "shasum": "" }, "require": { @@ -75,7 +79,7 @@ "router", "routing" ], - "time": "2016-06-12 19:08:51" + "time": "2017-01-19 11:35:12" }, { "name": "pimple/pimple", @@ -123,6 +127,55 @@ ], "time": "2015-09-11 15:10:35" }, + { + "name": "psr/container", + "version": "1.0.0", + "source": { + "type": "git", + "url": "https://github.com/php-fig/container.git", + "reference": "b7ce3b176482dbbc1245ebf52b181af44c2cf55f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/container/zipball/b7ce3b176482dbbc1245ebf52b181af44c2cf55f", + "reference": "b7ce3b176482dbbc1245ebf52b181af44c2cf55f", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Container\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Common Container Interface (PHP FIG PSR-11)", + "homepage": "https://github.com/php-fig/container", + "keywords": [ + "PSR-11", + "container", + "container-interface", + "container-interop", + "psr" + ], + "time": "2017-02-14 16:28:37" + }, { "name": "psr/http-message", "version": "1.0.1", @@ -175,16 +228,16 @@ }, { "name": "slim/slim", - "version": "3.5.0", + "version": "3.7.0", "source": { "type": "git", "url": "https://github.com/slimphp/Slim.git", - "reference": "184352bc1913d7ba552ab4131d62f4730ddb0893" + "reference": "4254e40d81559e35cdf856bcbaca5f3af468b7ef" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/slimphp/Slim/zipball/184352bc1913d7ba552ab4131d62f4730ddb0893", - "reference": "184352bc1913d7ba552ab4131d62f4730ddb0893", + "url": "https://api.github.com/repos/slimphp/Slim/zipball/4254e40d81559e35cdf856bcbaca5f3af468b7ef", + "reference": "4254e40d81559e35cdf856bcbaca5f3af468b7ef", "shasum": "" }, "require": { @@ -234,14 +287,14 @@ } ], "description": "Slim is a PHP micro framework that helps you quickly write simple yet powerful web applications and APIs", - "homepage": "http://slimframework.com", + "homepage": "https://slimframework.com", "keywords": [ "api", "framework", "micro", "router" ], - "time": "2016-07-26 15:12:13" + "time": "2016-12-20 20:30:47" } ], "packages-dev": [], diff --git a/partials/index.html b/partials/index.html index f6a3a80..d385fb6 100644 --- a/partials/index.html +++ b/partials/index.html @@ -3,23 +3,23 @@
- Neue Topologie starten + Schedule a new topology
- +
- +
- +
@@ -29,7 +29,7 @@
- +
@@ -38,17 +38,17 @@
- +
- - - + + +
- +
@@ -59,7 +59,7 @@
- geplante Simulationen + scheduled simulations
@@ -72,8 +72,8 @@

{{sim.sessionname}}

Status: {{sim.status}}

-

Benutzer: {{sim.username}}

-

Nächste Ausführung: {{sim.timestamp*1000 + sim.repeat_interval*1000 * sim.repeat_count | date:'EEEE, dd.MM.yyyy HH:mm'}}

+

User: {{sim.username}}

+

Next startup: {{sim.timestamp*1000 + sim.repeat_interval*1000 * sim.repeat_count | date:'EEEE, dd.MM.yyyy HH:mm'}}

@@ -85,7 +85,7 @@
- laufende Simulationen für {{credentials.username}} + running simulations for user: {{credentials.username}}
diff --git a/partials/navbar.html b/partials/navbar.html index 1ceea1d..5e65a86 100644 --- a/partials/navbar.html +++ b/partials/navbar.html @@ -12,8 +12,8 @@