├── app ├── .htaccess ├── cache │ └── .gitignore ├── logs │ └── .gitignore ├── AppCache.php ├── autoload.php ├── Resources │ └── views │ │ └── base.html.twig ├── config │ ├── config_test.yml │ ├── routing_dev.yml │ ├── config_prod.yml │ ├── parameters.yml.dist │ ├── routing.yml │ ├── config_dev.yml │ └── config.yml ├── console ├── phpunit.xml.dist ├── AppKernel.php └── check.php ├── bin ├── .htaccess ├── doctrine └── doctrine.php ├── src ├── .htaccess └── FIT │ ├── NetopeerBundle │ ├── Resources │ │ ├── doc │ │ │ └── .gitignore │ │ ├── public │ │ │ ├── .gitignore │ │ │ ├── images │ │ │ │ ├── ico │ │ │ │ │ ├── info.png │ │ │ │ │ ├── ok.png │ │ │ │ │ ├── error.png │ │ │ │ │ ├── 16_alerts.png │ │ │ │ │ ├── 16_home.png │ │ │ │ │ ├── 16_kill.png │ │ │ │ │ ├── 16_lock.png │ │ │ │ │ ├── 16_unlock.png │ │ │ │ │ ├── 24_home.png │ │ │ │ │ ├── 16_download.png │ │ │ │ │ ├── 16_refresh.png │ │ │ │ │ ├── 16_session.png │ │ │ │ │ ├── 16_arrow_down.png │ │ │ │ │ └── 16_users-o50.png │ │ │ │ ├── ajax-loader.gif │ │ │ │ └── loading-bar.gif │ │ │ ├── style │ │ │ │ ├── ui-lightness │ │ │ │ │ └── images │ │ │ │ │ │ ├── animated-overlay.gif │ │ │ │ │ │ ├── ui-icons_222222_256x240.png │ │ │ │ │ │ ├── ui-icons_228ef1_256x240.png │ │ │ │ │ │ ├── ui-icons_ef8c08_256x240.png │ │ │ │ │ │ ├── ui-icons_ffd27a_256x240.png │ │ │ │ │ │ ├── ui-icons_ffffff_256x240.png │ │ │ │ │ │ ├── ui-bg_flat_10_000000_40x100.png │ │ │ │ │ │ ├── ui-bg_glass_100_f6f6f6_1x400.png │ │ │ │ │ │ ├── ui-bg_glass_100_fdf5ce_1x400.png │ │ │ │ │ │ ├── ui-bg_glass_65_ffffff_1x400.png │ │ │ │ │ │ ├── ui-bg_gloss-wave_35_f6a828_500x100.png │ │ │ │ │ │ ├── ui-bg_highlight-soft_75_ffe45c_1x100.png │ │ │ │ │ │ ├── ui-bg_diagonals-thick_18_b81900_40x40.png │ │ │ │ │ │ ├── ui-bg_diagonals-thick_20_666666_40x40.png │ │ │ │ │ │ └── ui-bg_highlight-soft_100_eeeeee_1x100.png │ │ │ │ ├── print.css │ │ │ │ └── ie.css │ │ │ ├── sass │ │ │ │ ├── print.scss │ │ │ │ ├── ie.scss │ │ │ │ └── custom-variables.scss │ │ │ ├── js │ │ │ │ └── bootstrap │ │ │ │ │ └── Bootstrap-3-Typeahead │ │ │ │ │ └── bower.json │ │ │ └── config.rb │ │ ├── translations │ │ │ └── messages.fr.xliff │ │ ├── views │ │ │ ├── Security │ │ │ │ └── logout.html.twig │ │ │ ├── Generate │ │ │ │ └── generateXMLFromModel.html.twig │ │ │ ├── Ajax │ │ │ │ ├── lookupip.html.twig │ │ │ │ └── historyOfConnectedDevices.html.twig │ │ │ └── Registration │ │ │ │ └── register.html.twig │ │ └── config │ │ │ ├── routing.yml │ │ │ └── functionality.yml │ ├── Tests │ │ ├── Codeception │ │ │ ├── _data │ │ │ │ └── dump.sql │ │ │ ├── acceptance │ │ │ │ ├── _bootstrap.php │ │ │ │ ├── ConnectionsCest.php │ │ │ │ ├── InterfacesConfigureCest.php │ │ │ │ ├── NacmConfigureCest.php │ │ │ │ └── DatastoreConfigureCest.php │ │ │ ├── functional │ │ │ │ ├── _bootstrap.php │ │ │ │ └── FormCest.php │ │ │ ├── _helpers │ │ │ │ ├── WebHelper.php │ │ │ │ ├── CodeHelper.php │ │ │ │ └── TestHelper.php │ │ │ ├── _bootstrap.php │ │ │ ├── functional.suite.yml │ │ │ ├── acceptance.suite.yml │ │ │ └── _support │ │ │ │ └── CommonScenarios.php │ │ ├── _files │ │ │ ├── MockClass │ │ │ │ └── Data.php │ │ │ └── completeRequestTree │ │ │ │ ├── turing-machine-data.dsrl │ │ │ │ ├── turing-machine-data.sch │ │ │ │ ├── turing-machine-gdefs.rng │ │ │ │ └── turing-machine-data.rng │ │ ├── codeception.yml │ │ └── Selenium │ │ │ ├── phpunit.xml │ │ │ └── LoginTestCase.php │ ├── FITNetopeerBundle.php │ ├── Form │ │ └── UserType.php │ ├── bin │ │ ├── netconfwebgui-postinstall.sh │ │ └── find-identities.sh │ ├── Controller │ │ ├── RegistrationController.php │ │ └── ModuleControllerInterface.php │ ├── DependencyInjection │ │ ├── Configuration.php │ │ └── FITNetopeerExtension.php │ └── Entity │ │ └── UserSettings.php │ └── Bundle │ ├── ModuleXmlBundle │ ├── Resources │ │ ├── public │ │ │ ├── js │ │ │ │ └── module-xml.js │ │ │ └── style │ │ │ │ └── module-xml.css │ │ ├── views │ │ │ ├── layout.html.twig │ │ │ └── Module │ │ │ │ └── section.html.twig │ │ └── config │ │ │ └── services.xml │ ├── FITModuleXmlBundle.php │ ├── DependencyInjection │ │ ├── Configuration.php │ │ └── FITModuleXmlExtension.php │ └── Controller │ │ └── ModuleController.php │ └── ModuleDefaultBundle │ ├── Resources │ ├── public │ │ ├── .gitignore │ │ ├── netopeerangular │ │ │ ├── README.md │ │ │ ├── css │ │ │ │ ├── fonts │ │ │ │ ├── stylesheets │ │ │ │ │ ├── print.css │ │ │ │ │ └── ie.css │ │ │ │ ├── sass │ │ │ │ │ ├── print.scss │ │ │ │ │ └── ie.scss │ │ │ │ └── config.rb │ │ │ ├── bower_components │ │ │ │ ├── font-awesome-sass │ │ │ │ │ ├── Rakefile │ │ │ │ │ ├── lib │ │ │ │ │ │ ├── font_awesome │ │ │ │ │ │ │ └── sass │ │ │ │ │ │ │ │ ├── version.rb │ │ │ │ │ │ │ │ └── rails │ │ │ │ │ │ │ │ ├── railtie.rb │ │ │ │ │ │ │ │ ├── engine.rb │ │ │ │ │ │ │ │ └── helpers.rb │ │ │ │ │ │ └── font-awesome-sass.rb │ │ │ │ │ ├── Gemfile │ │ │ │ │ ├── assets │ │ │ │ │ │ ├── stylesheets │ │ │ │ │ │ │ ├── _font-awesome-sprockets.scss │ │ │ │ │ │ │ ├── _font-awesome-compass.scss │ │ │ │ │ │ │ ├── font-awesome │ │ │ │ │ │ │ │ ├── _fixed-width.scss │ │ │ │ │ │ │ │ ├── _larger.scss │ │ │ │ │ │ │ │ ├── _list.scss │ │ │ │ │ │ │ │ ├── _core.scss │ │ │ │ │ │ │ │ ├── _stacked.scss │ │ │ │ │ │ │ │ ├── _bordered-pulled.scss │ │ │ │ │ │ │ │ ├── _rotated-flipped.scss │ │ │ │ │ │ │ │ ├── _animated.scss │ │ │ │ │ │ │ │ ├── _mixins.scss │ │ │ │ │ │ │ │ ├── _path.scss │ │ │ │ │ │ │ │ └── _extras.scss │ │ │ │ │ │ │ └── font-awesome.scss │ │ │ │ │ │ └── fonts │ │ │ │ │ │ │ └── font-awesome │ │ │ │ │ │ │ ├── fontawesome-webfont.eot │ │ │ │ │ │ │ ├── fontawesome-webfont.ttf │ │ │ │ │ │ │ ├── fontawesome-webfont.woff │ │ │ │ │ │ │ └── fontawesome-webfont.woff2 │ │ │ │ │ ├── .gitignore │ │ │ │ │ ├── .bower.json │ │ │ │ │ ├── LICENSE.txt │ │ │ │ │ ├── font-awesome-sass.gemspec │ │ │ │ │ └── README.md │ │ │ │ └── angular-ui-sortable │ │ │ │ │ └── sortable.min.js │ │ │ ├── .gitignore │ │ │ ├── js │ │ │ │ ├── directives │ │ │ │ │ ├── switchItem.js │ │ │ │ │ └── addItem.js │ │ │ │ └── services │ │ │ │ │ └── ajaxService.js │ │ │ ├── templates │ │ │ │ ├── types │ │ │ │ │ ├── Array.html │ │ │ │ │ ├── List.html │ │ │ │ │ └── Object.html │ │ │ │ ├── directives │ │ │ │ │ ├── switchItem.html │ │ │ │ │ └── addItem.html │ │ │ │ └── main │ │ │ │ │ └── view.html │ │ │ ├── package.json │ │ │ ├── gulpfile.js │ │ │ ├── bower.json │ │ │ ├── data │ │ │ │ ├── test.xml │ │ │ │ └── get.json │ │ │ ├── LICENSE │ │ │ └── index.html │ │ ├── images │ │ │ ├── dot.png │ │ │ └── ico │ │ │ │ ├── add_child.png │ │ │ │ ├── sort_item.png │ │ │ │ ├── add_sibling.png │ │ │ │ └── remove_child.png │ │ ├── config.rb │ │ └── js │ │ │ └── module-default.js │ ├── config │ │ └── services.xml │ └── views │ │ ├── Module │ │ ├── subsection.html.twig │ │ └── showRPCForm.html.twig │ │ ├── layout.html.twig │ │ └── Config │ │ └── parent.html.twig │ ├── FITModuleDefaultBundle.php │ └── DependencyInjection │ ├── Configuration.php │ └── FITModuleDefaultExtension.php ├── install ├── bootstrap.sh ├── .gitignore ├── Vagrantfile ├── netopeergui.conf.in ├── Makefile.am ├── centos7 │ └── install.sh ├── ubuntu │ └── Vagrantfile └── configure.ac ├── composer.phar ├── web ├── favicon.ico ├── apple-touch-icon.png ├── robots.txt ├── app.php ├── app_dev.php └── .htaccess ├── screenshots ├── rpc-1.png ├── rpc-2.png ├── rpc-3.png ├── rpc-4.png ├── rpc-5.png ├── rpc-6.png ├── rpc-7.png ├── backup-1.png ├── backup-2.png ├── backup-3.png ├── notif-1.png ├── notif-2.png ├── validate-1.png ├── validate-2.png ├── conn-device-1.png ├── conn-device-2.png ├── conn-device-3.png ├── conn-device-4.png ├── datastores-1.png ├── datastores-2.png ├── datastores-4.png ├── datastores-5.png ├── insertion-1.png ├── insertion-10.png ├── insertion-11.png ├── insertion-2.png ├── insertion-3.png ├── insertion-4.png ├── insertion-5.png ├── insertion-6.png ├── insertion-7.png ├── insertion-8-2.png ├── insertion-8.png ├── insertion-9.png ├── login-screen.png ├── main-screen-1.png ├── main-screen-2.png ├── main-screen-3.png ├── main-screen-4.png ├── main-screen-5.png ├── main-screen.png ├── userorder-1-2.png ├── userorder-1.png ├── userorder-2.png ├── userorder-3.png ├── datastores-4-2.png ├── insertion-10-2.png ├── login-screen-1.png ├── login-screen-2.png ├── main-screen-3-2.png └── logo-cesnet-inverted.png ├── .gitmodules ├── .gitignore ├── install-no-composer.sh ├── LICENSE └── composer.json /app/.htaccess: -------------------------------------------------------------------------------- 1 | deny from all -------------------------------------------------------------------------------- /bin/.htaccess: -------------------------------------------------------------------------------- 1 | deny from all -------------------------------------------------------------------------------- /src/.htaccess: -------------------------------------------------------------------------------- 1 | deny from all -------------------------------------------------------------------------------- /app/cache/.gitignore: -------------------------------------------------------------------------------- 1 | [^.]* 2 | 3 | -------------------------------------------------------------------------------- /app/logs/.gitignore: -------------------------------------------------------------------------------- 1 | [^.]* 2 | 3 | -------------------------------------------------------------------------------- /bin/doctrine: -------------------------------------------------------------------------------- 1 | ../vendor/doctrine/orm/bin/doctrine -------------------------------------------------------------------------------- /bin/doctrine.php: -------------------------------------------------------------------------------- 1 | ../vendor/doctrine/orm/bin/doctrine.php -------------------------------------------------------------------------------- /install/bootstrap.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | autoreconf -fi 3 | -------------------------------------------------------------------------------- /src/FIT/NetopeerBundle/Resources/doc/.gitignore: -------------------------------------------------------------------------------- 1 | [^.]* 2 | -------------------------------------------------------------------------------- /src/FIT/Bundle/ModuleXmlBundle/Resources/public/js/module-xml.js: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/FIT/Bundle/ModuleXmlBundle/Resources/public/style/module-xml.css: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/FIT/Bundle/ModuleDefaultBundle/Resources/public/.gitignore: -------------------------------------------------------------------------------- 1 | .sass-cache 2 | -------------------------------------------------------------------------------- /src/FIT/Bundle/ModuleDefaultBundle/Resources/public/netopeerangular/README.md: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /composer.phar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CESNET/Netopeer-GUI/HEAD/composer.phar -------------------------------------------------------------------------------- /web/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CESNET/Netopeer-GUI/HEAD/web/favicon.ico -------------------------------------------------------------------------------- /screenshots/rpc-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CESNET/Netopeer-GUI/HEAD/screenshots/rpc-1.png -------------------------------------------------------------------------------- /screenshots/rpc-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CESNET/Netopeer-GUI/HEAD/screenshots/rpc-2.png -------------------------------------------------------------------------------- /screenshots/rpc-3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CESNET/Netopeer-GUI/HEAD/screenshots/rpc-3.png -------------------------------------------------------------------------------- /screenshots/rpc-4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CESNET/Netopeer-GUI/HEAD/screenshots/rpc-4.png -------------------------------------------------------------------------------- /screenshots/rpc-5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CESNET/Netopeer-GUI/HEAD/screenshots/rpc-5.png -------------------------------------------------------------------------------- /screenshots/rpc-6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CESNET/Netopeer-GUI/HEAD/screenshots/rpc-6.png -------------------------------------------------------------------------------- /screenshots/rpc-7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CESNET/Netopeer-GUI/HEAD/screenshots/rpc-7.png -------------------------------------------------------------------------------- /screenshots/backup-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CESNET/Netopeer-GUI/HEAD/screenshots/backup-1.png -------------------------------------------------------------------------------- /screenshots/backup-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CESNET/Netopeer-GUI/HEAD/screenshots/backup-2.png -------------------------------------------------------------------------------- /screenshots/backup-3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CESNET/Netopeer-GUI/HEAD/screenshots/backup-3.png -------------------------------------------------------------------------------- /screenshots/notif-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CESNET/Netopeer-GUI/HEAD/screenshots/notif-1.png -------------------------------------------------------------------------------- /screenshots/notif-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CESNET/Netopeer-GUI/HEAD/screenshots/notif-2.png -------------------------------------------------------------------------------- /src/FIT/NetopeerBundle/Resources/public/.gitignore: -------------------------------------------------------------------------------- 1 | ./docu 2 | .sass-cache 3 | style/variables.css 4 | -------------------------------------------------------------------------------- /web/apple-touch-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CESNET/Netopeer-GUI/HEAD/web/apple-touch-icon.png -------------------------------------------------------------------------------- /screenshots/validate-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CESNET/Netopeer-GUI/HEAD/screenshots/validate-1.png -------------------------------------------------------------------------------- /screenshots/validate-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CESNET/Netopeer-GUI/HEAD/screenshots/validate-2.png -------------------------------------------------------------------------------- /screenshots/conn-device-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CESNET/Netopeer-GUI/HEAD/screenshots/conn-device-1.png -------------------------------------------------------------------------------- /screenshots/conn-device-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CESNET/Netopeer-GUI/HEAD/screenshots/conn-device-2.png -------------------------------------------------------------------------------- /screenshots/conn-device-3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CESNET/Netopeer-GUI/HEAD/screenshots/conn-device-3.png -------------------------------------------------------------------------------- /screenshots/conn-device-4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CESNET/Netopeer-GUI/HEAD/screenshots/conn-device-4.png -------------------------------------------------------------------------------- /screenshots/datastores-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CESNET/Netopeer-GUI/HEAD/screenshots/datastores-1.png -------------------------------------------------------------------------------- /screenshots/datastores-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CESNET/Netopeer-GUI/HEAD/screenshots/datastores-2.png -------------------------------------------------------------------------------- /screenshots/datastores-4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CESNET/Netopeer-GUI/HEAD/screenshots/datastores-4.png -------------------------------------------------------------------------------- /screenshots/datastores-5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CESNET/Netopeer-GUI/HEAD/screenshots/datastores-5.png -------------------------------------------------------------------------------- /screenshots/insertion-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CESNET/Netopeer-GUI/HEAD/screenshots/insertion-1.png -------------------------------------------------------------------------------- /screenshots/insertion-10.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CESNET/Netopeer-GUI/HEAD/screenshots/insertion-10.png -------------------------------------------------------------------------------- /screenshots/insertion-11.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CESNET/Netopeer-GUI/HEAD/screenshots/insertion-11.png -------------------------------------------------------------------------------- /screenshots/insertion-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CESNET/Netopeer-GUI/HEAD/screenshots/insertion-2.png -------------------------------------------------------------------------------- /screenshots/insertion-3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CESNET/Netopeer-GUI/HEAD/screenshots/insertion-3.png -------------------------------------------------------------------------------- /screenshots/insertion-4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CESNET/Netopeer-GUI/HEAD/screenshots/insertion-4.png -------------------------------------------------------------------------------- /screenshots/insertion-5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CESNET/Netopeer-GUI/HEAD/screenshots/insertion-5.png -------------------------------------------------------------------------------- /screenshots/insertion-6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CESNET/Netopeer-GUI/HEAD/screenshots/insertion-6.png -------------------------------------------------------------------------------- /screenshots/insertion-7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CESNET/Netopeer-GUI/HEAD/screenshots/insertion-7.png -------------------------------------------------------------------------------- /screenshots/insertion-8-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CESNET/Netopeer-GUI/HEAD/screenshots/insertion-8-2.png -------------------------------------------------------------------------------- /screenshots/insertion-8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CESNET/Netopeer-GUI/HEAD/screenshots/insertion-8.png -------------------------------------------------------------------------------- /screenshots/insertion-9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CESNET/Netopeer-GUI/HEAD/screenshots/insertion-9.png -------------------------------------------------------------------------------- /screenshots/login-screen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CESNET/Netopeer-GUI/HEAD/screenshots/login-screen.png -------------------------------------------------------------------------------- /screenshots/main-screen-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CESNET/Netopeer-GUI/HEAD/screenshots/main-screen-1.png -------------------------------------------------------------------------------- /screenshots/main-screen-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CESNET/Netopeer-GUI/HEAD/screenshots/main-screen-2.png -------------------------------------------------------------------------------- /screenshots/main-screen-3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CESNET/Netopeer-GUI/HEAD/screenshots/main-screen-3.png -------------------------------------------------------------------------------- /screenshots/main-screen-4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CESNET/Netopeer-GUI/HEAD/screenshots/main-screen-4.png -------------------------------------------------------------------------------- /screenshots/main-screen-5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CESNET/Netopeer-GUI/HEAD/screenshots/main-screen-5.png -------------------------------------------------------------------------------- /screenshots/main-screen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CESNET/Netopeer-GUI/HEAD/screenshots/main-screen.png -------------------------------------------------------------------------------- /screenshots/userorder-1-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CESNET/Netopeer-GUI/HEAD/screenshots/userorder-1-2.png -------------------------------------------------------------------------------- /screenshots/userorder-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CESNET/Netopeer-GUI/HEAD/screenshots/userorder-1.png -------------------------------------------------------------------------------- /screenshots/userorder-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CESNET/Netopeer-GUI/HEAD/screenshots/userorder-2.png -------------------------------------------------------------------------------- /screenshots/userorder-3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CESNET/Netopeer-GUI/HEAD/screenshots/userorder-3.png -------------------------------------------------------------------------------- /src/FIT/NetopeerBundle/Tests/Codeception/_data/dump.sql: -------------------------------------------------------------------------------- 1 | /* Replace this file with actual dump of your database */ -------------------------------------------------------------------------------- /screenshots/datastores-4-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CESNET/Netopeer-GUI/HEAD/screenshots/datastores-4-2.png -------------------------------------------------------------------------------- /screenshots/insertion-10-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CESNET/Netopeer-GUI/HEAD/screenshots/insertion-10-2.png -------------------------------------------------------------------------------- /screenshots/login-screen-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CESNET/Netopeer-GUI/HEAD/screenshots/login-screen-1.png -------------------------------------------------------------------------------- /screenshots/login-screen-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CESNET/Netopeer-GUI/HEAD/screenshots/login-screen-2.png -------------------------------------------------------------------------------- /screenshots/main-screen-3-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CESNET/Netopeer-GUI/HEAD/screenshots/main-screen-3-2.png -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "netopeerguid"] 2 | path = install/netopeerguid 3 | url = https://github.com/CESNET/netopeerguid 4 | -------------------------------------------------------------------------------- /screenshots/logo-cesnet-inverted.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CESNET/Netopeer-GUI/HEAD/screenshots/logo-cesnet-inverted.png -------------------------------------------------------------------------------- /src/FIT/Bundle/ModuleDefaultBundle/Resources/public/netopeerangular/css/fonts: -------------------------------------------------------------------------------- 1 | ../bower_components/font-awesome-sass/assets/fonts -------------------------------------------------------------------------------- /web/robots.txt: -------------------------------------------------------------------------------- 1 | # www.robotstxt.org/ 2 | # www.google.com/support/webmasters/bin/answer.py?hl=en&answer=156449 3 | 4 | User-agent: * 5 | -------------------------------------------------------------------------------- /src/FIT/Bundle/ModuleDefaultBundle/Resources/public/netopeerangular/bower_components/font-awesome-sass/Rakefile: -------------------------------------------------------------------------------- 1 | require "bundler/gem_tasks" 2 | -------------------------------------------------------------------------------- /src/FIT/NetopeerBundle/Tests/Codeception/acceptance/_bootstrap.php: -------------------------------------------------------------------------------- 1 | */ 4 | -------------------------------------------------------------------------------- /src/FIT/NetopeerBundle/Resources/public/style/print.css: -------------------------------------------------------------------------------- 1 | /* Welcome to Compass. Use this file to define print styles. 2 | * Import this file using the following HTML or equivalent: 3 | * */ 4 | -------------------------------------------------------------------------------- /src/FIT/Bundle/ModuleDefaultBundle/Resources/public/netopeerangular/bower_components/font-awesome-sass/assets/stylesheets/font-awesome/_fixed-width.scss: -------------------------------------------------------------------------------- 1 | // Fixed Width Icons 2 | // ------------------------- 3 | .#{$fa-css-prefix}-fw { 4 | width: (18em / 14); 5 | text-align: center; 6 | } 7 | -------------------------------------------------------------------------------- /src/FIT/Bundle/ModuleDefaultBundle/Resources/public/netopeerangular/css/stylesheets/print.css: -------------------------------------------------------------------------------- 1 | /* Welcome to Compass. Use this file to define print styles. Import this file using the following HTML or equivalent: */ 2 | -------------------------------------------------------------------------------- /src/FIT/Bundle/ModuleDefaultBundle/Resources/public/netopeerangular/css/sass/print.scss: -------------------------------------------------------------------------------- 1 | /* Welcome to Compass. Use this file to define print styles. 2 | * Import this file using the following HTML or equivalent: 3 | * */ 4 | -------------------------------------------------------------------------------- /src/FIT/NetopeerBundle/Resources/public/sass/ie.scss: -------------------------------------------------------------------------------- 1 | /* Welcome to Compass. Use this file to write IE specific override styles. 2 | * Import this file using the following HTML or equivalent: 3 | * */ 6 | -------------------------------------------------------------------------------- /src/FIT/NetopeerBundle/Resources/public/style/ie.css: -------------------------------------------------------------------------------- 1 | /* Welcome to Compass. Use this file to write IE specific override styles. 2 | * Import this file using the following HTML or equivalent: 3 | * */ 6 | -------------------------------------------------------------------------------- /app/autoload.php: -------------------------------------------------------------------------------- 1 | */ 2 | -------------------------------------------------------------------------------- /src/FIT/Bundle/ModuleDefaultBundle/Resources/public/netopeerangular/bower_components/font-awesome-sass/assets/fonts/font-awesome/fontawesome-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CESNET/Netopeer-GUI/HEAD/src/FIT/Bundle/ModuleDefaultBundle/Resources/public/netopeerangular/bower_components/font-awesome-sass/assets/fonts/font-awesome/fontawesome-webfont.eot -------------------------------------------------------------------------------- /src/FIT/Bundle/ModuleDefaultBundle/Resources/public/netopeerangular/bower_components/font-awesome-sass/assets/fonts/font-awesome/fontawesome-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CESNET/Netopeer-GUI/HEAD/src/FIT/Bundle/ModuleDefaultBundle/Resources/public/netopeerangular/bower_components/font-awesome-sass/assets/fonts/font-awesome/fontawesome-webfont.ttf -------------------------------------------------------------------------------- /src/FIT/Bundle/ModuleDefaultBundle/Resources/public/netopeerangular/bower_components/font-awesome-sass/assets/fonts/font-awesome/fontawesome-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CESNET/Netopeer-GUI/HEAD/src/FIT/Bundle/ModuleDefaultBundle/Resources/public/netopeerangular/bower_components/font-awesome-sass/assets/fonts/font-awesome/fontawesome-webfont.woff -------------------------------------------------------------------------------- /src/FIT/Bundle/ModuleDefaultBundle/Resources/public/netopeerangular/bower_components/font-awesome-sass/assets/fonts/font-awesome/fontawesome-webfont.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CESNET/Netopeer-GUI/HEAD/src/FIT/Bundle/ModuleDefaultBundle/Resources/public/netopeerangular/bower_components/font-awesome-sass/assets/fonts/font-awesome/fontawesome-webfont.woff2 -------------------------------------------------------------------------------- /install/Vagrantfile: -------------------------------------------------------------------------------- 1 | # -*- mode: ruby -*- 2 | # vi: set ft=ruby : 3 | 4 | Vagrant.configure(2) do |config| 5 | config.vm.box = "centos/7" 6 | config.ssh.insert_key = false 7 | 8 | config.vm.network "forwarded_port", guest: 80, host: 2280 9 | 10 | config.vm.provision "shell" do |s| 11 | s.path = "centos7/install.sh" 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /src/FIT/Bundle/ModuleDefaultBundle/Resources/public/netopeerangular/css/sass/ie.scss: -------------------------------------------------------------------------------- 1 | /* Welcome to Compass. Use this file to write IE specific override styles. 2 | * Import this file using the following HTML or equivalent: 3 | * */ 6 | -------------------------------------------------------------------------------- /src/FIT/Bundle/ModuleDefaultBundle/Resources/public/netopeerangular/bower_components/font-awesome-sass/.gitignore: -------------------------------------------------------------------------------- 1 | *.gem 2 | *.rbc 3 | .idea 4 | .bundle 5 | .config 6 | .yardoc 7 | .DS_Store 8 | Gemfile.lock 9 | InstalledFiles 10 | _yardoc 11 | coverage 12 | doc/ 13 | lib/bundler/man 14 | pkg 15 | rdoc 16 | spec/reports 17 | test/tmp 18 | test/version_tmp 19 | tmp 20 | -------------------------------------------------------------------------------- /src/FIT/NetopeerBundle/FITNetopeerBundle.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | {% block title %}Welcome!{% endblock %} 6 | {% block stylesheets %}{% endblock %} 7 | 8 | 9 | 10 | {% block body %}{% endblock %} 11 | {% block javascripts %}{% endblock %} 12 | 13 | 14 | -------------------------------------------------------------------------------- /app/config/config_test.yml: -------------------------------------------------------------------------------- 1 | imports: 2 | - { resource: config_dev.yml } 3 | 4 | parameters: 5 | netopeer.data.class: FIT\NetopeerBundle\Tests\_files\MockClass\Data 6 | 7 | framework: 8 | test: ~ 9 | session: 10 | storage_id: session.storage.mock_file 11 | profiler: 12 | collect: false 13 | 14 | web_profiler: 15 | toolbar: false 16 | intercept_redirects: false 17 | 18 | swiftmailer: 19 | disable_delivery: true 20 | -------------------------------------------------------------------------------- /src/FIT/NetopeerBundle/Resources/public/js/bootstrap/Bootstrap-3-Typeahead/bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "bootstrap3-typeahead", 3 | "version": "3.0.0", 4 | "authors": [ 5 | "bassjobsen" 6 | ], 7 | "main": [ 8 | "bootstrap3-typeahead.js" 9 | ], 10 | "ignore": [ 11 | "**/.*", 12 | "node_modules", 13 | "bower_components", 14 | "test", 15 | "tests" 16 | ], 17 | "dependencies": { 18 | "jquery": ">=1.7.0" 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /src/FIT/Bundle/ModuleDefaultBundle/Resources/public/netopeerangular/bower_components/font-awesome-sass/lib/font_awesome/sass/rails/railtie.rb: -------------------------------------------------------------------------------- 1 | require "font_awesome/sass/rails/helpers" 2 | 3 | module FontAwesome 4 | module Sass 5 | module Rails 6 | class Railtie < ::Rails::Railtie 7 | initializer "font-awesome-sass.view_helpers" do 8 | ActionView::Base.send :include, ViewHelpers 9 | end 10 | end 11 | end 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /src/FIT/NetopeerBundle/Resources/translations/messages.fr.xliff: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Symfony2 is great 7 | J'aime Symfony2 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /install/netopeergui.conf.in: -------------------------------------------------------------------------------- 1 | # 2 | # This configuration file sets the netopeergui location 3 | Alias /@webguiname@ @webguidir@/@webguiname@/web 4 | 5 | 6 | Order allow,deny 7 | Deny from none 8 | Allow from all 9 | # Allow from .example.com 10 | DirectoryIndex app.php 11 | Options FollowSymLinks 12 | 13 | 14 | Options FollowSymLinks 15 | AllowOverride All 16 | 17 | 18 | -------------------------------------------------------------------------------- /src/FIT/NetopeerBundle/Tests/Codeception/functional.suite.yml: -------------------------------------------------------------------------------- 1 | # Codeception Test Suite Configuration 2 | 3 | # suite for functional (integration) tests. 4 | # emulate web requests and make application process them. 5 | # (tip: better to use with frameworks). 6 | 7 | # RUN `build` COMMAND AFTER ADDING/REMOVING MODULES. 8 | 9 | class_name: TestGuy 10 | modules: 11 | enabled: [Symfony2, Doctrine2, Filesystem] 12 | config: 13 | Symfony2: 14 | environment: 'test' -------------------------------------------------------------------------------- /src/FIT/NetopeerBundle/Tests/codeception.yml: -------------------------------------------------------------------------------- 1 | paths: 2 | tests: Codeception 3 | log: Codeception/_log 4 | data: Codeception/_data 5 | helpers: Codeception/_helpers 6 | settings: 7 | bootstrap: _bootstrap.php 8 | suite_class: \PHPUnit_Framework_TestSuite 9 | colors: true 10 | memory_limit: 1024M 11 | log: true 12 | modules: 13 | config: 14 | Db: 15 | dsn: '' 16 | user: '' 17 | password: '' 18 | dump: Codeception/_data/dump.sql 19 | -------------------------------------------------------------------------------- /app/config/routing_dev.yml: -------------------------------------------------------------------------------- 1 | _home: 2 | pattern: / 3 | defaults: { _controller: FITNetopeerBundle:Default:index } 4 | 5 | _wdt: 6 | resource: "@WebProfilerBundle/Resources/config/routing/wdt.xml" 7 | prefix: /_wdt 8 | 9 | _profiler: 10 | resource: "@WebProfilerBundle/Resources/config/routing/profiler.xml" 11 | prefix: /_profiler 12 | 13 | _configurator: 14 | resource: "@SensioDistributionBundle/Resources/config/routing/webconfigurator.xml" 15 | prefix: /_configurator 16 | 17 | _main: 18 | resource: routing.yml 19 | -------------------------------------------------------------------------------- /src/FIT/Bundle/ModuleDefaultBundle/Resources/public/netopeerangular/bower_components/font-awesome-sass/.bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "font-awesome-sass", 3 | "homepage": "https://github.com/FortAwesome/font-awesome-sass", 4 | "version": "4.5.0", 5 | "_release": "4.5.0", 6 | "_resolution": { 7 | "type": "version", 8 | "tag": "4.5.0", 9 | "commit": "a2702a1a047f2bd3a1df32f8f3b88101577e4494" 10 | }, 11 | "_source": "git://github.com/FortAwesome/font-awesome-sass.git", 12 | "_target": "4.x.x", 13 | "_originalSource": "font-awesome-sass" 14 | } -------------------------------------------------------------------------------- /src/FIT/Bundle/ModuleDefaultBundle/Resources/public/netopeerangular/bower_components/font-awesome-sass/assets/stylesheets/font-awesome/_larger.scss: -------------------------------------------------------------------------------- 1 | // Icon Sizes 2 | // ------------------------- 3 | 4 | /* makes the font 33% larger relative to the icon container */ 5 | .#{$fa-css-prefix}-lg { 6 | font-size: (4em / 3); 7 | line-height: (3em / 4); 8 | vertical-align: -15%; 9 | } 10 | .#{$fa-css-prefix}-2x { font-size: 2em; } 11 | .#{$fa-css-prefix}-3x { font-size: 3em; } 12 | .#{$fa-css-prefix}-4x { font-size: 4em; } 13 | .#{$fa-css-prefix}-5x { font-size: 5em; } 14 | -------------------------------------------------------------------------------- /src/FIT/Bundle/ModuleDefaultBundle/Resources/public/netopeerangular/templates/types/Array.html: -------------------------------------------------------------------------------- 1 | 2 |
3 | 4 |
    5 |
  1. 6 | 7 |
  2. 8 |
9 | 10 |
-------------------------------------------------------------------------------- /src/FIT/Bundle/ModuleDefaultBundle/Resources/public/netopeerangular/templates/types/List.html: -------------------------------------------------------------------------------- 1 | 2 |
3 | 4 |
    5 |
  1. 6 | 7 |
  2. 8 |
9 | 10 |
-------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /web/bundles/ 2 | /app/bootstrap* 3 | /app/cache/* 4 | /app/logs/* 5 | /vendor/ 6 | /app/config/parameters.yml 7 | /app/*.db 8 | /bin/doctrine 9 | /bin/doctrine.php 10 | /bin/lightsaml 11 | /bin/phpunit 12 | /bin/codecept 13 | /bin/webunit 14 | /src/FIT/NetopeerBundle/Tests/Codeception/_log/ 15 | /src/FIT/NetopeerBundle/Resources/public/.sass-cache/ 16 | /src/FIT/NetopeerBundle/Data/models/* 17 | /src/winzou/* 18 | /web/phpinfo.php 19 | /web/adminer.php 20 | /web/css/* 21 | /web/js/* 22 | /web/bundles/* 23 | .idea 24 | /src/FIT/NetopeerBundle/Entity/*~ 25 | composer.lock 26 | -------------------------------------------------------------------------------- /src/FIT/Bundle/ModuleDefaultBundle/Resources/public/netopeerangular/bower_components/font-awesome-sass/assets/stylesheets/font-awesome/_list.scss: -------------------------------------------------------------------------------- 1 | // List Icons 2 | // ------------------------- 3 | 4 | .#{$fa-css-prefix}-ul { 5 | padding-left: 0; 6 | margin-left: $fa-li-width; 7 | list-style-type: none; 8 | > li { position: relative; } 9 | } 10 | .#{$fa-css-prefix}-li { 11 | position: absolute; 12 | left: -$fa-li-width; 13 | width: $fa-li-width; 14 | top: (2em / 14); 15 | text-align: center; 16 | &.#{$fa-css-prefix}-lg { 17 | left: -$fa-li-width + (4em / 14); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /app/config/config_prod.yml: -------------------------------------------------------------------------------- 1 | imports: 2 | - { resource: config.yml } 3 | 4 | #framework: 5 | # validation: 6 | # cache: apc 7 | 8 | #doctrine: 9 | # orm: 10 | # metadata_cache_driver: apc 11 | # result_cache_driver: apc 12 | # query_cache_driver: apc 13 | 14 | monolog: 15 | handlers: 16 | main: 17 | type: fingers_crossed 18 | action_level: error 19 | handler: nested 20 | nested: 21 | type: stream 22 | path: %kernel.logs_dir%/%kernel.environment%.log 23 | level: debug 24 | -------------------------------------------------------------------------------- /src/FIT/Bundle/ModuleDefaultBundle/Resources/public/netopeerangular/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "netopeerangular", 3 | "version": "0.0.0", 4 | "description": "angular frontend for netopeer", 5 | "main": "gulpfile.js", 6 | "dependencies": { 7 | "gulp": "~3.9.1", 8 | "gulp-watch": "~4.3.5", 9 | "gulp-angular-templatecache": "~1.8.0", 10 | "gulp-templatecache": "~0.0.4", 11 | "rhaboo": "~3.2.2" 12 | }, 13 | "devDependencies": { 14 | "gulp": "^3.9.1" 15 | }, 16 | "scripts": { 17 | "test": "echo \"Error: no test specified\" && exit 1" 18 | }, 19 | "author": "", 20 | "license": "BSD" 21 | } 22 | -------------------------------------------------------------------------------- /src/FIT/Bundle/ModuleDefaultBundle/Resources/public/netopeerangular/bower_components/font-awesome-sass/assets/stylesheets/font-awesome/_core.scss: -------------------------------------------------------------------------------- 1 | // Base Class Definition 2 | // ------------------------- 3 | 4 | .#{$fa-css-prefix} { 5 | display: inline-block; 6 | font: normal normal normal #{$fa-font-size-base}/#{$fa-line-height-base} FontAwesome; // shortening font declaration 7 | font-size: inherit; // can't have font-size inherit on line above, so need to override 8 | text-rendering: auto; // optimizelegibility throws things off #1094 9 | -webkit-font-smoothing: antialiased; 10 | -moz-osx-font-smoothing: grayscale; 11 | } 12 | -------------------------------------------------------------------------------- /src/FIT/Bundle/ModuleDefaultBundle/Resources/public/netopeerangular/bower_components/font-awesome-sass/lib/font_awesome/sass/rails/engine.rb: -------------------------------------------------------------------------------- 1 | module FontAwesome 2 | module Sass 3 | module Rails 4 | class Engine < ::Rails::Engine 5 | initializer 'font-awesome-sass.assets.precompile', group: :all do |app| 6 | %w(stylesheets fonts).each do |sub| 7 | app.config.assets.paths << root.join('assets', sub).to_s 8 | end 9 | 10 | app.config.assets.precompile << %r(font-awesome/fontawesome-webfont\.(?:eot|svg|ttf|woff|woff2?)$) 11 | end 12 | end 13 | end 14 | end 15 | end 16 | -------------------------------------------------------------------------------- /install-no-composer.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | dir_base=$(pwd) 4 | cmd_base='php app/console' 5 | 6 | cp app/config/parameters.yml.dist app/config/parameters.yml 7 | php vendor/sensio/distribution-bundle/Sensio/Bundle/DistributionBundle/Resources/bin/build_bootstrap.php 8 | ${cmd_base} cache:clear --env=prod 9 | ${cmd_base} assets:install --symlink --relative 10 | ${cmd_base} doctrine:database:create 11 | ${cmd_base} doctrine:generate:entities FIT 12 | ${cmd_base} doctrine:schema:update --force 13 | ${cmd_base} app:user --action=add --user=admin --pass=pass 14 | ${cmd_base} assetic:dump --env=prod --no-debug 15 | ${cmd_base} app:install --post=install 16 | -------------------------------------------------------------------------------- /src/FIT/NetopeerBundle/Tests/Codeception/acceptance.suite.yml: -------------------------------------------------------------------------------- 1 | # Codeception Test Suite Configuration 2 | 3 | # suite for acceptance tests. 4 | # perform tests in browser using the Selenium-like tools. 5 | # powered by Mink (http://mink.behat.org). 6 | # (tip: that's what your customer will see). 7 | # (tip: test your ajax and javascript by one of Mink drivers). 8 | 9 | # RUN `build` COMMAND AFTER ADDING/REMOVING MODULES. 10 | 11 | class_name: WebGuy 12 | modules: 13 | enabled: 14 | - WebDriver 15 | - WebHelper 16 | config: 17 | WebDriver: 18 | url: 'http://netopeer/netopeer-gui/' 19 | browser: chrome 20 | -------------------------------------------------------------------------------- /src/FIT/Bundle/ModuleDefaultBundle/Resources/public/netopeerangular/bower_components/font-awesome-sass/assets/stylesheets/font-awesome/_stacked.scss: -------------------------------------------------------------------------------- 1 | // Stacked Icons 2 | // ------------------------- 3 | 4 | .#{$fa-css-prefix}-stack { 5 | position: relative; 6 | display: inline-block; 7 | width: 2em; 8 | height: 2em; 9 | line-height: 2em; 10 | vertical-align: middle; 11 | } 12 | .#{$fa-css-prefix}-stack-1x, .#{$fa-css-prefix}-stack-2x { 13 | position: absolute; 14 | left: 0; 15 | width: 100%; 16 | text-align: center; 17 | } 18 | .#{$fa-css-prefix}-stack-1x { line-height: inherit; } 19 | .#{$fa-css-prefix}-stack-2x { font-size: 2em; } 20 | .#{$fa-css-prefix}-inverse { color: $fa-inverse; } 21 | -------------------------------------------------------------------------------- /src/FIT/Bundle/ModuleDefaultBundle/Resources/public/netopeerangular/gulpfile.js: -------------------------------------------------------------------------------- 1 | var gulp = require('gulp') 2 | watch = require('gulp-watch') 3 | templateCache = require('gulp-angular-templatecache'); 4 | 5 | gulp.task('default', function () { 6 | return gulp.src('templates/**/*.html') 7 | .pipe(templateCache('templates.js', { 8 | standalone: true, 9 | module: 'configurationTemplates' 10 | })) 11 | .pipe(gulp.dest('public')); 12 | }); 13 | 14 | gulp.task('watch', function () { 15 | gulp.watch('templates/**/*.html', ['default']) 16 | .on('change', function(evt) { 17 | console.log( 18 | '[watcher] File ' + evt.path + ' was ' + evt.type + ', compiling...' 19 | ); 20 | }); 21 | }); 22 | -------------------------------------------------------------------------------- /src/FIT/NetopeerBundle/Tests/_files/completeRequestTree/turing-machine-data.dsrl: -------------------------------------------------------------------------------- 1 | 2 | /nc:data/tm:turing-machine/tm:transition-function/tm:deltatm:outputright/nc:data/tm:turing-machine/tm:transition-function/tm:delta/tm:outputtm:head-moveright 3 | -------------------------------------------------------------------------------- /app/config/parameters.yml.dist: -------------------------------------------------------------------------------- 1 | # This file is auto-generated during the composer install 2 | parameters: 3 | database_driver: pdo_sqlite 4 | database_host: localhost 5 | database_port: ~ 6 | database_name: ~ 7 | database_user: ~ 8 | database_path: '%kernel.root_dir%/netopeerWebGui.db' 9 | database_password: ~ 10 | mailer_transport: smtp 11 | mailer_host: localhost 12 | mailer_user: ~ 13 | mailer_password: ~ 14 | locale: en 15 | secret: fjdpaiouczvjyqperncvmz0900rfq 16 | netopeer_single_instance: false 17 | 18 | saml_entity_id: netopeergui 19 | saml_base_url: https://localhost/netopeergui -------------------------------------------------------------------------------- /src/FIT/Bundle/ModuleXmlBundle/Resources/views/layout.html.twig: -------------------------------------------------------------------------------- 1 | {% extends 'FITNetopeerBundle::layout.html.twig' %} 2 | 3 | {% block moduleJavascripts %} 4 | {% javascripts 5 | '@FITModuleXmlBundle/Resources/public/js/*' 6 | output='js/compiled/module-xml.js' 7 | %} 8 | 9 | {% endjavascripts %} 10 | 11 | 12 | {% endblock %} 13 | 14 | {% block moduleStylesheet %} 15 | {% stylesheets 16 | 'bundles/fitmodulexml/style/*' 17 | filter='cssrewrite' 18 | output='css/module-xml.css' 19 | %} 20 | 21 | {% endstylesheets %} 22 | {% endblock %} -------------------------------------------------------------------------------- /src/FIT/Bundle/ModuleDefaultBundle/Resources/public/netopeerangular/bower_components/font-awesome-sass/lib/font_awesome/sass/rails/helpers.rb: -------------------------------------------------------------------------------- 1 | module FontAwesome 2 | module Sass 3 | module Rails 4 | module ViewHelpers 5 | def icon(icon, text = nil, html_options = {}) 6 | text, html_options = nil, text if text.is_a?(Hash) 7 | 8 | content_class = "fa fa-#{icon}" 9 | content_class << " #{html_options[:class]}" if html_options.key?(:class) 10 | html_options[:class] = content_class 11 | 12 | html = content_tag(:i, nil, html_options) 13 | html << ' ' << text.to_s unless text.blank? 14 | html 15 | end 16 | end 17 | end 18 | end 19 | end 20 | -------------------------------------------------------------------------------- /app/config/routing.yml: -------------------------------------------------------------------------------- 1 | FITNetopeerBundle: 2 | resource: "@FITNetopeerBundle/Controller" 3 | type: annotation 4 | prefix: / 5 | 6 | fit_module_default: 7 | resource: "@FITModuleDefaultBundle/Controller/" 8 | type: annotation 9 | prefix: / 10 | 11 | _login: 12 | pattern: /login 13 | defaults: { _controller: FITNetopeerBundle:Security:login } 14 | 15 | login_check: 16 | pattern: /login_check 17 | 18 | # saml bundle 19 | aerialship_saml_sp_bundle: 20 | resource: "@AerialShipSamlSPBundle/Resources/config/routing.yml" 21 | 22 | 23 | # Internal routing configuration to handle ESI 24 | #_internal: 25 | # resource: "@FrameworkBundle/Resources/config/routing/internal.xml" 26 | # prefix: /_internal 27 | -------------------------------------------------------------------------------- /src/FIT/Bundle/ModuleDefaultBundle/Resources/public/netopeerangular/bower_components/font-awesome-sass/assets/stylesheets/font-awesome.scss: -------------------------------------------------------------------------------- 1 | /*! 2 | * Font Awesome 4.5.0 by @davegandy - http://fontawesome.io - @fontawesome 3 | * License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License) 4 | */ 5 | 6 | @import "font-awesome/variables"; 7 | @import "font-awesome/mixins"; 8 | @import "font-awesome/path"; 9 | @import "font-awesome/core"; 10 | @import "font-awesome/larger"; 11 | @import "font-awesome/fixed-width"; 12 | @import "font-awesome/list"; 13 | @import "font-awesome/bordered-pulled"; 14 | @import "font-awesome/animated"; 15 | @import "font-awesome/rotated-flipped"; 16 | @import "font-awesome/stacked"; 17 | @import "font-awesome/icons"; 18 | -------------------------------------------------------------------------------- /app/config/config_dev.yml: -------------------------------------------------------------------------------- 1 | imports: 2 | - { resource: config.yml } 3 | 4 | framework: 5 | router: 6 | resource: "%kernel.root_dir%/config/routing_dev.yml" 7 | strict_requirements: true 8 | profiler: { only_exceptions: false } 9 | 10 | web_profiler: 11 | toolbar: true 12 | intercept_redirects: false 13 | 14 | monolog: 15 | handlers: 16 | main: 17 | type: stream 18 | path: %kernel.logs_dir%/%kernel.environment%.log 19 | level: debug 20 | firephp: 21 | type: firephp 22 | level: info 23 | chromephp: 24 | type: chromephp 25 | level: info 26 | 27 | assetic: 28 | use_controller: true 29 | filters: 30 | cssrewrite: ~ 31 | 32 | #swiftmailer: 33 | # delivery_address: me@example.com 34 | -------------------------------------------------------------------------------- /src/FIT/Bundle/ModuleDefaultBundle/Resources/public/netopeerangular/bower_components/font-awesome-sass/assets/stylesheets/font-awesome/_bordered-pulled.scss: -------------------------------------------------------------------------------- 1 | // Bordered & Pulled 2 | // ------------------------- 3 | 4 | .#{$fa-css-prefix}-border { 5 | padding: .2em .25em .15em; 6 | border: solid .08em $fa-border-color; 7 | border-radius: .1em; 8 | } 9 | 10 | .#{$fa-css-prefix}-pull-left { float: left; } 11 | .#{$fa-css-prefix}-pull-right { float: right; } 12 | 13 | .#{$fa-css-prefix} { 14 | &.#{$fa-css-prefix}-pull-left { margin-right: .3em; } 15 | &.#{$fa-css-prefix}-pull-right { margin-left: .3em; } 16 | } 17 | 18 | /* Deprecated as of 4.4.0 */ 19 | .pull-right { float: right; } 20 | .pull-left { float: left; } 21 | 22 | .#{$fa-css-prefix} { 23 | &.pull-left { margin-right: .3em; } 24 | &.pull-right { margin-left: .3em; } 25 | } 26 | -------------------------------------------------------------------------------- /web/app.php: -------------------------------------------------------------------------------- 1 | register(true); 14 | */ 15 | 16 | require_once __DIR__.'/../app/AppKernel.php'; 17 | //require_once __DIR__.'/../app/AppCache.php'; 18 | 19 | $kernel = new AppKernel('prod', false); 20 | $kernel->loadClassCache(); 21 | //$kernel = new AppCache($kernel); 22 | $request = Request::createFromGlobals(); 23 | $response = $kernel->handle($request); 24 | $response->send(); 25 | $kernel->terminate($request, $response); 26 | -------------------------------------------------------------------------------- /src/FIT/Bundle/ModuleXmlBundle/Resources/config/services.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 7 | 20 | 21 | -------------------------------------------------------------------------------- /src/FIT/Bundle/ModuleDefaultBundle/Resources/config/services.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 7 | 20 | 21 | -------------------------------------------------------------------------------- /src/FIT/Bundle/ModuleDefaultBundle/Resources/public/netopeerangular/bower_components/font-awesome-sass/assets/stylesheets/font-awesome/_rotated-flipped.scss: -------------------------------------------------------------------------------- 1 | // Rotated & Flipped Icons 2 | // ------------------------- 3 | 4 | .#{$fa-css-prefix}-rotate-90 { @include fa-icon-rotate(90deg, 1); } 5 | .#{$fa-css-prefix}-rotate-180 { @include fa-icon-rotate(180deg, 2); } 6 | .#{$fa-css-prefix}-rotate-270 { @include fa-icon-rotate(270deg, 3); } 7 | 8 | .#{$fa-css-prefix}-flip-horizontal { @include fa-icon-flip(-1, 1, 0); } 9 | .#{$fa-css-prefix}-flip-vertical { @include fa-icon-flip(1, -1, 2); } 10 | 11 | // Hook for IE8-9 12 | // ------------------------- 13 | 14 | :root .#{$fa-css-prefix}-rotate-90, 15 | :root .#{$fa-css-prefix}-rotate-180, 16 | :root .#{$fa-css-prefix}-rotate-270, 17 | :root .#{$fa-css-prefix}-flip-horizontal, 18 | :root .#{$fa-css-prefix}-flip-vertical { 19 | filter: none; 20 | } 21 | -------------------------------------------------------------------------------- /src/FIT/Bundle/ModuleDefaultBundle/Resources/public/netopeerangular/bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "JSONtest", 3 | "version": "0.0.1", 4 | "description": "test for netopeergui", 5 | "repository": "https://github.com/mb21/JSONedit", 6 | "homepage": "http://mb21.github.io/JSONedit/", 7 | "license": "MIT License", 8 | "main": [ 9 | "css/styles.css", 10 | "js/JSONedit.js" 11 | ], 12 | "ignore": [ 13 | "index.html", 14 | "js/JSONedit.js", 15 | "**/.*", 16 | "node_modules", 17 | "bower_components", 18 | "test", 19 | "tests" 20 | ], 21 | "dependencies": { 22 | "font-awesome-sass": "4.x.x", 23 | "angular": "~1.4.7", 24 | "angular-ui-sortable": "0.12.x", 25 | "angular-bootstrap": "~0.14.1", 26 | "angular-history": "~0.x.x", 27 | "ngTraverse": "0.x.x", 28 | "angular-route": "^1.5.6" 29 | }, 30 | "moduleType": [], 31 | "private": true 32 | } 33 | -------------------------------------------------------------------------------- /src/FIT/NetopeerBundle/Form/UserType.php: -------------------------------------------------------------------------------- 1 | add('username', 'email', array( 14 | 'label' => 'Email' 15 | )) 16 | ->add('password', 'repeated', array( 17 | 'type' => 'password', 18 | 'first_options' => array('label' => 'Password'), 19 | 'second_options' => array('label' => 'Repeat'), 20 | ) 21 | ); 22 | } 23 | 24 | public function configureOptions(OptionsResolver $resolver) 25 | { 26 | $resolver->setDefaults(array( 27 | 'data_class' => 'FIT\NetopeerBundle\Entity\User', 28 | )); 29 | } 30 | 31 | public function getName() 32 | { 33 | return 'user'; 34 | } 35 | } -------------------------------------------------------------------------------- /app/console: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env php 2 | getParameterOption(array('--env', '-e'), getenv('SYMFONY_ENV') ?: 'dev'); 19 | $debug = getenv('SYMFONY_DEBUG') !== '0' && !$input->hasParameterOption(array('--no-debug', '')) && $env !== 'prod'; 20 | 21 | if ($debug) { 22 | Debug::enable(); 23 | } 24 | 25 | $kernel = new AppKernel($env, $debug); 26 | $application = new Application($kernel); 27 | $application->run($input); 28 | -------------------------------------------------------------------------------- /src/FIT/NetopeerBundle/Resources/public/config.rb: -------------------------------------------------------------------------------- 1 | # Require any additional compass plugins here. 2 | 3 | # Set this to the root of your project when deployed: 4 | http_path = "/" 5 | css_dir = "style" 6 | sass_dir = "sass" 7 | images_dir = "img" 8 | javascripts_dir = "js" 9 | 10 | # You can select your preferred output style here (can be overridden via the command line): 11 | output_style = :condensed 12 | #:expanded or :nested or :compact or :compressed 13 | 14 | # To enable relative paths to assets via compass helper functions. Uncomment: 15 | # relative_assets = true 16 | 17 | # To disable debugging comments that display the original location of your selectors. Uncomment: 18 | line_comments = false 19 | 20 | 21 | # If you prefer the indented syntax, you might want to regenerate this 22 | # project again passing --syntax sass, or you can uncomment this: 23 | # preferred_syntax = :sass 24 | # and then run: 25 | # sass-convert -R --from scss --to sass sass scss && rm -rf sass && mv scss sass 26 | -------------------------------------------------------------------------------- /src/FIT/Bundle/ModuleDefaultBundle/Resources/public/netopeerangular/bower_components/font-awesome-sass/assets/stylesheets/font-awesome/_animated.scss: -------------------------------------------------------------------------------- 1 | // Spinning Icons 2 | // -------------------------- 3 | 4 | .#{$fa-css-prefix}-spin { 5 | -webkit-animation: fa-spin 2s infinite linear; 6 | animation: fa-spin 2s infinite linear; 7 | } 8 | 9 | .#{$fa-css-prefix}-pulse { 10 | -webkit-animation: fa-spin 1s infinite steps(8); 11 | animation: fa-spin 1s infinite steps(8); 12 | } 13 | 14 | @-webkit-keyframes fa-spin { 15 | 0% { 16 | -webkit-transform: rotate(0deg); 17 | transform: rotate(0deg); 18 | } 19 | 100% { 20 | -webkit-transform: rotate(359deg); 21 | transform: rotate(359deg); 22 | } 23 | } 24 | 25 | @keyframes fa-spin { 26 | 0% { 27 | -webkit-transform: rotate(0deg); 28 | transform: rotate(0deg); 29 | } 30 | 100% { 31 | -webkit-transform: rotate(359deg); 32 | transform: rotate(359deg); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /src/FIT/Bundle/ModuleXmlBundle/DependencyInjection/Configuration.php: -------------------------------------------------------------------------------- 1 | root('fit_module_xml'); 22 | 23 | // Here you should define the parameters that are allowed to 24 | // configure your bundle. See the documentation linked above for 25 | // more information on that topic. 26 | 27 | return $treeBuilder; 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /src/FIT/Bundle/ModuleXmlBundle/DependencyInjection/FITModuleXmlExtension.php: -------------------------------------------------------------------------------- 1 | processConfiguration($configuration, $configs); 24 | 25 | $loader = new Loader\XmlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config')); 26 | $loader->load('services.xml'); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/FIT/Bundle/ModuleDefaultBundle/DependencyInjection/Configuration.php: -------------------------------------------------------------------------------- 1 | root('fit_module_default'); 22 | 23 | // Here you should define the parameters that are allowed to 24 | // configure your bundle. See the documentation linked above for 25 | // more information on that topic. 26 | 27 | return $treeBuilder; 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /src/FIT/Bundle/ModuleDefaultBundle/Resources/public/config.rb: -------------------------------------------------------------------------------- 1 | # Require any additional compass plugins here. 2 | 3 | # Set this to the root of your project when deployed: 4 | http_path = "/" 5 | css_dir = "style" 6 | sass_dir = "sass" 7 | images_dir = "img" 8 | javascripts_dir = "js" 9 | 10 | add_import_path "../../../../NetopeerBundle/Resources/public/sass/" 11 | 12 | # You can select your preferred output style here (can be overridden via the command line): 13 | output_style = :condensed 14 | #:expanded or :nested or :compact or :compressed 15 | 16 | # To enable relative paths to assets via compass helper functions. Uncomment: 17 | # relative_assets = true 18 | 19 | # To disable debugging comments that display the original location of your selectors. Uncomment: 20 | line_comments = false 21 | 22 | 23 | # If you prefer the indented syntax, you might want to regenerate this 24 | # project again passing --syntax sass, or you can uncomment this: 25 | # preferred_syntax = :sass 26 | # and then run: 27 | # sass-convert -R --from scss --to sass sass scss && rm -rf sass && mv scss sass 28 | -------------------------------------------------------------------------------- /src/FIT/Bundle/ModuleDefaultBundle/DependencyInjection/FITModuleDefaultExtension.php: -------------------------------------------------------------------------------- 1 | processConfiguration($configuration, $configs); 24 | 25 | $loader = new Loader\XmlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config')); 26 | $loader->load('services.xml'); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/FIT/Bundle/ModuleDefaultBundle/Resources/public/netopeerangular/css/config.rb: -------------------------------------------------------------------------------- 1 | require 'compass/import-once/activate' 2 | # Require any additional compass plugins here. 3 | 4 | # Set this to the root of your project when deployed: 5 | http_path = "/" 6 | css_dir = "stylesheets" 7 | sass_dir = "sass" 8 | images_dir = "images" 9 | javascripts_dir = "javascripts" 10 | 11 | # You can select your preferred output style here (can be overridden via the command line): 12 | # output_style = :expanded or :nested or :compact or :compressed 13 | output_style = :compact 14 | 15 | # To enable relative paths to assets via compass helper functions. Uncomment: 16 | # relative_assets = true 17 | 18 | # To disable debugging comments that display the original location of your selectors. Uncomment: 19 | line_comments = false 20 | 21 | 22 | # If you prefer the indented syntax, you might want to regenerate this 23 | # project again passing --syntax sass, or you can uncomment this: 24 | # preferred_syntax = :sass 25 | # and then run: 26 | # sass-convert -R --from scss --to sass sass scss && rm -rf sass && mv scss sass 27 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2004-2013 Fabien Potencier 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is furnished 8 | to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in all 11 | copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. 20 | -------------------------------------------------------------------------------- /web/app_dev.php: -------------------------------------------------------------------------------- 1 | loadClassCache(); 24 | $request = Request::createFromGlobals(); 25 | $response = $kernel->handle($request); 26 | $response->send(); 27 | $kernel->terminate($request, $response); 28 | -------------------------------------------------------------------------------- /install/Makefile.am: -------------------------------------------------------------------------------- 1 | if NETOPEERGUID_OPT 2 | NETOPEERGUID_OPT=netopeerguid 3 | else 4 | NETOPEERGUID_OPT= 5 | endif 6 | 7 | SUBDIRS=$(NETOPEERGUID_OPT) 8 | 9 | RPMDIR = RPMBUILD 10 | 11 | dist-hook: 12 | find "$(distdir)" -name .gitignore -exec rm {} \; 13 | 14 | install-data-hook: 15 | [ -e "$(httpdconfddir)" ] || mkdir -p "$(httpdconfddir)"; \ 16 | [ -e "$(httpdconfddir)/$(webguiname).conf" ] && mv "$(httpdconfddir)/$(webguiname).conf" "$(httpdconfddir)/$(webguiname).conf.back"; \ 17 | cp netopeergui.conf $(httpdconfddir)/$(webguiname).conf; 18 | 19 | if MAKE_RPMS 20 | 21 | RPMFILENAME=$(PACKAGE_NAME)-$(VERSION) 22 | .PHONY: rpm 23 | rpm: 24 | rm -rf "$(RPMDIR)/SOURCES/$(RPMFILENAME)" 25 | mkdir -p $(RPMDIR)/BUILD/ $(RPMDIR)/SRPMS/ $(RPMDIR)/RPMS/ $(RPMDIR)/SOURCES 26 | make ${AM_MAKEFLAGS} distdir='$(RPMDIR)/SOURCES/$(RPMFILENAME)' distdir 27 | find "$(RPMDIR)" -name '*.back' -exec rm -f {} \; 28 | ( cd "$(RPMDIR)/SOURCES/"; tar -z -c -f $(RPMFILENAME)-$(RELEASE).tar.gz $(RPMFILENAME); rm -rf $(RPMFILENAME); ) 29 | $(RPMBUILD) -ba $(PACKAGE_NAME).spec --define "_topdir `pwd`/$(RPMDIR)"; 30 | 31 | rpm-clean: 32 | rm -rf $(RPMDIR) 33 | else 34 | endif 35 | -------------------------------------------------------------------------------- /src/FIT/Bundle/ModuleDefaultBundle/Resources/public/netopeerangular/bower_components/font-awesome-sass/assets/stylesheets/font-awesome/_mixins.scss: -------------------------------------------------------------------------------- 1 | // Mixins 2 | // -------------------------- 3 | 4 | @mixin fa-icon() { 5 | display: inline-block; 6 | font: normal normal normal #{$fa-font-size-base}/#{$fa-line-height-base} FontAwesome; // shortening font declaration 7 | font-size: inherit; // can't have font-size inherit on line above, so need to override 8 | text-rendering: auto; // optimizelegibility throws things off #1094 9 | -webkit-font-smoothing: antialiased; 10 | -moz-osx-font-smoothing: grayscale; 11 | } 12 | 13 | @mixin fa-icon-rotate($degrees, $rotation) { 14 | filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=#{$rotation}); 15 | -webkit-transform: rotate($degrees); 16 | -ms-transform: rotate($degrees); 17 | transform: rotate($degrees); 18 | } 19 | 20 | @mixin fa-icon-flip($horiz, $vert, $rotation) { 21 | filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=#{$rotation}); 22 | -webkit-transform: scale($horiz, $vert); 23 | -ms-transform: scale($horiz, $vert); 24 | transform: scale($horiz, $vert); 25 | } 26 | -------------------------------------------------------------------------------- /src/FIT/Bundle/ModuleDefaultBundle/Resources/public/netopeerangular/data/test.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | QWZ5671 7 | 39.95 8 | 9 | Red 10 | Burgundy 11 | 12 | 13 | Red 14 | Burgundy 15 | 16 | 17 | 18 | RRX9856 19 | Dec 25, 1995 20 | 42.50 21 | 22 | Black 23 | 24 | 25 | 26 | 30 | -------------------------------------------------------------------------------- /src/FIT/Bundle/ModuleXmlBundle/Controller/ModuleController.php: -------------------------------------------------------------------------------- 1 | prepareVariablesForModuleAction("FITModuleXmlBundle", $key, $module, $subsection); 21 | 22 | /* parent module did not prepares data, but returns redirect response, 23 | * so we will follow this redirect 24 | */ 25 | if ($res instanceof RedirectResponse) { 26 | return $res; 27 | 28 | // data were prepared correctly 29 | } else { 30 | return $this->getTwigArr(); 31 | } 32 | } 33 | 34 | } 35 | -------------------------------------------------------------------------------- /src/FIT/Bundle/ModuleDefaultBundle/Resources/public/netopeerangular/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2013 Mauro Bieg 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. 22 | -------------------------------------------------------------------------------- /src/FIT/Bundle/ModuleDefaultBundle/Resources/public/netopeerangular/bower_components/font-awesome-sass/LICENSE.txt: -------------------------------------------------------------------------------- 1 | Copyright (c) 2013 Travis Chase 2 | 3 | MIT License 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining 6 | a copy of this software and associated documentation files (the 7 | "Software"), to deal in the Software without restriction, including 8 | without limitation the rights to use, copy, modify, merge, publish, 9 | distribute, sublicense, and/or sell copies of the Software, and to 10 | permit persons to whom the Software is furnished to do so, subject to 11 | the following conditions: 12 | 13 | The above copyright notice and this permission notice shall be 14 | included in all copies or substantial portions of the Software. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 17 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 18 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 19 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 20 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 21 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 22 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 23 | -------------------------------------------------------------------------------- /src/FIT/Bundle/ModuleDefaultBundle/Resources/public/netopeerangular/bower_components/font-awesome-sass/font-awesome-sass.gemspec: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | lib = File.expand_path('../lib', __FILE__) 3 | $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) 4 | 5 | require 'font_awesome/sass/version' 6 | 7 | Gem::Specification.new do |spec| 8 | spec.name = 'font-awesome-sass' 9 | spec.version = FontAwesome::Sass::VERSION 10 | spec.authors = ['Travis Chase'] 11 | spec.email = ['travis@travischase.me'] 12 | spec.description = 'Font-Awesome SASS gem for use in Ruby projects' 13 | spec.summary = 'Font-Awesome SASS' 14 | spec.homepage = 'https://github.com/FortAwesome/font-awesome-sass' 15 | spec.license = 'MIT' 16 | spec.files = `git ls-files`.split($/) 17 | spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) } 18 | spec.test_files = spec.files.grep(%r{^(test|spec|features)/}) 19 | spec.require_paths = ['lib'] 20 | 21 | spec.add_runtime_dependency 'sass', '>= 3.2' 22 | 23 | spec.add_development_dependency 'bundler', '>= 1.3' 24 | spec.add_development_dependency 'rake' 25 | spec.add_development_dependency 'sass-rails' 26 | spec.add_development_dependency 'compass' 27 | end 28 | -------------------------------------------------------------------------------- /src/FIT/NetopeerBundle/Tests/_files/completeRequestTree/turing-machine-data.sch: -------------------------------------------------------------------------------- 1 | 2 | Duplicate key "coord"Duplicate key "tm:label"Violated uniqueness for "tm:input/tm:state tm:input/tm:symbol" 3 | -------------------------------------------------------------------------------- /src/FIT/Bundle/ModuleDefaultBundle/Resources/public/netopeerangular/js/directives/addItem.js: -------------------------------------------------------------------------------- 1 | NetopeerGUI.directive('addItem', function() { 2 | return { 3 | restrict: 'E', 4 | templateUrl: 'directives/addItem.html' 5 | }; 6 | }); 7 | 8 | // directive from http://stackoverflow.com/a/27331340 9 | NetopeerGUI.directive('typeaheadFocus', function () { 10 | return { 11 | require: 'ngModel', 12 | link: function (scope, element, attr, ngModel) { 13 | 14 | //trigger the popup on 'click' because 'focus' 15 | //is also triggered after the item selection 16 | element.bind('click', function () { 17 | 18 | var viewValue = ngModel.$viewValue; 19 | 20 | //restore to null value so that the typeahead can detect a change 21 | if (ngModel.$viewValue == ' ') { 22 | ngModel.$setViewValue(null); 23 | } 24 | 25 | //force trigger the popup 26 | ngModel.$setViewValue(' '); 27 | 28 | //set the actual value in case there was already a value in the input 29 | ngModel.$setViewValue(viewValue || ' '); 30 | }); 31 | 32 | //compare function that treats the empty space as a match 33 | scope.emptyOrMatch = function (actual, expected) { 34 | if (expected == ' ') { 35 | return true; 36 | } 37 | return actual.indexOf(expected) > -1; 38 | }; 39 | } 40 | }; 41 | }); -------------------------------------------------------------------------------- /src/FIT/NetopeerBundle/Tests/_files/completeRequestTree/turing-machine-gdefs.rng: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 | 10 | left 11 | right 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 0 20 | 1 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 1 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /src/FIT/Bundle/ModuleDefaultBundle/Resources/public/netopeerangular/templates/types/Object.html: -------------------------------------------------------------------------------- 1 | 2 |
3 | 4 | 5 | 6 | {{ key }} 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 |
-------------------------------------------------------------------------------- /src/FIT/Bundle/ModuleDefaultBundle/Resources/public/netopeerangular/bower_components/font-awesome-sass/assets/stylesheets/font-awesome/_path.scss: -------------------------------------------------------------------------------- 1 | /* FONT PATH 2 | * -------------------------- */ 3 | 4 | @font-face { 5 | font-family: 'FontAwesome'; 6 | src: url(if($fa-sass-asset-helper, fa-font-path('#{$fa-font-path}#{$fa-font-name}.eot?v=#{$fa-version}'), '#{$fa-font-path}#{$fa-font-name}.eot?v=#{$fa-version}')); 7 | src: url(if($fa-sass-asset-helper, fa-font-path('#{$fa-font-path}#{$fa-font-name}.eot?v=#{$fa-version}#iefix'), '#{$fa-font-path}#{$fa-font-name}.eot?v=#{$fa-version}#iefix')) format('embedded-opentype'), 8 | url(if($fa-sass-asset-helper, fa-font-path('#{$fa-font-path}#{$fa-font-name}.woff2?v=#{$fa-version}'), '#{$fa-font-path}#{$fa-font-name}.woff2?v=#{$fa-version}')) format('woff2'), 9 | url(if($fa-sass-asset-helper, fa-font-path('#{$fa-font-path}#{$fa-font-name}.woff?v=#{$fa-version}'), '#{$fa-font-path}#{$fa-font-name}.woff?v=#{$fa-version}')) format('woff'), 10 | url(if($fa-sass-asset-helper, fa-font-path('#{$fa-font-path}#{$fa-font-name}.ttf?v=#{$fa-version}'), '#{$fa-font-path}#{$fa-font-name}.ttf?v=#{$fa-version}')) format('truetype'), 11 | url(if($fa-sass-asset-helper, fa-font-path('#{$fa-font-path}#{$fa-font-name}.svg?v=#{$fa-version}#fontawesomeregular'), '#{$fa-font-path}#{$fa-font-name}.svg?v=#{$fa-version}#fontawesomeregular')) format('svg'); 12 | font-weight: normal; 13 | font-style: normal; 14 | } 15 | -------------------------------------------------------------------------------- /src/FIT/Bundle/ModuleDefaultBundle/Resources/public/netopeerangular/js/services/ajaxService.js: -------------------------------------------------------------------------------- 1 | var services = angular.module('NetopeerGUIServices', []) 2 | 3 | .service('AjaxService', function ($http) { 4 | $http.defaults.cache = false; 5 | 6 | this.reloadData = function(targetUrl) { 7 | var url = targetUrl || window.location.href; 8 | return $http({ 9 | url: url + '?angular=true', 10 | method: 'GET' 11 | }); 12 | }; 13 | 14 | this.getSchema = function(targetUrl) { 15 | return $http({ 16 | url: targetUrl || window.location.href, 17 | method: 'GET' 18 | }); 19 | }; 20 | 21 | this.loadSchema = function(connIds, filters) { 22 | return $http({ 23 | url: baseURL + '/ajax/schema/', 24 | method: 'POST', 25 | data: {'angular': true, 'connIds': connIds, 'filters': filters} 26 | }); 27 | }; 28 | 29 | this.submitConfiguration = function(cleanJson, targetUrl) { 30 | return $http({ 31 | url: targetUrl || window.location.href, 32 | method: 'POST', 33 | data: cleanJson 34 | }); 35 | }; 36 | 37 | this.submitRpc = function(cleanJson, targetUrl) { 38 | return $http({ 39 | url: targetUrl || window.location.href, 40 | method: 'POST', 41 | data: {'angular': true, 'action': 'rpc', 'data': cleanJson} 42 | }); 43 | }; 44 | 45 | this.commitConfiguration = function(targetUrl) { 46 | return $http({ 47 | url: targetUrl || window.location.href, 48 | method: 'POST', 49 | data: {'angular': true, 'action': 'commit'} 50 | }); 51 | }; 52 | }); -------------------------------------------------------------------------------- /app/phpunit.xml.dist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 15 | 16 | 17 | 18 | ../src/*/*Bundle/Tests 19 | ../src/*/Bundle/*Bundle/Tests 20 | 21 | 22 | 23 | 28 | 29 | 30 | 31 | ../src 32 | 33 | ../src/*/*Bundle/Resources 34 | ../src/*/*Bundle/Tests 35 | ../src/*/Bundle/*Bundle/Resources 36 | ../src/*/Bundle/*Bundle/Tests 37 | 38 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /src/FIT/NetopeerBundle/Tests/Codeception/acceptance/ConnectionsCest.php: -------------------------------------------------------------------------------- 1 | amOnPage('/logout'); 16 | } 17 | 18 | public function _connectToLocalhostDevice(WebGuy $I) 19 | { 20 | CommonScenarios::connectToLocalhostDevice($I); 21 | } 22 | 23 | public function connectToLocalhostDevice2(WebGuy $I) 24 | { 25 | CommonScenarios::connectToLocalhostDevice($I); 26 | 27 | $I->wantTo('connect to second localhost device'); 28 | $I->amOnPage('/connections/'); 29 | 30 | $I->expectTo('connect to localhost device'); 31 | $I->waitForText('localhost:830', 10); 32 | $I->click('#block--historyOfConnectedDevices a.device-item'); 33 | $I->fillField('Password', CommonScenarios::$devicePass); 34 | $I->click('Connect'); 35 | $I->waitForText('Loading...', 10); 36 | $I->waitForText('Configure device', 50, '#row-1'); 37 | $I->seeNumberOfElements('.message.success', 3); 38 | $I->seeNumberOfElements('tr', 2); 39 | 40 | $I->waitForElementNotVisible('#ajax-spinner'); 41 | 42 | $I->expectTo('disconnect from second device'); 43 | $I->click('Disconnect', '#row-1'); 44 | 45 | $I->waitForElementNotVisible('#row-1'); 46 | 47 | CommonScenarios::checkNumberOfFlashes($I, 1, 'success', 'Successfully disconnected.'); 48 | $I->seeNumberOfElements('tr', 1); 49 | } 50 | } -------------------------------------------------------------------------------- /src/FIT/Bundle/ModuleDefaultBundle/Resources/public/netopeerangular/bower_components/font-awesome-sass/assets/stylesheets/font-awesome/_extras.scss: -------------------------------------------------------------------------------- 1 | /* EXTRAS 2 | * -------------------------- */ 3 | 4 | /* Stacked and layered icon */ 5 | 6 | /* Animated rotating icon */ 7 | .#{$fa-css-prefix}-spin { 8 | -webkit-animation: spin 2s infinite linear; 9 | -moz-animation: spin 2s infinite linear; 10 | -o-animation: spin 2s infinite linear; 11 | animation: spin 2s infinite linear; 12 | } 13 | 14 | @-moz-keyframes spin { 15 | 0% { -moz-transform: rotate(0deg); } 16 | 100% { -moz-transform: rotate(359deg); } 17 | } 18 | @-webkit-keyframes spin { 19 | 0% { -webkit-transform: rotate(0deg); } 20 | 100% { -webkit-transform: rotate(359deg); } 21 | } 22 | @-o-keyframes spin { 23 | 0% { -o-transform: rotate(0deg); } 24 | 100% { -o-transform: rotate(359deg); } 25 | } 26 | @-ms-keyframes spin { 27 | 0% { -ms-transform: rotate(0deg); } 28 | 100% { -ms-transform: rotate(359deg); } 29 | } 30 | @keyframes spin { 31 | 0% { transform: rotate(0deg); } 32 | 100% { transform: rotate(359deg); } 33 | } 34 | 35 | 36 | // Icon rotations & flipping 37 | // ------------------------- 38 | 39 | .#{$fa-css-prefix}-rotate-90 { @include fa-icon-rotate(90deg, 1); } 40 | .#{$fa-css-prefix}-rotate-180 { @include fa-icon-rotate(180deg, 2); } 41 | .#{$fa-css-prefix}-rotate-270 { @include fa-icon-rotate(270deg, 3); } 42 | 43 | .#{$fa-css-prefix}-flip-horizontal { @include fa-icon-flip(-1, 1, 0); } 44 | .#{$fa-css-prefix}-flip-vertical { @include fa-icon-flip(1, -1, 2); } 45 | -------------------------------------------------------------------------------- /app/AppKernel.php: -------------------------------------------------------------------------------- 1 | getEnvironment(), array('dev', 'test'))) { 27 | $bundles[] = new Symfony\Bundle\WebProfilerBundle\WebProfilerBundle(); 28 | $bundles[] = new Sensio\Bundle\DistributionBundle\SensioDistributionBundle(); 29 | $bundles[] = new Sensio\Bundle\GeneratorBundle\SensioGeneratorBundle(); 30 | } 31 | 32 | return $bundles; 33 | } 34 | 35 | public function registerContainerConfiguration(LoaderInterface $loader) 36 | { 37 | $loader->load(__DIR__ . '/config/config_' . $this->getEnvironment() . '.yml'); 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /src/FIT/Bundle/ModuleDefaultBundle/Resources/public/netopeerangular/templates/directives/switchItem.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | {{ val }} 9 | 10 | 11 | 12 | {{ val }} 13 | 14 | 15 | 16 | {{ val }} 17 | 18 | 19 | 20 | {{ val }} 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /src/FIT/Bundle/ModuleDefaultBundle/Resources/public/netopeerangular/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 |
26 |

NetopeerGUI - JSON test

27 | 28 | 29 | 30 | 31 |
32 | 33 |
34 | 35 |
36 |
37 | 38 | JSON not well-formed! 39 |
40 |
41 | 42 | 43 | 44 | 45 | -------------------------------------------------------------------------------- /src/FIT/NetopeerBundle/Tests/Codeception/acceptance/InterfacesConfigureCest.php: -------------------------------------------------------------------------------- 1 | click('Configure device'); 13 | $I->waitForText('Config & State data', 10); 14 | $I->canSeeInCurrentUrl('sections/0/interfaces/'); 15 | } 16 | 17 | public function _after(WebGuy $I) 18 | { 19 | $I->amOnPage('/logout'); 20 | } 21 | 22 | public function _addInterface(WebGuy $I) { 23 | $I->waitForText('interfaces', 10); 24 | $I->click('.create-child[rel="--*?1!"]'); 25 | CommonScenarios::waitAndClickInTypeahead($I, 'interface'); 26 | $I->fillField('.generatedForm input.value[name*="--*?1!--*?1!--*?1!"]', 'test-name'.time()); 27 | $I->selectOption('.generatedForm select[name*="--*?1!--*?1!--*?2!"]', 'ianaift:other'); 28 | 29 | $I->click('.create-child', '.generatedForm'); 30 | CommonScenarios::waitAndClickInTypeahead($I, 'description'); 31 | $I->fillField('input.value[name*="--*?1!--*?1!--*?3!"]', 'loopback interface'); 32 | } 33 | 34 | public function testEditConfig(WebGuy $I) { 35 | $I->wantTo('create new interface using submit button'); 36 | 37 | $this->_addInterface($I); 38 | $I->click('Create new node'); 39 | 40 | // see result 41 | CommonScenarios::checkNumberOfFlashes($I, 1); 42 | $I->seeNumberOfElements('.level-0.interface', 2); 43 | } 44 | 45 | public function testEditConfigWithCommit(WebGuy $I) { 46 | $I->wantTo('create new interface using commit all'); 47 | 48 | $this->_addInterface($I); 49 | $I->click('Append changes'); 50 | 51 | $I->seeNumberOfElements('form.addedForm', 1); 52 | $I->click('Commit all changes'); 53 | 54 | // see result 55 | CommonScenarios::checkNumberOfFlashes($I, 1); 56 | $I->seeNumberOfElements('.level-0.interface', 3); 57 | } 58 | } -------------------------------------------------------------------------------- /src/FIT/Bundle/ModuleDefaultBundle/Resources/public/netopeerangular/templates/main/view.html: -------------------------------------------------------------------------------- 1 |

{{ rpcName || 'Config & State data' }}

2 | 3 |
4 |
5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 |
17 |
18 | {{ yangSchema }}
19 | 
20 |
21 | 22 |
23 | 24 |
25 | 26 | 27 | 28 | 29 | 30 | 31 |
-------------------------------------------------------------------------------- /src/FIT/Bundle/ModuleDefaultBundle/Resources/public/js/module-default.js: -------------------------------------------------------------------------------- 1 | $(document).ready(function() { 2 | initModuleDefaultJS(); 3 | }); 4 | 5 | function initModuleDefaultJS() { 6 | //angular.element(document).ready(function() { 7 | // try { 8 | // if (!angular.element(document).injector()) { 9 | // angular.bootstrap(document, ['NetopeerGUIApp']); 10 | // } 11 | // } catch (err) {} 12 | //}); 13 | 14 | $("form").on("change", ".js-auto-submit-on-change", function() { 15 | $(this).parents('form').submit(); 16 | }); 17 | } 18 | function createFormUnderlay($elem) { 19 | var $cover = findFormUnderlayCover($elem); 20 | 21 | // if form-underlay already exists, will be removed 22 | if ( $cover.find(".form-underlay").length === 0 ) { 23 | 24 | // append form-underlay to cover 25 | $cover.append($("
").addClass('form-underlay')); 26 | $cover.append($("
").addClass('form-cover')); 27 | 28 | recountFormUnderlayDimensions($cover); 29 | 30 | $cover.find(".form-underlay").click(function() { 31 | hideAndEmptyModalWindow(); 32 | }); 33 | } 34 | 35 | return $cover; 36 | } 37 | 38 | function findFormUnderlayCover($elem) { 39 | // find cover - if we are on state, it would be state column, or we could be on config 40 | if ($elem.parents('section').length) { 41 | return $elem.parents('section'); 42 | 43 | // or we have single column layout 44 | } else { 45 | return $("body"); 46 | } 47 | } 48 | 49 | function recountFormUnderlayDimensions($cover, minusHeight) { 50 | if (minusHeight == undefined) { 51 | minusHeight = 0; 52 | } 53 | // we have to count new dimensions for new form-underlay 54 | // and fill it over whole cover part 55 | var nWidth = $cover.outerWidth(), 56 | nHeight = $cover[0].scrollHeight - minusHeight; 57 | 58 | // we have to set form to fill cover (from top) 59 | $cover.find(".form-underlay").width(nWidth).height(nHeight).css({ 60 | 'margin-top': 0, 61 | 'margin-left': 0 - parseInt($cover.css('padding-left'), 10) 62 | }); 63 | } 64 | -------------------------------------------------------------------------------- /src/FIT/NetopeerBundle/bin/netconfwebgui-postinstall.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | # Copyright (C) 2013 4 | # Author(s): David Alexa 5 | # 6 | # LICENSE TERMS 7 | # 8 | # Redistribution and use in source and binary forms, with or without 9 | # modification, are permitted provided that the following conditions 10 | # are met: 11 | # 1. Redistributions of source code must retain the above copyright 12 | # notice, this list of conditions and the following disclaimer. 13 | # 2. Redistributions in binary form must reproduce the above copyright 14 | # notice, this list of conditions and the following disclaimer in 15 | # the documentation and/or other materials provided with the 16 | # distribution. 17 | # 3. Neither the name of the Company nor the names of its contributors 18 | # may be used to endorse or promote products derived from this 19 | # software without specific prior written permission. 20 | # 21 | # This software is provided ``as is'', and any express or implied 22 | # warranties, including, but not limited to, the implied warranties of 23 | # merchantability and fitness for a particular purpose are disclaimed. 24 | # In no event shall the company or contributors be liable for any 25 | # direct, indirect, incidental, special, exemplary, or consequential 26 | # damages (including, but not limited to, procurement of substitute 27 | # goods or services; loss of use, data, or profits; or business 28 | # interruption) however caused and on any theory of liability, whether 29 | # in contract, strict liability, or tort (including negligence or 30 | # otherwise) arising in any way out of the use of this software, even 31 | # if advised of the possibility of such damage. 32 | # 33 | # ========================== 34 | # 35 | # This file is executed during composer install. 36 | # Set correct file mod for necessary files and folders. 37 | 38 | chown -R apache:apache ./* 39 | chmod 700 -R app/{cache,logs} 40 | chmod 700 src/FIT/NetopeerBundle/Data/models{,/tmp} 41 | chmod 600 app/netopeerWebGui.db 42 | -------------------------------------------------------------------------------- /app/check.php: -------------------------------------------------------------------------------- 1 | getPhpIniConfigPath(); 8 | 9 | echo "********************************\n"; 10 | echo "* *\n"; 11 | echo "* Symfony requirements check *\n"; 12 | echo "* *\n"; 13 | echo "********************************\n\n"; 14 | 15 | echo $iniPath ? sprintf("* Configuration file used by PHP: %s\n\n", $iniPath) : "* WARNING: No configuration file (php.ini) used by PHP!\n\n"; 16 | 17 | echo "** ATTENTION **\n"; 18 | echo "* The PHP CLI can use a different php.ini file\n"; 19 | echo "* than the one used with your web server.\n"; 20 | if ('\\' == DIRECTORY_SEPARATOR) { 21 | echo "* (especially on the Windows platform)\n"; 22 | } 23 | echo "* To be on the safe side, please also launch the requirements check\n"; 24 | echo "* from your web server using the web/config.php script.\n"; 25 | 26 | echo_title('Mandatory requirements'); 27 | 28 | $checkPassed = true; 29 | foreach ($symfonyRequirements->getRequirements() as $req) { 30 | /** @var $req Requirement */ 31 | echo_requirement($req); 32 | if (!$req->isFulfilled()) { 33 | $checkPassed = false; 34 | } 35 | } 36 | 37 | echo_title('Optional recommendations'); 38 | 39 | foreach ($symfonyRequirements->getRecommendations() as $req) { 40 | echo_requirement($req); 41 | } 42 | 43 | exit($checkPassed ? 0 : 1); 44 | 45 | /** 46 | * Prints a Requirement instance 47 | */ 48 | function echo_requirement(Requirement $requirement) 49 | { 50 | $result = $requirement->isFulfilled() ? 'OK' : ($requirement->isOptional() ? 'WARNING' : 'ERROR'); 51 | echo ' ' . str_pad($result, 9); 52 | echo $requirement->getTestMessage() . "\n"; 53 | 54 | if (!$requirement->isFulfilled()) { 55 | echo sprintf(" %s\n\n", $requirement->getHelpText()); 56 | } 57 | } 58 | 59 | function echo_title($title) 60 | { 61 | echo "\n** $title **\n\n"; 62 | } 63 | -------------------------------------------------------------------------------- /src/FIT/NetopeerBundle/Resources/public/sass/custom-variables.scss: -------------------------------------------------------------------------------- 1 | /* 2 | * @author David Alexa 3 | * 4 | * Copyright (C) 2012-2015 CESNET 5 | * 6 | * LICENSE TERMS 7 | * 8 | * Redistribution and use in source and binary forms, with or without 9 | * modification, are permitted provided that the following conditions 10 | * are met: 11 | * 1. Redistributions of source code must retain the above copyright 12 | * notice, this list of conditions and the following disclaimer. 13 | * 2. Redistributions in binary form must reproduce the above copyright 14 | * notice, this list of conditions and the following disclaimer in 15 | * the documentation and/or other materials provided with the 16 | * distribution. 17 | * 3. Neither the name of the Company nor the names of its contributors 18 | * may be used to endorse or promote products derived from this 19 | * software without specific prior written permission. 20 | * 21 | * ALTERNATIVELY, provided that this notice is retained in full, this 22 | * product may be distributed under the terms of the GNU General Public 23 | * License (GPL) version 2 or later, in which case the provisions 24 | * of the GPL apply INSTEAD OF those given above. 25 | * 26 | * This software is provided ``as is'', and any express or implied 27 | * warranties, including, but not limited to, the implied warranties of 28 | * merchantability and fitness for a particular purpose are disclaimed. 29 | * In no event shall the company or contributors be liable for any 30 | * direct, indirect, incidental, special, exemplary, or consequential 31 | * damages (including, but not limited to, procurement of substitute 32 | * goods or services; loss of use, data, or profits; or business 33 | * interruption) however caused and on any theory of liability, whether 34 | * in contract, strict liability, or tort (including negligence or 35 | * otherwise) arising in any way out of the use of this software, even 36 | * if advised of the possibility of such damage. 37 | */ 38 | 39 | 40 | // here you can override default variables, defined in variables.scss -------------------------------------------------------------------------------- /src/FIT/Bundle/ModuleDefaultBundle/Resources/views/Module/subsection.html.twig: -------------------------------------------------------------------------------- 1 | {# 2 | @author David Alexa 3 | 4 | Copyright (C) 2012-2015 CESNET 5 | 6 | LICENSE TERMS 7 | 8 | Redistribution and use in source and binary forms, with or without 9 | modification, are permitted provided that the following conditions 10 | are met: 11 | 1. Redistributions of source code must retain the above copyright 12 | notice, this list of conditions and the following disclaimer. 13 | 2. Redistributions in binary form must reproduce the above copyright 14 | notice, this list of conditions and the following disclaimer in 15 | the documentation and/or other materials provided with the 16 | distribution. 17 | 3. Neither the name of the Company nor the names of its contributors 18 | may be used to endorse or promote products derived from this 19 | software without specific prior written permission. 20 | 21 | ALTERNATIVELY, provided that this notice is retained in full, this 22 | product may be distributed under the terms of the GNU General Public 23 | License (GPL) version 2 or later, in which case the provisions 24 | of the GPL apply INSTEAD OF those given above. 25 | 26 | This software is provided ``as is'', and any express or implied 27 | warranties, including, but not limited to, the implied warranties of 28 | merchantability and fitness for a particular purpose are disclaimed. 29 | In no event shall the company or contributors be liable for any 30 | direct, indirect, incidental, special, exemplary, or consequential 31 | damages (including, but not limited to, procurement of substitute 32 | goods or services; loss of use, data, or profits; or business 33 | interruption) however caused and on any theory of liability, whether 34 | in contract, strict liability, or tort (including negligence or 35 | otherwise) arising in any way out of the use of this software, even 36 | if advised of the possibility of such damage. 37 | #} 38 | 39 | {% extends 'FITModuleDefaultBundle:Module:section.html.twig' %} 40 | {% block title %}Subsection - {{subsectionName}} ({{sectionName}}){% endblock title %} 41 | -------------------------------------------------------------------------------- /src/FIT/NetopeerBundle/Resources/views/Security/logout.html.twig: -------------------------------------------------------------------------------- 1 | {# 2 | @author David Alexa 3 | 4 | Copyright (C) 2012-2015 CESNET 5 | 6 | LICENSE TERMS 7 | 8 | Redistribution and use in source and binary forms, with or without 9 | modification, are permitted provided that the following conditions 10 | are met: 11 | 1. Redistributions of source code must retain the above copyright 12 | notice, this list of conditions and the following disclaimer. 13 | 2. Redistributions in binary form must reproduce the above copyright 14 | notice, this list of conditions and the following disclaimer in 15 | the documentation and/or other materials provided with the 16 | distribution. 17 | 3. Neither the name of the Company nor the names of its contributors 18 | may be used to endorse or promote products derived from this 19 | software without specific prior written permission. 20 | 21 | ALTERNATIVELY, provided that this notice is retained in full, this 22 | product may be distributed under the terms of the GNU General Public 23 | License (GPL) version 2 or later, in which case the provisions 24 | of the GPL apply INSTEAD OF those given above. 25 | 26 | This software is provided ``as is'', and any express or implied 27 | warranties, including, but not limited to, the implied warranties of 28 | merchantability and fitness for a particular purpose are disclaimed. 29 | In no event shall the company or contributors be liable for any 30 | direct, indirect, incidental, special, exemplary, or consequential 31 | damages (including, but not limited to, procurement of substitute 32 | goods or services; loss of use, data, or profits; or business 33 | interruption) however caused and on any theory of liability, whether 34 | in contract, strict liability, or tort (including negligence or 35 | otherwise) arising in any way out of the use of this software, even 36 | if advised of the possibility of such damage. 37 | #} 38 | 39 | {% extends 'FITNetopeerBundle::layout.html.twig' %} 40 | {% block title %} 41 | uvodni stranka 42 | {% endblock %} 43 | {% block content %} 44 | logout 45 | {% endblock %} 46 | -------------------------------------------------------------------------------- /src/FIT/Bundle/ModuleDefaultBundle/Resources/public/netopeerangular/bower_components/font-awesome-sass/lib/font-awesome-sass.rb: -------------------------------------------------------------------------------- 1 | module FontAwesome 2 | module Sass 3 | class << self 4 | def load! 5 | register_compass_extension if compass? 6 | 7 | if rails? 8 | register_rails_engine 9 | elsif sprockets? 10 | register_sprockets 11 | end 12 | 13 | configure_sass 14 | end 15 | 16 | # Paths 17 | def gem_path 18 | @gem_path ||= File.expand_path('..', File.dirname(__FILE__)) 19 | end 20 | 21 | def stylesheets_path 22 | File.join(assets_path, 'stylesheets') 23 | end 24 | 25 | def fonts_path 26 | File.join(assets_path, 'fonts') 27 | end 28 | 29 | def assets_path 30 | @assets_path ||= File.join(gem_path, 'assets') 31 | end 32 | 33 | def sprockets? 34 | defined?(::Sprockets) 35 | end 36 | 37 | def compass? 38 | defined?(::Compass::Frameworks) 39 | end 40 | 41 | def rails? 42 | defined?(::Rails) 43 | end 44 | 45 | private 46 | 47 | def configure_sass 48 | require 'sass' 49 | 50 | ::Sass.load_paths << stylesheets_path 51 | end 52 | 53 | def register_compass_extension 54 | require 'font_awesome/sass/version' 55 | 56 | ::Compass::Frameworks.register( 57 | 'font-awesome', 58 | :version => FontAwesome::Sass::VERSION, 59 | :path => gem_path, 60 | :stylesheets_directory => stylesheets_path, 61 | :templates_directory => File.join(gem_path, 'templates') 62 | ) 63 | end 64 | 65 | def register_rails_engine 66 | require 'sass-rails' 67 | require 'font_awesome/sass/rails/engine' 68 | require 'font_awesome/sass/rails/railtie' 69 | end 70 | 71 | def register_sprockets 72 | Sprockets.append_path(stylesheets_path) 73 | Sprockets.append_path(fonts_path) 74 | end 75 | end 76 | end 77 | end 78 | 79 | FontAwesome::Sass.load! 80 | -------------------------------------------------------------------------------- /src/FIT/NetopeerBundle/Tests/Selenium/phpunit.xml: -------------------------------------------------------------------------------- 1 | 2 | 39 | 40 | 41 | 42 | 43 | ./ 44 | 45 | 46 | -------------------------------------------------------------------------------- /src/FIT/NetopeerBundle/Controller/RegistrationController.php: -------------------------------------------------------------------------------- 1 | createForm(new UserType(), $user); 25 | 26 | // 2) handle the submit (will only happen on POST) 27 | $form->handleRequest($this->getRequest()); 28 | if ($form->isSubmitted() && $form->isValid()) { 29 | 30 | // 3) Encode the password (you could also do this via Doctrine listener) 31 | $password = $this->get('security.encoder_factory')->getEncoder($user) 32 | ->encodePassword($user->getPassword(), $user->getSalt()); 33 | $user->setPassword($password); 34 | $user->setRoles("ROLE_ADMIN"); 35 | 36 | // 4) save the User! 37 | $em = $this->getDoctrine()->getManager(); 38 | $repository = $em->getRepository('FITNetopeerBundle:User'); 39 | 40 | $tmpUser = $repository->findOneBy( 41 | array('username' => $user->getUsername()) 42 | ); 43 | if ($tmpUser) { 44 | $this->getRequest()->getSession()->getFlashBag()->add('error', 'User with username "'.$user->getUsername().'" already exists.'); 45 | } else { 46 | $em->persist($user); 47 | $em->flush(); 48 | $this->getRequest()->getSession()->getFlashBag()->add('success', 'User with username "'.$user->getUsername().'" succesfully registered.'); 49 | return $this->redirect($this->generateUrl('_login')); 50 | } 51 | 52 | 53 | } 54 | $error = $form->getErrors(); 55 | 56 | return ['form' => $form->createView(), 'error' => $error]; 57 | } 58 | } -------------------------------------------------------------------------------- /src/FIT/NetopeerBundle/Resources/views/Generate/generateXMLFromModel.html.twig: -------------------------------------------------------------------------------- 1 | {# 2 | @author David Alexa 3 | 4 | Copyright (C) 2012-2015 CESNET 5 | 6 | LICENSE TERMS 7 | 8 | Redistribution and use in source and binary forms, with or without 9 | modification, are permitted provided that the following conditions 10 | are met: 11 | 1. Redistributions of source code must retain the above copyright 12 | notice, this list of conditions and the following disclaimer. 13 | 2. Redistributions in binary form must reproduce the above copyright 14 | notice, this list of conditions and the following disclaimer in 15 | the documentation and/or other materials provided with the 16 | distribution. 17 | 3. Neither the name of the Company nor the names of its contributors 18 | may be used to endorse or promote products derived from this 19 | software without specific prior written permission. 20 | 21 | ALTERNATIVELY, provided that this notice is retained in full, this 22 | product may be distributed under the terms of the GNU General Public 23 | License (GPL) version 2 or later, in which case the provisions 24 | of the GPL apply INSTEAD OF those given above. 25 | 26 | This software is provided ``as is'', and any express or implied 27 | warranties, including, but not limited to, the implied warranties of 28 | merchantability and fitness for a particular purpose are disclaimed. 29 | In no event shall the company or contributors be liable for any 30 | direct, indirect, incidental, special, exemplary, or consequential 31 | damages (including, but not limited to, procurement of substitute 32 | goods or services; loss of use, data, or profits; or business 33 | interruption) however caused and on any theory of liability, whether 34 | in contract, strict liability, or tort (including negligence or 35 | otherwise) arising in any way out of the use of this software, even 36 | if advised of the possibility of such damage. 37 | #} 38 | 39 | {% set iterator = 1 %} 40 | {% for key, element in xmlArr %} 41 | {% include 'FITModuleDefaultBundle:Config:parent.html.twig' with {'element': element, 'level': level, 'xpath': '/*', 'iterator': iterator, 'hideEditBar': true} %} 42 | {% set iterator = iterator + 1 %} 43 | {% endfor %} 44 | -------------------------------------------------------------------------------- /src/FIT/Bundle/ModuleDefaultBundle/Resources/public/netopeerangular/data/get.json: -------------------------------------------------------------------------------- 1 | { 2 | "$@ietf-interfaces:interfaces": { 3 | "eltype": "leaf", 4 | "config": "false", 5 | "type": "enumeration", 6 | "enumval": ["int8", "int16", "int32", "int64", "uint8", "uint16", "uint32", "uint64", "float", "string"], 7 | "description": "The data type of the parameters argument.", 8 | "mandatory": "false", 9 | "iskey": "false", 10 | "children": ["interface", "interface-state"] 11 | }, 12 | "ietf-interfaces:interfaces": { 13 | 14 | "$@interface": { 15 | "eltype": "list", 16 | "config": "true", 17 | "type": "enumeration", 18 | "iskey": "false" 19 | }, 20 | "interface": [ 21 | { 22 | "$@name": { 23 | "config": "true", 24 | "type": "string", 25 | "description": "The data type of the parameters argument." 26 | }, 27 | "name": "eth0", 28 | 29 | "$@type": { 30 | "typedef": { 31 | "type": "uint8", 32 | "range": "0 .. 100", 33 | "description": "Percentage" 34 | } 35 | }, 36 | "type": "iana-if-type:ethernetCsmacd", 37 | 38 | "$@enabled": { 39 | "type": "boolean" 40 | }, 41 | "enabled": false 42 | }, 43 | { 44 | "$@name": { 45 | "config": "true", 46 | "type": "string" 47 | }, 48 | "name": "eth1", 49 | 50 | "$@type": { 51 | "typedef": { 52 | "type": "uint8", 53 | "range": "0 .. 100", 54 | "description": "Percentage" 55 | } 56 | }, 57 | "type": "iana-if-type:ethernetCsmacd", 58 | "enabled": true, 59 | "ex-vlan:vlan-tagging": true 60 | } 61 | ] 62 | }, 63 | 64 | "$@ietf-interfaces:interfaces-state": { 65 | "eltype": "leaf", 66 | "config": "false", 67 | "type": "enumeration", 68 | "enumval": ["int8", "int16", "int32", "int64", "uint8", "uint16", "uint32", "uint64", "float", "string"], 69 | "description": "The data type of the parameters argument.", 70 | "mandatory": "false", 71 | "iskey": "false" 72 | }, 73 | "ietf-interfaces:interfaces-state": { 74 | 75 | } 76 | } 77 | -------------------------------------------------------------------------------- /src/FIT/NetopeerBundle/Resources/config/routing.yml: -------------------------------------------------------------------------------- 1 | # @author David Alexa 2 | # 3 | # Copyright (C) 2012-2015 CESNET 4 | # 5 | # LICENSE TERMS 6 | # 7 | # Redistribution and use in source and binary forms, with or without 8 | # modification, are permitted provided that the following conditions 9 | # are met: 10 | # 1. Redistributions of source code must retain the above copyright 11 | # notice, this list of conditions and the following disclaimer. 12 | # 2. Redistributions in binary form must reproduce the above copyright 13 | # notice, this list of conditions and the following disclaimer in 14 | # the documentation and/or other materials provided with the 15 | # distribution. 16 | # 3. Neither the name of the Company nor the names of its contributors 17 | # may be used to endorse or promote products derived from this 18 | # software without specific prior written permission. 19 | # 20 | # ALTERNATIVELY, provided that this notice is retained in full, this 21 | # product may be distributed under the terms of the GNU General Public 22 | # License (GPL) version 2 or later, in which case the provisions 23 | # of the GPL apply INSTEAD OF those given above. 24 | # 25 | # This software is provided ``as is'', and any express or implied 26 | # warranties, including, but not limited to, the implied warranties of 27 | # merchantability and fitness for a particular purpose are disclaimed. 28 | # In no event shall the company or contributors be liable for any 29 | # direct, indirect, incidental, special, exemplary, or consequential 30 | # damages (including, but not limited to, procurement of substitute 31 | # goods or services; loss of use, data, or profits; or business 32 | # interruption) however caused and on any theory of liability, whether 33 | # in contract, strict liability, or tort (including negligence or 34 | # otherwise) arising in any way out of the use of this software, even 35 | # if advised of the possibility of such damage. 36 | 37 | homepage: 38 | pattern: / 39 | defaults: { _controller: FITNetopeerBundle:Default:index } 40 | 41 | _login: 42 | pattern: /login 43 | defaults: { _controller: FITNetopeerBundle:Security:login } 44 | _login_check: 45 | pattern: /login_check 46 | _logout: 47 | pattern: /logout 48 | -------------------------------------------------------------------------------- /src/FIT/NetopeerBundle/Resources/views/Ajax/lookupip.html.twig: -------------------------------------------------------------------------------- 1 | 29 | 30 | {% if (latitude is defined) and (longitude is defined) %} 31 | 66 | {% endif %} -------------------------------------------------------------------------------- /src/FIT/NetopeerBundle/Tests/Codeception/_support/CommonScenarios.php: -------------------------------------------------------------------------------- 1 | maximizeWindow(); 18 | $I->wantTo('log in as admin user'); 19 | $I->amOnPage('/logout'); 20 | $I->fillField('Username', 'admin'); 21 | $I->fillField('Password', 'pass'); 22 | $I->click('Log in'); 23 | $I->expect('I am redirected to connections page'); 24 | $I->seeCurrentUrlMatches('/connections/'); 25 | $I->see('List of active connections'); 26 | } 27 | 28 | public static function connectToLocalhostDevice($I) 29 | { 30 | /** 31 | * @var WebGuy $I 32 | */ 33 | $I->wantTo('connect to localhost device'); 34 | $I->amOnPage('/connections/'); 35 | $I->fillField('Host', 'localhost'); 36 | $I->fillField('Port', '830'); 37 | $I->fillField('User', CommonScenarios::$deviceUser); 38 | $I->fillField('Password', CommonScenarios::$devicePass); 39 | $I->click('Connect'); 40 | $I->waitForText('Loading...', 10); 41 | $I->waitForText('Configure device', 50); 42 | $I->waitForText('History of connected devices', 10); 43 | $I->waitForText('localhost:830', 2); 44 | self::checkNumberOfFlashes($I, 3); 45 | } 46 | 47 | public static function checkNumberOfFlashes($I, $number, $kind = 'success', $message = null) { 48 | /** 49 | * @var WebGuy $I 50 | */ 51 | $I->expectTo('see '.$number.' of '.$kind.' flashes'); 52 | $I->wait(1); 53 | $I->click('.ico-alerts'); 54 | $I->wait(2); 55 | $I->waitForElementVisible('#block--alerts'); 56 | $I->seeNumberOfElements('.message.'.$kind, $number); 57 | if (!is_null($message)) { 58 | $I->canSee($message); 59 | } 60 | $I->click('.ico-alerts'); 61 | $I->wait(3); 62 | // $I->waitForElementNotVisible('#block--alerts'); 63 | } 64 | 65 | public static function waitAndClickInTypeahead($I, $link) { 66 | /** 67 | * @var WebGuy $I 68 | */ 69 | $I->waitForElement('.typeahead'); 70 | $I->waitForText($link, 5, '.typeahead'); 71 | $I->click($link, '.typeahead'); 72 | $I->wait(3); 73 | } 74 | } -------------------------------------------------------------------------------- /src/FIT/NetopeerBundle/bin/find-identities.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | # Copyright (C) 2015 CESNET 4 | # 5 | # LICENSE TERMS 6 | # 7 | # Redistribution and use in source and binary forms, with or without 8 | # modification, are permitted provided that the following conditions 9 | # are met: 10 | # 1. Redistributions of source code must retain the above copyright 11 | # notice, this list of conditions and the following disclaimer. 12 | # 2. Redistributions in binary form must reproduce the above copyright 13 | # notice, this list of conditions and the following disclaimer in 14 | # the documentation and/or other materials provided with the 15 | # distribution. 16 | # 3. Neither the name of the Company nor the names of its contributors 17 | # may be used to endorse or promote products derived from this 18 | # software without specific prior written permission. 19 | # 20 | # ALTERNATIVELY, provided that this notice is retained in full, this 21 | # product may be distributed under the terms of the GNU General Public 22 | # License (GPL) version 2 or later, in which case the provisions 23 | # of the GPL apply INSTEAD OF those given above. 24 | # 25 | # This software is provided ``as is'', and any express or implied 26 | # warranties, including, but not limited to, the implied warranties of 27 | # merchantability and fitness for a particular purpose are disclaimed. 28 | # In no event shall the company or contributors be liable for any 29 | # direct, indirect, incidental, special, exemplary, or consequential 30 | # damages (including, but not limited to, procurement of substitute 31 | # goods or services; loss of use, data, or profits; or business 32 | # interruption) however caused and on any theory of liability, whether 33 | # in contract, strict liability, or tort (including negligence or 34 | # otherwise) arising in any way out of the use of this software, even 35 | # if advised of the possibility of such damage. 36 | # 37 | 38 | # get directory of this script 39 | 40 | if [ $# -ne 1 ]; then 41 | echo "Expecting exactly 1 argument with .../Data/models/tmp/ path." 42 | exit 1 43 | fi 44 | 45 | modelpath="$1" 46 | ( 47 | # move into directory with downloaded models 48 | cd "$modelpath" 49 | 50 | # run preprocessor to gain identities 51 | binary="$0" 52 | ${binary%%.sh}.py > "$modelpath/identities.json" 53 | ) 54 | 55 | -------------------------------------------------------------------------------- /install/centos7/install.sh: -------------------------------------------------------------------------------- 1 | sudo yum install -y wget git gcc gcc-c++ zlib1g-devel libssl-devel openssl-devel cmake pcre-devel autoconf automake json-c-devel 2 | 3 | # PHP dependencies: 4 | yum install -y php php-common php-json php-dom php-pdo php-intl php-sysvsem 5 | 6 | ( 7 | wget https://red.libssh.org/attachments/download/177/libssh-0.7.2.tar.xz 8 | tar -xJf libssh-0.7.2.tar.xz 9 | mkdir -p libssh-0.7.2/build 10 | cd libssh-0.7.2/build 11 | cmake -DCMAKE_INSTALL_PREFIX:PATH=/usr -DLIB_INSTALL_DIR=/usr/lib64 .. && make -j2 && sudo make install 12 | ) 13 | 14 | ( 15 | git clone --depth 1 https://github.com/CESNET/libyang.git 16 | mkdir -p libyang/build 17 | cd libyang/build 18 | cmake -DCMAKE_INSTALL_PREFIX=/usr -DLIB_INSTALL_DIR=lib64 -DENABLE_BUILD_TESTS=OFF .. && sudo make install && sudo make install 19 | ) 20 | 21 | ( 22 | wget https://cmocka.org/files/1.0/cmocka-1.0.1.tar.xz 23 | tar -xJf cmocka-1.0.1.tar.xz 24 | mkdir -p cmocka-1.0.1/build 25 | cd cmocka-1.0.1/build 26 | cmake -DCMAKE_INSTALL_PREFIX:PATH=/usr .. && make -j2 && sudo make install 27 | ) 28 | 29 | ( 30 | git clone --depth 1 https://github.com/warmcat/libwebsockets.git lws 31 | mkdir lws/b 32 | cd lws/b 33 | cmake -DCMAKE_INSTALL_PREFIX:PATH=/usr -DLWS_INSTALL_LIB_DIR=/usr/lib -DLIB_SUFFIX=64 .. && sudo make install 34 | ) 35 | 36 | # libnetconf2 37 | ( 38 | git clone --depth 1 https://github.com/CESNET/libnetconf2.git 39 | mkdir -p libnetconf2/build 40 | cd libnetconf2/build 41 | cmake -DENABLE_TLS=ON -DENABLE_SSH=ON -DENABLE_BUILD_TESTS=OFF -DCMAKE_INSTALL_PREFIX=/usr -DLIB_INSTALL_DIR=lib64 .. && sudo make install 42 | ) 43 | ldconfig 44 | 45 | ( 46 | git clone --depth 1 https://github.com/CESNET/netopeerguid 47 | cd netopeerguid 48 | ./bootstrap.sh 49 | ./configure 50 | make 51 | make install 52 | ) 53 | 54 | ( 55 | cd /var/www/ 56 | git clone --depth 1 https://github.com/CESNET/Netopeer-GUI netopeergui 57 | cd netopeergui 58 | cp app/config/parameters.yml.dist app/config/parameters.yml 59 | php app/check.php 60 | php ./composer.phar self-update 61 | php ./composer.phar install 62 | php app/check.php 63 | cd install 64 | ./bootstrap.sh && ./configure --without-modnetconf -q && make install 65 | service httpd restart 66 | service netopeerguid restart 67 | cd /var/www/netopeergui 68 | php app/console app:install --post=install 69 | chcon -R -t httpd_sys_rw_content_t /var/www/netopeergui/app/{cache,logs} 70 | ) 71 | -------------------------------------------------------------------------------- /src/FIT/NetopeerBundle/Tests/Codeception/acceptance/NacmConfigureCest.php: -------------------------------------------------------------------------------- 1 | click('Configure device'); 13 | $I->waitForText('Config & State data', 10); 14 | $I->canSeeInCurrentUrl('sections/0/interfaces/'); 15 | $I->click('Nacm'); 16 | $I->waitForText('enable-nacm'); 17 | $I->canSeeInCurrentUrl('sections/0/nacm/'); 18 | $I->wait(4); 19 | } 20 | 21 | public function _after(WebGuy $I) 22 | { 23 | $I->amOnPage('/logout'); 24 | } 25 | 26 | public function _addGroups(WebGuy $I, $inputValue) { 27 | $I->click('.create-child[rel="--*?1!"]'); 28 | CommonScenarios::waitAndClickInTypeahead($I, 'groups'); 29 | $I->click('.create-child', '.generatedForm'); 30 | CommonScenarios::waitAndClickInTypeahead($I, 'group'); 31 | $I->waitForElement('input.value[name*="--*?1!--*?1!--*?1!--*?1!"]'); 32 | $I->fillField('input.value[name*="--*?1!--*?1!--*?1!--*?1!"]', $inputValue); 33 | } 34 | 35 | public function testEditConfigWithCommit(WebGuy $I) { 36 | $I->wantTo('create new interface using commit all'); 37 | 38 | $inputValue = 'test-name'.time(); 39 | 40 | $this->_addGroups($I, $inputValue); 41 | $I->click('Append changes'); 42 | 43 | $I->seeNumberOfElements('form.addedForm', 1); 44 | $I->click('Commit all changes'); 45 | $I->waitForElementNotVisible('#ajax-spinner'); 46 | 47 | $I->wait(2); 48 | 49 | // see result 50 | // $I->canSee($inputValue); 51 | CommonScenarios::checkNumberOfFlashes($I, 1); 52 | $I->canSee('group'); 53 | } 54 | 55 | public function testEditConfig(WebGuy $I) { 56 | $I->wantTo('create new interface using submit button'); 57 | $inputValue = 'test-name'.time(); 58 | 59 | $I->click('.create-child[rel="--*--*?3!"]'); 60 | CommonScenarios::waitAndClickInTypeahead($I, 'group'); 61 | $I->waitForElement('input.value[name*="--*--*?3!--*?1!--*?1!"]'); 62 | $I->fillField('input.value[name*="--*--*?3!--*?1!--*?1!"]', $inputValue); 63 | 64 | $I->click('Create new node'); 65 | $I->waitForElementNotVisible('#ajax-spinner'); 66 | 67 | $I->wait(2); 68 | 69 | // $I->canSee($inputValue); 70 | CommonScenarios::checkNumberOfFlashes($I, 1); 71 | $I->canSee('group'); 72 | } 73 | } -------------------------------------------------------------------------------- /src/FIT/NetopeerBundle/Tests/Codeception/acceptance/DatastoreConfigureCest.php: -------------------------------------------------------------------------------- 1 | amOnPage('/logout'); 16 | } 17 | 18 | public function _login(WebGuy $I) { 19 | CommonScenarios::login($I); 20 | CommonScenarios::connectToLocalhostDevice($I); 21 | $I->click('Configure device'); 22 | $I->waitForText('Config & State data', 10); 23 | $I->canSeeInCurrentUrl('sections/0/interfaces/'); 24 | } 25 | 26 | public function _changeTo(WebGuy $I, $datastore = 'Candidate') { 27 | $I->selectOption('#form_source', $datastore); 28 | $I->expectTo('change datastore to '.$datastore); 29 | $I->waitForElementNotVisible('#ajax-spinner'); 30 | $I->waitForText('Config data only'); 31 | } 32 | 33 | public function _createEmptyModule(WebGuy $I) { 34 | $I->canSee('Create empty root element'); 35 | $I->wait(2); 36 | $I->click('.typeaheadName'); 37 | $I->waitForElement('.typeahead'); 38 | $I->click('interfaces'); 39 | $I->click('.typeaheadNS'); 40 | $I->expectTo('see only one available NS'); 41 | $I->seeNumberOfElements('.typeaheadNS + .typeahead a', 1); 42 | $I->click('urn:ietf:params:xml:ns:yang:ietf-interfaces'); 43 | $I->click('Create'); 44 | $I->waitForText('interfaces'); 45 | } 46 | 47 | public function testDatastore(WebGuy $I) { 48 | $this->_login($I); 49 | $this->_changeTo($I); 50 | $I->wantTo('test candidate datastore'); 51 | 52 | // check if module is empty 53 | if (0) { 54 | $I->click('.remove-child'); 55 | $I->click('Delete record'); 56 | $I->waitForElementNotVisible('#ajax-spinner'); 57 | $I->waitForText('Create empty root element'); 58 | CommonScenarios::checkNumberOfFlashes($I, 1); 59 | } 60 | 61 | $this->_createEmptyModule($I); 62 | } 63 | 64 | public function _copyToRunning(WebGuy $I) { 65 | $this->_login($I); 66 | $this->_changeTo($I, 'Start-up'); 67 | $I->selectOption("#form_target", 'Running'); 68 | $I->click('Copy active datastore'); 69 | $I->waitForElementNotVisible('#ajax-spinner'); 70 | 71 | $I->expectTo('see copied candidate datastore'); 72 | $I->selectOption('#form_source', 'Running'); 73 | $I->waitForElementNotVisible('#ajax-spinner'); 74 | $I->canSee('interfaces'); 75 | $I->seeNumberOfElements('.leaf-line', 1); 76 | } 77 | } -------------------------------------------------------------------------------- /src/FIT/Bundle/ModuleDefaultBundle/Resources/views/layout.html.twig: -------------------------------------------------------------------------------- 1 | {% extends 'FITNetopeerBundle::layout.html.twig' %} 2 | 3 | {% block moduleJavascripts %} 4 | {##} 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | {#'@FITModuleDefaultBundle/Resources/public/js/tooltip/gips.js'#} 15 | {#'@FITModuleDefaultBundle/Resources/public/js/*'#} 16 | {% javascripts 17 | '@FITModuleDefaultBundle/Resources/public/netopeerangular/js/directives2.js' 18 | '@FITModuleDefaultBundle/Resources/public/netopeerangular/js/directives/*' 19 | '@FITModuleDefaultBundle/Resources/public/netopeerangular/js/services/*' 20 | '@FITModuleDefaultBundle/Resources/public/netopeerangular/js/*' 21 | '@FITModuleDefaultBundle/Resources/public/netopeerangular/public/*' 22 | '@FITModuleDefaultBundle/Resources/public/js/*' 23 | output='js/compiled/module-default.js' 24 | %} 25 | 26 | {% endjavascripts %} 27 | 28 | 32 | {% endblock %} 33 | 34 | {% block moduleStylesheet %} 35 | {% stylesheets 36 | 'bundles/fitmoduledefault/netopeerangular/css/stylesheets/screen.css' 37 | filter='cssrewrite' 38 | output='css/module-default.css' 39 | %} 40 | 41 | {% endstylesheets %} 42 | {% endblock %} -------------------------------------------------------------------------------- /src/FIT/Bundle/ModuleDefaultBundle/Resources/public/netopeerangular/bower_components/font-awesome-sass/README.md: -------------------------------------------------------------------------------- 1 | # FontAwesome::Sass 2 | 3 | [![Gem Version](https://badge.fury.io/rb/font-awesome-sass.svg)](https://badge.fury.io/rb/font-awesome-sass) 4 | 5 | 'font-awesome-sass' is a Sass-powered version of [FontAwesome](http://fortawesome.github.io/Font-Awesome/) for your Ruby projects and plays nicely with 6 | Ruby on Rails, Compass, Sprockets, etc. 7 | 8 | Refactored to support more Ruby environments with code and documentation humbly used from the excellent 9 | [bootstrap-sass](https://github.com/twbs/bootstrap-sass) project by the Bootstrap team 10 | 11 | ## Installation 12 | 13 | Please see the appropriate guide for your environment of choice: 14 | 15 | * [Ruby on Rails](#a-ruby-on-rails). 16 | * [Compass](#b-compass-without-rails) not on Rails. 17 | 18 | ### a. Ruby on Rails 19 | 20 | In your Gemfile include: 21 | 22 | ```ruby 23 | gem 'font-awesome-sass', '~> 4.5.0' 24 | ``` 25 | 26 | And then execute: 27 | 28 | ```sh 29 | bundle install 30 | ``` 31 | 32 | Import the FontAwesome styles in your `app/assets/stylesheets/application.css.scss`. The `font-awesome-sprockets` file 33 | includes the sprockets assets helper Sass functions used for finding the proper path to the font file. 34 | 35 | ```scss 36 | @import "font-awesome-sprockets"; 37 | @import "font-awesome"; 38 | ``` 39 | 40 | #### Rails Helper usage 41 | 42 | In your view: 43 | 44 | ```ruby 45 | icon('flag') 46 | # => 47 | ``` 48 | 49 | ```ruby 50 | icon('flag', class: 'strong') 51 | # => 52 | ``` 53 | 54 | ```ruby 55 | icon('flag', 'Font Awesome', id: 'my-icon', class: 'strong') 56 | # => Font Awesome 57 | ``` 58 | 59 | Note: the icon helper can take a hash of options that will be passed to the content_tag helper 60 | 61 | ### b. Compass without Rails 62 | 63 | Install the gem 64 | 65 | ```sh 66 | gem install font-awesome-sass 67 | ``` 68 | 69 | If you have an existing Compass project: 70 | 71 | ```ruby 72 | # config.rb: 73 | require 'font-awesome-sass' 74 | ``` 75 | 76 | Import the FontAwesome styles 77 | 78 | ```scss 79 | @import "font-awesome-compass"; 80 | @import "font-awesome"; 81 | ``` 82 | 83 | ## Upgrading from FontAwesome::Sass 3.x 84 | 85 | Prepend the `fa` class to existing icons: 86 | 87 | 3.x Syntax 88 | 89 | ```html 90 | 91 | ``` 92 | 93 | 4.x Syntax 94 | 95 | ```html 96 | 97 | ``` 98 | -------------------------------------------------------------------------------- /install/ubuntu/Vagrantfile: -------------------------------------------------------------------------------- 1 | # -*- mode: ruby -*- 2 | # vi: set ft=ruby : 3 | 4 | # All Vagrant configuration is done below. The "2" in Vagrant.configure 5 | # configures the configuration version (we support older styles for 6 | # backwards compatibility). Please don't change it unless you know what 7 | # you're doing. 8 | Vagrant.configure(2) do |config| 9 | config.vm.box = "bento/ubuntu-15.04" 10 | config.vm.network "forwarded_port", guest: 80, host: 3280 11 | config.vm.provision "shell", inline: <<-SHELL 12 | sudo apt-get update 13 | 14 | # Build dependencies 15 | sudo apt-get install -y apache2 apache2-dev vim git autoconf automake pkg-config libtool wget libxml2-dev libssh2-1-dev gcc g\+\+ zlib1g-dev libssl-dev cmake libpcre3-dev libjson-c-dev make libxslt-dev libcurl4-openssl-dev libtool xsltproc python-setuptools libapr1-dev libaprutil1-dev 16 | 17 | # PHP dependencies: 18 | sudo apt-get install -y php5 php5-common php5-json php5-sqlite php5-odbc php5-intl 19 | 20 | export PKG_CONFIG_PATH=${PKG_CONFIG_PATH}:/usr/lib64/pkgconfig 21 | 22 | # libssh 23 | ( 24 | wget https://red.libssh.org/attachments/download/177/libssh-0.7.2.tar.xz 25 | tar -xJf libssh-0.7.2.tar.xz 26 | mkdir -p libssh-0.7.2/build 27 | cd libssh-0.7.2/build 28 | cmake -DCMAKE_INSTALL_PREFIX:PATH=/usr .. && make -j2 && sudo make install 29 | ) 30 | 31 | ( 32 | git clone --depth 1 https://github.com/CESNET/libyang.git 33 | mkdir -p libyang/build 34 | cd libyang/build 35 | cmake -DCMAKE_INSTALL_PREFIX=/usr -DLIB_INSTALL_DIR=lib64 -DENABLE_BUILD_TESTS=OFF .. && sudo make install && sudo make install 36 | ) 37 | 38 | ( 39 | wget https://cmocka.org/files/1.0/cmocka-1.0.1.tar.xz 40 | tar -xJf cmocka-1.0.1.tar.xz 41 | mkdir -p cmocka-1.0.1/build 42 | cd cmocka-1.0.1/build 43 | cmake -DCMAKE_INSTALL_PREFIX:PATH=/usr .. && make -j2 && sudo make install 44 | ) 45 | 46 | ( 47 | git clone --depth 1 https://github.com/warmcat/libwebsockets.git lws 48 | mkdir lws/b 49 | cd lws/b 50 | cmake -DCMAKE_INSTALL_PREFIX:PATH=/usr -DLWS_INSTALL_LIB_DIR=/usr/lib64 -DLIB_SUFFIX= .. && sudo make install 51 | ) 52 | 53 | # libnetconf2 54 | ( 55 | git clone --depth 1 https://github.com/CESNET/libnetconf2.git 56 | mkdir -p libnetconf2/build 57 | cd libnetconf2/build 58 | cmake -DENABLE_TLS=ON -DENABLE_SSH=ON -DENABLE_BUILD_TESTS=OFF -DCMAKE_INSTALL_PREFIX=/usr -DLIB_INSTALL_DIR=lib64 .. && sudo make install 59 | ) 60 | ldconfig 61 | 62 | # netopeerguid 63 | ( 64 | git clone --depth 1 https://github.com/CESNET/netopeerguid 65 | cd netopeerguid 66 | ./bootstrap.sh 67 | ./configure 68 | make 69 | make install 70 | ) 71 | SHELL 72 | end 73 | -------------------------------------------------------------------------------- /app/config/config.yml: -------------------------------------------------------------------------------- 1 | imports: 2 | - { resource: parameters.yml } 3 | - { resource: security.yml } 4 | 5 | framework: 6 | #esi: ~ 7 | #translator: { fallback: %locale% } 8 | secret: %secret% 9 | router: 10 | resource: "%kernel.root_dir%/config/routing.yml" 11 | strict_requirements: ~ 12 | form: ~ 13 | 14 | csrf_protection: ~ 15 | validation: { enable_annotations: true } 16 | templating: 17 | engines: ['twig'] 18 | #assets_version: SomeVersionScheme 19 | default_locale: "%locale%" 20 | trusted_proxies: ~ 21 | session: ~ 22 | fragments: ~ 23 | http_method_override: true 24 | 25 | # netopeerGUI configuration 26 | parameters: 27 | fit_netopeer.single_instance: %netopeer_single_instance% 28 | #fit_netopeer.single_instance.host: 'localhost' 29 | #fit_netopeer.single_instance.port: '830' 30 | 31 | netopeer.netconf.functionality: FIT\NetopeerBundle\Services\Functionality\NetconfFunctionality 32 | 33 | # Twig Configuration 34 | twig: 35 | debug: %kernel.debug% 36 | strict_variables: %kernel.debug% 37 | 38 | # Assetic Configuration 39 | assetic: 40 | debug: %kernel.debug% 41 | use_controller: false 42 | bundles: [FITNetopeerBundle, FITModuleDefaultBundle, FITModuleXmlBundle] 43 | #java: /usr/bin/java 44 | filters: 45 | cssrewrite: [] 46 | #closure: 47 | # jar: %kernel.root_dir%/Resources/java/compiler.jar 48 | #yui_css: 49 | # jar: %kernel.root_dir%/Resources/java/yuicompressor-2.4.7.jar 50 | 51 | # Doctrine Configuration 52 | doctrine: 53 | dbal: 54 | driver: %database_driver% 55 | host: %database_host% 56 | port: %database_port% 57 | dbname: %database_name% 58 | user: %database_user% 59 | password: %database_password% 60 | charset: UTF8 61 | # if using pdo_sqlite as your database driver, add the path in parameters.yml 62 | # e.g. database_path: %kernel.root_dir%/data/data.db3 63 | path: %database_path% 64 | 65 | orm: 66 | auto_generate_proxy_classes: %kernel.debug% 67 | auto_mapping: true 68 | 69 | # Saml Bundle 70 | aerial_ship_saml_sp: 71 | driver: orm 72 | sso_state_entity_class: FIT\NetopeerBundle\Entity\SamlUser 73 | 74 | # Swiftmailer Configuration 75 | swiftmailer: 76 | transport: %mailer_transport% 77 | host: %mailer_host% 78 | username: %mailer_user% 79 | password: %mailer_password% 80 | spool: { type: memory } 81 | -------------------------------------------------------------------------------- /src/FIT/NetopeerBundle/Resources/config/functionality.yml: -------------------------------------------------------------------------------- 1 | # @author David Alexa 2 | # 3 | # Copyright (C) 2012-2015 CESNET 4 | # 5 | # LICENSE TERMS 6 | # 7 | # Redistribution and use in source and binary forms, with or without 8 | # modification, are permitted provided that the following conditions 9 | # are met: 10 | # 1. Redistributions of source code must retain the above copyright 11 | # notice, this list of conditions and the following disclaimer. 12 | # 2. Redistributions in binary form must reproduce the above copyright 13 | # notice, this list of conditions and the following disclaimer in 14 | # the documentation and/or other materials provided with the 15 | # distribution. 16 | # 3. Neither the name of the Company nor the names of its contributors 17 | # may be used to endorse or promote products derived from this 18 | # software without specific prior written permission. 19 | # 20 | # ALTERNATIVELY, provided that this notice is retained in full, this 21 | # product may be distributed under the terms of the GNU General Public 22 | # License (GPL) version 2 or later, in which case the provisions 23 | # of the GPL apply INSTEAD OF those given above. 24 | # 25 | # This software is provided ``as is'', and any express or implied 26 | # warranties, including, but not limited to, the implied warranties of 27 | # merchantability and fitness for a particular purpose are disclaimed. 28 | # In no event shall the company or contributors be liable for any 29 | # direct, indirect, incidental, special, exemplary, or consequential 30 | # damages (including, but not limited to, procurement of substitute 31 | # goods or services; loss of use, data, or profits; or business 32 | # interruption) however caused and on any theory of liability, whether 33 | # in contract, strict liability, or tort (including negligence or 34 | # otherwise) arising in any way out of the use of this software, even 35 | # if advised of the possibility of such damage. 36 | 37 | services: 38 | fitnetopeerbundle.service.connection.functionality: 39 | class: FIT\NetopeerBundle\Services\Functionality\ConnectionFunctionality 40 | calls: 41 | - [setLogger, [@data_logger]] 42 | - [setCache, [@winzou_cache]] 43 | - [setSession, [@session]] 44 | - [setContainer, [@service_container]] 45 | - [setEntityManager, [@doctrine.orm.entity_manager]] 46 | fitnetopeerbundle.service.netconf.functionality: 47 | class: %netopeer.netconf.functionality% 48 | calls: 49 | - [setLogger, [@data_logger]] 50 | - [setSession, [@session]] 51 | - [setConnectionFunctionality, [@fitnetopeerbundle.service.connection.functionality]] -------------------------------------------------------------------------------- /src/FIT/Bundle/ModuleDefaultBundle/Resources/public/netopeerangular/bower_components/angular-ui-sortable/sortable.min.js: -------------------------------------------------------------------------------- 1 | !function(a,b){"use strict";b.module("ui.sortable",[]).value("uiSortableConfig",{}).directive("uiSortable",["uiSortableConfig","$timeout","$log",function(a,c,d){return{require:"?ngModel",link:function(e,f,g,h){function i(a,b){return b&&"function"==typeof b?function(c,d){a(c,d),b(c,d)}:a}function j(a,b){var c=a.sortable("option","helper");return"clone"===c||"function"==typeof c&&b.item.sortable.isCustomHelperUsed()}var k,l={},m={receive:null,remove:null,start:null,stop:null,update:null},n={helper:null};return b.extend(l,a,e.$eval(g.uiSortable)),b.element.fn&&b.element.fn.jquery?(h?(e.$watch(g.ngModel+".length",function(){c(function(){f.data("ui-sortable")&&f.sortable("refresh")})}),m.start=function(a,b){b.item.sortable={index:b.item.index(),cancel:function(){b.item.sortable._isCanceled=!0},isCanceled:function(){return b.item.sortable._isCanceled},isCustomHelperUsed:function(){return!!b.item.sortable._isCustomHelperUsed},_isCanceled:!1,_isCustomHelperUsed:b.item.sortable._isCustomHelperUsed}},m.activate=function(){k=f.contents();var a=f.sortable("option","placeholder");if(a&&a.element&&"function"==typeof a.element){var c=a.element();c=b.element(c);var d=f.find('[class="'+c.attr("class")+'"]');k=k.not(d)}},m.update=function(a,b){b.item.sortable.received||(b.item.sortable.dropindex=b.item.index(),b.item.sortable.droptarget=b.item.parent(),f.sortable("cancel")),j(f,b)&&!b.item.sortable.received&&"parent"===f.sortable("option","appendTo")&&(k=k.not(k.last())),k.appendTo(f),b.item.sortable.received&&(k=null),b.item.sortable.received&&!b.item.sortable.isCanceled()&&e.$apply(function(){h.$modelValue.splice(b.item.sortable.dropindex,0,b.item.sortable.moved)})},m.stop=function(a,b){!b.item.sortable.received&&"dropindex"in b.item.sortable&&!b.item.sortable.isCanceled()?e.$apply(function(){h.$modelValue.splice(b.item.sortable.dropindex,0,h.$modelValue.splice(b.item.sortable.index,1)[0])}):"dropindex"in b.item.sortable&&!b.item.sortable.isCanceled()||j(f,b)||k.appendTo(f),k=null},m.receive=function(a,b){b.item.sortable.received=!0},m.remove=function(a,b){"dropindex"in b.item.sortable||(f.sortable("cancel"),b.item.sortable.cancel()),b.item.sortable.isCanceled()||e.$apply(function(){b.item.sortable.moved=h.$modelValue.splice(b.item.sortable.index,1)[0]})},n.helper=function(a){return a&&"function"==typeof a?function(b,c){var d=a(b,c);return c.sortable._isCustomHelperUsed=c!==d,d}:a},e.$watch(g.uiSortable,function(a){f.data("ui-sortable")&&b.forEach(a,function(a,b){m[b]?("stop"===b&&(a=i(a,function(){e.$apply()})),a=i(m[b],a)):n[b]&&(a=n[b](a)),f.sortable("option",b,a)})},!0),b.forEach(m,function(a,b){l[b]=i(a,l[b])})):d.info("ui.sortable: ngModel not provided!",f),void f.sortable(l)):void d.error("ui.sortable: jQuery should be included before AngularJS!")}}}])}(window,window.angular); -------------------------------------------------------------------------------- /src/FIT/NetopeerBundle/Tests/_files/completeRequestTree/turing-machine-data.rng: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | -------------------------------------------------------------------------------- /src/FIT/NetopeerBundle/Controller/ModuleControllerInterface.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * Copyright (C) 2012-2015 CESNET 9 | * 10 | * LICENSE TERMS 11 | * 12 | * Redistribution and use in source and binary forms, with or without 13 | * modification, are permitted provided that the following conditions 14 | * are met: 15 | * 1. Redistributions of source code must retain the above copyright 16 | * notice, this list of conditions and the following disclaimer. 17 | * 2. Redistributions in binary form must reproduce the above copyright 18 | * notice, this list of conditions and the following disclaimer in 19 | * the documentation and/or other materials provided with the 20 | * distribution. 21 | * 3. Neither the name of the Company nor the names of its contributors 22 | * may be used to endorse or promote products derived from this 23 | * software without specific prior written permission. 24 | * 25 | * ALTERNATIVELY, provided that this notice is retained in full, this 26 | * product may be distributed under the terms of the GNU General Public 27 | * License (GPL) version 2 or later, in which case the provisions 28 | * of the GPL apply INSTEAD OF those given above. 29 | * 30 | * This software is provided ``as is'', and any express or implied 31 | * warranties, including, but not limited to, the implied warranties of 32 | * merchantability and fitness for a particular purpose are disclaimed. 33 | * In no event shall the company or contributors be liable for any 34 | * direct, indirect, incidental, special, exemplary, or consequential 35 | * damages (including, but not limited to, procurement of substitute 36 | * goods or services; loss of use, data, or profits; or business 37 | * interruption) however caused and on any theory of liability, whether 38 | * in contract, strict liability, or tort (including negligence or 39 | * otherwise) arising in any way out of the use of this software, even 40 | * if advised of the possibility of such damage. 41 | * 42 | */ 43 | 44 | namespace FIT\NetopeerBundle\Controller; 45 | 46 | 47 | interface ModuleControllerInterface { 48 | 49 | /** 50 | * Prepares section, module or subsection action data 51 | * 52 | * Prepares section = whole get&get-config part of server 53 | * Shows module part = first level of connected server (except of root) 54 | * Prepares subsection = second level of connected server tree 55 | * 56 | * @param int $key key of connected server 57 | * @param null|string $module name of the module 58 | * @param null|string $subsection name of the subsection 59 | * @return array|\Symfony\Component\HttpFoundation\RedirectResponse 60 | */ 61 | public function moduleAction($key, $module = null, $subsection = null); 62 | } -------------------------------------------------------------------------------- /web/.htaccess: -------------------------------------------------------------------------------- 1 | # Use the front controller as index file. It serves as a fallback solution when 2 | # every other rewrite/redirect fails (e.g. in an aliased environment without 3 | # mod_rewrite). Additionally, this reduces the matching process for the 4 | # start page (path "/") because otherwise Apache will apply the rewriting rules 5 | # to each configured DirectoryIndex file (e.g. index.php, index.html, index.pl). 6 | DirectoryIndex app.php 7 | 8 | 9 | RewriteEngine On 10 | 11 | RewriteRule /netconfwebgui/ %{ENV:BASE}/netconfwebgui/login/ [R=301,L] 12 | RewriteRule /netconfwebgui/app_dev\.php/ %{ENV:BASE}/netconfwebgui/app_dev.php/login/ [R=301,L] 13 | 14 | # Determine the RewriteBase automatically and set it as environment variable. 15 | # If you are using Apache aliases to do mass virtual hosting or installed the 16 | # project in a subdirectory, the base path will be prepended to allow proper 17 | # resolution of the app.php file and to redirect to the correct URI. It will 18 | # work in environments without path prefix as well, providing a safe, one-size 19 | # fits all solution. But as you do not need it in this case, you can comment 20 | # the following 2 lines to eliminate the overhead. 21 | RewriteCond %{REQUEST_URI}::$1 ^(/.+)/(.*)::\2$ 22 | RewriteRule ^(.*) - [E=BASE:%1] 23 | 24 | # Redirect to URI without front controller to prevent duplicate content 25 | # (with and without `/app.php`). Only do this redirect on the initial 26 | # rewrite by Apache and not on subsequent cycles. Otherwise we would get an 27 | # endless redirect loop (request -> rewrite to front controller -> 28 | # redirect -> request -> ...). 29 | # So in case you get a "too many redirects" error or you always get redirected 30 | # to the start page because your Apache does not expose the REDIRECT_STATUS 31 | # environment variable, you have 2 choices: 32 | # - disable this feature by commenting the following 2 lines or 33 | # - use Apache >= 2.3.9 and replace all L flags by END flags and remove the 34 | # following RewriteCond (best solution) 35 | RewriteCond %{ENV:REDIRECT_STATUS} ^$ 36 | RewriteRule ^app\.php(/(.*)|$) %{ENV:BASE}/$2 [R=301,L] 37 | 38 | # If the requested filename exists, simply serve it. 39 | # We only want to let Apache serve files and not directories. 40 | RewriteCond %{REQUEST_FILENAME} -f 41 | RewriteRule .? - [L] 42 | 43 | # Rewrite all other queries to the front controller. 44 | RewriteRule .? %{ENV:BASE}/app.php [L] 45 | 46 | 47 | 48 | 49 | # When mod_rewrite is not available, we instruct a temporary redirect of 50 | # the start page to the front controller explicitly so that the website 51 | # and the generated links can still be used. 52 | RedirectMatch 302 ^/$ /app.php/ 53 | # RedirectTemp cannot be used instead 54 | 55 | 56 | -------------------------------------------------------------------------------- /src/FIT/Bundle/ModuleDefaultBundle/Resources/views/Module/showRPCForm.html.twig: -------------------------------------------------------------------------------- 1 | {# 2 | @author David Alexa 3 | 4 | Copyright (C) 2012-2015 CESNET 5 | 6 | LICENSE TERMS 7 | 8 | Redistribution and use in source and binary forms, with or without 9 | modification, are permitted provided that the following conditions 10 | are met: 11 | 1. Redistributions of source code must retain the above copyright 12 | notice, this list of conditions and the following disclaimer. 13 | 2. Redistributions in binary form must reproduce the above copyright 14 | notice, this list of conditions and the following disclaimer in 15 | the documentation and/or other materials provided with the 16 | distribution. 17 | 3. Neither the name of the Company nor the names of its contributors 18 | may be used to endorse or promote products derived from this 19 | software without specific prior written permission. 20 | 21 | ALTERNATIVELY, provided that this notice is retained in full, this 22 | product may be distributed under the terms of the GNU General Public 23 | License (GPL) version 2 or later, in which case the provisions 24 | of the GPL apply INSTEAD OF those given above. 25 | 26 | This software is provided ``as is'', and any express or implied 27 | warranties, including, but not limited to, the implied warranties of 28 | merchantability and fitness for a particular purpose are disclaimed. 29 | In no event shall the company or contributors be liable for any 30 | direct, indirect, incidental, special, exemplary, or consequential 31 | damages (including, but not limited to, procurement of substitute 32 | goods or services; loss of use, data, or profits; or business 33 | interruption) however caused and on any theory of liability, whether 34 | in contract, strict liability, or tort (including negligence or 35 | otherwise) arising in any way out of the use of this software, even 36 | if advised of the possibility of such damage. 37 | #} 38 | 39 | {% block modalWindow %} 40 | 64 | {% endblock modalWindow %} -------------------------------------------------------------------------------- /src/FIT/NetopeerBundle/Tests/Codeception/functional/FormCest.php: -------------------------------------------------------------------------------- 1 | amOnPage('/logout'); 10 | $I->submitForm('#login-form', array('_username' => 'admin', '_password' => 'pass')); 11 | $I->fillField('Host', 'localhost'); 12 | $I->fillField('Port', '830'); 13 | $I->fillField('User', CommonScenarios::$deviceUser); 14 | $I->fillField('Password', CommonScenarios::$devicePass); 15 | $I->click('Connect'); 16 | } 17 | 18 | public function _after(TestGuy $I) 19 | { 20 | $I->amOnPage('/logout'); 21 | } 22 | 23 | // tests 24 | public function submitCreateForm(TestGuy $I) 25 | { 26 | $I->wantTo('submit create form test'); 27 | $I->amOnPage('/sections/0/nacm/'); 28 | 29 | $I->canSeeInCurrentUrl('/sections/0/nacm/'); 30 | 31 | $data['newNodeForm'] = array( 32 | 'parent' => '--*?1!', 33 | 'label0_--*?1!--*?1!' => 'groups', 34 | 'value0_--*?1!--*?1!' => '', 35 | 'label1_--*?1!--*?1!--*?1!' => 'group', 36 | 'value1_--*?1!--*?1!--*?1!' => '', 37 | 'label2_--*?1!--*?1!--*?1!--*?1!' => 'name', 38 | 'value2_--*?1!--*?1!--*?1!--*?1!' => 'bestsupertestever', 39 | ); 40 | $I->sendAjaxPostRequest('/sections/0/nacm/', $data); 41 | 42 | // check what is in answer 43 | $I->see('block--state'); 44 | $I->see('bestsupertestever'); 45 | $I->dontSee('500 Internal Server Error'); 46 | } 47 | 48 | public function submitEditConfigForm(TestGuy $I) 49 | { 50 | $I->wantTo('submit edit config form test'); 51 | $I->amOnPage('/sections/0/nacm/'); 52 | 53 | $data['configDataForm'] = array( 54 | 'enable-nacm_--*--*?1!' => 'false', 55 | 'write-default_--*--*?2!' => 'deny', 56 | ); 57 | $I->sendAjaxPostRequest('/sections/0/nacm/', $data); 58 | 59 | // check what is in answer 60 | $I->see('block--state'); 61 | $I->dontSee('permit'); 62 | $I->dontSee('500 Internal Server Error'); 63 | } 64 | 65 | public function submitRemoveForm(TestGuy $I) 66 | { 67 | $I->wantTo('submit delete form test'); 68 | $I->amOnPage('/sections/0/nacm/'); 69 | 70 | $data['removeNodeForm'] = array( 71 | 'parent' => '--*--*?2!', 72 | ); 73 | $I->sendAjaxPostRequest('/sections/0/nacm/', $data); 74 | 75 | // check what is in answer 76 | $I->see('block--state'); 77 | $I->dontSee('write-default', '.form'); 78 | $I->dontSee('500 Internal Server Error'); 79 | } 80 | 81 | public function _submitEmptyModuleForm(TestGuy $I) 82 | { 83 | $I->wantTo('submit empty module form test'); 84 | $I->amOnPage('/sections/create-empty-module/0/'); 85 | 86 | // remove root element 87 | $data['form'] = array( 88 | 'name' => 'notification', 89 | 'namespace' => 'urn:ietf:params:xml:ns:netconf:notification:1.0', 90 | ); 91 | 92 | $I->submitForm('form.create-empty-module', $data); 93 | 94 | // check what is in answer 95 | $I->see('block--state'); 96 | $I->dontSee('500 Internal Server Error'); 97 | } 98 | } -------------------------------------------------------------------------------- /composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "symfony/framework-standard-edition", 3 | "license": "MIT", 4 | "type": "project", 5 | "description": "The \"Symfony Standard Edition\" distribution", 6 | "autoload": { 7 | "psr-0": { "": "src/" } 8 | }, 9 | "require": { 10 | "php": ">=5.3.3", 11 | "symfony/symfony": "2.3.*", 12 | "symfony/debug": "2.3.*", 13 | "doctrine/orm": ">=2.2.3,<2.4-dev", 14 | "doctrine/doctrine-bundle": "1.2.*", 15 | "twig/extensions": "1.0.*", 16 | "symfony/assetic-bundle": "2.3.*", 17 | "symfony/swiftmailer-bundle": "2.3.*", 18 | "symfony/monolog-bundle": "2.3.*", 19 | "sensio/distribution-bundle": "2.3.*", 20 | "sensio/framework-extra-bundle": "2.3.*", 21 | "sensio/generator-bundle": "2.3.*", 22 | "incenteev/composer-parameter-handler": "~2.0", 23 | "winzou/cache-bundle": "dev-master", 24 | "aerialship/saml-sp-bundle": "dev-master" 25 | }, 26 | "scripts": { 27 | "post-install-cmd": [ 28 | "Incenteev\\ParameterHandler\\ScriptHandler::buildParameters", 29 | "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::buildBootstrap", 30 | "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::clearCache", 31 | "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installAssets", 32 | "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installRequirementsFile", 33 | "php app/console doctrine:database:create", 34 | "php app/console doctrine:generate:entities FIT", 35 | "php app/console doctrine:schema:update --force", 36 | "php app/console app:user --action=add --user=admin --pass=pass", 37 | "php app/console assetic:dump --env=prod --no-debug", 38 | "php app/console app:install --post=install" 39 | ], 40 | "post-update-cmd": [ 41 | "Incenteev\\ParameterHandler\\ScriptHandler::buildParameters", 42 | "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::buildBootstrap", 43 | "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::clearCache", 44 | "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installAssets", 45 | "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installRequirementsFile", 46 | "php app/console doctrine:generate:entities FIT", 47 | "php app/console app:install --post=update", 48 | "php app/console assetic:dump --env=prod --no-debug" 49 | ] 50 | }, 51 | "config": { 52 | "bin-dir": "bin" 53 | }, 54 | "minimum-stability": "stable", 55 | "extra": { 56 | "symfony-app-dir": "app", 57 | "symfony-web-dir": "web", 58 | "incenteev-parameters": { 59 | "file": "app/config/parameters.yml" 60 | }, 61 | "branch-alias": { 62 | "dev-master": "2.3-dev" 63 | }, 64 | "symfony-assets-install": "symlink" 65 | } 66 | } 67 | -------------------------------------------------------------------------------- /src/FIT/NetopeerBundle/DependencyInjection/Configuration.php: -------------------------------------------------------------------------------- 1 | 6 | * 7 | * Copyright (C) 2012-2015 CESNET 8 | * 9 | * LICENSE TERMS 10 | * 11 | * Redistribution and use in source and binary forms, with or without 12 | * modification, are permitted provided that the following conditions 13 | * are met: 14 | * 1. Redistributions of source code must retain the above copyright 15 | * notice, this list of conditions and the following disclaimer. 16 | * 2. Redistributions in binary form must reproduce the above copyright 17 | * notice, this list of conditions and the following disclaimer in 18 | * the documentation and/or other materials provided with the 19 | * distribution. 20 | * 3. Neither the name of the Company nor the names of its contributors 21 | * may be used to endorse or promote products derived from this 22 | * software without specific prior written permission. 23 | * 24 | * ALTERNATIVELY, provided that this notice is retained in full, this 25 | * product may be distributed under the terms of the GNU General Public 26 | * License (GPL) version 2 or later, in which case the provisions 27 | * of the GPL apply INSTEAD OF those given above. 28 | * 29 | * This software is provided ``as is'', and any express or implied 30 | * warranties, including, but not limited to, the implied warranties of 31 | * merchantability and fitness for a particular purpose are disclaimed. 32 | * In no event shall the company or contributors be liable for any 33 | * direct, indirect, incidental, special, exemplary, or consequential 34 | * damages (including, but not limited to, procurement of substitute 35 | * goods or services; loss of use, data, or profits; or business 36 | * interruption) however caused and on any theory of liability, whether 37 | * in contract, strict liability, or tort (including negligence or 38 | * otherwise) arising in any way out of the use of this software, even 39 | * if advised of the possibility of such damage. 40 | */ 41 | 42 | namespace FIT\NetopeerBundle\DependencyInjection; 43 | 44 | use Symfony\Component\Config\Definition\Builder\TreeBuilder; 45 | use Symfony\Component\Config\Definition\ConfigurationInterface; 46 | 47 | /** 48 | * This is the class that validates and merges configuration from your app/config files 49 | * 50 | * To learn more see {@link http://symfony.com/doc/current/cookbook/bundles/extension.html#cookbook-bundles-extension-config-class} 51 | */ 52 | class Configuration implements ConfigurationInterface 53 | { 54 | /** 55 | * {@inheritDoc} 56 | */ 57 | public function getConfigTreeBuilder() 58 | { 59 | $treeBuilder = new TreeBuilder(); 60 | $rootNode = $treeBuilder->root('fit_netopeer'); 61 | 62 | // Here you should define the parameters that are allowed to 63 | // configure your bundle. See the documentation linked above for 64 | // more information on that topic. 65 | 66 | return $treeBuilder; 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /src/FIT/NetopeerBundle/Resources/views/Registration/register.html.twig: -------------------------------------------------------------------------------- 1 | {# 2 | @author David Alexa 3 | 4 | Copyright (C) 2012-2015 CESNET 5 | 6 | LICENSE TERMS 7 | 8 | Redistribution and use in source and binary forms, with or without 9 | modification, are permitted provided that the following conditions 10 | are met: 11 | 1. Redistributions of source code must retain the above copyright 12 | notice, this list of conditions and the following disclaimer. 13 | 2. Redistributions in binary form must reproduce the above copyright 14 | notice, this list of conditions and the following disclaimer in 15 | the documentation and/or other materials provided with the 16 | distribution. 17 | 3. Neither the name of the Company nor the names of its contributors 18 | may be used to endorse or promote products derived from this 19 | software without specific prior written permission. 20 | 21 | ALTERNATIVELY, provided that this notice is retained in full, this 22 | product may be distributed under the terms of the GNU General Public 23 | License (GPL) version 2 or later, in which case the provisions 24 | of the GPL apply INSTEAD OF those given above. 25 | 26 | This software is provided ``as is'', and any express or implied 27 | warranties, including, but not limited to, the implied warranties of 28 | merchantability and fitness for a particular purpose are disclaimed. 29 | In no event shall the company or contributors be liable for any 30 | direct, indirect, incidental, special, exemplary, or consequential 31 | damages (including, but not limited to, procurement of substitute 32 | goods or services; loss of use, data, or profits; or business 33 | interruption) however caused and on any theory of liability, whether 34 | in contract, strict liability, or tort (including negligence or 35 | otherwise) arising in any way out of the use of this software, even 36 | if advised of the possibility of such damage. 37 | #} 38 | 39 | {% extends 'FITNetopeerBundle::layout.html.twig' %} 40 | {% block title %} 41 | Register new user 42 | {% endblock %} 43 | {% block content %} 44 | 45 |
46 | 47 | 48 | {# data odesíláme na login_check #} 49 | {{ form_start(form, {'attr': {'id': 'login-form', 'class': 'form'}}) }} 50 | 51 | Register new user 52 | 53 | 54 | {% block flashes %} 55 | {% for type, flashMessages in array_unique(app.session.flashbag.all()) %} 56 | {% for flashMessage in flashMessages %} 57 |
58 | {{ flashMessage|raw }} 59 |
60 | {% endfor %} 61 | {% endfor %} 62 | {% endblock flashes %} 63 | 64 | {% if error is defined and error.message is defined %} 65 |
{{ error.message }}
66 | {% endif %} 67 | 68 | {{ form_row(form.username) }} 69 | {{ form_row(form.password.first) }} 70 | {{ form_row(form.password.second) }} 71 | 72 | 73 | 74 | {{ form_end(form) }} 75 | 76 |
77 | 78 | {% endblock %} 79 | -------------------------------------------------------------------------------- /src/FIT/NetopeerBundle/DependencyInjection/FITNetopeerExtension.php: -------------------------------------------------------------------------------- 1 | 6 | * 7 | * Copyright (C) 2012-2015 CESNET 8 | * 9 | * LICENSE TERMS 10 | * 11 | * Redistribution and use in source and binary forms, with or without 12 | * modification, are permitted provided that the following conditions 13 | * are met: 14 | * 1. Redistributions of source code must retain the above copyright 15 | * notice, this list of conditions and the following disclaimer. 16 | * 2. Redistributions in binary form must reproduce the above copyright 17 | * notice, this list of conditions and the following disclaimer in 18 | * the documentation and/or other materials provided with the 19 | * distribution. 20 | * 3. Neither the name of the Company nor the names of its contributors 21 | * may be used to endorse or promote products derived from this 22 | * software without specific prior written permission. 23 | * 24 | * ALTERNATIVELY, provided that this notice is retained in full, this 25 | * product may be distributed under the terms of the GNU General Public 26 | * License (GPL) version 2 or later, in which case the provisions 27 | * of the GPL apply INSTEAD OF those given above. 28 | * 29 | * This software is provided ``as is'', and any express or implied 30 | * warranties, including, but not limited to, the implied warranties of 31 | * merchantability and fitness for a particular purpose are disclaimed. 32 | * In no event shall the company or contributors be liable for any 33 | * direct, indirect, incidental, special, exemplary, or consequential 34 | * damages (including, but not limited to, procurement of substitute 35 | * goods or services; loss of use, data, or profits; or business 36 | * interruption) however caused and on any theory of liability, whether 37 | * in contract, strict liability, or tort (including negligence or 38 | * otherwise) arising in any way out of the use of this software, even 39 | * if advised of the possibility of such damage. 40 | */ 41 | 42 | namespace FIT\NetopeerBundle\DependencyInjection; 43 | 44 | use Symfony\Component\DependencyInjection\ContainerBuilder; 45 | use Symfony\Component\Config\FileLocator; 46 | use Symfony\Component\HttpKernel\DependencyInjection\Extension; 47 | use Symfony\Component\DependencyInjection\Extension\PrependExtensionInterface; 48 | use Symfony\Component\DependencyInjection\Loader; 49 | 50 | /** 51 | * This is the class that loads and manages your bundle configuration 52 | * 53 | * To learn more see {@link http://symfony.com/doc/current/cookbook/bundles/extension.html} 54 | */ 55 | class FITNetopeerExtension extends Extension 56 | { 57 | /** 58 | * {@inheritDoc} 59 | */ 60 | public function load(array $configs, ContainerBuilder $container) 61 | { 62 | $configuration = new Configuration(); 63 | $config = $this->processConfiguration($configuration, $configs); 64 | 65 | $loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__ . '/../Resources/config')); 66 | $loader->load('services.yml'); 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /src/FIT/Bundle/ModuleXmlBundle/Resources/views/Module/section.html.twig: -------------------------------------------------------------------------------- 1 | {# 2 | @author David Alexa 3 | 4 | Copyright (C) 2012-2015 CESNET 5 | 6 | LICENSE TERMS 7 | 8 | Redistribution and use in source and binary forms, with or without 9 | modification, are permitted provided that the following conditions 10 | are met: 11 | 1. Redistributions of source code must retain the above copyright 12 | notice, this list of conditions and the following disclaimer. 13 | 2. Redistributions in binary form must reproduce the above copyright 14 | notice, this list of conditions and the following disclaimer in 15 | the documentation and/or other materials provided with the 16 | distribution. 17 | 3. Neither the name of the Company nor the names of its contributors 18 | may be used to endorse or promote products derived from this 19 | software without specific prior written permission. 20 | 21 | ALTERNATIVELY, provided that this notice is retained in full, this 22 | product may be distributed under the terms of the GNU General Public 23 | License (GPL) version 2 or later, in which case the provisions 24 | of the GPL apply INSTEAD OF those given above. 25 | 26 | This software is provided ``as is'', and any express or implied 27 | warranties, including, but not limited to, the implied warranties of 28 | merchantability and fitness for a particular purpose are disclaimed. 29 | In no event shall the company or contributors be liable for any 30 | direct, indirect, incidental, special, exemplary, or consequential 31 | damages (including, but not limited to, procurement of substitute 32 | goods or services; loss of use, data, or profits; or business 33 | interruption) however caused and on any theory of liability, whether 34 | in contract, strict liability, or tort (including negligence or 35 | otherwise) arising in any way out of the use of this software, even 36 | if advised of the possibility of such damage. 37 | #} 38 | 39 | {% extends 'FITModuleXmlBundle::layout.html.twig' %} 40 | {% block title %}Section {% if sectionName is defined and not(sectionName is empty) %}- {{ sectionName }}{% endif %}{% endblock title %} 41 | 42 | {% set stateDefined = 'false' %} 43 | 44 | {% block state %} 45 | {% block singleContent %} 46 | {% if configSingleContent is defined %} 47 | 48 | {{ configSingleContent|raw }} 49 | 50 | {% else %} 51 | 52 |

{% if stateSectionTitle is defined %}{{ stateSectionTitle }}{% else %}Config & State data{% endif %}

53 | {% if stateArr is defined and not(stateArr is empty) %} 54 |
55 |
56 | 					{{ stateArr.asXml|trim }}
57 | 				
58 | {% endif %} 59 | 60 | {% endif %} 61 | {% endblock singleContent %} 62 | {% endblock state %} 63 | 64 | {% block config %} 65 |

{% if configSectionTitle is defined %}{{ configSectionTitle }}{% else %}Config data only{% endif %}

66 | 67 | {% if configArr is defined and not(configArr is empty) %} 68 |
69 |
70 | 			{{ configArr.asXml|trim }}
71 | 		
72 | {% endif %} 73 | {% endblock config %} 74 | 75 | -------------------------------------------------------------------------------- /install/configure.ac: -------------------------------------------------------------------------------- 1 | # -*- Autoconf -*- 2 | # Process this file with autoconf to produce a configure script. 3 | 4 | AC_PREREQ([2.63]) 5 | AC_INIT([netopeergui], [2.0.0], [cejkat@cesnet.cz]) 6 | AM_INIT_AUTOMAKE([foreign silent-rules tar-pax]) 7 | 8 | USERNAME=`git config --get user.name` 9 | USERMAIL=`git config --get user.email` 10 | AC_SUBST(USERNAME) 11 | AC_SUBST(USERMAIL) 12 | 13 | RELEASE=1 14 | AC_SUBST(RELEASE) 15 | 16 | if test "x$webguidir" == x; then 17 | webguidir=$(cd ..; dirname $PWD) 18 | fi 19 | AC_ARG_VAR(webguidir, [Installation directory for webgui [/var/www]]) 20 | AC_SUBST(webguidir) 21 | 22 | if test "x$webguiname" == x; then 23 | webguiname=$(cd ..; basename $PWD) 24 | fi 25 | AC_ARG_VAR(webguiname, [Installation directory name for webgui [netopeergui]]) 26 | AC_SUBST(webguiname) 27 | 28 | if test "x$httpdconfddir" == x; then 29 | httpdconfddir="/etc/httpd/conf.d" 30 | fi 31 | AC_ARG_VAR(httpdconfddir, [Directory for Apache configuration files [/etc/httpd/conf.d]]) 32 | AC_SUBST(httpdconfddir) 33 | 34 | AC_ARG_WITH(netopeerguid, AC_HELP_STRING([--without-netopeerguid],[Do not compile and install netopeerguid.]), [], [with_netopeerguid="yes"]) 35 | AM_CONDITIONAL([NETOPEERGUID_OPT], [test "x$with_netopeerguid" != "xno"]) 36 | 37 | # Check for rpmbuild 38 | AC_CHECK_PROG(RPMBUILD, [rpmbuild], [rpmbuild], [""]) 39 | AC_CHECK_PROG(HTTPD, [httpd], [yes], [""]) 40 | AC_PATH_PROGS(APACHECTL, apachectl apache2ctl, no, [$PATH:/usr/sbin]) 41 | 42 | AC_PATH_PROGS(PHP, php, [no], [$PATH]) 43 | if test "x$PHP" != xno; then 44 | for i in dom json xml pdo intl sysvsem; do 45 | AC_MSG_CHECKING([for php module $i]) 46 | php -m | grep "$i" > /dev/null && AC_MSG_RESULT([yes]) || AC_MSG_ERROR([not found]) 47 | done 48 | else 49 | AC_MSG_ERROR([php was not found]) 50 | fi 51 | AC_SUBST(PHP) 52 | 53 | # Check for rpmbuild 54 | AC_CHECK_PROG(RPMBUILD, rpmbuild, rpmbuild, [""]) 55 | RPM_RELEASE=1 56 | AC_SUBST(RPM_RELEASE) 57 | AM_CONDITIONAL(MAKE_RPMS, test x$RPMBUILD != x) 58 | 59 | # Checks for libraries. 60 | 61 | # Checks for header files. 62 | 63 | # Checks for typedefs, structures, and compiler characteristics. 64 | 65 | # Checks for library functions. 66 | 67 | AC_CONFIG_SUBDIRS(netopeerguid) 68 | AC_CONFIG_FILES([Makefile 69 | netopeergui.conf]) 70 | AC_OUTPUT 71 | 72 | echo 73 | echo 74 | echo "------------------------------------------------------------------------" 75 | echo "$PACKAGE $VERSION" 76 | echo "------------------------------------------------------------------------" 77 | echo 78 | echo 79 | echo "Configuration Options Summary:" 80 | echo 81 | echo "Documentation..........: ${build_doc}" 82 | echo 83 | echo "Compilation............: make (or gmake)" 84 | echo " asxs.................: $ASXS" 85 | echo " LIBS.................: $LIBS" 86 | echo " CFLAGS...............: $CFLAGS" 87 | echo 88 | echo "Components" 89 | echo " netopeerguid.........: $with_netopeerguid" 90 | echo 91 | echo "Installation...........: make install (as root if needed, with 'su' or 'sudo')" 92 | echo " prefix...............: $prefix" 93 | echo " python module dir....: $pyplugindir" 94 | echo " webgui dir...........: $webguidir" 95 | echo " webgui name..........: $webguiname" 96 | echo " httpdconfddir........: $(test -z "$httpdconfddir" && echo "Apache default path" || echo "$httpdconfddir")" 97 | echo 98 | 99 | -------------------------------------------------------------------------------- /src/FIT/NetopeerBundle/Resources/views/Ajax/historyOfConnectedDevices.html.twig: -------------------------------------------------------------------------------- 1 | {# 2 | @author David Alexa 3 | 4 | Copyright (C) 2012-2015 CESNET 5 | 6 | LICENSE TERMS 7 | 8 | Redistribution and use in source and binary forms, with or without 9 | modification, are permitted provided that the following conditions 10 | are met: 11 | 1. Redistributions of source code must retain the above copyright 12 | notice, this list of conditions and the following disclaimer. 13 | 2. Redistributions in binary form must reproduce the above copyright 14 | notice, this list of conditions and the following disclaimer in 15 | the documentation and/or other materials provided with the 16 | distribution. 17 | 3. Neither the name of the Company nor the names of its contributors 18 | may be used to endorse or promote products derived from this 19 | software without specific prior written permission. 20 | 21 | ALTERNATIVELY, provided that this notice is retained in full, this 22 | product may be distributed under the terms of the GNU General Public 23 | License (GPL) version 2 or later, in which case the provisions 24 | of the GPL apply INSTEAD OF those given above. 25 | 26 | This software is provided ``as is'', and any express or implied 27 | warranties, including, but not limited to, the implied warranties of 28 | merchantability and fitness for a particular purpose are disclaimed. 29 | In no event shall the company or contributors be liable for any 30 | direct, indirect, incidental, special, exemplary, or consequential 31 | damages (including, but not limited to, procurement of substitute 32 | goods or services; loss of use, data, or profits; or business 33 | interruption) however caused and on any theory of liability, whether 34 | in contract, strict liability, or tort (including negligence or 35 | otherwise) arising in any way out of the use of this software, even 36 | if advised of the possibility of such damage. 37 | #} 38 | 39 |
40 | {% block historyOfConnectedDevices %}{% block profilesOfConnectedDevices %} 41 | {% if connectedDevices|length %} 42 |

43 | {% if isProfile %}Profiles{% else %}History{% endif %} of connected devices 44 |

45 | {% for key, device in connectedDevices %} 46 | 54 | x 55 | {% if isProfile == false %}+{% endif %} 56 | {{ device.getHost() }}:{{ device.getPort() }} 57 | 58 | {% endfor %} 59 | {% endif %} 60 | {% endblock profilesOfConnectedDevices %}{% endblock historyOfConnectedDevices %} 61 |
62 | -------------------------------------------------------------------------------- /src/FIT/NetopeerBundle/Entity/UserSettings.php: -------------------------------------------------------------------------------- 1 | 8 | * 9 | * Copyright (C) 2012-2015 CESNET 10 | * 11 | * LICENSE TERMS 12 | * 13 | * Redistribution and use in source and binary forms, with or without 14 | * modification, are permitted provided that the following conditions 15 | * are met: 16 | * 1. Redistributions of source code must retain the above copyright 17 | * notice, this list of conditions and the following disclaimer. 18 | * 2. Redistributions in binary form must reproduce the above copyright 19 | * notice, this list of conditions and the following disclaimer in 20 | * the documentation and/or other materials provided with the 21 | * distribution. 22 | * 3. Neither the name of the Company nor the names of its contributors 23 | * may be used to endorse or promote products derived from this 24 | * software without specific prior written permission. 25 | * 26 | * ALTERNATIVELY, provided that this notice is retained in full, this 27 | * product may be distributed under the terms of the GNU General Public 28 | * License (GPL) version 2 or later, in which case the provisions 29 | * of the GPL apply INSTEAD OF those given above. 30 | * 31 | * This software is provided ``as is'', and any express or implied 32 | * warranties, including, but not limited to, the implied warranties of 33 | * merchantability and fitness for a particular purpose are disclaimed. 34 | * In no event shall the company or contributors be liable for any 35 | * direct, indirect, incidental, special, exemplary, or consequential 36 | * damages (including, but not limited to, procurement of substitute 37 | * goods or services; loss of use, data, or profits; or business 38 | * interruption) however caused and on any theory of liability, whether 39 | * in contract, strict liability, or tort (including negligence or 40 | * otherwise) arising in any way out of the use of this software, even 41 | * if advised of the possibility of such damage. 42 | */ 43 | namespace FIT\NetopeerBundle\Entity; 44 | 45 | /** 46 | * Class with settings of user. 47 | */ 48 | class UserSettings implements \Serializable { 49 | 50 | /** 51 | * @var int duration in days for leaving devices in history 52 | */ 53 | protected $historyDuration; 54 | 55 | /** 56 | * initialize User settings object and sets default values 57 | */ 58 | public function __construct() { 59 | $this->historyDuration = 30; 60 | } 61 | 62 | /** 63 | * @inheritdoc 64 | */ 65 | public function serialize() { 66 | return serialize( 67 | array( 68 | 'historyDuration' => $this->getHistoryDuration(), 69 | ) 70 | ); 71 | } 72 | 73 | /** 74 | * @inheritdoc 75 | */ 76 | public function unserialize($serialized) { 77 | $data = unserialize($serialized); 78 | 79 | $this->setHistoryDuration($data['historyDuration']); 80 | } 81 | 82 | /** 83 | * set duration in days for leaving devices in history 84 | * 85 | * @param int $duration 86 | */ 87 | public function setHistoryDuration($duration) { 88 | $this->historyDuration = $duration; 89 | } 90 | 91 | /** 92 | * get duration in days for leaving devices in history 93 | * 94 | * @return int 95 | */ 96 | public function getHistoryDuration() { 97 | return $this->historyDuration; 98 | } 99 | } -------------------------------------------------------------------------------- /src/FIT/Bundle/ModuleDefaultBundle/Resources/views/Config/parent.html.twig: -------------------------------------------------------------------------------- 1 | {# 2 | @author David Alexa 3 | 4 | Copyright (C) 2012-2015 CESNET 5 | 6 | LICENSE TERMS 7 | 8 | Redistribution and use in source and binary forms, with or without 9 | modification, are permitted provided that the following conditions 10 | are met: 11 | 1. Redistributions of source code must retain the above copyright 12 | notice, this list of conditions and the following disclaimer. 13 | 2. Redistributions in binary form must reproduce the above copyright 14 | notice, this list of conditions and the following disclaimer in 15 | the documentation and/or other materials provided with the 16 | distribution. 17 | 3. Neither the name of the Company nor the names of its contributors 18 | may be used to endorse or promote products derived from this 19 | software without specific prior written permission. 20 | 21 | ALTERNATIVELY, provided that this notice is retained in full, this 22 | product may be distributed under the terms of the GNU General Public 23 | License (GPL) version 2 or later, in which case the provisions 24 | of the GPL apply INSTEAD OF those given above. 25 | 26 | This software is provided ``as is'', and any express or implied 27 | warranties, including, but not limited to, the implied warranties of 28 | merchantability and fitness for a particular purpose are disclaimed. 29 | In no event shall the company or contributors be liable for any 30 | direct, indirect, incidental, special, exemplary, or consequential 31 | damages (including, but not limited to, procurement of substitute 32 | goods or services; loss of use, data, or profits; or business 33 | interruption) however caused and on any theory of liability, whether 34 | in contract, strict liability, or tort (including negligence or 35 | otherwise) arising in any way out of the use of this software, even 36 | if advised of the possibility of such damage. 37 | #} 38 | 39 | 40 | {% set outIterator = 0 %} 41 | {% set outXpath = xpath ~ '/*' ~ '[' ~ iterator ~ ']' %} 42 | {% if hasChildren is not defined %} 43 | {% set hasChildren = false %} 44 | {% endif %} 45 | 46 | {% if element|length %} 47 |
48 | 49 | {% if key == 'container' %} 50 | {% set useLevel = true %} 51 | {% else %} 52 | {% set useLevel = false %} 53 | {% endif %} 54 | 55 | {% include 'FITModuleDefaultBundle:Config:leaf.html.twig' with {'element': element, 'xpath': outXpath, 'key': key, 'level': level, 'addLevel': useLevel, 'iterator': iterator, 'hasChildren': hasChildren} %} 56 | {% set hasChildren = false %} 57 | 58 | {% for key, el in element %} 59 | {% set outIterator = outIterator + 1 %} 60 | 61 | {% if element.hasChildren() %} 62 | {% include 'FITModuleDefaultBundle:Config:parent.html.twig' with {'element': element.getChildren(), 'xpath': outXpath, 'key': key, 'level': level + 1, 'iterator': outIterator, 'hasChildren': true} %} 63 | {% else %} 64 | {% set tmpXpath = outXpath ~ '/*[' ~ outIterator ~ ']' %} 65 | {% include 'FITModuleDefaultBundle:Config:leaf.html.twig' with {'element': element.current(), 'xpath': tmpXpath, 'key': key, 'level': level + 1, 'addLevel': true, 'iterator': outIterator} %} 66 | {% endif %} 67 | {% endfor %} 68 |
69 | {% else %} 70 | {% include 'FITModuleDefaultBundle:Config:leaf.html.twig' with {'element': element, 'xpath': outXpath, 'key': key, 'level': level, 'addLevel': true, 'iterator': iterator } %} 71 | {% endif %} 72 | -------------------------------------------------------------------------------- /src/FIT/Bundle/ModuleDefaultBundle/Resources/public/netopeerangular/templates/directives/addItem.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | {{$parent.$parent.$parent.newkey}} 21 | 24 | 27 | 28 | 29 | 30 | 31 | 32 | 33 |
{{ type }}{{ child['$@'+$parent.keyName][type] }}
34 |
35 | 36 | 37 | 40 | 43 | -------------------------------------------------------------------------------- /src/FIT/NetopeerBundle/Tests/Selenium/LoginTestCase.php: -------------------------------------------------------------------------------- 1 | 4 | * 5 | * Copyright (C) 2012-2015 CESNET 6 | * 7 | * LICENSE TERMS 8 | * 9 | * Redistribution and use in source and binary forms, with or without 10 | * modification, are permitted provided that the following conditions 11 | * are met: 12 | * 1. Redistributions of source code must retain the above copyright 13 | * notice, this list of conditions and the following disclaimer. 14 | * 2. Redistributions in binary form must reproduce the above copyright 15 | * notice, this list of conditions and the following disclaimer in 16 | * the documentation and/or other materials provided with the 17 | * distribution. 18 | * 3. Neither the name of the Company nor the names of its contributors 19 | * may be used to endorse or promote products derived from this 20 | * software without specific prior written permission. 21 | * 22 | * ALTERNATIVELY, provided that this notice is retained in full, this 23 | * product may be distributed under the terms of the GNU General Public 24 | * License (GPL) version 2 or later, in which case the provisions 25 | * of the GPL apply INSTEAD OF those given above. 26 | * 27 | * This software is provided ``as is'', and any express or implied 28 | * warranties, including, but not limited to, the implied warranties of 29 | * merchantability and fitness for a particular purpose are disclaimed. 30 | * In no event shall the company or contributors be liable for any 31 | * direct, indirect, incidental, special, exemplary, or consequential 32 | * damages (including, but not limited to, procurement of substitute 33 | * goods or services; loss of use, data, or profits; or business 34 | * interruption) however caused and on any theory of liability, whether 35 | * in contract, strict liability, or tort (including negligence or 36 | * otherwise) arising in any way out of the use of this software, even 37 | * if advised of the possibility of such damage. 38 | */ 39 | require_once 'DefaultTestCase.php'; 40 | 41 | /** 42 | * Tests login into secured area of the app. 43 | */ 44 | class LoginTestCase extends DefaultTestCase 45 | { 46 | /** 47 | * test login to webGUI 48 | * 49 | * @throws Exception 50 | */ 51 | public function testLogin() 52 | { 53 | $this->open(self::$browserUrl); 54 | 55 | if ($this->isTextPresent("Log out")) { 56 | $this->click("link=Log out"); 57 | $this->waitForPageToLoad("30000"); 58 | } 59 | 60 | // check invalid username and password 61 | $this->type("id=username", "dfasfdahsofhdasdfiasjdfpasjdfpasijfpasjfdpasdf"); 62 | $this->type("id=password", "dfadfadsfasf"); 63 | $this->click("name=login"); 64 | $this->waitForPageToLoad("30000"); 65 | $this->assertFalse($this->isTextPresent("Bad credentials."), "Checking invalid username and password failed"); 66 | 67 | // check valid username and invalid password 68 | $this->type("id=username", "dalexa"); 69 | $this->type("id=password", "dfadfadsfasf"); 70 | $this->click("name=login"); 71 | $this->waitForPageToLoad("30000"); 72 | $this->assertTrue($this->isTextPresent("The presented password is invalid."), "Checking valid username and invalid password failed"); 73 | 74 | // if connected correctly 75 | if ($this->loginCorrectly()) { 76 | // try to log out 77 | $this->click("link=Log out"); 78 | $this->waitForPageToLoad("30000"); 79 | try { 80 | $this->assertTrue($this->isTextPresent("Log in is required for this site!")); 81 | } catch (PHPUnit_Framework_AssertionFailedError $e) { 82 | throw new \Exception('Could not log out.'); 83 | } 84 | } else { 85 | throw new \Exception('Could not log in correctly.'); 86 | } 87 | } 88 | } --------------------------------------------------------------------------------