MVP: config.yaml, pipeline runner, API routes, UI with checkboxes and run button
This commit is contained in:
+5
-1
@@ -3,6 +3,7 @@ from flask import Blueprint, current_app, render_template, request, make_respons
|
||||
from api.http_client import HttpClient
|
||||
from operations.get_instances import get_organization, get_instances
|
||||
from operations.get_services import get_services, get_service_detail
|
||||
from runner import load_config
|
||||
|
||||
bp = Blueprint("main", __name__)
|
||||
|
||||
@@ -43,6 +44,7 @@ def index():
|
||||
|
||||
services = []
|
||||
instances = []
|
||||
config = {}
|
||||
if active_token:
|
||||
try:
|
||||
client = HttpClient(
|
||||
@@ -55,6 +57,7 @@ def index():
|
||||
instances = get_instances(client)
|
||||
# org first, then rest
|
||||
instances.sort(key=lambda i: (0 if i.get("serviceId") == 19 else 1, i.get("displayName", "")))
|
||||
config = load_config()
|
||||
except Exception as e:
|
||||
error = str(e)
|
||||
|
||||
@@ -63,7 +66,8 @@ def index():
|
||||
env_token_masked=_mask(env_token),
|
||||
has_user_token=bool(user_token),
|
||||
services=services,
|
||||
instances=instances)
|
||||
instances=instances,
|
||||
config=config)
|
||||
|
||||
|
||||
@bp.route("/api/operations/<int:svc_id>")
|
||||
|
||||
Reference in New Issue
Block a user