Task/FP-204: My Allocations Usage Info By User#68
Conversation
Codecov Report
@@ Coverage Diff @@
## master #68 +/- ##
==========================================
+ Coverage 54.81% 55.15% +0.34%
==========================================
Files 226 230 +4
Lines 7960 8008 +48
Branches 1126 1136 +10
==========================================
+ Hits 4363 4417 +54
+ Misses 3388 3383 -5
+ Partials 209 208 -1
Flags with carried forward coverage won't be shown. Click here to find out more.
|
wesleyboar
left a comment
There was a problem hiding this comment.
Please, review the CSS suggestions.
459e854 to
9e3b4fd
Compare
rstijerina
left a comment
There was a problem hiding this comment.
I'm also curious about the usage stats. Do we know when they reset, etc? They're definitely not lifetime stats, as I'm missing lots of stampede2 usage, etc
server/portal/apps/users/utils.py
Outdated
There was a problem hiding this comment.
would be good to raise this addition with pytas as well
There was a problem hiding this comment.
@owaisj , you're planning on reaching out to the pytas team to request this, right?
.../AllocationsModals/AllocationsTeamViewModal/AllocationsContactCard/AllocationsContactCard.js
Outdated
Show resolved
Hide resolved
.../AllocationsModals/AllocationsTeamViewModal/AllocationsContactCard/AllocationsContactCard.js
Outdated
Show resolved
Hide resolved
...ns/AllocationsModals/AllocationsTeamViewModal/AllocationsUsageTable/AllocationsUsageTable.js
Outdated
Show resolved
Hide resolved
...ns/AllocationsModals/AllocationsTeamViewModal/AllocationsUsageTable/AllocationsUsageTable.js
Outdated
Show resolved
Hide resolved
Added endpoint Saga and ui with reacstrap
Added markup and styles for table Added utils to parse data
Refactored allocation request UI flow for team view modal tests
Added coverage for loading/errors Formatting of resource
Renamed and reworked file structure Implemented css module
Added units to entry Changed heading for usage Added 0 usage Changed exceptions in backend
.../AllocationsModals/AllocationsTeamViewModal/AllocationsContactCard/AllocationsContactCard.js
Outdated
Show resolved
Hide resolved
Quick solution for more space
.../AllocationsModals/AllocationsTeamViewModal/AllocationsContactCard/AllocationsContactCard.js
Outdated
Show resolved
Hide resolved
...ions/AllocationsModals/AllocationsTeamViewModal/AllocationsTeamTable/AllocationsTeamTable.js
Outdated
Show resolved
Hide resolved
| usageData: currentProject.systems.map(system => { | ||
| return { | ||
| type: system.type, | ||
| usage: `0 ${system.type === 'HPC' ? 'SU' : 'GB'}`, |
There was a problem hiding this comment.
May want to talk to Virginia Trueheart about this. Some systems are considered HPC and Storage at the same time. (Wrangler, in particular.) For those systems it may be necessary to display both. The same concerns may also exist for Frontera due to the availability of its local NVMe partitions.
There was a problem hiding this comment.
I remember Sal and Owais and Design agreeing to let Allocations Team View modal show 0 GB. Is this related?
There was a problem hiding this comment.
@nathanfranklin The storage units awarded were being pulled from the wrong portion of the allocations object. That has been fixed.
@jchuahtacc The information we're getting from TAS right now also doesn't tell us how much allocated storage is being used. I added a ticket for that here
Clear the view in between openings Active user check
wesleyboar
left a comment
There was a problem hiding this comment.
I approve the UI.
Also, I offer an (optional, for now; but required, later) almost invisible change, via PR #133, for this modal to use the DescriptionList component.
* Allocations usage by user Added endpoint Saga and ui with reacstrap * Refactored sagas * UsageDisplayed on modal Added markup and styles for table Added utils to parse data * Allocation modals tests Refactored allocation request UI flow for team view modal tests * Test Coverage and UI tweaks Added coverage for loading/errors Formatting of resource * Refactored UsageTable Renamed and reworked file structure Implemented css module * Modals in separate directory * CSS modules and test tweaks * Various Fixes Added units to entry Changed heading for usage Added 0 usage Changed exceptions in backend * Fixed units * Added JSDoc comments to utils * FP-204: UI: Swap contact card bold, and less bold * Task/fp 515 fp 354 support messages and new icons (#91) * Task/fp 515 install cortal icons (#90) * Task/fp 228/fp 515 isntall cortal icons (#89) * FP-515: Add Icon component from FP-354 * FP-515: Add Icon component usage from FP-354 * FP-515: Install Cortal 1.2 - Disable linting of `icon.fonts.css`. - Support WOFF in Webpack config. - Update several files (and tests) to use new icon names: - AppIcon - AppBrowser - DataFilesListingCell - DataFilesSidebar - DataFilesToolbar - Sidebar - TicketModal - Replace old Core Portal font with Cortal Icons font. - Migrate font styles to their own stylesheet. - Add icon aliases: - icon-collapse (icon-contract) * FP-515: Disable an "extra icon" * FP-515: Fix neglected instances of `icon-upload` * FP-228: Hide accessible Icon text * FP-228: Allow extra spaces in CSS before ruleset * Task/fp 354 message component (#88) * WIP: FP-354: Add component, icon sub-comp, tests To Do: - Run tests - Fix lint errors - Create tests for icon sub-component - Graduate icon sub-component to component * FP-354: Fix test * FP-354: Fix ES Lint error. Remove test CSS. * FP-354: Test sub-component * FP-354: Graduate MessageIcon to Icon * FP-354: Support `AppIcon` use of `Icon` * FP-354: Revert test tweaks to jest.config.js roots * FP-354: Support shortcut path to load new commons * FP-354: Accessible icon text. Missing icon class. * FP-354: Message text and icon text as `children` * FP-354: Styles for Message's * FP-354: Use `Message` in `DataFilesTable.js` * Quick: CSS lint allow align single-line rulesets * FP-354: Add missing `success` type * FP-354: Success type and fixes * FP-354: Fixes. Require icon. Color info type. * FP-534: Comments. Color var naming tweak. * FP-354: Fix AppIcon test fail (missing icon class) * FP-354: Expand tests. Simplify class match syntax. * Noop: Remove style remark from function comment * FP-354: CHoose different icon for `info` type * FP-515/FP-317: Update icons * Task/fp 537 add section for ui patterns (#93) * FP-537: New Section "UI Patterns" * FP-537: Update Sidebar tests * FP-537: More accurate `isDebug` comment * FP-537: Use new icon for 'UI Patterns' section * FP-357: Document `UIPatterns` component * FP-515/FP-354: Cleanup Icons & Messages * FP-354: More tests with less code * FP-354/FP-537: Add Message UI Patterns (#95) Follow up to FP-354 that was pending FP-537 * Quick: Remove outdated comments * FP-354/FP-537: Context for Message UI Patterns * FP-354/FP-537: Fix Unit Test i.e. Remove styleName * FP-354: Render/Style Links in UPatternsMessages * FP-537: Unset Bootstrap styles for `code` tag * FP-354: Replace `Action` w/ `link` tagged template * FP-515 (with FP-354): Change Icon Size to 18px … And replace `.app-icon` and `.category-icon` with `.icon`. * FP-557: New `<dl>` Component * FP-204/FP-557: Use DL UI Comp in Allocations Modal * FP-557: Finish Unit Tests * Quick: Allow `composes` to Pass CSS LInter * FP-204: UI: Quick: Remove extra code (from merge) * FP-204/FP-557: Remove margin on horz DL Co-authored-by: Owais Jamil <ojamil@tacc.utexas.edu>
nathanfranklin
left a comment
There was a problem hiding this comment.
Ui looks and behaves perfectly. 👍 I've let some comments though as some of the reported values look off.
.../AllocationsModals/AllocationsTeamViewModal/AllocationsContactCard/AllocationsContactCard.js
Show resolved
Hide resolved
| usageData: currentProject.systems.map(system => { | ||
| return { | ||
| type: system.type, | ||
| usage: `0 ${system.type === 'HPC' ? 'SU' : 'GB'}`, |

Overview:
This PR allows users to view usage for each allocation by user.
PR Status:
Related Jira tickets:
Summary of Changes:
There is now a usage table in the team view modal listing as well as a Django view using the new TAS usage endpoint.
Additionally, modals in the Allocations section now use CSS modules.
Testing Steps:
Go to the allocations section and click View Team. Almost every developer in WMA has some usage data in the TACC-ACI project.
UI Photos:
2020-07-30:

2020-06-16: Screen Shot 2020-06-16 at 12 46 20 PM
Notes:
Currently the usage endpoint requires the TAS URL setting to be set to dev.The usage endpoint is in TAS's prod environment now.