When building the deb package, the source tarball does not get saved in the pkg directory. Since this could be something useful to keep around, we should save the file. We do this by copying the latest tarball out of the temporary directory. The tar rake task also generates a tarball, but we are guaranteed that the debian source tarball will have a later mtime than that one.
The deb package should make it more obvious that dashboard comes from puppetlabs, so we add puppetlabs to the version string in the appropriate place.
Now that there are foreign key constraints in the database that do cascading deletes, the test database needs to have those constraints too. Currently, db:test:prepare is called before every spec run, which copies schema.rb into the test database without the constraints. Switching to db:test:clone_structure gets the schema from the dev database which will have the right constraints. Another possible option was to change the schema to be sql instead of ruby, but the option to do so is currently broken. Another possibility in the future may be to use the foreigner plugin so that constraints can be specifiec in migrations more easily. https://github.com/matthuhiggins/foreigner
When calling delete instead of destroy on reports the callback to update the node info doesn't get called. Delete is a lot faster since you don't need to create an ActiveRecord object to do it, so we'll leave it as delete and manually do the callback to update nodes after we've taken care of all the reports. Reviewed-by: Max Martin <firstname.lastname@example.org>
Using the `:dependent => :destroy` on Rails records is really slow when you need to delete a lot of child records since it makes an active record object for each one. Instead, if we have foreign keys with cascading deletes, this will happen very quickly. We wouldn't want this if we were relying on hooks with destroy, but the only model that has that kind of hook is for reports, and it just updates the associated node table, but if you've deleted the node, that hook will be useless. Reviewed-by: Max Martin <email@example.com>
The rake reports:prune task was deleting reports, but not the associated resource statuses, events, metrics and logs. Running this new task will fix all the data you've orphaned running the prune task. Reviewed-by: Josh Lifton <firstname.lastname@example.org>
* devon/tickets/master/7554-latest-report-link: (#7554) Link latest report to actual report on front page
The latest report time in the node listing on the front page was not linking to the latest report. Added an active link to the timestamp in order to navigate to the individual report.
* stahnma/1.2rc: (#10024) Fix typo in fix for 10024
* stahnma/1.2rc: (#10024) Update Puppet Dashboard Workers init script
Minor fixes to dashboard-workers script. The script sources a sysconfig file that uses DASHBOARD_HOME rather than DASHBOARD_ROOT, so this script has been updated to utilize the DASHBOARD_HOME env variable. Additionally the sysconfig file had a value for the user to run the processes as, but then was hard-coding the user-name. Script has been updated to allow changing of username, as per the sysconfig file. Signed-off-by: Michael Stahnke <email@example.com>
We want to be able to select Dashboard navigation items with CSS. This patch adds ids to each navigation element. Reviewd-by: Pieter van de Bruggen <firstname.lastname@example.org>
* 'ticket/10076' of git://github.com/jgrocho/puppet-dashboard: (#10076) Adjust RPM package versions so RCs are 'less than' finals Conflicts: lib/tasks/package.rake
rpm will report that 1.2.2rc1 is > 1.2.2 $ rpmdev-vercmp 1.2.2rc1 1.2.2 0:1.2.2rc1-None is newer Now we will create the package version as 1.2.2-0.1rc1 and the final as 1.2.2-1, which will be properly compared by 'rpm' $ rpmdev-vercmp 1.2.2-0.1rc1 1.2.2-1 0:1.2.2-1 is newer
'dpkg --compare-versions' will report that 1.2.2rc1 is > 1.2.2 $ dpkg --compare-versions 1.2.2rc1 '>' 1.2.2; echo $? 0 Now we will create the package version as 1.2.2-0.1rc1 and the final as 1.2.2-1, which will be properly compared by 'dpkg --compare-versions' $ dpkg --compare-versions 1.2.2-0.1rc1 '>' 1.2.2-1; echo $? 1