- Fix superuser panel for debugging

- Start work on the gauges panel
This commit is contained in:
Joseph Schorr 2015-02-17 11:31:50 -05:00
parent fbdbc21eb1
commit 79f39697fe
6 changed files with 40 additions and 14 deletions

View file

@ -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 {

View file

@ -26,10 +26,13 @@ def ps():
def generator():
while True:
builder_data = app.config['HTTPCLIENT'].get('http://localhost:8686/status', timeout=1)
build_status = {}
if builder_data.status_code == 200:
build_status = json.loads(builder_data.text)
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': {

View file

@ -702,4 +702,8 @@
.co-alert .co-step-bar {
float: right;
margin-top: 6px;
}
.realtime-area-chart, .realtime-line-chart {
display: inline-block;
}

View file

@ -1,16 +1,18 @@
<div class="ps-usage-graph-element">
Build Workers:
<div class="realtime-area-chart"
data="[data.build.job_total, data.build.running_total]"
labels="['Queued Build Jobs', 'Running Build Jobs']"
colors="['rgb(157, 194, 211)', 'rgb(56, 122, 163)']"
counter="counter"></div>
<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]"
labels="['Queued Build Jobs', 'Running Build Jobs']"
colors="['rgb(157, 194, 211)', 'rgb(56, 122, 163)']"
counter="counter"></div>
<div class="realtime-area-chart"
data="[data.build.job_total, data.build.workers, data.build.running_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)']"
counter="counter"></div>
<div class="realtime-area-chart"
data="[data.build.job_total, data.build.workers, data.build.running_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)']"
counter="counter"></div>
</div>
CPU:
<div class="realtime-line-chart" data="data.count.cpu" counter="counter"

View file

@ -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) {

View file

@ -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>