License expiration dates wrong in console

Summary

The license details in the administrative console provide unclear and inconsistent data around how many days are left on a license and it's expiration status.

Steps to reproduce

  1. Upload trial license to GitLab v9.5.
  2. Look at license details.
  3. Allow license to expire.
  4. Look at license details.

Example Project

NA

What is the current bug behavior?

With 14 days left on a trial license, it displays:

Expires: in 1 week Free trial will expire in 14 days

When the license has expired, it displays:

Expires: never Expired

The word "Expired" is in a red alert box, where as the other text is displayed with normal styles.

What is the expected correct behavior?

With 14 days left on a trial license, it should display:

Expires: Free trial expires in 2 weeks

or

Expires: Free trial expires in 14 days

When the license has expired, it should display something like:

Expires: 2017-08-25 6:00PM Expired

Relevant logs and/or screenshots

Screen_Shot_2017-08-25_at_4.36.02_PM

Output of checks

(If you are reporting a bug on GitLab.com, write: This bug happens on GitLab.com)

Results of GitLab environment info

Expand for output related to GitLab environment info

System information System: RedHatEnterpriseServer 7.3 Proxy: no Current User: git Using RVM: no Ruby Version: 2.3.3p222 Gem Version: 2.6.6 Bundler Version:1.13.7 Rake Version: 12.0.0 Redis Version: 3.2.5 Git Version: 2.13.5 Sidekiq Version:5.0.4 Go Version: unknown

GitLab information Version: 9.5.0-ee Revision: 36112e7 Directory: /opt/gitlab/embedded/service/gitlab-rails DB Adapter: postgresql DB Version: 9.6.3 URL: https://gitlab.corp.redhat.com HTTP Clone URL: https://gitlab.corp.redhat.com/some-group/some-project.git SSH Clone URL: git@gitlab.corp.redhat.com:some-group/some-project.git Elasticsearch: no Geo: no Using LDAP: yes Using Omniauth: yes Omniauth Providers: saml

GitLab Shell Version: 5.8.0 Repository storage paths:

  • default: /var/opt/gitlab/git-data/repositories Hooks: /opt/gitlab/embedded/service/gitlab-shell/hooks Git: /opt/gitlab/embedded/bin/git

Results of GitLab application Check

Expand for output related to the GitLab application check

Checking GitLab Shell ...

GitLab Shell version >= 5.8.0 ? ... OK (5.8.0) Repo base directory exists? default... yes Repo storage directories are symlinks? default... no Repo paths owned by git:root, or git:git? default... yes Repo paths access is drwxrws---? default... yes hooks directories in repos are links: ... 3/1 ... ok 3/2 ... repository is empty 26/3 ... ok 11/4 ... ok 26/6 ... ok 27/7 ... ok 26/9 ... ok 26/10 ... ok 27/11 ... ok 27/12 ... ok 29/13 ... repository is empty 32/14 ... ok Running /opt/gitlab/embedded/service/gitlab-shell/bin/check Check GitLab API access: OK Access to /var/opt/gitlab/.ssh/authorized_keys: OK Send ping to redis server: OK gitlab-shell self-check successful

Checking GitLab Shell ... Finished

Checking Sidekiq ...

Running? ... yes Number of Sidekiq processes ... 1

Checking Sidekiq ... Finished

Checking Reply by email ...

Reply by email is disabled in config/gitlab.yml

Checking Reply by email ... Finished

Checking LDAP ...

Server: ldapmain not verifying SSL hostname of LDAPS server 'ldap.corp.redhat.com:636' LDAP authentication... Anonymous. No bind_dn or password configured LDAP users with access to your GitLab server (only showing the first 100 results) DN: uid=tbenning,ou=users,dc=redhat,dc=com uid: tbenning

Checking LDAP ... Finished

Checking GitLab ...

Git configured correctly? ... yes Database config exists? ... yes All migrations up? ... yes Database contains orphaned GroupMembers? ... no GitLab config exists? ... yes GitLab config up to date? ... yes Log directory writable? ... yes Tmp directory writable? ... yes Uploads directory exists? ... yes Uploads directory has correct permissions? ... yes Uploads directory tmp has correct permissions? ... yes Init script exists? ... skipped (omnibus-gitlab has no init script) Init script up-to-date? ... skipped (omnibus-gitlab has no init script) Projects have namespace: ... 3/1 ... yes 3/2 ... yes 26/3 ... yes 11/4 ... yes 26/6 ... yes 27/7 ... yes 26/9 ... yes 26/10 ... yes 27/11 ... yes 27/12 ... yes 29/13 ... yes 32/14 ... yes Redis version >= 2.8.0? ... yes Ruby version >= 2.3.3 ? ... yes (2.3.3) Git version >= 2.7.3 ? ... yes (2.13.5) Active users: ... 26 Elasticsearch version 5.1 - 5.3? ... skipped (elasticsearch is disabled)

Checking GitLab ... Finished

Possible fixes

https://gitlab.com/gitlab-org/gitlab-ee/blob/master/app/views/admin/licenses/show.html.haml

Assignee Loading
Time tracking Loading