mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-10-29 01:32:01 +00:00
feat(ui): support custom properties for glossary, database & databaseSchema page (#13226)
* feat(ui): support custom properties for glossary, database & databaseSchema page * update permission fix version pages * fix tests * fix path for version page * fix paths * fix types * fix codesmells * fix logo for database * fix code smell * fix encoding issue
This commit is contained in:
parent
b872d83c73
commit
6417dff1c4
@ -0,0 +1,8 @@
|
||||
<svg viewBox="0 0 102 102" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<mask id="path-1-outside-1_4457_39493" maskUnits="userSpaceOnUse" x="0" y="0" width="102" height="102" fill="currentColor">
|
||||
<rect fill="white" width="102" height="102"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M61.5448 1.19103C50.6353 2.00909 42.1682 4.47287 38.6861 7.8425C36.8257 9.64276 36.8519 9.52537 36.7394 16.5823L36.6417 22.707L30.8798 22.8373C25.022 22.9696 22.9513 23.1366 18.55 23.8319C9.286 25.2951 3.02174 28.1725 1.45783 31.683L1 32.7108L1.00664 61.8033C1.01367 93.0501 0.965819 91.5416 2.00062 93.1603C2.58345 94.0719 4.43096 95.5437 6.07437 96.4054C11.6503 99.3296 21.4807 100.997 33.165 101C50.2525 101.005 62.5204 97.581 64.8805 92.1487C65.2121 91.3852 65.2477 90.7345 65.2516 85.365L65.2559 79.4258L70.5783 79.298C77.9022 79.122 83.1617 78.5065 88.4988 77.2005C93.4446 75.9902 97.324 74.1953 99.2368 72.2321C101.063 70.3581 100.999 70.8761 100.999 57.9155C100.999 46.9296 100.993 46.7421 100.594 46.2128C100.301 45.8226 100.009 45.6748 99.5343 45.6748C98.4526 45.6748 98.0694 46.3932 98.0694 48.4218C98.0694 50.0417 98.0481 50.1187 97.3742 50.9417C96.5133 51.9931 93.5788 53.5765 90.8748 54.4493C85.17 56.2902 77.5109 57.3118 69.4138 57.3118H65.2514L65.3535 41.5059L67.1114 41.5608C69.5097 41.6357 76.9027 41.2376 80.0024 40.8667C88.0199 39.9069 94.5529 38.032 97.5322 35.8352L98.0694 35.4391V37.9164C98.0694 39.2787 98.154 40.5586 98.2573 40.7605C98.3606 40.9622 98.7032 41.2391 99.0184 41.3756C99.4901 41.5798 99.695 41.568 100.174 41.3091C100.494 41.136 100.811 40.8457 100.878 40.6638C100.944 40.4821 100.999 33.7883 100.999 25.789C100.999 9.03641 101.095 10.0045 99.2532 8.10974C96.8693 5.65678 92.9063 3.96533 86.3352 2.59625C81.2151 1.52952 72.1285 0.68533 71.4891 1.21696C70.6203 1.93927 70.6605 3.31182 71.5643 3.78486C71.8008 3.90878 73.4446 4.10743 75.2171 4.22645C86.8636 5.00817 96.6145 7.99357 97.8702 11.1621C99.1229 14.3235 90.2186 17.853 77.6586 19.1735C74.3509 19.5211 63.4603 19.5156 60.0799 19.1643C50.183 18.1361 42.6698 15.8522 40.3342 13.162C39.4811 12.1792 39.4605 11.4347 40.2606 10.4823C42.8351 7.41744 51.5305 4.97244 62.5214 4.22298C66.2065 3.97166 66.6786 3.78629 66.7801 2.5495C66.8278 1.96805 66.7372 1.74369 66.3143 1.396C65.7323 0.917458 65.3889 0.902758 61.5448 1.19103ZM45.8701 19.5101C49.881 20.8347 53.7477 21.586 59.8846 22.2334C63.6881 22.6346 74.87 22.5717 78.8305 22.127C83.7461 21.5748 87.9704 20.7575 91.3309 19.7086C93.1624 19.1367 96.0578 17.8777 97.0563 17.2189C97.5018 16.9249 97.912 16.6844 97.9678 16.6844C98.0237 16.6844 98.0694 19.9478 98.0694 23.9365V31.1888L97.2789 32.0852C94.9208 34.7591 87.5532 37.0248 78.0492 37.9987C74.4161 38.3709 67.3829 38.6334 66.1637 38.4425L65.2559 38.3V35.3924C65.2559 32.6732 65.2231 32.416 64.75 31.4236C63.45 28.6966 59.3924 26.4689 52.8227 24.8754C49.286 24.0173 43.9333 23.1831 40.5481 22.9622L39.7668 22.9112L39.6592 16.7375L41.5194 17.7125C42.5425 18.2488 44.5004 19.0579 45.8701 19.5101ZM40.7434 26.0967C52.5299 26.9723 62.3163 30.3795 62.3247 33.6103C62.3294 35.3808 58.8367 37.4319 53.2438 38.9435C40.4631 42.3977 21.8731 42.0675 10.469 38.1843C6.52888 36.8425 3.92587 34.9604 3.92587 33.4529C3.92587 33.2138 4.24639 32.6475 4.638 32.1943C8.01154 28.2912 21.2723 25.5138 35.0792 25.8186C36.5831 25.8519 39.132 25.977 40.7434 26.0967ZM6.55915 39.8741C15.4756 44.1802 33.7901 45.588 48.6507 43.1094C54.0684 42.206 57.5611 41.0347 62.1796 38.5734C62.2603 38.5303 62.3261 41.7664 62.3261 45.7644V53.0337L61.5452 53.9191C58.3129 57.5846 46.5871 60.17 33.1967 60.17C19.8301 60.17 8.40648 57.6852 4.85363 54.0049L3.92587 53.0439V38.2974L4.50948 38.7316C4.83039 38.9707 5.75288 39.4847 6.55915 39.8741ZM97.6895 69.4412C96.4092 71.6063 91.0358 73.7639 83.7135 75.0525C79.3247 75.8249 75.6806 76.1297 70.4318 76.1636L65.3535 76.1964L65.2514 60.3742L69.5994 60.3732C80.445 60.3705 90.3689 58.549 96.1875 55.4928L97.9717 54.5557L98.0231 61.6728C98.0719 68.4503 98.0561 68.821 97.6895 69.4412ZM9.89402 60.1276C13.5303 61.3331 17.1983 62.0997 22.4811 62.7583C26.6113 63.2734 39.7422 63.273 43.7708 62.7579C52.084 61.6949 58.2769 59.9785 61.5204 57.8383L62.3261 57.3067V72.0812L61.4448 72.964C58.7701 75.6425 51.4486 77.8111 41.8177 78.7772C37.9287 79.1673 27.4674 79.1102 23.6038 78.6778C15.217 77.7388 9.08033 76.0507 5.84429 73.7919C3.84227 72.3944 3.92743 72.8058 3.92665 64.5394L3.92587 57.3741L5.93882 58.4288C7.04608 59.009 8.82583 59.7733 9.89402 60.1276ZM5.1261 76.9283C13.6139 82.1595 36.0333 83.8085 51.7789 80.3594C54.6216 79.7369 58.4381 78.4009 60.4825 77.313L62.3261 76.3318V91.0132L61.4536 91.8994C58.834 94.5606 51.6701 96.6716 41.9153 97.6567C37.6673 98.0856 28.713 98.0844 24.3367 97.654C14.5774 96.6945 7.12753 94.4335 4.71632 91.6994L3.92587 90.8029V83.5506C3.92587 79.562 3.96591 76.2985 4.01494 76.2985C4.06396 76.2985 4.56398 76.5819 5.1261 76.9283Z"/>
|
||||
</mask>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M61.5448 1.19103C50.6353 2.00909 42.1682 4.47287 38.6861 7.8425C36.8257 9.64276 36.8519 9.52537 36.7394 16.5823L36.6417 22.707L30.8798 22.8373C25.022 22.9696 22.9513 23.1366 18.55 23.8319C9.286 25.2951 3.02174 28.1725 1.45783 31.683L1 32.7108L1.00664 61.8033C1.01367 93.0501 0.965819 91.5416 2.00062 93.1603C2.58345 94.0719 4.43096 95.5437 6.07437 96.4054C11.6503 99.3296 21.4807 100.997 33.165 101C50.2525 101.005 62.5204 97.581 64.8805 92.1487C65.2121 91.3852 65.2477 90.7345 65.2516 85.365L65.2559 79.4258L70.5783 79.298C77.9022 79.122 83.1617 78.5065 88.4988 77.2005C93.4446 75.9902 97.324 74.1953 99.2368 72.2321C101.063 70.3581 100.999 70.8761 100.999 57.9155C100.999 46.9296 100.993 46.7421 100.594 46.2128C100.301 45.8226 100.009 45.6748 99.5343 45.6748C98.4526 45.6748 98.0694 46.3932 98.0694 48.4218C98.0694 50.0417 98.0481 50.1187 97.3742 50.9417C96.5133 51.9931 93.5788 53.5765 90.8748 54.4493C85.17 56.2902 77.5109 57.3118 69.4138 57.3118H65.2514L65.3535 41.5059L67.1114 41.5608C69.5097 41.6357 76.9027 41.2376 80.0024 40.8667C88.0199 39.9069 94.5529 38.032 97.5322 35.8352L98.0694 35.4391V37.9164C98.0694 39.2787 98.154 40.5586 98.2573 40.7605C98.3606 40.9622 98.7032 41.2391 99.0184 41.3756C99.4901 41.5798 99.695 41.568 100.174 41.3091C100.494 41.136 100.811 40.8457 100.878 40.6638C100.944 40.4821 100.999 33.7883 100.999 25.789C100.999 9.03641 101.095 10.0045 99.2532 8.10974C96.8693 5.65678 92.9063 3.96533 86.3352 2.59625C81.2151 1.52952 72.1285 0.68533 71.4891 1.21696C70.6203 1.93927 70.6605 3.31182 71.5643 3.78486C71.8008 3.90878 73.4446 4.10743 75.2171 4.22645C86.8636 5.00817 96.6145 7.99357 97.8702 11.1621C99.1229 14.3235 90.2186 17.853 77.6586 19.1735C74.3509 19.5211 63.4603 19.5156 60.0799 19.1643C50.183 18.1361 42.6698 15.8522 40.3342 13.162C39.4811 12.1792 39.4605 11.4347 40.2606 10.4823C42.8351 7.41744 51.5305 4.97244 62.5214 4.22298C66.2065 3.97166 66.6786 3.78629 66.7801 2.5495C66.8278 1.96805 66.7372 1.74369 66.3143 1.396C65.7323 0.917458 65.3889 0.902758 61.5448 1.19103ZM45.8701 19.5101C49.881 20.8347 53.7477 21.586 59.8846 22.2334C63.6881 22.6346 74.87 22.5717 78.8305 22.127C83.7461 21.5748 87.9704 20.7575 91.3309 19.7086C93.1624 19.1367 96.0578 17.8777 97.0563 17.2189C97.5018 16.9249 97.912 16.6844 97.9678 16.6844C98.0237 16.6844 98.0694 19.9478 98.0694 23.9365V31.1888L97.2789 32.0852C94.9208 34.7591 87.5532 37.0248 78.0492 37.9987C74.4161 38.3709 67.3829 38.6334 66.1637 38.4425L65.2559 38.3V35.3924C65.2559 32.6732 65.2231 32.416 64.75 31.4236C63.45 28.6966 59.3924 26.4689 52.8227 24.8754C49.286 24.0173 43.9333 23.1831 40.5481 22.9622L39.7668 22.9112L39.6592 16.7375L41.5194 17.7125C42.5425 18.2488 44.5004 19.0579 45.8701 19.5101ZM40.7434 26.0967C52.5299 26.9723 62.3163 30.3795 62.3247 33.6103C62.3294 35.3808 58.8367 37.4319 53.2438 38.9435C40.4631 42.3977 21.8731 42.0675 10.469 38.1843C6.52888 36.8425 3.92587 34.9604 3.92587 33.4529C3.92587 33.2138 4.24639 32.6475 4.638 32.1943C8.01154 28.2912 21.2723 25.5138 35.0792 25.8186C36.5831 25.8519 39.132 25.977 40.7434 26.0967ZM6.55915 39.8741C15.4756 44.1802 33.7901 45.588 48.6507 43.1094C54.0684 42.206 57.5611 41.0347 62.1796 38.5734C62.2603 38.5303 62.3261 41.7664 62.3261 45.7644V53.0337L61.5452 53.9191C58.3129 57.5846 46.5871 60.17 33.1967 60.17C19.8301 60.17 8.40648 57.6852 4.85363 54.0049L3.92587 53.0439V38.2974L4.50948 38.7316C4.83039 38.9707 5.75288 39.4847 6.55915 39.8741ZM97.6895 69.4412C96.4092 71.6063 91.0358 73.7639 83.7135 75.0525C79.3247 75.8249 75.6806 76.1297 70.4318 76.1636L65.3535 76.1964L65.2514 60.3742L69.5994 60.3732C80.445 60.3705 90.3689 58.549 96.1875 55.4928L97.9717 54.5557L98.0231 61.6728C98.0719 68.4503 98.0561 68.821 97.6895 69.4412ZM9.89402 60.1276C13.5303 61.3331 17.1983 62.0997 22.4811 62.7583C26.6113 63.2734 39.7422 63.273 43.7708 62.7579C52.084 61.6949 58.2769 59.9785 61.5204 57.8383L62.3261 57.3067V72.0812L61.4448 72.964C58.7701 75.6425 51.4486 77.8111 41.8177 78.7772C37.9287 79.1673 27.4674 79.1102 23.6038 78.6778C15.217 77.7388 9.08033 76.0507 5.84429 73.7919C3.84227 72.3944 3.92743 72.8058 3.92665 64.5394L3.92587 57.3741L5.93882 58.4288C7.04608 59.009 8.82583 59.7733 9.89402 60.1276ZM5.1261 76.9283C13.6139 82.1595 36.0333 83.8085 51.7789 80.3594C54.6216 79.7369 58.4381 78.4009 60.4825 77.313L62.3261 76.3318V91.0132L61.4536 91.8994C58.834 94.5606 51.6701 96.6716 41.9153 97.6567C37.6673 98.0856 28.713 98.0844 24.3367 97.654C14.5774 96.6945 7.12753 94.4335 4.71632 91.6994L3.92587 90.8029V83.5506C3.92587 79.562 3.96591 76.2985 4.01494 76.2985C4.06396 76.2985 4.56398 76.5819 5.1261 76.9283Z" fill="currentColor"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M61.5448 1.19103C50.6353 2.00909 42.1682 4.47287 38.6861 7.8425C36.8257 9.64276 36.8519 9.52537 36.7394 16.5823L36.6417 22.707L30.8798 22.8373C25.022 22.9696 22.9513 23.1366 18.55 23.8319C9.286 25.2951 3.02174 28.1725 1.45783 31.683L1 32.7108L1.00664 61.8033C1.01367 93.0501 0.965819 91.5416 2.00062 93.1603C2.58345 94.0719 4.43096 95.5437 6.07437 96.4054C11.6503 99.3296 21.4807 100.997 33.165 101C50.2525 101.005 62.5204 97.581 64.8805 92.1487C65.2121 91.3852 65.2477 90.7345 65.2516 85.365L65.2559 79.4258L70.5783 79.298C77.9022 79.122 83.1617 78.5065 88.4988 77.2005C93.4446 75.9902 97.324 74.1953 99.2368 72.2321C101.063 70.3581 100.999 70.8761 100.999 57.9155C100.999 46.9296 100.993 46.7421 100.594 46.2128C100.301 45.8226 100.009 45.6748 99.5343 45.6748C98.4526 45.6748 98.0694 46.3932 98.0694 48.4218C98.0694 50.0417 98.0481 50.1187 97.3742 50.9417C96.5133 51.9931 93.5788 53.5765 90.8748 54.4493C85.17 56.2902 77.5109 57.3118 69.4138 57.3118H65.2514L65.3535 41.5059L67.1114 41.5608C69.5097 41.6357 76.9027 41.2376 80.0024 40.8667C88.0199 39.9069 94.5529 38.032 97.5322 35.8352L98.0694 35.4391V37.9164C98.0694 39.2787 98.154 40.5586 98.2573 40.7605C98.3606 40.9622 98.7032 41.2391 99.0184 41.3756C99.4901 41.5798 99.695 41.568 100.174 41.3091C100.494 41.136 100.811 40.8457 100.878 40.6638C100.944 40.4821 100.999 33.7883 100.999 25.789C100.999 9.03641 101.095 10.0045 99.2532 8.10974C96.8693 5.65678 92.9063 3.96533 86.3352 2.59625C81.2151 1.52952 72.1285 0.68533 71.4891 1.21696C70.6203 1.93927 70.6605 3.31182 71.5643 3.78486C71.8008 3.90878 73.4446 4.10743 75.2171 4.22645C86.8636 5.00817 96.6145 7.99357 97.8702 11.1621C99.1229 14.3235 90.2186 17.853 77.6586 19.1735C74.3509 19.5211 63.4603 19.5156 60.0799 19.1643C50.183 18.1361 42.6698 15.8522 40.3342 13.162C39.4811 12.1792 39.4605 11.4347 40.2606 10.4823C42.8351 7.41744 51.5305 4.97244 62.5214 4.22298C66.2065 3.97166 66.6786 3.78629 66.7801 2.5495C66.8278 1.96805 66.7372 1.74369 66.3143 1.396C65.7323 0.917458 65.3889 0.902758 61.5448 1.19103ZM45.8701 19.5101C49.881 20.8347 53.7477 21.586 59.8846 22.2334C63.6881 22.6346 74.87 22.5717 78.8305 22.127C83.7461 21.5748 87.9704 20.7575 91.3309 19.7086C93.1624 19.1367 96.0578 17.8777 97.0563 17.2189C97.5018 16.9249 97.912 16.6844 97.9678 16.6844C98.0237 16.6844 98.0694 19.9478 98.0694 23.9365V31.1888L97.2789 32.0852C94.9208 34.7591 87.5532 37.0248 78.0492 37.9987C74.4161 38.3709 67.3829 38.6334 66.1637 38.4425L65.2559 38.3V35.3924C65.2559 32.6732 65.2231 32.416 64.75 31.4236C63.45 28.6966 59.3924 26.4689 52.8227 24.8754C49.286 24.0173 43.9333 23.1831 40.5481 22.9622L39.7668 22.9112L39.6592 16.7375L41.5194 17.7125C42.5425 18.2488 44.5004 19.0579 45.8701 19.5101ZM40.7434 26.0967C52.5299 26.9723 62.3163 30.3795 62.3247 33.6103C62.3294 35.3808 58.8367 37.4319 53.2438 38.9435C40.4631 42.3977 21.8731 42.0675 10.469 38.1843C6.52888 36.8425 3.92587 34.9604 3.92587 33.4529C3.92587 33.2138 4.24639 32.6475 4.638 32.1943C8.01154 28.2912 21.2723 25.5138 35.0792 25.8186C36.5831 25.8519 39.132 25.977 40.7434 26.0967ZM6.55915 39.8741C15.4756 44.1802 33.7901 45.588 48.6507 43.1094C54.0684 42.206 57.5611 41.0347 62.1796 38.5734C62.2603 38.5303 62.3261 41.7664 62.3261 45.7644V53.0337L61.5452 53.9191C58.3129 57.5846 46.5871 60.17 33.1967 60.17C19.8301 60.17 8.40648 57.6852 4.85363 54.0049L3.92587 53.0439V38.2974L4.50948 38.7316C4.83039 38.9707 5.75288 39.4847 6.55915 39.8741ZM97.6895 69.4412C96.4092 71.6063 91.0358 73.7639 83.7135 75.0525C79.3247 75.8249 75.6806 76.1297 70.4318 76.1636L65.3535 76.1964L65.2514 60.3742L69.5994 60.3732C80.445 60.3705 90.3689 58.549 96.1875 55.4928L97.9717 54.5557L98.0231 61.6728C98.0719 68.4503 98.0561 68.821 97.6895 69.4412ZM9.89402 60.1276C13.5303 61.3331 17.1983 62.0997 22.4811 62.7583C26.6113 63.2734 39.7422 63.273 43.7708 62.7579C52.084 61.6949 58.2769 59.9785 61.5204 57.8383L62.3261 57.3067V72.0812L61.4448 72.964C58.7701 75.6425 51.4486 77.8111 41.8177 78.7772C37.9287 79.1673 27.4674 79.1102 23.6038 78.6778C15.217 77.7388 9.08033 76.0507 5.84429 73.7919C3.84227 72.3944 3.92743 72.8058 3.92665 64.5394L3.92587 57.3741L5.93882 58.4288C7.04608 59.009 8.82583 59.7733 9.89402 60.1276ZM5.1261 76.9283C13.6139 82.1595 36.0333 83.8085 51.7789 80.3594C54.6216 79.7369 58.4381 78.4009 60.4825 77.313L62.3261 76.3318V91.0132L61.4536 91.8994C58.834 94.5606 51.6701 96.6716 41.9153 97.6567C37.6673 98.0856 28.713 98.0844 24.3367 97.654C14.5774 96.6945 7.12753 94.4335 4.71632 91.6994L3.92587 90.8029V83.5506C3.92587 79.562 3.96591 76.2985 4.01494 76.2985C4.06396 76.2985 4.56398 76.5819 5.1261 76.9283Z" stroke="#292929" mask="url(#path-1-outside-1_4457_39493)"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 14 KiB |
@ -108,14 +108,14 @@ const ActivityFeedProvider = ({ children, user }: Props) => {
|
||||
setLoading(true);
|
||||
const feedFilterType = filterType ?? FeedFilter.ALL;
|
||||
const userId =
|
||||
entityType === EntityType.USER_NAME
|
||||
entityType === EntityType.USER
|
||||
? user
|
||||
: feedFilterType === FeedFilter.ALL
|
||||
? undefined
|
||||
: currentUser?.id;
|
||||
|
||||
const { data, paging } = await getAllFeeds(
|
||||
entityType !== EntityType.USER_NAME && fqn
|
||||
entityType !== EntityType.USER && fqn
|
||||
? getEntityFeedLink(entityType, encodeURIComponent(fqn))
|
||||
: undefined,
|
||||
after,
|
||||
|
||||
@ -89,7 +89,7 @@ export const ActivityFeedTab = ({
|
||||
} = useActivityFeedProvider();
|
||||
|
||||
const isUserEntity = useMemo(
|
||||
() => entityType === EntityType.USER_NAME,
|
||||
() => entityType === EntityType.USER,
|
||||
[entityType]
|
||||
);
|
||||
|
||||
@ -202,7 +202,7 @@ export const ActivityFeedTab = ({
|
||||
feedFilter:
|
||||
activeTab === 'mentions'
|
||||
? FeedFilter.MENTIONS
|
||||
: EntityType.USER_NAME === entityType
|
||||
: EntityType.USER === entityType
|
||||
? FeedFilter.OWNER
|
||||
: undefined,
|
||||
};
|
||||
|
||||
@ -60,7 +60,8 @@ import TestSuiteIngestion from './TestSuiteIngestion';
|
||||
const AddDataQualityTestV1: React.FC<AddDataQualityTestProps> = ({
|
||||
table,
|
||||
}: AddDataQualityTestProps) => {
|
||||
const { entityTypeFQN, dashboardType } = useParams<Record<string, string>>();
|
||||
const { entityTypeFQN, dashboardType } =
|
||||
useParams<{ entityTypeFQN: string; dashboardType: string }>();
|
||||
const isColumnFqn = dashboardType === ProfilerDashboardType.COLUMN;
|
||||
const isTableFqn = dashboardType === ProfilerDashboardType.TABLE;
|
||||
const history = useHistory();
|
||||
|
||||
@ -52,7 +52,7 @@ const TestSuiteIngestion: React.FC<TestSuiteIngestionProps> = ({
|
||||
testSuite,
|
||||
onCancel,
|
||||
}) => {
|
||||
const { ingestionFQN } = useParams<Record<string, string>>();
|
||||
const { ingestionFQN } = useParams<{ ingestionFQN: string }>();
|
||||
const history = useHistory();
|
||||
const { t } = useTranslation();
|
||||
const [ingestionData, setIngestionData] = useState<
|
||||
|
||||
@ -51,7 +51,8 @@ const TestCaseForm: React.FC<TestCaseFormProps> = ({
|
||||
table,
|
||||
}) => {
|
||||
const history = useHistory();
|
||||
const { entityTypeFQN, dashboardType } = useParams<Record<string, string>>();
|
||||
const { entityTypeFQN, dashboardType } =
|
||||
useParams<{ entityTypeFQN: string; dashboardType: string }>();
|
||||
const decodedEntityFQN = getDecodedFqn(entityTypeFQN);
|
||||
const isColumnFqn = dashboardType === ProfilerDashboardType.COLUMN;
|
||||
const [form] = Form.useForm();
|
||||
|
||||
@ -107,7 +107,7 @@ function ClassificationDetails({
|
||||
}: ClassificationDetailsProps) {
|
||||
const { permissions } = usePermissionProvider();
|
||||
const { t } = useTranslation();
|
||||
const { tagCategoryName } = useParams<Record<string, string>>();
|
||||
const { fqn: tagCategoryName } = useParams<{ fqn: string }>();
|
||||
const history = useHistory();
|
||||
|
||||
const currentVersion = useMemo(
|
||||
|
||||
@ -14,7 +14,6 @@
|
||||
import { Col, Row, Space, Tabs, TabsProps } from 'antd';
|
||||
import classNames from 'classnames';
|
||||
import { CustomPropertyTable } from 'components/common/CustomPropertyTable/CustomPropertyTable';
|
||||
import { CustomPropertyProps } from 'components/common/CustomPropertyTable/CustomPropertyTable.interface';
|
||||
import DescriptionV1 from 'components/common/description/DescriptionV1';
|
||||
import DataAssetsVersionHeader from 'components/DataAssets/DataAssetsVersionHeader/DataAssetsVersionHeader';
|
||||
import EntityVersionTimeLine from 'components/Entity/EntityVersionTimeLine/EntityVersionTimeLine';
|
||||
@ -24,11 +23,7 @@ import TagsContainerV2 from 'components/Tag/TagsContainerV2/TagsContainerV2';
|
||||
import VersionTable from 'components/VersionTable/VersionTable.component';
|
||||
import { getVersionPathWithTab } from 'constants/constants';
|
||||
import { EntityField } from 'constants/Feeds.constants';
|
||||
import {
|
||||
ChangeDescription,
|
||||
Column,
|
||||
Container,
|
||||
} from 'generated/entity/data/container';
|
||||
import { ChangeDescription, Column } from 'generated/entity/data/container';
|
||||
import { TagSource } from 'generated/type/tagLabel';
|
||||
import { cloneDeep, toString } from 'lodash';
|
||||
import React, { useEffect, useMemo, useState } from 'react';
|
||||
@ -81,9 +76,7 @@ const ContainerVersion: React.FC<ContainerVersionProp> = ({
|
||||
);
|
||||
|
||||
const columns = useMemo(() => {
|
||||
const colList = cloneDeep(
|
||||
(currentVersionData as Container).dataModel?.columns
|
||||
);
|
||||
const colList = cloneDeep(currentVersionData.dataModel?.columns);
|
||||
|
||||
return getColumnsDataWithVersionChanges<Column>(
|
||||
changeDescription,
|
||||
@ -199,9 +192,7 @@ const ContainerVersion: React.FC<ContainerVersionProp> = ({
|
||||
children: (
|
||||
<CustomPropertyTable
|
||||
isVersionView
|
||||
entityDetails={
|
||||
currentVersionData as CustomPropertyProps['entityDetails']
|
||||
}
|
||||
entityDetails={currentVersionData}
|
||||
entityType={EntityType.CONTAINER}
|
||||
hasEditAccess={false}
|
||||
hasPermission={entityPermissions.ViewAll}
|
||||
|
||||
@ -12,14 +12,13 @@
|
||||
*/
|
||||
import { OperationPermission } from 'components/PermissionProvider/PermissionProvider.interface';
|
||||
import { Container } from 'generated/entity/data/container';
|
||||
import { VersionData } from 'pages/EntityVersionPage/EntityVersionPage.component';
|
||||
import { EntityHistory } from '../../generated/type/entityHistory';
|
||||
import { TagLabel } from '../../generated/type/tagLabel';
|
||||
import { TitleBreadcrumbProps } from '../common/title-breadcrumb/title-breadcrumb.interface';
|
||||
|
||||
export interface ContainerVersionProp {
|
||||
version: string;
|
||||
currentVersionData: VersionData;
|
||||
currentVersionData: Container;
|
||||
isVersionLoading: boolean;
|
||||
owner: Container['owner'];
|
||||
domain: Container['domain'];
|
||||
|
||||
@ -13,6 +13,17 @@
|
||||
|
||||
import { Button, Col, Form, Row } from 'antd';
|
||||
import { AxiosError } from 'axios';
|
||||
import ResizablePanels from 'components/common/ResizablePanels/ResizablePanels';
|
||||
import ServiceDocPanel from 'components/common/ServiceDocPanel/ServiceDocPanel';
|
||||
import TitleBreadcrumb from 'components/common/title-breadcrumb/title-breadcrumb.component';
|
||||
import { GlobalSettingsMenuCategory } from 'constants/GlobalSettings.constants';
|
||||
import { CUSTOM_PROPERTY_NAME_REGEX } from 'constants/regex.constants';
|
||||
import {
|
||||
CUSTOM_PROPERTY_CATEGORY,
|
||||
OPEN_METADATA,
|
||||
} from 'constants/service-guide.constant';
|
||||
import { EntityType } from 'enums/entity.enum';
|
||||
import { ServiceCategory } from 'enums/service.enum';
|
||||
import { t } from 'i18next';
|
||||
import { FieldProp, FieldTypes } from 'interface/FormUtils.interface';
|
||||
import { isUndefined, map, startCase } from 'lodash';
|
||||
@ -30,24 +41,12 @@ import {
|
||||
getTypeListByCategory,
|
||||
} from 'rest/metadataTypeAPI';
|
||||
import { generateFormFields } from 'utils/formUtils';
|
||||
import { getSettingOptionByEntityType } from 'utils/GlobalSettingsUtils';
|
||||
import { getSettingPath } from 'utils/RouterUtils';
|
||||
import { SUPPORTED_FIELD_TYPES } from '../../../constants/constants';
|
||||
import { Category, CustomProperty, Type } from '../../../generated/entity/type';
|
||||
import { showErrorToast } from '../../../utils/ToastUtils';
|
||||
|
||||
import ResizablePanels from 'components/common/ResizablePanels/ResizablePanels';
|
||||
import ServiceDocPanel from 'components/common/ServiceDocPanel/ServiceDocPanel';
|
||||
import TitleBreadcrumb from 'components/common/title-breadcrumb/title-breadcrumb.component';
|
||||
import { GlobalSettingsMenuCategory } from 'constants/GlobalSettings.constants';
|
||||
import { CUSTOM_PROPERTY_NAME_REGEX } from 'constants/regex.constants';
|
||||
import {
|
||||
CUSTOM_PROPERTY_CATEGORY,
|
||||
OPEN_METADATA,
|
||||
} from 'constants/service-guide.constant';
|
||||
import { EntityType } from 'enums/entity.enum';
|
||||
import { ServiceCategory } from 'enums/service.enum';
|
||||
import { getSettingOptionByEntityType } from 'utils/GlobalSettingsUtils';
|
||||
import { getSettingPath } from 'utils/RouterUtils';
|
||||
|
||||
const AddCustomProperty = () => {
|
||||
const { entityTypeFQN } = useParams<{ entityTypeFQN: EntityType }>();
|
||||
const history = useHistory();
|
||||
|
||||
@ -56,7 +56,6 @@ import { getTagsWithoutTier, getTierTags } from '../../utils/TableUtils';
|
||||
import { showErrorToast, showSuccessToast } from '../../utils/ToastUtils';
|
||||
import ActivityThreadPanel from '../ActivityFeed/ActivityThreadPanel/ActivityThreadPanel';
|
||||
import { CustomPropertyTable } from '../common/CustomPropertyTable/CustomPropertyTable';
|
||||
import { CustomPropertyProps } from '../common/CustomPropertyTable/CustomPropertyTable.interface';
|
||||
import { ModalWithMarkdownEditor } from '../Modals/ModalWithMarkdownEditor/ModalWithMarkdownEditor';
|
||||
import { usePermissionProvider } from '../PermissionProvider/PermissionProvider';
|
||||
import { ResourceEntity } from '../PermissionProvider/PermissionProvider.interface';
|
||||
@ -83,8 +82,8 @@ const DashboardDetails = ({
|
||||
}: DashboardDetailsProps) => {
|
||||
const { t } = useTranslation();
|
||||
const history = useHistory();
|
||||
const { dashboardFQN, tab: activeTab = EntityTabs.DETAILS } =
|
||||
useParams<{ dashboardFQN: string; tab: EntityTabs }>();
|
||||
const { fqn: dashboardFQN, tab: activeTab = EntityTabs.DETAILS } =
|
||||
useParams<{ fqn: string; tab: EntityTabs }>();
|
||||
|
||||
const { postFeed, deleteFeed, updateFeed } = useActivityFeedProvider();
|
||||
const [isEdit, setIsEdit] = useState(false);
|
||||
@ -290,7 +289,10 @@ const DashboardDetails = ({
|
||||
await onDashboardUpdate(updatedData, 'displayName');
|
||||
};
|
||||
const onExtensionUpdate = async (updatedData: Dashboard) => {
|
||||
await onDashboardUpdate(updatedData, 'extension');
|
||||
await onDashboardUpdate(
|
||||
{ ...dashboardDetails, extension: updatedData.extension },
|
||||
'extension'
|
||||
);
|
||||
};
|
||||
|
||||
const handleRestoreDashboard = async () => {
|
||||
@ -707,9 +709,6 @@ const DashboardDetails = ({
|
||||
key: EntityTabs.CUSTOM_PROPERTIES,
|
||||
children: (
|
||||
<CustomPropertyTable
|
||||
entityDetails={
|
||||
dashboardDetails as CustomPropertyProps['entityDetails']
|
||||
}
|
||||
entityType={EntityType.DASHBOARD}
|
||||
handleExtensionUpdate={onExtensionUpdate}
|
||||
hasEditAccess={
|
||||
|
||||
@ -16,7 +16,6 @@ import { ColumnsType } from 'antd/lib/table';
|
||||
import { ReactComponent as IconExternalLink } from 'assets/svg/external-links.svg';
|
||||
import classNames from 'classnames';
|
||||
import { CustomPropertyTable } from 'components/common/CustomPropertyTable/CustomPropertyTable';
|
||||
import { CustomPropertyProps } from 'components/common/CustomPropertyTable/CustomPropertyTable.interface';
|
||||
import DescriptionV1 from 'components/common/description/DescriptionV1';
|
||||
import RichTextEditorPreviewer from 'components/common/rich-text-editor/RichTextEditorPreviewer';
|
||||
import DataAssetsVersionHeader from 'components/DataAssets/DataAssetsVersionHeader/DataAssetsVersionHeader';
|
||||
@ -34,7 +33,6 @@ import { Link, useHistory, useParams } from 'react-router-dom';
|
||||
import { getEntityName } from 'utils/EntityUtils';
|
||||
import {
|
||||
ChangeDescription,
|
||||
Dashboard,
|
||||
EntityReference,
|
||||
} from '../../generated/entity/data/dashboard';
|
||||
import {
|
||||
@ -187,7 +185,7 @@ const DashboardVersion: FC<DashboardVersionProp> = ({
|
||||
bordered
|
||||
columns={tableColumn}
|
||||
data-testid="schema-table"
|
||||
dataSource={(currentVersionData as Dashboard)?.charts}
|
||||
dataSource={currentVersionData?.charts}
|
||||
pagination={false}
|
||||
rowKey="id"
|
||||
size="small"
|
||||
@ -226,9 +224,7 @@ const DashboardVersion: FC<DashboardVersionProp> = ({
|
||||
children: (
|
||||
<CustomPropertyTable
|
||||
isVersionView
|
||||
entityDetails={
|
||||
currentVersionData as CustomPropertyProps['entityDetails']
|
||||
}
|
||||
entityDetails={currentVersionData}
|
||||
entityType={EntityType.DASHBOARD}
|
||||
hasEditAccess={false}
|
||||
hasPermission={entityPermissions.ViewAll}
|
||||
|
||||
@ -12,7 +12,6 @@
|
||||
*/
|
||||
|
||||
import { OperationPermission } from 'components/PermissionProvider/PermissionProvider.interface';
|
||||
import { VersionData } from 'pages/EntityVersionPage/EntityVersionPage.component';
|
||||
import { Dashboard } from '../../generated/entity/data/dashboard';
|
||||
import { EntityHistory } from '../../generated/type/entityHistory';
|
||||
import { TagLabel } from '../../generated/type/tagLabel';
|
||||
@ -20,7 +19,7 @@ import { TitleBreadcrumbProps } from '../common/title-breadcrumb/title-breadcrum
|
||||
|
||||
export interface DashboardVersionProp {
|
||||
version: string;
|
||||
currentVersionData: VersionData;
|
||||
currentVersionData: Dashboard;
|
||||
isVersionLoading: boolean;
|
||||
owner: Dashboard['owner'];
|
||||
domain: Dashboard['domain'];
|
||||
|
||||
@ -65,8 +65,8 @@ const DataModelDetails = ({
|
||||
const { t } = useTranslation();
|
||||
const history = useHistory();
|
||||
const { postFeed, deleteFeed, updateFeed } = useActivityFeedProvider();
|
||||
const { dashboardDataModelFQN, tab: activeTab } =
|
||||
useParams<{ dashboardDataModelFQN: string; tab: EntityTabs }>();
|
||||
const { fqn: dashboardDataModelFQN, tab: activeTab } =
|
||||
useParams<{ fqn: string; tab: EntityTabs }>();
|
||||
|
||||
const [isEditDescription, setIsEditDescription] = useState<boolean>(false);
|
||||
const [threadLink, setThreadLink] = useState<string>('');
|
||||
|
||||
@ -90,7 +90,6 @@ import {
|
||||
getNewLineageConnectionDetails,
|
||||
getNewNodes,
|
||||
getPaginatedChildMap,
|
||||
getParamByEntityType,
|
||||
getRemovedNodeData,
|
||||
getSelectedEdgeArr,
|
||||
getUniqueFlowElements,
|
||||
@ -205,12 +204,11 @@ const EntityLineageComponent: FunctionComponent<EntityLineageProp> = ({
|
||||
nodesPerLayer: 50,
|
||||
});
|
||||
|
||||
const params = useParams<Record<string, string>>();
|
||||
const { fqn: entityFQN } = useParams<{ fqn: string }>();
|
||||
const queryParams = new URLSearchParams(location.search);
|
||||
|
||||
const isFullScreen = queryParams.get('fullscreen') === 'true';
|
||||
const entityFQN =
|
||||
params[getParamByEntityType(entityType)] ?? params['entityFQN'];
|
||||
|
||||
const history = useHistory();
|
||||
|
||||
const onFullScreenClick = useCallback(() => {
|
||||
|
||||
@ -30,7 +30,7 @@ import { showErrorToast } from 'utils/ToastUtils';
|
||||
import { SummaryEntityType } from '../../../../enums/EntitySummary.enum';
|
||||
import { TagLabel, Topic } from '../../../../generated/entity/data/topic';
|
||||
import { getFormattedEntityData } from '../../../../utils/EntitySummaryPanelUtils';
|
||||
import { bytesToSize } from '../../../../utils/StringsUtils';
|
||||
import { bytesToSize, getEncodedFqn } from '../../../../utils/StringsUtils';
|
||||
import { getConfigObject } from '../../../../utils/TopicDetailsUtils';
|
||||
import { TopicConfigObjectInterface } from '../../../TopicDetails/TopicDetails.interface';
|
||||
import SummaryList from '../SummaryList/SummaryList.component';
|
||||
@ -84,10 +84,10 @@ function TopicSummary({
|
||||
|
||||
const fetchExtraTopicInfo = useCallback(async () => {
|
||||
try {
|
||||
const res = await getTopicByFqn(entityDetails.fullyQualifiedName ?? '', [
|
||||
'tags',
|
||||
'owner',
|
||||
]);
|
||||
const res = await getTopicByFqn(
|
||||
getEncodedFqn(entityDetails.fullyQualifiedName ?? ''),
|
||||
['tags', 'owner']
|
||||
);
|
||||
|
||||
const { partitions, messageSchema } = res;
|
||||
|
||||
|
||||
@ -54,7 +54,6 @@ import { getEntityVoteStatus } from 'utils/EntityUtils';
|
||||
import {
|
||||
getGlossaryPath,
|
||||
getGlossaryPathWithAction,
|
||||
getGlossaryTermsPath,
|
||||
getGlossaryTermsVersionsPath,
|
||||
getGlossaryVersionsPath,
|
||||
} from 'utils/RouterUtils';
|
||||
@ -90,8 +89,8 @@ const GlossaryHeader = ({
|
||||
const history = useHistory();
|
||||
const USER_ID = getCurrentUserId();
|
||||
|
||||
const { glossaryName: glossaryFqn, version } = useParams<{
|
||||
glossaryName: string;
|
||||
const { fqn, version } = useParams<{
|
||||
fqn: string;
|
||||
version: string;
|
||||
}>();
|
||||
const { showModal } = useEntityExportModalProvider();
|
||||
@ -110,8 +109,8 @@ const GlossaryHeader = ({
|
||||
const fetchCurrentGlossaryInfo = async () => {
|
||||
try {
|
||||
const res = isGlossary
|
||||
? await getGlossariesById(glossaryFqn)
|
||||
: await getGlossaryTermsById(glossaryFqn);
|
||||
? await getGlossariesById(fqn)
|
||||
: await getGlossaryTermsById(fqn);
|
||||
|
||||
setLatestGlossaryData(res);
|
||||
} catch (error) {
|
||||
@ -130,7 +129,7 @@ const GlossaryHeader = ({
|
||||
|
||||
const handleAddGlossaryTermClick = useCallback(() => {
|
||||
onAddGlossaryTerm(!isGlossary ? (selectedData as GlossaryTerm) : undefined);
|
||||
}, [glossaryFqn]);
|
||||
}, [fqn]);
|
||||
|
||||
const handleGlossaryImport = () =>
|
||||
history.push(
|
||||
@ -143,9 +142,7 @@ const GlossaryHeader = ({
|
||||
const handleVersionClick = async () => {
|
||||
let path: string;
|
||||
if (isVersionView) {
|
||||
path = isGlossary
|
||||
? getGlossaryPath(latestGlossaryData?.fullyQualifiedName)
|
||||
: getGlossaryTermsPath(latestGlossaryData?.fullyQualifiedName ?? '');
|
||||
path = getGlossaryPath(latestGlossaryData?.fullyQualifiedName);
|
||||
} else {
|
||||
path = isGlossary
|
||||
? getGlossaryVersionsPath(
|
||||
@ -402,61 +399,59 @@ const GlossaryHeader = ({
|
||||
/>
|
||||
</Col>
|
||||
<Col flex="360px">
|
||||
<div style={{ textAlign: 'right' }}>
|
||||
<div className="d-flex items-end">
|
||||
{createButtons}
|
||||
<div className="d-flex gap-2 justify-end">
|
||||
{createButtons}
|
||||
|
||||
<ButtonGroup className="p-l-xs" size="small">
|
||||
{updateVote && (
|
||||
<Voting
|
||||
voteStatus={voteStatus}
|
||||
votes={selectedData.votes}
|
||||
onUpdateVote={handleUpdateVote}
|
||||
/>
|
||||
)}
|
||||
<ButtonGroup className="p-l-xs" size="small">
|
||||
{updateVote && (
|
||||
<Voting
|
||||
voteStatus={voteStatus}
|
||||
votes={selectedData.votes}
|
||||
onUpdateVote={handleUpdateVote}
|
||||
/>
|
||||
)}
|
||||
|
||||
{selectedData && selectedData.version && (
|
||||
<Button
|
||||
{selectedData && selectedData.version && (
|
||||
<Button
|
||||
className={classNames('', {
|
||||
'text-primary border-primary': version,
|
||||
})}
|
||||
data-testid="version-button"
|
||||
icon={<Icon component={VersionIcon} />}
|
||||
onClick={handleVersionClick}>
|
||||
<Typography.Text
|
||||
className={classNames('', {
|
||||
'text-primary border-primary': version,
|
||||
})}
|
||||
data-testid="version-button"
|
||||
icon={<Icon component={VersionIcon} />}
|
||||
onClick={handleVersionClick}>
|
||||
<Typography.Text
|
||||
className={classNames('', {
|
||||
'text-primary': version,
|
||||
})}>
|
||||
{toString(selectedData.version)}
|
||||
</Typography.Text>
|
||||
</Button>
|
||||
)}
|
||||
'text-primary': version,
|
||||
})}>
|
||||
{toString(selectedData.version)}
|
||||
</Typography.Text>
|
||||
</Button>
|
||||
)}
|
||||
|
||||
{!isVersionView && (
|
||||
<Dropdown
|
||||
align={{ targetOffset: [-12, 0] }}
|
||||
className="m-l-xs"
|
||||
menu={{
|
||||
items: manageButtonContent,
|
||||
}}
|
||||
open={showActions}
|
||||
overlayClassName="glossary-manage-dropdown-list-container"
|
||||
overlayStyle={{ width: '350px' }}
|
||||
placement="bottomRight"
|
||||
trigger={['click']}
|
||||
onOpenChange={setShowActions}>
|
||||
<Tooltip placement="right">
|
||||
<Button
|
||||
className="glossary-manage-dropdown-button tw-px-1.5"
|
||||
data-testid="manage-button"
|
||||
onClick={() => setShowActions(true)}>
|
||||
<IconDropdown className="anticon self-center manage-dropdown-icon" />
|
||||
</Button>
|
||||
</Tooltip>
|
||||
</Dropdown>
|
||||
)}
|
||||
</ButtonGroup>
|
||||
</div>
|
||||
{!isVersionView && (
|
||||
<Dropdown
|
||||
align={{ targetOffset: [-12, 0] }}
|
||||
className="m-l-xs"
|
||||
menu={{
|
||||
items: manageButtonContent,
|
||||
}}
|
||||
open={showActions}
|
||||
overlayClassName="glossary-manage-dropdown-list-container"
|
||||
overlayStyle={{ width: '350px' }}
|
||||
placement="bottomRight"
|
||||
trigger={['click']}
|
||||
onOpenChange={setShowActions}>
|
||||
<Tooltip placement="right">
|
||||
<Button
|
||||
className="glossary-manage-dropdown-button tw-px-1.5"
|
||||
data-testid="manage-button"
|
||||
onClick={() => setShowActions(true)}>
|
||||
<IconDropdown className="anticon self-center manage-dropdown-icon" />
|
||||
</Button>
|
||||
</Tooltip>
|
||||
</Dropdown>
|
||||
)}
|
||||
</ButtonGroup>
|
||||
</div>
|
||||
</Col>
|
||||
</Row>
|
||||
|
||||
@ -13,14 +13,17 @@
|
||||
|
||||
import { Col, Row, Tabs } from 'antd';
|
||||
import { AssetSelectionModal } from 'components/Assets/AssetsSelectionModal/AssetSelectionModal';
|
||||
import { CustomPropertyTable } from 'components/common/CustomPropertyTable/CustomPropertyTable';
|
||||
import { EntityDetailsObjectInterface } from 'components/Explore/explore.interface';
|
||||
import GlossaryHeader from 'components/Glossary/GlossaryHeader/GlossaryHeader.component';
|
||||
import GlossaryTermTab from 'components/Glossary/GlossaryTermTab/GlossaryTermTab.component';
|
||||
import { OperationPermission } from 'components/PermissionProvider/PermissionProvider.interface';
|
||||
import TabsLabel from 'components/TabsLabel/TabsLabel.component';
|
||||
import { VotingDataProps } from 'components/Voting/voting.interface';
|
||||
import { getGlossaryTermDetailsPath } from 'constants/constants';
|
||||
import { EntityField } from 'constants/Feeds.constants';
|
||||
import { myDataSearchIndex } from 'constants/Mydata.constants';
|
||||
import { EntityTabs, EntityType } from 'enums/entity.enum';
|
||||
import { GlossaryTerm } from 'generated/entity/data/glossaryTerm';
|
||||
import { ChangeDescription } from 'generated/entity/type';
|
||||
import { t } from 'i18next';
|
||||
@ -66,10 +69,10 @@ const GlossaryTermsV1 = ({
|
||||
isVersionView,
|
||||
}: Props) => {
|
||||
const {
|
||||
glossaryName: glossaryFqn,
|
||||
fqn: glossaryFqn,
|
||||
tab,
|
||||
version,
|
||||
} = useParams<{ glossaryName: string; tab: string; version: string }>();
|
||||
} = useParams<{ fqn: string; tab: string; version: string }>();
|
||||
const history = useHistory();
|
||||
const assetTabRef = useRef<AssetsTabRef>(null);
|
||||
const [assetModalVisible, setAssetModelVisible] = useState(false);
|
||||
@ -87,6 +90,13 @@ const GlossaryTermsV1 = ({
|
||||
});
|
||||
};
|
||||
|
||||
const onExtensionUpdate = async (updatedTable: GlossaryTerm) => {
|
||||
await handleGlossaryTermUpdate({
|
||||
...glossaryTerm,
|
||||
extension: updatedTable.extension,
|
||||
});
|
||||
};
|
||||
|
||||
const tabItems = useMemo(() => {
|
||||
const items = [
|
||||
{
|
||||
@ -154,6 +164,28 @@ const GlossaryTermsV1 = ({
|
||||
},
|
||||
]
|
||||
: []),
|
||||
{
|
||||
label: (
|
||||
<TabsLabel
|
||||
id={EntityTabs.CUSTOM_PROPERTIES}
|
||||
name={t('label.custom-property-plural')}
|
||||
/>
|
||||
),
|
||||
key: EntityTabs.CUSTOM_PROPERTIES,
|
||||
children: (
|
||||
<CustomPropertyTable
|
||||
entityDetails={isVersionView ? glossaryTerm : undefined}
|
||||
entityType={EntityType.GLOSSARY_TERM}
|
||||
handleExtensionUpdate={onExtensionUpdate}
|
||||
hasEditAccess={
|
||||
!isVersionView &&
|
||||
(permissions.EditAll || permissions.EditCustomFields)
|
||||
}
|
||||
hasPermission={permissions.ViewAll}
|
||||
isVersionView={isVersionView}
|
||||
/>
|
||||
),
|
||||
},
|
||||
];
|
||||
|
||||
return items;
|
||||
|
||||
@ -81,11 +81,12 @@ describe('Test Glossary-term component', () => {
|
||||
|
||||
expect(await screen.findByText('GlossaryTermTab')).toBeInTheDocument();
|
||||
expect(glossaryTerm).toBeInTheDocument();
|
||||
expect(tabs).toHaveLength(3);
|
||||
expect(tabs).toHaveLength(4);
|
||||
expect(tabs.map((tab) => tab.textContent)).toStrictEqual([
|
||||
'label.overview',
|
||||
'label.glossary-term-plural0',
|
||||
'label.asset-plural1', // 1 added as its count for assets
|
||||
'label.asset-plural0', // 1 added as its count for assets
|
||||
'label.custom-property-plural',
|
||||
]);
|
||||
});
|
||||
});
|
||||
|
||||
@ -40,8 +40,11 @@ interface GlossaryVersionProps {
|
||||
|
||||
const GlossaryVersion = ({ isGlossary = false }: GlossaryVersionProps) => {
|
||||
const history = useHistory();
|
||||
const { glossaryName, version } =
|
||||
useParams<{ glossaryName: string; version: string }>();
|
||||
const {
|
||||
fqn: glossaryName,
|
||||
version,
|
||||
tab = 'overview',
|
||||
} = useParams<{ fqn: string; version: string; tab: string }>();
|
||||
const [versionList, setVersionList] = useState<EntityHistory>(
|
||||
{} as EntityHistory
|
||||
);
|
||||
@ -74,7 +77,7 @@ const GlossaryVersion = ({ isGlossary = false }: GlossaryVersionProps) => {
|
||||
const onVersionChange = (selectedVersion: string) => {
|
||||
const path = isGlossary
|
||||
? getGlossaryVersionsPath(glossaryName, selectedVersion)
|
||||
: getGlossaryTermsVersionsPath(glossaryName, selectedVersion);
|
||||
: getGlossaryTermsVersionsPath(glossaryName, selectedVersion, tab);
|
||||
history.push(path);
|
||||
};
|
||||
|
||||
@ -90,7 +93,7 @@ const GlossaryVersion = ({ isGlossary = false }: GlossaryVersionProps) => {
|
||||
|
||||
return (
|
||||
<PageLayoutV1 pageTitle="Glossary version">
|
||||
<div className="version-data page-container">
|
||||
<div className="version-data">
|
||||
{/* TODO: Need to implement version component for Glossary */}
|
||||
<GlossaryV1
|
||||
isVersionsView
|
||||
|
||||
@ -48,7 +48,6 @@ import { getTagsWithoutTier, getTierTags } from '../../utils/TableUtils';
|
||||
import { showErrorToast, showSuccessToast } from '../../utils/ToastUtils';
|
||||
import ActivityThreadPanel from '../ActivityFeed/ActivityThreadPanel/ActivityThreadPanel';
|
||||
import { CustomPropertyTable } from '../common/CustomPropertyTable/CustomPropertyTable';
|
||||
import { CustomPropertyProps } from '../common/CustomPropertyTable/CustomPropertyTable.interface';
|
||||
import { usePermissionProvider } from '../PermissionProvider/PermissionProvider';
|
||||
import { ResourceEntity } from '../PermissionProvider/PermissionProvider.interface';
|
||||
import { MlModelDetailProp } from './MlModelDetail.interface';
|
||||
@ -73,8 +72,8 @@ const MlModelDetail: FC<MlModelDetailProp> = ({
|
||||
const { t } = useTranslation();
|
||||
const history = useHistory();
|
||||
const { postFeed, deleteFeed, updateFeed } = useActivityFeedProvider();
|
||||
const { mlModelFqn, tab: activeTab } =
|
||||
useParams<{ tab: EntityTabs; mlModelFqn: string }>();
|
||||
const { fqn: mlModelFqn, tab: activeTab } =
|
||||
useParams<{ tab: EntityTabs; fqn: string }>();
|
||||
|
||||
const [isEdit, setIsEdit] = useState<boolean>(false);
|
||||
const [feedCount, setFeedCount] = useState<number>(0);
|
||||
@ -497,9 +496,6 @@ const MlModelDetail: FC<MlModelDetailProp> = ({
|
||||
key: EntityTabs.CUSTOM_PROPERTIES,
|
||||
children: (
|
||||
<CustomPropertyTable
|
||||
entityDetails={
|
||||
mlModelDetail as CustomPropertyProps['entityDetails']
|
||||
}
|
||||
entityType={EntityType.MLMODEL}
|
||||
handleExtensionUpdate={onExtensionUpdate}
|
||||
hasEditAccess={
|
||||
|
||||
@ -23,7 +23,6 @@ import {
|
||||
} from 'antd';
|
||||
import classNames from 'classnames';
|
||||
import { CustomPropertyTable } from 'components/common/CustomPropertyTable/CustomPropertyTable';
|
||||
import { CustomPropertyProps } from 'components/common/CustomPropertyTable/CustomPropertyTable.interface';
|
||||
import DescriptionV1 from 'components/common/description/DescriptionV1';
|
||||
import ErrorPlaceHolder from 'components/common/error-with-placeholder/ErrorPlaceHolder';
|
||||
import RichTextEditorPreviewer from 'components/common/rich-text-editor/RichTextEditorPreviewer';
|
||||
@ -35,7 +34,7 @@ import TagsContainerV2 from 'components/Tag/TagsContainerV2/TagsContainerV2';
|
||||
import TagsViewer from 'components/Tag/TagsViewer/TagsViewer';
|
||||
import { getVersionPathWithTab } from 'constants/constants';
|
||||
import { EntityTabs, EntityType } from 'enums/entity.enum';
|
||||
import { MlFeature, Mlmodel } from 'generated/entity/data/mlmodel';
|
||||
import { MlFeature } from 'generated/entity/data/mlmodel';
|
||||
import { TagSource } from 'generated/type/tagLabel';
|
||||
import React, { FC, useCallback, useEffect, useMemo, useState } from 'react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
@ -153,8 +152,7 @@ const MlModelVersion: FC<MlModelVersionProp> = ({
|
||||
/>
|
||||
</Col>
|
||||
<Col span={24}>
|
||||
{(currentVersionData as Mlmodel).mlFeatures &&
|
||||
(currentVersionData as Mlmodel).mlFeatures?.length ? (
|
||||
{currentVersionData.mlFeatures?.length ? (
|
||||
<Row data-testid="feature-list">
|
||||
<Col span={24}>
|
||||
<Divider className="m-y-md" />
|
||||
@ -312,9 +310,7 @@ const MlModelVersion: FC<MlModelVersionProp> = ({
|
||||
children: (
|
||||
<CustomPropertyTable
|
||||
isVersionView
|
||||
entityDetails={
|
||||
currentVersionData as CustomPropertyProps['entityDetails']
|
||||
}
|
||||
entityDetails={currentVersionData}
|
||||
entityType={EntityType.MLMODEL}
|
||||
hasEditAccess={false}
|
||||
hasPermission={entityPermissions.ViewAll}
|
||||
|
||||
@ -13,14 +13,13 @@
|
||||
|
||||
import { OperationPermission } from 'components/PermissionProvider/PermissionProvider.interface';
|
||||
import { Mlmodel } from 'generated/entity/data/mlmodel';
|
||||
import { VersionData } from 'pages/EntityVersionPage/EntityVersionPage.component';
|
||||
import { EntityHistory } from '../../generated/type/entityHistory';
|
||||
import { TagLabel } from '../../generated/type/tagLabel';
|
||||
import { TitleBreadcrumbProps } from '../common/title-breadcrumb/title-breadcrumb.interface';
|
||||
|
||||
export interface MlModelVersionProp {
|
||||
version: string;
|
||||
currentVersionData: VersionData;
|
||||
currentVersionData: Mlmodel;
|
||||
isVersionLoading: boolean;
|
||||
owner: Mlmodel['owner'];
|
||||
domain: Mlmodel['domain'];
|
||||
|
||||
@ -18,7 +18,6 @@ import { AxiosError } from 'axios';
|
||||
import { useActivityFeedProvider } from 'components/ActivityFeed/ActivityFeedProvider/ActivityFeedProvider';
|
||||
import { ActivityFeedTab } from 'components/ActivityFeed/ActivityFeedTab/ActivityFeedTab.component';
|
||||
import { CustomPropertyTable } from 'components/common/CustomPropertyTable/CustomPropertyTable';
|
||||
import { CustomPropertyProps } from 'components/common/CustomPropertyTable/CustomPropertyTable.interface';
|
||||
import DescriptionV1 from 'components/common/description/DescriptionV1';
|
||||
import PageLayoutV1 from 'components/containers/PageLayoutV1';
|
||||
import { DataAssetsHeader } from 'components/DataAssets/DataAssetsHeader/DataAssetsHeader.component';
|
||||
@ -695,9 +694,6 @@ const PipelineDetails = ({
|
||||
key: EntityTabs.CUSTOM_PROPERTIES,
|
||||
children: (
|
||||
<CustomPropertyTable
|
||||
entityDetails={
|
||||
pipelineDetails as CustomPropertyProps['entityDetails']
|
||||
}
|
||||
entityType={EntityType.PIPELINE}
|
||||
handleExtensionUpdate={onExtensionUpdate}
|
||||
hasEditAccess={
|
||||
|
||||
@ -15,7 +15,6 @@ import { Col, Row, Space, Table, Tabs, TabsProps } from 'antd';
|
||||
import { ColumnsType } from 'antd/lib/table';
|
||||
import classNames from 'classnames';
|
||||
import { CustomPropertyTable } from 'components/common/CustomPropertyTable/CustomPropertyTable';
|
||||
import { CustomPropertyProps } from 'components/common/CustomPropertyTable/CustomPropertyTable.interface';
|
||||
import DescriptionV1 from 'components/common/description/DescriptionV1';
|
||||
import RichTextEditorPreviewer from 'components/common/rich-text-editor/RichTextEditorPreviewer';
|
||||
import DataAssetsVersionHeader from 'components/DataAssets/DataAssetsVersionHeader/DataAssetsVersionHeader';
|
||||
@ -236,9 +235,7 @@ const PipelineVersion: FC<PipelineVersionProp> = ({
|
||||
children: (
|
||||
<CustomPropertyTable
|
||||
isVersionView
|
||||
entityDetails={
|
||||
currentVersionData as CustomPropertyProps['entityDetails']
|
||||
}
|
||||
entityDetails={currentVersionData}
|
||||
entityType={EntityType.PIPELINE}
|
||||
hasEditAccess={false}
|
||||
hasPermission={entityPermissions.ViewAll}
|
||||
|
||||
@ -12,7 +12,6 @@
|
||||
*/
|
||||
|
||||
import { OperationPermission } from 'components/PermissionProvider/PermissionProvider.interface';
|
||||
import { VersionData } from 'pages/EntityVersionPage/EntityVersionPage.component';
|
||||
import { Pipeline } from '../../generated/entity/data/pipeline';
|
||||
import { EntityHistory } from '../../generated/type/entityHistory';
|
||||
import { TagLabel } from '../../generated/type/tagLabel';
|
||||
@ -20,7 +19,7 @@ import { TitleBreadcrumbProps } from '../common/title-breadcrumb/title-breadcrum
|
||||
|
||||
export interface PipelineVersionProp {
|
||||
version: string;
|
||||
currentVersionData: VersionData;
|
||||
currentVersionData: Pipeline;
|
||||
isVersionLoading: boolean;
|
||||
owner: Pipeline['owner'];
|
||||
domain: Pipeline['domain'];
|
||||
|
||||
@ -12,14 +12,13 @@
|
||||
*/
|
||||
import { OperationPermission } from 'components/PermissionProvider/PermissionProvider.interface';
|
||||
import { SearchIndex } from 'generated/entity/data/searchIndex';
|
||||
import { VersionData } from 'pages/EntityVersionPage/EntityVersionPage.component';
|
||||
import { EntityHistory } from '../../generated/type/entityHistory';
|
||||
import { TagLabel } from '../../generated/type/tagLabel';
|
||||
import { TitleBreadcrumbProps } from '../common/title-breadcrumb/title-breadcrumb.interface';
|
||||
|
||||
export interface SearchIndexVersionProps {
|
||||
version: string;
|
||||
currentVersionData: VersionData;
|
||||
currentVersionData: SearchIndex;
|
||||
isVersionLoading: boolean;
|
||||
owner: SearchIndex['owner'];
|
||||
domain: SearchIndex['domain'];
|
||||
|
||||
@ -14,7 +14,6 @@
|
||||
import { Col, Row, Space, Tabs, TabsProps } from 'antd';
|
||||
import classNames from 'classnames';
|
||||
import { CustomPropertyTable } from 'components/common/CustomPropertyTable/CustomPropertyTable';
|
||||
import { CustomPropertyProps } from 'components/common/CustomPropertyTable/CustomPropertyTable.interface';
|
||||
import DescriptionV1 from 'components/common/description/DescriptionV1';
|
||||
import DataAssetsVersionHeader from 'components/DataAssets/DataAssetsVersionHeader/DataAssetsVersionHeader';
|
||||
import EntityVersionTimeLine from 'components/Entity/EntityVersionTimeLine/EntityVersionTimeLine';
|
||||
@ -178,9 +177,7 @@ const SearchIndexVersion: React.FC<SearchIndexVersionProps> = ({
|
||||
children: (
|
||||
<CustomPropertyTable
|
||||
isVersionView
|
||||
entityDetails={
|
||||
currentVersionData as CustomPropertyProps['entityDetails']
|
||||
}
|
||||
entityDetails={currentVersionData}
|
||||
entityType={EntityType.SEARCH_INDEX}
|
||||
hasEditAccess={false}
|
||||
hasPermission={entityPermissions.ViewAll}
|
||||
|
||||
@ -14,7 +14,6 @@
|
||||
import { Col, Row, Space, Tabs, TabsProps } from 'antd';
|
||||
import classNames from 'classnames';
|
||||
import { CustomPropertyTable } from 'components/common/CustomPropertyTable/CustomPropertyTable';
|
||||
import { CustomPropertyProps } from 'components/common/CustomPropertyTable/CustomPropertyTable.interface';
|
||||
import DescriptionV1 from 'components/common/description/DescriptionV1';
|
||||
import DataAssetsVersionHeader from 'components/DataAssets/DataAssetsVersionHeader/DataAssetsVersionHeader';
|
||||
import EntityVersionTimeLine from 'components/Entity/EntityVersionTimeLine/EntityVersionTimeLine';
|
||||
@ -153,9 +152,7 @@ const StoredProcedureVersion = ({
|
||||
children: (
|
||||
<CustomPropertyTable
|
||||
isVersionView
|
||||
entityDetails={
|
||||
currentVersionData as CustomPropertyProps['entityDetails']
|
||||
}
|
||||
entityDetails={currentVersionData}
|
||||
entityType={EntityType.STORED_PROCEDURE}
|
||||
hasEditAccess={false}
|
||||
hasPermission={entityPermissions.ViewAll}
|
||||
|
||||
@ -13,14 +13,13 @@
|
||||
|
||||
import { OperationPermission } from 'components/PermissionProvider/PermissionProvider.interface';
|
||||
import { StoredProcedure } from 'generated/entity/data/storedProcedure';
|
||||
import { VersionData } from 'pages/EntityVersionPage/EntityVersionPage.component';
|
||||
import { EntityHistory } from '../../generated/type/entityHistory';
|
||||
import { TagLabel } from '../../generated/type/tagLabel';
|
||||
import { TitleBreadcrumbProps } from '../common/title-breadcrumb/title-breadcrumb.interface';
|
||||
|
||||
export interface StoredProcedureVersionProp {
|
||||
version: string;
|
||||
currentVersionData: VersionData;
|
||||
currentVersionData: StoredProcedure;
|
||||
isVersionLoading: boolean;
|
||||
owner: StoredProcedure['owner'];
|
||||
domain: StoredProcedure['domain'];
|
||||
|
||||
@ -26,7 +26,7 @@ const mockTimeValue = {
|
||||
const mockDateRangeObject = { startTs: 1670408784000, endTs: 1670667984000 };
|
||||
|
||||
jest.mock('react-router-dom', () => ({
|
||||
useParams: jest.fn().mockImplementation(() => ({ datasetFQN: mockFQN })),
|
||||
useParams: jest.fn().mockImplementation(() => ({ fqn: mockFQN })),
|
||||
}));
|
||||
jest.mock('rest/tableAPI');
|
||||
jest.mock('../../ProfilerDashboard/component/ProfilerLatestValue', () => {
|
||||
|
||||
@ -39,7 +39,7 @@ const TableProfilerChart = ({
|
||||
dateRangeObject,
|
||||
entityFqn = '',
|
||||
}: TableProfilerChartProps) => {
|
||||
const { datasetFQN } = useParams<{ datasetFQN: string }>();
|
||||
const { fqn: datasetFQN } = useParams<{ fqn: string }>();
|
||||
const { t } = useTranslation();
|
||||
|
||||
const [rowCountMetrics, setRowCountMetrics] = useState<MetricChartType>(
|
||||
|
||||
@ -39,7 +39,7 @@ jest.mock('react-router-dom', () => ({
|
||||
.fn()
|
||||
.mockImplementation(({ children }) => <a href="#">{children}</a>),
|
||||
useParams: jest.fn().mockReturnValue({
|
||||
datasetFQN: 'sample_data.ecommerce_db.shopify.dim_address',
|
||||
fqn: 'sample_data.ecommerce_db.shopify.dim_address',
|
||||
}),
|
||||
}));
|
||||
|
||||
|
||||
@ -119,7 +119,7 @@ const TableProfilerV1: FC<TableProfilerProps> = ({
|
||||
return searchData as { activeTab: string; activeColumnFqn: string };
|
||||
}, [location.search, isTourOpen]);
|
||||
|
||||
const { datasetFQN } = useParams<{ datasetFQN: string }>();
|
||||
const { fqn: datasetFQN } = useParams<{ fqn: string }>();
|
||||
const [table, setTable] = useState<Table>();
|
||||
const { profile, columns } = useMemo(() => {
|
||||
return { profile: table?.profile, columns: table?.columns || [] };
|
||||
|
||||
@ -51,7 +51,7 @@ const QueryCard: FC<QueryCardProp> = ({
|
||||
afterDeleteAction,
|
||||
}: QueryCardProp) => {
|
||||
const { t } = useTranslation();
|
||||
const { datasetFQN } = useParams<{ datasetFQN: string }>();
|
||||
const { fqn: datasetFQN } = useParams<{ fqn: string }>();
|
||||
const location = useLocation();
|
||||
const history = useHistory();
|
||||
const { onCopyToClipBoard } = useClipboard(query.query);
|
||||
|
||||
@ -66,7 +66,7 @@ const TableQueries: FC<TableQueriesProp> = ({
|
||||
}: TableQueriesProp) => {
|
||||
const { t } = useTranslation();
|
||||
const location = useLocation();
|
||||
const { datasetFQN } = useParams<{ datasetFQN: string }>();
|
||||
const { fqn: datasetFQN } = useParams<{ fqn: string }>();
|
||||
const history = useHistory();
|
||||
|
||||
const searchParams = useMemo(() => {
|
||||
|
||||
@ -14,7 +14,6 @@
|
||||
import { Col, Row, Space, Tabs, TabsProps } from 'antd';
|
||||
import classNames from 'classnames';
|
||||
import { CustomPropertyTable } from 'components/common/CustomPropertyTable/CustomPropertyTable';
|
||||
import { CustomPropertyProps } from 'components/common/CustomPropertyTable/CustomPropertyTable.interface';
|
||||
import DescriptionV1 from 'components/common/description/DescriptionV1';
|
||||
import DataAssetsVersionHeader from 'components/DataAssets/DataAssetsVersionHeader/DataAssetsVersionHeader';
|
||||
import EntityVersionTimeLine from 'components/Entity/EntityVersionTimeLine/EntityVersionTimeLine';
|
||||
@ -35,7 +34,6 @@ import {
|
||||
ChangeDescription,
|
||||
Column,
|
||||
ColumnJoins,
|
||||
Table,
|
||||
} from '../../generated/entity/data/table';
|
||||
import { getPartialNameFromTableFQN } from '../../utils/CommonUtils';
|
||||
import {
|
||||
@ -82,7 +80,7 @@ const TableVersion: React.FC<TableVersionProp> = ({
|
||||
);
|
||||
|
||||
const columns = useMemo(() => {
|
||||
const colList = cloneDeep((currentVersionData as Table).columns);
|
||||
const colList = cloneDeep(currentVersionData.columns);
|
||||
|
||||
return getColumnsDataWithVersionChanges<Column>(changeDescription, colList);
|
||||
}, [currentVersionData, changeDescription]);
|
||||
@ -169,10 +167,8 @@ const TableVersion: React.FC<TableVersionProp> = ({
|
||||
columns={columns}
|
||||
deletedColumnConstraintDiffs={deletedColumnConstraintDiffs}
|
||||
deletedTableConstraintDiffs={deletedTableConstraintDiffs}
|
||||
joins={(currentVersionData as Table).joins as ColumnJoins[]}
|
||||
tableConstraints={
|
||||
(currentVersionData as Table).tableConstraints
|
||||
}
|
||||
joins={currentVersionData.joins as ColumnJoins[]}
|
||||
tableConstraints={currentVersionData.tableConstraints}
|
||||
/>
|
||||
</Col>
|
||||
</Row>
|
||||
@ -208,9 +204,7 @@ const TableVersion: React.FC<TableVersionProp> = ({
|
||||
children: (
|
||||
<CustomPropertyTable
|
||||
isVersionView
|
||||
entityDetails={
|
||||
currentVersionData as CustomPropertyProps['entityDetails']
|
||||
}
|
||||
entityDetails={currentVersionData}
|
||||
entityType={EntityType.TABLE}
|
||||
hasEditAccess={false}
|
||||
hasPermission={entityPermissions.ViewAll}
|
||||
|
||||
@ -12,7 +12,6 @@
|
||||
*/
|
||||
|
||||
import { OperationPermission } from 'components/PermissionProvider/PermissionProvider.interface';
|
||||
import { VersionData } from 'pages/EntityVersionPage/EntityVersionPage.component';
|
||||
import { Table } from '../../generated/entity/data/table';
|
||||
import { EntityHistory } from '../../generated/type/entityHistory';
|
||||
import { TagLabel } from '../../generated/type/tagLabel';
|
||||
@ -20,7 +19,7 @@ import { TitleBreadcrumbProps } from '../common/title-breadcrumb/title-breadcrum
|
||||
|
||||
export interface TableVersionProp {
|
||||
version: string;
|
||||
currentVersionData: VersionData;
|
||||
currentVersionData: Table;
|
||||
isVersionLoading: boolean;
|
||||
owner: Table['owner'];
|
||||
domain: Table['domain'];
|
||||
|
||||
@ -48,7 +48,6 @@ import { getTagsWithoutTier, getTierTags } from '../../utils/TableUtils';
|
||||
import { showErrorToast, showSuccessToast } from '../../utils/ToastUtils';
|
||||
import ActivityThreadPanel from '../ActivityFeed/ActivityThreadPanel/ActivityThreadPanel';
|
||||
import { CustomPropertyTable } from '../common/CustomPropertyTable/CustomPropertyTable';
|
||||
import { CustomPropertyProps } from '../common/CustomPropertyTable/CustomPropertyTable.interface';
|
||||
import { TopicDetailsProps } from './TopicDetails.interface';
|
||||
import TopicSchemaFields from './TopicSchema/TopicSchema';
|
||||
|
||||
@ -67,8 +66,8 @@ const TopicDetails: React.FC<TopicDetailsProps> = ({
|
||||
}: TopicDetailsProps) => {
|
||||
const { t } = useTranslation();
|
||||
const { postFeed, deleteFeed, updateFeed } = useActivityFeedProvider();
|
||||
const { topicFQN, tab: activeTab = EntityTabs.SCHEMA } =
|
||||
useParams<{ topicFQN: string; tab: EntityTabs }>();
|
||||
const { fqn: topicFQN, tab: activeTab = EntityTabs.SCHEMA } =
|
||||
useParams<{ fqn: string; tab: EntityTabs }>();
|
||||
const history = useHistory();
|
||||
const [isEdit, setIsEdit] = useState(false);
|
||||
const [threadLink, setThreadLink] = useState<string>('');
|
||||
@ -113,7 +112,10 @@ const TopicDetails: React.FC<TopicDetailsProps> = ({
|
||||
await onTopicUpdate(updatedData, 'displayName');
|
||||
};
|
||||
const onExtensionUpdate = async (updatedData: Topic) => {
|
||||
await onTopicUpdate(updatedData, 'extension');
|
||||
await onTopicUpdate(
|
||||
{ ...topicDetails, extension: updatedData.extension },
|
||||
'extension'
|
||||
);
|
||||
};
|
||||
|
||||
const onThreadLinkSelect = (link: string, threadType?: ThreadType) => {
|
||||
@ -430,7 +432,6 @@ const TopicDetails: React.FC<TopicDetailsProps> = ({
|
||||
key: EntityTabs.CUSTOM_PROPERTIES,
|
||||
children: (
|
||||
<CustomPropertyTable
|
||||
entityDetails={topicDetails as CustomPropertyProps['entityDetails']}
|
||||
entityType={EntityType.TOPIC}
|
||||
handleExtensionUpdate={onExtensionUpdate}
|
||||
hasEditAccess={
|
||||
|
||||
@ -14,7 +14,6 @@
|
||||
import { Col, Row, Space, Tabs, TabsProps, Tag } from 'antd';
|
||||
import classNames from 'classnames';
|
||||
import { CustomPropertyTable } from 'components/common/CustomPropertyTable/CustomPropertyTable';
|
||||
import { CustomPropertyProps } from 'components/common/CustomPropertyTable/CustomPropertyTable.interface';
|
||||
import DescriptionV1 from 'components/common/description/DescriptionV1';
|
||||
import DataAssetsVersionHeader from 'components/DataAssets/DataAssetsVersionHeader/DataAssetsVersionHeader';
|
||||
import EntityVersionTimeLine from 'components/Entity/EntityVersionTimeLine/EntityVersionTimeLine';
|
||||
@ -190,9 +189,7 @@ const TopicVersion: FC<TopicVersionProp> = ({
|
||||
children: (
|
||||
<CustomPropertyTable
|
||||
isVersionView
|
||||
entityDetails={
|
||||
currentVersionData as CustomPropertyProps['entityDetails']
|
||||
}
|
||||
entityDetails={currentVersionData}
|
||||
entityType={EntityType.TOPIC}
|
||||
hasEditAccess={false}
|
||||
hasPermission={entityPermissions.ViewAll}
|
||||
|
||||
@ -12,7 +12,6 @@
|
||||
*/
|
||||
|
||||
import { OperationPermission } from 'components/PermissionProvider/PermissionProvider.interface';
|
||||
import { VersionData } from 'pages/EntityVersionPage/EntityVersionPage.component';
|
||||
import { Topic } from '../../generated/entity/data/topic';
|
||||
import { EntityHistory } from '../../generated/type/entityHistory';
|
||||
import { TagLabel } from '../../generated/type/tagLabel';
|
||||
@ -20,7 +19,7 @@ import { TitleBreadcrumbProps } from '../common/title-breadcrumb/title-breadcrum
|
||||
|
||||
export interface TopicVersionProp {
|
||||
version: string;
|
||||
currentVersionData: VersionData;
|
||||
currentVersionData: Topic;
|
||||
isVersionLoading: boolean;
|
||||
owner: Topic['owner'];
|
||||
domain: Topic['domain'];
|
||||
|
||||
@ -105,7 +105,7 @@ const Users = ({
|
||||
() => (
|
||||
<ActivityFeedProvider user={userData.id}>
|
||||
<ActivityFeedTab
|
||||
entityType={EntityType.USER_NAME}
|
||||
entityType={EntityType.USER}
|
||||
fqn={username}
|
||||
onFeedUpdate={noop}
|
||||
/>
|
||||
|
||||
@ -41,7 +41,7 @@ const UserProfileDetails = ({
|
||||
updateUserDetails,
|
||||
}: UserProfileDetailsProps) => {
|
||||
const { t } = useTranslation();
|
||||
const { username } = useParams<{ [key: string]: string }>();
|
||||
const { fqn: username } = useParams<{ fqn: string }>();
|
||||
|
||||
const { isAdminUser } = useAuth();
|
||||
const { authConfig } = useAuthContext();
|
||||
|
||||
@ -12,6 +12,9 @@
|
||||
*/
|
||||
|
||||
import { Container } from 'generated/entity/data/container';
|
||||
import { Database } from 'generated/entity/data/database';
|
||||
import { DatabaseSchema } from 'generated/entity/data/databaseSchema';
|
||||
import { GlossaryTerm } from 'generated/entity/data/glossaryTerm';
|
||||
import { SearchIndex } from 'generated/entity/data/searchIndex';
|
||||
import { StoredProcedure } from 'generated/entity/data/storedProcedure';
|
||||
import { EntityType } from '../../../enums/entity.enum';
|
||||
@ -21,20 +24,27 @@ import { Pipeline } from '../../../generated/entity/data/pipeline';
|
||||
import { Table } from '../../../generated/entity/data/table';
|
||||
import { Topic } from '../../../generated/entity/data/topic';
|
||||
|
||||
export type EntityDetails = Table &
|
||||
Topic &
|
||||
Dashboard &
|
||||
Pipeline &
|
||||
Mlmodel &
|
||||
Container &
|
||||
SearchIndex &
|
||||
StoredProcedure;
|
||||
export type ExtentionEntities = {
|
||||
[EntityType.TABLE]: Table;
|
||||
[EntityType.TOPIC]: Topic;
|
||||
[EntityType.DASHBOARD]: Dashboard;
|
||||
[EntityType.PIPELINE]: Pipeline;
|
||||
[EntityType.MLMODEL]: Mlmodel;
|
||||
[EntityType.CONTAINER]: Container;
|
||||
[EntityType.SEARCH_INDEX]: SearchIndex;
|
||||
[EntityType.STORED_PROCEDURE]: StoredProcedure;
|
||||
[EntityType.GLOSSARY_TERM]: GlossaryTerm;
|
||||
[EntityType.DATABASE]: Database;
|
||||
[EntityType.DATABASE_SCHEMA]: DatabaseSchema;
|
||||
};
|
||||
|
||||
export interface CustomPropertyProps {
|
||||
export type ExtentionEntitiesKeys = keyof ExtentionEntities;
|
||||
|
||||
export interface CustomPropertyProps<T extends ExtentionEntitiesKeys> {
|
||||
isVersionView?: boolean;
|
||||
entityDetails: EntityDetails;
|
||||
entityType: EntityType;
|
||||
handleExtensionUpdate?: (updatedTable: EntityDetails) => Promise<void>;
|
||||
entityType: T;
|
||||
entityDetails?: ExtentionEntities[T];
|
||||
handleExtensionUpdate?: (updatedTable: ExtentionEntities[T]) => Promise<void>;
|
||||
hasEditAccess: boolean;
|
||||
className?: string;
|
||||
hasPermission: boolean;
|
||||
|
||||
@ -21,7 +21,6 @@ import React from 'react';
|
||||
import { getTypeByFQN } from 'rest/metadataTypeAPI';
|
||||
import { EntityType } from '../../../enums/entity.enum';
|
||||
import { CustomPropertyTable } from './CustomPropertyTable';
|
||||
import { EntityDetails } from './CustomPropertyTable.interface';
|
||||
|
||||
const mockCustomProperties = [
|
||||
{
|
||||
@ -81,11 +80,20 @@ jest.mock('antd', () => ({
|
||||
Skeleton: jest.fn().mockImplementation(() => <div>Skeleton.loader</div>),
|
||||
}));
|
||||
|
||||
const mockTableDetails = {} as EntityDetails;
|
||||
jest.mock('react-router-dom', () => ({
|
||||
...jest.requireActual('react-router-dom'),
|
||||
useParams: jest.fn().mockImplementation(() => ({
|
||||
fqn: 'fqn',
|
||||
})),
|
||||
}));
|
||||
|
||||
jest.mock('utils/CustomProperties/CustomProperty.utils', () => ({
|
||||
getEntityExtentionDetailsFromEntityType: jest.fn(),
|
||||
}));
|
||||
|
||||
const handleExtensionUpdate = jest.fn();
|
||||
|
||||
const mockProp = {
|
||||
entityDetails: mockTableDetails,
|
||||
handleExtensionUpdate,
|
||||
entityType: EntityType.TABLE,
|
||||
hasEditAccess: true,
|
||||
@ -95,7 +103,13 @@ const mockProp = {
|
||||
describe('Test CustomProperty Table Component', () => {
|
||||
it("Should render permission placeholder if doesn't have permission", async () => {
|
||||
await act(async () => {
|
||||
render(<CustomPropertyTable {...mockProp} hasPermission={false} />);
|
||||
render(
|
||||
<CustomPropertyTable
|
||||
{...mockProp}
|
||||
entityType={EntityType.TABLE}
|
||||
hasPermission={false}
|
||||
/>
|
||||
);
|
||||
});
|
||||
const permissionPlaceholder = await screen.findByText(
|
||||
'ErrorPlaceHolder.component'
|
||||
@ -106,7 +120,9 @@ describe('Test CustomProperty Table Component', () => {
|
||||
|
||||
it('Should render table component', async () => {
|
||||
await act(async () => {
|
||||
render(<CustomPropertyTable {...mockProp} />);
|
||||
render(
|
||||
<CustomPropertyTable {...mockProp} entityType={EntityType.TABLE} />
|
||||
);
|
||||
});
|
||||
const table = await screen.findByTestId('custom-properties-table');
|
||||
|
||||
@ -126,7 +142,9 @@ describe('Test CustomProperty Table Component', () => {
|
||||
Promise.resolve({ customProperties: [] })
|
||||
);
|
||||
await act(async () => {
|
||||
render(<CustomPropertyTable {...mockProp} />);
|
||||
render(
|
||||
<CustomPropertyTable {...mockProp} entityType={EntityType.TABLE} />
|
||||
);
|
||||
});
|
||||
const noDataPlaceHolder = await screen.findByText(
|
||||
'ErrorPlaceHolder.component'
|
||||
@ -137,7 +155,7 @@ describe('Test CustomProperty Table Component', () => {
|
||||
|
||||
it('Loader should be shown while loading the custom properties', async () => {
|
||||
(getTypeByFQN as jest.Mock).mockResolvedValueOnce(Promise.resolve({}));
|
||||
render(<CustomPropertyTable {...mockProp} />);
|
||||
render(<CustomPropertyTable {...mockProp} entityType={EntityType.TABLE} />);
|
||||
|
||||
// To check if loader was rendered when the loading state was true and then removed after loading is false
|
||||
await waitForElementToBeRemoved(() => screen.getByText('Skeleton.loader'));
|
||||
|
||||
@ -24,9 +24,11 @@ import { ERROR_PLACEHOLDER_TYPE } from 'enums/common.enum';
|
||||
import { EntityType } from 'enums/entity.enum';
|
||||
import { ChangeDescription } from 'generated/tests/testCase';
|
||||
import { isEmpty, isUndefined } from 'lodash';
|
||||
import React, { FC, useEffect, useMemo, useState } from 'react';
|
||||
import React, { useCallback, useEffect, useMemo, useState } from 'react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { useParams } from 'react-router-dom';
|
||||
import { getTypeByFQN } from 'rest/metadataTypeAPI';
|
||||
import { getEntityExtentionDetailsFromEntityType } from 'utils/CustomProperties/CustomProperty.utils';
|
||||
import { getEntityName } from 'utils/EntityUtils';
|
||||
import {
|
||||
getChangedEntityNewValue,
|
||||
@ -39,27 +41,45 @@ import ErrorPlaceHolder from '../error-with-placeholder/ErrorPlaceHolder';
|
||||
import Table from '../Table/Table';
|
||||
import {
|
||||
CustomPropertyProps,
|
||||
EntityDetails,
|
||||
ExtentionEntities,
|
||||
ExtentionEntitiesKeys,
|
||||
} from './CustomPropertyTable.interface';
|
||||
import { ExtensionTable } from './ExtensionTable';
|
||||
import { PropertyValue } from './PropertyValue';
|
||||
|
||||
export const CustomPropertyTable: FC<CustomPropertyProps> = ({
|
||||
entityDetails,
|
||||
export const CustomPropertyTable = <T extends ExtentionEntitiesKeys>({
|
||||
handleExtensionUpdate,
|
||||
entityType,
|
||||
hasEditAccess,
|
||||
className,
|
||||
isVersionView,
|
||||
hasPermission,
|
||||
}) => {
|
||||
entityDetails,
|
||||
}: CustomPropertyProps<T>) => {
|
||||
const { t } = useTranslation();
|
||||
const { getEntityPermissionByFqn } = usePermissionProvider();
|
||||
const [extentionDetails, setExtentionDetails] =
|
||||
useState<ExtentionEntities[T]>();
|
||||
const [entityTypeDetail, setEntityTypeDetail] = useState<Type>({} as Type);
|
||||
const [entityTypeDetailLoading, setEntityTypeDetailLoading] =
|
||||
useState<boolean>(false);
|
||||
const { fqn } = useParams<{ fqn: string; tab: string; version: string }>();
|
||||
|
||||
const fetchExtentiondetails = async () => {
|
||||
const response = await getEntityExtentionDetailsFromEntityType<T>(
|
||||
entityType,
|
||||
fqn
|
||||
);
|
||||
|
||||
setExtentionDetails(response as ExtentionEntities[T]);
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
fetchExtentiondetails();
|
||||
}, [fqn]);
|
||||
|
||||
const [typePermission, setPermission] = useState<OperationPermission>();
|
||||
const versionDetails = entityDetails ?? extentionDetails;
|
||||
|
||||
const fetchTypeDetail = async () => {
|
||||
setEntityTypeDetailLoading(true);
|
||||
@ -94,23 +114,26 @@ export const CustomPropertyTable: FC<CustomPropertyProps> = ({
|
||||
}
|
||||
};
|
||||
|
||||
const onExtensionUpdate = async (
|
||||
updatedExtension: CustomPropertyProps['entityDetails']['extension']
|
||||
) => {
|
||||
if (!isUndefined(handleExtensionUpdate)) {
|
||||
await handleExtensionUpdate({
|
||||
...entityDetails,
|
||||
extension: updatedExtension,
|
||||
});
|
||||
}
|
||||
};
|
||||
const onExtensionUpdate = useCallback(
|
||||
async (updatedExtension: ExtentionEntities[T]) => {
|
||||
if (!isUndefined(handleExtensionUpdate) && versionDetails) {
|
||||
const updatedData = {
|
||||
...versionDetails,
|
||||
extension: updatedExtension,
|
||||
};
|
||||
await handleExtensionUpdate(updatedData);
|
||||
setExtentionDetails(updatedData);
|
||||
}
|
||||
},
|
||||
[versionDetails]
|
||||
);
|
||||
|
||||
const extensionObject: {
|
||||
extensionObject: EntityDetails['extension'];
|
||||
extensionObject: ExtentionEntities[T];
|
||||
addedKeysList?: string[];
|
||||
} = useMemo(() => {
|
||||
if (isVersionView) {
|
||||
const changeDescription = entityDetails.changeDescription;
|
||||
const changeDescription = versionDetails?.changeDescription;
|
||||
const extensionDiff = getDiffByFieldName(
|
||||
EntityField.EXTENSION,
|
||||
changeDescription as ChangeDescription
|
||||
@ -122,19 +145,19 @@ export const CustomPropertyTable: FC<CustomPropertyProps> = ({
|
||||
const addedFields = JSON.parse(newValues ? newValues : [])[0];
|
||||
if (addedFields) {
|
||||
return {
|
||||
extensionObject: entityDetails.extension,
|
||||
extensionObject: versionDetails?.extension,
|
||||
addedKeysList: Object.keys(addedFields),
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
if (extensionDiff.updated) {
|
||||
return getUpdatedExtensionDiffFields(entityDetails, extensionDiff);
|
||||
if (versionDetails && extensionDiff.updated) {
|
||||
return getUpdatedExtensionDiffFields(versionDetails, extensionDiff);
|
||||
}
|
||||
}
|
||||
|
||||
return { extensionObject: entityDetails.extension };
|
||||
}, [isVersionView, entityDetails]);
|
||||
return { extensionObject: versionDetails?.extension };
|
||||
}, [isVersionView, versionDetails]);
|
||||
|
||||
const tableColumn: ColumnsType<CustomProperty> = useMemo(() => {
|
||||
return [
|
||||
@ -163,7 +186,7 @@ export const CustomPropertyTable: FC<CustomPropertyProps> = ({
|
||||
},
|
||||
];
|
||||
}, [
|
||||
entityDetails.extension,
|
||||
versionDetails?.extension,
|
||||
hasEditAccess,
|
||||
extensionObject,
|
||||
isVersionView,
|
||||
@ -194,7 +217,7 @@ export const CustomPropertyTable: FC<CustomPropertyProps> = ({
|
||||
|
||||
if (
|
||||
isEmpty(entityTypeDetail.customProperties) &&
|
||||
isUndefined(entityDetails.extension)
|
||||
isUndefined(versionDetails?.extension)
|
||||
) {
|
||||
return (
|
||||
<div className="flex-center tab-content-height">
|
||||
@ -210,8 +233,8 @@ export const CustomPropertyTable: FC<CustomPropertyProps> = ({
|
||||
}
|
||||
|
||||
return isEmpty(entityTypeDetail.customProperties) &&
|
||||
!isUndefined(entityDetails.extension) ? (
|
||||
<ExtensionTable extension={entityDetails.extension} />
|
||||
!isUndefined(versionDetails?.extension) ? (
|
||||
<ExtensionTable extension={versionDetails?.extension} />
|
||||
) : (
|
||||
<Table
|
||||
bordered
|
||||
|
||||
@ -16,7 +16,10 @@ import { isString, map } from 'lodash';
|
||||
import React, { useMemo } from 'react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import RichTextEditorPreviewer from '../rich-text-editor/RichTextEditorPreviewer';
|
||||
import { CustomPropertyProps } from './CustomPropertyTable.interface';
|
||||
import {
|
||||
ExtentionEntities,
|
||||
ExtentionEntitiesKeys,
|
||||
} from './CustomPropertyTable.interface';
|
||||
|
||||
interface ExtensionDataSource {
|
||||
name: string;
|
||||
@ -26,7 +29,7 @@ interface ExtensionDataSource {
|
||||
export const ExtensionTable = ({
|
||||
extension,
|
||||
}: {
|
||||
extension: CustomPropertyProps['entityDetails']['extension'];
|
||||
extension: ExtentionEntities[ExtentionEntitiesKeys]['extension'];
|
||||
}) => {
|
||||
const { t } = useTranslation();
|
||||
const dataSource: ExtensionDataSource[] = useMemo(() => {
|
||||
|
||||
@ -11,6 +11,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import Icon from '@ant-design/icons';
|
||||
import { Typography } from 'antd';
|
||||
import { ReactComponent as EditIconComponent } from 'assets/svg/edit-new.svg';
|
||||
import { t } from 'i18next';
|
||||
@ -32,15 +33,6 @@ interface Props {
|
||||
hasEditPermissions: boolean;
|
||||
}
|
||||
|
||||
const EditIcon = ({ onShowInput }: { onShowInput: () => void }) => (
|
||||
<span
|
||||
className="cursor-pointer m-l-xs h-auto mt-2px"
|
||||
data-testid="edit-icon"
|
||||
onClick={onShowInput}>
|
||||
<EditIconComponent height={16} width={16} />
|
||||
</span>
|
||||
);
|
||||
|
||||
export const PropertyValue: FC<Props> = ({
|
||||
isVersionView,
|
||||
versionDataKeys,
|
||||
@ -161,9 +153,15 @@ export const PropertyValue: FC<Props> = ({
|
||||
getPropertyInput()
|
||||
) : (
|
||||
<Fragment>
|
||||
<div className="d-flex">
|
||||
<div className="d-flex gap-2 items-center">
|
||||
{getValueElement()}
|
||||
{hasEditPermissions && <EditIcon onShowInput={onShowInput} />}
|
||||
{hasEditPermissions && (
|
||||
<Icon
|
||||
component={EditIconComponent}
|
||||
data-testid="edit-icon"
|
||||
onClick={onShowInput}
|
||||
/>
|
||||
)}
|
||||
</div>
|
||||
</Fragment>
|
||||
)}
|
||||
|
||||
@ -283,16 +283,6 @@ const AuthenticatedAppRouter: FunctionComponent = () => {
|
||||
[permissions]
|
||||
);
|
||||
|
||||
const glossaryTermPermission = useMemo(
|
||||
() =>
|
||||
userPermissions.hasViewPermissions(
|
||||
ResourceEntity.GLOSSARY_TERM,
|
||||
permissions
|
||||
),
|
||||
|
||||
[permissions]
|
||||
);
|
||||
|
||||
const domainPermission = useMemo(
|
||||
() =>
|
||||
userPermissions.hasViewPermissions(ResourceEntity.DOMAIN, permissions),
|
||||
@ -653,24 +643,12 @@ const AuthenticatedAppRouter: FunctionComponent = () => {
|
||||
/>
|
||||
|
||||
<Route exact component={AddGlossaryPage} path={ROUTES.ADD_GLOSSARY} />
|
||||
<AdminProtectedRoute
|
||||
exact
|
||||
component={GlossaryPage}
|
||||
hasPermission={glossaryTermPermission}
|
||||
path={ROUTES.GLOSSARY_TERMS}
|
||||
/>
|
||||
<AdminProtectedRoute
|
||||
exact
|
||||
component={GlossaryPage}
|
||||
hasPermission={glossaryPermission}
|
||||
path={ROUTES.GLOSSARY_DETAILS_WITH_TAB}
|
||||
/>
|
||||
<AdminProtectedRoute
|
||||
exact
|
||||
component={GlossaryPage}
|
||||
hasPermission={glossaryTermPermission}
|
||||
path={ROUTES.GLOSSARY_TERMS}
|
||||
/>
|
||||
<AdminProtectedRoute
|
||||
exact
|
||||
component={CreateUserPage}
|
||||
|
||||
@ -31,6 +31,8 @@ export enum GlobalSettingOptions {
|
||||
ROLES = 'roles',
|
||||
POLICIES = 'policies',
|
||||
DATABASES = 'databases',
|
||||
DATABASE = 'database',
|
||||
DATABASE_SCHEMA = 'databaseSchema',
|
||||
MESSAGING = 'messaging',
|
||||
METADATA = 'metadata',
|
||||
DASHBOARDS = 'dashboards',
|
||||
@ -47,6 +49,7 @@ export enum GlobalSettingOptions {
|
||||
EMAIL = 'email',
|
||||
ALERTS = 'alerts',
|
||||
ALERT = 'alert',
|
||||
GLOSSARY_TERM = 'glossaryTerm',
|
||||
ADD_ALERTS = 'add-alerts',
|
||||
EDIT_ALERTS = 'edit-alert',
|
||||
STORAGES = 'storages',
|
||||
|
||||
@ -134,6 +134,24 @@ export const PAGE_HEADERS = {
|
||||
entity: i18n.t('label.search-index-plural'),
|
||||
}),
|
||||
},
|
||||
GLOSSARY_TERM_CUSTOM_ATTRIBUTES: {
|
||||
header: i18n.t('label.glossary-term'),
|
||||
subHeader: i18n.t('message.define-custom-property-for-entity', {
|
||||
entity: i18n.t('label.glossary-term'),
|
||||
}),
|
||||
},
|
||||
DATABASE_CUSTOM_ATTRIBUTES: {
|
||||
header: i18n.t('label.database'),
|
||||
subHeader: i18n.t('message.define-custom-property-for-entity', {
|
||||
entity: i18n.t('label.database'),
|
||||
}),
|
||||
},
|
||||
DATABASE_SCHEMA_CUSTOM_ATTRIBUTES: {
|
||||
header: i18n.t('label.database-schema'),
|
||||
subHeader: i18n.t('message.define-custom-property-for-entity', {
|
||||
entity: i18n.t('label.database-schema'),
|
||||
}),
|
||||
},
|
||||
BOTS: {
|
||||
header: i18n.t('label.bot-plural'),
|
||||
subHeader: i18n.t('message.page-sub-header-for-bots'),
|
||||
|
||||
@ -88,17 +88,7 @@ export const NO_DATA = '-';
|
||||
|
||||
export const TOUR_SEARCH_TERM = 'dim_a';
|
||||
export const ERROR500 = t('message.something-went-wrong');
|
||||
export const PLACEHOLDER_ROUTE_TABLE_FQN = ':datasetFQN';
|
||||
|
||||
const PLACEHOLDER_ROUTE_TOPIC_FQN = ':topicFQN';
|
||||
const PLACEHOLDER_ROUTE_PIPELINE_FQN = ':pipelineFQN';
|
||||
const PLACEHOLDER_ROUTE_DASHBOARD_FQN = ':dashboardFQN';
|
||||
|
||||
export const PLACEHOLDER_ROUTE_DATABASE_FQN = ':databaseFQN';
|
||||
export const PLACEHOLDER_ROUTE_DATABASE_SCHEMA_FQN = ':databaseSchemaFQN';
|
||||
|
||||
export const PLACEHOLDER_ROUTE_TEST_CASE_FQN = ':testCaseFQN';
|
||||
export const PLACEHOLDER_ROUTE_SERVICE_FQN = ':serviceFQN';
|
||||
export const PLACEHOLDER_ROUTE_INGESTION_TYPE = ':ingestionType';
|
||||
export const PLACEHOLDER_ROUTE_INGESTION_FQN = ':ingestionFQN';
|
||||
export const PLACEHOLDER_ROUTE_SERVICE_CAT = ':serviceCategory';
|
||||
@ -108,31 +98,21 @@ export const PLACEHOLDER_ROUTE_FQN = ':fqn';
|
||||
export const PLACEHOLDER_ROUTE_TEAM_AND_USER = ':teamAndUser';
|
||||
export const PLACEHOLDER_ROUTE_VERSION = ':version';
|
||||
export const PLACEHOLDER_ROUTE_ENTITY_TYPE = ':entityType';
|
||||
export const PLACEHOLDER_ROUTE_ENTITY_FQN = ':entityFQN';
|
||||
|
||||
export const PLACEHOLDER_ROUTE_QUERY_ID = ':queryId';
|
||||
export const PLACEHOLDER_WEBHOOK_NAME = ':webhookName';
|
||||
export const PLACEHOLDER_GLOSSARY_NAME = ':glossaryName';
|
||||
export const PLACEHOLDER_GLOSSARY_TERMS_FQN = ':glossaryTermsFQN';
|
||||
export const PLACEHOLDER_USER_NAME = ':username';
|
||||
export const PLACEHOLDER_BOTS_NAME = ':botsName';
|
||||
export const PLACEHOLDER_ROUTE_MLMODEL_FQN = ':mlModelFqn';
|
||||
export const PLACEHOLDER_ENTITY_TYPE_FQN = ':entityTypeFQN';
|
||||
export const PLACEHOLDER_TASK_ID = ':taskId';
|
||||
export const PLACEHOLDER_TAG_NAME = ':tagCategoryName';
|
||||
export const PLACEHOLDER_SETTING_CATEGORY = ':settingCategory';
|
||||
export const PLACEHOLDER_USER_BOT = ':bot';
|
||||
export const PLACEHOLDER_WEBHOOK_TYPE = ':webhookType';
|
||||
export const PLACEHOLDER_RULE_NAME = ':ruleName';
|
||||
export const PLACEHOLDER_DASHBOARD_TYPE = ':dashboardType';
|
||||
export const PLACEHOLDER_TEST_SUITE_FQN = ':testSuiteFQN';
|
||||
export const LOG_ENTITY_TYPE = ':logEntityType';
|
||||
export const INGESTION_NAME = ':ingestionName';
|
||||
export const LOG_ENTITY_NAME = ':logEntityName';
|
||||
export const KPI_NAME = ':kpiName';
|
||||
export const PLACEHOLDER_ACTION = ':action';
|
||||
export const PLACEHOLDER_ROUTE_DATA_MODEL_FQN = ':dashboardDataModelFQN';
|
||||
export const PLACEHOLDER_ROUTE_SEARCH_INDEX_FQN = ':searchIndexFQN';
|
||||
export const PLACEHOLDER_ROUTE_STORED_PROCEDURE_FQN = ':storedProcedureFQN';
|
||||
|
||||
export const pagingObject = { after: '', before: '', total: 0 };
|
||||
|
||||
@ -201,20 +181,20 @@ export const ROUTES = {
|
||||
STORE: '/store',
|
||||
FEEDS: '/feeds',
|
||||
DUMMY: '/dummy',
|
||||
SERVICE: `/service/${PLACEHOLDER_ROUTE_SERVICE_CAT}/${PLACEHOLDER_ROUTE_SERVICE_FQN}`,
|
||||
SERVICE_VERSION: `/service/${PLACEHOLDER_ROUTE_SERVICE_CAT}/${PLACEHOLDER_ROUTE_SERVICE_FQN}/versions/${PLACEHOLDER_ROUTE_VERSION}`,
|
||||
SERVICE_WITH_TAB: `/service/${PLACEHOLDER_ROUTE_SERVICE_CAT}/${PLACEHOLDER_ROUTE_SERVICE_FQN}/${PLACEHOLDER_ROUTE_TAB}`,
|
||||
SERVICE: `/service/${PLACEHOLDER_ROUTE_SERVICE_CAT}/${PLACEHOLDER_ROUTE_FQN}`,
|
||||
SERVICE_VERSION: `/service/${PLACEHOLDER_ROUTE_SERVICE_CAT}/${PLACEHOLDER_ROUTE_FQN}/versions/${PLACEHOLDER_ROUTE_VERSION}`,
|
||||
SERVICE_WITH_TAB: `/service/${PLACEHOLDER_ROUTE_SERVICE_CAT}/${PLACEHOLDER_ROUTE_FQN}/${PLACEHOLDER_ROUTE_TAB}`,
|
||||
ADD_SERVICE: `/${PLACEHOLDER_ROUTE_SERVICE_CAT}/add-service`,
|
||||
EDIT_SERVICE_CONNECTION: `/service/${PLACEHOLDER_ROUTE_SERVICE_CAT}/${PLACEHOLDER_ROUTE_SERVICE_FQN}/${PLACEHOLDER_ROUTE_TAB}/edit-connection`,
|
||||
EDIT_SERVICE_CONNECTION: `/service/${PLACEHOLDER_ROUTE_SERVICE_CAT}/${PLACEHOLDER_ROUTE_FQN}/${PLACEHOLDER_ROUTE_TAB}/edit-connection`,
|
||||
SERVICES_WITH_TAB: `/services/${PLACEHOLDER_ROUTE_SERVICE_CAT}`,
|
||||
ADD_INGESTION: `/service/${PLACEHOLDER_ROUTE_SERVICE_CAT}/${PLACEHOLDER_ROUTE_SERVICE_FQN}/add-ingestion/${PLACEHOLDER_ROUTE_INGESTION_TYPE}`,
|
||||
EDIT_INGESTION: `/service/${PLACEHOLDER_ROUTE_SERVICE_CAT}/${PLACEHOLDER_ROUTE_SERVICE_FQN}/edit-ingestion/${PLACEHOLDER_ROUTE_INGESTION_FQN}/${PLACEHOLDER_ROUTE_INGESTION_TYPE}`,
|
||||
ADD_INGESTION: `/service/${PLACEHOLDER_ROUTE_SERVICE_CAT}/${PLACEHOLDER_ROUTE_FQN}/add-ingestion/${PLACEHOLDER_ROUTE_INGESTION_TYPE}`,
|
||||
EDIT_INGESTION: `/service/${PLACEHOLDER_ROUTE_SERVICE_CAT}/${PLACEHOLDER_ROUTE_FQN}/edit-ingestion/${PLACEHOLDER_ROUTE_INGESTION_FQN}/${PLACEHOLDER_ROUTE_INGESTION_TYPE}`,
|
||||
USERS: '/users',
|
||||
SCORECARD: '/scorecard',
|
||||
SWAGGER: '/docs',
|
||||
TAGS: '/tags',
|
||||
TAG_DETAILS: `/tags/${PLACEHOLDER_TAG_NAME}`,
|
||||
TAG_VERSION: `/tags/${PLACEHOLDER_TAG_NAME}/versions/${PLACEHOLDER_ROUTE_VERSION}`,
|
||||
TAG_DETAILS: `/tags/${PLACEHOLDER_ROUTE_FQN}`,
|
||||
TAG_VERSION: `/tags/${PLACEHOLDER_ROUTE_FQN}/versions/${PLACEHOLDER_ROUTE_VERSION}`,
|
||||
SIGNUP: '/signup',
|
||||
REGISTER: '/register',
|
||||
SIGNIN: '/signin',
|
||||
@ -222,58 +202,58 @@ export const ROUTES = {
|
||||
RESET_PASSWORD: '/users/password/reset',
|
||||
ACCOUNT_ACTIVATION: '/users/registrationConfirmation',
|
||||
|
||||
TABLE_DETAILS: `/table/${PLACEHOLDER_ROUTE_TABLE_FQN}`,
|
||||
TABLE_DETAILS_WITH_TAB: `/table/${PLACEHOLDER_ROUTE_TABLE_FQN}/${PLACEHOLDER_ROUTE_TAB}`,
|
||||
ENTITY_VERSION: `/${PLACEHOLDER_ROUTE_ENTITY_TYPE}/${PLACEHOLDER_ROUTE_ENTITY_FQN}/versions/${PLACEHOLDER_ROUTE_VERSION}`,
|
||||
ENTITY_VERSION_WITH_TAB: `/${PLACEHOLDER_ROUTE_ENTITY_TYPE}/${PLACEHOLDER_ROUTE_ENTITY_FQN}/versions/${PLACEHOLDER_ROUTE_VERSION}/${PLACEHOLDER_ROUTE_TAB}`,
|
||||
TABLE_DETAILS_WITH_SUB_TAB: `/table/${PLACEHOLDER_ROUTE_TABLE_FQN}/${PLACEHOLDER_ROUTE_TAB}/${PLACEHOLDER_ROUTE_SUB_TAB}`,
|
||||
TABLE_DETAILS: `/table/${PLACEHOLDER_ROUTE_FQN}`,
|
||||
TABLE_DETAILS_WITH_TAB: `/table/${PLACEHOLDER_ROUTE_FQN}/${PLACEHOLDER_ROUTE_TAB}`,
|
||||
ENTITY_VERSION: `/${PLACEHOLDER_ROUTE_ENTITY_TYPE}/${PLACEHOLDER_ROUTE_FQN}/versions/${PLACEHOLDER_ROUTE_VERSION}`,
|
||||
ENTITY_VERSION_WITH_TAB: `/${PLACEHOLDER_ROUTE_ENTITY_TYPE}/${PLACEHOLDER_ROUTE_FQN}/versions/${PLACEHOLDER_ROUTE_VERSION}/${PLACEHOLDER_ROUTE_TAB}`,
|
||||
TABLE_DETAILS_WITH_SUB_TAB: `/table/${PLACEHOLDER_ROUTE_FQN}/${PLACEHOLDER_ROUTE_TAB}/${PLACEHOLDER_ROUTE_SUB_TAB}`,
|
||||
|
||||
TOPIC_DETAILS: `/topic/${PLACEHOLDER_ROUTE_TOPIC_FQN}`,
|
||||
TOPIC_DETAILS_WITH_TAB: `/topic/${PLACEHOLDER_ROUTE_TOPIC_FQN}/${PLACEHOLDER_ROUTE_TAB}`,
|
||||
TOPIC_DETAILS_WITH_SUB_TAB: `/topic/${PLACEHOLDER_ROUTE_TOPIC_FQN}/${PLACEHOLDER_ROUTE_TAB}/${PLACEHOLDER_ROUTE_SUB_TAB}`,
|
||||
DASHBOARD_DETAILS: `/dashboard/${PLACEHOLDER_ROUTE_DASHBOARD_FQN}`,
|
||||
DASHBOARD_DETAILS_WITH_TAB: `/dashboard/${PLACEHOLDER_ROUTE_DASHBOARD_FQN}/${PLACEHOLDER_ROUTE_TAB}`,
|
||||
DASHBOARD_DETAILS_WITH_SUB_TAB: `/dashboard/${PLACEHOLDER_ROUTE_DASHBOARD_FQN}/${PLACEHOLDER_ROUTE_TAB}/${PLACEHOLDER_ROUTE_SUB_TAB}`,
|
||||
TOPIC_DETAILS: `/topic/${PLACEHOLDER_ROUTE_FQN}`,
|
||||
TOPIC_DETAILS_WITH_TAB: `/topic/${PLACEHOLDER_ROUTE_FQN}/${PLACEHOLDER_ROUTE_TAB}`,
|
||||
TOPIC_DETAILS_WITH_SUB_TAB: `/topic/${PLACEHOLDER_ROUTE_FQN}/${PLACEHOLDER_ROUTE_TAB}/${PLACEHOLDER_ROUTE_SUB_TAB}`,
|
||||
DASHBOARD_DETAILS: `/dashboard/${PLACEHOLDER_ROUTE_FQN}`,
|
||||
DASHBOARD_DETAILS_WITH_TAB: `/dashboard/${PLACEHOLDER_ROUTE_FQN}/${PLACEHOLDER_ROUTE_TAB}`,
|
||||
DASHBOARD_DETAILS_WITH_SUB_TAB: `/dashboard/${PLACEHOLDER_ROUTE_FQN}/${PLACEHOLDER_ROUTE_TAB}/${PLACEHOLDER_ROUTE_SUB_TAB}`,
|
||||
|
||||
DATA_MODEL_DETAILS: `/dashboardDataModel/${PLACEHOLDER_ROUTE_DATA_MODEL_FQN}`,
|
||||
DATA_MODEL_DETAILS_WITH_TAB: `/dashboardDataModel/${PLACEHOLDER_ROUTE_DATA_MODEL_FQN}/${PLACEHOLDER_ROUTE_TAB}`,
|
||||
DATA_MODEL_DETAILS_WITH_SUB_TAB: `/dashboardDataModel/${PLACEHOLDER_ROUTE_DATA_MODEL_FQN}/${PLACEHOLDER_ROUTE_TAB}/${PLACEHOLDER_ROUTE_SUB_TAB}`,
|
||||
DATA_MODEL_DETAILS: `/dashboardDataModel/${PLACEHOLDER_ROUTE_FQN}`,
|
||||
DATA_MODEL_DETAILS_WITH_TAB: `/dashboardDataModel/${PLACEHOLDER_ROUTE_FQN}/${PLACEHOLDER_ROUTE_TAB}`,
|
||||
DATA_MODEL_DETAILS_WITH_SUB_TAB: `/dashboardDataModel/${PLACEHOLDER_ROUTE_FQN}/${PLACEHOLDER_ROUTE_TAB}/${PLACEHOLDER_ROUTE_SUB_TAB}`,
|
||||
|
||||
DATABASE_DETAILS: `/database/${PLACEHOLDER_ROUTE_DATABASE_FQN}`,
|
||||
DATABASE_VERSION: `/database/${PLACEHOLDER_ROUTE_DATABASE_FQN}/versions/${PLACEHOLDER_ROUTE_VERSION}`,
|
||||
DATABASE_DETAILS_WITH_TAB: `/database/${PLACEHOLDER_ROUTE_DATABASE_FQN}/${PLACEHOLDER_ROUTE_TAB}`,
|
||||
DATABASE_DETAILS_WITH_SUB_TAB: `/database/${PLACEHOLDER_ROUTE_DATABASE_FQN}/${PLACEHOLDER_ROUTE_TAB}/${PLACEHOLDER_ROUTE_SUB_TAB}`,
|
||||
DATABASE_DETAILS: `/database/${PLACEHOLDER_ROUTE_FQN}`,
|
||||
DATABASE_VERSION: `/database/${PLACEHOLDER_ROUTE_FQN}/versions/${PLACEHOLDER_ROUTE_VERSION}/${PLACEHOLDER_ROUTE_TAB}`,
|
||||
DATABASE_DETAILS_WITH_TAB: `/database/${PLACEHOLDER_ROUTE_FQN}/${PLACEHOLDER_ROUTE_TAB}`,
|
||||
DATABASE_DETAILS_WITH_SUB_TAB: `/database/${PLACEHOLDER_ROUTE_FQN}/${PLACEHOLDER_ROUTE_TAB}/${PLACEHOLDER_ROUTE_SUB_TAB}`,
|
||||
|
||||
SCHEMA_DETAILS: `/databaseSchema/${PLACEHOLDER_ROUTE_DATABASE_SCHEMA_FQN}`,
|
||||
SCHEMA_VERSION: `/databaseSchema/${PLACEHOLDER_ROUTE_DATABASE_SCHEMA_FQN}/versions/${PLACEHOLDER_ROUTE_VERSION}`,
|
||||
SCHEMA_DETAILS_WITH_TAB: `/databaseSchema/${PLACEHOLDER_ROUTE_DATABASE_SCHEMA_FQN}/${PLACEHOLDER_ROUTE_TAB}`,
|
||||
SCHEMA_DETAILS_WITH_SUB_TAB: `/databaseSchema/${PLACEHOLDER_ROUTE_DATABASE_SCHEMA_FQN}/${PLACEHOLDER_ROUTE_TAB}/${PLACEHOLDER_ROUTE_SUB_TAB}`,
|
||||
SCHEMA_DETAILS: `/databaseSchema/${PLACEHOLDER_ROUTE_FQN}`,
|
||||
SCHEMA_VERSION: `/databaseSchema/${PLACEHOLDER_ROUTE_FQN}/versions/${PLACEHOLDER_ROUTE_VERSION}/${PLACEHOLDER_ROUTE_TAB}`,
|
||||
SCHEMA_DETAILS_WITH_TAB: `/databaseSchema/${PLACEHOLDER_ROUTE_FQN}/${PLACEHOLDER_ROUTE_TAB}`,
|
||||
SCHEMA_DETAILS_WITH_SUB_TAB: `/databaseSchema/${PLACEHOLDER_ROUTE_FQN}/${PLACEHOLDER_ROUTE_TAB}/${PLACEHOLDER_ROUTE_SUB_TAB}`,
|
||||
|
||||
PIPELINE_DETAILS: `/pipeline/${PLACEHOLDER_ROUTE_PIPELINE_FQN}`,
|
||||
PIPELINE_DETAILS_WITH_TAB: `/pipeline/${PLACEHOLDER_ROUTE_PIPELINE_FQN}/${PLACEHOLDER_ROUTE_TAB}`,
|
||||
PIPELINE_DETAILS_WITH_SUB_TAB: `/pipeline/${PLACEHOLDER_ROUTE_PIPELINE_FQN}/${PLACEHOLDER_ROUTE_TAB}/${PLACEHOLDER_ROUTE_SUB_TAB}`,
|
||||
PIPELINE_DETAILS: `/pipeline/${PLACEHOLDER_ROUTE_FQN}`,
|
||||
PIPELINE_DETAILS_WITH_TAB: `/pipeline/${PLACEHOLDER_ROUTE_FQN}/${PLACEHOLDER_ROUTE_TAB}`,
|
||||
PIPELINE_DETAILS_WITH_SUB_TAB: `/pipeline/${PLACEHOLDER_ROUTE_FQN}/${PLACEHOLDER_ROUTE_TAB}/${PLACEHOLDER_ROUTE_SUB_TAB}`,
|
||||
|
||||
MLMODEL_DETAILS: `/mlmodel/${PLACEHOLDER_ROUTE_MLMODEL_FQN}`,
|
||||
MLMODEL_DETAILS_WITH_TAB: `/mlmodel/${PLACEHOLDER_ROUTE_MLMODEL_FQN}/${PLACEHOLDER_ROUTE_TAB}`,
|
||||
MLMODEL_DETAILS_WITH_SUB_TAB: `/mlmodel/${PLACEHOLDER_ROUTE_MLMODEL_FQN}/${PLACEHOLDER_ROUTE_TAB}/${PLACEHOLDER_ROUTE_SUB_TAB}`,
|
||||
MLMODEL_DETAILS: `/mlmodel/${PLACEHOLDER_ROUTE_FQN}`,
|
||||
MLMODEL_DETAILS_WITH_TAB: `/mlmodel/${PLACEHOLDER_ROUTE_FQN}/${PLACEHOLDER_ROUTE_TAB}`,
|
||||
MLMODEL_DETAILS_WITH_SUB_TAB: `/mlmodel/${PLACEHOLDER_ROUTE_FQN}/${PLACEHOLDER_ROUTE_TAB}/${PLACEHOLDER_ROUTE_SUB_TAB}`,
|
||||
|
||||
CONTAINER_DETAILS: `/container/${PLACEHOLDER_ROUTE_ENTITY_FQN}`,
|
||||
CONTAINER_DETAILS_WITH_TAB: `/container/${PLACEHOLDER_ROUTE_ENTITY_FQN}/${PLACEHOLDER_ROUTE_TAB}`,
|
||||
CONTAINER_DETAILS_WITH_SUB_TAB: `/container/${PLACEHOLDER_ROUTE_ENTITY_FQN}/${PLACEHOLDER_ROUTE_TAB}/${PLACEHOLDER_ROUTE_SUB_TAB}`,
|
||||
CONTAINER_DETAILS: `/container/${PLACEHOLDER_ROUTE_FQN}`,
|
||||
CONTAINER_DETAILS_WITH_TAB: `/container/${PLACEHOLDER_ROUTE_FQN}/${PLACEHOLDER_ROUTE_TAB}`,
|
||||
CONTAINER_DETAILS_WITH_SUB_TAB: `/container/${PLACEHOLDER_ROUTE_FQN}/${PLACEHOLDER_ROUTE_TAB}/${PLACEHOLDER_ROUTE_SUB_TAB}`,
|
||||
|
||||
SEARCH_INDEX_DETAILS: `/searchIndex/${PLACEHOLDER_ROUTE_SEARCH_INDEX_FQN}`,
|
||||
SEARCH_INDEX_DETAILS_WITH_TAB: `/searchIndex/${PLACEHOLDER_ROUTE_SEARCH_INDEX_FQN}/${PLACEHOLDER_ROUTE_TAB}`,
|
||||
SEARCH_INDEX_DETAILS_WITH_SUB_TAB: `/searchIndex/${PLACEHOLDER_ROUTE_SEARCH_INDEX_FQN}/${PLACEHOLDER_ROUTE_TAB}/${PLACEHOLDER_ROUTE_SUB_TAB}`,
|
||||
STORED_PROCEDURE_DETAILS: `/storedProcedure/${PLACEHOLDER_ROUTE_STORED_PROCEDURE_FQN}`,
|
||||
STORED_PROCEDURE_DETAILS_WITH_TAB: `/storedProcedure/${PLACEHOLDER_ROUTE_STORED_PROCEDURE_FQN}/${PLACEHOLDER_ROUTE_TAB}`,
|
||||
STORED_PROCEDURE_DETAILS_WITH_SUB_TAB: `/storedProcedure/${PLACEHOLDER_ROUTE_STORED_PROCEDURE_FQN}/${PLACEHOLDER_ROUTE_TAB}/${PLACEHOLDER_ROUTE_SUB_TAB}`,
|
||||
SEARCH_INDEX_DETAILS: `/searchIndex/${PLACEHOLDER_ROUTE_FQN}`,
|
||||
SEARCH_INDEX_DETAILS_WITH_TAB: `/searchIndex/${PLACEHOLDER_ROUTE_FQN}/${PLACEHOLDER_ROUTE_TAB}`,
|
||||
SEARCH_INDEX_DETAILS_WITH_SUB_TAB: `/searchIndex/${PLACEHOLDER_ROUTE_FQN}/${PLACEHOLDER_ROUTE_TAB}/${PLACEHOLDER_ROUTE_SUB_TAB}`,
|
||||
STORED_PROCEDURE_DETAILS: `/storedProcedure/${PLACEHOLDER_ROUTE_FQN}`,
|
||||
STORED_PROCEDURE_DETAILS_WITH_TAB: `/storedProcedure/${PLACEHOLDER_ROUTE_FQN}/${PLACEHOLDER_ROUTE_TAB}`,
|
||||
STORED_PROCEDURE_DETAILS_WITH_SUB_TAB: `/storedProcedure/${PLACEHOLDER_ROUTE_FQN}/${PLACEHOLDER_ROUTE_TAB}/${PLACEHOLDER_ROUTE_SUB_TAB}`,
|
||||
|
||||
USER_LIST: '/user-list',
|
||||
CREATE_USER: '/create-user',
|
||||
CREATE_USER_WITH_BOT: `/create-user/${PLACEHOLDER_USER_BOT}`,
|
||||
USER_PROFILE: `/users/${PLACEHOLDER_USER_NAME}`,
|
||||
USER_PROFILE_WITH_TAB: `/users/${PLACEHOLDER_USER_NAME}/${PLACEHOLDER_ROUTE_TAB}`,
|
||||
USER_PROFILE_WITH_SUB_TAB: `/users/${PLACEHOLDER_USER_NAME}/${PLACEHOLDER_ROUTE_TAB}/${PLACEHOLDER_ROUTE_SUB_TAB}`,
|
||||
USER_PROFILE: `/users/${PLACEHOLDER_ROUTE_FQN}`,
|
||||
USER_PROFILE_WITH_TAB: `/users/${PLACEHOLDER_ROUTE_FQN}/${PLACEHOLDER_ROUTE_TAB}`,
|
||||
USER_PROFILE_WITH_SUB_TAB: `/users/${PLACEHOLDER_ROUTE_FQN}/${PLACEHOLDER_ROUTE_TAB}/${PLACEHOLDER_ROUTE_SUB_TAB}`,
|
||||
|
||||
ROLES: '/roles',
|
||||
ADD_WEBHOOK: '/add-webhook/',
|
||||
@ -292,16 +272,14 @@ export const ROUTES = {
|
||||
|
||||
GLOSSARY: '/glossary',
|
||||
ADD_GLOSSARY: '/add-glossary',
|
||||
GLOSSARY_DETAILS: `/glossary/${PLACEHOLDER_GLOSSARY_NAME}`,
|
||||
GLOSSARY_DETAILS_WITH_ACTION: `/glossary/${PLACEHOLDER_GLOSSARY_NAME}/action/${PLACEHOLDER_ACTION}`,
|
||||
ADD_GLOSSARY_TERMS: `/glossary/${PLACEHOLDER_GLOSSARY_NAME}/add-term`,
|
||||
GLOSSARY_DETAILS_WITH_TAB: `/glossary/${PLACEHOLDER_GLOSSARY_NAME}/${PLACEHOLDER_ROUTE_TAB}`,
|
||||
GLOSSARY_VERSION: `/glossary/${PLACEHOLDER_GLOSSARY_NAME}/versions/${PLACEHOLDER_ROUTE_VERSION}`,
|
||||
GLOSSARY_TERMS: `/glossary/${PLACEHOLDER_GLOSSARY_NAME}/term/${PLACEHOLDER_GLOSSARY_TERMS_FQN}/${PLACEHOLDER_ROUTE_TAB}`,
|
||||
GLOSSARY_TERMS_VERSION: `/glossary-term/${PLACEHOLDER_GLOSSARY_NAME}/versions/${PLACEHOLDER_ROUTE_VERSION}`,
|
||||
GLOSSARY_TERMS_VERSION_TAB: `/glossary-term/${PLACEHOLDER_GLOSSARY_NAME}/versions/${PLACEHOLDER_ROUTE_VERSION}/${PLACEHOLDER_ROUTE_TAB}`,
|
||||
ADD_GLOSSARY_TERMS_CHILD: `/glossary/${PLACEHOLDER_GLOSSARY_NAME}/term/${PLACEHOLDER_GLOSSARY_TERMS_FQN}/add-term`,
|
||||
BOTS_PROFILE: `/bots/${PLACEHOLDER_BOTS_NAME}`,
|
||||
GLOSSARY_DETAILS: `/glossary/${PLACEHOLDER_ROUTE_FQN}`,
|
||||
GLOSSARY_DETAILS_WITH_ACTION: `/glossary/${PLACEHOLDER_ROUTE_FQN}/action/${PLACEHOLDER_ACTION}`,
|
||||
ADD_GLOSSARY_TERMS: `/glossary/${PLACEHOLDER_ROUTE_FQN}/add-term`,
|
||||
GLOSSARY_DETAILS_WITH_TAB: `/glossary/${PLACEHOLDER_ROUTE_FQN}/${PLACEHOLDER_ROUTE_TAB}`,
|
||||
GLOSSARY_VERSION: `/glossary/${PLACEHOLDER_ROUTE_FQN}/versions/${PLACEHOLDER_ROUTE_VERSION}`,
|
||||
GLOSSARY_TERMS_VERSION: `/glossary-term/${PLACEHOLDER_ROUTE_FQN}/versions/${PLACEHOLDER_ROUTE_VERSION}`,
|
||||
GLOSSARY_TERMS_VERSION_TAB: `/glossary-term/${PLACEHOLDER_ROUTE_FQN}/versions/${PLACEHOLDER_ROUTE_VERSION}/${PLACEHOLDER_ROUTE_TAB}`,
|
||||
BOTS_PROFILE: `/bots/${PLACEHOLDER_ROUTE_FQN}`,
|
||||
|
||||
CUSTOM_ENTITY_DETAIL: `/custom-properties/${PLACEHOLDER_ENTITY_TYPE_FQN}`,
|
||||
ADD_CUSTOM_PROPERTY: `/custom-properties/${PLACEHOLDER_ENTITY_TYPE_FQN}/add-field`,
|
||||
@ -310,15 +288,15 @@ export const ROUTES = {
|
||||
ADD_DATA_QUALITY_TEST_CASE: `/data-quality-test/${PLACEHOLDER_DASHBOARD_TYPE}/${PLACEHOLDER_ENTITY_TYPE_FQN}`,
|
||||
|
||||
// Query Routes
|
||||
QUERY_FULL_SCREEN_VIEW: `/query-view/${PLACEHOLDER_ROUTE_TABLE_FQN}/${PLACEHOLDER_ROUTE_QUERY_ID}`,
|
||||
TEST_CASE_DETAILS: `/test-case/${PLACEHOLDER_ROUTE_TEST_CASE_FQN}`,
|
||||
ADD_QUERY: `/query/${PLACEHOLDER_ROUTE_TABLE_FQN}/add-query`,
|
||||
QUERY_FULL_SCREEN_VIEW: `/query-view/${PLACEHOLDER_ROUTE_FQN}/${PLACEHOLDER_ROUTE_QUERY_ID}`,
|
||||
TEST_CASE_DETAILS: `/test-case/${PLACEHOLDER_ROUTE_FQN}`,
|
||||
ADD_QUERY: `/query/${PLACEHOLDER_ROUTE_FQN}/add-query`,
|
||||
|
||||
// Tasks Routes
|
||||
REQUEST_DESCRIPTION: `/request-description/${PLACEHOLDER_ROUTE_ENTITY_TYPE}/${PLACEHOLDER_ROUTE_ENTITY_FQN}`,
|
||||
REQUEST_TAGS: `/request-tags/${PLACEHOLDER_ROUTE_ENTITY_TYPE}/${PLACEHOLDER_ROUTE_ENTITY_FQN}`,
|
||||
UPDATE_DESCRIPTION: `/update-description/${PLACEHOLDER_ROUTE_ENTITY_TYPE}/${PLACEHOLDER_ROUTE_ENTITY_FQN}`,
|
||||
UPDATE_TAGS: `/update-tags/${PLACEHOLDER_ROUTE_ENTITY_TYPE}/${PLACEHOLDER_ROUTE_ENTITY_FQN}`,
|
||||
REQUEST_DESCRIPTION: `/request-description/${PLACEHOLDER_ROUTE_ENTITY_TYPE}/${PLACEHOLDER_ROUTE_FQN}`,
|
||||
REQUEST_TAGS: `/request-tags/${PLACEHOLDER_ROUTE_ENTITY_TYPE}/${PLACEHOLDER_ROUTE_FQN}`,
|
||||
UPDATE_DESCRIPTION: `/update-description/${PLACEHOLDER_ROUTE_ENTITY_TYPE}/${PLACEHOLDER_ROUTE_FQN}`,
|
||||
UPDATE_TAGS: `/update-tags/${PLACEHOLDER_ROUTE_ENTITY_TYPE}/${PLACEHOLDER_ROUTE_FQN}`,
|
||||
TASK_DETAIL: `/tasks/${PLACEHOLDER_TASK_ID}`,
|
||||
|
||||
ACTIVITY_PUSH_FEED: '/api/v1/push/feed',
|
||||
@ -328,9 +306,9 @@ export const ROUTES = {
|
||||
EDIT_POLICY_RULE: `/settings/access/policies/${PLACEHOLDER_ROUTE_FQN}/edit-rule/${PLACEHOLDER_RULE_NAME}`,
|
||||
|
||||
// test suites
|
||||
TEST_SUITES_WITH_FQN: `/test-suites/${PLACEHOLDER_TEST_SUITE_FQN}`,
|
||||
TEST_SUITES_ADD_INGESTION: `/test-suites/${PLACEHOLDER_TEST_SUITE_FQN}/add-ingestion`,
|
||||
TEST_SUITES_EDIT_INGESTION: `/test-suites/${PLACEHOLDER_TEST_SUITE_FQN}/edit-ingestion/${PLACEHOLDER_ROUTE_INGESTION_FQN}`,
|
||||
TEST_SUITES_WITH_FQN: `/test-suites/${PLACEHOLDER_ROUTE_FQN}`,
|
||||
TEST_SUITES_ADD_INGESTION: `/test-suites/${PLACEHOLDER_ROUTE_FQN}/add-ingestion`,
|
||||
TEST_SUITES_EDIT_INGESTION: `/test-suites/${PLACEHOLDER_ROUTE_FQN}/edit-ingestion/${PLACEHOLDER_ROUTE_INGESTION_FQN}`,
|
||||
ADD_TEST_SUITES: `/add-test-suites`,
|
||||
|
||||
// data quality
|
||||
@ -362,7 +340,7 @@ export const IN_PAGE_SEARCH_ROUTES: Record<string, Array<string>> = {
|
||||
|
||||
export const getTableDetailsPath = (tableFQN: string, columnName?: string) => {
|
||||
let path = ROUTES.TABLE_DETAILS;
|
||||
path = path.replace(PLACEHOLDER_ROUTE_TABLE_FQN, getEncodedFqn(tableFQN));
|
||||
path = path.replace(PLACEHOLDER_ROUTE_FQN, getEncodedFqn(tableFQN));
|
||||
|
||||
return `${path}${columnName ? `.${columnName}` : ''}`;
|
||||
};
|
||||
@ -372,10 +350,7 @@ export const getStoredProcedureDetailsPath = (
|
||||
columnName?: string
|
||||
) => {
|
||||
let path = ROUTES.STORED_PROCEDURE_DETAILS;
|
||||
path = path.replace(
|
||||
PLACEHOLDER_ROUTE_STORED_PROCEDURE_FQN,
|
||||
getEncodedFqn(storedProcedureFQN)
|
||||
);
|
||||
path = path.replace(PLACEHOLDER_ROUTE_FQN, getEncodedFqn(storedProcedureFQN));
|
||||
|
||||
return `${path}${columnName ? `.${columnName}` : ''}`;
|
||||
};
|
||||
@ -383,7 +358,7 @@ export const getStoredProcedureDetailsPath = (
|
||||
export const getTagsDetailsPath = (entityFQN: string, columnName?: string) => {
|
||||
let path = ROUTES.TAG_DETAILS;
|
||||
const classification = getPartialNameFromFQN(entityFQN, ['service']);
|
||||
path = path.replace(PLACEHOLDER_TAG_NAME, classification);
|
||||
path = path.replace(PLACEHOLDER_ROUTE_FQN, classification);
|
||||
|
||||
return `${path}${columnName ? `.${columnName}` : ''}`;
|
||||
};
|
||||
@ -396,7 +371,7 @@ export const getVersionPath = (
|
||||
let path = ROUTES.ENTITY_VERSION;
|
||||
path = path
|
||||
.replace(PLACEHOLDER_ROUTE_ENTITY_TYPE, entityType)
|
||||
.replace(PLACEHOLDER_ROUTE_ENTITY_FQN, fqn)
|
||||
.replace(PLACEHOLDER_ROUTE_FQN, fqn)
|
||||
.replace(PLACEHOLDER_ROUTE_VERSION, version);
|
||||
|
||||
return path;
|
||||
@ -411,7 +386,7 @@ export const getVersionPathWithTab = (
|
||||
let path = ROUTES.ENTITY_VERSION_WITH_TAB;
|
||||
path = path
|
||||
.replace(PLACEHOLDER_ROUTE_ENTITY_TYPE, entityType)
|
||||
.replace(PLACEHOLDER_ROUTE_ENTITY_FQN, fqn)
|
||||
.replace(PLACEHOLDER_ROUTE_FQN, fqn)
|
||||
.replace(PLACEHOLDER_ROUTE_VERSION, version)
|
||||
.replace(PLACEHOLDER_ROUTE_TAB, tab);
|
||||
|
||||
@ -430,7 +405,7 @@ export const getTableTabPath = (
|
||||
path = path.replace(PLACEHOLDER_ROUTE_SUB_TAB, subTab);
|
||||
}
|
||||
path = path
|
||||
.replace(PLACEHOLDER_ROUTE_TABLE_FQN, tableFQN)
|
||||
.replace(PLACEHOLDER_ROUTE_FQN, tableFQN)
|
||||
.replace(PLACEHOLDER_ROUTE_TAB, tab);
|
||||
|
||||
return path;
|
||||
@ -444,7 +419,7 @@ export const getServiceDetailsPath = (
|
||||
let path = tab ? ROUTES.SERVICE_WITH_TAB : ROUTES.SERVICE;
|
||||
path = path
|
||||
.replace(PLACEHOLDER_ROUTE_SERVICE_CAT, serviceCat)
|
||||
.replace(PLACEHOLDER_ROUTE_SERVICE_FQN, serviceFQN);
|
||||
.replace(PLACEHOLDER_ROUTE_FQN, serviceFQN);
|
||||
|
||||
if (tab) {
|
||||
path = path.replace(PLACEHOLDER_ROUTE_TAB, tab);
|
||||
@ -516,10 +491,7 @@ export const getDatabaseDetailsPath = (
|
||||
path = path.replace(PLACEHOLDER_ROUTE_TAB, tab);
|
||||
}
|
||||
|
||||
path = path.replace(
|
||||
PLACEHOLDER_ROUTE_DATABASE_FQN,
|
||||
getEncodedFqn(databaseFQN)
|
||||
);
|
||||
path = path.replace(PLACEHOLDER_ROUTE_FQN, getEncodedFqn(databaseFQN));
|
||||
|
||||
return path;
|
||||
};
|
||||
@ -540,10 +512,7 @@ export const getDatabaseSchemaDetailsPath = (
|
||||
path = path.replace(PLACEHOLDER_ROUTE_TAB, tab);
|
||||
}
|
||||
|
||||
path = path.replace(
|
||||
PLACEHOLDER_ROUTE_DATABASE_SCHEMA_FQN,
|
||||
getEncodedFqn(schemaFQN)
|
||||
);
|
||||
path = path.replace(PLACEHOLDER_ROUTE_FQN, getEncodedFqn(schemaFQN));
|
||||
|
||||
return path;
|
||||
};
|
||||
@ -564,7 +533,7 @@ export const getTopicDetailsPath = (
|
||||
path = path.replace(PLACEHOLDER_ROUTE_TAB, tab);
|
||||
}
|
||||
|
||||
path = path.replace(PLACEHOLDER_ROUTE_TOPIC_FQN, getEncodedFqn(topicFQN));
|
||||
path = path.replace(PLACEHOLDER_ROUTE_FQN, getEncodedFqn(topicFQN));
|
||||
|
||||
return path;
|
||||
};
|
||||
@ -585,10 +554,7 @@ export const getDashboardDetailsPath = (
|
||||
path = path.replace(PLACEHOLDER_ROUTE_TAB, tab);
|
||||
}
|
||||
|
||||
path = path.replace(
|
||||
PLACEHOLDER_ROUTE_DASHBOARD_FQN,
|
||||
getEncodedFqn(dashboardFQN)
|
||||
);
|
||||
path = path.replace(PLACEHOLDER_ROUTE_FQN, getEncodedFqn(dashboardFQN));
|
||||
|
||||
return path;
|
||||
};
|
||||
@ -611,10 +577,7 @@ export const getDataModelDetailsPath = (
|
||||
path = path.replace(PLACEHOLDER_ROUTE_TAB, tab);
|
||||
}
|
||||
|
||||
path = path.replace(
|
||||
PLACEHOLDER_ROUTE_DATA_MODEL_FQN,
|
||||
getEncodedFqn(dataModelFQN)
|
||||
);
|
||||
path = path.replace(PLACEHOLDER_ROUTE_FQN, getEncodedFqn(dataModelFQN));
|
||||
|
||||
return path;
|
||||
};
|
||||
@ -635,10 +598,7 @@ export const getPipelineDetailsPath = (
|
||||
path = path.replace(PLACEHOLDER_ROUTE_TAB, tab);
|
||||
}
|
||||
|
||||
path = path.replace(
|
||||
PLACEHOLDER_ROUTE_PIPELINE_FQN,
|
||||
getEncodedFqn(pipelineFQN)
|
||||
);
|
||||
path = path.replace(PLACEHOLDER_ROUTE_FQN, getEncodedFqn(pipelineFQN));
|
||||
|
||||
return path;
|
||||
};
|
||||
@ -659,7 +619,7 @@ export const getMlModelDetailsPath = (
|
||||
path = path.replace(PLACEHOLDER_ROUTE_TAB, tab);
|
||||
}
|
||||
|
||||
path = path.replace(PLACEHOLDER_ROUTE_MLMODEL_FQN, getEncodedFqn(mlModelFQN));
|
||||
path = path.replace(PLACEHOLDER_ROUTE_FQN, getEncodedFqn(mlModelFQN));
|
||||
|
||||
return path;
|
||||
};
|
||||
@ -680,10 +640,7 @@ export const getContainerDetailPath = (
|
||||
path = path.replace(PLACEHOLDER_ROUTE_TAB, tab);
|
||||
}
|
||||
|
||||
path = path.replace(
|
||||
PLACEHOLDER_ROUTE_ENTITY_FQN,
|
||||
getEncodedFqn(containerFQN)
|
||||
);
|
||||
path = path.replace(PLACEHOLDER_ROUTE_FQN, getEncodedFqn(containerFQN));
|
||||
|
||||
return path;
|
||||
};
|
||||
@ -706,10 +663,7 @@ export const getStoredProcedureDetailPath = (
|
||||
path = path.replace(PLACEHOLDER_ROUTE_TAB, tab);
|
||||
}
|
||||
|
||||
path = path.replace(
|
||||
PLACEHOLDER_ROUTE_STORED_PROCEDURE_FQN,
|
||||
getEncodedFqn(storedProcedureFQN)
|
||||
);
|
||||
path = path.replace(PLACEHOLDER_ROUTE_FQN, getEncodedFqn(storedProcedureFQN));
|
||||
|
||||
return path;
|
||||
};
|
||||
@ -719,7 +673,7 @@ export const getGlossaryTermDetailsPath = (
|
||||
tab?: string
|
||||
) => {
|
||||
let path = tab ? ROUTES.GLOSSARY_DETAILS_WITH_TAB : ROUTES.GLOSSARY_DETAILS;
|
||||
path = path.replace(PLACEHOLDER_GLOSSARY_NAME, glossaryFQN);
|
||||
path = path.replace(PLACEHOLDER_ROUTE_FQN, glossaryFQN);
|
||||
|
||||
if (tab) {
|
||||
path = path.replace(PLACEHOLDER_ROUTE_TAB, tab);
|
||||
@ -763,14 +717,14 @@ export const getUserPath = (username: string, tab?: string, subTab = 'all') => {
|
||||
if (tab) {
|
||||
path = path.replace(PLACEHOLDER_ROUTE_TAB, tab);
|
||||
}
|
||||
path = path.replace(PLACEHOLDER_USER_NAME, username);
|
||||
path = path.replace(PLACEHOLDER_ROUTE_FQN, username);
|
||||
|
||||
return path;
|
||||
};
|
||||
|
||||
export const getBotsPath = (botsName: string) => {
|
||||
let path = ROUTES.BOTS_PROFILE;
|
||||
path = path.replace(PLACEHOLDER_BOTS_NAME, botsName);
|
||||
path = path.replace(PLACEHOLDER_ROUTE_FQN, botsName);
|
||||
|
||||
return path;
|
||||
};
|
||||
@ -778,7 +732,7 @@ export const getBotsPath = (botsName: string) => {
|
||||
export const getMlModelPath = (mlModelFqn: string, tab = '') => {
|
||||
let path = ROUTES.MLMODEL_DETAILS_WITH_TAB;
|
||||
path = path
|
||||
.replace(PLACEHOLDER_ROUTE_MLMODEL_FQN, mlModelFqn)
|
||||
.replace(PLACEHOLDER_ROUTE_FQN, mlModelFqn)
|
||||
.replace(PLACEHOLDER_ROUTE_TAB, tab);
|
||||
|
||||
return path;
|
||||
@ -829,17 +783,20 @@ export const configOptions = {
|
||||
export const NOTIFICATION_READ_TIMER = 2500;
|
||||
export const TIER_CATEGORY = 'Tier';
|
||||
|
||||
export const ENTITY_PATH: Record<string, string> = {
|
||||
export const ENTITY_PATH = {
|
||||
tables: 'table',
|
||||
topics: 'topic',
|
||||
dashboards: 'dashboard',
|
||||
pipelines: 'pipeline',
|
||||
mlmodels: 'mlmodel',
|
||||
mlModels: 'mlmodel',
|
||||
containers: 'container',
|
||||
tags: 'tag',
|
||||
glossaries: 'glossary',
|
||||
searchindex: 'searchIndex',
|
||||
storedprocedure: 'storedProcedure',
|
||||
storedProcedure: 'storedProcedure',
|
||||
glossaryTerm: 'glossaryTerm',
|
||||
database: 'database',
|
||||
databaseSchema: 'databaseSchema',
|
||||
};
|
||||
|
||||
export const VALIDATION_MESSAGES = {
|
||||
|
||||
@ -46,7 +46,6 @@ export enum EntityType {
|
||||
TAG = 'tag',
|
||||
DASHBOARD_DATA_MODEL = 'dashboardDataModel',
|
||||
SUBSCRIPTION = 'subscription',
|
||||
USER_NAME = 'username',
|
||||
CHART = 'chart',
|
||||
DOMAIN = 'domain',
|
||||
DATA_PRODUCT = 'dataProduct',
|
||||
|
||||
@ -84,6 +84,7 @@ const mockData = {
|
||||
previousVersion: 0.1,
|
||||
},
|
||||
deleted: false,
|
||||
storedProcedureCode: '',
|
||||
};
|
||||
|
||||
export const storedProcedureVersionMockProps: StoredProcedureVersionProp = {
|
||||
|
||||
@ -183,6 +183,7 @@ export const mockTagChangeVersion = {
|
||||
export const mockNoChartData = {
|
||||
id: '4ee70a0c-6ec9-4c93-a91c-4a57d65bebc8',
|
||||
description: 'test description',
|
||||
name: 'test',
|
||||
version: 0.4,
|
||||
updatedAt: 1649354506617,
|
||||
updatedBy: 'anonymous',
|
||||
@ -230,4 +231,4 @@ export const mockNoChartData = {
|
||||
previousVersion: 0.3,
|
||||
},
|
||||
deleted: false,
|
||||
} as unknown as VersionData;
|
||||
} as Dashboard;
|
||||
|
||||
@ -21,7 +21,7 @@ import { getTableDetailsByFQN } from 'rest/tableAPI';
|
||||
import { showErrorToast } from '../../utils/ToastUtils';
|
||||
|
||||
const AddDataQualityTestPage = () => {
|
||||
const { entityTypeFQN } = useParams<Record<string, string>>();
|
||||
const { entityTypeFQN } = useParams<{ entityTypeFQN: string }>();
|
||||
const [table, setTable] = useState({} as Table);
|
||||
const [isLoading, setIsLoading] = useState(true);
|
||||
|
||||
|
||||
@ -54,8 +54,15 @@ import { showErrorToast } from '../../utils/ToastUtils';
|
||||
|
||||
const AddIngestionPage = () => {
|
||||
const { fetchAirflowStatus } = useAirflowStatus();
|
||||
const { ingestionType, serviceFQN, serviceCategory } =
|
||||
useParams<{ [key: string]: string }>();
|
||||
const {
|
||||
ingestionType,
|
||||
fqn: serviceFQN,
|
||||
serviceCategory,
|
||||
} = useParams<{
|
||||
fqn: string;
|
||||
serviceCategory: string;
|
||||
ingestionType: string;
|
||||
}>();
|
||||
const { t } = useTranslation();
|
||||
const history = useHistory();
|
||||
const [serviceData, setServiceData] = useState<DataObj>();
|
||||
|
||||
@ -47,7 +47,7 @@ import { showErrorToast, showSuccessToast } from 'utils/ToastUtils';
|
||||
|
||||
const AddQueryPage = () => {
|
||||
const { t } = useTranslation();
|
||||
const { datasetFQN } = useParams<{ datasetFQN: string }>();
|
||||
const { fqn: datasetFQN } = useParams<{ fqn: string }>();
|
||||
const { permissions } = usePermissionProvider();
|
||||
const [form] = Form.useForm();
|
||||
const [titleBreadcrumb, setTitleBreadcrumb] = useState<
|
||||
|
||||
@ -27,9 +27,7 @@ jest.mock('rest/miscAPI', () => ({
|
||||
searchData: jest.fn().mockImplementation(() => Promise.resolve()),
|
||||
}));
|
||||
jest.mock('react-router-dom', () => ({
|
||||
useParams: jest
|
||||
.fn()
|
||||
.mockReturnValue({ datasetFQN: MOCK_TABLE.fullyQualifiedName }),
|
||||
useParams: jest.fn().mockReturnValue({ fqn: MOCK_TABLE.fullyQualifiedName }),
|
||||
}));
|
||||
jest.mock(
|
||||
'components/common/title-breadcrumb/title-breadcrumb.component',
|
||||
|
||||
@ -41,7 +41,7 @@ import { showErrorToast } from '../../utils/ToastUtils';
|
||||
|
||||
const AddServicePage = () => {
|
||||
const { t } = useTranslation();
|
||||
const { serviceCategory } = useParams<{ [key: string]: string }>();
|
||||
const { serviceCategory } = useParams<{ serviceCategory: string }>();
|
||||
const [newServiceData, setNewServiceData] = useState<ServicesUpdateRequest>();
|
||||
const [ingestionProgress, setIngestionProgress] = useState(0);
|
||||
const [isIngestionCreated, setIsIngestionCreated] = useState(false);
|
||||
|
||||
@ -41,7 +41,7 @@ import { showErrorToast } from '../../utils/ToastUtils';
|
||||
|
||||
const BotDetailsPage = () => {
|
||||
const { t } = useTranslation();
|
||||
const { botsName } = useParams<{ [key: string]: string }>();
|
||||
const { fqn: botsName } = useParams<{ fqn: string }>();
|
||||
const { isAdminUser } = useAuth();
|
||||
const { getEntityPermissionByFqn } = usePermissionProvider();
|
||||
const [botUserData, setBotUserData] = useState<User>({} as User);
|
||||
|
||||
@ -48,7 +48,8 @@ import {
|
||||
function ClassificationVersionPage() {
|
||||
const { t } = useTranslation();
|
||||
const history = useHistory();
|
||||
const { tagCategoryName = '', version } = useParams<Record<string, string>>();
|
||||
const { fqn: tagCategoryName, version } =
|
||||
useParams<{ fqn: string; version: string }>();
|
||||
const { getEntityPermissionByFqn } = usePermissionProvider();
|
||||
const [currentVersionData, setCurrentVersionData] = useState<Classification>(
|
||||
{} as Classification
|
||||
|
||||
@ -17,7 +17,6 @@ import { useActivityFeedProvider } from 'components/ActivityFeed/ActivityFeedPro
|
||||
import { ActivityFeedTab } from 'components/ActivityFeed/ActivityFeedTab/ActivityFeedTab.component';
|
||||
import ActivityThreadPanel from 'components/ActivityFeed/ActivityThreadPanel/ActivityThreadPanel';
|
||||
import { CustomPropertyTable } from 'components/common/CustomPropertyTable/CustomPropertyTable';
|
||||
import { CustomPropertyProps } from 'components/common/CustomPropertyTable/CustomPropertyTable.interface';
|
||||
import DescriptionV1 from 'components/common/description/DescriptionV1';
|
||||
import ErrorPlaceHolder from 'components/common/error-with-placeholder/ErrorPlaceHolder';
|
||||
import ContainerChildren from 'components/ContainerDetail/ContainerChildren/ContainerChildren';
|
||||
@ -79,8 +78,8 @@ const ContainerPage = () => {
|
||||
const { t } = useTranslation();
|
||||
const { getEntityPermissionByFqn } = usePermissionProvider();
|
||||
const { postFeed, deleteFeed, updateFeed } = useActivityFeedProvider();
|
||||
const { entityFQN: containerName, tab } =
|
||||
useParams<{ entityFQN: string; tab: EntityTabs }>();
|
||||
const { fqn: containerName, tab = EntityTabs.SCHEMA } =
|
||||
useParams<{ fqn: string; tab: EntityTabs }>();
|
||||
|
||||
// Local states
|
||||
const [isLoading, setIsLoading] = useState<boolean>(false);
|
||||
@ -642,9 +641,6 @@ const ContainerPage = () => {
|
||||
key: EntityTabs.CUSTOM_PROPERTIES,
|
||||
children: (
|
||||
<CustomPropertyTable
|
||||
entityDetails={
|
||||
containerData as CustomPropertyProps['entityDetails']
|
||||
}
|
||||
entityType={EntityType.CONTAINER}
|
||||
handleExtensionUpdate={handleExtensionUpdate}
|
||||
hasEditAccess={hasEditCustomFieldsPermission}
|
||||
|
||||
@ -42,7 +42,7 @@ import './CustomPropertiesPageV1.less';
|
||||
|
||||
const CustomEntityDetailV1 = () => {
|
||||
const { t } = useTranslation();
|
||||
const { tab } = useParams<{ [key: string]: string }>();
|
||||
const { tab } = useParams<{ tab: keyof typeof ENTITY_PATH }>();
|
||||
const history = useHistory();
|
||||
|
||||
const [activeTab, setActiveTab] = useState<EntityTabs>(
|
||||
@ -55,7 +55,7 @@ const CustomEntityDetailV1 = () => {
|
||||
|
||||
const [isButtonLoading, setIsButtonLoading] = useState<boolean>(false);
|
||||
|
||||
const tabAttributePath = ENTITY_PATH[tab.toLowerCase()];
|
||||
const tabAttributePath = ENTITY_PATH[tab];
|
||||
|
||||
const { getEntityPermission } = usePermissionProvider();
|
||||
|
||||
@ -134,7 +134,7 @@ const CustomEntityDetailV1 = () => {
|
||||
case ENTITY_PATH.pipelines:
|
||||
return PAGE_HEADERS.PIPELINES_CUSTOM_ATTRIBUTES;
|
||||
|
||||
case ENTITY_PATH.mlmodels:
|
||||
case ENTITY_PATH.mlModels:
|
||||
return PAGE_HEADERS.ML_MODELS_CUSTOM_ATTRIBUTES;
|
||||
|
||||
case ENTITY_PATH.containers:
|
||||
@ -142,8 +142,19 @@ const CustomEntityDetailV1 = () => {
|
||||
|
||||
case ENTITY_PATH.searchindex:
|
||||
return PAGE_HEADERS.SEARCH_INDEX_CUSTOM_ATTRIBUTES;
|
||||
case ENTITY_PATH.storedprocedure:
|
||||
|
||||
case ENTITY_PATH.storedProcedure:
|
||||
return PAGE_HEADERS.STORED_PROCEDURE_CUSTOM_ATTRIBUTES;
|
||||
|
||||
case ENTITY_PATH.glossaryTerm:
|
||||
return PAGE_HEADERS.GLOSSARY_TERM_CUSTOM_ATTRIBUTES;
|
||||
|
||||
case ENTITY_PATH.database:
|
||||
return PAGE_HEADERS.DATABASE_CUSTOM_ATTRIBUTES;
|
||||
|
||||
case ENTITY_PATH.databaseSchema:
|
||||
return PAGE_HEADERS.DATABASE_SCHEMA_CUSTOM_ATTRIBUTES;
|
||||
|
||||
default:
|
||||
return PAGE_HEADERS.TABLES_CUSTOM_ATTRIBUTES;
|
||||
}
|
||||
|
||||
@ -61,7 +61,7 @@ const DashboardDetailsPage = () => {
|
||||
const USERId = getCurrentUserId();
|
||||
const history = useHistory();
|
||||
const { getEntityPermissionByFqn } = usePermissionProvider();
|
||||
const { dashboardFQN } = useParams<{ dashboardFQN: string }>();
|
||||
const { fqn: dashboardFQN } = useParams<{ fqn: string }>();
|
||||
const [dashboardDetails, setDashboardDetails] = useState<Dashboard>(
|
||||
{} as Dashboard
|
||||
);
|
||||
|
||||
@ -58,8 +58,7 @@ const DataModelsPage = () => {
|
||||
const { t } = useTranslation();
|
||||
|
||||
const { getEntityPermissionByFqn } = usePermissionProvider();
|
||||
const { dashboardDataModelFQN } =
|
||||
useParams<{ dashboardDataModelFQN: string }>();
|
||||
const { fqn: dashboardDataModelFQN } = useParams<{ fqn: string }>();
|
||||
|
||||
const [isLoading, setIsLoading] = useState<boolean>(false);
|
||||
const [hasError, setHasError] = useState<boolean>(false);
|
||||
|
||||
@ -142,7 +142,7 @@ jest.mock('react-router-dom', () => ({
|
||||
)),
|
||||
useHistory: jest.fn(),
|
||||
useParams: jest.fn().mockReturnValue({
|
||||
databaseFQN: 'bigquery.shopify',
|
||||
fqn: 'bigquery.shopify',
|
||||
}),
|
||||
useLocation: jest
|
||||
.fn()
|
||||
|
||||
@ -18,6 +18,7 @@ import ActivityFeedProvider, {
|
||||
} from 'components/ActivityFeed/ActivityFeedProvider/ActivityFeedProvider';
|
||||
import { ActivityFeedTab } from 'components/ActivityFeed/ActivityFeedTab/ActivityFeedTab.component';
|
||||
import ActivityThreadPanel from 'components/ActivityFeed/ActivityThreadPanel/ActivityThreadPanel';
|
||||
import { CustomPropertyTable } from 'components/common/CustomPropertyTable/CustomPropertyTable';
|
||||
import DescriptionV1 from 'components/common/description/DescriptionV1';
|
||||
import ErrorPlaceHolder from 'components/common/error-with-placeholder/ErrorPlaceHolder';
|
||||
import { PagingHandlerParams } from 'components/common/next-previous/NextPrevious.interface';
|
||||
@ -67,12 +68,12 @@ import { getFeedCount, postThread } from 'rest/feedsAPI';
|
||||
import { searchQuery } from 'rest/searchAPI';
|
||||
import { getEntityMissingError } from 'utils/CommonUtils';
|
||||
import { getDatabaseSchemaTable } from 'utils/DatabaseDetails.utils';
|
||||
import { getDatabaseVersionPath } from 'utils/RouterUtils';
|
||||
import { default as appState } from '../../AppState';
|
||||
import { FQN_SEPARATOR_CHAR } from '../../constants/char.constants';
|
||||
import {
|
||||
getDatabaseDetailsPath,
|
||||
getExplorePath,
|
||||
getVersionPathWithTab,
|
||||
INITIAL_PAGING_VALUE,
|
||||
PAGE_SIZE,
|
||||
pagingObject,
|
||||
@ -102,8 +103,8 @@ const DatabaseDetails: FunctionComponent = () => {
|
||||
return searchData.schema as string | undefined;
|
||||
}, [location.search]);
|
||||
|
||||
const { databaseFQN, tab: activeTab = EntityTabs.SCHEMA } =
|
||||
useParams<{ databaseFQN: string; tab: EntityTabs }>();
|
||||
const { fqn: databaseFQN, tab: activeTab = EntityTabs.SCHEMA } =
|
||||
useParams<{ fqn: string; tab: EntityTabs }>();
|
||||
const [isLoading, setIsLoading] = useState(true);
|
||||
const [showDeletedSchemas, setShowDeletedSchemas] = useState<boolean>(false);
|
||||
const [database, setDatabase] = useState<Database>({} as Database);
|
||||
@ -565,7 +566,12 @@ const DatabaseDetails: FunctionComponent = () => {
|
||||
const versionHandler = useCallback(() => {
|
||||
currentVersion &&
|
||||
history.push(
|
||||
getDatabaseVersionPath(databaseFQN, toString(currentVersion))
|
||||
getVersionPathWithTab(
|
||||
EntityType.DATABASE,
|
||||
databaseFQN,
|
||||
toString(currentVersion),
|
||||
EntityTabs.SCHEMA
|
||||
)
|
||||
);
|
||||
}, [currentVersion, databaseFQN]);
|
||||
|
||||
@ -721,6 +727,27 @@ const DatabaseDetails: FunctionComponent = () => {
|
||||
</ActivityFeedProvider>
|
||||
),
|
||||
},
|
||||
|
||||
{
|
||||
label: (
|
||||
<TabsLabel
|
||||
id={EntityTabs.CUSTOM_PROPERTIES}
|
||||
name={t('label.custom-property-plural')}
|
||||
/>
|
||||
),
|
||||
key: EntityTabs.CUSTOM_PROPERTIES,
|
||||
children: (
|
||||
<CustomPropertyTable
|
||||
entityType={EntityType.DATABASE}
|
||||
handleExtensionUpdate={settingsUpdateHandler}
|
||||
hasEditAccess={databasePermission.ViewAll}
|
||||
hasPermission={
|
||||
databasePermission.EditAll || databasePermission.EditCustomFields
|
||||
}
|
||||
isVersionView={false}
|
||||
/>
|
||||
),
|
||||
},
|
||||
],
|
||||
[
|
||||
tags,
|
||||
|
||||
@ -18,6 +18,7 @@ import ActivityFeedProvider, {
|
||||
} from 'components/ActivityFeed/ActivityFeedProvider/ActivityFeedProvider';
|
||||
import { ActivityFeedTab } from 'components/ActivityFeed/ActivityFeedTab/ActivityFeedTab.component';
|
||||
import ActivityThreadPanel from 'components/ActivityFeed/ActivityThreadPanel/ActivityThreadPanel';
|
||||
import { CustomPropertyTable } from 'components/common/CustomPropertyTable/CustomPropertyTable';
|
||||
import ErrorPlaceHolder from 'components/common/error-with-placeholder/ErrorPlaceHolder';
|
||||
import { PagingHandlerParams } from 'components/common/next-previous/NextPrevious.interface';
|
||||
import PageLayoutV1 from 'components/containers/PageLayoutV1';
|
||||
@ -39,7 +40,7 @@ import { compare, Operation } from 'fast-json-patch';
|
||||
import { ThreadType } from 'generated/entity/feed/thread';
|
||||
import { Include } from 'generated/type/include';
|
||||
import { LabelType, State, TagLabel, TagSource } from 'generated/type/tagLabel';
|
||||
import { isEmpty, isUndefined, toString } from 'lodash';
|
||||
import { isEmpty, isUndefined } from 'lodash';
|
||||
import { observer } from 'mobx-react';
|
||||
import { EntityTags, PagingResponse } from 'Models';
|
||||
import StoredProcedureTab from 'pages/StoredProcedure/StoredProcedureTab';
|
||||
@ -66,11 +67,11 @@ import {
|
||||
} from 'rest/storedProceduresAPI';
|
||||
import { getTableList, TableListParams } from 'rest/tableAPI';
|
||||
import { getEntityMissingError } from 'utils/CommonUtils';
|
||||
import { getDatabaseSchemaVersionPath } from 'utils/RouterUtils';
|
||||
import { getDecodedFqn } from 'utils/StringsUtils';
|
||||
import { default as appState } from '../../AppState';
|
||||
import {
|
||||
getDatabaseSchemaDetailsPath,
|
||||
getVersionPathWithTab,
|
||||
INITIAL_PAGING_VALUE,
|
||||
pagingObject,
|
||||
} from '../../constants/constants';
|
||||
@ -90,8 +91,8 @@ const DatabaseSchemaPage: FunctionComponent = () => {
|
||||
const { t } = useTranslation();
|
||||
const { getEntityPermissionByFqn } = usePermissionProvider();
|
||||
|
||||
const { databaseSchemaFQN, tab: activeTab = EntityTabs.TABLE } =
|
||||
useParams<{ databaseSchemaFQN: string; tab: EntityTabs }>();
|
||||
const { fqn: databaseSchemaFQN, tab: activeTab = EntityTabs.TABLE } =
|
||||
useParams<{ fqn: string; tab: EntityTabs }>();
|
||||
const history = useHistory();
|
||||
const isMounting = useRef(true);
|
||||
|
||||
@ -494,9 +495,11 @@ const DatabaseSchemaPage: FunctionComponent = () => {
|
||||
const versionHandler = useCallback(() => {
|
||||
currentVersion &&
|
||||
history.push(
|
||||
getDatabaseSchemaVersionPath(
|
||||
getVersionPathWithTab(
|
||||
EntityType.DATABASE_SCHEMA,
|
||||
databaseSchemaFQN,
|
||||
toString(currentVersion)
|
||||
String(currentVersion),
|
||||
EntityTabs.TABLE
|
||||
)
|
||||
);
|
||||
}, [currentVersion, databaseSchemaFQN]);
|
||||
@ -573,6 +576,16 @@ const DatabaseSchemaPage: FunctionComponent = () => {
|
||||
[databaseSchemaPermission, databaseSchema]
|
||||
);
|
||||
|
||||
const handelExtentionUpdate = useCallback(
|
||||
async (schema: DatabaseSchema) => {
|
||||
await saveUpdatedDatabaseSchemaData({
|
||||
...databaseSchema,
|
||||
extension: schema.extension,
|
||||
});
|
||||
},
|
||||
[saveUpdatedDatabaseSchemaData, databaseSchema]
|
||||
);
|
||||
|
||||
const tabs: TabsProps['items'] = [
|
||||
{
|
||||
label: (
|
||||
@ -674,6 +687,28 @@ const DatabaseSchemaPage: FunctionComponent = () => {
|
||||
</ActivityFeedProvider>
|
||||
),
|
||||
},
|
||||
{
|
||||
label: (
|
||||
<TabsLabel
|
||||
id={EntityTabs.CUSTOM_PROPERTIES}
|
||||
name={t('label.custom-property-plural')}
|
||||
/>
|
||||
),
|
||||
key: EntityTabs.CUSTOM_PROPERTIES,
|
||||
children: (
|
||||
<CustomPropertyTable
|
||||
className=""
|
||||
entityType={EntityType.DATABASE_SCHEMA}
|
||||
handleExtensionUpdate={handelExtentionUpdate}
|
||||
hasEditAccess={databaseSchemaPermission.ViewAll}
|
||||
hasPermission={
|
||||
databaseSchemaPermission.EditAll ||
|
||||
databaseSchemaPermission.EditCustomFields
|
||||
}
|
||||
isVersionView={false}
|
||||
/>
|
||||
),
|
||||
},
|
||||
];
|
||||
|
||||
const updateVote = async (data: QueryVote, id: string) => {
|
||||
|
||||
@ -183,7 +183,7 @@ jest.mock('../../AppState', () => ({
|
||||
}));
|
||||
|
||||
const mockParams = {
|
||||
databaseSchemaFQN: 'sample_data.ecommerce_db.shopify',
|
||||
fqn: 'sample_data.ecommerce_db.shopify',
|
||||
tab: 'table',
|
||||
};
|
||||
|
||||
@ -204,7 +204,7 @@ describe('Tests for DatabaseSchemaPage', () => {
|
||||
|
||||
expect(mockEntityPermissionByFqn).toHaveBeenCalledWith(
|
||||
'databaseSchema',
|
||||
mockParams.databaseSchemaFQN
|
||||
mockParams.fqn
|
||||
);
|
||||
});
|
||||
|
||||
@ -241,7 +241,7 @@ describe('Tests for DatabaseSchemaPage', () => {
|
||||
});
|
||||
|
||||
expect(getDatabaseSchemaDetailsByFQN).toHaveBeenCalledWith(
|
||||
mockParams.databaseSchemaFQN,
|
||||
mockParams.fqn,
|
||||
API_FIELDS,
|
||||
'include=all'
|
||||
);
|
||||
@ -259,7 +259,7 @@ describe('Tests for DatabaseSchemaPage', () => {
|
||||
});
|
||||
|
||||
expect(getStoredProceduresList).toHaveBeenCalledWith({
|
||||
databaseSchema: mockParams.databaseSchemaFQN,
|
||||
databaseSchema: mockParams.fqn,
|
||||
fields: 'owner,tags,followers',
|
||||
include: 'non-deleted',
|
||||
limit: 0,
|
||||
@ -278,7 +278,7 @@ describe('Tests for DatabaseSchemaPage', () => {
|
||||
});
|
||||
|
||||
expect(getDatabaseSchemaDetailsByFQN).toHaveBeenCalledWith(
|
||||
mockParams.databaseSchemaFQN,
|
||||
mockParams.fqn,
|
||||
API_FIELDS,
|
||||
'include=all'
|
||||
);
|
||||
@ -300,7 +300,7 @@ describe('Tests for DatabaseSchemaPage', () => {
|
||||
});
|
||||
|
||||
expect(getDatabaseSchemaDetailsByFQN).toHaveBeenCalledWith(
|
||||
mockParams.databaseSchemaFQN,
|
||||
mockParams.fqn,
|
||||
API_FIELDS,
|
||||
'include=all'
|
||||
);
|
||||
|
||||
@ -13,6 +13,7 @@
|
||||
|
||||
import { Col, Row, Space, Tabs, TabsProps } from 'antd';
|
||||
import classNames from 'classnames';
|
||||
import { CustomPropertyTable } from 'components/common/CustomPropertyTable/CustomPropertyTable';
|
||||
import ErrorPlaceHolder from 'components/common/error-with-placeholder/ErrorPlaceHolder';
|
||||
import { PagingHandlerParams } from 'components/common/next-previous/NextPrevious.interface';
|
||||
import PageLayoutV1 from 'components/containers/PageLayoutV1';
|
||||
@ -29,6 +30,7 @@ import TagsContainerV2 from 'components/Tag/TagsContainerV2/TagsContainerV2';
|
||||
import { DisplayType } from 'components/Tag/TagsViewer/TagsViewer.interface';
|
||||
import {
|
||||
getDatabaseSchemaDetailsPath,
|
||||
getVersionPathWithTab,
|
||||
INITIAL_PAGING_VALUE,
|
||||
} from 'constants/constants';
|
||||
import { ERROR_PLACEHOLDER_TYPE } from 'enums/common.enum';
|
||||
@ -57,16 +59,20 @@ import {
|
||||
getCommonExtraInfoForVersionDetails,
|
||||
} from 'utils/EntityVersionUtils';
|
||||
import { DEFAULT_ENTITY_PERMISSION } from 'utils/PermissionsUtils';
|
||||
import { getDatabaseSchemaVersionPath } from 'utils/RouterUtils';
|
||||
import { getDecodedFqn } from 'utils/StringsUtils';
|
||||
|
||||
function DatabaseSchemaVersionPage() {
|
||||
const { t } = useTranslation();
|
||||
const history = useHistory();
|
||||
const { getEntityPermissionByFqn } = usePermissionProvider();
|
||||
const { databaseSchemaFQN, version } = useParams<{
|
||||
databaseSchemaFQN: string;
|
||||
const {
|
||||
fqn: databaseSchemaFQN,
|
||||
version,
|
||||
tab,
|
||||
} = useParams<{
|
||||
fqn: string;
|
||||
version: string;
|
||||
tab: EntityTabs;
|
||||
}>();
|
||||
const [currentPage, setCurrentPage] = useState(INITIAL_PAGING_VALUE);
|
||||
const [tableData, setTableData] = useState<PagingResponse<Table[]>>({
|
||||
@ -194,16 +200,32 @@ function DatabaseSchemaVersionPage() {
|
||||
() => ({
|
||||
versionHandler: (newVersion = version) => {
|
||||
history.push(
|
||||
getDatabaseSchemaVersionPath(databaseSchemaFQN, toString(newVersion))
|
||||
getVersionPathWithTab(
|
||||
EntityType.DATABASE_SCHEMA,
|
||||
databaseSchemaFQN,
|
||||
newVersion,
|
||||
tab
|
||||
)
|
||||
);
|
||||
},
|
||||
backHandler: () => {
|
||||
history.push(getDatabaseSchemaDetailsPath(databaseSchemaFQN));
|
||||
},
|
||||
}),
|
||||
[databaseSchemaFQN]
|
||||
[databaseSchemaFQN, tab]
|
||||
);
|
||||
|
||||
const handleTabChange = (activeKey: string) => {
|
||||
history.push(
|
||||
getVersionPathWithTab(
|
||||
EntityType.DATABASE_SCHEMA,
|
||||
databaseSchemaFQN,
|
||||
String(version),
|
||||
activeKey
|
||||
)
|
||||
);
|
||||
};
|
||||
|
||||
const tabs: TabsProps['items'] = useMemo(
|
||||
() => [
|
||||
{
|
||||
@ -246,6 +268,25 @@ function DatabaseSchemaVersionPage() {
|
||||
</Row>
|
||||
),
|
||||
},
|
||||
|
||||
{
|
||||
key: EntityTabs.CUSTOM_PROPERTIES,
|
||||
label: (
|
||||
<TabsLabel
|
||||
id={EntityTabs.CUSTOM_PROPERTIES}
|
||||
name={t('label.custom-property-plural')}
|
||||
/>
|
||||
),
|
||||
children: (
|
||||
<CustomPropertyTable
|
||||
isVersionView
|
||||
entityDetails={currentVersionData}
|
||||
entityType={EntityType.DATABASE_SCHEMA}
|
||||
hasEditAccess={false}
|
||||
hasPermission={viewVersionPermission}
|
||||
/>
|
||||
),
|
||||
},
|
||||
],
|
||||
[
|
||||
currentPage,
|
||||
@ -294,7 +335,9 @@ function DatabaseSchemaVersionPage() {
|
||||
<Tabs
|
||||
className="entity-details-page-tabs"
|
||||
data-testid="tabs"
|
||||
defaultActiveKey={tab ?? EntityTabs.TABLE}
|
||||
items={tabs}
|
||||
onChange={handleTabChange}
|
||||
/>
|
||||
</Col>
|
||||
</Row>
|
||||
|
||||
@ -13,6 +13,7 @@
|
||||
|
||||
import { Col, Row, Space, Tabs } from 'antd';
|
||||
import classNames from 'classnames';
|
||||
import { CustomPropertyTable } from 'components/common/CustomPropertyTable/CustomPropertyTable';
|
||||
import DescriptionV1 from 'components/common/description/DescriptionV1';
|
||||
import ErrorPlaceHolder from 'components/common/error-with-placeholder/ErrorPlaceHolder';
|
||||
import { PagingHandlerParams } from 'components/common/next-previous/NextPrevious.interface';
|
||||
@ -30,6 +31,7 @@ import TagsContainerV2 from 'components/Tag/TagsContainerV2/TagsContainerV2';
|
||||
import { DisplayType } from 'components/Tag/TagsViewer/TagsViewer.interface';
|
||||
import {
|
||||
getDatabaseDetailsPath,
|
||||
getVersionPathWithTab,
|
||||
INITIAL_PAGING_VALUE,
|
||||
pagingObject,
|
||||
} from 'constants/constants';
|
||||
@ -59,15 +61,19 @@ import {
|
||||
getCommonExtraInfoForVersionDetails,
|
||||
} from 'utils/EntityVersionUtils';
|
||||
import { DEFAULT_ENTITY_PERMISSION } from 'utils/PermissionsUtils';
|
||||
import { getDatabaseVersionPath } from 'utils/RouterUtils';
|
||||
|
||||
function DatabaseVersionPage() {
|
||||
const { t } = useTranslation();
|
||||
const history = useHistory();
|
||||
const { getEntityPermissionByFqn } = usePermissionProvider();
|
||||
const { databaseFQN, version } = useParams<{
|
||||
databaseFQN: string;
|
||||
const {
|
||||
fqn: databaseFQN,
|
||||
version,
|
||||
tab,
|
||||
} = useParams<{
|
||||
fqn: string;
|
||||
version: string;
|
||||
tab: EntityTabs;
|
||||
}>();
|
||||
const [paging, setPaging] = useState<Paging>(pagingObject);
|
||||
const [currentPage, setCurrentPage] = useState(INITIAL_PAGING_VALUE);
|
||||
@ -195,15 +201,33 @@ function DatabaseVersionPage() {
|
||||
const { versionHandler, backHandler } = useMemo(
|
||||
() => ({
|
||||
versionHandler: (newVersion = version) => {
|
||||
history.push(getDatabaseVersionPath(databaseFQN, toString(newVersion)));
|
||||
history.push(
|
||||
getVersionPathWithTab(
|
||||
EntityType.DATABASE,
|
||||
databaseFQN,
|
||||
newVersion,
|
||||
tab
|
||||
)
|
||||
);
|
||||
},
|
||||
backHandler: () => {
|
||||
history.push(getDatabaseDetailsPath(databaseFQN));
|
||||
},
|
||||
}),
|
||||
[databaseFQN]
|
||||
[databaseFQN, tab]
|
||||
);
|
||||
|
||||
const handleTabChange = (activeKey: string) => {
|
||||
history.push(
|
||||
getVersionPathWithTab(
|
||||
EntityType.DATABASE,
|
||||
databaseFQN,
|
||||
String(version),
|
||||
activeKey
|
||||
)
|
||||
);
|
||||
};
|
||||
|
||||
const { displayName, tags, description } = useMemo(
|
||||
() => getCommonDiffsFromVersionData(currentVersionData, changeDescription),
|
||||
[currentVersionData, changeDescription]
|
||||
@ -271,6 +295,25 @@ function DatabaseVersionPage() {
|
||||
</Row>
|
||||
),
|
||||
},
|
||||
|
||||
{
|
||||
key: EntityTabs.CUSTOM_PROPERTIES,
|
||||
label: (
|
||||
<TabsLabel
|
||||
id={EntityTabs.CUSTOM_PROPERTIES}
|
||||
name={t('label.custom-property-plural')}
|
||||
/>
|
||||
),
|
||||
children: (
|
||||
<CustomPropertyTable
|
||||
isVersionView
|
||||
entityDetails={currentVersionData}
|
||||
entityType={EntityType.DATABASE}
|
||||
hasEditAccess={false}
|
||||
hasPermission={viewVersionPermission}
|
||||
/>
|
||||
),
|
||||
},
|
||||
],
|
||||
[tags, description, databaseFQN, databaseTable]
|
||||
);
|
||||
@ -310,7 +353,9 @@ function DatabaseVersionPage() {
|
||||
<Tabs
|
||||
className="entity-details-page-tabs"
|
||||
data-testid="tabs"
|
||||
defaultActiveKey={tab ?? EntityTabs.SCHEMA}
|
||||
items={tabs}
|
||||
onChange={handleTabChange}
|
||||
/>
|
||||
</Col>
|
||||
</Row>
|
||||
|
||||
@ -42,8 +42,8 @@ import { showErrorToast } from '../../utils/ToastUtils';
|
||||
|
||||
function EditConnectionFormPage() {
|
||||
const { t } = useTranslation();
|
||||
const { serviceFQN, serviceCategory } = useParams<{
|
||||
serviceFQN: string;
|
||||
const { fqn: serviceFQN, serviceCategory } = useParams<{
|
||||
fqn: string;
|
||||
serviceCategory: ServiceCategory;
|
||||
}>();
|
||||
|
||||
|
||||
@ -59,8 +59,17 @@ import { showErrorToast } from '../../utils/ToastUtils';
|
||||
const EditIngestionPage = () => {
|
||||
const { t } = useTranslation();
|
||||
const { fetchAirflowStatus } = useAirflowStatus();
|
||||
const { ingestionFQN, ingestionType, serviceFQN, serviceCategory } =
|
||||
useParams<{ [key: string]: string }>();
|
||||
const {
|
||||
ingestionFQN,
|
||||
ingestionType,
|
||||
fqn: serviceFQN,
|
||||
serviceCategory,
|
||||
} = useParams<{
|
||||
ingestionFQN: string;
|
||||
ingestionType: string;
|
||||
fqn: string;
|
||||
serviceCategory: string;
|
||||
}>();
|
||||
const history = useHistory();
|
||||
const [serviceData, setServiceData] = useState<ServicesUpdateRequest>();
|
||||
const [ingestionData, setIngestionData] = useState<IngestionPipeline>(
|
||||
|
||||
@ -11,17 +11,30 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import ErrorPlaceHolder from 'components/common/error-with-placeholder/ErrorPlaceHolder';
|
||||
import PageLayoutV1 from 'components/containers/PageLayoutV1';
|
||||
import ContainerVersion from 'components/ContainerVersion/ContainerVersion.component';
|
||||
import DashboardVersion from 'components/DashboardVersion/DashboardVersion.component';
|
||||
import DataModelVersion from 'components/DataModelVersion/DataModelVersion.component';
|
||||
import Loader from 'components/Loader/Loader';
|
||||
import MlModelVersion from 'components/MlModelVersion/MlModelVersion.component';
|
||||
import { usePermissionProvider } from 'components/PermissionProvider/PermissionProvider';
|
||||
import {
|
||||
OperationPermission,
|
||||
ResourceEntity,
|
||||
} from 'components/PermissionProvider/PermissionProvider.interface';
|
||||
import PipelineVersion from 'components/PipelineVersion/PipelineVersion.component';
|
||||
import SearchIndexVersion from 'components/SearchIndexVersion/SearchIndexVersion';
|
||||
import StoredProcedureVersion from 'components/StoredProcedureVersion/StoredProcedureVersion.component';
|
||||
import TableVersion from 'components/TableVersion/TableVersion.component';
|
||||
import TopicVersion from 'components/TopicVersion/TopicVersion.component';
|
||||
import { ERROR_PLACEHOLDER_TYPE } from 'enums/common.enum';
|
||||
import { Container } from 'generated/entity/data/container';
|
||||
import { DashboardDataModel } from 'generated/entity/data/dashboardDataModel';
|
||||
import { Mlmodel } from 'generated/entity/data/mlmodel';
|
||||
import { SearchIndex } from 'generated/entity/data/searchIndex';
|
||||
import { StoredProcedure } from 'generated/entity/data/storedProcedure';
|
||||
import { isEmpty } from 'lodash';
|
||||
import React, {
|
||||
FunctionComponent,
|
||||
useCallback,
|
||||
@ -51,11 +64,21 @@ import {
|
||||
getPipelineVersion,
|
||||
getPipelineVersions,
|
||||
} from 'rest/pipelineAPI';
|
||||
import {
|
||||
getSearchIndexDetailsByFQN,
|
||||
getSearchIndexVersion,
|
||||
getSearchIndexVersions,
|
||||
} from 'rest/SearchIndexAPI';
|
||||
import {
|
||||
getContainerByName,
|
||||
getContainerVersion,
|
||||
getContainerVersions,
|
||||
} from 'rest/storageAPI';
|
||||
import {
|
||||
getStoredProceduresDetailsByFQN,
|
||||
getStoredProceduresVersion,
|
||||
getStoredProceduresVersionsList,
|
||||
} from 'rest/storedProceduresAPI';
|
||||
import {
|
||||
getTableDetailsByFQN,
|
||||
getTableVersion,
|
||||
@ -67,6 +90,8 @@ import {
|
||||
getTopicVersions,
|
||||
} from 'rest/topicsAPI';
|
||||
import { getEntityBreadcrumbs, getEntityName } from 'utils/EntityUtils';
|
||||
import { DEFAULT_ENTITY_PERMISSION } from 'utils/PermissionsUtils';
|
||||
import { getSearchIndexTabPath } from 'utils/SearchIndexUtils';
|
||||
import { FQN_SEPARATOR_CHAR } from '../../constants/char.constants';
|
||||
import {
|
||||
getContainerDetailPath,
|
||||
@ -88,32 +113,6 @@ import { Topic } from '../../generated/entity/data/topic';
|
||||
import { EntityHistory } from '../../generated/type/entityHistory';
|
||||
import { TagLabel } from '../../generated/type/tagLabel';
|
||||
import { getPartialNameFromFQN } from '../../utils/CommonUtils';
|
||||
|
||||
import ErrorPlaceHolder from 'components/common/error-with-placeholder/ErrorPlaceHolder';
|
||||
import PageLayoutV1 from 'components/containers/PageLayoutV1';
|
||||
import { usePermissionProvider } from 'components/PermissionProvider/PermissionProvider';
|
||||
import {
|
||||
OperationPermission,
|
||||
ResourceEntity,
|
||||
} from 'components/PermissionProvider/PermissionProvider.interface';
|
||||
import SearchIndexVersion from 'components/SearchIndexVersion/SearchIndexVersion';
|
||||
import StoredProcedureVersion from 'components/StoredProcedureVersion/StoredProcedureVersion.component';
|
||||
import { ERROR_PLACEHOLDER_TYPE } from 'enums/common.enum';
|
||||
import { SearchIndex } from 'generated/entity/data/searchIndex';
|
||||
import { StoredProcedure } from 'generated/entity/data/storedProcedure';
|
||||
import { isEmpty } from 'lodash';
|
||||
import {
|
||||
getSearchIndexDetailsByFQN,
|
||||
getSearchIndexVersion,
|
||||
getSearchIndexVersions,
|
||||
} from 'rest/SearchIndexAPI';
|
||||
import {
|
||||
getStoredProceduresDetailsByFQN,
|
||||
getStoredProceduresVersion,
|
||||
getStoredProceduresVersionsList,
|
||||
} from 'rest/storedProceduresAPI';
|
||||
import { DEFAULT_ENTITY_PERMISSION } from 'utils/PermissionsUtils';
|
||||
import { getSearchIndexTabPath } from 'utils/SearchIndexUtils';
|
||||
import { getTierTags } from '../../utils/TableUtils';
|
||||
import './EntityVersionPage.less';
|
||||
|
||||
@ -130,15 +129,23 @@ export type VersionData =
|
||||
|
||||
const EntityVersionPage: FunctionComponent = () => {
|
||||
const { t } = useTranslation();
|
||||
const { tab } = useParams<{ tab: EntityTabs }>();
|
||||
const history = useHistory();
|
||||
const [entityId, setEntityId] = useState<string>('');
|
||||
const [currentVersionData, setCurrentVersionData] = useState<VersionData>(
|
||||
{} as VersionData
|
||||
);
|
||||
|
||||
const { entityType, version, entityFQN } =
|
||||
useParams<{ entityType: EntityType; version: string; entityFQN: string }>();
|
||||
const {
|
||||
entityType,
|
||||
version,
|
||||
fqn: entityFQN,
|
||||
tab,
|
||||
} = useParams<{
|
||||
entityType: EntityType;
|
||||
version: string;
|
||||
fqn: string;
|
||||
tab: EntityTabs;
|
||||
}>();
|
||||
|
||||
const { getEntityPermissionByFqn } = usePermissionProvider();
|
||||
const [entityPermissions, setEntityPermissions] =
|
||||
@ -281,6 +288,21 @@ const EntityVersionPage: FunctionComponent = () => {
|
||||
|
||||
break;
|
||||
}
|
||||
case EntityType.DATABASE: {
|
||||
await fetchResourcePermission(ResourceEntity.DATABASE);
|
||||
|
||||
break;
|
||||
}
|
||||
case EntityType.DATABASE_SCHEMA: {
|
||||
await fetchResourcePermission(ResourceEntity.DATABASE_SCHEMA);
|
||||
|
||||
break;
|
||||
}
|
||||
case EntityType.GLOSSARY_TERM: {
|
||||
await fetchResourcePermission(ResourceEntity.GLOSSARY_TERM);
|
||||
|
||||
break;
|
||||
}
|
||||
default: {
|
||||
break;
|
||||
}
|
||||
@ -554,7 +576,7 @@ const EntityVersionPage: FunctionComponent = () => {
|
||||
return (
|
||||
<TableVersion
|
||||
backHandler={backHandler}
|
||||
currentVersionData={currentVersionData}
|
||||
currentVersionData={currentVersionData as Table}
|
||||
datasetFQN={entityFQN}
|
||||
deleted={currentVersionData.deleted}
|
||||
domain={domain}
|
||||
@ -573,7 +595,7 @@ const EntityVersionPage: FunctionComponent = () => {
|
||||
return (
|
||||
<TopicVersion
|
||||
backHandler={backHandler}
|
||||
currentVersionData={currentVersionData}
|
||||
currentVersionData={currentVersionData as Topic}
|
||||
deleted={currentVersionData.deleted}
|
||||
domain={domain}
|
||||
entityPermissions={entityPermissions}
|
||||
@ -593,7 +615,7 @@ const EntityVersionPage: FunctionComponent = () => {
|
||||
return (
|
||||
<DashboardVersion
|
||||
backHandler={backHandler}
|
||||
currentVersionData={currentVersionData}
|
||||
currentVersionData={currentVersionData as Dashboard}
|
||||
deleted={currentVersionData.deleted}
|
||||
domain={domain}
|
||||
entityPermissions={entityPermissions}
|
||||
@ -612,7 +634,7 @@ const EntityVersionPage: FunctionComponent = () => {
|
||||
return (
|
||||
<PipelineVersion
|
||||
backHandler={backHandler}
|
||||
currentVersionData={currentVersionData}
|
||||
currentVersionData={currentVersionData as Pipeline}
|
||||
deleted={currentVersionData.deleted}
|
||||
domain={domain}
|
||||
entityPermissions={entityPermissions}
|
||||
@ -632,7 +654,7 @@ const EntityVersionPage: FunctionComponent = () => {
|
||||
return (
|
||||
<MlModelVersion
|
||||
backHandler={backHandler}
|
||||
currentVersionData={currentVersionData}
|
||||
currentVersionData={currentVersionData as Mlmodel}
|
||||
deleted={currentVersionData.deleted}
|
||||
domain={domain}
|
||||
entityPermissions={entityPermissions}
|
||||
@ -652,7 +674,7 @@ const EntityVersionPage: FunctionComponent = () => {
|
||||
backHandler={backHandler}
|
||||
breadCrumbList={slashedEntityName}
|
||||
containerFQN={entityFQN}
|
||||
currentVersionData={currentVersionData}
|
||||
currentVersionData={currentVersionData as Container}
|
||||
deleted={currentVersionData.deleted}
|
||||
domain={domain}
|
||||
entityPermissions={entityPermissions}
|
||||
@ -670,7 +692,7 @@ const EntityVersionPage: FunctionComponent = () => {
|
||||
<SearchIndexVersion
|
||||
backHandler={backHandler}
|
||||
breadCrumbList={slashedEntityName}
|
||||
currentVersionData={currentVersionData}
|
||||
currentVersionData={currentVersionData as SearchIndex}
|
||||
deleted={currentVersionData.deleted}
|
||||
domain={domain}
|
||||
entityPermissions={entityPermissions}
|
||||
@ -709,7 +731,7 @@ const EntityVersionPage: FunctionComponent = () => {
|
||||
return (
|
||||
<StoredProcedureVersion
|
||||
backHandler={backHandler}
|
||||
currentVersionData={currentVersionData}
|
||||
currentVersionData={currentVersionData as StoredProcedure}
|
||||
deleted={currentVersionData.deleted}
|
||||
domain={domain}
|
||||
entityPermissions={entityPermissions}
|
||||
|
||||
@ -20,7 +20,7 @@ import EntityVersionPage from './EntityVersionPage.component';
|
||||
let mockParams = {
|
||||
entityType: 'table',
|
||||
version: '0.1',
|
||||
entityFQN: 'bigquery_gcp.shopify.raw_product_catalog',
|
||||
fqn: 'bigquery_gcp.shopify.raw_product_catalog',
|
||||
};
|
||||
|
||||
jest.mock('react-router-dom', () => ({
|
||||
@ -123,7 +123,7 @@ describe('Test EntityVersionPage component', () => {
|
||||
mockParams = {
|
||||
entityType: 'dashboard',
|
||||
version: '0.2',
|
||||
entityFQN: 'sample_superset.forecast_sales_performance',
|
||||
fqn: 'sample_superset.forecast_sales_performance',
|
||||
};
|
||||
|
||||
await act(async () => {
|
||||
@ -143,7 +143,7 @@ describe('Test EntityVersionPage component', () => {
|
||||
mockParams = {
|
||||
entityType: 'pipeline',
|
||||
version: '0.1',
|
||||
entityFQN: 'sample_airflow.snowflake_etl',
|
||||
fqn: 'sample_airflow.snowflake_etl',
|
||||
};
|
||||
|
||||
await act(async () => {
|
||||
@ -163,7 +163,7 @@ describe('Test EntityVersionPage component', () => {
|
||||
mockParams = {
|
||||
entityType: 'topic',
|
||||
version: '0.1',
|
||||
entityFQN: 'sample_kafka.sales',
|
||||
fqn: 'sample_kafka.sales',
|
||||
};
|
||||
|
||||
await act(async () => {
|
||||
@ -181,7 +181,7 @@ describe('Test EntityVersionPage component', () => {
|
||||
mockParams = {
|
||||
entityType: 'mlmodel',
|
||||
version: '0.1',
|
||||
entityFQN: 'mlflow_svc.eta_predictions',
|
||||
fqn: 'mlflow_svc.eta_predictions',
|
||||
};
|
||||
|
||||
await act(async () => {
|
||||
@ -199,7 +199,7 @@ describe('Test EntityVersionPage component', () => {
|
||||
mockParams = {
|
||||
entityType: 'container',
|
||||
version: '0.1',
|
||||
entityFQN: 's3_storage_sample.transactions',
|
||||
fqn: 's3_storage_sample.transactions',
|
||||
};
|
||||
|
||||
await act(async () => {
|
||||
@ -219,7 +219,7 @@ describe('Test EntityVersionPage component', () => {
|
||||
mockParams = {
|
||||
entityType: 'dashboardDataModel',
|
||||
version: '0.1',
|
||||
entityFQN: 'data_model.sales',
|
||||
fqn: 'data_model.sales',
|
||||
};
|
||||
|
||||
await act(async () => {
|
||||
|
||||
@ -42,7 +42,8 @@ import './global-setting-page.style.less';
|
||||
const GlobalSettingPage = () => {
|
||||
const history = useHistory();
|
||||
const { t } = useTranslation();
|
||||
const { tab, settingCategory } = useParams<{ [key: string]: string }>();
|
||||
const { tab, settingCategory } =
|
||||
useParams<{ tab: string; settingCategory: string }>();
|
||||
|
||||
const { permissions } = usePermissionProvider();
|
||||
|
||||
|
||||
@ -33,7 +33,7 @@ import { GlossaryLeftPanelProps } from './GlossaryLeftPanel.interface';
|
||||
const GlossaryLeftPanel = ({ glossaries }: GlossaryLeftPanelProps) => {
|
||||
const { t } = useTranslation();
|
||||
const { permissions } = usePermissionProvider();
|
||||
const { glossaryName } = useParams<{ glossaryName: string }>();
|
||||
const { fqn: glossaryName } = useParams<{ fqn: string }>();
|
||||
const glossaryFqn = glossaryName ? decodeURIComponent(glossaryName) : null;
|
||||
const history = useHistory();
|
||||
|
||||
|
||||
@ -43,7 +43,7 @@ import {
|
||||
updateGlossaryVotes,
|
||||
} from 'rest/glossaryAPI';
|
||||
import { checkPermission } from 'utils/PermissionsUtils';
|
||||
import { getGlossaryPath, getGlossaryTermsPath } from 'utils/RouterUtils';
|
||||
import { getGlossaryPath } from 'utils/RouterUtils';
|
||||
import { showErrorToast, showSuccessToast } from 'utils/ToastUtils';
|
||||
import Fqn from '../../../utils/Fqn';
|
||||
import GlossaryLeftPanel from '../GlossaryLeftPanel/GlossaryLeftPanel.component';
|
||||
@ -51,7 +51,7 @@ import GlossaryLeftPanel from '../GlossaryLeftPanel/GlossaryLeftPanel.component'
|
||||
const GlossaryPage = () => {
|
||||
const { t } = useTranslation();
|
||||
const { permissions } = usePermissionProvider();
|
||||
const { glossaryName } = useParams<{ glossaryName: string }>();
|
||||
const { fqn: glossaryName } = useParams<{ fqn: string }>();
|
||||
const glossaryFqn = decodeURIComponent(glossaryName);
|
||||
const history = useHistory();
|
||||
const [glossaries, setGlossaries] = useState<Glossary[]>([]);
|
||||
@ -174,9 +174,7 @@ const GlossaryPage = () => {
|
||||
);
|
||||
!glossaryFqn &&
|
||||
glossaries[0].fullyQualifiedName &&
|
||||
history.replace(
|
||||
getGlossaryTermsPath(glossaries[0].fullyQualifiedName)
|
||||
);
|
||||
history.replace(getGlossaryPath(glossaries[0].fullyQualifiedName));
|
||||
setIsRightPanelLoading(false);
|
||||
}
|
||||
}
|
||||
|
||||
@ -51,7 +51,7 @@ import { showErrorToast } from '../../utils/ToastUtils';
|
||||
const MlModelPage = () => {
|
||||
const { t } = useTranslation();
|
||||
const history = useHistory();
|
||||
const { mlModelFqn } = useParams<{ [key: string]: string }>();
|
||||
const { fqn: mlModelFqn } = useParams<{ fqn: string }>();
|
||||
const [mlModelDetail, setMlModelDetail] = useState<Mlmodel>({} as Mlmodel);
|
||||
const [isDetailLoading, setIsDetailLoading] = useState<boolean>(false);
|
||||
const USERId = getCurrentUserId();
|
||||
|
||||
@ -54,7 +54,7 @@ const PipelineDetailsPage = () => {
|
||||
const USERId = getCurrentUserId();
|
||||
const history = useHistory();
|
||||
|
||||
const { pipelineFQN } = useParams<{ pipelineFQN: string }>();
|
||||
const { fqn: pipelineFQN } = useParams<{ fqn: string }>();
|
||||
const [pipelineDetails, setPipelineDetails] = useState<Pipeline>(
|
||||
{} as Pipeline
|
||||
);
|
||||
|
||||
@ -40,8 +40,8 @@ import { DEFAULT_ENTITY_PERMISSION } from 'utils/PermissionsUtils';
|
||||
import { showErrorToast } from 'utils/ToastUtils';
|
||||
|
||||
const QueryPage = () => {
|
||||
const { datasetFQN, queryId } =
|
||||
useParams<{ datasetFQN: string; queryId: string }>();
|
||||
const { fqn: datasetFQN, queryId } =
|
||||
useParams<{ fqn: string; queryId: string }>();
|
||||
const { t } = useTranslation();
|
||||
|
||||
const [titleBreadcrumb, setTitleBreadcrumb] = useState<
|
||||
|
||||
@ -20,7 +20,7 @@ import QueryPage from './QueryPage.component';
|
||||
jest.mock('react-router-dom', () => ({
|
||||
useLocation: jest.fn().mockImplementation(() => ({ search: '' })),
|
||||
useParams: jest.fn().mockImplementation(() => ({
|
||||
datasetFQN: 'testDatasetFQN',
|
||||
fqn: 'testDatasetFQN',
|
||||
queryId: 'queryId',
|
||||
})),
|
||||
}));
|
||||
|
||||
@ -105,7 +105,7 @@ jest.mock(
|
||||
jest.mock('react-router-dom', () => ({
|
||||
useParams: jest
|
||||
.fn()
|
||||
.mockImplementation(() => ({ searchIndexFQN: 'fqn', tab: 'fields' })),
|
||||
.mockImplementation(() => ({ fqn: 'fqn', tab: 'fields' })),
|
||||
useHistory: jest.fn().mockImplementation(() => ({})),
|
||||
}));
|
||||
|
||||
@ -146,7 +146,7 @@ describe('SearchIndexDetailsPage component', () => {
|
||||
|
||||
expect(getSearchIndexDetailsByFQN).toHaveBeenCalledWith(
|
||||
'fqn',
|
||||
'fields,extension,followers,tags,owner,domain'
|
||||
'fields,followers,tags,owner,domain'
|
||||
);
|
||||
});
|
||||
|
||||
@ -163,7 +163,7 @@ describe('SearchIndexDetailsPage component', () => {
|
||||
|
||||
expect(getSearchIndexDetailsByFQN).toHaveBeenCalledWith(
|
||||
'fqn',
|
||||
'fields,extension,followers,tags,owner,domain'
|
||||
'fields,followers,tags,owner,domain'
|
||||
);
|
||||
|
||||
expect(await screen.findByText('testDataAssetsHeader')).toBeInTheDocument();
|
||||
@ -194,7 +194,7 @@ describe('SearchIndexDetailsPage component', () => {
|
||||
|
||||
expect(getSearchIndexDetailsByFQN).toHaveBeenCalledWith(
|
||||
'fqn',
|
||||
'fields,extension,followers,tags,owner,domain'
|
||||
'fields,followers,tags,owner,domain'
|
||||
);
|
||||
|
||||
expect(
|
||||
|
||||
@ -19,7 +19,6 @@ import ActivityFeedProvider, {
|
||||
import { ActivityFeedTab } from 'components/ActivityFeed/ActivityFeedTab/ActivityFeedTab.component';
|
||||
import ActivityThreadPanel from 'components/ActivityFeed/ActivityThreadPanel/ActivityThreadPanel';
|
||||
import { CustomPropertyTable } from 'components/common/CustomPropertyTable/CustomPropertyTable';
|
||||
import { CustomPropertyProps } from 'components/common/CustomPropertyTable/CustomPropertyTable.interface';
|
||||
import DescriptionV1 from 'components/common/description/DescriptionV1';
|
||||
import ErrorPlaceHolder from 'components/common/error-with-placeholder/ErrorPlaceHolder';
|
||||
import QueryViewer from 'components/common/QueryViewer/QueryViewer.component';
|
||||
@ -74,8 +73,8 @@ import SearchIndexFieldsTab from './SearchIndexFieldsTab/SearchIndexFieldsTab';
|
||||
function SearchIndexDetailsPage() {
|
||||
const { postFeed, deleteFeed, updateFeed } = useActivityFeedProvider();
|
||||
const { getEntityPermissionByFqn } = usePermissionProvider();
|
||||
const { searchIndexFQN, tab: activeTab = EntityTabs.FIELDS } =
|
||||
useParams<{ searchIndexFQN: string; tab: string }>();
|
||||
const { fqn: searchIndexFQN, tab: activeTab = EntityTabs.FIELDS } =
|
||||
useParams<{ fqn: string; tab: string }>();
|
||||
const { t } = useTranslation();
|
||||
const history = useHistory();
|
||||
const USERId = getCurrentUserId();
|
||||
@ -312,9 +311,16 @@ function SearchIndexDetailsPage() {
|
||||
await handleTagsUpdate(updatedTags);
|
||||
};
|
||||
|
||||
const onExtensionUpdate = async (updatedData: SearchIndex) => {
|
||||
await onSearchIndexUpdate(updatedData, 'extension');
|
||||
};
|
||||
const onExtensionUpdate = useCallback(
|
||||
async (updatedData: SearchIndex) => {
|
||||
searchIndexDetails &&
|
||||
(await saveUpdatedSearchIndexData({
|
||||
...searchIndexDetails,
|
||||
extension: updatedData.extension,
|
||||
}));
|
||||
},
|
||||
[saveUpdatedSearchIndexData, searchIndexDetails]
|
||||
);
|
||||
|
||||
const fieldsTab = useMemo(
|
||||
() => (
|
||||
@ -495,9 +501,6 @@ function SearchIndexDetailsPage() {
|
||||
key: EntityTabs.CUSTOM_PROPERTIES,
|
||||
children: (
|
||||
<CustomPropertyTable
|
||||
entityDetails={
|
||||
searchIndexDetails as CustomPropertyProps['entityDetails']
|
||||
}
|
||||
entityType={EntityType.SEARCH_INDEX}
|
||||
handleExtensionUpdate={onExtensionUpdate}
|
||||
hasEditAccess={
|
||||
|
||||
@ -134,8 +134,12 @@ export type ServicePageData =
|
||||
const ServiceDetailsPage: FunctionComponent = () => {
|
||||
const { t } = useTranslation();
|
||||
const { isAirflowAvailable } = useAirflowStatus();
|
||||
const { serviceFQN, serviceCategory, tab } = useParams<{
|
||||
serviceFQN: string;
|
||||
const {
|
||||
fqn: serviceFQN,
|
||||
serviceCategory,
|
||||
tab,
|
||||
} = useParams<{
|
||||
fqn: string;
|
||||
serviceCategory: ServiceTypes;
|
||||
tab: string;
|
||||
}>();
|
||||
|
||||
@ -65,8 +65,8 @@ function ServiceMainTabContent({
|
||||
saveUpdatedServiceData,
|
||||
}: ServiceMainTabContentProps) {
|
||||
const { t } = useTranslation();
|
||||
const { serviceFQN, serviceCategory } = useParams<{
|
||||
serviceFQN: string;
|
||||
const { fqn: serviceFQN, serviceCategory } = useParams<{
|
||||
fqn: string;
|
||||
serviceCategory: ServiceTypes;
|
||||
}>();
|
||||
const [isEdit, setIsEdit] = useState(false);
|
||||
|
||||
@ -42,8 +42,8 @@ function ServiceVersionMainTabContent({
|
||||
entityType,
|
||||
changeDescription,
|
||||
}: ServiceVersionMainTabContentProps) {
|
||||
const { serviceFQN, serviceCategory } = useParams<{
|
||||
serviceFQN: string;
|
||||
const { fqn: serviceFQN, serviceCategory } = useParams<{
|
||||
fqn: string;
|
||||
serviceCategory: ServiceTypes;
|
||||
}>();
|
||||
|
||||
|
||||
@ -22,7 +22,7 @@ import ServiceVersionPage from './ServiceVersionPage';
|
||||
const mockParams = {
|
||||
serviceCategory: 'databaseServices',
|
||||
version: '1.2',
|
||||
serviceFQN: 'sample_data',
|
||||
fqn: 'sample_data',
|
||||
};
|
||||
const mockPush = jest.fn();
|
||||
const mockOtherData = { data: [], paging: {} };
|
||||
@ -243,7 +243,7 @@ describe('ServiceVersionPage tests', () => {
|
||||
it('Component should render properly for pipelineServices', async () => {
|
||||
(useParams as jest.Mock).mockImplementation(() => ({
|
||||
version: '1.2',
|
||||
serviceFQN: 'sample_data',
|
||||
fqn: 'sample_data',
|
||||
serviceCategory: 'pipelineServices',
|
||||
}));
|
||||
await act(async () => {
|
||||
@ -262,7 +262,7 @@ describe('ServiceVersionPage tests', () => {
|
||||
it('Component should render properly for storageServices', async () => {
|
||||
(useParams as jest.Mock).mockImplementation(() => ({
|
||||
version: '1.2',
|
||||
serviceFQN: 'sample_data',
|
||||
fqn: 'sample_data',
|
||||
serviceCategory: 'storageServices',
|
||||
}));
|
||||
await act(async () => {
|
||||
@ -281,7 +281,7 @@ describe('ServiceVersionPage tests', () => {
|
||||
it('Component should render properly for mlmodelServices', async () => {
|
||||
(useParams as jest.Mock).mockImplementation(() => ({
|
||||
version: '1.2',
|
||||
serviceFQN: 'sample_data',
|
||||
fqn: 'sample_data',
|
||||
serviceCategory: 'mlmodelServices',
|
||||
}));
|
||||
await act(async () => {
|
||||
@ -300,7 +300,7 @@ describe('ServiceVersionPage tests', () => {
|
||||
it('Only basic information should be rendered for metadataServices', async () => {
|
||||
(useParams as jest.Mock).mockImplementation(() => ({
|
||||
version: '1.2',
|
||||
serviceFQN: 'sample_data',
|
||||
fqn: 'sample_data',
|
||||
serviceCategory: 'metadataServices',
|
||||
}));
|
||||
await act(async () => {
|
||||
|
||||
@ -73,9 +73,13 @@ function ServiceVersionPage() {
|
||||
const { t } = useTranslation();
|
||||
const history = useHistory();
|
||||
const { getEntityPermissionByFqn } = usePermissionProvider();
|
||||
const { serviceCategory, serviceFQN, version } = useParams<{
|
||||
const {
|
||||
serviceCategory,
|
||||
fqn: serviceFQN,
|
||||
version,
|
||||
} = useParams<{
|
||||
serviceCategory: ServiceTypes;
|
||||
serviceFQN: string;
|
||||
fqn: string;
|
||||
version: string;
|
||||
}>();
|
||||
const [paging, setPaging] = useState<Paging>(pagingObject);
|
||||
|
||||
@ -23,7 +23,7 @@ const mockEntityPermissionByFqn = jest
|
||||
.mockImplementation(() => DEFAULT_ENTITY_PERMISSION);
|
||||
|
||||
const API_FIELDS = `owner, followers,
|
||||
tags, extension, domain, votes`;
|
||||
tags, domain, votes`;
|
||||
|
||||
jest.mock('components/PermissionProvider/PermissionProvider', () => ({
|
||||
usePermissionProvider: jest.fn().mockImplementation(() => ({
|
||||
@ -121,9 +121,7 @@ jest.mock(
|
||||
);
|
||||
|
||||
jest.mock('react-router-dom', () => ({
|
||||
useParams: jest
|
||||
.fn()
|
||||
.mockImplementation(() => ({ storedProcedureFQN: 'fqn', tab: 'code' })),
|
||||
useParams: jest.fn().mockImplementation(() => ({ fqn: 'fqn', tab: 'code' })),
|
||||
useHistory: jest.fn().mockImplementation(() => ({})),
|
||||
}));
|
||||
|
||||
|
||||
@ -16,7 +16,6 @@ import { useActivityFeedProvider } from 'components/ActivityFeed/ActivityFeedPro
|
||||
import { ActivityFeedTab } from 'components/ActivityFeed/ActivityFeedTab/ActivityFeedTab.component';
|
||||
import ActivityThreadPanel from 'components/ActivityFeed/ActivityThreadPanel/ActivityThreadPanel';
|
||||
import { CustomPropertyTable } from 'components/common/CustomPropertyTable/CustomPropertyTable';
|
||||
import { CustomPropertyProps } from 'components/common/CustomPropertyTable/CustomPropertyTable.interface';
|
||||
import DescriptionV1 from 'components/common/description/DescriptionV1';
|
||||
import ErrorPlaceHolder from 'components/common/error-with-placeholder/ErrorPlaceHolder';
|
||||
import PageLayoutV1 from 'components/containers/PageLayoutV1';
|
||||
@ -79,8 +78,8 @@ const StoredProcedurePage = () => {
|
||||
const { t } = useTranslation();
|
||||
const USER_ID = getCurrentUserId();
|
||||
const history = useHistory();
|
||||
const { storedProcedureFQN, tab: activeTab = EntityTabs.CODE } =
|
||||
useParams<{ storedProcedureFQN: string; tab: string }>();
|
||||
const { fqn: storedProcedureFQN, tab: activeTab = EntityTabs.CODE } =
|
||||
useParams<{ fqn: string; tab: string }>();
|
||||
|
||||
const { getEntityPermissionByFqn } = usePermissionProvider();
|
||||
const { postFeed, deleteFeed, updateFeed } = useActivityFeedProvider();
|
||||
@ -201,7 +200,7 @@ const StoredProcedurePage = () => {
|
||||
|
||||
return patchStoredProceduresDetails(storedProcedureId ?? '', jsonPatch);
|
||||
},
|
||||
[storedProcedure]
|
||||
[storedProcedure, storedProcedureId]
|
||||
);
|
||||
|
||||
const handleStoreProcedureUpdate = async (
|
||||
@ -460,9 +459,16 @@ const StoredProcedurePage = () => {
|
||||
setThreadLink('');
|
||||
};
|
||||
|
||||
const onExtensionUpdate = async (updatedData: StoredProcedure) => {
|
||||
await handleStoreProcedureUpdate(updatedData, 'extension');
|
||||
};
|
||||
const onExtensionUpdate = useCallback(
|
||||
async (updatedData: StoredProcedure) => {
|
||||
storedProcedure &&
|
||||
(await saveUpdatedStoredProceduresData({
|
||||
...storedProcedure,
|
||||
extension: updatedData.extension,
|
||||
}));
|
||||
},
|
||||
[saveUpdatedStoredProceduresData, storedProcedure]
|
||||
);
|
||||
|
||||
const tabs = useMemo(
|
||||
() => [
|
||||
@ -595,9 +601,6 @@ const StoredProcedurePage = () => {
|
||||
key: EntityTabs.CUSTOM_PROPERTIES,
|
||||
children: (
|
||||
<CustomPropertyTable
|
||||
entityDetails={
|
||||
storedProcedure as CustomPropertyProps['entityDetails']
|
||||
}
|
||||
entityType={EntityType.STORED_PROCEDURE}
|
||||
handleExtensionUpdate={onExtensionUpdate}
|
||||
hasEditAccess={
|
||||
|
||||
@ -22,7 +22,7 @@ const mockEntityPermissionByFqn = jest
|
||||
.mockImplementation(() => DEFAULT_ENTITY_PERMISSION);
|
||||
|
||||
const COMMON_API_FIELDS =
|
||||
'columns,followers,joins,tags,owner,dataModel,tableConstraints,extension,viewDefinition,domain,dataProducts,votes';
|
||||
'columns,followers,joins,tags,owner,dataModel,tableConstraints,viewDefinition,domain,dataProducts,votes';
|
||||
|
||||
jest.mock('components/PermissionProvider/PermissionProvider', () => ({
|
||||
usePermissionProvider: jest.fn().mockImplementation(() => ({
|
||||
@ -152,7 +152,7 @@ jest.mock(
|
||||
jest.mock('react-router-dom', () => ({
|
||||
useParams: jest
|
||||
.fn()
|
||||
.mockImplementation(() => ({ datasetFQN: 'fqn', tab: 'schema' })),
|
||||
.mockImplementation(() => ({ fqn: 'fqn', tab: 'schema' })),
|
||||
useHistory: jest.fn().mockImplementation(() => ({})),
|
||||
}));
|
||||
|
||||
|
||||
@ -17,7 +17,6 @@ import { useActivityFeedProvider } from 'components/ActivityFeed/ActivityFeedPro
|
||||
import { ActivityFeedTab } from 'components/ActivityFeed/ActivityFeedTab/ActivityFeedTab.component';
|
||||
import ActivityThreadPanel from 'components/ActivityFeed/ActivityThreadPanel/ActivityThreadPanel';
|
||||
import { CustomPropertyTable } from 'components/common/CustomPropertyTable/CustomPropertyTable';
|
||||
import { CustomPropertyProps } from 'components/common/CustomPropertyTable/CustomPropertyTable.interface';
|
||||
import DescriptionV1 from 'components/common/description/DescriptionV1';
|
||||
import ErrorPlaceHolder from 'components/common/error-with-placeholder/ErrorPlaceHolder';
|
||||
import QueryViewer from 'components/common/QueryViewer/QueryViewer.component';
|
||||
@ -95,8 +94,8 @@ const TableDetailsPageV1 = () => {
|
||||
const { isTourOpen, activeTabForTourDatasetPage, isTourPage } =
|
||||
useTourProvider();
|
||||
const [tableDetails, setTableDetails] = useState<Table>();
|
||||
const { datasetFQN, tab: activeTab = EntityTabs.SCHEMA } =
|
||||
useParams<{ datasetFQN: string; tab: string }>();
|
||||
const { fqn: datasetFQN, tab: activeTab = EntityTabs.SCHEMA } =
|
||||
useParams<{ fqn: string; tab: EntityTabs }>();
|
||||
const { t } = useTranslation();
|
||||
const history = useHistory();
|
||||
const USERId = getCurrentUserId();
|
||||
@ -419,7 +418,11 @@ const TableDetailsPageV1 = () => {
|
||||
};
|
||||
|
||||
const onExtensionUpdate = async (updatedData: Table) => {
|
||||
await onTableUpdate(updatedData, 'extension');
|
||||
tableDetails &&
|
||||
(await saveUpdatedTableData({
|
||||
...tableDetails,
|
||||
extension: updatedData.extension,
|
||||
}));
|
||||
};
|
||||
|
||||
const onDataProductsUpdate = async (updatedData: DataProduct[]) => {
|
||||
@ -700,7 +703,6 @@ const TableDetailsPageV1 = () => {
|
||||
key: EntityTabs.CUSTOM_PROPERTIES,
|
||||
children: (
|
||||
<CustomPropertyTable
|
||||
entityDetails={tableDetails as CustomPropertyProps['entityDetails']}
|
||||
entityType={EntityType.TABLE}
|
||||
handleExtensionUpdate={onExtensionUpdate}
|
||||
hasEditAccess={
|
||||
|
||||
@ -74,7 +74,7 @@ import { DeleteTagsType, SubmitProps } from './TagsPage.interface';
|
||||
const TagsPage = () => {
|
||||
const { getEntityPermission, permissions } = usePermissionProvider();
|
||||
const history = useHistory();
|
||||
const { tagCategoryName } = useParams<Record<string, string>>();
|
||||
const { fqn: tagCategoryName } = useParams<{ fqn: string }>();
|
||||
const [classifications, setClassifications] = useState<Array<Classification>>(
|
||||
[]
|
||||
);
|
||||
|
||||
@ -58,7 +58,8 @@ const RequestDescription = () => {
|
||||
const [form] = useForm();
|
||||
const markdownRef = useRef<EditorContentRef>();
|
||||
|
||||
const { entityType, entityFQN } = useParams<{ [key: string]: string }>();
|
||||
const { entityType, fqn: entityFQN } =
|
||||
useParams<{ fqn: string; entityType: EntityType }>();
|
||||
const queryParams = new URLSearchParams(location.search);
|
||||
|
||||
const field = queryParams.get('field');
|
||||
@ -125,7 +126,7 @@ const RequestDescription = () => {
|
||||
);
|
||||
history.push(
|
||||
getEntityDetailLink(
|
||||
entityType as EntityType,
|
||||
entityType,
|
||||
entityType === EntityType.TABLE
|
||||
? entityFQN
|
||||
: getDecodedFqn(entityFQN),
|
||||
@ -141,11 +142,7 @@ const RequestDescription = () => {
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
fetchEntityDetail(
|
||||
entityType as EntityType,
|
||||
entityFQN as string,
|
||||
setEntityData
|
||||
);
|
||||
fetchEntityDetail(entityType, entityFQN, setEntityData);
|
||||
}, [entityFQN, entityType]);
|
||||
|
||||
useEffect(() => {
|
||||
@ -177,7 +174,7 @@ const RequestDescription = () => {
|
||||
<div className="max-width-md w-9/10 m-x-auto m-y-md d-grid gap-4">
|
||||
<TitleBreadcrumb
|
||||
titleLinks={[
|
||||
...getBreadCrumbList(entityData, entityType as EntityType),
|
||||
...getBreadCrumbList(entityData, entityType),
|
||||
{
|
||||
name: t('label.create-entity', {
|
||||
entity: t('label.task'),
|
||||
|
||||
@ -56,7 +56,8 @@ const RequestTag = () => {
|
||||
const location = useLocation();
|
||||
const history = useHistory();
|
||||
const [form] = useForm();
|
||||
const { entityType, entityFQN } = useParams<{ [key: string]: string }>();
|
||||
const { entityType, fqn: entityFQN } =
|
||||
useParams<{ fqn: string; entityType: EntityType }>();
|
||||
const queryParams = new URLSearchParams(location.search);
|
||||
|
||||
const field = queryParams.get('field');
|
||||
@ -118,7 +119,7 @@ const RequestTag = () => {
|
||||
);
|
||||
history.push(
|
||||
getEntityDetailLink(
|
||||
entityType as EntityType,
|
||||
entityType,
|
||||
entityType === EntityType.TABLE
|
||||
? entityFQN
|
||||
: getDecodedFqn(entityFQN),
|
||||
@ -131,11 +132,7 @@ const RequestTag = () => {
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
fetchEntityDetail(
|
||||
entityType as EntityType,
|
||||
entityFQN as string,
|
||||
setEntityData
|
||||
);
|
||||
fetchEntityDetail(entityType, entityFQN, setEntityData);
|
||||
}, [entityFQN, entityType]);
|
||||
|
||||
useEffect(() => {
|
||||
@ -167,7 +164,7 @@ const RequestTag = () => {
|
||||
<div className="max-width-md w-9/10 m-x-auto m-y-md d-grid gap-4">
|
||||
<TitleBreadcrumb
|
||||
titleLinks={[
|
||||
...getBreadCrumbList(entityData, entityType as EntityType),
|
||||
...getBreadCrumbList(entityData, entityType),
|
||||
{
|
||||
name: t('label.create-entity', {
|
||||
entity: t('label.task'),
|
||||
|
||||
@ -59,7 +59,8 @@ const UpdateDescription = () => {
|
||||
const history = useHistory();
|
||||
const [form] = useForm();
|
||||
|
||||
const { entityType, entityFQN } = useParams<{ [key: string]: string }>();
|
||||
const { entityType, fqn: entityFQN } =
|
||||
useParams<{ fqn: string; entityType: EntityType }>();
|
||||
const queryParams = new URLSearchParams(location.search);
|
||||
|
||||
const field = queryParams.get('field');
|
||||
@ -90,7 +91,7 @@ const UpdateDescription = () => {
|
||||
return getColumnObject(
|
||||
column[0],
|
||||
getEntityColumnsDetails(entityType, entityData),
|
||||
entityType as EntityType
|
||||
entityType
|
||||
);
|
||||
}, [field, entityData, entityType]);
|
||||
|
||||
@ -139,7 +140,7 @@ const UpdateDescription = () => {
|
||||
);
|
||||
history.push(
|
||||
getEntityDetailLink(
|
||||
entityType as EntityType,
|
||||
entityType,
|
||||
entityType === EntityType.TABLE
|
||||
? entityFQN
|
||||
: getDecodedFqn(entityFQN),
|
||||
@ -152,11 +153,7 @@ const UpdateDescription = () => {
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
fetchEntityDetail(
|
||||
entityType as EntityType,
|
||||
entityFQN as string,
|
||||
setEntityData
|
||||
);
|
||||
fetchEntityDetail(entityType, entityFQN, setEntityData);
|
||||
}, [entityFQN, entityType]);
|
||||
|
||||
useEffect(() => {
|
||||
@ -193,7 +190,7 @@ const UpdateDescription = () => {
|
||||
<div className="max-width-md w-9/10 m-x-auto m-y-md d-grid gap-4">
|
||||
<TitleBreadcrumb
|
||||
titleLinks={[
|
||||
...getBreadCrumbList(entityData, entityType as EntityType),
|
||||
...getBreadCrumbList(entityData, entityType),
|
||||
{
|
||||
name: t('label.create-entity', {
|
||||
entity: t('label.task'),
|
||||
|
||||
@ -62,7 +62,8 @@ const UpdateTag = () => {
|
||||
const history = useHistory();
|
||||
const [form] = useForm();
|
||||
|
||||
const { entityType, entityFQN } = useParams<{ [key: string]: string }>();
|
||||
const { entityType, fqn: entityFQN } =
|
||||
useParams<{ fqn: string; entityType: EntityType }>();
|
||||
const queryParams = new URLSearchParams(location.search);
|
||||
|
||||
const field = queryParams.get('field');
|
||||
@ -96,7 +97,7 @@ const UpdateTag = () => {
|
||||
return getColumnObject(
|
||||
column[0],
|
||||
getEntityColumnsDetails(entityType, entityData),
|
||||
entityType as EntityType,
|
||||
entityType,
|
||||
chartData
|
||||
);
|
||||
}, [field, entityData, chartData, entityType]);
|
||||
@ -146,7 +147,7 @@ const UpdateTag = () => {
|
||||
);
|
||||
history.push(
|
||||
getEntityDetailLink(
|
||||
entityType as EntityType,
|
||||
entityType,
|
||||
entityType === EntityType.TABLE
|
||||
? entityFQN
|
||||
: getDecodedFqn(entityFQN),
|
||||
@ -160,7 +161,7 @@ const UpdateTag = () => {
|
||||
|
||||
useEffect(() => {
|
||||
fetchEntityDetail(
|
||||
entityType as EntityType,
|
||||
entityType,
|
||||
entityFQN as string,
|
||||
setEntityData,
|
||||
setChartData
|
||||
@ -202,7 +203,7 @@ const UpdateTag = () => {
|
||||
<div className="max-width-md w-9/10 m-x-auto m-y-md d-grid gap-4">
|
||||
<TitleBreadcrumb
|
||||
titleLinks={[
|
||||
...getBreadCrumbList(entityData, entityType as EntityType),
|
||||
...getBreadCrumbList(entityData, entityType),
|
||||
{
|
||||
name: t('label.create-entity', {
|
||||
entity: t('label.task'),
|
||||
|
||||
@ -31,7 +31,7 @@ import { showErrorToast } from 'utils/ToastUtils';
|
||||
import './TestCaseDetailsPage.style.less';
|
||||
|
||||
function TestCaseDetailsPage() {
|
||||
const { testCaseFQN } = useParams<{ testCaseFQN: string }>();
|
||||
const { fqn: testCaseFQN } = useParams<{ fqn: string }>();
|
||||
const { t } = useTranslation();
|
||||
const [testCaseData, setTestCaseData] = useState<TestCase>();
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user