Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

First version for testing in production #546

Merged
merged 98 commits into from
Apr 29, 2019
Merged

First version for testing in production #546

merged 98 commits into from
Apr 29, 2019

Conversation

chrisma
Copy link
Contributor

@chrisma chrisma commented Apr 29, 2019

No description provided.

LeonMatthes and others added 30 commits February 8, 2019 13:59
* Move environment variables into ENV
includes tests and warning to admins/users

* enough_resources? can now handle having no hosts available at all

* Fix bugs

* Quiet rubocop false positive

* Fix incorrect ram_gb and storage_gb calculation of hosts

* Remove old VmApi

* Remove unneccessary puts in tests

* Remove unneccessary puts in tests

Co-authored-by: Björn Daase <bjoern.daase@student.hpi.de>

* Fix host view tests

Co-authored-by: Björn Daase <bjoern.daase@student.hpi.de>

* Add better examples for github environment config

Co-authored-by: Björn Daase <bjoern.daase@student.hpi.de>
Co-authored-by: Björn Daase <bjoern.daase@student.hpi.de>
Co-authored-by: Björn Daase <bjoern.daase@student.hpi.de>
)

* Set an explicit Version of the Sqlite3 Gem beacuse newer ones (1.4.0, released on 02/05/2019) produce errors

* Make codefactor happier

* Update gemfile
)

* Capitalize the first character and each that follows a dot or dash

* Refactor test

* Make CodeFactor happy

* Make the identifier methods one

* Fix vSphere folder test

* Fix vSphere folder test to use dot and dash
* Use SASSC instead of SASS

* Add Cog to navigation bar

* Make Cog visible for admins only

* Scaffold AppSettings

Co-authored-by: Leon Matthes <leon@matthes.biz>

* Remove unnecessary test

Co-authored-by: Leon Matthes <leon@matthes.biz>

* Fix controller

Co-authored-by: Leon Matthes <leon@matthes.biz>

* Add validations to model

Co-authored-by: Leon Matthes <leon@matthes.biz>

* Add own formbuilder

Co-authored-by: Leon Matthes <leon@matthes.biz>

* Finalize edit app settings form

* Allow empty for some settings

Co-authored-by: Björn Daase <bjoern.daase@student.hpi.de>

* Use settings for vSphere

Co-authored-by: Björn Daase <bjoern.daase@student.hpi.de>

* Use the archivation timeout

Co-authored-by: Björn Daase <bjoern.daase@student.hpi.de>

* Fix tests, Make CodeFactor happy

Co-authored-by: Björn Daase <bjoern.daase@student.hpi.de>

* Fix even more tests

Co-authored-by: Björn Daase <bjoern.daase@student.hpi.de>

* Update email settings via App settings

Co-authored-by: Björn Daase <bjoern.daase@student.hpi.de>

* Add initializers for notification mailer

Co-authored-by: Björn Daase <bjoern.daase@student.hpi.de>

* Reset git whenever the app settings change

Co-authored-by: Björn Daase <bjoern.daase@student.hpi.de>

* Adjust navbar drop down menu, also fixes #403

Co-authored-by: Leon Matthes <leon@matthes.biz>

* Add tests

* Fix repository creation

Co-authored-by: Björn Daase <bjoern.daase@student.hpi.de>

* Fix migration

Co-authored-by: Björn Daase <bjoern.daase@student.hpi.de>

* Remove environment_variables.yml

Co-authored-by: Björn Daase <bjoern.daase@student.hpi.de>

* Try to fix tests again

Co-authored-by: Björn Daase <bjoern.daase@student.hpi.de>

* Remove unneccessary warning

Co-authored-by: Björn Daase <bjoern.daase@student.hpi.de>

* Fix tests

Co-authored-by: Björn Daase <bjoern.daase@student.hpi.de>

* Make CodeFactor happy

Co-authored-by: Björn Daase <bjoern.daase@student.hpi.de>

* Rubocop fixes

* fixed small bug
with x&.empty? you get nil if x is nil, but you want to check if x is nil
and get a bool indicating that fact

* if not set, set to [] (if there were problems with the puppet scripts
the vm-show page can still be rendered)

* moved || [] to make intent clearer

* check for nil and empty string

* Make configured? Check for both empty and nil strings

* Quality of life improvement for anyone using vagrant or the WSL (reload might take a few seconds now though)
* Use pw fields for passwords

* Make mail settings dynamic

* User before_action instead of before_filter

Source: https://stackoverflow.com/questions/16519828/rails-4-before-filter-vs-before-action

* Remove mailer warning

* Fix password fields not being prefilled

* Move change of email settings back into app_settings

* Update test
* Remove db folder from rubocop (likely auto-generated anyway)

Co-authored-by: Björn Daase <bjoern.daase@student.hpi.de>

* Add vsphere_root_folder to appsettings

* Validate vSphere root folder

Co-authored-by: Björn Daase <bjoern.daase@student.hpi.de>

* Use the new root folder

Co-authored-by: Björn Daase <bjoern.daase@student.hpi.de>

* Fix bugs that prevent the root folder from being set

Co-authored-by: Björn Daase <bjoern.daase@student.hpi.de>

* Add constant for vSphere folder name length

Co-authored-by: Björn Daase <bjoern.daase@student.hpi.de>
* Add migration, add fields to view

* Remove rake tasks file

* Refactoring

* More refactoring

* More refactoring

* Add function for init.pp path

* Verify valid file pathes

* rubocop fixes

* Add missing o again

* More refactoring

* Use new node and classes pathes

* Refactoring

* Remove unnecessary File.join

* Fix wrong underscore

* Adjust some names

* Use correct defaults

* Fix puppet specs

* More fixes

* User correct vm names again

* Fix correct prefix for node and class files

* Bugfix

* Rearrange edit page

Co-authored-by: Björn Daase <bjoern.daase@student.hpi.de>

* Fix whitelisted of app_settings parameters

Co-authored-by: Björn Daase <bjoern.daase@student.hpi.de>
* Make descriptions searchable

* Use correct config method
* Improve table search

Co-authored-by: Björn Daase <bjoern.daase@student.hpi.de>

* Add ability to dynamically search users

Co-authored-by: Björn Daase <bjoern.daase@student.hpi.de>

* simplify table styling

* Refactor table sorting and fixes wrong sorting order when sorting HTML elements

Co-authored-by: Björn Daase <bjoern.daase@student.hpi.de>

* Update the README to remove references to deployed master

Co-authored-by: Björn Daase <bjoern.daase@student.hpi.de>

* Make CodeFactor more happy

* Remove tests that would require javascript

Co-authored-by: Björn Daase <bjoern.daase@student.hpi.de>

* Make CodeFactor happy
* Let users be selected without domains

* Fix failing tests
* admins can configure ip and dns of vms

* fix tests

* use hart formbuilder

* applies requested changes

* Replace update+save with a single update call
chrisma and others added 28 commits March 21, 2019 17:28
* Fix(VMs table): Inline display of responsible users. Ref #494
Use Bootstrap list-inline and mb-0 classes

* Fix(VMs index): Style archive buttons

* Fix(VMs index): Apply styling to "to revive buttons"

* Fix(VMs Index): Apply styling to revive buttons

* Fix(VMs index): Unify usage of Fontawesome classes

* Fix(Users index): Reposition search field

* Fix(Users index): Straight corners
* Remove unnecessary tests and reanable skipped test

* Update the end to end testing

* Continue update tests

* Remove test, which tested a user - VM responsibility via the requests

* Fix mocking of VM API

* Fix selection for powering on a VM

* Fix(end to end spec): Adapt to changed VM index HTML.
Make matchers more robust.

* Finally fix the power on test

* Fix formatting

* Add mocking and first validation test

* Add test for valid app_settings

* Finalize tests for app settings, fix regex for vSphere root folder validation
* Fix(Hosts index): Move to datatables usage

* Chore(Application.scss): Whitespace

* Fix(Projects index): Use datatables

* Fix(Servers index): Use datatables

* Fix(Users index: Use datatables. Cleanup.
Show role instead of disabled buttons when no change right exist.

* Fix(Users index): Display date nicely.

* Fix(OS index): Use datatables

* Fix(Requests index): Use datatables

* Fix(Users index): handle nil in current_sign_in_at

* Fix(Requests index): Top navigation buttons

* Fix(Requests index): Use datatables. Cleanup.

* Fix(projects table): Readd table partial.
It's used in Users#show

* Fix(Users index): Readd HTML ids used for testing

* Fix(Projects index): USe of parenthesis

* Fix(VMs index): Use datatables.

* Fix(Index): Tooltips for status

* Fix(VMs index): refactor buttons. Add tooltips.

* Fix(VMs index): Handle searching for descriptions

* Chore(CSS): Remove unused class

* Chore(CSS): Remove unused 'table-bar' class

* Chore(Request teamplate CSS): Remove classes

* Fix(Requests show): Remove CSS classes

* Fix(projects show): Remove CSS classes.

* Fix(dashboard): Don't show datatables controls

* Fix(dashboard): Spacing between tables

* Fix(Users index): Return to prev. role display. Tests depend on it,

* Fix(VMs index spec): adapt to changed HTML

* Test(Request template index): Fixes. Use factory.

* Fix(Datatables JS): Refactor turbolinks cache fix

* Fix(Datatable JS): Further refactoring of cache fix
* Move user responsibility into VMConfig
Heavily refactor vms_controller

* Try to fix mock user assignment

* Fix more tests

* Fix tests

* Fix more tests

* Use default FactoryBot settings

* Better error handling if vm is unknown

* Adjust tests

* Fix redirect_back test
* Fix(notification index): Styling  and links

* Fix(Dashboard spec): Deletion of notifications

* Fix(Dashboard spec): First element is hidden due max display

* Fix(Notifications): Mark as read when clicking

* Fix(Notification controller): mark as read and redirect route

* Test(Notifications controller): Refactor

* Fix(dashboard): Only show unread notifications

* Fix(Dashboard spec): Adapt to changed HTML

* Fix too many redirects

* Revert "Fix too many redirects"

This reverts commit 422673c.

* Fix(Notification routes): Remove unused

* Fix(Notifications): Better flash messages

* Fix(Notification spec): restructure

* Fix(notification messages): Refactor
* Add initial deletion for projects

* Refactor the projects index page design

* More refactoring

* Even more refactoring

* Add a prompt if a VM will loose its project

* Remove json return in projects controller

* Add fa for deletion, remove unnecessary _list file

* Revert schema.rb

* Revert schema.rb

* Fix(Project table): Truncate description

* Fix(Project show): Display VM names, refactor warning

* Chore(Project table): Indent

* Fix(Project show spec): Adapt to changed HTML

* Test(Projects show): Display of VM names + links

* Fix(Projects show): No table

* Fix(Project table): Valid HTML markup for thead

* Chore(Whitespace): Tiny change for diff
* Fix(Hosts index): Move to datatables usage

* Chore(Application.scss): Whitespace

* Fix(Projects index): Use datatables

* Fix(Servers index): Use datatables

* Fix(Users index: Use datatables. Cleanup.
Show role instead of disabled buttons when no change right exist.

* Fix(Users index): Display date nicely.

* Fix(OS index): Use datatables

* Fix(Requests index): Use datatables

* Fix(Users index): handle nil in current_sign_in_at

* Fix(Requests index): Top navigation buttons

* Fix(Requests index): Use datatables. Cleanup.

* Fix(projects table): Readd table partial.
It's used in Users#show

* Fix(Users index): Readd HTML ids used for testing

* Fix(Projects index): USe of parenthesis

* Fix(VMs index): Use datatables.

* Fix(Index): Tooltips for status

* Fix(VMs index): refactor buttons. Add tooltips.

* Fix(VMs index): Handle searching for descriptions

* Chore(CSS): Remove unused class

* Chore(CSS): Remove unused 'table-bar' class

* Chore(Request teamplate CSS): Remove classes

* Fix(Requests show): Remove CSS classes

* Fix(projects show): Remove CSS classes.

* Chore(CSS): Remove empty SCSS files

* Chore(JS): Remove empty coffee files

* Fix(dashboard):  Remove markup

* Fix(dashboard): Don't show datatables controls

* Fix(dashboard): Spacing between tables

* Fix(Users index): Return to prev. role display. Tests depend on it,

* Fix(VMs index spec): adapt to changed HTML

* Test(Request template index): Fixes. Use factory.

* Fix(notification index): Styling  and links

* Fix(Dashboard spec): Deletion of notifications

* Fix(Dashboard spec): First element is hidden due max display

* Fix(Notifications): Mark as read when clicking

* Fix(Notification controller): mark as read and redirect route

* Test(Notifications controller): Refactor

* Fix(Datatables JS): Refactor turbolinks cache fix

* Fix(Datatable JS): Further refactoring of cache fix

* Fix(dashboard): Only show unread notifications

* Fix(Dashboard spec): Adapt to changed HTML

* Fix(Application SCSS): use SCSS imports

* Fix/application SCSS): solely use SCSS imports

* Fix(CSS):Remove unused classes

* Revert "Fix/application SCSS): solely use SCSS imports"

This reverts commit 68bd868.

* Fix(Application SCSS): Use SCSS imports

* Refactor(Gemfile): Restructure

* Fix(CSS): Select2 styling

* Fix(requests form): Remove CSS, adapt HTML

* Fix(OS form): Remove CSS

* Fix(CSS): Organize CSS styles

* Fix(CSS): .unread -> .bg-primary-light

* Fix(dashboard): Remove custom styling

* Fix(CSS): custom datatables styling

* Fix(CSS): Add comment for datatables custom CSS

* Fix(Project form): Bootstrap layout

* Fix(request template views): Remove back buttons, less HTML

* Fix(Server form): Style 'Add software' button

* Fix(Server new): Remove back button

* Fix(Projects form): Bootstrap class for resp. users field
* Fix(App Settings Controller): Remove JSON responses

* Fix(OS Controller): Remove JSON responses

* Fix(Request templates Controller): Remove JSON responses

* Fix(Messages): destroyed -> deleted
* use limit instead of slice

* Fix(Schema.rb): Undo changes
* Fix(Flash message translations): Add initial. Ref #526

* Fix(Flash Messages): Add detail

* Fix(Operating Systems Controller): Use I18n flash messages

* Fix(Flash Messages): No need for create and update alerts

* Fix(Flash Messages): Shorter I18n keys

* Fix(Projects Controller): Use I18n flash messages

* Fix(App Settings Controller): Use I18n flash messages

* Fix(Notifications Controller): Use I18n flash messages

* Fix(Request Templates Controller): Use I18n flash messages

* Fix(Servers Controller): Use I18n flash messages
* Fix(Servers Controller): Refactor

* Fix(Servers form): Allow editing software

* Fix(Server tests): Use ids

* Refactor(Server Controller sPec): Use factories

* Fix(Server controller): No save of empty fields, tests

* Chore(Server Controller): Whitespace

* Fix(Server Controller): Reject blank software after param permit

* Comment(Server Controller): ActionController::Parameters
* Fix(OS form): Use Bootstrap form builder

* Fix(Projects): Refactor form, change model

* Fix(Project Specs): adapt to changed form

* Fix(Request Templates Form): Use Bootstrap form

* Fix(Server Form): Use Bootstrap form

* Refactor(Projects controller): Use common set_project method

* Fix(Request Template Form): Readd labels

* Fix(Projects Form): Use horizontal form layout

* Fix(VMs Edit): Use Bootstrap form

* Fix(CSS): CSS for adding * for required attributes

* Fix(Requests form): Use Bootstrap form

* Fix(VMs edit config): Use Bootstrap form, refactor

* Fix(Tests): Adapt to changed HTML

* Fix(AppSettings Form): Use Bootstrap form

* Fix(Forms): Remove custom HartFormBuilder

* Comment(AppSettings Form): Link to Bootstrap Form

* Refactor(Projects controller): Nicer way of turning user ids to objects

* Fix(Requests / Servers / VMs Forms): Use collection_select

* Fix(Projects Controller): Restore original naming of form param

* Fix(Projects Controller): Remove custom project_params code
No longer needed after renaming params correctly

* Fix(Users Form): Use Bootstrap form

* Fix(Projects Views): No need to pass variables to new and edit

* Fix(VMs edit config): Readd Clipboard JS comment

* Fix(Forms): Add comments for bootstrap error display

* Fix(Requests New / Form): Templates + JS

* Fix(Request views): Remove operating_system_options helper

* Fix(Request Tests): Operating System can be none

* Fix(Merge): Small changes to ids and redirects

* Fix(CSS): Font-size of select2

* Fix(Server Form): Use Bootstrap style for unit display

* Fix(Servers Form): Nicer display of software

* Fix(Select elements): Use common 'none' option text

* Add missing GB label for request templates
* Fix puppet scripts and githelper

* Readd branching ability

* enable push on different branches

* Add tests

Co-authored-by: Björn Daase <bjoern.daase@student.hpi.de>

* Fix tests
* Fix(Tests): Massively speed up tests

* Fix(User Factory): Shorter SSH key
* Fix(Gemfile): Remove coffeescript dependency

* Fix(Aplication JS): Remove Coffeescript reference
* added benchmark-gems

* made dashboard and vms/index faster

* fixed tests

* Comment(Gemfile): Benchmarking gems

* more caching

* removed profiling and equal?

* made private methods private again

* applied requested changes

* readded parens
* Fix(VMs show): First try to show puppet scripts

* Fix(Requests index): Remove puppetscript button

* Fix(VM Config): Make 'node_script' method public

* Fix(VMs Show): Puppet Script Modal

* Fix(VMs Show): Show links to GitHub for scripts

* Fix(VMs show): Place modal button

* Fix(VMs Show Spec): Add tests, refactor

* Chore(VMs show): Comments + Whitespace

* Fix(VMs Show): Render modal in appropriate spot

* Fix(VMs Show): Extract modal into partial

* Fix(Requests Index): Readd navigation links

* Fix(VMs show): display file name for scripts

* Fix(VMs Show): Show request associated with VM
* Fix(Gemfile): Remove jbuilder gem and associated files

* Fix(Requests controller): Remove extracted methods

* Fix(Requests Controller):  Remove JSON from 'reject' method

* Refacor(Requests Controller): 'destroy' method

* Refactor(Requests Controller): 'create' method

* Refactor(Requests Controller): introduce 'set_request_templates'

* Refactor(Requests Controller): Remove 'split requests'

* Fix(Requests Form): Display base errors

* Refactor(Requests Controller): Make 'notify users' private

* Refactor(Requests Controller): Remove 'authenticate_state_change'

* Refactor(Requests Controller): Remove ref to 'authenticate_state_change'

* Refactor(Requests Controller): Use 'set_request'

* Refactor(Requests Controller): 'update' method

* Refactor(Requests Controller): 'index' db access

* Refactor(Requests Controller): 'safe_create_vm_for'

* Refactor(Requests Controller): Remove 'notice_for'

* Refactor(Requests Controller): Remove 'prepare_params'

* Chore(Requests Controller): Whitespace

* Fix(Request model): Use scopes for status
* Notify all admins whenever an error is logged

* Add custom styling to error notifications

* Fix missing tag close

* User custom formatter isntead of logger
Fixes issue that caused logs not going to STDOUT due to some weird Meta-Programming-issues

* Add explaining comment to conditional inheritance

* Migrate tests to HartFormatter

* Refactor tests

* Use centralized config for formatter

* Use icon to indicate errors instead of red text

* Avoid duplicate notifications
Add a lot of tests

* Only remove duplicate notifications that happened during the same minute

* refactorings

* Try to fix tests on travis

* Apply suggested changes

* Fix(Hart Formatter): Make it really clear why different loggers are used

* Fix(Notification): Don't overwrite created_at, set during new

* Comment(User): Ordering of notifications

* Comment(User): no way to log a failing save for notifications

* Comment(application.rb): Describe what the custom logger does

* Fix(Hart Formatter Spec, User Spec): 'be ==' -> 'eq'

* Fix(Notification Views Spec): assert_select -> expect

* Fix(Notifications Views Spec): Use string interpolation

* Fix(Notification List Spec): Ensure matches in notifications
* Fix puppet scripts and githelper

* Readd branching ability

* enable push on different branches

* Copy functionality from VirtualMachineConfig to servers

* Add name validation

* Add form fields for users

* Try to fix some errors (for some reasons servers can't be created at the moment)

* Fix form

Co-authored-by: Björn Daase <bjoern@daase.net>

* Add sudo_users and users to strong parameters

* Fix bug that causes users not to be updated if only responsible user changes

* Show responsible users on show page

* Fix tests

* Remove MAX_NAME_LENGTH constant

* Remove unnecessary brackets and .uniq

* Apply suggested changes

* Fix(Server form): Move comment for collection_select

* Refactor(Server Controller Spec): installed software test

* Fix(VM, Server Model): Add superclass

* Fix(Server, VM): Move 'read_users' to shared class

* Fix(Server, VM): Move 'save_users' to shared class

* Fix(Server, VM): Move 'write_puppetscripts' to shared class

* Fix(Server, VM): Move 'node_script' to shared class

* Fix(Server, VM): Move 'convert_to_user' to shared class

* Fix(Server, VM): Move 'all_users' to shared class

* Fix(Server, VM): Move 'user' functions to shared class

* Fix(Server, VM): Move 'attr_writers' to shared class

* Comment(Server Model): assign_defaults
Copy link
Contributor

@krichly krichly left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Testing is coming!

@chrisma chrisma merged commit 7b0c6b5 into master Apr 29, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants