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

swaterkamp commented May 27, 2019

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:

swaterkamp added 3 commits May 27, 2019
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 force-pushed the swaterkamp:TimezoneLocaleAtLogin branch from 0fe0deb to 5c0cdc2 May 27, 2019
@swaterkamp swaterkamp marked this pull request as ready for review May 27, 2019
@swaterkamp swaterkamp requested review from bjoernricks and greenbone/gsa-dev as code owners May 27, 2019
@swaterkamp swaterkamp requested a review from sarahd93 May 27, 2019
@swaterkamp swaterkamp self-assigned this May 27, 2019
@codecov

This comment has been minimized.

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
3 checks passed
3 checks passed
build_and_test Workflow: build_and_test
Details
codecov/patch 100% of diff hit (target 37.1%)
Details
codecov/project 37.1% (+<.01%) compared to 16d50b1
Details
@swaterkamp swaterkamp deleted the swaterkamp:TimezoneLocaleAtLogin branch May 27, 2019
this.version = elem.version;

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

This comment has been minimized.

Copy link
@bjoernricks

bjoernricks May 27, 2019

Member

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
Projects
None yet
3 participants
You can’t perform that action at this time.