Permanently enable ILM (#740)
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
This commit is contained in:
@@ -280,7 +280,6 @@ const ViewBucket = ({
|
|||||||
const [addLifecycleOpen, setAddLifecycleOpen] = useState<boolean>(false);
|
const [addLifecycleOpen, setAddLifecycleOpen] = useState<boolean>(false);
|
||||||
|
|
||||||
const bucketName = match.params["bucketName"];
|
const bucketName = match.params["bucketName"];
|
||||||
const ilmEnabled = session.features?.indexOf("ilm") > -1;
|
|
||||||
const usersEnabled = session.pages?.indexOf("/users") > -1;
|
const usersEnabled = session.pages?.indexOf("/users") > -1;
|
||||||
|
|
||||||
// check the permissions for creating bucket
|
// check the permissions for creating bucket
|
||||||
@@ -956,7 +955,7 @@ const ViewBucket = ({
|
|||||||
)}
|
)}
|
||||||
<Tab label="Policies" {...a11yProps(2)} />
|
<Tab label="Policies" {...a11yProps(2)} />
|
||||||
{usersEnabled && <Tab label="Users" {...a11yProps(3)} />}
|
{usersEnabled && <Tab label="Users" {...a11yProps(3)} />}
|
||||||
{ilmEnabled && <Tab label="Lifecycle" {...a11yProps(4)} />}
|
<Tab label="Lifecycle" {...a11yProps(4)} />
|
||||||
</Tabs>
|
</Tabs>
|
||||||
</Grid>
|
</Grid>
|
||||||
<Grid item xs={3} className={classes.actionsTray}>
|
<Grid item xs={3} className={classes.actionsTray}>
|
||||||
|
|||||||
@@ -46,7 +46,6 @@ const styles = (theme: Theme) =>
|
|||||||
|
|
||||||
const ConfigurationMain = ({ classes, session }: IConfigurationMain) => {
|
const ConfigurationMain = ({ classes, session }: IConfigurationMain) => {
|
||||||
const [selectedTab, setSelectedTab] = useState<number>(0);
|
const [selectedTab, setSelectedTab] = useState<number>(0);
|
||||||
const ilmEnabled = session.features?.indexOf("ilm") > -1;
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Fragment>
|
<Fragment>
|
||||||
@@ -69,7 +68,7 @@ const ConfigurationMain = ({ classes, session }: IConfigurationMain) => {
|
|||||||
>
|
>
|
||||||
<Tab label="Configurations" />
|
<Tab label="Configurations" />
|
||||||
<Tab label="Lambda Notifications" />
|
<Tab label="Lambda Notifications" />
|
||||||
{ilmEnabled && <Tab label="Tiers" />}
|
<Tab label="Tiers" />
|
||||||
</Tabs>
|
</Tabs>
|
||||||
<Grid item xs={12}>
|
<Grid item xs={12}>
|
||||||
{selectedTab === 0 && (
|
{selectedTab === 0 && (
|
||||||
|
|||||||
@@ -22,7 +22,6 @@ import (
|
|||||||
"github.com/minio/console/pkg/acl"
|
"github.com/minio/console/pkg/acl"
|
||||||
"github.com/minio/console/restapi/operations"
|
"github.com/minio/console/restapi/operations"
|
||||||
"github.com/minio/console/restapi/operations/user_api"
|
"github.com/minio/console/restapi/operations/user_api"
|
||||||
"github.com/minio/minio/pkg/env"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func registerSessionHandlers(api *operations.ConsoleAPI) {
|
func registerSessionHandlers(api *operations.ConsoleAPI) {
|
||||||
@@ -54,9 +53,5 @@ func getSessionResponse(session *models.Principal) (*models.SessionResponse, *mo
|
|||||||
// getListOfEnabledFeatures returns a list of features
|
// getListOfEnabledFeatures returns a list of features
|
||||||
func getListOfEnabledFeatures() []string {
|
func getListOfEnabledFeatures() []string {
|
||||||
var features []string
|
var features []string
|
||||||
ilm := env.IsSet("_CONSOLE_ILM_SUPPORT")
|
|
||||||
if ilm {
|
|
||||||
features = append(features, "ilm")
|
|
||||||
}
|
|
||||||
return features
|
return features
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user