You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2022/10/17 16:58:53 UTC

[GitHub] [superset] john-bodley commented on a diff in pull request #21819: feat(dashboard): confirm overwrite to prevent unintended changes

john-bodley commented on code in PR #21819:
URL: https://github.com/apache/superset/pull/21819#discussion_r997305898


##########
superset-frontend/spec/fixtures/mockDashboardState.js:
##########
@@ -30,3 +31,34 @@ export default {
   focusedFilterField: null,
   refreshFrequency: 0,
 };
+
+export const overwriteConfirmMetadata = {
+  latestUpdatedAt: '2022-10-07T16:35:30.924212',
+  latestUpdatedBy: 'Superset Admin',
+  overwriteConfirmItems: [
+    {
+      keyPath: 'css',
+      oldValue: '',
+      newValue:
+        ".navbar {\n    transition: opacity 0.5s ease;\n    opacity: 0.05;\n}\n.navbar:hover {\n    opacity: 1;\n}\n.chart-header .header{\n    font-weight: @font-weight-normal;\n    font-size: 12px;\n}\n/*\nvar bnbColors = [\n    //rausch    hackb      kazan      babu      lima        beach     tirol\n    '#ff5a5f', '#7b0051', '#007A87', '#00d1c1', '#8ce071', '#ffb400', '#b4a76c',\n    '#ff8083', '#cc0086', '#00a1b3', '#00ffeb', '#bbedab', '#ffd266', '#cbc29a',\n    '#ff3339', '#ff1ab1', '#005c66', '#00b3a5', '#55d12e', '#b37e00', '#988b4e',\n ];\n*/\n",
+    },
+    {
+      keyPath: 'json_metadata.filter_scopes',
+      oldValue:
+        '{\n  "122": {\n    "ethnic_minority": {\n      "scope": [\n        "ROOT_ID"\n      ],\n      "immune": []\n    },\n    "gender": {\n      "scope": [\n        "ROOT_ID"\n      ],\n      "immune": []\n    },\n    "developer_type": {\n      "scope": [\n        "ROOT_ID"\n      ],\n      "immune": []\n    },\n    "lang_at_home": {\n      "scope": [\n        "ROOT_ID"\n      ],\n      "immune": []\n    },\n    "country_live": {\n      "scope": [\n        "ROOT_ID"\n      ],\n      "immune": []\n    }\n  }\n}',

Review Comment:
   Should we add `\t` here and/or compare the old/new without the formatting, i.e., as a parsed JSON blob?



-- 
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