Region enrollment works again
This commit is contained in:
@@ -36,6 +36,7 @@ def get_region(region_id):
|
||||
'name': region.name,
|
||||
'id': region.id,
|
||||
'status': region.status,
|
||||
'enrollment_key': region.enrollment_key,
|
||||
})
|
||||
|
||||
|
||||
|
||||
@@ -54,6 +54,8 @@ def render_detail():
|
||||
with col1:
|
||||
st.code(f"{region['id']}")
|
||||
st.markdown(f"**Created:** {region.get('created_at', 'Unknown')}")
|
||||
st.markdown("**Region Enrollment Key**(Confidental)")
|
||||
st.code(f"{region['enrollment_key']}")
|
||||
with col2:
|
||||
if region.get('updated_at'):
|
||||
st.markdown(f"**Last Updated:** {region['updated_at']}")
|
||||
|
||||
@@ -122,7 +122,6 @@ def render_list():
|
||||
# List Container Workloads
|
||||
st.subheader("Existing Container Workloads")
|
||||
VirtualMachines = st.session_state.client.get_virtual_machines()
|
||||
print(VirtualMachines)
|
||||
if VirtualMachines:
|
||||
# Filter VirtualMachines based on the selected VDC
|
||||
if selected_vdc_name:
|
||||
@@ -179,7 +178,6 @@ def render_list():
|
||||
print("LP not valid json")
|
||||
VirtualMachine_name = None
|
||||
else:
|
||||
print("lp empty")
|
||||
VirtualMachine_name = None
|
||||
st.markdown(f"### {VirtualMachine['name']}")
|
||||
|
||||
@@ -209,7 +207,6 @@ def render_list():
|
||||
st.text(f"ID: {VirtualMachine['id']}")
|
||||
with col3:
|
||||
if st.button("View Details", key=f"view_{VirtualMachine['id']}"):
|
||||
print("Button is pressed")
|
||||
st.session_state.selected_resource = VirtualMachine
|
||||
st.session_state.view_type = 'detail'
|
||||
st.session_state.selected_resource_type = 'VirtualMachine'
|
||||
|
||||
+1
-1
@@ -209,7 +209,7 @@ def main():
|
||||
if not args.region_id:
|
||||
parser.error("--region-id must be provided either in the .env file or via CLI.")
|
||||
|
||||
enroll_worker(args.region_id, args.api_base_url, args.region_enrollment_key)
|
||||
enroll_worker(args.region_id, args.region_enrollment_key, args.api_base_url)
|
||||
# Reload environment variables to get the new worker credentials
|
||||
load_dotenv()
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user