- Fix superuser panel for debugging
- Start work on the gauges panel
This commit is contained in:
parent
fbdbc21eb1
commit
79f39697fe
6 changed files with 40 additions and 14 deletions
|
@ -50,6 +50,11 @@ class SuperUserRegistryStatus(ApiResource):
|
||||||
@verify_not_prod
|
@verify_not_prod
|
||||||
def get(self):
|
def get(self):
|
||||||
""" Returns the status of the registry. """
|
""" Returns the status of the registry. """
|
||||||
|
if app.config.get('DEBUGGING', False):
|
||||||
|
return {
|
||||||
|
'status': 'ready'
|
||||||
|
}
|
||||||
|
|
||||||
# If there is no conf/stack volume, then report that status.
|
# If there is no conf/stack volume, then report that status.
|
||||||
if not CONFIG_PROVIDER.volume_exists():
|
if not CONFIG_PROVIDER.volume_exists():
|
||||||
return {
|
return {
|
||||||
|
|
|
@ -26,10 +26,13 @@ def ps():
|
||||||
|
|
||||||
def generator():
|
def generator():
|
||||||
while True:
|
while True:
|
||||||
builder_data = app.config['HTTPCLIENT'].get('http://localhost:8686/status', timeout=1)
|
|
||||||
build_status = {}
|
build_status = {}
|
||||||
if builder_data.status_code == 200:
|
try:
|
||||||
build_status = json.loads(builder_data.text)
|
builder_data = app.config['HTTPCLIENT'].get('http://localhost:8686/status', timeout=1)
|
||||||
|
if builder_data.status_code == 200:
|
||||||
|
build_status = json.loads(builder_data.text)
|
||||||
|
except:
|
||||||
|
pass
|
||||||
|
|
||||||
data = {
|
data = {
|
||||||
'count': {
|
'count': {
|
||||||
|
|
|
@ -702,4 +702,8 @@
|
||||||
.co-alert .co-step-bar {
|
.co-alert .co-step-bar {
|
||||||
float: right;
|
float: right;
|
||||||
margin-top: 6px;
|
margin-top: 6px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.realtime-area-chart, .realtime-line-chart {
|
||||||
|
display: inline-block;
|
||||||
}
|
}
|
|
@ -1,16 +1,18 @@
|
||||||
<div class="ps-usage-graph-element">
|
<div class="ps-usage-graph-element">
|
||||||
Build Workers:
|
<div quay-show="Features.BUILD_SUPPORT" ng-if="data.build && data.build.job_total">
|
||||||
<div class="realtime-area-chart"
|
Build Workers:
|
||||||
data="[data.build.job_total, data.build.running_total]"
|
<div class="realtime-area-chart"
|
||||||
labels="['Queued Build Jobs', 'Running Build Jobs']"
|
data="[data.build.job_total, data.build.running_total]"
|
||||||
colors="['rgb(157, 194, 211)', 'rgb(56, 122, 163)']"
|
labels="['Queued Build Jobs', 'Running Build Jobs']"
|
||||||
counter="counter"></div>
|
colors="['rgb(157, 194, 211)', 'rgb(56, 122, 163)']"
|
||||||
|
counter="counter"></div>
|
||||||
|
|
||||||
<div class="realtime-area-chart"
|
<div class="realtime-area-chart"
|
||||||
data="[data.build.job_total, data.build.workers, data.build.running_local]"
|
data="[data.build.job_total, data.build.workers, data.build.running_local]"
|
||||||
labels="['Queued Build Jobs', 'Build Workers (local)', 'Running Build Jobs (local)']"
|
labels="['Queued Build Jobs', 'Build Workers (local)', 'Running Build Jobs (local)']"
|
||||||
colors="['rgb(157, 194, 211)', 'rgb(161, 208, 93)', 'rgb(210, 237, 130)']"
|
colors="['rgb(157, 194, 211)', 'rgb(161, 208, 93)', 'rgb(210, 237, 130)']"
|
||||||
counter="counter"></div>
|
counter="counter"></div>
|
||||||
|
</div>
|
||||||
|
|
||||||
CPU:
|
CPU:
|
||||||
<div class="realtime-line-chart" data="data.count.cpu" counter="counter"
|
<div class="realtime-line-chart" data="data.count.cpu" counter="counter"
|
||||||
|
|
|
@ -205,6 +205,10 @@ angular.module("core-config-setup", ['angularFileUpload'])
|
||||||
};
|
};
|
||||||
|
|
||||||
var getKey = function(config, path) {
|
var getKey = function(config, path) {
|
||||||
|
if (!config) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
var parts = path.split('.');
|
var parts = path.split('.');
|
||||||
var current = config;
|
var current = config;
|
||||||
for (var i = 0; i < parts.length; ++i) {
|
for (var i = 0; i < parts.length; ++i) {
|
||||||
|
|
|
@ -20,6 +20,9 @@
|
||||||
tab-target="#users" tab-init="loadUsers()">
|
tab-target="#users" tab-init="loadUsers()">
|
||||||
<i class="fa fa-group"></i>
|
<i class="fa fa-group"></i>
|
||||||
</span>
|
</span>
|
||||||
|
<span class="cor-tab" tab-title="Dashboard" tab-target="#dashboard">
|
||||||
|
<i class="fa fa-tachometer"></i>
|
||||||
|
</span>
|
||||||
<span class="cor-tab" tab-title="Container Usage" tab-target="#usage-counter" tab-init="getUsage()">
|
<span class="cor-tab" tab-title="Container Usage" tab-target="#usage-counter" tab-init="getUsage()">
|
||||||
<i class="fa fa-pie-chart"></i>
|
<i class="fa fa-pie-chart"></i>
|
||||||
</span>
|
</span>
|
||||||
|
@ -42,6 +45,11 @@
|
||||||
configuration-saved="configurationSaved()"></div>
|
configuration-saved="configurationSaved()"></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<!-- Dashboard tab -->
|
||||||
|
<div id="dashboard" class="tab-pane">
|
||||||
|
<div class="ps-usage-graph" is-enabled="true"></div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<!-- Debugging tab -->
|
<!-- Debugging tab -->
|
||||||
<div id="debug" class="tab-pane">
|
<div id="debug" class="tab-pane">
|
||||||
<div class="cor-loader" ng-show="!debugServices"></div>
|
<div class="cor-loader" ng-show="!debugServices"></div>
|
||||||
|
|
Reference in a new issue