You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "justinpark (via GitHub)" <gi...@apache.org> on 2023/06/29 21:06:05 UTC

[GitHub] [superset] justinpark commented on a diff in pull request #24554: chore(sqllab): Log current local storage usage

justinpark commented on code in PR #24554:
URL: https://github.com/apache/superset/pull/24554#discussion_r1247175918


##########
superset-frontend/src/SqlLab/components/App/index.jsx:
##########
@@ -121,14 +124,27 @@ class App extends React.PureComponent {
   }
 
   componentDidUpdate() {
+    const { localStorageUsageInKilobytes, actions, queries } = this.props;
+    const queryCount = queries?.lenghth || 0;
     if (
-      this.props.localStorageUsageInKilobytes >=
+      localStorageUsageInKilobytes >=
       LOCALSTORAGE_WARNING_THRESHOLD * LOCALSTORAGE_MAX_USAGE_KB
     ) {
       this.showLocalStorageUsageWarning(
-        this.props.localStorageUsageInKilobytes,
-        this.props.queries?.lenghth || 0,
+        localStorageUsageInKilobytes,
+        queryCount,
+      );
+    }
+    if (localStorageUsageInKilobytes > 0 && !this.hasLoggedLocalStorageUsage) {

Review Comment:
   That's right.



-- 
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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org