diff --git a/manila_ui/dashboards/project/shares/replicas/tables.py b/manila_ui/dashboards/project/shares/replicas/tables.py old mode 100644 new mode 100755 index 84784936..176c628b --- a/manila_ui/dashboards/project/shares/replicas/tables.py +++ b/manila_ui/dashboards/project/shares/replicas/tables.py @@ -64,7 +64,8 @@ class SetReplicaAsActive(tables.LinkAction): policy_rules = (("share_replica", "share_replica:promote"),) def allowed(self, request, replica=None): - return replica.replica_state == "in_sync" + return (replica.status == "available" and + replica.replica_state == "in_sync") def get_policy_target(self, request, datum=None): return {"project_id": getattr(datum, "project_id", None)} diff --git a/releasenotes/notes/bug-873434-fix-set-as-active-button-visibility-e7cc416d66ab360b.yaml b/releasenotes/notes/bug-873434-fix-set-as-active-button-visibility-e7cc416d66ab360b.yaml new file mode 100644 index 00000000..d12b6092 --- /dev/null +++ b/releasenotes/notes/bug-873434-fix-set-as-active-button-visibility-e7cc416d66ab360b.yaml @@ -0,0 +1,5 @@ +--- +fixes: + - | + Visibility of Set as Active button for replicas in transitional states + such as Deleting and Replication Change is now fixed.