- 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
|
||||
def get(self):
|
||||
""" 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 not CONFIG_PROVIDER.volume_exists():
|
||||
return {
|
||||
|
|
|
@ -26,10 +26,13 @@ def ps():
|
|||
|
||||
def generator():
|
||||
while True:
|
||||
builder_data = app.config['HTTPCLIENT'].get('http://localhost:8686/status', timeout=1)
|
||||
build_status = {}
|
||||
try:
|
||||
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 = {
|
||||
'count': {
|
||||
|
|
|
@ -703,3 +703,7 @@
|
|||
float: right;
|
||||
margin-top: 6px;
|
||||
}
|
||||
|
||||
.realtime-area-chart, .realtime-line-chart {
|
||||
display: inline-block;
|
||||
}
|
|
@ -1,4 +1,5 @@
|
|||
<div class="ps-usage-graph-element">
|
||||
<div quay-show="Features.BUILD_SUPPORT" ng-if="data.build && data.build.job_total">
|
||||
Build Workers:
|
||||
<div class="realtime-area-chart"
|
||||
data="[data.build.job_total, data.build.running_total]"
|
||||
|
@ -11,6 +12,7 @@
|
|||
labels="['Queued Build Jobs', 'Build Workers (local)', 'Running Build Jobs (local)']"
|
||||
colors="['rgb(157, 194, 211)', 'rgb(161, 208, 93)', 'rgb(210, 237, 130)']"
|
||||
counter="counter"></div>
|
||||
</div>
|
||||
|
||||
CPU:
|
||||
<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) {
|
||||
if (!config) {
|
||||
return null;
|
||||
}
|
||||
|
||||
var parts = path.split('.');
|
||||
var current = config;
|
||||
for (var i = 0; i < parts.length; ++i) {
|
||||
|
|
|
@ -20,6 +20,9 @@
|
|||
tab-target="#users" tab-init="loadUsers()">
|
||||
<i class="fa fa-group"></i>
|
||||
</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()">
|
||||
<i class="fa fa-pie-chart"></i>
|
||||
</span>
|
||||
|
@ -42,6 +45,11 @@
|
|||
configuration-saved="configurationSaved()"></div>
|
||||
</div>
|
||||
|
||||
<!-- Dashboard tab -->
|
||||
<div id="dashboard" class="tab-pane">
|
||||
<div class="ps-usage-graph" is-enabled="true"></div>
|
||||
</div>
|
||||
|
||||
<!-- Debugging tab -->
|
||||
<div id="debug" class="tab-pane">
|
||||
<div class="cor-loader" ng-show="!debugServices"></div>
|
||||
|
|
Reference in a new issue