summaryrefslogtreecommitdiff
path: root/app/models/broadcast_message.rb
Commit message (Collapse)AuthorAgeFilesLines
* Removes default scope from sortable23079-remove-default-scope-in-sortableTiago Botelho2017-09-071-1/+1
|
* Fix caching of future broadcast messagesfix-broadcast-message-cachingYorick Peterse2017-08-211-5/+27
| | | | | | | | | This changes the caching mechanism so we cache both current _and_ future broadcast messages, then manually filter out those we don't want to display. This ensures we don't need any additional queries while still being able to display the right messages at the right time. Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/36661
* Better caching and indexing of broadcast messagesYorick Peterse2017-08-111-2/+12
| | | | | | | | | | | | | | | | | Caching of BroadcastMessage instances has been changed so a cache stays valid as long as the default cache expiration time permits, instead of the cache being expired after 1 minute. When modifying broadcast messages the cache is flushed automatically. To remove the need for performing sequence scans on the "broadcast_messages" table we also add an index on (starts_at, ends_at, id), permitting PostgreSQL to use an index scan to get all necessary data. Finally this commit adds a few NOT NULL constraints to the table to match the Rails validations. Fixes gitlab-org/gitlab-ce#31706
* #13336 - display multiple messages in both the UI and git outputMike Ricketts2017-06-151-1/+1
|
* Add markdown cache columns to the database, but don't use them yetNick Thomas2016-10-071-0/+3
| | | | | | | | | | | | This commit adds a number of _html columns and, with the exception of Note, starts updating them whenever the content of their partner fields changes. Note has a collision with the note_html attr_accessor; that will be fixed later A background worker for clearing these cache columns is also introduced - use `rake cache:clear` to set it off. You can clear the database or Redis caches separately by running `rake cache:clear:db` or `rake cache:clear:redis`, respectively.
* Remove the annotate gem and delete old annotationsJeroen van Baarsen2016-05-091-14/+0
| | | | | | | | | In 8278b763d96ef10c6494409b18b7eb541463af29 the default behaviour of annotation has changes, which was causing a lot of noise in diffs. We decided in #17382 that it is better to get rid of the whole annotate gem, and instead let people look at schema.rb for the columns in a table. Fixes: #17382
* Annotate the modelsZeger-Jan van de Weg2016-05-061-2/+2
|
* Change ttl to 1 minutecache-broadcast-message-currentJosh Frye2016-01-291-1/+1
|
* Cache BroadcastMessage.current for 5 minutes. Fixes #12770Josh Frye2016-01-291-1/+3
|
* Move `BroadcastMessage#status` to a helper since it's presentationalRobert Speicher2016-01-131-10/+0
|
* Update BroadcastMessage modelRobert Speicher2016-01-131-1/+26
| | | | | - Adds default values for `color` and `font` attributes - Adds `active?`, `started?`, `ended?`, and 'status' methods
* Remove alert_type attribute from BroadcastMessageRobert Speicher2016-01-131-1/+0
|
* Add custom ColorValidatorRobert Speicher2015-12-071-4/+4
|
* Explicitly define ordering in models using default_scopeDmitriy Zaporozhets2015-02-051-0/+2
|
* Use strong params for 5 more modelsDmitriy Zaporozhets2014-06-261-2/+0
| | | | Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
* Allow set broadcast color with 3 digits like #444Dmitriy Zaporozhets2014-06-041-2/+2
| | | | Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
* Re-annotate modelsDmitriy Zaporozhets2014-04-091-3/+3
| | | | Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
* Add validations to BroadcastMessage color and fontDmitriy Zaporozhets2013-12-191-0/+3
| | | | Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
* Customization and previewing of broadcast messagesAndrew Tomaka2013-12-181-1/+3
|
* AnnotateDmitriy Zaporozhets2013-11-131-0/+13
| | | | Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
* Show broadcast message to usersDmitriy Zaporozhets2013-11-121-0/+4
| | | | Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
* Broadcast messages scaffold in admin areaDmitriy Zaporozhets2013-11-121-0/+2
| | | | Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
* Broadcast message model + migrationsDmitriy Zaporozhets2013-11-121-0/+5
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>