Skip to content

Commit e7263c9

Browse files
authored
Show object versions on UI only when bucket has versioning enabled (#637)
1 parent 9c1e87b commit e7263c9

File tree

9 files changed

+51
-46
lines changed

9 files changed

+51
-46
lines changed
Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,25 @@
11
{
22
"files": {
33
"main.css": "/static/css/main.a19f3d53.chunk.css",
4-
"main.js": "/static/js/main.9b1a90de.chunk.js",
5-
"main.js.map": "/static/js/main.9b1a90de.chunk.js.map",
4+
"main.js": "/static/js/main.db452d17.chunk.js",
5+
"main.js.map": "/static/js/main.db452d17.chunk.js.map",
66
"runtime-main.js": "/static/js/runtime-main.f48e99e5.js",
77
"runtime-main.js.map": "/static/js/runtime-main.f48e99e5.js.map",
88
"static/css/2.f324abd6.chunk.css": "/static/css/2.f324abd6.chunk.css",
9-
"static/js/2.39e4bf39.chunk.js": "/static/js/2.39e4bf39.chunk.js",
10-
"static/js/2.39e4bf39.chunk.js.map": "/static/js/2.39e4bf39.chunk.js.map",
9+
"static/js/2.8df59b12.chunk.js": "/static/js/2.8df59b12.chunk.js",
10+
"static/js/2.8df59b12.chunk.js.map": "/static/js/2.8df59b12.chunk.js.map",
1111
"index.html": "/index.html",
1212
"static/css/2.f324abd6.chunk.css.map": "/static/css/2.f324abd6.chunk.css.map",
1313
"static/css/main.a19f3d53.chunk.css.map": "/static/css/main.a19f3d53.chunk.css.map",
14-
"static/js/2.39e4bf39.chunk.js.LICENSE.txt": "/static/js/2.39e4bf39.chunk.js.LICENSE.txt",
14+
"static/js/2.8df59b12.chunk.js.LICENSE.txt": "/static/js/2.8df59b12.chunk.js.LICENSE.txt",
1515
"static/media/minio_console_logo.0837460e.svg": "/static/media/minio_console_logo.0837460e.svg",
1616
"static/media/minio_operator_logo.1312b7c9.svg": "/static/media/minio_operator_logo.1312b7c9.svg"
1717
},
1818
"entrypoints": [
1919
"static/js/runtime-main.f48e99e5.js",
2020
"static/css/2.f324abd6.chunk.css",
21-
"static/js/2.39e4bf39.chunk.js",
21+
"static/js/2.8df59b12.chunk.js",
2222
"static/css/main.a19f3d53.chunk.css",
23-
"static/js/main.9b1a90de.chunk.js"
23+
"static/js/main.db452d17.chunk.js"
2424
]
2525
}

portal-ui/build/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
<!doctype html><html lang="en"><head><meta charset="utf-8"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="theme-color" content="#000000"/><meta name="description" content="MinIO Console"/><link href="https://fonts.googleapis.com/css2?family=Lato:wght@400;500;700;900&display=swap" rel="stylesheet"/><link rel="apple-touch-icon" sizes="180x180" href="/apple-icon-180x180.png"/><link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png"/><link rel="icon" type="image/png" sizes="96x96" href="/favicon-96x96.png"/><link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png"/><link rel="manifest" href="/manifest.json"/><link rel="mask-icon" href="/safari-pinned-tab.svg" color="#3a4e54"/><title>MinIO Console</title><link href="/static/css/2.f324abd6.chunk.css" rel="stylesheet"><link href="/static/css/main.a19f3d53.chunk.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div><script>!function(e){function r(r){for(var n,l,i=r[0],a=r[1],p=r[2],c=0,s=[];c<i.length;c++)l=i[c],Object.prototype.hasOwnProperty.call(o,l)&&o[l]&&s.push(o[l][0]),o[l]=0;for(n in a)Object.prototype.hasOwnProperty.call(a,n)&&(e[n]=a[n]);for(f&&f(r);s.length;)s.shift()();return u.push.apply(u,p||[]),t()}function t(){for(var e,r=0;r<u.length;r++){for(var t=u[r],n=!0,i=1;i<t.length;i++){var a=t[i];0!==o[a]&&(n=!1)}n&&(u.splice(r--,1),e=l(l.s=t[0]))}return e}var n={},o={1:0},u=[];function l(r){if(n[r])return n[r].exports;var t=n[r]={i:r,l:!1,exports:{}};return e[r].call(t.exports,t,t.exports,l),t.l=!0,t.exports}l.m=e,l.c=n,l.d=function(e,r,t){l.o(e,r)||Object.defineProperty(e,r,{enumerable:!0,get:t})},l.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},l.t=function(e,r){if(1&r&&(e=l(e)),8&r)return e;if(4&r&&"object"==typeof e&&e&&e.__esModule)return e;var t=Object.create(null);if(l.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:e}),2&r&&"string"!=typeof e)for(var n in e)l.d(t,n,function(r){return e[r]}.bind(null,n));return t},l.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return l.d(r,"a",r),r},l.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},l.p="/";var i=this["webpackJsonpportal-ui"]=this["webpackJsonpportal-ui"]||[],a=i.push.bind(i);i.push=r,i=i.slice();for(var p=0;p<i.length;p++)r(i[p]);var f=a;t()}([])</script><script src="/static/js/2.39e4bf39.chunk.js"></script><script src="/static/js/main.9b1a90de.chunk.js"></script></body></html>
1+
<!doctype html><html lang="en"><head><meta charset="utf-8"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="theme-color" content="#000000"/><meta name="description" content="MinIO Console"/><link href="https://fonts.googleapis.com/css2?family=Lato:wght@400;500;700;900&display=swap" rel="stylesheet"/><link rel="apple-touch-icon" sizes="180x180" href="/apple-icon-180x180.png"/><link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png"/><link rel="icon" type="image/png" sizes="96x96" href="/favicon-96x96.png"/><link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png"/><link rel="manifest" href="/manifest.json"/><link rel="mask-icon" href="/safari-pinned-tab.svg" color="#3a4e54"/><title>MinIO Console</title><link href="/static/css/2.f324abd6.chunk.css" rel="stylesheet"><link href="/static/css/main.a19f3d53.chunk.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div><script>!function(e){function r(r){for(var n,l,i=r[0],a=r[1],p=r[2],c=0,s=[];c<i.length;c++)l=i[c],Object.prototype.hasOwnProperty.call(o,l)&&o[l]&&s.push(o[l][0]),o[l]=0;for(n in a)Object.prototype.hasOwnProperty.call(a,n)&&(e[n]=a[n]);for(f&&f(r);s.length;)s.shift()();return u.push.apply(u,p||[]),t()}function t(){for(var e,r=0;r<u.length;r++){for(var t=u[r],n=!0,i=1;i<t.length;i++){var a=t[i];0!==o[a]&&(n=!1)}n&&(u.splice(r--,1),e=l(l.s=t[0]))}return e}var n={},o={1:0},u=[];function l(r){if(n[r])return n[r].exports;var t=n[r]={i:r,l:!1,exports:{}};return e[r].call(t.exports,t,t.exports,l),t.l=!0,t.exports}l.m=e,l.c=n,l.d=function(e,r,t){l.o(e,r)||Object.defineProperty(e,r,{enumerable:!0,get:t})},l.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},l.t=function(e,r){if(1&r&&(e=l(e)),8&r)return e;if(4&r&&"object"==typeof e&&e&&e.__esModule)return e;var t=Object.create(null);if(l.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:e}),2&r&&"string"!=typeof e)for(var n in e)l.d(t,n,function(r){return e[r]}.bind(null,n));return t},l.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return l.d(r,"a",r),r},l.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},l.p="/";var i=this["webpackJsonpportal-ui"]=this["webpackJsonpportal-ui"]||[],a=i.push.bind(i);i.push=r,i=i.slice();for(var p=0;p<i.length;p++)r(i[p]);var f=a;t()}([])</script><script src="/static/js/2.8df59b12.chunk.js"></script><script src="/static/js/main.db452d17.chunk.js"></script></body></html>

portal-ui/build/static/js/2.39e4bf39.chunk.js renamed to portal-ui/build/static/js/2.8df59b12.chunk.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

portal-ui/build/static/js/2.39e4bf39.chunk.js.map renamed to portal-ui/build/static/js/2.8df59b12.chunk.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

portal-ui/build/static/js/main.9b1a90de.chunk.js.map

Lines changed: 0 additions & 1 deletion
This file was deleted.

portal-ui/build/static/js/main.9b1a90de.chunk.js renamed to portal-ui/build/static/js/main.db452d17.chunk.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

portal-ui/build/static/js/main.db452d17.chunk.js.map

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

portal-ui/src/screens/Console/Buckets/ListBuckets/Objects/ObjectDetails/ObjectDetails.tsx

Lines changed: 37 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -558,41 +558,46 @@ const ObjectDetails = ({
558558
}}
559559
/>
560560
</Grid>
561+
561562
<Grid item xs={12} className={classes.actionsTray}>
562-
<TextField
563-
placeholder={`Search ${objectName}`}
564-
className={clsx(classes.search, classes.searchField)}
565-
id="search-resource"
566-
label=""
567-
onChange={(val) => {
568-
setFilterVersion(val.target.value);
569-
}}
570-
InputProps={{
571-
disableUnderline: true,
572-
startAdornment: (
573-
<InputAdornment position="start">
574-
<SearchIcon />
575-
</InputAdornment>
576-
),
577-
}}
578-
/>
563+
{actualInfo.version_id && actualInfo.version_id !== "null" && (
564+
<TextField
565+
placeholder={`Search ${objectName}`}
566+
className={clsx(classes.search, classes.searchField)}
567+
id="search-resource"
568+
label=""
569+
onChange={(val) => {
570+
setFilterVersion(val.target.value);
571+
}}
572+
InputProps={{
573+
disableUnderline: true,
574+
startAdornment: (
575+
<InputAdornment position="start">
576+
<SearchIcon />
577+
</InputAdornment>
578+
),
579+
}}
580+
/>
581+
)}
579582
</Grid>
580583
<Grid item xs={12}>
581-
<TableWrapper
582-
itemActions={tableActions}
583-
columns={[
584-
{ label: "Version ID", elementKey: "version_id" },
585-
{
586-
label: "Last Modified",
587-
elementKey: "last_modified",
588-
renderFunction: displayParsedDate,
589-
},
590-
]}
591-
isLoading={false}
592-
entityName="Versions"
593-
idField="version_id"
594-
records={filteredRecords}
595-
/>
584+
{actualInfo.version_id && actualInfo.version_id !== "null" && (
585+
<TableWrapper
586+
itemActions={tableActions}
587+
columns={[
588+
{ label: "Version ID", elementKey: "version_id" },
589+
{
590+
label: "Last Modified",
591+
elementKey: "last_modified",
592+
renderFunction: displayParsedDate,
593+
},
594+
]}
595+
isLoading={false}
596+
entityName="Versions"
597+
idField="version_id"
598+
records={filteredRecords}
599+
/>
600+
)}
596601
</Grid>
597602
</Grid>
598603
</Grid>

0 commit comments

Comments
 (0)