chenyulin0719 commented on code in PR #180:
URL: https://github.com/apache/yunikorn-web/pull/180#discussion_r1581750328
##########
src/app/components/queues-view/queues-view.component.ts:
##########
@@ -226,4 +230,14 @@ export class QueuesViewComponent implements OnInit {
});
}
}
+
+ loadStoredPartition(defaultValue = ''): string {
+ const storedPartition = localStorage.getItem('selectedPartitionAndQueue');
+ if (storedPartition && storedPartition.indexOf(':') > 0) return
storedPartition.split(':')[0];
+ return defaultValue;
+ }
+
+ storeSelectedPartition() {
+ localStorage.setItem('selectedPartitionAndQueue', this.partitionSelected +
':');
+ }
Review Comment:
Is it possible to refactor below localStorage functions into same module?
or move to utils?
If it's ok we can create another Jira to refactor it.
1. (app-view) loadStoredPartition(defaultValue = '')
2. (app-view) storeQueueSelection()
3. (node-view) loadStoredPartition(defaultValue = '')
4. (node-view) storeSelectedPartition() {
5. (queue-view) loadStoredPartition(defaultValue = '')
6. (queue-view) storeSelectedPartition() {
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]