mirror of
https://github.com/ansible/awx.git
synced 2026-05-24 17:17:45 -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.
|
||||
*/
|
||||
|
||||
export default
|
||||
angular.module('ActivityDetailDefinition', [])
|
||||
.factory('ActivityDetailForm', ['i18n', function(i18n) {
|
||||
export default ['i18n', function(i18n) {
|
||||
return {
|
||||
|
||||
name: 'activity',
|
||||
@@ -48,4 +46,4 @@ export default
|
||||
}
|
||||
}
|
||||
|
||||
};}]); //Form
|
||||
};}];
|
||||
@@ -9,7 +9,10 @@
|
||||
* @name controllers.function: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();
|
||||
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);
|
||||
}
|
||||
],
|
||||
features: ['FeaturesService', 'ProcessErrors', '$state', '$rootScope',
|
||||
function(FeaturesService, ProcessErrors, $state, $rootScope) {
|
||||
features: ['FeaturesService', '$state', '$rootScope',
|
||||
function(FeaturesService, $state, $rootScope) {
|
||||
var features = FeaturesService.get();
|
||||
if (features) {
|
||||
if (FeaturesService.featureEnabled('activity_streams')) {
|
||||
@@ -81,12 +81,10 @@ export default {
|
||||
});
|
||||
}
|
||||
],
|
||||
subTitle: ['$stateParams',
|
||||
'Rest',
|
||||
'ModelToBasePathKey',
|
||||
'GetBasePath',
|
||||
subTitle: ['$stateParams', 'Rest', 'ModelToBasePathKey', 'GetBasePath',
|
||||
'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
|
||||
// that we're examining with the activity stream. This name will be used in the
|
||||
// subtitle.
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
export default
|
||||
function BuildAnchor($log, $filter) {
|
||||
export default function BuildAnchor($log, $filter) {
|
||||
// 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
|
||||
// arguments are: a summary_field object, a resource type, an activity stream object
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
export default
|
||||
function BuildDescription(BuildAnchor, $log, i18n) {
|
||||
export default function BuildDescription(BuildAnchor, $log, i18n) {
|
||||
return function (activity) {
|
||||
|
||||
var pastTense = function(operation){
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
export default
|
||||
function ShowDetail($filter, $rootScope, Rest, Alert, GenerateForm, ProcessErrors, GetBasePath, FormatDate, ActivityDetailForm, Empty, Find) {
|
||||
export default function ShowDetail($filter, $rootScope, Rest, Alert,
|
||||
GenerateForm, ProcessErrors, GetBasePath, FormatDate, ActivityDetailForm,
|
||||
Empty, Find) {
|
||||
return function (params, scope) {
|
||||
|
||||
var activity_id = params.activity_id,
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
export default
|
||||
function Stream($rootScope, $location, $state, Rest, GetBasePath, ProcessErrors,
|
||||
Wait, StreamList, GenerateList, FormatDate,
|
||||
BuildDescription, ShowDetail) {
|
||||
export default function Stream($rootScope, $location, $state, Rest, GetBasePath,
|
||||
ProcessErrors, Wait, StreamList, GenerateList, FormatDate, BuildDescription,
|
||||
ShowDetail) {
|
||||
return function (params) {
|
||||
|
||||
var scope = params.scope;
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
export default
|
||||
function GetTargetTitle(i18n) {
|
||||
export default function GetTargetTitle(i18n) {
|
||||
return function (target) {
|
||||
|
||||
var rtnTitle = i18n._('ALL ACTIVITY');
|
||||
|
||||
@@ -14,6 +14,8 @@ import ShowDetail from './factories/show-detail.factory';
|
||||
import Stream from './factories/stream.factory';
|
||||
import GetTargetTitle from './get-target-title.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])
|
||||
.controller('activityStreamController', activityStreamController)
|
||||
@@ -24,6 +26,8 @@ export default angular.module('activityStream', [streamDetailModal.name])
|
||||
.factory('Stream', Stream)
|
||||
.factory('GetTargetTitle', GetTargetTitle)
|
||||
.factory('ModelToBasePathKey', ModelToBasePathKey)
|
||||
.factory('ActivityDetailForm', ActivityDetailForm)
|
||||
.factory('StreamList', StreamList)
|
||||
.run(['$stateExtender', function($stateExtender) {
|
||||
$stateExtender.addState(activityStreamRoute);
|
||||
}]);
|
||||
|
||||
@@ -10,8 +10,7 @@
|
||||
* @description Helper functions to convert singular/plural versions of our models to the opposite
|
||||
*/
|
||||
|
||||
export default
|
||||
function ModelToBasePathKey() {
|
||||
export default function ModelToBasePathKey() {
|
||||
return function(model) {
|
||||
// This function takes in the singular model string and returns the key needed
|
||||
// to get the base path from $rootScope/local storage.
|
||||
|
||||
@@ -5,9 +5,7 @@
|
||||
*************************************************/
|
||||
|
||||
|
||||
export default
|
||||
angular.module('StreamListDefinition', [])
|
||||
.factory('StreamList', ['i18n', function(i18n) {
|
||||
export default ['i18n', function(i18n) {
|
||||
return {
|
||||
|
||||
name: 'activities',
|
||||
@@ -72,4 +70,4 @@ export default
|
||||
}
|
||||
}
|
||||
|
||||
};}]);
|
||||
};}];
|
||||
@@ -143,8 +143,6 @@ var tower = angular.module('Tower', [
|
||||
'AllJobsDefinition',
|
||||
'JobSummaryDefinition',
|
||||
'HostGroupsFormDefinition',
|
||||
'StreamListDefinition',
|
||||
'ActivityDetailDefinition',
|
||||
'ScheduledJobsDefinition',
|
||||
'JobsListDefinition',
|
||||
'LogViewerStatusDefinition',
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
* All Rights Reserved
|
||||
*************************************************/
|
||||
|
||||
import ActivityDetail from "./forms/ActivityDetail";
|
||||
import EventsViewer from "./forms/EventsViewer";
|
||||
import Groups from "./forms/Groups";
|
||||
import HostGroups from "./forms/HostGroups";
|
||||
@@ -23,8 +22,7 @@ import Workflows from "./forms/Workflows";
|
||||
|
||||
|
||||
export
|
||||
{ ActivityDetail,
|
||||
EventsViewer,
|
||||
{ EventsViewer,
|
||||
Groups,
|
||||
HostGroups,
|
||||
Hosts,
|
||||
|
||||
@@ -19,7 +19,6 @@ import Organizations from "./lists/Organizations";
|
||||
import PortalJobTemplates from "./lists/PortalJobTemplates";
|
||||
import PortalJobs from "./lists/PortalJobs";
|
||||
import ScheduledJobs from "./lists/ScheduledJobs";
|
||||
import Streams from "./lists/Streams";
|
||||
import Templates from "./lists/Templates";
|
||||
|
||||
export
|
||||
@@ -38,6 +37,5 @@ export
|
||||
PortalJobTemplates,
|
||||
PortalJobs,
|
||||
ScheduledJobs,
|
||||
Streams,
|
||||
Templates
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user