feat(motd): relocate motd file URL and always return 200 (#2466)

pull/2470/head
Anthony Lapenna 2018-11-14 12:20:33 +13:00 committed by GitHub
parent 40e0c3879c
commit 94d3d7bde2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 3 deletions

View File

@ -18,7 +18,7 @@ func (handler *Handler) motd(w http.ResponseWriter, r *http.Request) {
motd, err := client.Get(portainer.MessageOfTheDayURL, 0)
if err != nil {
w.WriteHeader(http.StatusInternalServerError)
response.JSON(w, &motdResponse{Message: ""})
return
}

View File

@ -714,7 +714,7 @@ const (
// DBVersion is the version number of the Portainer database
DBVersion = 14
// MessageOfTheDayURL represents the URL where Portainer MOTD message can be retrieved
MessageOfTheDayURL = "https://raw.githubusercontent.com/portainer/motd/master/message.html"
MessageOfTheDayURL = "https://portainer-io-assets.sfo2.digitaloceanspaces.com/motd.html"
// PortainerAgentHeader represents the name of the header available in any agent response
PortainerAgentHeader = "Portainer-Agent"
// PortainerAgentTargetHeader represent the name of the header containing the target node name

View File

@ -8,7 +8,7 @@
</rd-header>
<information-panel
ng-if="motd && applicationState.UI.dismissedInfoHash !== motd.Hash"
ng-if="motd && motd.Message !== '' && applicationState.UI.dismissedInfoHash !== motd.Hash"
title-text="Important message"
dismiss-action="dismissImportantInformation(motd.Hash)">
<span class="text-muted">