Skip to content

Commit

Permalink
Update Masterbranch before Demo (#375)
Browse files Browse the repository at this point in the history
* 100/vertical/git puppet scripts (#234)

* Add puppet script functionality to request index

* Fix name generation, create puppet scripts in tmp

* Undo file creation, fix modal ids

* Change method names.

* Add puppet name script

* Add Git gem

* Add logic to push created puppet script to git

* Add button and route to push puppetscripts to git and fix code

* Use environment variables for github repository and user

* Add simple test for push_to_git route

* Extract logic to request model

* Add testing environment variables to example.yml and travis.yml

* Add notifications for different git actions

* Change travis.yml to not trigger multiple jobs

* Add more tests

* Add puppet_name_file to git push

* Apply Rubocop autofix

* Refactor request model

* Refactor tests

* Fix tests

* Fix tests

* Add tests for puppet script creation.

* Fix rubocop issues

* Fix tests

* Fix controller linting issues

* Extract request model logic into lib

* Unfix controller linting

* Change puppetscript and fix bugs

* Update tests to puppetscript change

* Uncomment git rescue

* Minor fixes to the server and request input fields (#319)

* Minor fixes

* Removed some dollar signs in puppet script (#325)

* Create Puppetscript init (#324)

* Change puppetscript init when a user is created

* Fix tests refactor git stub and add simple test

* Refactor githelper and tests

* Rubocop auto-correct

* 320/scaffold/Lost information when request is incomplete (#329)

* Should close #320

* Regression tests

* small refactoring

* Small refactoring

* 295/login/make-manage-visible-for-admins (#302)

* Make all manage actions accessible for admins

* make rubocop happy

* fix last specs

* 154/scaffold/email notifications (#338)

* working notifications, need to change seed etc. back when testing is over

* users can enable/disable email notifications, needs some beautyfication

* remove button and submit automatically, still need to remove some testing code

* autocorrect

* remove all test-code, only missing openID support now

* change comment

* add default false, not tested

* This should fix the mailer issues (#340)

* Add os to vm config edit page (#339)

* Add os to vm config edit page and make vm names to lower case when created

* Fix tests

* Make codefactor happy

* Fix some more tests

* Add vm comment to vm edit config page

* Do some refactoring

* Fix some CodeFactor

* update requests list (#330)

* show vm power buttons to admin, fix anchor linking #317 #319

Co-authored-by: tomschw <tom.schwarzburg@student.hpi.de>

* small layout fixes

Co-authored-by: tomschw <tom.schwarzburg@student.hpi.de>

* apply new theme to request list #309

Co-authored-by: tomschw <tom.schwarzburg@student.hpi.de>

* show pending and resolved requests seperately

* remove unnecessary line

* show number of pending and resolved requests

* move anchor reload fix to own file

* fix VM HDD usage

* update failing test

* fix VM CPU usage

* use yet another API value for VM max CPU speed

* remove VM deletion

* remove horizontal line in VM dropdown

* remove another unnecessary horizontal line in dropdown

* 326/scaffold/sudo users not stored (#331)

* Merge dev

* Start adding tests

* Refactor assign_sudo_users

* Should close #326

* Make CodeFactor happy

* Refactor prepare_params

* Small UI changes

* fix puppet script icon (#341)

* use different unicode char for puppet script button

* add icon shadow on hover

* hosts routes and button show only if user is admin (#335)

* add condition for hosts button to show only if user is admin, add restriction to hosts controller to be used by admins only

* 154/scaffold/beautify email notifications (#344)

* change formatting

* fix everything

* brauntoms pleasure

* Add end to end testing with capybara (#334)

* Add end to end test for request process

* Add automatic push when accepting requests (#346)

* Add automatic push when accepting requests

* Remove blank lines

* Add environment variables. (#347)

* Save ram and storage of a request in gb internally (#342)

* Save ram and storage of a request in gb internally

* Fix CodeFactor

* Fix Tests

* Fix same Tests, hopefully

* Forgot Gemfile

* Add some tests for request templates and convert gb to mibi and kibi for vsphere

* Rename comments

* Modify migration

* CodeFactor ...

* Modify migration again

* Refactor os on vm edit config page

* Remove catch in push to git.

* Revert "Remove catch in push to git."

This reverts commit 11f80f4.

* Re-add the Error so Errbit can log it.

* 148/scaffold/Complete VM to responsable relation (#284)

* Associate requests with responsible users

* Refactorings

* Test responsible user access in VSphere::VirtualMachine

* try to fix some issues of CodeFactor

* Refactoring

* Fix tests

* Add responsible users to VMConfigs

* More tests

* Fix potential issue, if a vm is called requests or configs

* Add tests for vm creation

* Responsible users are now also stored in the VM config

* responsible users are now assigned to virtual machines

* Add responsible to notificaiton

* Work on moving into correct subfolder

* VM now moves into the correct subfolder whenever its created, archived, revived or pending

* Move responsibilty for VM creation from folder to request

* Whoops

* Add test for move_into_correct_subfolder

* Migrate

* Fix end to end testing

* Fix some CodeFactor issues

* Remove unneccessary method

* Comment routes to be clearer why the change is neccessary

* Make CodeFactor a bit happy

* Fix in skipped test

* pleasure bjoern (#350)

* Update notify_email.html.erb

* Change request name regex (#352)

* Change request name regex

* Fix tests and remove uppercase letters from regEx

* Fix some more tests

* remove remnants of old vsphere api from hosts

* send notifications after various events (#343)

* send notification when role of an user is changed

* send notifications when new project is created

* fix tests

* add link to user page when role is changed

* try to fix CodeFactor

* second try to fix CodeFactor

* third try to fix CodeFactor

* third try to fix CodeFactor

* fifth try to fix CodeFactor

* sixth try to fix CodeFactor

* seventh try to fix CodeFactor

* consider review comments

* Fix buggy buttons on all requests page (#358)

* Add search bar to users page (#355)

* Add search bar to users page

* Add feature tests

* Fix double quoted strings

* add confirmation prompt before archiving and confiriming archiving (#356)

* Fix/add users to vm pages (#357)

* Add Responsible users to index page

* Fix vms routes

* Add users to show page

* Add links to users

* Readd rescue from Git Errors

* Add error message when git fails to push

* This should fix the tests

* Fix more tests

* Fix last tests

* Fix bug that caused the sudo users to not be udpated correctly

* Address requested changes

* Remove warning message, as its not working

* Remove links

* Restrict original user login to development mode

* Remove original sign in tests

* 340/scaffold/incorrect hdd stats (#361)

* Fix the issue

* Small refactoring

* This should fix the tests

* removed all user related data from seed

* Sort users alphabetically. (#363)

* Small bugfix

* Extend view

* Add test

* 304 - Tackles the webkit-issue by adding another POST-based route for logout (#365)

* Add a POST-based route for log out instead of DELETE-based

* Fix test to check against newly added route

* show VM DNS on detail page #348 (#364)

Co-authored-by: tomschw <tom.schwarzburg@student.hpi.de>

* Add logging for git actions

* Revert changes made to try to fix 304 webkit issue

* Just check if order of requiring js files is important

* Revert related test as well #304

* Remove scope created by first_or_create for User.all

* Fix and handle error with too many resources bug (#337)

fix and handle error with to many resources bug #308

* Add jquery js files at the top of application.js #304

* 238/vertical/import-update-puppet-scripts (#267)

* Add failing tests for puppet file parser [ci skip]

* Adapt puppet_helper tests

* Implement parsing of users and admins from puppet script

* Refactor tests to match rubocop

* Fix rubucop issues for app/helpers/puppet_parser_helper.rb

* Rework api function to get users

* Giving up on writing decent tests

* Fix typo in app/helpers/puppet_parser_helper.rb

* Skip tests that are written for old user management for now

* Repository should now be pulled before accessing [ci skip]

* Add setter for VM user management, revert repo handling

- Setters change the puppet file
- Git.open does not work at the moment

* Fix handling yield blocks

* [wip] merge [ci skip]

* Fix merge´

* [skip ci] Enable mocking of VM user association
Reenable tests

* [wip][ci skip] Add mock to associate user with vms

* [ci skip] Finish adding user connecting mocks

* Finishing up tests

* Rework dashboard test to work with user and vm connection

* Fix bug in getting all vms associated to a user

* [wip][ci skip] still merging

* Fix dashboard test

* Refactoring and rubocop

* Revert _list.html.erb

* debugging puppet script repo interaction #238

* mocking away User.update_repository #238

* Fix puppet parser helper tests

* Fix request spec

* Fix user spec

* Fixes tests and adheres to style guidelines

* Adhere to more style guidelines

* Fix typo

* fix notifications (#359)

* add project name in notification of project creation

* archive notificationwill be sent in 3 days

* fix some CodeFactor issues

* Fix typo

* Pull git repo instead of always deleting it (#369)

* Pull git repo instead of always deleting it

* Adhere to style guidelines

* Fix typo in git_helper.rb

* 237/vertical/Edit vm information (#281)

* Add failing tests for puppet file parser [ci skip]

* Adapt puppet_helper tests

* Implement parsing of users and admins from puppet script

* failing test for edit button

* adding "edit vm information" button, "edit" controller action and view #237

* view test for edit vm information page #237

* experimenting with vSphere API and User selecting on the edit page #237

* Refactor tests to match rubocop

* Fix rubucop issues for app/helpers/puppet_parser_helper.rb

* edit button in manage dropdown #237

* fixing edit tests and cleaning experimental html #237

* sudoers and non sudoers, description #237

* wip: saving the edits #237

* how the controller might should look like #237

* trying to formulate tests for changing a requests users lists #237

* Rework api function to get users

* Giving up on writing decent tests

* Fix typo in app/helpers/puppet_parser_helper.rb

* Skip tests that are written for old user management for now

* fixing view test for vms/:id/edit page #237

* change sudo users working 🎉 #237

* fixing some codefactor problems #237

* changing non-sudo users working 🎉 #237

* trying to see it in browser, too #237

* fixing small stuff #237

* fixing tests #237

* Repository should now be pulled before accessing [ci skip]

* fixing more small stuff #237

* fixing tests #237

* deleting unneccessary code #237

* reworking edit page and controller, ensuring config and description on vm creation

* fixing code style, fixing tests, migrating to config to take description #237

* correcting merge #237

* correcting merge 2/2 #237

* fixing tests #237

* Add setter for VM user management, revert repo handling

- Setters change the puppet file
- Git.open does not work at the moment

* Fix handling yield blocks

* removing request dependencies on the edit page and adding a test #237

* adding tests for notifying users with changed status regarding a VM edit #237

* running rubocop --auto-correct #237

* [wip] merge [ci skip]

* Fix merge´

* leading edit form to the right controller action #237

* removing empty first param on update #237

* [skip ci] Enable mocking of VM user association
Reenable tests

* [wip][ci skip] Add mock to associate user with vms

* [ci skip] Finish adding user connecting mocks

* Finishing up tests

* Rework dashboard test to work with user and vm connection

* Fix bug in getting all vms associated to a user

* [wip][ci skip] still merging

* Fix dashboard test

* Refactoring and rubocop

* Revert _list.html.erb

* debugging puppet script repo interaction #238

* mocking away User.update_repository #238

* edit WORKING when tested manually, notifications still defect #237

* Update virtual_machine.rb

* adding controller test #237

* cleanup with rubocop auto-correct and fixing typo #237

* cleanup #237

* cleanup #237

* cleanup #237

* moving vm mock into vsphere_api_mocker #237

* fixing typo #237

* reverting changes in mocker #237

* 259/vertical/request page refactoring (#367)

* Design requests page based on mockup.

* Add template-filled values.

* Save project with request.

* Add editing of port fowarding.

* Add texts to request form.

* Fix checkbox.

* Remove breakpoints.

* Fix resizing for select2 bootstrap theme.

* Fix request factory.

* Use factories in request tests.

* Update end-to-end tests.

* Fix most request controller tests.

* Fix remaining request controller tests.

* Make codefactor happy.

* Fix git errors (#371)

* Fix git errors

* Remove redundant begin block

* Repair find_or_create_by and change puppetfile path

* change callback set_user_id to before_create

* Moved Puppetscript methods to lib

* Fix: Speed up vms page loading time (#373)

* Fix git errors

* Remove redundant begin block

* Repair find_or_create_by and change puppetfile path

* change callback set_user_id to before_create

* Moved Puppetscript methods to lib

* Speed up dashboard loading times

* Update index.html.erb

* Fix/missing sudo users on create (#374)

* Fix the bug

* Refactoring

* Template selection now also works with keyboard input

* Don't show sudo users in the user field

* Fix error when creating a VM without correct git setup
includes refactorings

* Fix test

* Make CodeFactor happy
  • Loading branch information
bdaase committed Feb 6, 2019
1 parent 64d2bf9 commit d69bf25
Show file tree
Hide file tree
Showing 124 changed files with 3,058 additions and 952 deletions.
8 changes: 7 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,10 @@ coverage
# Ignore locks
.lock*

config/credentials.yml.enc
config/credentials.yml.enc

# Ignore environment variables
/config/environment_variables.yml

# Ignore Puppetscript folder
/private
3 changes: 3 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,6 @@ script:
after_success:
# https://docs.travis-ci.com/user/environment-variables/#default-environment-variables
- curl --data "commit=$TRAVIS_COMMIT" --data "branch=$TRAVIS_BRANCH" --data "eventtype=$TRAVIS_EVENT_TYPE" http://hart-deploy.epic-hpi.de/

env:
- GIT_REPOSITORY_URL=test_repository_url GIT_REPOSITORY_NAME=test_repository_name GITHUB_USER_NAME=test_user_name GITHUB_USER_EMAIL=test_user_email
3 changes: 3 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,9 @@ gem 'omniauth_openid_connect'
# Allow locks on database
gem 'with_advisory_lock'

# Ruby Git
gem 'git'

# Mina for deployment
# Have a look in the tutorial:
# https://github.com/lnikell/wiki/wiki/Deploy-rails-application-with-Mina,-Nginx-and-Puma
Expand Down
Loading

0 comments on commit d69bf25

Please sign in to comment.