mirror of
https://github.com/ansible/awx.git
synced 2026-05-20 07:17:40 -02:30
cleanup activity stream
This commit is contained in:
@@ -16,9 +16,7 @@
|
|||||||
* @description This form is for activity detail modal that can be shown on most pages.
|
* @description This form is for activity detail modal that can be shown on most pages.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
export default
|
export default ['i18n', function(i18n) {
|
||||||
angular.module('ActivityDetailDefinition', [])
|
|
||||||
.factory('ActivityDetailForm', ['i18n', function(i18n) {
|
|
||||||
return {
|
return {
|
||||||
|
|
||||||
name: 'activity',
|
name: 'activity',
|
||||||
@@ -48,4 +46,4 @@ export default
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
};}]); //Form
|
};}];
|
||||||
@@ -9,7 +9,10 @@
|
|||||||
* @name controllers.function:Activity Stream
|
* @name controllers.function:Activity Stream
|
||||||
* @description This controller controls the activity stream.
|
* @description This controller controls the activity stream.
|
||||||
*/
|
*/
|
||||||
function activityStreamController($scope, $state, subTitle, Stream, GetTargetTitle, list, Dataset) {
|
export default ['$scope', '$state', 'subTitle', 'Stream', 'GetTargetTitle',
|
||||||
|
'StreamList', 'Dataset',
|
||||||
|
function activityStreamController($scope, $state, subTitle, Stream,
|
||||||
|
GetTargetTitle, list, Dataset) {
|
||||||
|
|
||||||
init();
|
init();
|
||||||
initOmitSmartTags();
|
initOmitSmartTags();
|
||||||
@@ -49,5 +52,4 @@ function activityStreamController($scope, $state, subTitle, Stream, GetTargetTit
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
];
|
||||||
export default ['$scope', '$state', 'subTitle', 'Stream', 'GetTargetTitle', 'StreamList', 'Dataset', activityStreamController];
|
|
||||||
|
|||||||
@@ -60,8 +60,8 @@ export default {
|
|||||||
return qs.search(path, stateParams);
|
return qs.search(path, stateParams);
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
features: ['FeaturesService', 'ProcessErrors', '$state', '$rootScope',
|
features: ['FeaturesService', '$state', '$rootScope',
|
||||||
function(FeaturesService, ProcessErrors, $state, $rootScope) {
|
function(FeaturesService, $state, $rootScope) {
|
||||||
var features = FeaturesService.get();
|
var features = FeaturesService.get();
|
||||||
if (features) {
|
if (features) {
|
||||||
if (FeaturesService.featureEnabled('activity_streams')) {
|
if (FeaturesService.featureEnabled('activity_streams')) {
|
||||||
@@ -81,12 +81,10 @@ export default {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
subTitle: ['$stateParams',
|
subTitle: ['$stateParams', 'Rest', 'ModelToBasePathKey', 'GetBasePath',
|
||||||
'Rest',
|
|
||||||
'ModelToBasePathKey',
|
|
||||||
'GetBasePath',
|
|
||||||
'ProcessErrors',
|
'ProcessErrors',
|
||||||
function($stateParams, rest, ModelToBasePathKey, getBasePath, ProcessErrors) {
|
function($stateParams, rest, ModelToBasePathKey, getBasePath,
|
||||||
|
ProcessErrors) {
|
||||||
// If we have a target and an ID then we want to go grab the name of the object
|
// If we have a target and an ID then we want to go grab the name of the object
|
||||||
// that we're examining with the activity stream. This name will be used in the
|
// that we're examining with the activity stream. This name will be used in the
|
||||||
// subtitle.
|
// subtitle.
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
export default
|
export default function BuildAnchor($log, $filter) {
|
||||||
function BuildAnchor($log, $filter) {
|
|
||||||
// Returns a full <a href=''>resource_name</a> HTML string if link can be derived from supplied context
|
// Returns a full <a href=''>resource_name</a> HTML string if link can be derived from supplied context
|
||||||
// returns name of resource if activity stream object doesn't contain enough data to build a UI url
|
// returns name of resource if activity stream object doesn't contain enough data to build a UI url
|
||||||
// arguments are: a summary_field object, a resource type, an activity stream object
|
// arguments are: a summary_field object, a resource type, an activity stream object
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
export default
|
export default function BuildDescription(BuildAnchor, $log, i18n) {
|
||||||
function BuildDescription(BuildAnchor, $log, i18n) {
|
|
||||||
return function (activity) {
|
return function (activity) {
|
||||||
|
|
||||||
var pastTense = function(operation){
|
var pastTense = function(operation){
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
export default
|
export default function ShowDetail($filter, $rootScope, Rest, Alert,
|
||||||
function ShowDetail($filter, $rootScope, Rest, Alert, GenerateForm, ProcessErrors, GetBasePath, FormatDate, ActivityDetailForm, Empty, Find) {
|
GenerateForm, ProcessErrors, GetBasePath, FormatDate, ActivityDetailForm,
|
||||||
|
Empty, Find) {
|
||||||
return function (params, scope) {
|
return function (params, scope) {
|
||||||
|
|
||||||
var activity_id = params.activity_id,
|
var activity_id = params.activity_id,
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
export default
|
export default function Stream($rootScope, $location, $state, Rest, GetBasePath,
|
||||||
function Stream($rootScope, $location, $state, Rest, GetBasePath, ProcessErrors,
|
ProcessErrors, Wait, StreamList, GenerateList, FormatDate, BuildDescription,
|
||||||
Wait, StreamList, GenerateList, FormatDate,
|
ShowDetail) {
|
||||||
BuildDescription, ShowDetail) {
|
|
||||||
return function (params) {
|
return function (params) {
|
||||||
|
|
||||||
var scope = params.scope;
|
var scope = params.scope;
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
export default
|
export default function GetTargetTitle(i18n) {
|
||||||
function GetTargetTitle(i18n) {
|
|
||||||
return function (target) {
|
return function (target) {
|
||||||
|
|
||||||
var rtnTitle = i18n._('ALL ACTIVITY');
|
var rtnTitle = i18n._('ALL ACTIVITY');
|
||||||
|
|||||||
@@ -14,6 +14,8 @@ import ShowDetail from './factories/show-detail.factory';
|
|||||||
import Stream from './factories/stream.factory';
|
import Stream from './factories/stream.factory';
|
||||||
import GetTargetTitle from './get-target-title.factory';
|
import GetTargetTitle from './get-target-title.factory';
|
||||||
import ModelToBasePathKey from './model-to-base-path-key.factory';
|
import ModelToBasePathKey from './model-to-base-path-key.factory';
|
||||||
|
import ActivityDetailForm from './activity-detail.form';
|
||||||
|
import StreamList from './streams.list';
|
||||||
|
|
||||||
export default angular.module('activityStream', [streamDetailModal.name])
|
export default angular.module('activityStream', [streamDetailModal.name])
|
||||||
.controller('activityStreamController', activityStreamController)
|
.controller('activityStreamController', activityStreamController)
|
||||||
@@ -24,6 +26,8 @@ export default angular.module('activityStream', [streamDetailModal.name])
|
|||||||
.factory('Stream', Stream)
|
.factory('Stream', Stream)
|
||||||
.factory('GetTargetTitle', GetTargetTitle)
|
.factory('GetTargetTitle', GetTargetTitle)
|
||||||
.factory('ModelToBasePathKey', ModelToBasePathKey)
|
.factory('ModelToBasePathKey', ModelToBasePathKey)
|
||||||
|
.factory('ActivityDetailForm', ActivityDetailForm)
|
||||||
|
.factory('StreamList', StreamList)
|
||||||
.run(['$stateExtender', function($stateExtender) {
|
.run(['$stateExtender', function($stateExtender) {
|
||||||
$stateExtender.addState(activityStreamRoute);
|
$stateExtender.addState(activityStreamRoute);
|
||||||
}]);
|
}]);
|
||||||
|
|||||||
@@ -10,8 +10,7 @@
|
|||||||
* @description Helper functions to convert singular/plural versions of our models to the opposite
|
* @description Helper functions to convert singular/plural versions of our models to the opposite
|
||||||
*/
|
*/
|
||||||
|
|
||||||
export default
|
export default function ModelToBasePathKey() {
|
||||||
function ModelToBasePathKey() {
|
|
||||||
return function(model) {
|
return function(model) {
|
||||||
// This function takes in the singular model string and returns the key needed
|
// This function takes in the singular model string and returns the key needed
|
||||||
// to get the base path from $rootScope/local storage.
|
// to get the base path from $rootScope/local storage.
|
||||||
|
|||||||
@@ -5,9 +5,7 @@
|
|||||||
*************************************************/
|
*************************************************/
|
||||||
|
|
||||||
|
|
||||||
export default
|
export default ['i18n', function(i18n) {
|
||||||
angular.module('StreamListDefinition', [])
|
|
||||||
.factory('StreamList', ['i18n', function(i18n) {
|
|
||||||
return {
|
return {
|
||||||
|
|
||||||
name: 'activities',
|
name: 'activities',
|
||||||
@@ -72,4 +70,4 @@ export default
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
};}]);
|
};}];
|
||||||
@@ -143,8 +143,6 @@ var tower = angular.module('Tower', [
|
|||||||
'AllJobsDefinition',
|
'AllJobsDefinition',
|
||||||
'JobSummaryDefinition',
|
'JobSummaryDefinition',
|
||||||
'HostGroupsFormDefinition',
|
'HostGroupsFormDefinition',
|
||||||
'StreamListDefinition',
|
|
||||||
'ActivityDetailDefinition',
|
|
||||||
'ScheduledJobsDefinition',
|
'ScheduledJobsDefinition',
|
||||||
'JobsListDefinition',
|
'JobsListDefinition',
|
||||||
'LogViewerStatusDefinition',
|
'LogViewerStatusDefinition',
|
||||||
|
|||||||
@@ -4,7 +4,6 @@
|
|||||||
* All Rights Reserved
|
* All Rights Reserved
|
||||||
*************************************************/
|
*************************************************/
|
||||||
|
|
||||||
import ActivityDetail from "./forms/ActivityDetail";
|
|
||||||
import EventsViewer from "./forms/EventsViewer";
|
import EventsViewer from "./forms/EventsViewer";
|
||||||
import Groups from "./forms/Groups";
|
import Groups from "./forms/Groups";
|
||||||
import HostGroups from "./forms/HostGroups";
|
import HostGroups from "./forms/HostGroups";
|
||||||
@@ -23,8 +22,7 @@ import Workflows from "./forms/Workflows";
|
|||||||
|
|
||||||
|
|
||||||
export
|
export
|
||||||
{ ActivityDetail,
|
{ EventsViewer,
|
||||||
EventsViewer,
|
|
||||||
Groups,
|
Groups,
|
||||||
HostGroups,
|
HostGroups,
|
||||||
Hosts,
|
Hosts,
|
||||||
|
|||||||
@@ -19,7 +19,6 @@ import Organizations from "./lists/Organizations";
|
|||||||
import PortalJobTemplates from "./lists/PortalJobTemplates";
|
import PortalJobTemplates from "./lists/PortalJobTemplates";
|
||||||
import PortalJobs from "./lists/PortalJobs";
|
import PortalJobs from "./lists/PortalJobs";
|
||||||
import ScheduledJobs from "./lists/ScheduledJobs";
|
import ScheduledJobs from "./lists/ScheduledJobs";
|
||||||
import Streams from "./lists/Streams";
|
|
||||||
import Templates from "./lists/Templates";
|
import Templates from "./lists/Templates";
|
||||||
|
|
||||||
export
|
export
|
||||||
@@ -38,6 +37,5 @@ export
|
|||||||
PortalJobTemplates,
|
PortalJobTemplates,
|
||||||
PortalJobs,
|
PortalJobs,
|
||||||
ScheduledJobs,
|
ScheduledJobs,
|
||||||
Streams,
|
|
||||||
Templates
|
Templates
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user