mirror of
https://github.com/apache/superset.git
synced 2024-09-06 13:57:40 -04:00
feat(alerts/reports): delete and bulk delete actions (#12053)
This commit is contained in:
parent
9be9034f1a
commit
e299dbf797
206
superset-frontend/package-lock.json
generated
206
superset-frontend/package-lock.json
generated
@ -16517,12 +16517,90 @@
|
||||
"@superset-ui/core": "0.15.13",
|
||||
"lodash": "^4.17.15",
|
||||
"prop-types": "^15.7.2"
|
||||
},
|
||||
"dependencies": {
|
||||
"@superset-ui/core": {
|
||||
"version": "0.15.13",
|
||||
"resolved": "https://registry.npmjs.org/@superset-ui/core/-/core-0.15.13.tgz",
|
||||
"integrity": "sha512-2mCOGO5OdNJwcokmuoWhZVzjEdWCqVT1DqUCBzmyOjvbvX5J+ZWKJFMZ+GUMoLHzxGzYI3xPhdzJWnYdLrBXmg==",
|
||||
"requires": {
|
||||
"@babel/runtime": "^7.1.2",
|
||||
"@emotion/core": "^10.0.28",
|
||||
"@emotion/styled": "^10.0.27",
|
||||
"@types/d3-format": "^1.3.0",
|
||||
"@types/d3-interpolate": "^1.3.1",
|
||||
"@types/d3-scale": "^2.1.1",
|
||||
"@types/d3-time": "^1.0.9",
|
||||
"@types/d3-time-format": "^2.1.0",
|
||||
"@types/lodash": "^4.14.149",
|
||||
"@vx/responsive": "^0.0.197",
|
||||
"csstype": "^2.6.4",
|
||||
"d3-format": "^1.3.2",
|
||||
"d3-interpolate": "^1.4.0",
|
||||
"d3-scale": "^3.0.0",
|
||||
"d3-time": "^1.0.10",
|
||||
"d3-time-format": "^2.2.0",
|
||||
"emotion-theming": "^10.0.27",
|
||||
"fetch-retry": "^4.0.1",
|
||||
"jed": "^1.1.1",
|
||||
"lodash": "^4.17.11",
|
||||
"pretty-ms": "^7.0.0",
|
||||
"react-error-boundary": "^1.2.5",
|
||||
"reselect": "^4.0.0",
|
||||
"whatwg-fetch": "^3.0.0"
|
||||
}
|
||||
},
|
||||
"@vx/responsive": {
|
||||
"version": "0.0.197",
|
||||
"resolved": "https://registry.npmjs.org/@vx/responsive/-/responsive-0.0.197.tgz",
|
||||
"integrity": "sha512-Qv15PJ/Hy79LjyfJ/9E8z+zacKAnD43O2Jg9wvB6PFSNs73xPEDy/mHTYxH+FZv94ruAE3scBO0330W29sQpyg==",
|
||||
"requires": {
|
||||
"@types/lodash": "^4.14.146",
|
||||
"@types/react": "*",
|
||||
"lodash": "^4.17.10",
|
||||
"prop-types": "^15.6.1",
|
||||
"resize-observer-polyfill": "1.5.1"
|
||||
}
|
||||
},
|
||||
"d3-array": {
|
||||
"version": "2.9.1",
|
||||
"resolved": "https://registry.npmjs.org/d3-array/-/d3-array-2.9.1.tgz",
|
||||
"integrity": "sha512-Ob7RdOtkqsjx1NWyQHMFLtCSk6/aKTxDdC4ZIolX+O+mDD2RzrsYgAyc0WGAlfYFVELLSilS7w8BtE3PKM8bHg=="
|
||||
},
|
||||
"d3-interpolate": {
|
||||
"version": "1.4.0",
|
||||
"resolved": "https://registry.npmjs.org/d3-interpolate/-/d3-interpolate-1.4.0.tgz",
|
||||
"integrity": "sha512-V9znK0zc3jOPV4VD2zZn0sDhZU3WAE2bmlxdIwwQPPzPjvyLkd8B3JUVdS1IDUFDkWZ72c9qnv1GK2ZagTZ8EA==",
|
||||
"requires": {
|
||||
"d3-color": "1"
|
||||
}
|
||||
},
|
||||
"d3-scale": {
|
||||
"version": "3.2.3",
|
||||
"resolved": "https://registry.npmjs.org/d3-scale/-/d3-scale-3.2.3.tgz",
|
||||
"integrity": "sha512-8E37oWEmEzj57bHcnjPVOBS3n4jqakOeuv1EDdQSiSrYnMCBdMd3nc4HtKk7uia8DUHcY/CGuJ42xxgtEYrX0g==",
|
||||
"requires": {
|
||||
"d3-array": "^2.3.0",
|
||||
"d3-format": "1 - 2",
|
||||
"d3-interpolate": "1.2.0 - 2",
|
||||
"d3-time": "1 - 2",
|
||||
"d3-time-format": "2 - 3"
|
||||
}
|
||||
},
|
||||
"d3-time-format": {
|
||||
"version": "2.3.0",
|
||||
"resolved": "https://registry.npmjs.org/d3-time-format/-/d3-time-format-2.3.0.tgz",
|
||||
"integrity": "sha512-guv6b2H37s2Uq/GefleCDtbe0XZAuy7Wa49VGkPVPMfLL9qObgBST3lEHJBMUp8S7NdLQAGIvr2KXk8Hc98iKQ==",
|
||||
"requires": {
|
||||
"d3-time": "1"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"@superset-ui/core": {
|
||||
"version": "0.15.13",
|
||||
"resolved": "https://registry.npmjs.org/@superset-ui/core/-/core-0.15.13.tgz",
|
||||
"integrity": "sha512-2mCOGO5OdNJwcokmuoWhZVzjEdWCqVT1DqUCBzmyOjvbvX5J+ZWKJFMZ+GUMoLHzxGzYI3xPhdzJWnYdLrBXmg==",
|
||||
"version": "0.15.17",
|
||||
"resolved": "https://registry.npmjs.org/@superset-ui/core/-/core-0.15.17.tgz",
|
||||
"integrity": "sha512-VjrWkxMvVSU/LB0AO6Qf/VHOdk3Jweug78FfnXlKmFK3Z4eRtfrCpKZOjEwMqKhhdppkU34MOfduZYq0uS6Ocw==",
|
||||
"requires": {
|
||||
"@babel/runtime": "^7.1.2",
|
||||
"@emotion/core": "^10.0.28",
|
||||
@ -16533,6 +16611,7 @@
|
||||
"@types/d3-time": "^1.0.9",
|
||||
"@types/d3-time-format": "^2.1.0",
|
||||
"@types/lodash": "^4.14.149",
|
||||
"@types/rison": "0.0.6",
|
||||
"@vx/responsive": "^0.0.197",
|
||||
"csstype": "^2.6.4",
|
||||
"d3-format": "^1.3.2",
|
||||
@ -16547,6 +16626,7 @@
|
||||
"pretty-ms": "^7.0.0",
|
||||
"react-error-boundary": "^1.2.5",
|
||||
"reselect": "^4.0.0",
|
||||
"rison": "^0.1.1",
|
||||
"whatwg-fetch": "^3.0.0"
|
||||
},
|
||||
"dependencies": {
|
||||
@ -16563,9 +16643,9 @@
|
||||
}
|
||||
},
|
||||
"d3-array": {
|
||||
"version": "2.8.0",
|
||||
"resolved": "https://registry.npmjs.org/d3-array/-/d3-array-2.8.0.tgz",
|
||||
"integrity": "sha512-6V272gsOeg7+9pTW1jSYOR1QE37g95I3my1hBmY+vOUNHRrk9yt4OTz/gK7PMkVAVDrYYq4mq3grTiZ8iJdNIw=="
|
||||
"version": "2.9.1",
|
||||
"resolved": "https://registry.npmjs.org/d3-array/-/d3-array-2.9.1.tgz",
|
||||
"integrity": "sha512-Ob7RdOtkqsjx1NWyQHMFLtCSk6/aKTxDdC4ZIolX+O+mDD2RzrsYgAyc0WGAlfYFVELLSilS7w8BtE3PKM8bHg=="
|
||||
},
|
||||
"d3-interpolate": {
|
||||
"version": "1.4.0",
|
||||
@ -24971,28 +25051,28 @@
|
||||
"dependencies": {
|
||||
"abbrev": {
|
||||
"version": "1.1.1",
|
||||
"resolved": "",
|
||||
"resolved": false,
|
||||
"integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==",
|
||||
"dev": true,
|
||||
"optional": true
|
||||
},
|
||||
"ansi-regex": {
|
||||
"version": "2.1.1",
|
||||
"resolved": "",
|
||||
"resolved": false,
|
||||
"integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=",
|
||||
"dev": true,
|
||||
"optional": true
|
||||
},
|
||||
"aproba": {
|
||||
"version": "1.2.0",
|
||||
"resolved": "",
|
||||
"resolved": false,
|
||||
"integrity": "sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw==",
|
||||
"dev": true,
|
||||
"optional": true
|
||||
},
|
||||
"are-we-there-yet": {
|
||||
"version": "1.1.5",
|
||||
"resolved": "",
|
||||
"resolved": false,
|
||||
"integrity": "sha512-5hYdAkZlcG8tOLujVDTgCT+uPX0VnpAH28gWsLfzpXYm7wP6mp5Q/gYyR7YQ0cKVJcXJnl3j2kpBan13PtQf6w==",
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
@ -25003,14 +25083,14 @@
|
||||
},
|
||||
"balanced-match": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "",
|
||||
"resolved": false,
|
||||
"integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=",
|
||||
"dev": true,
|
||||
"optional": true
|
||||
},
|
||||
"brace-expansion": {
|
||||
"version": "1.1.11",
|
||||
"resolved": "",
|
||||
"resolved": false,
|
||||
"integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
@ -25021,35 +25101,35 @@
|
||||
},
|
||||
"code-point-at": {
|
||||
"version": "1.1.0",
|
||||
"resolved": "",
|
||||
"resolved": false,
|
||||
"integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=",
|
||||
"dev": true,
|
||||
"optional": true
|
||||
},
|
||||
"concat-map": {
|
||||
"version": "0.0.1",
|
||||
"resolved": "",
|
||||
"resolved": false,
|
||||
"integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=",
|
||||
"dev": true,
|
||||
"optional": true
|
||||
},
|
||||
"console-control-strings": {
|
||||
"version": "1.1.0",
|
||||
"resolved": "",
|
||||
"resolved": false,
|
||||
"integrity": "sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4=",
|
||||
"dev": true,
|
||||
"optional": true
|
||||
},
|
||||
"core-util-is": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "",
|
||||
"resolved": false,
|
||||
"integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=",
|
||||
"dev": true,
|
||||
"optional": true
|
||||
},
|
||||
"debug": {
|
||||
"version": "4.1.1",
|
||||
"resolved": "",
|
||||
"resolved": false,
|
||||
"integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==",
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
@ -25059,35 +25139,35 @@
|
||||
},
|
||||
"deep-extend": {
|
||||
"version": "0.6.0",
|
||||
"resolved": "",
|
||||
"resolved": false,
|
||||
"integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==",
|
||||
"dev": true,
|
||||
"optional": true
|
||||
},
|
||||
"delegates": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "",
|
||||
"resolved": false,
|
||||
"integrity": "sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o=",
|
||||
"dev": true,
|
||||
"optional": true
|
||||
},
|
||||
"detect-libc": {
|
||||
"version": "1.0.3",
|
||||
"resolved": "",
|
||||
"resolved": false,
|
||||
"integrity": "sha1-+hN8S9aY7fVc1c0CrFWfkaTEups=",
|
||||
"dev": true,
|
||||
"optional": true
|
||||
},
|
||||
"fs.realpath": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "",
|
||||
"resolved": false,
|
||||
"integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=",
|
||||
"dev": true,
|
||||
"optional": true
|
||||
},
|
||||
"gauge": {
|
||||
"version": "2.7.4",
|
||||
"resolved": "",
|
||||
"resolved": false,
|
||||
"integrity": "sha1-LANAXHU4w51+s3sxcCLjJfsBi/c=",
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
@ -25104,7 +25184,7 @@
|
||||
},
|
||||
"glob": {
|
||||
"version": "7.1.3",
|
||||
"resolved": "",
|
||||
"resolved": false,
|
||||
"integrity": "sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==",
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
@ -25119,14 +25199,14 @@
|
||||
},
|
||||
"has-unicode": {
|
||||
"version": "2.0.1",
|
||||
"resolved": "",
|
||||
"resolved": false,
|
||||
"integrity": "sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk=",
|
||||
"dev": true,
|
||||
"optional": true
|
||||
},
|
||||
"iconv-lite": {
|
||||
"version": "0.4.24",
|
||||
"resolved": "",
|
||||
"resolved": false,
|
||||
"integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==",
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
@ -25136,7 +25216,7 @@
|
||||
},
|
||||
"ignore-walk": {
|
||||
"version": "3.0.1",
|
||||
"resolved": "",
|
||||
"resolved": false,
|
||||
"integrity": "sha512-DTVlMx3IYPe0/JJcYP7Gxg7ttZZu3IInhuEhbchuqneY9wWe5Ojy2mXLBaQFUQmo0AW2r3qG7m1mg86js+gnlQ==",
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
@ -25146,7 +25226,7 @@
|
||||
},
|
||||
"inflight": {
|
||||
"version": "1.0.6",
|
||||
"resolved": "",
|
||||
"resolved": false,
|
||||
"integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=",
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
@ -25157,21 +25237,21 @@
|
||||
},
|
||||
"inherits": {
|
||||
"version": "2.0.3",
|
||||
"resolved": "",
|
||||
"resolved": false,
|
||||
"integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=",
|
||||
"dev": true,
|
||||
"optional": true
|
||||
},
|
||||
"ini": {
|
||||
"version": "1.3.5",
|
||||
"resolved": "",
|
||||
"resolved": false,
|
||||
"integrity": "sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==",
|
||||
"dev": true,
|
||||
"optional": true
|
||||
},
|
||||
"is-fullwidth-code-point": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "",
|
||||
"resolved": false,
|
||||
"integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=",
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
@ -25181,14 +25261,14 @@
|
||||
},
|
||||
"isarray": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "",
|
||||
"resolved": false,
|
||||
"integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=",
|
||||
"dev": true,
|
||||
"optional": true
|
||||
},
|
||||
"minimatch": {
|
||||
"version": "3.0.4",
|
||||
"resolved": "",
|
||||
"resolved": false,
|
||||
"integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==",
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
@ -25205,14 +25285,14 @@
|
||||
},
|
||||
"ms": {
|
||||
"version": "2.1.1",
|
||||
"resolved": "",
|
||||
"resolved": false,
|
||||
"integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==",
|
||||
"dev": true,
|
||||
"optional": true
|
||||
},
|
||||
"needle": {
|
||||
"version": "2.3.0",
|
||||
"resolved": "",
|
||||
"resolved": false,
|
||||
"integrity": "sha512-QBZu7aAFR0522EyaXZM0FZ9GLpq6lvQ3uq8gteiDUp7wKdy0lSd2hPlgFwVuW1CBkfEs9PfDQsQzZghLs/psdg==",
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
@ -25224,7 +25304,7 @@
|
||||
},
|
||||
"node-pre-gyp": {
|
||||
"version": "0.12.0",
|
||||
"resolved": "",
|
||||
"resolved": false,
|
||||
"integrity": "sha512-4KghwV8vH5k+g2ylT+sLTjy5wmUOb9vPhnM8NHvRf9dHmnW/CndrFXy2aRPaPST6dugXSdHXfeaHQm77PIz/1A==",
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
@ -25243,7 +25323,7 @@
|
||||
},
|
||||
"nopt": {
|
||||
"version": "4.0.1",
|
||||
"resolved": "",
|
||||
"resolved": false,
|
||||
"integrity": "sha1-0NRoWv1UFRk8jHUFYC0NF81kR00=",
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
@ -25254,14 +25334,14 @@
|
||||
},
|
||||
"npm-bundled": {
|
||||
"version": "1.0.6",
|
||||
"resolved": "",
|
||||
"resolved": false,
|
||||
"integrity": "sha512-8/JCaftHwbd//k6y2rEWp6k1wxVfpFzB6t1p825+cUb7Ym2XQfhwIC5KwhrvzZRJu+LtDE585zVaS32+CGtf0g==",
|
||||
"dev": true,
|
||||
"optional": true
|
||||
},
|
||||
"npm-packlist": {
|
||||
"version": "1.4.1",
|
||||
"resolved": "",
|
||||
"resolved": false,
|
||||
"integrity": "sha512-+TcdO7HJJ8peiiYhvPxsEDhF3PJFGUGRcFsGve3vxvxdcpO2Z4Z7rkosRM0kWj6LfbK/P0gu3dzk5RU1ffvFcw==",
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
@ -25272,7 +25352,7 @@
|
||||
},
|
||||
"npmlog": {
|
||||
"version": "4.1.2",
|
||||
"resolved": "",
|
||||
"resolved": false,
|
||||
"integrity": "sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg==",
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
@ -25285,21 +25365,21 @@
|
||||
},
|
||||
"number-is-nan": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "",
|
||||
"resolved": false,
|
||||
"integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=",
|
||||
"dev": true,
|
||||
"optional": true
|
||||
},
|
||||
"object-assign": {
|
||||
"version": "4.1.1",
|
||||
"resolved": "",
|
||||
"resolved": false,
|
||||
"integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=",
|
||||
"dev": true,
|
||||
"optional": true
|
||||
},
|
||||
"once": {
|
||||
"version": "1.4.0",
|
||||
"resolved": "",
|
||||
"resolved": false,
|
||||
"integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=",
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
@ -25309,21 +25389,21 @@
|
||||
},
|
||||
"os-homedir": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "",
|
||||
"resolved": false,
|
||||
"integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=",
|
||||
"dev": true,
|
||||
"optional": true
|
||||
},
|
||||
"os-tmpdir": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "",
|
||||
"resolved": false,
|
||||
"integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=",
|
||||
"dev": true,
|
||||
"optional": true
|
||||
},
|
||||
"osenv": {
|
||||
"version": "0.1.5",
|
||||
"resolved": "",
|
||||
"resolved": false,
|
||||
"integrity": "sha512-0CWcCECdMVc2Rw3U5w9ZjqX6ga6ubk1xDVKxtBQPK7wis/0F2r9T6k4ydGYhecl7YUBxBVxhL5oisPsNxAPe2g==",
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
@ -25334,21 +25414,21 @@
|
||||
},
|
||||
"path-is-absolute": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "",
|
||||
"resolved": false,
|
||||
"integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=",
|
||||
"dev": true,
|
||||
"optional": true
|
||||
},
|
||||
"process-nextick-args": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "",
|
||||
"resolved": false,
|
||||
"integrity": "sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw==",
|
||||
"dev": true,
|
||||
"optional": true
|
||||
},
|
||||
"rc": {
|
||||
"version": "1.2.8",
|
||||
"resolved": "",
|
||||
"resolved": false,
|
||||
"integrity": "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==",
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
@ -25361,7 +25441,7 @@
|
||||
},
|
||||
"readable-stream": {
|
||||
"version": "2.3.6",
|
||||
"resolved": "",
|
||||
"resolved": false,
|
||||
"integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==",
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
@ -25377,7 +25457,7 @@
|
||||
},
|
||||
"rimraf": {
|
||||
"version": "2.6.3",
|
||||
"resolved": "",
|
||||
"resolved": false,
|
||||
"integrity": "sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA==",
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
@ -25387,49 +25467,49 @@
|
||||
},
|
||||
"safe-buffer": {
|
||||
"version": "5.1.2",
|
||||
"resolved": "",
|
||||
"resolved": false,
|
||||
"integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==",
|
||||
"dev": true,
|
||||
"optional": true
|
||||
},
|
||||
"safer-buffer": {
|
||||
"version": "2.1.2",
|
||||
"resolved": "",
|
||||
"resolved": false,
|
||||
"integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==",
|
||||
"dev": true,
|
||||
"optional": true
|
||||
},
|
||||
"sax": {
|
||||
"version": "1.2.4",
|
||||
"resolved": "",
|
||||
"resolved": false,
|
||||
"integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==",
|
||||
"dev": true,
|
||||
"optional": true
|
||||
},
|
||||
"semver": {
|
||||
"version": "5.7.0",
|
||||
"resolved": "",
|
||||
"resolved": false,
|
||||
"integrity": "sha512-Ya52jSX2u7QKghxeoFGpLwCtGlt7j0oY9DYb5apt9nPlJ42ID+ulTXESnt/qAQcoSERyZ5sl3LDIOw0nAn/5DA==",
|
||||
"dev": true,
|
||||
"optional": true
|
||||
},
|
||||
"set-blocking": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "",
|
||||
"resolved": false,
|
||||
"integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=",
|
||||
"dev": true,
|
||||
"optional": true
|
||||
},
|
||||
"signal-exit": {
|
||||
"version": "3.0.2",
|
||||
"resolved": "",
|
||||
"resolved": false,
|
||||
"integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=",
|
||||
"dev": true,
|
||||
"optional": true
|
||||
},
|
||||
"string-width": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "",
|
||||
"resolved": false,
|
||||
"integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=",
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
@ -25441,7 +25521,7 @@
|
||||
},
|
||||
"string_decoder": {
|
||||
"version": "1.1.1",
|
||||
"resolved": "",
|
||||
"resolved": false,
|
||||
"integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==",
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
@ -25451,7 +25531,7 @@
|
||||
},
|
||||
"strip-ansi": {
|
||||
"version": "3.0.1",
|
||||
"resolved": "",
|
||||
"resolved": false,
|
||||
"integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=",
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
@ -25461,21 +25541,21 @@
|
||||
},
|
||||
"strip-json-comments": {
|
||||
"version": "2.0.1",
|
||||
"resolved": "",
|
||||
"resolved": false,
|
||||
"integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=",
|
||||
"dev": true,
|
||||
"optional": true
|
||||
},
|
||||
"util-deprecate": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "",
|
||||
"resolved": false,
|
||||
"integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=",
|
||||
"dev": true,
|
||||
"optional": true
|
||||
},
|
||||
"wide-align": {
|
||||
"version": "1.1.3",
|
||||
"resolved": "",
|
||||
"resolved": false,
|
||||
"integrity": "sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA==",
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
@ -25485,7 +25565,7 @@
|
||||
},
|
||||
"wrappy": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "",
|
||||
"resolved": false,
|
||||
"integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=",
|
||||
"dev": true,
|
||||
"optional": true
|
||||
|
@ -66,7 +66,7 @@
|
||||
"@data-ui/sparkline": "^0.0.84",
|
||||
"@emotion/core": "^10.0.35",
|
||||
"@superset-ui/chart-controls": "^0.15.13",
|
||||
"@superset-ui/core": "^0.15.13",
|
||||
"@superset-ui/core": "^0.15.17",
|
||||
"@superset-ui/legacy-plugin-chart-calendar": "^0.15.17",
|
||||
"@superset-ui/legacy-plugin-chart-chord": "^0.15.17",
|
||||
"@superset-ui/legacy-plugin-chart-country-map": "^0.15.17",
|
||||
|
@ -27,6 +27,8 @@ import { Switch } from 'src/common/components/Switch';
|
||||
import ListView from 'src/components/ListView';
|
||||
import SubMenu from 'src/components/Menu/SubMenu';
|
||||
import AlertList from 'src/views/CRUD/alert/AlertList';
|
||||
import IndeterminateCheckbox from 'src/components/IndeterminateCheckbox';
|
||||
import { act } from 'react-dom/test-utils';
|
||||
|
||||
// store needed for withToasts(AlertList)
|
||||
const mockStore = configureStore([thunk]);
|
||||
@ -73,11 +75,13 @@ fetchMock.get(alertsEndpoint, {
|
||||
count: 3,
|
||||
});
|
||||
fetchMock.get(alertsInfoEndpoint, {
|
||||
permissions: ['can_delete', 'can_edit'],
|
||||
permissions: ['can_write'],
|
||||
});
|
||||
fetchMock.get(alertsCreatedByEndpoint, { result: [] });
|
||||
fetchMock.put(alertEndpoint, { ...mockalerts[0], active: false });
|
||||
fetchMock.put(alertsEndpoint, { ...mockalerts[0], active: false });
|
||||
fetchMock.delete(alertEndpoint, {});
|
||||
fetchMock.delete(alertsEndpoint, {});
|
||||
|
||||
describe('AlertList', () => {
|
||||
const wrapper = mount(
|
||||
@ -105,4 +109,42 @@ describe('AlertList', () => {
|
||||
it('renders switches', async () => {
|
||||
expect(wrapper.find(Switch)).toHaveLength(3);
|
||||
});
|
||||
|
||||
it('deletes', async () => {
|
||||
act(() => {
|
||||
wrapper.find('[data-test="delete-action"]').first().props().onClick();
|
||||
});
|
||||
await waitForComponentToPaint(wrapper);
|
||||
|
||||
act(() => {
|
||||
wrapper
|
||||
.find('#delete')
|
||||
.first()
|
||||
.props()
|
||||
.onChange({ target: { value: 'DELETE' } });
|
||||
});
|
||||
await waitForComponentToPaint(wrapper);
|
||||
act(() => {
|
||||
wrapper
|
||||
.find('[data-test="modal-confirm-button"]')
|
||||
.last()
|
||||
.props()
|
||||
.onClick();
|
||||
});
|
||||
|
||||
await waitForComponentToPaint(wrapper);
|
||||
|
||||
expect(fetchMock.calls(/report\/0/, 'DELETE')).toHaveLength(1);
|
||||
});
|
||||
|
||||
it('shows/hides bulk actions when bulk actions is clicked', async () => {
|
||||
const button = wrapper.find('[data-test="bulk-select-toggle"]').first();
|
||||
act(() => {
|
||||
button.props().onClick();
|
||||
});
|
||||
await waitForComponentToPaint(wrapper);
|
||||
expect(wrapper.find(IndeterminateCheckbox)).toHaveLength(
|
||||
mockalerts.length + 1, // 1 for each row and 1 for select all
|
||||
);
|
||||
});
|
||||
});
|
||||
|
@ -19,19 +19,24 @@
|
||||
|
||||
import React, { useState, useMemo, useEffect } from 'react';
|
||||
import { useHistory } from 'react-router-dom';
|
||||
import { t } from '@superset-ui/core';
|
||||
import { t, SupersetClient, makeApi } from '@superset-ui/core';
|
||||
import ActionsBar, { ActionProps } from 'src/components/ListView/ActionsBar';
|
||||
import Button from 'src/components/Button';
|
||||
import FacePile from 'src/components/FacePile';
|
||||
import { IconName } from 'src/components/Icon';
|
||||
import { Tooltip } from 'src/common/components/Tooltip';
|
||||
import ListView, { FilterOperators, Filters } from 'src/components/ListView';
|
||||
import ListView, {
|
||||
FilterOperators,
|
||||
Filters,
|
||||
ListViewProps,
|
||||
} from 'src/components/ListView';
|
||||
import SubMenu, { SubMenuProps } from 'src/components/Menu/SubMenu';
|
||||
import { Switch } from 'src/common/components/Switch';
|
||||
import withToasts from 'src/messageToasts/enhancers/withToasts';
|
||||
import AlertStatusIcon from 'src/views/CRUD/alert/components/AlertStatusIcon';
|
||||
import RecipientIcon from 'src/views/CRUD/alert/components/RecipientIcon';
|
||||
|
||||
import ConfirmStatusChange from 'src/components/ConfirmStatusChange';
|
||||
import DeleteModal from 'src/components/DeleteModal';
|
||||
import {
|
||||
useListViewResource,
|
||||
useSingleViewResource,
|
||||
@ -50,13 +55,20 @@ interface AlertListProps {
|
||||
userId: string | number;
|
||||
};
|
||||
}
|
||||
const deleteAlerts = makeApi<number[], { message: string }>({
|
||||
requestType: 'rison',
|
||||
method: 'DELETE',
|
||||
endpoint: '/api/v1/report/',
|
||||
});
|
||||
|
||||
function AlertList({
|
||||
addDangerToast,
|
||||
isReportEnabled = false,
|
||||
user,
|
||||
addSuccessToast,
|
||||
}: AlertListProps) {
|
||||
const title = isReportEnabled ? t('report') : t('alert');
|
||||
const titlePlural = isReportEnabled ? t('reports') : t('alerts');
|
||||
const pathName = isReportEnabled ? 'Reports' : 'Alerts';
|
||||
const initalFilters = useMemo(
|
||||
() => [
|
||||
@ -69,10 +81,16 @@ function AlertList({
|
||||
[isReportEnabled],
|
||||
);
|
||||
const {
|
||||
state: { loading, resourceCount: alertsCount, resourceCollection: alerts },
|
||||
state: {
|
||||
loading,
|
||||
resourceCount: alertsCount,
|
||||
resourceCollection: alerts,
|
||||
bulkSelectEnabled,
|
||||
},
|
||||
hasPerm,
|
||||
fetchData,
|
||||
refreshData,
|
||||
toggleBulkSelect,
|
||||
} = useListViewResource<AlertObject>(
|
||||
'report',
|
||||
t('reports'),
|
||||
@ -82,14 +100,20 @@ function AlertList({
|
||||
initalFilters,
|
||||
);
|
||||
|
||||
const { updateResource } = useSingleViewResource<AlertObject>(
|
||||
const { updateResource } = useSingleViewResource<Partial<AlertObject>>(
|
||||
'report',
|
||||
t('reports'),
|
||||
addDangerToast,
|
||||
);
|
||||
|
||||
const [alertModalOpen, setAlertModalOpen] = useState<boolean>(false);
|
||||
const [currentAlert, setCurrentAlert] = useState<AlertObject | null>(null);
|
||||
const [currentAlert, setCurrentAlert] = useState<Partial<AlertObject> | null>(
|
||||
null,
|
||||
);
|
||||
const [
|
||||
currentAlertDeleting,
|
||||
setCurrentAlertDeleting,
|
||||
] = useState<AlertObject | null>(null);
|
||||
|
||||
// Actions
|
||||
function handleAlertEdit(alert: AlertObject | null) {
|
||||
@ -101,6 +125,41 @@ function AlertList({
|
||||
const canDelete = hasPerm('can_write');
|
||||
const canCreate = hasPerm('can_write');
|
||||
|
||||
const handleAlertDelete = ({ id, name }: AlertObject) => {
|
||||
SupersetClient.delete({
|
||||
endpoint: `/api/v1/report/${id}`,
|
||||
}).then(
|
||||
() => {
|
||||
refreshData();
|
||||
setCurrentAlertDeleting(null);
|
||||
addSuccessToast(t('Deleted: %s', name));
|
||||
},
|
||||
createErrorHandler(errMsg =>
|
||||
addDangerToast(t('There was an issue deleting %s: %s', name, errMsg)),
|
||||
),
|
||||
);
|
||||
};
|
||||
|
||||
const handleBulkAlertDelete = async (alertsToDelete: AlertObject[]) => {
|
||||
try {
|
||||
const { message } = await deleteAlerts(
|
||||
alertsToDelete.map(({ id }) => id),
|
||||
);
|
||||
refreshData();
|
||||
addSuccessToast(message);
|
||||
} catch (e) {
|
||||
createErrorHandler(errMsg =>
|
||||
addDangerToast(
|
||||
t(
|
||||
'There was an issue deleting the selected %s: %s',
|
||||
titlePlural,
|
||||
errMsg,
|
||||
),
|
||||
),
|
||||
)(e);
|
||||
}
|
||||
};
|
||||
|
||||
const initialSort = [{ id: 'name', desc: true }];
|
||||
|
||||
const toggleActive = (data: AlertObject, checked: boolean) => {
|
||||
@ -156,7 +215,7 @@ function AlertList({
|
||||
},
|
||||
}: any) => (
|
||||
<Tooltip title={crontab_humanized} placement="topLeft">
|
||||
<span>{crontab_humanized}</span>,
|
||||
<span>{crontab_humanized}</span>
|
||||
</Tooltip>
|
||||
),
|
||||
},
|
||||
@ -195,7 +254,7 @@ function AlertList({
|
||||
Cell: ({ row: { original } }: any) => {
|
||||
const history = useHistory();
|
||||
const handleEdit = () => handleAlertEdit(original);
|
||||
const handleDelete = () => {}; // setAlertCurrentlyDeleting(original);
|
||||
const handleDelete = () => setCurrentAlertDeleting(original);
|
||||
const handleGotoExecutionLog = () =>
|
||||
history.push(`/${original.type.toLowerCase()}/${original.id}/log`);
|
||||
|
||||
@ -227,7 +286,7 @@ function AlertList({
|
||||
onClick: handleDelete,
|
||||
}
|
||||
: null,
|
||||
].filter(item => !!item);
|
||||
].filter(item => item !== null);
|
||||
|
||||
return <ActionsBar actions={actions as ActionProps[]} />;
|
||||
},
|
||||
@ -256,6 +315,14 @@ function AlertList({
|
||||
},
|
||||
});
|
||||
}
|
||||
if (canDelete) {
|
||||
subMenuButtons.push({
|
||||
name: t('Bulk Select'),
|
||||
onClick: toggleBulkSelect,
|
||||
buttonStyle: 'secondary',
|
||||
'data-test': 'bulk-select-toggle',
|
||||
});
|
||||
}
|
||||
|
||||
const EmptyStateButton = (
|
||||
<Button buttonStyle="primary" onClick={() => handleAlertEdit(null)}>
|
||||
@ -264,7 +331,7 @@ function AlertList({
|
||||
);
|
||||
|
||||
const emptyState = {
|
||||
message: t('No %s yet', title),
|
||||
message: t('No %s yet', titlePlural),
|
||||
slot: canCreate ? EmptyStateButton : null,
|
||||
};
|
||||
|
||||
@ -342,18 +409,60 @@ function AlertList({
|
||||
show={alertModalOpen}
|
||||
isReport={isReportEnabled}
|
||||
/>
|
||||
<ListView<AlertObject>
|
||||
className="alerts-list-view"
|
||||
columns={columns}
|
||||
count={alertsCount}
|
||||
data={alerts}
|
||||
emptyState={emptyState}
|
||||
fetchData={fetchData}
|
||||
filters={filters}
|
||||
initialSort={initialSort}
|
||||
loading={loading}
|
||||
pageSize={PAGE_SIZE}
|
||||
/>
|
||||
{currentAlertDeleting && (
|
||||
<DeleteModal
|
||||
description={t(
|
||||
'This action will permanently delete %s.',
|
||||
currentAlertDeleting.name,
|
||||
)}
|
||||
onConfirm={() => {
|
||||
if (currentAlertDeleting) {
|
||||
handleAlertDelete(currentAlertDeleting);
|
||||
}
|
||||
}}
|
||||
onHide={() => setCurrentAlertDeleting(null)}
|
||||
open
|
||||
title={t('Delete %s?', title)}
|
||||
/>
|
||||
)}
|
||||
<ConfirmStatusChange
|
||||
title={t('Please confirm')}
|
||||
description={t(
|
||||
'Are you sure you want to delete the selected %s?',
|
||||
titlePlural,
|
||||
)}
|
||||
onConfirm={handleBulkAlertDelete}
|
||||
>
|
||||
{confirmDelete => {
|
||||
const bulkActions: ListViewProps['bulkActions'] = canDelete
|
||||
? [
|
||||
{
|
||||
key: 'delete',
|
||||
name: t('Delete'),
|
||||
onSelect: confirmDelete,
|
||||
type: 'danger',
|
||||
},
|
||||
]
|
||||
: [];
|
||||
return (
|
||||
<ListView<AlertObject>
|
||||
className="alerts-list-view"
|
||||
columns={columns}
|
||||
count={alertsCount}
|
||||
data={alerts}
|
||||
emptyState={emptyState}
|
||||
fetchData={fetchData}
|
||||
filters={filters}
|
||||
initialSort={initialSort}
|
||||
loading={loading}
|
||||
bulkActions={bulkActions}
|
||||
bulkSelectEnabled={bulkSelectEnabled}
|
||||
disableBulkSelect={toggleBulkSelect}
|
||||
pageSize={PAGE_SIZE}
|
||||
/>
|
||||
);
|
||||
}}
|
||||
</ConfirmStatusChange>
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
@ -450,7 +450,9 @@ const AlertReportModal: FunctionComponent<AlertReportModalProps> = ({
|
||||
isReport = false,
|
||||
}) => {
|
||||
const [disableSave, setDisableSave] = useState<boolean>(true);
|
||||
const [currentAlert, setCurrentAlert] = useState<AlertObject | null>();
|
||||
const [currentAlert, setCurrentAlert] = useState<Partial<
|
||||
AlertObject
|
||||
> | null>();
|
||||
const [isHidden, setIsHidden] = useState<boolean>(true);
|
||||
const [contentType, setContentType] = useState<string>('dashboard');
|
||||
// Dropdown options
|
||||
@ -749,9 +751,9 @@ const AlertReportModal: FunctionComponent<AlertReportModalProps> = ({
|
||||
const updateAlertState = (name: string, value: any) => {
|
||||
const data = {
|
||||
...currentAlert,
|
||||
[name]: value,
|
||||
};
|
||||
|
||||
data[name] = value;
|
||||
setCurrentAlert(data);
|
||||
};
|
||||
|
||||
|
@ -52,7 +52,7 @@ export type AlertObject = {
|
||||
database?: MetaObject;
|
||||
description?: string;
|
||||
grace_period?: number;
|
||||
id?: number;
|
||||
id: number;
|
||||
last_eval_dttm?: number;
|
||||
last_state?: 'Success' | 'Working' | 'Error' | 'Not triggered' | 'On Grace';
|
||||
log_retention?: number;
|
||||
|
Loading…
Reference in New Issue
Block a user