mirror of
https://github.com/ZwareBear/awx.git
synced 2026-05-15 00:58:37 -05:00
add event processing for stats and host status components
This commit is contained in:
@@ -44,3 +44,15 @@
|
||||
text-align: center;
|
||||
margin-left: 5px;
|
||||
}
|
||||
|
||||
.at-Panel-label {
|
||||
text-transform: uppercase;
|
||||
color: @default-interface-txt;
|
||||
font-size: 12px;
|
||||
font-weight: normal!important;
|
||||
width: 30%;
|
||||
|
||||
@media screen and (max-width: @breakpoint-md) {
|
||||
flex: 2.5 0 auto;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -114,7 +114,8 @@ function atRelaunchCtrl (
|
||||
jobObj.postRelaunch(launchParams)
|
||||
.then((launchRes) => {
|
||||
if (!$state.includes('jobs')) {
|
||||
$state.go('jobResult', { id: launchRes.data.id }, { reload: true });
|
||||
const relaunchType = launchRes.data.type === 'job' ? 'playbook' : launchRes.data.type;
|
||||
$state.go('jobz', { id: launchRes.data.id, type: relaunchType }, { reload: true });
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -354,7 +354,6 @@ function has (method, keys) {
|
||||
}
|
||||
|
||||
function extend (related, config = {}) {
|
||||
|
||||
const req = this.parseRequestConfig('GET', config);
|
||||
|
||||
if (_.get(config, 'params.page_size')) {
|
||||
@@ -614,7 +613,11 @@ function create (method, resource, config) {
|
||||
}
|
||||
|
||||
function setEndpoint (resource) {
|
||||
this.endpoint = `${this.path}${resource}/`;
|
||||
if (Array.isArray(resource)) {
|
||||
this.endpoint = `${this.path}${resource[0]}/`;
|
||||
} else {
|
||||
this.endpoint = `${this.path}${resource}/`;
|
||||
}
|
||||
}
|
||||
|
||||
function parseRequestConfig (method, resource, config) {
|
||||
|
||||
@@ -48,7 +48,6 @@ function getStats () {
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
function JobModel (method, resource, config) {
|
||||
BaseModel.call(this, 'jobs');
|
||||
|
||||
|
||||
@@ -10,8 +10,6 @@ function getStats () {
|
||||
return Promise.reject(new Error('No related property, events, exists'));
|
||||
}
|
||||
|
||||
|
||||
|
||||
const req = {
|
||||
method: 'GET',
|
||||
url: `${this.path}${this.get('id')}/events/`,
|
||||
@@ -20,19 +18,18 @@ function getStats () {
|
||||
|
||||
return $http(req)
|
||||
.then(({ data }) => {
|
||||
console.log(data);
|
||||
if (data.results.length > 0) {
|
||||
return data.results[0];
|
||||
}
|
||||
|
||||
return null;
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
function ProjectUpdateModel (method, resource, config) {
|
||||
BaseModel.call(this, 'project_updates');
|
||||
|
||||
this.getStats = getStats;
|
||||
this.getStats = getStats.bind(this);
|
||||
|
||||
this.Constructor = ProjectUpdateModel;
|
||||
|
||||
@@ -40,7 +37,7 @@ function ProjectUpdateModel (method, resource, config) {
|
||||
}
|
||||
|
||||
function ProjectUpdateModelLoader (_$http_, _BaseModel_) {
|
||||
$http = _$http_;
|
||||
$http = _$http_;
|
||||
BaseModel = _BaseModel_;
|
||||
|
||||
return ProjectUpdateModel;
|
||||
|
||||
@@ -50,6 +50,17 @@
|
||||
font-size: @at-font-size-body;
|
||||
}
|
||||
|
||||
.at-ButtonIcon-noborder {
|
||||
padding: 4px @at-padding-button-horizontal;
|
||||
font-size: @at-font-size-body;
|
||||
.at-mixin-Button();
|
||||
.at-mixin-ButtonHollow(
|
||||
'at-color-default',
|
||||
'at-color-default',
|
||||
'at-color-button-text-default'
|
||||
);
|
||||
}
|
||||
|
||||
.at-Button--expand {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
@@ -20,3 +20,11 @@
|
||||
.at-u-clear {
|
||||
clear: both;
|
||||
}
|
||||
|
||||
.at-u-noBorder {
|
||||
border: none;
|
||||
}
|
||||
|
||||
.at-u-floatRight {
|
||||
float: right
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user