Add status page url field to DB and setting model
What does this MR do?
In order to automatically link to status page detail views, we need to ask the user to provide the url of their status page frontend.
This MR adds support for a new StatusPageSetting
field to the DB & model. Future MRs will allow CRUD actions via the internal API, add the FE, and then make the field fully required after all other MRs have merged.
Related MRs:
- Add field to model & DB
- Allow CRUD actions via API
- Add field to settings form in UI
- Require status page url field
- Documentation - TBD (appropriate docs have not merged for status page yet; update will come after)
Migration Output:
$ rake db:migrate:down VERSION=20200408212219
== 20200408212219 AddStatusPageUrlToStatusPageSettings: reverting =============
-- remove_column(:status_page_settings, :status_page_url)
-> 0.0013s
== 20200408212219 AddStatusPageUrlToStatusPageSettings: reverted (0.0014s) ====
$ rake db:migrate
== 20200408212219 AddStatusPageUrlToStatusPageSettings: migrating =============
-- add_column(:status_page_settings, :status_page_url, :text)
-> 0.0011s
-- transaction_open?()
-> 0.0000s
-- execute("ALTER TABLE status_page_settings\nADD CONSTRAINT check_75a79cd992\nCHECK ( char_length(status_page_url) <= 1024 )\nNOT VALID;\n")
-> 0.0010s
-- execute("SET statement_timeout TO 0")
-> 0.0002s
-- execute("ALTER TABLE status_page_settings VALIDATE CONSTRAINT check_75a79cd992;")
-> 0.0006s
-- execute("RESET ALL")
-> 0.0002s
== 20200408212219 AddStatusPageUrlToStatusPageSettings: migrated (0.0145s) ====
Related Issue: #213913 (closed)
Screenshots
Does this MR meet the acceptance criteria?
Conformity
-
Changelog entry - [-] Documentation (if required) - Status page documentation does not yet exist.
-
Code review guidelines -
Merge request performance guidelines -
Style guides -
Database guides -
Separation of EE specific content
Availability and Testing
-
Review and add/update tests for this feature/bug. Consider all test levels. See the Test Planning Process. - [-] Tested in all supported browsers
- [-] Informed Infrastructure department of a default or new setting change, if applicable per definition of done
Security
If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:
- [-] Label as security and @ mention
@gitlab-com/gl-security/appsec
- [-] The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
- [-] Security reports checked/validated by a reviewer from the AppSec team
Edited by Mayra Cabrera