flare / static /index.html
ciyidogan's picture
Update static/index.html
b8d177b verified
raw
history blame
5.97 kB
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Flare Admin UI</title>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css">
<link rel="stylesheet" href="style.css">
</head>
<body class="p-4">
<div class="container">
<h1 class="mb-4 text-center">🔥 Flare Admin UI</h1>
<!-- Login Panel -->
<div id="login-panel" class="card mb-3">
<div class="card-header">Login</div>
<div class="card-body">
<input type="text" id="login-username" class="form-control mb-2" placeholder="Username">
<input type="password" id="login-password" class="form-control mb-2" placeholder="Password">
<button class="btn btn-primary btn-block" onclick="login()">Login</button>
<div id="login-result" class="mt-2 text-danger"></div>
</div>
</div>
<!-- Main Tabs Panel -->
<div id="main-tabs" class="d-none">
<ul class="nav nav-tabs mb-3" role="tablist">
<li class="nav-item">
<a class="nav-link active" data-toggle="tab" href="#config" role="tab">Config</a>
</li>
<li class="nav-item">
<a class="nav-link" data-toggle="tab" href="#projects" role="tab">Projects</a>
</li>
<li class="nav-item">
<a class="nav-link" data-toggle="tab" href="#spark" role="tab">Spark</a>
</li>
<li class="nav-item">
<a class="nav-link" data-toggle="tab" href="#test" role="tab">Test</a>
</li>
</ul>
<div class="tab-content">
<!-- Config Tab -->
<div class="tab-pane fade show active" id="config" role="tabpanel">
<form>
<div class="form-group">
<label for="work-mode">Work Mode</label>
<select id="work-mode" class="form-control" onchange="toggleCloudToken()">
<option value="hfcloud">hfcloud</option>
<option value="cloud">cloud</option>
<option value="on-premise">on-premise</option>
</select>
</div>
<div class="form-group">
<label for="cloud-token">Cloud Token</label>
<input type="text" id="cloud-token" class="form-control">
</div>
<button type="button" class="btn btn-info mb-2" onclick="getConfig()">Load Config</button>
<button type="button" class="btn btn-success mb-2" onclick="updateConfig()">Update Config</button>
<div id="config-result" class="mt-2"></div>
</form>
</div>
<!-- Projects Tab -->
<div class="tab-pane fade" id="projects" role="tabpanel">
<button class="btn btn-info mb-2" onclick="listProjects()">Refresh Project List</button>
<div class="form-group">
<label for="project-select">Select Project</label>
<select id="project-select" class="form-control" onchange="loadProjectDetails()">
<option value="">-- Select a project --</option>
</select>
</div>
<div id="project-details" class="mt-3 d-none">
<h5>Project Details</h5>
<div id="project-info"></div>
<button class="btn btn-success mt-2" onclick="saveProject()">Save Changes</button>
<button class="btn btn-warning mt-2" onclick="publishProject()">Publish Version</button>
</div>
<div id="project-result" class="mt-2"></div>
</div>
<!-- Spark Tab -->
<div class="tab-pane fade" id="spark" role="tabpanel">
<button class="btn btn-info mb-2" onclick="sparkProjectList()">Get Spark Project List</button>
<div id="spark-table" class="table-responsive">
<table class="table table-bordered">
<thead>
<tr>
<th>Project</th>
<th>Version</th>
<th>Enabled</th>
<th>Status</th>
<th>Last Accessed</th>
</tr>
</thead>
<tbody id="spark-body">
<!-- Spark rows here -->
</tbody>
</table>
</div>
<div id="spark-result" class="mt-2"></div>
</div>
<!-- Test Tab -->
<div class="tab-pane fade" id="test" role="tabpanel">
<button class="btn btn-warning mb-2" onclick="runTests()">Run All Tests</button>
<div id="test-result" class="mt-2"></div>
</div>
</div>
</div>
</div>
<!-- JS Files -->
<script src="js/common.js"></script>
<script src="js/auth.js"></script>
<script src="js/config.js"></script>
<script src="js/project.js"></script>
<script src="js/spark.js"></script>
<script src="js/test.js"></script>
<script src="https://code.jquery.com/jquery-3.5.1.slim.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js"></script>
</body>
</html>