Include message of the day option

Bug #1392855 reported by Joe Gordon
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenStack Dashboard (Horizon)
Won't Fix
Undecided
Unassigned

Bug Description

As an operator there are many cases where I would like to notify my users about something through a message of the day. Things such as:

* We just upgraded to a new version of X, and this is what changed
* Planned outages
* etc.

This idea came up in the ops summit in Paris, where one operator said he doesn't upgrade Horizon because people don't like surprise changes.

Revision history for this message
Gary W. Smith (gary-w-smith) wrote :

Seems like a reasonable thing to add. Please create a blueprint for this improvement before implemention.

Changed in horizon:
importance: Undecided → Wishlist
Revision history for this message
Julie Pichon (jpichon) wrote :

Couldn't this be achieved today by overriding the _login.html template in a plug-in?

Revision history for this message
Joe Gordon (jogo) wrote :

Note, I have no intention of actually implementing this wishlist feature, I am just following up from some good feedback from a operator session at the summit.

Revision history for this message
Nikunj Aggarwal (nikunj2512) wrote :

Joe,

I can submit blueprint for this??

Changed in horizon:
assignee: nobody → Nikunj Aggarwal (nikunj2512)
Revision history for this message
Nikunj Aggarwal (nikunj2512) wrote :

Also, i will like to work on this feature.

Revision history for this message
Julie Pichon (jpichon) wrote :

It'd be great if the folks who proposed the feature could help us refine it. It seems to me Horizon already has the capability to offer this via extending existing templates (it came up a few times at Summit that people aren't aware of the many ways Horizon can be customised currently, we need to improve on the docs a lot).

Also since Horizon doesn't have a data store currently, I'm not sure what would be the best way to accomplish this, unless the message is stored in another service.

Revision history for this message
Joe Gordon (jogo) wrote :

Nikunj, that would be great, go for it.

Revision history for this message
Nikunj Aggarwal (nikunj2512) wrote :

You are right Julie, people who proposed it could help us in refining it. As you mentioned that _login.html template already has the capability to offer this feature but we also have to provide a panel to Admin user where they can manage their messages.

And you are right as horizon doesn't have any database currently and i doubt that other service will let us store horizon data in there databases.

Revision history for this message
Rob Cresswell (robcresswell) wrote :

Was a blueprint submitted for this? Just cleaning up bugs...

Revision history for this message
Lin Hua Cheng (lin-hua-cheng) wrote :

I am also interested in this feature. I'd be happy to review the blueprint.

Revision history for this message
Nikunj Aggarwal (nikunj2512) wrote :

I will submit the blueprint in couple of days. Thank You for Your interest Lin Hua Cheng.

Revision history for this message
Lin Hua Cheng (lin-hua-cheng) wrote :

Hi Nikunj,

I haven't seen any activity for a while, are you still interested on working on this?

I'll be happy to work on this if you changed your priorities.

Thanks,
Lin

Revision history for this message
Don Bowman (donbowman) wrote :

In templates/auth/login.html, add
<div class="alert alert-success" role="alert" id=motd></div>

<script>
$(document).ready(function() {
        $.get("/motd.json",function(data) {
                var el = document.getElementById("motd");
                var offset = 80 + data.length * 20;
                data.forEach(function(item) {
                        el.innerHTML += "<p>" + item.msg + "</p>";
                        $(".login").css("top",offset.toString() + "px");
                });
        })
});
</script>

after the include of auth/_login.html

then, on your web server, add /motd.json as
[
 { "msg": "this is my message" },
 { "msg":"this is another message" }
]

and it will put these above the login screen as a message of the day.

Revision history for this message
Don Bowman (donbowman) wrote :

or better,:

<div role="alert" id=motd></div>

<script>
$(document).ready(function() {
        $.get("/motd.json",function(data) {
                var el = document.getElementById("motd");
                var offset = 80 + data.length * 20;
                data.forEach(function(item) {
                        el.innerHTML += "<p>" + item.msg + "</p>";
                        $(".login").css("top",offset.toString() + "px");
                        $("#motd").addClass("alert alert-success");
                });
        })
});
</script>

so it doesn't show if there is no motd.

Revision history for this message
keerthivasan selvaraj (keerthiv) wrote :

I am new to openstack horizon, can you please tell where to add this motd.json, to fetch the messages.

Revision history for this message
Lin Hua Cheng (lin-hua-cheng) wrote :

removing assignee due to no activity

Changed in horizon:
assignee: Nikunj Aggarwal (nikunj2512) → nobody
Revision history for this message
Lin Hua Cheng (lin-hua-cheng) wrote :

Don: I think the message of the day should show up after the user successfully logs in into horizon, not on the login page.

Changed in horizon:
assignee: nobody → Lin Hua Cheng (lin-hua-cheng)
Revision history for this message
Tim Bell (tim-bell) wrote :

Agreed that it should be after login as if you use single sign on, you may never see the login page.

Revision history for this message
Lin Hua Cheng (lin-hua-cheng) wrote :

Opened a BP instead since this is a new feature: https://blueprints.launchpad.net/horizon/+spec/message-of-the-day

Revision history for this message
Lin Hua Cheng (lin-hua-cheng) wrote :

Closing as there is already BP opened.

Progress can be tracked in the BP.

Changed in horizon:
status: New → Won't Fix
Revision history for this message
Matthias Runge (mrunge) wrote :

removing assignee and importance to make it expiring here on launchpad.

Changed in horizon:
assignee: Lin Hua Cheng (lin-hua-cheng) → nobody
importance: Wishlist → Undecided
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers