DeepBlueCLtd / RCO

Secure asset register. Log into dummy version using `d-1`/`admin`
https://deepbluecltd.github.io/RCO/
Eclipse Public License 2.0
5 stars 11 forks source link

Offer cosmetic clues of working on test server #1026

Closed IanMayo closed 8 months ago

IanMayo commented 8 months ago

The software-testing guy reported a Fail because it wasn't easy to tell if he was on a test server or a publication server.

Since VAL is unaware of the infrastructure it is installed upon I couldn't really think of a way of resolving this, and once testing was complete the issue would go away anyway.

But, today the clients and I discussed wider use of the test server, by a slightly wider body of users.

So, I think this has become more important.

Could you have a think about this please? How about if:

  1. We have VAL code that inspects the window URL, and looks for the text VAL-DEV.
  2. If that text is present, then the blue header bar goes to dark red, and the [VAL] in the title bar is changed to [VAL-DEV]

How does that sound?

Note: for this, we wouldn't just look for VAL-DEV in the server part of the URL, we'd look in the whole of the window-URL. So, to test this, we'd just to a free-text search for VAL-DEV, and that would trigger the UI colors to change. I think.'..

Update: user requested that we also have suitable clarifying signage on the login/welcome screen to. Have demoted from bug to enhancement as this fix isn't urgent.

TahaKhanAbdalli commented 8 months ago

Hello, @IanMayo. We can set a variable in .env file. Which will be different for development and production environment. With the help of this variable we can change color of UI accordingly.

IanMayo commented 8 months ago

Sure, ok. Let's do that.

Do you think you can have it done by Monday lunch-time (UK hours)?

TahaKhanAbdalli commented 8 months ago

Sure, ok. Let's do that.

Do you think you can have it done by Monday lunch-time (UK hours)?

Sure.

TahaKhanAbdalli commented 8 months ago

In Development image

In Production image

Please confirm me is it okay? In development, the UI color of complete app will be red and in the top Appbar the [VAL_DEV] will be shown. In production, the UI color of complete app will be the default color of the app and in the top Appbar [VAL] will be shown.

IanMayo commented 8 months ago

Yes - that's a great solution. I look forward to being impressed by how few lines of code it is!

TahaKhanAbdalli commented 8 months ago

Only 5 to 7 lines of code.

IanMayo commented 8 months ago

Re-open, since users want stylised welcome screen too (red backdrop and name of system)

TahaKhanAbdalli commented 8 months ago

Hi @IanMayo, Could you please give me an idea about this? If we add a red color to the background, it will look like this: I am just checking. Because I think it does not look better. And also, where do I need to add the system name? image

IanMayo commented 8 months ago

No - it's the login panel we need to style. This is so that users recognise they are logging into the testing instance, and not the real instance (since they could have different accounts/passwords).

image

IanMayo commented 8 months ago

Oh, and it would be Welcome to VAL-TEST