Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix loading timezone and locale at login #1426

Merged
merged 3 commits into from
May 27, 2019

Conversation

swaterkamp
Copy link
Member

timezone and i18n are not found in the response.data but response.meta,
so login variables have to be stitched together from both those fields.

This solves several issues including non-workign user settings and the
performance page.

Checklist:

timezone and i18n are not found in the response.data but response.meta, 
so login variables have to be stitched together from both those fields.

This solves several issues including non-workign user settings and the 
performance page.
@swaterkamp swaterkamp marked this pull request as ready for review May 27, 2019 12:25
@swaterkamp swaterkamp requested review from a team and sarahd93 May 27, 2019 12:25
@swaterkamp swaterkamp self-assigned this May 27, 2019
@codecov
Copy link

codecov bot commented May 27, 2019

Codecov Report

Merging #1426 into gsa-8.0 will increase coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           gsa-8.0   #1426      +/-   ##
==========================================
+ Coverage     37.1%   37.1%   +<.01%     
==========================================
  Files          961     961              
  Lines        21741   21742       +1     
  Branches      6024    6047      +23     
==========================================
+ Hits          8066    8067       +1     
  Misses       12365   12365              
  Partials      1310    1310
Impacted Files Coverage Δ
gsa/src/gmp/models/login.js 100% <100%> (ø) ⬆️
gsa/src/gmp/commands/login.js 34.78% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 16d50b1...5c0cdc2. Read the comment docs.

@swaterkamp swaterkamp merged commit 69ea4e7 into greenbone:gsa-8.0 May 27, 2019
@swaterkamp swaterkamp deleted the TimezoneLocaleAtLogin branch May 27, 2019 12:59
this.version = elem.version;

const unixSeconds = parseInt(elem.session);
const {data = {}, meta = {}} = elem;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi the Login model should be reworked to get all necessary values as arguments to the constructor again and should not have to know anything about meta and data. The command must pass the arguments from meta and data to the model instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants