mirror of
https://github.com/ansible/awx.git
synced 2026-01-16 04:10:44 -03:30
Removed old breadcrumb references
This commit is contained in:
parent
63c16af26a
commit
95240e03ab
@ -72,23 +72,6 @@ function adhocController($q, $scope, $rootScope, $location, $stateParams,
|
||||
}
|
||||
};
|
||||
|
||||
privateFn.getInventoryNameForBreadcrumbs = function(url) {
|
||||
|
||||
Rest.setUrl(url);
|
||||
var promise = Rest.get();
|
||||
promise.then(function (response) {
|
||||
$scope.inv_name = response.data.name;
|
||||
});
|
||||
promise.catch(function (response) {
|
||||
ProcessErrors($rootScope, response.data, response.status, null, {
|
||||
hdr: 'Error!',
|
||||
msg: 'Failed to get inventory name. GET returned status: ' +
|
||||
response.status });
|
||||
$location.path("/inventories/");
|
||||
});
|
||||
return promise;
|
||||
};
|
||||
|
||||
// set the arguments help to watch on change of the module
|
||||
privateFn.instantiateArgumentHelp = function() {
|
||||
$scope.$watch('module_name', function(val) {
|
||||
@ -167,9 +150,6 @@ function adhocController($q, $scope, $rootScope, $location, $stateParams,
|
||||
// put the inventory id on scope for the partial to use
|
||||
$scope.inv_id = id;
|
||||
|
||||
// get the inventory name
|
||||
privateFn.getInventoryNameForBreadcrumbs(urls.inventoryUrl);
|
||||
|
||||
// set the arguments help to watch on change of the module
|
||||
privateFn.instantiateArgumentHelp();
|
||||
|
||||
|
||||
@ -1,8 +1,3 @@
|
||||
<breadcrumbs>
|
||||
<breadcrumb path="/inventories" title="Inventories"></breadcrumb>
|
||||
<breadcrumb path="/inventories/{{inv_id}}/manage" title="{{inv_name}}"></breadcrumb>
|
||||
<breadcrumb path="/inventories/{{inv_id}}/adhoc" title="Run Command"></breadcrumb>
|
||||
</breadcrumbs>
|
||||
<div class="tab-pane" id="credentials">
|
||||
<div ng-cloak id="htmlTemplate">
|
||||
</div>
|
||||
|
||||
@ -31,8 +31,6 @@ import systemTracking from './system-tracking/main';
|
||||
import inventoryScripts from './inventory-scripts/main';
|
||||
import permissions from './permissions/main';
|
||||
import managementJobs from './management-jobs/main';
|
||||
import breadcrumbs from './shared/breadcrumbs/main';
|
||||
|
||||
|
||||
// modules
|
||||
import setupMenu from './setup-menu/main';
|
||||
@ -81,7 +79,6 @@ var tower = angular.module('Tower', [
|
||||
'ngCookies',
|
||||
RestServices.name,
|
||||
browserData.name,
|
||||
breadcrumbs.name,
|
||||
systemTracking.name,
|
||||
inventoryScripts.name,
|
||||
permissions.name,
|
||||
@ -975,7 +972,6 @@ var tower = angular.module('Tower', [
|
||||
$rootScope.removeConfigReady = $rootScope.$on('ConfigReady', function() {
|
||||
LoadBasePaths();
|
||||
|
||||
$rootScope.breadcrumbs = [];
|
||||
$rootScope.crumbCache = [];
|
||||
|
||||
if ($rootScope.removeOpenSocket) {
|
||||
|
||||
@ -21,7 +21,7 @@
|
||||
*/
|
||||
|
||||
|
||||
export function AdminsList($scope, $rootScope, $location, $log, $stateParams, Rest, Alert, AdminList, GenerateList, LoadBreadCrumbs,
|
||||
export function AdminsList($scope, $rootScope, $location, $log, $stateParams, Rest, Alert, AdminList, GenerateList,
|
||||
Prompt, SearchInit, PaginateInit, ReturnToCaller, GetBasePath, SelectionInit) {
|
||||
|
||||
var list = AdminList,
|
||||
@ -30,7 +30,7 @@ export function AdminsList($scope, $rootScope, $location, $log, $stateParams, Re
|
||||
mode = 'select',
|
||||
url = GetBasePath('organizations') + $stateParams.organization_id + '/admins/';
|
||||
|
||||
generator.inject(AdminList, { mode: mode, scope: $scope, breadCrumbs: true });
|
||||
generator.inject(AdminList, { mode: mode, scope: $scope });
|
||||
|
||||
SelectionInit({ scope: $scope, list: list, url: url, returnToCaller: 1 });
|
||||
|
||||
@ -39,10 +39,8 @@ export function AdminsList($scope, $rootScope, $location, $log, $stateParams, Re
|
||||
PaginateInit({ scope: $scope, list: list, url: defaultUrl });
|
||||
|
||||
$scope.search(list.iterator);
|
||||
|
||||
LoadBreadCrumbs();
|
||||
}
|
||||
|
||||
AdminsList.$inject = ['$scope', '$rootScope', '$location', '$log', '$stateParams', 'Rest', 'Alert', 'AdminList', 'generateList',
|
||||
'LoadBreadCrumbs', 'Prompt', 'SearchInit', 'PaginateInit', 'ReturnToCaller', 'GetBasePath', 'SelectionInit'
|
||||
'Prompt', 'SearchInit', 'PaginateInit', 'ReturnToCaller', 'GetBasePath', 'SelectionInit'
|
||||
];
|
||||
|
||||
@ -12,7 +12,7 @@
|
||||
|
||||
|
||||
export function CredentialsList($scope, $rootScope, $location, $log, $stateParams, Rest, Alert, CredentialList,
|
||||
GenerateList, LoadBreadCrumbs, Prompt, SearchInit, PaginateInit, ReturnToCaller,
|
||||
GenerateList, Prompt, SearchInit, PaginateInit, ReturnToCaller,
|
||||
ClearScope, ProcessErrors, GetBasePath, SelectionInit, GetChoices, Wait, Stream) {
|
||||
|
||||
ClearScope();
|
||||
@ -26,7 +26,7 @@ export function CredentialsList($scope, $rootScope, $location, $log, $stateParam
|
||||
mode = (base === 'credentials') ? 'edit' : 'select',
|
||||
url;
|
||||
|
||||
view.inject(list, { mode: mode, scope: $scope, breadCrumbs:(($stateParams.user_id || $stateParams.team_id) ? true : false) });
|
||||
view.inject(list, { mode: mode, scope: $scope });
|
||||
|
||||
$scope.selected = [];
|
||||
$scope.credentialLoading = true;
|
||||
@ -125,13 +125,13 @@ export function CredentialsList($scope, $rootScope, $location, $log, $stateParam
|
||||
}
|
||||
|
||||
CredentialsList.$inject = ['$scope', '$rootScope', '$location', '$log', '$stateParams', 'Rest', 'Alert', 'CredentialList', 'generateList',
|
||||
'LoadBreadCrumbs', 'Prompt', 'SearchInit', 'PaginateInit', 'ReturnToCaller', 'ClearScope', 'ProcessErrors', 'GetBasePath',
|
||||
'Prompt', 'SearchInit', 'PaginateInit', 'ReturnToCaller', 'ClearScope', 'ProcessErrors', 'GetBasePath',
|
||||
'SelectionInit', 'GetChoices', 'Wait', 'Stream'
|
||||
];
|
||||
|
||||
|
||||
export function CredentialsAdd($scope, $rootScope, $compile, $location, $log, $stateParams, CredentialForm, GenerateForm, Rest, Alert,
|
||||
ProcessErrors, LoadBreadCrumbs, ReturnToCaller, ClearScope, GenerateList, SearchInit, PaginateInit, LookUpInit, UserList, TeamList,
|
||||
ProcessErrors, ReturnToCaller, ClearScope, GenerateList, SearchInit, PaginateInit, LookUpInit, UserList, TeamList,
|
||||
GetBasePath, GetChoices, Empty, KindChange, OwnerChange, FormSave) {
|
||||
|
||||
ClearScope();
|
||||
@ -294,13 +294,13 @@ export function CredentialsAdd($scope, $rootScope, $compile, $location, $log, $s
|
||||
}
|
||||
|
||||
CredentialsAdd.$inject = ['$scope', '$rootScope', '$compile', '$location', '$log', '$stateParams', 'CredentialForm', 'GenerateForm',
|
||||
'Rest', 'Alert', 'ProcessErrors', 'LoadBreadCrumbs', 'ReturnToCaller', 'ClearScope', 'generateList', 'SearchInit', 'PaginateInit',
|
||||
'Rest', 'Alert', 'ProcessErrors', 'ReturnToCaller', 'ClearScope', 'generateList', 'SearchInit', 'PaginateInit',
|
||||
'LookUpInit', 'UserList', 'TeamList', 'GetBasePath', 'GetChoices', 'Empty', 'KindChange', 'OwnerChange', 'FormSave'
|
||||
];
|
||||
|
||||
|
||||
export function CredentialsEdit($scope, $rootScope, $compile, $location, $log, $stateParams, CredentialForm, GenerateForm, Rest, Alert,
|
||||
ProcessErrors, LoadBreadCrumbs, RelatedSearchInit, RelatedPaginateInit, ReturnToCaller, ClearScope, Prompt, GetBasePath, GetChoices,
|
||||
ProcessErrors, RelatedSearchInit, RelatedPaginateInit, ReturnToCaller, ClearScope, Prompt, GetBasePath, GetChoices,
|
||||
KindChange, UserList, TeamList, LookUpInit, Empty, OwnerChange, FormSave, Stream, Wait) {
|
||||
|
||||
ClearScope();
|
||||
@ -612,7 +612,7 @@ export function CredentialsEdit($scope, $rootScope, $compile, $location, $log, $
|
||||
}
|
||||
|
||||
CredentialsEdit.$inject = ['$scope', '$rootScope', '$compile', '$location', '$log', '$stateParams', 'CredentialForm',
|
||||
'GenerateForm', 'Rest', 'Alert', 'ProcessErrors', 'LoadBreadCrumbs', 'RelatedSearchInit', 'RelatedPaginateInit',
|
||||
'GenerateForm', 'Rest', 'Alert', 'ProcessErrors', 'RelatedSearchInit', 'RelatedPaginateInit',
|
||||
'ReturnToCaller', 'ClearScope', 'Prompt', 'GetBasePath', 'GetChoices', 'KindChange', 'UserList', 'TeamList', 'LookUpInit',
|
||||
'Empty', 'OwnerChange', 'FormSave', 'Stream', 'Wait'
|
||||
];
|
||||
|
||||
@ -156,7 +156,7 @@ Home.$inject = ['$scope', '$compile', '$stateParams', '$rootScope', '$location',
|
||||
* @description This controls the 'home/groups' page that is loaded from the dashboard
|
||||
*
|
||||
*/
|
||||
export function HomeGroups($rootScope, $log, $scope, $filter, $compile, $location, $stateParams, LogViewer, HomeGroupList, GenerateList, ProcessErrors, LoadBreadCrumbs, ReturnToCaller, ClearScope,
|
||||
export function HomeGroups($rootScope, $log, $scope, $filter, $compile, $location, $stateParams, LogViewer, HomeGroupList, GenerateList, ProcessErrors, ReturnToCaller, ClearScope,
|
||||
GetBasePath, SearchInit, PaginateInit, FormatDate, GetHostsStatusMsg, GetSyncStatusMsg, ViewUpdateStatus, Stream, GroupsEdit, Wait,
|
||||
Alert, Rest, Empty, InventoryUpdate, Find, GroupsCancelUpdate, Store) {
|
||||
|
||||
@ -170,7 +170,7 @@ export function HomeGroups($rootScope, $log, $scope, $filter, $compile, $locatio
|
||||
modal_scope = $scope.$new(),
|
||||
opt, PreviousSearchParams;
|
||||
|
||||
generator.inject(list, { mode: 'edit', scope: scope, breadCrumbs: true });
|
||||
generator.inject(list, { mode: 'edit', scope: scope });
|
||||
|
||||
function ellipsis(a) {
|
||||
if (a.length > 20) {
|
||||
@ -334,8 +334,6 @@ export function HomeGroups($rootScope, $log, $scope, $filter, $compile, $locatio
|
||||
|
||||
scope.$emit('WatchUpdateStatus'); // Start watching for live updates
|
||||
|
||||
LoadBreadCrumbs();
|
||||
|
||||
if ($rootScope.removeJobStatusChange) {
|
||||
$rootScope.removeJobStatusChange();
|
||||
}
|
||||
@ -579,7 +577,7 @@ export function HomeGroups($rootScope, $log, $scope, $filter, $compile, $locatio
|
||||
|
||||
}
|
||||
|
||||
HomeGroups.$inject = ['$rootScope', '$log', '$scope', '$filter', '$compile', '$location', '$stateParams', 'LogViewer', 'HomeGroupList', 'generateList', 'ProcessErrors', 'LoadBreadCrumbs', 'ReturnToCaller',
|
||||
HomeGroups.$inject = ['$rootScope', '$log', '$scope', '$filter', '$compile', '$location', '$stateParams', 'LogViewer', 'HomeGroupList', 'generateList', 'ProcessErrors', 'ReturnToCaller',
|
||||
'ClearScope', 'GetBasePath', 'SearchInit', 'PaginateInit', 'FormatDate', 'GetHostsStatusMsg', 'GetSyncStatusMsg', 'ViewUpdateStatus',
|
||||
'Stream', 'GroupsEdit', 'Wait', 'Alert', 'Rest', 'Empty', 'InventoryUpdate', 'Find', 'GroupsCancelUpdate', 'Store', 'Socket'
|
||||
];
|
||||
@ -592,7 +590,7 @@ HomeGroups.$inject = ['$rootScope', '$log', '$scope', '$filter', '$compile', '$l
|
||||
*
|
||||
*/
|
||||
|
||||
export function HomeHosts($scope, $location, $stateParams, HomeHostList, GenerateList, ProcessErrors, LoadBreadCrumbs, ReturnToCaller, ClearScope,
|
||||
export function HomeHosts($scope, $location, $stateParams, HomeHostList, GenerateList, ProcessErrors, ReturnToCaller, ClearScope,
|
||||
GetBasePath, SearchInit, PaginateInit, FormatDate, SetStatus, ToggleHostEnabled, HostsEdit, Stream, Find, ShowJobSummary, ViewJob) {
|
||||
|
||||
ClearScope('htmlTemplate'); //Garbage collection. Don't leave behind any listeners/watchers from the prior
|
||||
@ -615,7 +613,7 @@ export function HomeHosts($scope, $location, $stateParams, HomeHostList, Generat
|
||||
});
|
||||
}
|
||||
|
||||
generator.inject(list, { mode: 'edit', scope: $scope, breadCrumbs: true });
|
||||
generator.inject(list, { mode: 'edit', scope: $scope });
|
||||
|
||||
});
|
||||
|
||||
@ -658,8 +656,6 @@ export function HomeHosts($scope, $location, $stateParams, HomeHostList, Generat
|
||||
|
||||
$scope.search(list.iterator);
|
||||
|
||||
LoadBreadCrumbs();
|
||||
|
||||
$scope.refreshHosts = function() {
|
||||
$scope.search(list.iterator);
|
||||
};
|
||||
@ -708,7 +704,7 @@ export function HomeHosts($scope, $location, $stateParams, HomeHostList, Generat
|
||||
|
||||
}
|
||||
|
||||
HomeHosts.$inject = ['$scope', '$location', '$stateParams', 'HomeHostList', 'generateList', 'ProcessErrors', 'LoadBreadCrumbs', 'ReturnToCaller',
|
||||
HomeHosts.$inject = ['$scope', '$location', '$stateParams', 'HomeHostList', 'generateList', 'ProcessErrors', 'ReturnToCaller',
|
||||
'ClearScope', 'GetBasePath', 'SearchInit', 'PaginateInit', 'FormatDate', 'SetStatus', 'ToggleHostEnabled', 'HostsEdit', 'Stream',
|
||||
'Find', 'ShowJobSummary', 'ViewJob'
|
||||
];
|
||||
|
||||
@ -14,7 +14,7 @@ import '../job-templates/main';
|
||||
|
||||
export function InventoriesList($scope, $rootScope, $location, $log,
|
||||
$stateParams, $compile, $filter, sanitizeFilter, Rest, Alert, InventoryList, generateList,
|
||||
LoadBreadCrumbs, Prompt, SearchInit, PaginateInit, ReturnToCaller,
|
||||
Prompt, SearchInit, PaginateInit, ReturnToCaller,
|
||||
ClearScope, ProcessErrors, GetBasePath, Wait, Stream,
|
||||
EditInventoryProperties, Find, Empty, LogViewer, $state) {
|
||||
|
||||
@ -123,8 +123,6 @@ export function InventoriesList($scope, $rootScope, $location, $log,
|
||||
|
||||
$scope.search(list.iterator);
|
||||
|
||||
LoadBreadCrumbs();
|
||||
|
||||
if ($scope.removePostRefresh) {
|
||||
$scope.removePostRefresh();
|
||||
}
|
||||
@ -370,13 +368,13 @@ export function InventoriesList($scope, $rootScope, $location, $log,
|
||||
}
|
||||
|
||||
InventoriesList.$inject = ['$scope', '$rootScope', '$location', '$log', '$stateParams', '$compile', '$filter', 'sanitizeFilter', 'Rest', 'Alert', 'InventoryList', 'generateList',
|
||||
'LoadBreadCrumbs', 'Prompt', 'SearchInit', 'PaginateInit', 'ReturnToCaller', 'ClearScope', 'ProcessErrors',
|
||||
'Prompt', 'SearchInit', 'PaginateInit', 'ReturnToCaller', 'ClearScope', 'ProcessErrors',
|
||||
'GetBasePath', 'Wait', 'Stream', 'EditInventoryProperties', 'Find', 'Empty', 'LogViewer', '$state'
|
||||
];
|
||||
|
||||
|
||||
export function InventoriesAdd($scope, $rootScope, $compile, $location, $log, $stateParams, InventoryForm, GenerateForm, Rest,
|
||||
Alert, ProcessErrors, LoadBreadCrumbs, ReturnToCaller, ClearScope, generateList, OrganizationList, SearchInit, PaginateInit,
|
||||
Alert, ProcessErrors, ReturnToCaller, ClearScope, generateList, OrganizationList, SearchInit, PaginateInit,
|
||||
LookUpInit, GetBasePath, ParseTypeChange, Wait, ToJSON) {
|
||||
|
||||
ClearScope();
|
||||
@ -390,10 +388,9 @@ export function InventoriesAdd($scope, $rootScope, $compile, $location, $log, $s
|
||||
form.formLabelSize = null;
|
||||
form.formFieldSize = null;
|
||||
|
||||
generator.inject(form, { mode: 'add', related: false, scope: $scope, breadcrumbs: true });
|
||||
generator.inject(form, { mode: 'add', related: false, scope: $scope });
|
||||
|
||||
generator.reset();
|
||||
LoadBreadCrumbs();
|
||||
|
||||
$scope.parseType = 'yaml';
|
||||
ParseTypeChange({
|
||||
@ -455,12 +452,12 @@ export function InventoriesAdd($scope, $rootScope, $compile, $location, $log, $s
|
||||
}
|
||||
|
||||
InventoriesAdd.$inject = ['$scope', '$rootScope', '$compile', '$location', '$log', '$stateParams', 'InventoryForm', 'GenerateForm',
|
||||
'Rest', 'Alert', 'ProcessErrors', 'LoadBreadCrumbs', 'ReturnToCaller', 'ClearScope', 'generateList', 'OrganizationList', 'SearchInit',
|
||||
'Rest', 'Alert', 'ProcessErrors', 'ReturnToCaller', 'ClearScope', 'generateList', 'OrganizationList', 'SearchInit',
|
||||
'PaginateInit', 'LookUpInit', 'GetBasePath', 'ParseTypeChange', 'Wait', 'ToJSON'
|
||||
];
|
||||
|
||||
export function InventoriesEdit($scope, $rootScope, $compile, $location, $log, $stateParams, InventoryForm, GenerateForm, Rest,
|
||||
Alert, ProcessErrors, LoadBreadCrumbs, ReturnToCaller, ClearScope, generateList, OrganizationList, SearchInit, PaginateInit,
|
||||
Alert, ProcessErrors, ReturnToCaller, ClearScope, generateList, OrganizationList, SearchInit, PaginateInit,
|
||||
LookUpInit, GetBasePath, ParseTypeChange, Wait, ToJSON, ParseVariableString, Stream, RelatedSearchInit, RelatedPaginateInit,
|
||||
Prompt, PlaybookRun, CreateDialog, deleteJobTemplate) {
|
||||
|
||||
@ -479,7 +476,7 @@ export function InventoriesEdit($scope, $rootScope, $compile, $location, $log, $
|
||||
form.formLabelSize = null;
|
||||
form.formFieldSize = null;
|
||||
$scope.inventory_id = inventory_id;
|
||||
generator.inject(form, { mode: 'edit', related: true, scope: $scope, breadcrumbs: true });
|
||||
generator.inject(form, { mode: 'edit', related: true, scope: $scope });
|
||||
|
||||
generator.reset();
|
||||
|
||||
@ -535,11 +532,6 @@ export function InventoriesEdit($scope, $rootScope, $compile, $location, $log, $
|
||||
relatedSets: relatedSets
|
||||
});
|
||||
|
||||
LoadBreadCrumbs({
|
||||
path: $location.path(),
|
||||
title: $scope.inventory_name
|
||||
});
|
||||
|
||||
Wait('stop');
|
||||
$scope.parseType = 'yaml';
|
||||
ParseTypeChange({
|
||||
@ -786,7 +778,7 @@ export function InventoriesEdit($scope, $rootScope, $compile, $location, $log, $
|
||||
}
|
||||
|
||||
InventoriesEdit.$inject = ['$scope', '$rootScope', '$compile', '$location', '$log', '$stateParams', 'InventoryForm', 'GenerateForm',
|
||||
'Rest', 'Alert', 'ProcessErrors', 'LoadBreadCrumbs', 'ReturnToCaller', 'ClearScope', 'generateList', 'OrganizationList', 'SearchInit',
|
||||
'Rest', 'Alert', 'ProcessErrors', 'ReturnToCaller', 'ClearScope', 'generateList', 'OrganizationList', 'SearchInit',
|
||||
'PaginateInit', 'LookUpInit', 'GetBasePath', 'ParseTypeChange', 'Wait', 'ToJSON', 'ParseVariableString', 'Stream', 'RelatedSearchInit', 'RelatedPaginateInit',
|
||||
'Prompt', 'PlaybookRun', 'CreateDialog', 'deleteJobTemplate'
|
||||
];
|
||||
@ -795,7 +787,7 @@ InventoriesEdit.$inject = ['$scope', '$rootScope', '$compile', '$location', '$lo
|
||||
|
||||
export function InventoriesManage ($log, $scope, $rootScope, $location,
|
||||
$state, $compile, generateList, ClearScope, Empty, Wait, Rest, Alert,
|
||||
LoadBreadCrumbs, GetBasePath, ProcessErrors, Breadcrumbs, InventoryGroups,
|
||||
GetBasePath, ProcessErrors, InventoryGroups,
|
||||
InjectHosts, Find, HostsReload, SearchInit, PaginateInit, GetSyncStatusMsg,
|
||||
GetHostsStatusMsg, GroupsEdit, InventoryUpdate, GroupsCancelUpdate,
|
||||
ViewUpdateStatus, GroupsDelete, Store, HostsEdit, HostsDelete,
|
||||
@ -809,18 +801,6 @@ export function InventoriesManage ($log, $scope, $rootScope, $location,
|
||||
|
||||
ClearScope();
|
||||
|
||||
$scope.group_breadcrumbs = [{
|
||||
name: '',
|
||||
id: 0,
|
||||
description: '',
|
||||
show: true,
|
||||
ngicon: null,
|
||||
has_children: false,
|
||||
related: {},
|
||||
active_class: 'active',
|
||||
show_failures: false
|
||||
}];
|
||||
|
||||
// TODO: only display adhoc button if the user has permission to use it.
|
||||
// TODO: figure out how to get the action-list partial to update so that
|
||||
// the tooltip can be changed based off things being selected or not.
|
||||
@ -944,22 +924,10 @@ export function InventoriesManage ($log, $scope, $rootScope, $location,
|
||||
$scope.removeInventoryLoaded = $scope.$on('InventoryLoaded', function() {
|
||||
var e, rows;
|
||||
|
||||
LoadBreadCrumbs({
|
||||
path: $location.path(),
|
||||
title: '{{ inventory.name }}'
|
||||
});
|
||||
$scope.group_breadcrumbs[0].name = $scope.inventory.name;
|
||||
|
||||
// Build page breadcrumbs
|
||||
e = angular.element(document.getElementById('breadcrumbs'));
|
||||
e.html(Breadcrumbs({ list: InventoryGroups, mode: 'edit' }));
|
||||
$compile(e)($scope);
|
||||
|
||||
// Add groups view
|
||||
generateList.inject(InventoryGroups, {
|
||||
mode: 'edit',
|
||||
id: 'group-list-container',
|
||||
breadCrumbs: false,
|
||||
searchSize: 'col-lg-6 col-md-6 col-sm-6',
|
||||
scope: $scope
|
||||
});
|
||||
@ -1096,15 +1064,6 @@ export function InventoriesManage ($log, $scope, $rootScope, $location,
|
||||
$scope.search(InventoryGroups.iterator, null, true, false, true);
|
||||
}
|
||||
|
||||
function setActiveGroupBreadcrumb() {
|
||||
$scope.group_breadcrumbs.forEach(function(crumb, idx) {
|
||||
$scope.group_breadcrumbs[idx].active_class = '';
|
||||
});
|
||||
$scope.group_breadcrumbs[$scope.group_breadcrumbs.length - 1].active_class = 'active';
|
||||
$scope.refreshHostsOnGroupRefresh = true;
|
||||
$scope.selected_group_id = ($scope.group_breadcrumbs[$scope.group_breadcrumbs.length - 1].id === 0) ? null : $scope.group_breadcrumbs[$scope.group_breadcrumbs.length - 1].id;
|
||||
}
|
||||
|
||||
$scope.refreshHosts = function() {
|
||||
HostsReload({
|
||||
scope: hostScope,
|
||||
@ -1143,31 +1102,9 @@ export function InventoriesManage ($log, $scope, $rootScope, $location,
|
||||
groups.push(group.id);
|
||||
groups = groups.join();
|
||||
$state.transitionTo('inventoryManage', {inventory_id: $state.params.inventory_id, groups: groups}, { notify: false });
|
||||
$scope.group_breadcrumbs.push(group);
|
||||
setActiveGroupBreadcrumb();
|
||||
loadGroups(group.related.children, group.id);
|
||||
};
|
||||
|
||||
$scope.breadcrumbGroupSelect = function(id) {
|
||||
var i, url;
|
||||
$scope.group_breadcrumbs.every(function(crumb, idx) {
|
||||
if (crumb.id === id) {
|
||||
i = idx;
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
});
|
||||
$scope.group_breadcrumbs = $scope.group_breadcrumbs.slice(0,i + 1);
|
||||
if (id > 0) {
|
||||
url = $scope.group_breadcrumbs[$scope.group_breadcrumbs.length - 1].related.children;
|
||||
}
|
||||
else {
|
||||
url = $scope.inventory.related.root_groups;
|
||||
}
|
||||
setActiveGroupBreadcrumb();
|
||||
loadGroups(url);
|
||||
};
|
||||
|
||||
$scope.createGroup = function () {
|
||||
PreviousSearchParams = Store('group_current_search_params');
|
||||
GroupsEdit({
|
||||
@ -1314,13 +1251,6 @@ export function InventoriesManage ($log, $scope, $rootScope, $location,
|
||||
$scope.showGroupActivity = function () {
|
||||
var url, title, group;
|
||||
if ($scope.selected_group_id) {
|
||||
$scope.group_breadcrumbs.every(function(crumb) {
|
||||
if (crumb.id === $scope.selected_group_id) {
|
||||
group = crumb;
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
});
|
||||
url = GetBasePath('activity_stream') + '?group__id=' + $scope.selected_group_id;
|
||||
title = 'Showing all activities for group ' + group.name;
|
||||
} else {
|
||||
@ -1412,8 +1342,8 @@ export function InventoriesManage ($log, $scope, $rootScope, $location,
|
||||
|
||||
InventoriesManage.$inject = ['$log', '$scope', '$rootScope', '$location',
|
||||
'$state', '$compile', 'generateList', 'ClearScope', 'Empty', 'Wait',
|
||||
'Rest', 'Alert', 'LoadBreadCrumbs', 'GetBasePath', 'ProcessErrors',
|
||||
'Breadcrumbs', 'InventoryGroups', 'InjectHosts', 'Find', 'HostsReload',
|
||||
'Rest', 'Alert', 'GetBasePath', 'ProcessErrors',
|
||||
'InventoryGroups', 'InjectHosts', 'Find', 'HostsReload',
|
||||
'SearchInit', 'PaginateInit', 'GetSyncStatusMsg', 'GetHostsStatusMsg',
|
||||
'GroupsEdit', 'InventoryUpdate', 'GroupsCancelUpdate', 'ViewUpdateStatus',
|
||||
'GroupsDelete', 'Store', 'HostsEdit', 'HostsDelete',
|
||||
|
||||
@ -11,7 +11,7 @@
|
||||
*/
|
||||
|
||||
|
||||
export function JobDetailController ($location, $rootScope, $filter, $scope, $compile, $stateParams, $log, ClearScope, Breadcrumbs, LoadBreadCrumbs, GetBasePath, Wait, Rest,
|
||||
export function JobDetailController ($location, $rootScope, $filter, $scope, $compile, $stateParams, $log, ClearScope, GetBasePath, Wait, Rest,
|
||||
ProcessErrors, SelectPlay, SelectTask, Socket, GetElapsed, DrawGraph, LoadHostSummary, ReloadHostSummaryList, JobIsFinished, SetTaskStyles, DigestEvent,
|
||||
UpdateDOM, EventViewer, DeleteJob, PlaybookRun, HostEventsViewer, LoadPlays, LoadTasks, LoadHosts, HostsEdit, ParseVariableString, GetChoices, fieldChoices, fieldLabels, EditSchedule) {
|
||||
|
||||
@ -848,7 +848,7 @@ export function JobDetailController ($location, $rootScope, $filter, $scope, $co
|
||||
//$('#tasks-table-detail').mCustomScrollbar("update");
|
||||
$('#hosts-table-detail').height(150);
|
||||
//$('#hosts-table-detail').mCustomScrollbar("update");
|
||||
height = $(window).height() - $('#main-menu-container .navbar').outerHeight() - $('#breadcrumb-container').outerHeight() -
|
||||
height = $(window).height() - $('#main-menu-container .navbar').outerHeight() -
|
||||
$('#job-detail-container').outerHeight() - $('#job-detail-footer').outerHeight() - 20;
|
||||
if (height > 15) {
|
||||
// there's a bunch of white space at the bottom, let's use it
|
||||
@ -1435,7 +1435,7 @@ export function JobDetailController ($location, $rootScope, $filter, $scope, $co
|
||||
});
|
||||
}
|
||||
|
||||
JobDetailController.$inject = [ '$location', '$rootScope', '$filter', '$scope', '$compile', '$stateParams', '$log', 'ClearScope', 'Breadcrumbs', 'LoadBreadCrumbs', 'GetBasePath',
|
||||
JobDetailController.$inject = [ '$location', '$rootScope', '$filter', '$scope', '$compile', '$stateParams', '$log', 'ClearScope', 'GetBasePath',
|
||||
'Wait', 'Rest', 'ProcessErrors', 'SelectPlay', 'SelectTask', 'Socket', 'GetElapsed', 'DrawGraph', 'LoadHostSummary', 'ReloadHostSummaryList',
|
||||
'JobIsFinished', 'SetTaskStyles', 'DigestEvent', 'UpdateDOM', 'EventViewer', 'DeleteJob', 'PlaybookRun', 'HostEventsViewer', 'LoadPlays', 'LoadTasks',
|
||||
'LoadHosts', 'HostsEdit', 'ParseVariableString', 'GetChoices', 'fieldChoices', 'fieldLabels', 'EditSchedule'
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
*
|
||||
* All Rights Reserved
|
||||
*************************************************/
|
||||
|
||||
|
||||
/**
|
||||
* @ngdoc function
|
||||
* @name controllers.function:JobEvent
|
||||
@ -12,7 +12,7 @@
|
||||
|
||||
|
||||
export function JobEventsList($sce, $filter, $scope, $rootScope, $location, $log, $stateParams, Rest, Alert, JobEventList, GenerateList,
|
||||
LoadBreadCrumbs, Prompt, SearchInit, PaginateInit, ReturnToCaller, ClearScope, ProcessErrors, GetBasePath, LookUpInit, ToggleChildren,
|
||||
Prompt, SearchInit, PaginateInit, ReturnToCaller, ClearScope, ProcessErrors, GetBasePath, LookUpInit, ToggleChildren,
|
||||
FormatDate, EventView, Refresh, Wait) {
|
||||
|
||||
ClearScope();
|
||||
@ -182,15 +182,6 @@ export function JobEventsList($sce, $filter, $scope, $rootScope, $location, $log
|
||||
.success(function (data) {
|
||||
$scope.job_status = data.status;
|
||||
$scope.job_name = data.summary_fields.job_template.name;
|
||||
LoadBreadCrumbs({
|
||||
path: '/job_events/' + $scope.job_id,
|
||||
title: $scope.job_id + ' - ' + data.summary_fields.job_template.name,
|
||||
altPath: '/jobs'
|
||||
});
|
||||
$rootScope.breadcrumbs = [{
|
||||
path: '/jobs',
|
||||
title: $scope.job_id + ' - ' + data.summary_fields.job_template.name,
|
||||
}];
|
||||
$scope.$emit('SetHostLinks', data.inventory);
|
||||
})
|
||||
.error(function (data, status) {
|
||||
@ -253,12 +244,12 @@ export function JobEventsList($sce, $filter, $scope, $rootScope, $location, $log
|
||||
}
|
||||
|
||||
JobEventsList.$inject = ['$sce', '$filter', '$scope', '$rootScope', '$location', '$log', '$stateParams', 'Rest', 'Alert', 'JobEventList',
|
||||
'generateList', 'LoadBreadCrumbs', 'Prompt', 'SearchInit', 'PaginateInit', 'ReturnToCaller', 'ClearScope', 'ProcessErrors',
|
||||
'generateList', 'Prompt', 'SearchInit', 'PaginateInit', 'ReturnToCaller', 'ClearScope', 'ProcessErrors',
|
||||
'GetBasePath', 'LookUpInit', 'ToggleChildren', 'FormatDate', 'EventView', 'Refresh', 'Wait'
|
||||
];
|
||||
|
||||
export function JobEventsEdit($scope, $rootScope, $compile, $location, $log, $stateParams, JobEventsForm, GenerateForm,
|
||||
Rest, Alert, ProcessErrors, LoadBreadCrumbs, ClearScope, GetBasePath, FormatDate, EventView, Wait) {
|
||||
Rest, Alert, ProcessErrors, ClearScope, GetBasePath, FormatDate, EventView, Wait) {
|
||||
|
||||
ClearScope();
|
||||
|
||||
@ -276,7 +267,6 @@ export function JobEventsEdit($scope, $rootScope, $compile, $location, $log, $st
|
||||
.success(function (data) {
|
||||
var cDate, fld, n, rows;
|
||||
$scope.event_display = data.event_display.replace(/^\u00a0*/g, '');
|
||||
LoadBreadCrumbs({ path: '/jobs/' + $stateParams.job_id + '/job_events/' + $stateParams.event_id, title: $scope.event_display });
|
||||
for (fld in form.fields) {
|
||||
switch (fld) {
|
||||
case 'status':
|
||||
@ -356,5 +346,5 @@ export function JobEventsEdit($scope, $rootScope, $compile, $location, $log, $st
|
||||
}
|
||||
|
||||
JobEventsEdit.$inject = ['$scope', '$rootScope', '$compile', '$location', '$log', '$stateParams', 'JobEventsForm', 'GenerateForm',
|
||||
'Rest', 'Alert', 'ProcessErrors', 'LoadBreadCrumbs', 'ClearScope', 'GetBasePath', 'FormatDate', 'EventView', 'Wait'
|
||||
'Rest', 'Alert', 'ProcessErrors', 'ClearScope', 'GetBasePath', 'FormatDate', 'EventView', 'Wait'
|
||||
];
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
*
|
||||
* All Rights Reserved
|
||||
*************************************************/
|
||||
|
||||
|
||||
/**
|
||||
* @ngdoc function
|
||||
* @name controllers.function:JobHosts
|
||||
@ -12,7 +12,7 @@
|
||||
|
||||
|
||||
export function JobHostSummaryList($scope, $rootScope, $location, $log, $stateParams, Rest, Alert, JobHostList, GenerateList,
|
||||
LoadBreadCrumbs, Prompt, SearchInit, PaginateInit, ReturnToCaller, ClearScope, ProcessErrors, GetBasePath, Refresh,
|
||||
Prompt, SearchInit, PaginateInit, ReturnToCaller, ClearScope, ProcessErrors, GetBasePath, Refresh,
|
||||
JobStatusToolTip) {
|
||||
|
||||
ClearScope();
|
||||
@ -84,15 +84,6 @@ export function JobHostSummaryList($scope, $rootScope, $location, $log, $statePa
|
||||
Rest.get()
|
||||
.success(function (data) {
|
||||
inventory = data.inventory;
|
||||
LoadBreadCrumbs({
|
||||
path: '/job_host_summaries/' + $scope.job_id,
|
||||
title: $scope.job_id + ' - ' + data.summary_fields.job_template.name,
|
||||
altPath: '/jobs'
|
||||
});
|
||||
$rootScope.breadcrumbs = [{
|
||||
path: '/jobs',
|
||||
title: $scope.job_id + ' - ' + data.summary_fields.job_template.name,
|
||||
}];
|
||||
$scope.job_status = data.status;
|
||||
$scope.$emit('JobReady');
|
||||
})
|
||||
@ -122,6 +113,6 @@ export function JobHostSummaryList($scope, $rootScope, $location, $log, $statePa
|
||||
}
|
||||
|
||||
JobHostSummaryList.$inject = ['$scope', '$rootScope', '$location', '$log', '$stateParams', 'Rest', 'Alert', 'JobHostList',
|
||||
'generateList', 'LoadBreadCrumbs', 'Prompt', 'SearchInit', 'PaginateInit', 'ReturnToCaller', 'ClearScope', 'ProcessErrors',
|
||||
'generateList', 'Prompt', 'SearchInit', 'PaginateInit', 'ReturnToCaller', 'ClearScope', 'ProcessErrors',
|
||||
'GetBasePath', 'Refresh', 'JobStatusToolTip', 'Wait'
|
||||
];
|
||||
|
||||
@ -12,7 +12,7 @@
|
||||
|
||||
|
||||
export function JobTemplatesList($scope, $rootScope, $location, $log, $stateParams, Rest, Alert, JobTemplateList,
|
||||
GenerateList, LoadBreadCrumbs, Prompt, SearchInit, PaginateInit, ReturnToCaller, ClearScope, ProcessErrors,
|
||||
GenerateList, Prompt, SearchInit, PaginateInit, ReturnToCaller, ClearScope, ProcessErrors,
|
||||
GetBasePath, JobTemplateForm, CredentialList, LookUpInit, PlaybookRun, Wait, Stream, CreateDialog, $compile) {
|
||||
|
||||
ClearScope();
|
||||
@ -56,8 +56,6 @@ export function JobTemplatesList($scope, $rootScope, $location, $log, $statePara
|
||||
|
||||
$scope.search(list.iterator);
|
||||
|
||||
LoadBreadCrumbs();
|
||||
|
||||
|
||||
|
||||
$scope.showActivity = function () {
|
||||
@ -238,13 +236,13 @@ export function JobTemplatesList($scope, $rootScope, $location, $log, $statePara
|
||||
}
|
||||
|
||||
JobTemplatesList.$inject = ['$scope', '$rootScope', '$location', '$log', '$stateParams', 'Rest', 'Alert', 'JobTemplateList',
|
||||
'generateList', 'LoadBreadCrumbs', 'Prompt', 'SearchInit', 'PaginateInit', 'ReturnToCaller', 'ClearScope',
|
||||
'generateList', 'Prompt', 'SearchInit', 'PaginateInit', 'ReturnToCaller', 'ClearScope',
|
||||
'ProcessErrors', 'GetBasePath', 'JobTemplateForm', 'CredentialList', 'LookUpInit',
|
||||
'PlaybookRun', 'Wait', 'Stream', 'CreateDialog' , '$compile'
|
||||
];
|
||||
|
||||
export function JobTemplatesAdd($filter, $scope, $rootScope, $compile, $location, $log, $stateParams, JobTemplateForm,
|
||||
GenerateForm, Rest, Alert, ProcessErrors, LoadBreadCrumbs, ReturnToCaller, ClearScope, GetBasePath,
|
||||
GenerateForm, Rest, Alert, ProcessErrors, ReturnToCaller, ClearScope, GetBasePath,
|
||||
InventoryList, CredentialList, ProjectList, LookUpInit, md5Setup, ParseTypeChange, Wait, Empty, ToJSON,
|
||||
CallbackHelpInit, SurveyControllerInit, Prompt, GetChoices) {
|
||||
|
||||
@ -263,7 +261,7 @@ export function JobTemplatesAdd($filter, $scope, $rootScope, $compile, $location
|
||||
|
||||
CallbackHelpInit({ scope: $scope });
|
||||
$scope.can_edit = true;
|
||||
generator.inject(form, { mode: 'add', related: false, scope: $scope, breadcrumbs: true });
|
||||
generator.inject(form, { mode: 'add', related: false, scope: $scope });
|
||||
|
||||
callback = function() {
|
||||
// Make sure the form controller knows there was a change
|
||||
@ -277,7 +275,6 @@ export function JobTemplatesAdd($filter, $scope, $rootScope, $compile, $location
|
||||
$scope.allow_callbacks = false;
|
||||
|
||||
generator.reset();
|
||||
LoadBreadCrumbs();
|
||||
|
||||
md5Setup({
|
||||
scope: $scope,
|
||||
@ -660,14 +657,14 @@ export function JobTemplatesAdd($filter, $scope, $rootScope, $compile, $location
|
||||
}
|
||||
|
||||
JobTemplatesAdd.$inject = ['$filter', '$scope', '$rootScope', '$compile', '$location', '$log', '$stateParams', 'JobTemplateForm',
|
||||
'GenerateForm', 'Rest', 'Alert', 'ProcessErrors', 'LoadBreadCrumbs', 'ReturnToCaller', 'ClearScope',
|
||||
'GenerateForm', 'Rest', 'Alert', 'ProcessErrors', 'ReturnToCaller', 'ClearScope',
|
||||
'GetBasePath', 'InventoryList', 'CredentialList', 'ProjectList', 'LookUpInit',
|
||||
'md5Setup', 'ParseTypeChange', 'Wait', 'Empty', 'ToJSON', 'CallbackHelpInit', 'initSurvey', 'Prompt', 'GetChoices'
|
||||
];
|
||||
|
||||
|
||||
export function JobTemplatesEdit($filter, $scope, $rootScope, $compile, $location, $log, $stateParams, JobTemplateForm, GenerateForm, Rest,
|
||||
Alert, ProcessErrors, LoadBreadCrumbs, RelatedSearchInit, RelatedPaginateInit, ReturnToCaller, ClearScope, InventoryList,
|
||||
Alert, ProcessErrors, RelatedSearchInit, RelatedPaginateInit, ReturnToCaller, ClearScope, InventoryList,
|
||||
CredentialList, ProjectList, LookUpInit, GetBasePath, md5Setup, ParseTypeChange, JobStatusToolTip, FormatDate,
|
||||
Wait, Stream, Empty, Prompt, ParseVariableString, ToJSON, SchedulesControllerInit, JobsControllerInit, JobsListUpdate,
|
||||
GetChoices, SchedulesListInit, SchedulesList, CallbackHelpInit, PlaybookRun, SurveyControllerInit){
|
||||
@ -688,7 +685,7 @@ export function JobTemplatesEdit($filter, $scope, $rootScope, $compile, $locatio
|
||||
CallbackHelpInit({ scope: $scope });
|
||||
|
||||
SchedulesList.well = false;
|
||||
generator.inject(form, { mode: 'edit', related: true, scope: $scope, breadcrumbs: true });
|
||||
generator.inject(form, { mode: 'edit', related: true, scope: $scope });
|
||||
$scope.mode = 'edit';
|
||||
$scope.parseType = 'yaml';
|
||||
$scope.showJobType = false;
|
||||
@ -1232,7 +1229,7 @@ export function JobTemplatesEdit($filter, $scope, $rootScope, $compile, $locatio
|
||||
}
|
||||
|
||||
JobTemplatesEdit.$inject = ['$filter', '$scope', '$rootScope', '$compile', '$location', '$log', '$stateParams', 'JobTemplateForm',
|
||||
'GenerateForm', 'Rest', 'Alert', 'ProcessErrors', 'LoadBreadCrumbs', 'RelatedSearchInit', 'RelatedPaginateInit',
|
||||
'GenerateForm', 'Rest', 'Alert', 'ProcessErrors', 'RelatedSearchInit', 'RelatedPaginateInit',
|
||||
'ReturnToCaller', 'ClearScope', 'InventoryList', 'CredentialList', 'ProjectList', 'LookUpInit',
|
||||
'GetBasePath', 'md5Setup', 'ParseTypeChange', 'JobStatusToolTip', 'FormatDate', 'Wait', 'Stream', 'Empty', 'Prompt',
|
||||
'ParseVariableString', 'ToJSON', 'SchedulesControllerInit', 'JobsControllerInit', 'JobsListUpdate', 'GetChoices',
|
||||
|
||||
@ -12,7 +12,7 @@
|
||||
|
||||
|
||||
export function JobsListController ($rootScope, $log, $scope, $compile, $stateParams,
|
||||
ClearScope, Breadcrumbs, LoadBreadCrumbs, LoadSchedulesScope,
|
||||
ClearScope, LoadSchedulesScope,
|
||||
LoadJobsScope, AllJobsList, ScheduledJobsList, GetChoices, GetBasePath, Wait) {
|
||||
|
||||
ClearScope();
|
||||
@ -23,10 +23,6 @@ export function JobsListController ($rootScope, $log, $scope, $compile, $statePa
|
||||
api_complete = false,
|
||||
max_rows;
|
||||
|
||||
LoadBreadCrumbs();
|
||||
|
||||
|
||||
|
||||
if ($scope.removeListLoaded) {
|
||||
$scope.removeListLoaded();
|
||||
}
|
||||
@ -186,5 +182,5 @@ export function JobsListController ($rootScope, $log, $scope, $compile, $statePa
|
||||
}
|
||||
|
||||
JobsListController.$inject = ['$rootScope', '$log', '$scope', '$compile', '$stateParams',
|
||||
'ClearScope', 'Breadcrumbs', 'LoadBreadCrumbs', 'LoadSchedulesScope', 'LoadJobsScope',
|
||||
'ClearScope', 'LoadSchedulesScope', 'LoadJobsScope',
|
||||
'AllJobsList', 'ScheduledJobsList', 'GetChoices', 'GetBasePath', 'Wait'];
|
||||
|
||||
@ -44,7 +44,7 @@ export function LicenseController(ClearScope, $location, $rootScope, $compile, $
|
||||
delete self.form.fields.time_remaining;
|
||||
}
|
||||
|
||||
html = generator.buildHTML(self.form, { mode: 'edit', showButtons: false, breadCrumbs: false });
|
||||
html = generator.buildHTML(self.form, { mode: 'edit', showButtons: false });
|
||||
return html;
|
||||
};
|
||||
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
*
|
||||
* All Rights Reserved
|
||||
*************************************************/
|
||||
|
||||
|
||||
/**
|
||||
* @ngdoc function
|
||||
* @name controllers.function:Organizations
|
||||
@ -11,7 +11,7 @@
|
||||
*/
|
||||
|
||||
|
||||
export function OrganizationsList($stateParams, $scope, $rootScope, $location, $log, Rest, Alert, LoadBreadCrumbs, Prompt,
|
||||
export function OrganizationsList($stateParams, $scope, $rootScope, $location, $log, Rest, Alert, Prompt,
|
||||
GenerateList, OrganizationList, SearchInit, PaginateInit, ClearScope, ProcessErrors, GetBasePath, SelectionInit, Wait, Stream) {
|
||||
|
||||
ClearScope();
|
||||
@ -23,9 +23,8 @@ export function OrganizationsList($stateParams, $scope, $rootScope, $location, $
|
||||
defaultUrl = GetBasePath('organizations'),
|
||||
url;
|
||||
|
||||
generate.inject(OrganizationList, { mode: mode, scope: $scope, breadCrumbs:((mode === 'select') ? true : false) });
|
||||
generate.inject(OrganizationList, { mode: mode, scope: $scope });
|
||||
$rootScope.flashMessage = null;
|
||||
LoadBreadCrumbs();
|
||||
|
||||
if (mode === 'select') {
|
||||
url = GetBasePath('projects') + $stateParams.project_id + '/organizations/';
|
||||
@ -92,14 +91,14 @@ export function OrganizationsList($stateParams, $scope, $rootScope, $location, $
|
||||
};
|
||||
}
|
||||
|
||||
OrganizationsList.$inject = ['$stateParams', '$scope', '$rootScope', '$location', '$log', 'Rest', 'Alert', 'LoadBreadCrumbs', 'Prompt',
|
||||
OrganizationsList.$inject = ['$stateParams', '$scope', '$rootScope', '$location', '$log', 'Rest', 'Alert', 'Prompt',
|
||||
'generateList', 'OrganizationList', 'SearchInit', 'PaginateInit', 'ClearScope', 'ProcessErrors', 'GetBasePath', 'SelectionInit', 'Wait',
|
||||
'Stream'
|
||||
];
|
||||
|
||||
|
||||
export function OrganizationsAdd($scope, $rootScope, $compile, $location, $log, $stateParams, OrganizationForm,
|
||||
GenerateForm, Rest, Alert, ProcessErrors, LoadBreadCrumbs, ClearScope, GetBasePath,
|
||||
GenerateForm, Rest, Alert, ProcessErrors, ClearScope, GetBasePath,
|
||||
ReturnToCaller, Wait) {
|
||||
|
||||
ClearScope();
|
||||
@ -112,8 +111,6 @@ export function OrganizationsAdd($scope, $rootScope, $compile, $location, $log,
|
||||
generator.inject(form, { mode: 'add', related: false, scope: $scope});
|
||||
generator.reset();
|
||||
|
||||
LoadBreadCrumbs();
|
||||
|
||||
// Save
|
||||
$scope.formSave = function () {
|
||||
generator.clearApiErrors();
|
||||
@ -145,12 +142,12 @@ export function OrganizationsAdd($scope, $rootScope, $compile, $location, $log,
|
||||
}
|
||||
|
||||
OrganizationsAdd.$inject = ['$scope', '$rootScope', '$compile', '$location', '$log', '$stateParams', 'OrganizationForm',
|
||||
'GenerateForm', 'Rest', 'Alert', 'ProcessErrors', 'LoadBreadCrumbs', 'ClearScope', 'GetBasePath', 'ReturnToCaller', 'Wait'
|
||||
'GenerateForm', 'Rest', 'Alert', 'ProcessErrors', 'ClearScope', 'GetBasePath', 'ReturnToCaller', 'Wait'
|
||||
];
|
||||
|
||||
|
||||
export function OrganizationsEdit($scope, $rootScope, $compile, $location, $log, $stateParams, OrganizationForm, GenerateForm, Rest,
|
||||
Alert, ProcessErrors, LoadBreadCrumbs, RelatedSearchInit, RelatedPaginateInit, Prompt, ClearScope, GetBasePath, Wait, Stream) {
|
||||
Alert, ProcessErrors, RelatedSearchInit, RelatedPaginateInit, Prompt, ClearScope, GetBasePath, Wait, Stream) {
|
||||
|
||||
ClearScope();
|
||||
|
||||
@ -291,6 +288,6 @@ export function OrganizationsEdit($scope, $rootScope, $compile, $location, $log,
|
||||
}
|
||||
|
||||
OrganizationsEdit.$inject = ['$scope', '$rootScope', '$compile', '$location', '$log', '$stateParams', 'OrganizationForm', 'GenerateForm',
|
||||
'Rest', 'Alert', 'ProcessErrors', 'LoadBreadCrumbs', 'RelatedSearchInit', 'RelatedPaginateInit', 'Prompt', 'ClearScope', 'GetBasePath',
|
||||
'Rest', 'Alert', 'ProcessErrors', 'RelatedSearchInit', 'RelatedPaginateInit', 'Prompt', 'ClearScope', 'GetBasePath',
|
||||
'Wait', 'Stream'
|
||||
];
|
||||
|
||||
@ -39,7 +39,6 @@ export function PortalController($scope, $compile, $stateParams, $rootScope, $lo
|
||||
id : 'portal-job-templates',
|
||||
mode: 'edit',
|
||||
scope: $scope,
|
||||
breadCrumbs: false,
|
||||
searchSize: 'col-lg-6 col-md-6'
|
||||
});
|
||||
|
||||
|
||||
@ -12,7 +12,7 @@
|
||||
|
||||
|
||||
export function ProjectsList ($scope, $rootScope, $location, $log, $stateParams,
|
||||
Rest, Alert, ProjectList, GenerateList, LoadBreadCrumbs, Prompt, SearchInit,
|
||||
Rest, Alert, ProjectList, GenerateList, Prompt, SearchInit,
|
||||
PaginateInit, ReturnToCaller, ClearScope, ProcessErrors, GetBasePath,
|
||||
SelectionInit, ProjectUpdate, Refresh, Wait, Stream, GetChoices, Empty,
|
||||
Find, LogViewer, GetProjectIcon, GetProjectToolTip, $filter, $state) {
|
||||
@ -29,7 +29,7 @@ export function ProjectsList ($scope, $rootScope, $location, $log, $stateParams,
|
||||
url = (base === 'teams') ? GetBasePath('teams') + $stateParams.team_id + '/projects/' : defaultUrl,
|
||||
choiceCount = 0;
|
||||
|
||||
view.inject(list, { mode: mode, scope: $scope, breadCrumbs:(($stateParams.team_id) ? true : false)});
|
||||
view.inject(list, { mode: mode, scope: $scope });
|
||||
|
||||
$rootScope.flashMessage = null;
|
||||
$scope.projectLoading = true;
|
||||
@ -192,8 +192,6 @@ export function ProjectsList ($scope, $rootScope, $location, $log, $stateParams,
|
||||
callback: 'choicesReadyProject'
|
||||
});
|
||||
|
||||
LoadBreadCrumbs();
|
||||
|
||||
$scope.showActivity = function () {
|
||||
Stream({ scope: $scope });
|
||||
};
|
||||
@ -394,14 +392,14 @@ export function ProjectsList ($scope, $rootScope, $location, $log, $stateParams,
|
||||
}
|
||||
|
||||
ProjectsList.$inject = ['$scope', '$rootScope', '$location', '$log', '$stateParams', 'Rest', 'Alert', 'ProjectList', 'generateList',
|
||||
'LoadBreadCrumbs', 'Prompt', 'SearchInit', 'PaginateInit', 'ReturnToCaller', 'ClearScope', 'ProcessErrors', 'GetBasePath',
|
||||
'Prompt', 'SearchInit', 'PaginateInit', 'ReturnToCaller', 'ClearScope', 'ProcessErrors', 'GetBasePath',
|
||||
'SelectionInit', 'ProjectUpdate', 'Refresh', 'Wait', 'Stream', 'GetChoices', 'Empty', 'Find',
|
||||
'LogViewer', 'GetProjectIcon', 'GetProjectToolTip', '$filter', '$state'
|
||||
];
|
||||
|
||||
|
||||
export function ProjectsAdd($scope, $rootScope, $compile, $location, $log, $stateParams, ProjectsForm, GenerateForm, Rest, Alert, ProcessErrors,
|
||||
LoadBreadCrumbs, ClearScope, GetBasePath, ReturnToCaller, GetProjectPath, LookUpInit, OrganizationList,
|
||||
ClearScope, GetBasePath, ReturnToCaller, GetProjectPath, LookUpInit, OrganizationList,
|
||||
CredentialList, GetChoices, DebugForm, Wait) {
|
||||
|
||||
ClearScope();
|
||||
@ -413,9 +411,8 @@ export function ProjectsAdd($scope, $rootScope, $compile, $location, $log, $stat
|
||||
defaultUrl = GetBasePath('projects'),
|
||||
master = {};
|
||||
|
||||
generator.inject(form, { mode: 'add', related: false, scope: $scope, breadcrumbs: true });
|
||||
generator.inject(form, { mode: 'add', related: false, scope: $scope });
|
||||
generator.reset();
|
||||
LoadBreadCrumbs();
|
||||
|
||||
GetProjectPath({ scope: $scope, master: master });
|
||||
|
||||
@ -540,14 +537,14 @@ export function ProjectsAdd($scope, $rootScope, $compile, $location, $log, $stat
|
||||
}
|
||||
|
||||
ProjectsAdd.$inject = ['$scope', '$rootScope', '$compile', '$location', '$log', '$stateParams', 'ProjectsForm',
|
||||
'GenerateForm', 'Rest', 'Alert', 'ProcessErrors', 'LoadBreadCrumbs', 'ClearScope', 'GetBasePath',
|
||||
'GenerateForm', 'Rest', 'Alert', 'ProcessErrors', 'ClearScope', 'GetBasePath',
|
||||
'ReturnToCaller', 'GetProjectPath', 'LookUpInit', 'OrganizationList', 'CredentialList', 'GetChoices',
|
||||
'DebugForm', 'Wait'
|
||||
];
|
||||
|
||||
|
||||
export function ProjectsEdit($scope, $rootScope, $compile, $location, $log, $stateParams, ProjectsForm,
|
||||
GenerateForm, Rest, Alert, ProcessErrors, LoadBreadCrumbs, RelatedSearchInit, RelatedPaginateInit, Prompt,
|
||||
GenerateForm, Rest, Alert, ProcessErrors, RelatedSearchInit, RelatedPaginateInit, Prompt,
|
||||
ClearScope, GetBasePath, ReturnToCaller, GetProjectPath, Authorization, CredentialList, LookUpInit, GetChoices,
|
||||
Empty, DebugForm, Wait, Stream, SchedulesControllerInit, SchedulesListInit, SchedulesList, ProjectUpdate) {
|
||||
|
||||
@ -566,8 +563,7 @@ export function ProjectsEdit($scope, $rootScope, $compile, $location, $log, $sta
|
||||
generator.inject(form, {
|
||||
mode: 'edit',
|
||||
related: true,
|
||||
scope: $scope,
|
||||
breadcrumbs: true
|
||||
scope: $scope
|
||||
});
|
||||
generator.reset();
|
||||
|
||||
@ -645,7 +641,6 @@ export function ProjectsEdit($scope, $rootScope, $compile, $location, $log, $sta
|
||||
Rest.get({ params: { id: id } })
|
||||
.success(function (data) {
|
||||
var fld, i;
|
||||
LoadBreadCrumbs({ path: '/projects/' + id, title: data.name });
|
||||
for (fld in form.fields) {
|
||||
if (form.fields[fld].type === 'checkbox_group') {
|
||||
for (i = 0; i < form.fields[fld].fields.length; i++) {
|
||||
@ -846,7 +841,7 @@ export function ProjectsEdit($scope, $rootScope, $compile, $location, $log, $sta
|
||||
}
|
||||
|
||||
ProjectsEdit.$inject = ['$scope', '$rootScope', '$compile', '$location', '$log', '$stateParams', 'ProjectsForm', 'GenerateForm',
|
||||
'Rest', 'Alert', 'ProcessErrors', 'LoadBreadCrumbs', 'RelatedSearchInit', 'RelatedPaginateInit', 'Prompt', 'ClearScope',
|
||||
'Rest', 'Alert', 'ProcessErrors', 'RelatedSearchInit', 'RelatedPaginateInit', 'Prompt', 'ClearScope',
|
||||
'GetBasePath', 'ReturnToCaller', 'GetProjectPath', 'Authorization', 'CredentialList', 'LookUpInit', 'GetChoices', 'Empty',
|
||||
'DebugForm', 'Wait', 'Stream', 'SchedulesControllerInit', 'SchedulesListInit', 'SchedulesList', 'ProjectUpdate'
|
||||
];
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
*
|
||||
* All Rights Reserved
|
||||
*************************************************/
|
||||
|
||||
|
||||
/**
|
||||
* @ngdoc function
|
||||
* @name controllers.function:Schedules
|
||||
@ -11,8 +11,8 @@
|
||||
*/
|
||||
|
||||
|
||||
export function ScheduleEditController($scope, $compile, $location, $stateParams, SchedulesList, Rest, ProcessErrors, LoadBreadCrumbs, ReturnToCaller, ClearScope,
|
||||
GetBasePath, Wait, Breadcrumbs, Find, LoadDialogPartial, LoadSchedulesScope, GetChoices, Stream) {
|
||||
export function ScheduleEditController($scope, $compile, $location, $stateParams, SchedulesList, Rest, ProcessErrors, ReturnToCaller, ClearScope,
|
||||
GetBasePath, Wait, Find, LoadDialogPartial, LoadSchedulesScope, GetChoices, Stream) {
|
||||
|
||||
ClearScope();
|
||||
|
||||
@ -34,15 +34,6 @@ GetBasePath, Wait, Breadcrumbs, Find, LoadDialogPartial, LoadSchedulesScope, Get
|
||||
$scope.removeParentLoaded();
|
||||
}
|
||||
$scope.removeParentLoaded = $scope.$on('ParentLoaded', function() {
|
||||
// Add breadcrumbs
|
||||
LoadBreadCrumbs({
|
||||
path: $location.path().replace(/\/schedules$/,''),
|
||||
title: parentObject.name
|
||||
});
|
||||
e = angular.element(document.getElementById('breadcrumbs'));
|
||||
e.html(Breadcrumbs({ list: SchedulesList, mode: 'edit' }));
|
||||
$compile(e)($scope);
|
||||
|
||||
url += "schedules/";
|
||||
SchedulesList.well = true;
|
||||
LoadSchedulesScope({
|
||||
@ -94,5 +85,5 @@ GetBasePath, Wait, Breadcrumbs, Find, LoadDialogPartial, LoadSchedulesScope, Get
|
||||
});
|
||||
}
|
||||
|
||||
ScheduleEditController.$inject = [ '$scope', '$compile', '$location', '$stateParams', 'SchedulesList', 'Rest', 'ProcessErrors', 'LoadBreadCrumbs', 'ReturnToCaller', 'ClearScope',
|
||||
'GetBasePath', 'Wait', 'Breadcrumbs', 'Find', 'LoadDialogPartial', 'LoadSchedulesScope', 'GetChoices', 'Stream' ];
|
||||
ScheduleEditController.$inject = [ '$scope', '$compile', '$location', '$stateParams', 'SchedulesList', 'Rest', 'ProcessErrors', 'ReturnToCaller', 'ClearScope',
|
||||
'GetBasePath', 'Wait', 'Find', 'LoadDialogPartial', 'LoadSchedulesScope', 'GetChoices', 'Stream' ];
|
||||
|
||||
@ -11,7 +11,7 @@
|
||||
*/
|
||||
|
||||
|
||||
export function TeamsList($scope, $rootScope, $location, $log, $stateParams, Rest, Alert, TeamList, GenerateList, LoadBreadCrumbs,
|
||||
export function TeamsList($scope, $rootScope, $location, $log, $stateParams, Rest, Alert, TeamList, GenerateList,
|
||||
Prompt, SearchInit, PaginateInit, ReturnToCaller, ClearScope, ProcessErrors, SetTeamListeners, GetBasePath, SelectionInit, Wait,
|
||||
Stream) {
|
||||
|
||||
@ -63,8 +63,6 @@ export function TeamsList($scope, $rootScope, $location, $log, $stateParams, Res
|
||||
});
|
||||
$scope.search(list.iterator);
|
||||
|
||||
LoadBreadCrumbs();
|
||||
|
||||
$scope.showActivity = function () {
|
||||
Stream({ scope: $scope });
|
||||
};
|
||||
@ -108,13 +106,13 @@ export function TeamsList($scope, $rootScope, $location, $log, $stateParams, Res
|
||||
}
|
||||
|
||||
TeamsList.$inject = ['$scope', '$rootScope', '$location', '$log', '$stateParams', 'Rest', 'Alert', 'TeamList', 'generateList',
|
||||
'LoadBreadCrumbs', 'Prompt', 'SearchInit', 'PaginateInit', 'ReturnToCaller', 'ClearScope', 'ProcessErrors',
|
||||
'Prompt', 'SearchInit', 'PaginateInit', 'ReturnToCaller', 'ClearScope', 'ProcessErrors',
|
||||
'SetTeamListeners', 'GetBasePath', 'SelectionInit', 'Wait', 'Stream'
|
||||
];
|
||||
|
||||
|
||||
export function TeamsAdd($scope, $rootScope, $compile, $location, $log, $stateParams, TeamForm, GenerateForm,
|
||||
Rest, Alert, ProcessErrors, LoadBreadCrumbs, ReturnToCaller, ClearScope, GenerateList,
|
||||
Rest, Alert, ProcessErrors, ReturnToCaller, ClearScope, GenerateList,
|
||||
OrganizationList, SearchInit, PaginateInit, GetBasePath, LookUpInit, Wait) {
|
||||
ClearScope('htmlTemplate'); //Garbage collection. Don't leave behind any listeners/watchers from the prior
|
||||
//$scope.
|
||||
@ -127,7 +125,6 @@ export function TeamsAdd($scope, $rootScope, $compile, $location, $log, $statePa
|
||||
|
||||
$rootScope.flashMessage = null;
|
||||
generator.reset();
|
||||
LoadBreadCrumbs();
|
||||
|
||||
LookUpInit({
|
||||
scope: $scope,
|
||||
@ -169,13 +166,13 @@ export function TeamsAdd($scope, $rootScope, $compile, $location, $log, $statePa
|
||||
}
|
||||
|
||||
TeamsAdd.$inject = ['$scope', '$rootScope', '$compile', '$location', '$log', '$stateParams', 'TeamForm', 'GenerateForm',
|
||||
'Rest', 'Alert', 'ProcessErrors', 'LoadBreadCrumbs', 'ReturnToCaller', 'ClearScope', 'generateList',
|
||||
'Rest', 'Alert', 'ProcessErrors', 'ReturnToCaller', 'ClearScope', 'generateList',
|
||||
'OrganizationList', 'SearchInit', 'PaginateInit', 'GetBasePath', 'LookUpInit', 'Wait'
|
||||
];
|
||||
|
||||
|
||||
export function TeamsEdit($scope, $rootScope, $compile, $location, $log, $stateParams, TeamForm, GenerateForm, Rest, Alert, ProcessErrors,
|
||||
LoadBreadCrumbs, RelatedSearchInit, RelatedPaginateInit, ReturnToCaller, ClearScope, LookUpInit, Prompt, GetBasePath, CheckAccess,
|
||||
RelatedSearchInit, RelatedPaginateInit, ReturnToCaller, ClearScope, LookUpInit, Prompt, GetBasePath, CheckAccess,
|
||||
OrganizationList, Wait, Stream, fieldChoices, fieldLabels, permissionsSearchSelect) {
|
||||
|
||||
ClearScope();
|
||||
@ -419,6 +416,6 @@ export function TeamsEdit($scope, $rootScope, $compile, $location, $log, $stateP
|
||||
}
|
||||
|
||||
TeamsEdit.$inject = ['$scope', '$rootScope', '$compile', '$location', '$log', '$stateParams', 'TeamForm',
|
||||
'GenerateForm', 'Rest', 'Alert', 'ProcessErrors', 'LoadBreadCrumbs', 'RelatedSearchInit', 'RelatedPaginateInit',
|
||||
'GenerateForm', 'Rest', 'Alert', 'ProcessErrors', 'RelatedSearchInit', 'RelatedPaginateInit',
|
||||
'ReturnToCaller', 'ClearScope', 'LookUpInit', 'Prompt', 'GetBasePath', 'CheckAccess', 'OrganizationList', 'Wait', 'Stream', 'fieldChoices', 'fieldLabels', 'permissionsSearchSelect'
|
||||
];
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
*
|
||||
* All Rights Reserved
|
||||
*************************************************/
|
||||
|
||||
|
||||
/**
|
||||
* @ngdoc function
|
||||
* @name controllers.function:Users
|
||||
@ -11,7 +11,7 @@
|
||||
*/
|
||||
|
||||
|
||||
export function UsersList($scope, $rootScope, $location, $log, $stateParams, Rest, Alert, UserList, GenerateList, LoadBreadCrumbs,
|
||||
export function UsersList($scope, $rootScope, $location, $log, $stateParams, Rest, Alert, UserList, GenerateList,
|
||||
Prompt, SearchInit, PaginateInit, ReturnToCaller, ClearScope, ProcessErrors, GetBasePath, SelectionInit, Wait, Stream) {
|
||||
|
||||
ClearScope();
|
||||
@ -24,7 +24,7 @@ export function UsersList($scope, $rootScope, $location, $log, $stateParams, Res
|
||||
url = (base === 'organizations') ? GetBasePath('organizations') + $stateParams.organization_id + '/users/' :
|
||||
GetBasePath('teams') + $stateParams.team_id + '/users/';
|
||||
|
||||
generator.inject(UserList, { mode: mode, scope: $scope, breadCrumbs:(($stateParams.organization_id || $stateParams.team_id) ? true : false) });
|
||||
generator.inject(UserList, { mode: mode, scope: $scope });
|
||||
|
||||
$scope.selected = [];
|
||||
|
||||
@ -55,8 +55,6 @@ export function UsersList($scope, $rootScope, $location, $log, $stateParams, Res
|
||||
});
|
||||
$scope.search(list.iterator);
|
||||
|
||||
LoadBreadCrumbs();
|
||||
|
||||
$scope.showActivity = function () {
|
||||
Stream({ scope: $scope });
|
||||
};
|
||||
@ -98,13 +96,13 @@ export function UsersList($scope, $rootScope, $location, $log, $stateParams, Res
|
||||
}
|
||||
|
||||
UsersList.$inject = ['$scope', '$rootScope', '$location', '$log', '$stateParams', 'Rest', 'Alert', 'UserList', 'generateList',
|
||||
'LoadBreadCrumbs', 'Prompt', 'SearchInit', 'PaginateInit', 'ReturnToCaller', 'ClearScope', 'ProcessErrors', 'GetBasePath',
|
||||
'Prompt', 'SearchInit', 'PaginateInit', 'ReturnToCaller', 'ClearScope', 'ProcessErrors', 'GetBasePath',
|
||||
'SelectionInit', 'Wait', 'Stream'
|
||||
];
|
||||
|
||||
|
||||
export function UsersAdd($scope, $rootScope, $compile, $location, $log, $stateParams, UserForm, GenerateForm, Rest, Alert, ProcessErrors,
|
||||
LoadBreadCrumbs, ReturnToCaller, ClearScope, GetBasePath, LookUpInit, OrganizationList, ResetForm, Wait) {
|
||||
ReturnToCaller, ClearScope, GetBasePath, LookUpInit, OrganizationList, ResetForm, Wait) {
|
||||
|
||||
ClearScope();
|
||||
|
||||
@ -123,8 +121,6 @@ export function UsersAdd($scope, $rootScope, $compile, $location, $log, $statePa
|
||||
|
||||
generator.reset();
|
||||
|
||||
LoadBreadCrumbs();
|
||||
|
||||
// Configure the lookup dialog. If we're adding a user through the Organizations tab,
|
||||
// default the Organization value.
|
||||
LookUpInit({
|
||||
@ -202,13 +198,13 @@ export function UsersAdd($scope, $rootScope, $compile, $location, $log, $statePa
|
||||
}
|
||||
|
||||
UsersAdd.$inject = ['$scope', '$rootScope', '$compile', '$location', '$log', '$stateParams', 'UserForm', 'GenerateForm',
|
||||
'Rest', 'Alert', 'ProcessErrors', 'LoadBreadCrumbs', 'ReturnToCaller', 'ClearScope', 'GetBasePath', 'LookUpInit',
|
||||
'Rest', 'Alert', 'ProcessErrors', 'ReturnToCaller', 'ClearScope', 'GetBasePath', 'LookUpInit',
|
||||
'OrganizationList', 'ResetForm', 'Wait'
|
||||
];
|
||||
|
||||
|
||||
export function UsersEdit($scope, $rootScope, $compile, $location, $log, $stateParams, UserForm, GenerateForm, Rest, Alert,
|
||||
ProcessErrors, LoadBreadCrumbs, RelatedSearchInit, RelatedPaginateInit, ReturnToCaller, ClearScope, GetBasePath,
|
||||
ProcessErrors, RelatedSearchInit, RelatedPaginateInit, ReturnToCaller, ClearScope, GetBasePath,
|
||||
Prompt, CheckAccess, ResetForm, Wait, Stream, fieldChoices, fieldLabels, permissionsSearchSelect) {
|
||||
|
||||
ClearScope();
|
||||
@ -528,6 +524,6 @@ export function UsersEdit($scope, $rootScope, $compile, $location, $log, $stateP
|
||||
}
|
||||
|
||||
UsersEdit.$inject = ['$scope', '$rootScope', '$compile', '$location', '$log', '$stateParams', 'UserForm', 'GenerateForm',
|
||||
'Rest', 'Alert', 'ProcessErrors', 'LoadBreadCrumbs', 'RelatedSearchInit', 'RelatedPaginateInit', 'ReturnToCaller', 'ClearScope',
|
||||
'Rest', 'Alert', 'ProcessErrors', 'RelatedSearchInit', 'RelatedPaginateInit', 'ReturnToCaller', 'ClearScope',
|
||||
'GetBasePath', 'Prompt', 'CheckAccess', 'ResetForm', 'Wait', 'Stream', 'fieldChoices', 'fieldLabels', 'permissionsSearchSelect'
|
||||
];
|
||||
|
||||
@ -459,7 +459,6 @@ angular.module('GroupsHelper', [ 'RestServices', 'Utilities', listGenerator.name
|
||||
GenerateList.inject(list, {
|
||||
mode: 'edit',
|
||||
id: 'schedules-list',
|
||||
breadCrumbs: false,
|
||||
searchSize: 'col-lg-6 col-md-5 col-sm-5 col-xs-5',
|
||||
scope: schedule_scope
|
||||
});
|
||||
@ -751,9 +750,9 @@ angular.module('GroupsHelper', [ 'RestServices', 'Utilities', listGenerator.name
|
||||
$compile(elem)(modal_scope);
|
||||
|
||||
var form_scope =
|
||||
generator.inject(GroupForm, { mode: mode, id: 'properties-tab', breadCrumbs: false, related: false, scope: properties_scope });
|
||||
generator.inject(GroupForm, { mode: mode, id: 'properties-tab', related: false, scope: properties_scope });
|
||||
var source_form_scope =
|
||||
generator.inject(SourceForm, { mode: mode, id: 'sources-tab', breadCrumbs: false, related: false, scope: sources_scope });
|
||||
generator.inject(SourceForm, { mode: mode, id: 'sources-tab', related: false, scope: sources_scope });
|
||||
|
||||
//generator.reset();
|
||||
|
||||
@ -2026,7 +2025,6 @@ angular.module('GroupsHelper', [ 'RestServices', 'Utilities', listGenerator.name
|
||||
scope = generator.inject(form, {
|
||||
mode: 'edit',
|
||||
id: 'form-container',
|
||||
breadCrumbs: false,
|
||||
related: false
|
||||
});
|
||||
|
||||
|
||||
@ -240,7 +240,7 @@ angular.module('HostsHelper', [ 'RestServices', 'Utilities', listGenerator.name,
|
||||
generator = GenerateList;
|
||||
|
||||
// Inject the list html
|
||||
generator.inject(InventoryHosts, { scope: host_scope, mode: 'edit', id: 'hosts-container', breadCrumbs: false, searchSize: 'col-lg-6 col-md-6 col-sm-6' });
|
||||
generator.inject(InventoryHosts, { scope: host_scope, mode: 'edit', id: 'hosts-container', searchSize: 'col-lg-6 col-md-6 col-sm-6' });
|
||||
|
||||
// Load data
|
||||
HostsReload({ scope: host_scope, group_id: group_id, inventory_id: inventory_id, parent_scope: group_scope, pageSize: pageSize });
|
||||
@ -308,7 +308,6 @@ angular.module('HostsHelper', [ 'RestServices', 'Utilities', listGenerator.name,
|
||||
scope = generator.inject(list, {
|
||||
id: 'form-modal-body',
|
||||
mode: 'select',
|
||||
breadCrumbs: false,
|
||||
selectButton: false
|
||||
});
|
||||
|
||||
@ -470,7 +469,7 @@ angular.module('HostsHelper', [ 'RestServices', 'Utilities', listGenerator.name,
|
||||
buttons, url, form_scope;
|
||||
|
||||
form_scope =
|
||||
generator.inject(HostForm, { mode: 'edit', id: 'host-modal-dialog', breadCrumbs: false, related: false, scope: scope });
|
||||
generator.inject(HostForm, { mode: 'edit', id: 'host-modal-dialog', related: false, scope: scope });
|
||||
generator.reset();
|
||||
|
||||
buttons = [{
|
||||
|
||||
@ -18,9 +18,9 @@ angular.module('JobTemplatesHelper', ['Utilities'])
|
||||
*
|
||||
*/
|
||||
|
||||
.factory('CallbackHelpInit', ['$location', 'GetBasePath', 'Rest', 'JobTemplateForm', 'GenerateForm', '$stateParams', 'LoadBreadCrumbs', 'ProcessErrors', 'ParseTypeChange',
|
||||
.factory('CallbackHelpInit', ['$location', 'GetBasePath', 'Rest', 'JobTemplateForm', 'GenerateForm', '$stateParams', 'ProcessErrors', 'ParseTypeChange',
|
||||
'ParseVariableString', 'Empty', 'LookUpInit', 'InventoryList', 'CredentialList','ProjectList', 'RelatedSearchInit', 'RelatedPaginateInit', 'Wait',
|
||||
function($location, GetBasePath, Rest, JobTemplateForm, GenerateForm, $stateParams, LoadBreadCrumbs, ProcessErrors,ParseTypeChange,
|
||||
function($location, GetBasePath, Rest, JobTemplateForm, GenerateForm, $stateParams, ProcessErrors,ParseTypeChange,
|
||||
ParseVariableString, Empty, LookUpInit, InventoryList, CredentialList, ProjectList, RelatedSearchInit, RelatedPaginateInit, Wait) {
|
||||
return function(params) {
|
||||
|
||||
@ -77,7 +77,6 @@ angular.module('JobTemplatesHelper', ['Utilities'])
|
||||
Rest.get()
|
||||
.success(function (data) {
|
||||
var fld, i;
|
||||
LoadBreadCrumbs({ path: '/job_templates/' + id, title: data.name });
|
||||
for (fld in form.fields) {
|
||||
if (fld !== 'variables' && data[fld] !== null && data[fld] !== undefined) {
|
||||
if (form.fields[fld].type === 'select') {
|
||||
|
||||
@ -193,7 +193,7 @@ export default
|
||||
|
||||
$('#inventory-modal-container').empty().append(html);
|
||||
|
||||
scope = generator.inject(form, { mode: 'edit', id: 'form-container', breadCrumbs: false, related: false });
|
||||
scope = generator.inject(form, { mode: 'edit', id: 'form-container', related: false });
|
||||
|
||||
// Set modal dimensions based on viewport width
|
||||
ww = $(document).width();
|
||||
@ -395,7 +395,6 @@ export default
|
||||
GenerateList.inject(list, {
|
||||
mode: 'edit',
|
||||
id: id,
|
||||
breadCrumbs: false,
|
||||
scope: scope,
|
||||
showSearch: false
|
||||
});
|
||||
|
||||
@ -144,7 +144,7 @@ export default
|
||||
html += "</div>";
|
||||
|
||||
if (IsAdmin()) {
|
||||
html += GenerateForm.buildHTML(LicenseUpdateForm, { mode: 'edit', showButtons:((includeFormButton) ? true : false), breadCrumbs: false });
|
||||
html += GenerateForm.buildHTML(LicenseUpdateForm, { mode: 'edit', showButtons:((includeFormButton) ? true : false) });
|
||||
}
|
||||
|
||||
html += "</div>";
|
||||
|
||||
@ -707,7 +707,6 @@ export default
|
||||
GenerateList.inject(list, {
|
||||
mode: 'edit',
|
||||
id: id,
|
||||
breadCrumbs: false,
|
||||
scope: scope,
|
||||
searchSize: (searchSize) ? searchSize : 'col-lg-6 col-md-6 col-sm-6 col-xs-12',
|
||||
showSearch: true
|
||||
|
||||
@ -106,7 +106,6 @@ export default
|
||||
showButtons: false,
|
||||
showActions: false,
|
||||
id: 'inventory-edit-modal-dialog',
|
||||
breadCrumbs: false,
|
||||
related: false,
|
||||
scope: scope
|
||||
});
|
||||
|
||||
@ -1,12 +1,3 @@
|
||||
<breadcrumbs>
|
||||
<breadcrumb path="/setup" title="Setup"></breadcrumb>
|
||||
<breadcrumb path="/inventory_scripts" title="Inventory Scripts"></breadcrumb>
|
||||
<breadcrumb
|
||||
path="/inventory_scripts/add"
|
||||
title="Create Inventory Script">
|
||||
</breadcrumb>
|
||||
</breadcrumbs>
|
||||
|
||||
<div class="tab-pane" id="inventory_scripts_add">
|
||||
<div ng-cloak id="htmlTemplate"></div>
|
||||
</div>
|
||||
|
||||
@ -27,7 +27,6 @@ export default
|
||||
generator.inject(form, {
|
||||
mode: 'edit' ,
|
||||
scope:$scope,
|
||||
breadCrumbs: true,
|
||||
related: false,
|
||||
activityStream: false
|
||||
});
|
||||
|
||||
@ -1,9 +1,3 @@
|
||||
<breadcrumbs>
|
||||
<breadcrumb path="/setup" title="Setup"></breadcrumb>
|
||||
<breadcrumb path="/inventory_scripts" title="Inventory Scripts"></breadcrumb>
|
||||
<breadcrumb path="/inventory_scripts/{{inventory_script.id}}" title="{{inventory_script.name}}" current="true"></breadcrumb>
|
||||
</breadcrumbs>
|
||||
|
||||
<div class="tab-pane" id="inventory_scripts_edit">
|
||||
<div ng-cloak id="htmlTemplate"></div>
|
||||
</div>
|
||||
|
||||
@ -1,8 +1,3 @@
|
||||
<breadcrumbs>
|
||||
<breadcrumb path="/setup" title="Setup"></breadcrumb>
|
||||
<breadcrumb path="/inventory_scripts" title="Inventory Scripts"></breadcrumb>
|
||||
</breadcrumbs>
|
||||
|
||||
<div class="tab-pane" id="inventory_scripts">
|
||||
<div ng-cloak id="htmlTemplate"></div>
|
||||
</div>
|
||||
|
||||
@ -77,7 +77,7 @@ export default
|
||||
}
|
||||
scope.removeGenerateForm = scope.$on('GenerateForm', function() {
|
||||
tmpVar = scope.mode;
|
||||
GenerateForm.inject(form, { id: 'question_'+index, mode: 'edit' , related: false, scope:scope, breadCrumbs: false});
|
||||
GenerateForm.inject(form, { id: 'question_'+index, mode: 'edit' , related: false, scope:scope });
|
||||
scope.mode = tmpVar;
|
||||
scope.$emit('FillQuestionForm');
|
||||
});
|
||||
|
||||
@ -19,7 +19,6 @@ export default
|
||||
name: 'survey_question',
|
||||
well: true,
|
||||
twoColumns: true,
|
||||
breadcrumbs: false,
|
||||
|
||||
fields: {
|
||||
question_name: {
|
||||
|
||||
@ -63,7 +63,7 @@ export default
|
||||
|
||||
scope.addQuestion = function(){
|
||||
var tmpMode = scope.mode;
|
||||
GenerateForm.inject(form, { id:'new_question', mode: 'add' , scope: scope, related: false, breadCrumbs: false});
|
||||
GenerateForm.inject(form, { id:'new_question', mode: 'add' , scope: scope, related: false});
|
||||
scope.mode = tmpMode;
|
||||
scope.required = true; //set the required checkbox to true via the ngmodel attached to scope.required.
|
||||
scope.text_min = null;
|
||||
|
||||
@ -1,8 +1,3 @@
|
||||
<breadcrumbs>
|
||||
<breadcrumb path="/setup" title="Setup"></breadcrumb>
|
||||
<breadcrumb path="/management_jobs" title="Management Jobs" current='true'></breadcrumb>
|
||||
</breadcrumbs>
|
||||
|
||||
<div class="tab-pane" id="management_jobs">
|
||||
<div ng-cloak id="htmlTemplate"></div>
|
||||
</div>
|
||||
|
||||
@ -1,9 +1,3 @@
|
||||
<breadcrumbs>
|
||||
<breadcrumb path="/setup" title="Setup"></breadcrumb>
|
||||
<breadcrumb path="/management_jobs" title="{{management_job.name}}"></breadcrumb>
|
||||
<breadcrumb path="/management_jobs/{{management_job.id}}" title="Schedules" current='true'></breadcrumb>
|
||||
</breadcrumbs>
|
||||
|
||||
<div class="tab-pane" id="management_jobs_schedule">
|
||||
<div ng-cloak id="htmlTemplate"></div>
|
||||
</div>
|
||||
|
||||
@ -1,18 +1,3 @@
|
||||
<breadcrumbs>
|
||||
<breadcrumb path="/setup" title="Setup"></breadcrumb>
|
||||
<breadcrumb path="/credentials" title="Credentials"></breadcrumb>
|
||||
<breadcrumb
|
||||
path="/credentials/add"
|
||||
title="Create Credential"
|
||||
ng-if="mode == 'add'">
|
||||
</breadcrumb>
|
||||
<breadcrumb
|
||||
path="/credentials/{{id}}"
|
||||
title="{{credential_name}}"
|
||||
ng-if="id">
|
||||
</breadcrumb>
|
||||
</breadcrumbs>
|
||||
|
||||
<div class="tab-pane" id="credentials">
|
||||
<div ng-cloak id="htmlTemplate"></div>
|
||||
</div>
|
||||
|
||||
@ -1,12 +1,6 @@
|
||||
<div class="tab-pane" id="inventory_edit">
|
||||
<div ng-cloak id="htmlTemplate">
|
||||
|
||||
<ul class="ansible-breadcrumb" id="#breadcrumbs">
|
||||
<li><a href="#/inventories">Inventories</a></li>
|
||||
<!-- <li><a href = "#/inventories/{{inventory.id}}">{{inventory.name}}</a><li> -->
|
||||
<li ng-repeat="group_breadcrumb in group_breadcrumbs" ng-class="group_breadcrumb.active_class"><a href="" ng-click="breadcrumbGroupSelect(group_breadcrumb.id)">{{ group_breadcrumb.name }}</a></li>
|
||||
</ul>
|
||||
|
||||
<div class="row">
|
||||
<div id="groups-container" class="col-lg-6">
|
||||
<div id="group-list-container"></div>
|
||||
|
||||
@ -1,15 +1,6 @@
|
||||
<div class="tab-pane" id="jobs-detail">
|
||||
<div ng-cloak id="htmlTemplate">
|
||||
|
||||
<div class="row">
|
||||
<div id="breadcrumb-container" class="col-md-12" style="position: relative;">
|
||||
<ul class="ansible-breadcrumb" id="breadcrumb-list">
|
||||
<li><a href="/#/jobs">Jobs</a></li>
|
||||
<li class="active"><a href="">{{ job_id }} - {{ job.name }}</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row" style="position: relative;">
|
||||
<div id="job-detail-container">
|
||||
<div class="job_well">
|
||||
|
||||
@ -5,14 +5,7 @@
|
||||
<div class="StandardOut-heading">
|
||||
|
||||
<div class="row StandardOut-breadcrumbs">
|
||||
<div id="breadcrumb-container" class="col-md-6" style="position: relative;">
|
||||
<ul class="ansible-breadcrumb" id="breadcrumb-list">
|
||||
<li><a href="/#/jobs">Jobs</a></li>
|
||||
<li><a href="/#/jobs/{{ job.id }}">{{ job.id }} - {{ job.name }}</a></li>
|
||||
<li class="active"><a href="">Standard Out</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div id="home-list-actions" class="list-actions pull-right col-md-6">
|
||||
<div id="home-list-actions" class="list-actions pull-right col-md-12">
|
||||
<button type="button" class="btn btn-xs btn-primary ng-hide" ng-click="refresh()" id="refresh_btn" aw-tool-tip="Refresh the page" data-placement="top" ng-show="socketStatus == 'error'" data-original-title="" title=""><i class="fa fa-refresh fa-lg"></i> </button></div>
|
||||
</div>
|
||||
<div class="row StandardOut-form">
|
||||
|
||||
@ -3,19 +3,8 @@
|
||||
<div class="StandardOut">
|
||||
<div class="row StandardOut-heading">
|
||||
<div class="row StandardOut-breadcrumbs">
|
||||
<div id="breadcrumb-container" class="col-md-6"
|
||||
style="position: relative;">
|
||||
<ul class="ansible-breadcrumb" id="breadcrumb-list">
|
||||
<li><a href="/#/jobs">Jobs</a></li>
|
||||
<li class="active">
|
||||
<a href="/#/ad_hoc_commands/{{ job.id }}">
|
||||
{{ job.id }} - {{ job.name }}
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div id="home-list-actions"
|
||||
class="list-actions pull-right col-md-6">
|
||||
class="list-actions pull-right col-md-12">
|
||||
<button type="button" class="btn btn-xs btn-primary ng-hide"
|
||||
ng-click="refresh()" id="refresh_btn"
|
||||
aw-tool-tip="Refresh the page"
|
||||
|
||||
@ -1,8 +1,3 @@
|
||||
<breadcrumbs>
|
||||
<breadcrumb path="/setup" title="Setup"></breadcrumb>
|
||||
<breadcrumb path="/license" title="License"></breadcrumb>
|
||||
</breadcrumb>
|
||||
</breadcrumbs>
|
||||
<div class="tab-pane" id="license-partial">
|
||||
<div ng-cloak id="htmlTemplate"></div>
|
||||
<div id="license-modal-dialog"></div>
|
||||
|
||||
@ -1,18 +1,3 @@
|
||||
<breadcrumbs>
|
||||
<breadcrumb path="/setup" title="Setup"></breadcrumb>
|
||||
<breadcrumb path="/organizations" title="Organizations"></breadcrumb>
|
||||
<breadcrumb
|
||||
path="/organizations/add"
|
||||
title="Create Organization"
|
||||
ng-if="mode == 'add'">
|
||||
</breadcrumb>
|
||||
<breadcrumb
|
||||
path="/organizations/{{organization_id}}"
|
||||
title="{{organization_name}}"
|
||||
ng-if="organization_id">
|
||||
</breadcrumb>
|
||||
</breadcrumbs>
|
||||
|
||||
<div class="tab-pane" id="organizations">
|
||||
<div ng-cloak id="htmlTemplate"></div>
|
||||
</div>
|
||||
|
||||
@ -1,11 +1,7 @@
|
||||
<div class="row">
|
||||
<div class="col-lg-12" id="breadcrumbs"></div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<div id="schedule-list-target"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div ng-include="'/static/partials/schedule_dialog.html'"></div>
|
||||
<div ng-include="'/static/partials/schedule_dialog.html'"></div>
|
||||
|
||||
@ -1,18 +1,3 @@
|
||||
<breadcrumbs>
|
||||
<breadcrumb path="/setup" title="Setup"></breadcrumb>
|
||||
<breadcrumb path="/teams" title="Teams"></breadcrumb>
|
||||
<breadcrumb
|
||||
path="/teams/add"
|
||||
title="Create Team"
|
||||
ng-if="mode == 'add'">
|
||||
</breadcrumb>
|
||||
<breadcrumb
|
||||
path="/teams/{{team_id}}"
|
||||
title="{{team_name}}"
|
||||
ng-if="team_id">
|
||||
</breadcrumb>
|
||||
</breadcrumbs>
|
||||
|
||||
<div class="tab-pane" id="teams">
|
||||
<div ng-cloak id="htmlTemplate"></div>
|
||||
</div>
|
||||
|
||||
@ -1,18 +1,3 @@
|
||||
<breadcrumbs>
|
||||
<breadcrumb path="/setup" title="Setup"></breadcrumb>
|
||||
<breadcrumb path="/users" title="Users"></breadcrumb>
|
||||
<breadcrumb
|
||||
path="/users/add"
|
||||
title="Create User"
|
||||
ng-if="mode == 'add'">
|
||||
</breadcrumb>
|
||||
<breadcrumb
|
||||
path="/users/{{user_id}}"
|
||||
title="{{username_title}}"
|
||||
ng-if="user_id">
|
||||
</breadcrumb>
|
||||
</breadcrumbs>
|
||||
|
||||
<div class="tab-pane" id="users">
|
||||
<div ng-cloak id="htmlTemplate"></div>
|
||||
</div>
|
||||
|
||||
@ -10,8 +10,8 @@
|
||||
* @description This controller for permissions add
|
||||
*/
|
||||
export default
|
||||
['$scope', '$rootScope', '$compile', '$location', '$log', '$stateParams', 'permissionsForm', 'GenerateForm', 'Rest', 'Alert', 'ProcessErrors', 'LoadBreadCrumbs', 'ClearScope', 'GetBasePath', 'ReturnToCaller', 'InventoryList', 'ProjectList', 'LookUpInit', 'CheckAccess', 'Wait', 'permissionsCategoryChange', 'fieldChoices', 'fieldLabels',
|
||||
function($scope, $rootScope, $compile, $location, $log, $stateParams, permissionsForm, GenerateForm, Rest, Alert, ProcessErrors, LoadBreadCrumbs, ClearScope, GetBasePath, ReturnToCaller, InventoryList, ProjectList, LookUpInit, CheckAccess, Wait, permissionsCategoryChange, fieldChoices, fieldLabels) {
|
||||
['$scope', '$rootScope', '$compile', '$location', '$log', '$stateParams', 'permissionsForm', 'GenerateForm', 'Rest', 'Alert', 'ProcessErrors', 'ClearScope', 'GetBasePath', 'ReturnToCaller', 'InventoryList', 'ProjectList', 'LookUpInit', 'CheckAccess', 'Wait', 'permissionsCategoryChange', 'fieldChoices', 'fieldLabels',
|
||||
function($scope, $rootScope, $compile, $location, $log, $stateParams, permissionsForm, GenerateForm, Rest, Alert, ProcessErrors, ClearScope, GetBasePath, ReturnToCaller, InventoryList, ProjectList, LookUpInit, CheckAccess, Wait, permissionsCategoryChange, fieldChoices, fieldLabels) {
|
||||
|
||||
ClearScope();
|
||||
|
||||
@ -41,7 +41,6 @@ export default
|
||||
generator.inject(form, { mode: 'add', related: false, scope: $scope });
|
||||
CheckAccess({ scope: $scope });
|
||||
generator.reset();
|
||||
LoadBreadCrumbs();
|
||||
|
||||
$scope.inventoryrequired = true;
|
||||
$scope.projectrequired = false;
|
||||
|
||||
@ -10,8 +10,8 @@
|
||||
* @description This controller for permissions edit
|
||||
*/
|
||||
export default
|
||||
['$scope', '$rootScope', '$compile', '$location', '$log', '$stateParams', 'permissionsForm', 'GenerateForm', 'Rest', 'Alert', 'ProcessErrors', 'LoadBreadCrumbs', 'ReturnToCaller', 'ClearScope', 'Prompt', 'GetBasePath', 'InventoryList', 'ProjectList', 'LookUpInit', 'CheckAccess', 'Wait', 'permissionsCategoryChange', 'fieldChoices', 'fieldLabels',
|
||||
function($scope, $rootScope, $compile, $location, $log, $stateParams, permissionsForm, GenerateForm, Rest, Alert, ProcessErrors, LoadBreadCrumbs, ReturnToCaller, ClearScope, Prompt, GetBasePath, InventoryList, ProjectList, LookUpInit, CheckAccess, Wait, permissionsCategoryChange, fieldChoices, fieldLabels) {
|
||||
['$scope', '$rootScope', '$compile', '$location', '$log', '$stateParams', 'permissionsForm', 'GenerateForm', 'Rest', 'Alert', 'ProcessErrors', 'ReturnToCaller', 'ClearScope', 'Prompt', 'GetBasePath', 'InventoryList', 'ProjectList', 'LookUpInit', 'CheckAccess', 'Wait', 'permissionsCategoryChange', 'fieldChoices', 'fieldLabels',
|
||||
function($scope, $rootScope, $compile, $location, $log, $stateParams, permissionsForm, GenerateForm, Rest, Alert, ProcessErrors, ReturnToCaller, ClearScope, Prompt, GetBasePath, InventoryList, ProjectList, LookUpInit, CheckAccess, Wait, permissionsCategoryChange, fieldChoices, fieldLabels) {
|
||||
|
||||
ClearScope();
|
||||
|
||||
@ -74,7 +74,6 @@ export default
|
||||
Rest.get()
|
||||
.success(function (data) {
|
||||
var fld, sourceModel, sourceField;
|
||||
LoadBreadCrumbs({ path: '/users/' + base_id + '/permissions/' + id, title: data.name });
|
||||
for (fld in form.fields) {
|
||||
if (data[fld]) {
|
||||
if (form.fields[fld].sourceModel) {
|
||||
|
||||
@ -12,8 +12,8 @@
|
||||
|
||||
|
||||
export default
|
||||
['$scope', '$rootScope', '$location', '$log', '$stateParams', 'Rest', 'Alert', 'permissionsList', 'generateList', 'LoadBreadCrumbs', 'Prompt', 'SearchInit', 'PaginateInit', 'ReturnToCaller', 'ClearScope', 'ProcessErrors', 'GetBasePath', 'CheckAccess', 'Wait', 'fieldChoices', 'fieldLabels', 'permissionsSearchSelect',
|
||||
function ($scope, $rootScope, $location, $log, $stateParams, Rest, Alert, permissionsList, GenerateList, LoadBreadCrumbs, Prompt, SearchInit, PaginateInit, ReturnToCaller, ClearScope, ProcessErrors, GetBasePath, CheckAccess, Wait, fieldChoices, fieldLabels, permissionsSearchSelect) {
|
||||
['$scope', '$rootScope', '$location', '$log', '$stateParams', 'Rest', 'Alert', 'permissionsList', 'generateList', 'Prompt', 'SearchInit', 'PaginateInit', 'ReturnToCaller', 'ClearScope', 'ProcessErrors', 'GetBasePath', 'CheckAccess', 'Wait', 'fieldChoices', 'fieldLabels', 'permissionsSearchSelect',
|
||||
function ($scope, $rootScope, $location, $log, $stateParams, Rest, Alert, permissionsList, GenerateList, Prompt, SearchInit, PaginateInit, ReturnToCaller, ClearScope, ProcessErrors, GetBasePath, CheckAccess, Wait, fieldChoices, fieldLabels, permissionsSearchSelect) {
|
||||
|
||||
ClearScope();
|
||||
|
||||
@ -53,7 +53,7 @@ export default
|
||||
permissionsSearchSelect({
|
||||
choices: choices
|
||||
});
|
||||
generator.inject(list, { mode: 'edit', scope: $scope, breadCrumbs: true });
|
||||
generator.inject(list, { mode: 'edit', scope: $scope });
|
||||
});
|
||||
|
||||
defaultUrl += ($stateParams.user_id !== undefined) ? $stateParams.user_id : $stateParams.team_id;
|
||||
@ -87,8 +87,6 @@ export default
|
||||
});
|
||||
$scope.search(list.iterator);
|
||||
|
||||
LoadBreadCrumbs();
|
||||
|
||||
$scope.addPermission = function () {
|
||||
if ($scope.PermissionAddAllowed) {
|
||||
$location.path($location.path() + '/add');
|
||||
|
||||
@ -1,18 +1,3 @@
|
||||
<breadcrumbs>
|
||||
<breadcrumb path="/setup" title="Setup"></breadcrumb>
|
||||
<breadcrumb path="/teams" title="Teams"></breadcrumb>
|
||||
<breadcrumb
|
||||
path="/teams/add"
|
||||
title="Create Team"
|
||||
ng-if="mode == 'add'">
|
||||
</breadcrumb>
|
||||
<breadcrumb
|
||||
path="/teams/{{team_id}}"
|
||||
title="{{team_name}}"
|
||||
ng-if="team_id">
|
||||
</breadcrumb>
|
||||
</breadcrumbs>
|
||||
|
||||
<div class="tab-pane" id="teams">
|
||||
<div ng-cloak id="htmlTemplate"></div>
|
||||
</div>
|
||||
|
||||
@ -1,18 +1,3 @@
|
||||
<breadcrumbs>
|
||||
<breadcrumb path="/setup" title="Setup"></breadcrumb>
|
||||
<breadcrumb path="/users" title="Users"></breadcrumb>
|
||||
<breadcrumb
|
||||
path="/users/add"
|
||||
title="Create User"
|
||||
ng-if="mode == 'add'">
|
||||
</breadcrumb>
|
||||
<breadcrumb
|
||||
path="/users/{{user_id}}"
|
||||
title="{{username_title}}"
|
||||
ng-if="user_id">
|
||||
</breadcrumb>
|
||||
</breadcrumbs>
|
||||
|
||||
<div class="tab-pane" id="users">
|
||||
<div ng-cloak id="htmlTemplate"></div>
|
||||
</div>
|
||||
|
||||
@ -273,90 +273,6 @@ angular.module('Utilities', ['RestServices', 'Utilities', 'sanitizeFilter'])
|
||||
}
|
||||
])
|
||||
|
||||
|
||||
.factory('LoadBreadCrumbs', ['$rootScope', '$stateParams', '$location', 'Empty',
|
||||
function ($rootScope, $stateParams, $location, Empty) {
|
||||
return function (crumb) {
|
||||
|
||||
var title, found, j, i, paths, ppath, parent, child;
|
||||
|
||||
function toUppercase(a) {
|
||||
return a.toUpperCase();
|
||||
}
|
||||
|
||||
function singular(a) {
|
||||
return (a === 'ies') ? 'y' : '';
|
||||
}
|
||||
|
||||
//Keep a list of path/title mappings. When we see /organizations/XX in the path, for example,
|
||||
//we'll know the actual organization name it maps to.
|
||||
if (!Empty(crumb)) {
|
||||
found = false;
|
||||
//crumb.title = crumb.title.charAt(0).toUpperCase() + crumb.title.slice(1);
|
||||
for (i = 0; i < $rootScope.crumbCache.length; i++) {
|
||||
if ($rootScope.crumbCache[i].path === crumb.path) {
|
||||
found = true;
|
||||
$rootScope.crumbCache[i] = crumb;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!found) {
|
||||
$rootScope.crumbCache.push(crumb);
|
||||
}
|
||||
}
|
||||
paths = $location.path().replace(/^\//, '').split('/');
|
||||
ppath = '';
|
||||
$rootScope.breadcrumbs = [];
|
||||
if (paths.length > 1) {
|
||||
for (i = 0; i < paths.length - 1; i++) {
|
||||
if (i > 0 && paths[i].match(/\d+/)) {
|
||||
parent = paths[i - 1];
|
||||
child = parent.replace(/(ies$|s$)/, singular);
|
||||
child = child.charAt(0).toUpperCase() + child.slice(1);
|
||||
// find the correct title
|
||||
found = false;
|
||||
if ($rootScope.crumbCache) {
|
||||
for (j = 0; j < $rootScope.crumbCache.length; j++) {
|
||||
if ($rootScope.crumbCache[j].path === '/' + parent + '/' + paths[i]) {
|
||||
child = $rootScope.crumbCache[j].title;
|
||||
found = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (found && $rootScope.crumbCache[j].altPath !== undefined) {
|
||||
// Use altPath to override default path construction
|
||||
$rootScope.breadcrumbs.push({
|
||||
title: child,
|
||||
path: $rootScope.crumbCache[j].altPath
|
||||
});
|
||||
} else {
|
||||
$rootScope.breadcrumbs.push({
|
||||
title: child,
|
||||
path: ppath + '/' + paths[i]
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
} else {
|
||||
//if (/_/.test(paths[i])) {
|
||||
// replace '_' with space and uppercase each word
|
||||
|
||||
//}
|
||||
//title = paths[i].charAt(0).toUpperCase() + paths[i].slice(1);
|
||||
title = paths[i].replace(/(?:^|_)\S/g, toUppercase).replace(/_/g, ' ');
|
||||
$rootScope.breadcrumbs.push({
|
||||
title: title,
|
||||
path: ppath + '/' + paths[i]
|
||||
});
|
||||
}
|
||||
ppath += '/' + paths[i];
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
])
|
||||
|
||||
/**
|
||||
* @ngdoc method
|
||||
* @name shared.function:Utilities#HelpDialog
|
||||
|
||||
@ -1,32 +0,0 @@
|
||||
/*************************************************
|
||||
* Copyright (c) 2015 Ansible, Inc.
|
||||
*
|
||||
* All Rights Reserved
|
||||
*************************************************/
|
||||
|
||||
export default function() {
|
||||
|
||||
return {
|
||||
restrict: 'E',
|
||||
require: '^breadcrumbs',
|
||||
transclude: true,
|
||||
scope: {
|
||||
path: '@',
|
||||
title: '@',
|
||||
current: '@'
|
||||
},
|
||||
link: function(scope, element, attrs, parentController) {
|
||||
var breadcrumb =
|
||||
parentController.addBreadcrumb(scope.title, scope.path, scope.current);
|
||||
|
||||
scope.$watch('title', function(value) {
|
||||
breadcrumb.title = value;
|
||||
|
||||
if (breadcrumb.isCurrent && value) {
|
||||
parentController.setHidden(false);
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
@ -1,41 +0,0 @@
|
||||
/*************************************************
|
||||
* Copyright (c) 2015 Ansible, Inc.
|
||||
*
|
||||
* All Rights Reserved
|
||||
*************************************************/
|
||||
|
||||
export default
|
||||
[ '$scope',
|
||||
'$rootScope',
|
||||
function($scope, $rootScope) {
|
||||
|
||||
$scope.breadcrumbs = [];
|
||||
|
||||
this.addBreadcrumb = function(title, path, isCurrent) {
|
||||
var breadcrumb =
|
||||
{ title: title,
|
||||
path: path,
|
||||
isCurrent: isCurrent
|
||||
};
|
||||
|
||||
if ($rootScope.enteredPath === path) {
|
||||
breadcrumb.isCurrent = true;
|
||||
}
|
||||
|
||||
$scope.breadcrumbs =
|
||||
$scope.breadcrumbs.concat(breadcrumb);
|
||||
|
||||
return breadcrumb;
|
||||
};
|
||||
|
||||
this.setHidden = function(hidden) {
|
||||
|
||||
if (angular.isUndefined(hidden)) {
|
||||
$scope.isHidden = true;
|
||||
} else {
|
||||
$scope.isHidden = hidden;
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
}];
|
||||
@ -1,41 +0,0 @@
|
||||
/*************************************************
|
||||
* Copyright (c) 2015 Ansible, Inc.
|
||||
*
|
||||
* All Rights Reserved
|
||||
*************************************************/
|
||||
|
||||
/* jshint unused: vars */
|
||||
|
||||
import controller from './breadcrumbs.controller';
|
||||
import '../generator-helpers';
|
||||
|
||||
export default
|
||||
[ 'templateUrl',
|
||||
function(templateUrl) {
|
||||
|
||||
return {
|
||||
restrict: 'E',
|
||||
controller: controller,
|
||||
transclude: true,
|
||||
templateUrl: templateUrl('shared/breadcrumbs/breadcrumbs'),
|
||||
scope: {
|
||||
},
|
||||
link: function(scope, element, attrs, controller) {
|
||||
// make breadcrumbs hidden until the current
|
||||
// breadcrumb has a title; this avoids
|
||||
// ugly rendering when an object's title
|
||||
// is fetched via ajax
|
||||
//
|
||||
controller.setHidden();
|
||||
|
||||
scope.$watch('isHidden', function(value) {
|
||||
if (value) {
|
||||
element.hide();
|
||||
} else {
|
||||
element.show();
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
}
|
||||
];
|
||||
@ -1,9 +0,0 @@
|
||||
<ul class="ansible-breadcrumb" id="breadcrumb-list">
|
||||
<li ng-repeat="crumb in breadcrumbs" ng-class="{active: crumb.isCurrent}">
|
||||
<a href="{{'#' + crumb.path }}">
|
||||
{{crumb.title}}
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
<!-- empty trasncluded div required to make child directives link up -->
|
||||
<div ng-transclude></div>
|
||||
@ -1,13 +0,0 @@
|
||||
/*************************************************
|
||||
* Copyright (c) 2015 Ansible, Inc.
|
||||
*
|
||||
* All Rights Reserved
|
||||
*************************************************/
|
||||
|
||||
import breadcrumbs from './breadcrumbs.directive';
|
||||
import breadcrumb from './breadcrumb.directive';
|
||||
|
||||
export default
|
||||
angular.module('breadcrumbs', [])
|
||||
.directive('breadcrumb', breadcrumb)
|
||||
.directive('breadcrumbs', breadcrumbs);
|
||||
@ -29,7 +29,6 @@
|
||||
* | id | | The ID attribute value of the DOM elment that will receive the generated HTML. If provided, form generator will inject the HTML it genertates into the DOM element identified by the string value provided. Do not preceed the value with '#' |
|
||||
* | mode | Y | 'add', 'edit' or 'modal'. Use add when creating new data - creating a new orgranization, for example. Use edit when modifying existing data. Modal is deprecated. Use the 'id' option to inject a form into a modal dialog. |
|
||||
* | scope | | Reference to $scope object. Will be passed to $compile and associated with any angular directives contained within the generated HTML. |
|
||||
* | breadCrumbs | | true or false. If false, breadcrumbs will not be inlcluded in the generated HTML. |
|
||||
* | showButtons | | true or false. If false, buttons defined in the buttons object will not be included in the generated HTML. |
|
||||
*
|
||||
* #Generate HTML Only
|
||||
@ -54,8 +53,6 @@
|
||||
*
|
||||
* | Attribute | Description |
|
||||
* | --------- | ----------- |
|
||||
* | addTitle | Title to use in breadcrumbs when the form mode is 'add' |
|
||||
* | breadCrumbs | true or false. Breadcrumbs are included at the top of the page by default. If set to false, breadcrumbs will not be included at the top of the page. |
|
||||
* | collapse | true or false. If true, places the form inside a jQueryUI accordion |
|
||||
* | collapseMode | 'add' or 'edit'. If the value of the mode parameter passed into .inject() or .buildHTML() matches collapseMode, the <form> will be placed in an accordion. |
|
||||
* | collapseOpen | true or false. If true, the accordion will be open the first time the user views the form, or if no state information is found in local storage for the accordion. Subsequent views will depend on accordion state found in local storage. Each time user opens/closes an accordion the state is saved in local storage. |
|
||||
@ -1412,62 +1409,6 @@ angular.module('FormGenerator', [GeneratorHelpers.name, 'Utilities', listGenerat
|
||||
},
|
||||
|
||||
|
||||
breadCrumbs: function (options, navigation) {
|
||||
|
||||
var itm, paths, html = '';
|
||||
html += "<ul class=\"ansible-breadcrumb\">\n";
|
||||
html += "<li ng-repeat=\"crumb in breadcrumbs\"><a href=\"{{ '#' + crumb.path }}\">{{ crumb.title }}</a></li>\n";
|
||||
|
||||
if (navigation) {
|
||||
paths = $location.path().replace(/^\//, '').split('/');
|
||||
if (paths.length === 2) {
|
||||
html += "<li class=\"active\">";
|
||||
if (options.mode === 'edit') {
|
||||
html += this.form.editTitle;
|
||||
} else {
|
||||
html += this.form.addTitle;
|
||||
}
|
||||
html += "</li>\n";
|
||||
}
|
||||
|
||||
html += "<li class=\"active\"> </li>\n";
|
||||
html += "</ul>\n";
|
||||
html += "<div class=\"dropdown\">\n";
|
||||
for (itm in navigation) {
|
||||
if (navigation[itm].active) {
|
||||
html += "<a href=\"\" class=\"toggle\" ";
|
||||
html += "data-toggle=\"dropdown\" ";
|
||||
html += ">" + navigation[itm].label + " <i class=\"fa fa-chevron-circle-down crumb-icon\"></i></a>";
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
html += "<ul class=\"dropdown-menu\" role=\"menu\">\n";
|
||||
for (itm in navigation) {
|
||||
html += "<li role=\"presentation\"><a role=\"menuitem\" tabindex=\"-1\" href=\"" +
|
||||
navigation[itm].href + "\" ";
|
||||
// html += (navigation[itm].active) ? "class=\"active\" " : "";
|
||||
html += ">";
|
||||
html += "<i class=\"fa fa-check\" style=\"visibility: ";
|
||||
html += (navigation[itm].active) ? "visible" : "hidden";
|
||||
html += "\"></i> ";
|
||||
html += (navigation[itm].listLabel) ? navigation[itm].listLabel : navigation[itm].label;
|
||||
html += "</a></li>\n";
|
||||
}
|
||||
html += "</ul>\n";
|
||||
html += "</div><!-- dropdown -->\n";
|
||||
} else {
|
||||
html += "<li class=\"active\"><a href=\"\">";
|
||||
if (options.mode === 'edit') {
|
||||
html += this.form.editTitle;
|
||||
} else {
|
||||
html += this.form.addTitle;
|
||||
}
|
||||
html += "</a></li>\n</ul> <!-- group-breadcrumbs -->\n";
|
||||
}
|
||||
return html;
|
||||
},
|
||||
|
||||
build: function (options) {
|
||||
//
|
||||
// Generate HTML. Do NOT call this function directly. Called by inject(). Returns an HTML
|
||||
@ -1476,14 +1417,6 @@ angular.module('FormGenerator', [GeneratorHelpers.name, 'Utilities', listGenerat
|
||||
var btn, button, fld, field, html = '', i, section, group,
|
||||
tab, sectionShow, offset, width,ngDisabled;
|
||||
|
||||
if (!this.modal && (options.breadcrumbs === true)) {
|
||||
if (this.form.navigationLinks) {
|
||||
html += this.breadCrumbs(options, this.form.navigationLinks);
|
||||
} else {
|
||||
html += this.breadCrumbs(options);
|
||||
}
|
||||
}
|
||||
|
||||
if (this.form.collapse && this.form.collapseMode === options.mode) {
|
||||
html += "<div id=\"" + this.form.name + "-collapse-0\" ";
|
||||
html += (this.form.collapseOpen) ? "data-open=\"true\" " : "";
|
||||
@ -1739,7 +1672,7 @@ angular.module('FormGenerator', [GeneratorHelpers.name, 'Utilities', listGenerat
|
||||
html += "<h3 class=\"" + itm + "_collapse\">" + (collection.title || collection.editTitle) + "</h3>\n";
|
||||
html += "<div>\n";
|
||||
if (collection.generateList) {
|
||||
html += GenerateList.buildHTML(collection, { mode: 'edit', breadCrumbs: false });
|
||||
html += GenerateList.buildHTML(collection, { mode: 'edit' });
|
||||
}
|
||||
else {
|
||||
html += this.GenerateColleciton({ form: form, related: itm }, options);
|
||||
|
||||
@ -352,77 +352,6 @@ angular.module('GeneratorHelpers', [systemStatus.name])
|
||||
}
|
||||
])
|
||||
|
||||
.factory('Breadcrumbs', ['$rootScope', 'Attr',
|
||||
function ($rootScope, Attr) {
|
||||
return function (params) {
|
||||
|
||||
// Generate breadcrumbs using the list-generator.js method.
|
||||
|
||||
var list = params.list || {},
|
||||
mode = params.mode,
|
||||
title = params.title,
|
||||
html = '', itm, navigation;
|
||||
|
||||
html += "<ul class=\"ansible-breadcrumb\" id=\"breadcrumb-list\">\n";
|
||||
html += "<li ng-repeat=\"crumb in breadcrumbs\"><a href=\"{{ '#' + crumb.path }}\">{{ crumb.title }}</a></li>\n";
|
||||
|
||||
if (list.navigationLinks) {
|
||||
navigation = list.navigationLinks;
|
||||
if (navigation.ngHide) {
|
||||
html += "<li class=\"active\" ng-show=\"" + navigation.ngHide + "\">";
|
||||
html += list.editTitle;
|
||||
html += "</li>\n";
|
||||
html += "<li class=\"active\" ng-hide=\"" + navigation.ngHide + "\"> </li>\n";
|
||||
} else {
|
||||
html += "<li class=\"active\"> </li>\n";
|
||||
html += "</ul>\n";
|
||||
}
|
||||
html += "<div class=\"dropdown\" ";
|
||||
html += (navigation.ngHide) ? Attr(navigation, 'ngHide') : '';
|
||||
html += ">\n";
|
||||
for (itm in navigation) {
|
||||
if (typeof navigation[itm] === 'object' && navigation[itm].active) {
|
||||
html += "<a href=\"\" class=\"toggle\" ";
|
||||
html += "data-toggle=\"dropdown\" ";
|
||||
html += ">" + navigation[itm].label + " <i class=\"fa fa-chevron-circle-down crumb-icon\"></i></a>";
|
||||
break;
|
||||
}
|
||||
}
|
||||
html += "<ul class=\"dropdown-menu\" role=\"menu\">\n";
|
||||
for (itm in navigation) {
|
||||
if (typeof navigation[itm] === 'object') {
|
||||
html += "<li role=\"presentation\"><a role=\"menuitem\" tabindex=\"-1\" href=\"" +
|
||||
navigation[itm].href + "\" ";
|
||||
// html += (navigation[itm].active) ? "class=\"active\" " : "";
|
||||
html += ">";
|
||||
html += "<i class=\"fa fa-check\" style=\"visibility: ";
|
||||
html += (navigation[itm].active) ? "visible" : "hidden";
|
||||
html += "\"></i> ";
|
||||
html += navigation[itm].label;
|
||||
html += "</a></li>\n";
|
||||
}
|
||||
}
|
||||
html += "</ul>\n";
|
||||
html += "</div><!-- dropdown -->\n";
|
||||
} else {
|
||||
html += "<li class=\"active\"><a href=\"\">";
|
||||
// Support usage without a mode by just passing a title option
|
||||
if (title) {
|
||||
html += title;
|
||||
} else if (mode === 'select') {
|
||||
html += list.selectTitle;
|
||||
} else {
|
||||
html += list.editTitle;
|
||||
}
|
||||
html += "</a></li>\n</ul>\n";
|
||||
}
|
||||
|
||||
return html;
|
||||
|
||||
};
|
||||
}
|
||||
])
|
||||
|
||||
// List field with multiple icons
|
||||
.factory('BuildLink', ['Attr', 'Icon', function(Attr, Icon){
|
||||
return function(params) {
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
*
|
||||
* All Rights Reserved
|
||||
*************************************************/
|
||||
|
||||
|
||||
/**
|
||||
* @ngdoc function
|
||||
* @name shared.function:list-generator
|
||||
@ -17,7 +17,6 @@
|
||||
* | Parameter | Required | Description |
|
||||
* | --------- | -------- | ----------- |
|
||||
* | activityStream | | Used in widgets/stream.js to create the list contained within the activity stream widget. |
|
||||
* | breadCrumbs | | true or false. Set to false, if breadcrumbs should not be included in the generated HTML. |
|
||||
* | hdr | | Deprecated. Was used when list generator created the lookup dialog. This was moved to helpers/Lookup.js. |
|
||||
* | id | | DOM element ID attribute value. Use to inject the list into a custom DOM element. Otherwise, the HTML for a list will be injected into the DOM element with an ID attribute of 'htmlTemplate'. |
|
||||
* | listSize | | Bootstrap size class to apply to the grid column containing the action buttons, which generally appears to the right of the search widget. Defaults to 'col-lg-8 col-md-6 col-sm-4 col-xs-3'. |
|
||||
@ -32,7 +31,6 @@
|
||||
* ```
|
||||
* var html = GenerateList.buildHTML({
|
||||
* mode: 'edit',
|
||||
* breadCrumbs: false,
|
||||
* showSearch: false
|
||||
* });
|
||||
* ```
|
||||
@ -102,9 +100,9 @@
|
||||
import {templateUrl} from '../../shared/template-url/template-url.factory';
|
||||
|
||||
export default ['$location', '$compile', '$rootScope', 'SearchWidget', 'PaginateWidget', 'Attr', 'Icon',
|
||||
'Column', 'DropDown', 'NavigationLink', 'SelectIcon', 'Breadcrumbs',
|
||||
'Column', 'DropDown', 'NavigationLink', 'SelectIcon',
|
||||
function ($location, $compile, $rootScope, SearchWidget, PaginateWidget, Attr, Icon, Column, DropDown, NavigationLink,
|
||||
SelectIcon, Breadcrumbs) {
|
||||
SelectIcon) {
|
||||
return {
|
||||
|
||||
setList: function (list) {
|
||||
@ -143,8 +141,6 @@ export default ['$location', '$compile', '$rootScope', 'SearchWidget', 'Paginate
|
||||
// hdr: <lookup dialog header>
|
||||
//
|
||||
// Inject into a custom element using options.id: <element id attribute value>
|
||||
//
|
||||
// Control breadcrumb creation with options.breadCrumbs: <true | false>
|
||||
var element;
|
||||
|
||||
if (options.id) {
|
||||
@ -292,26 +288,6 @@ export default ['$location', '$compile', '$rootScope', 'SearchWidget', 'Paginate
|
||||
list = this.list,
|
||||
base, size, action, fld, cnt, field_action, fAction, itm;
|
||||
|
||||
if (options.activityStream) {
|
||||
// Breadcrumbs for activity stream widget
|
||||
// Make the links clickable using ng-click function so we can first remove the stream widget
|
||||
// before navigation
|
||||
html += "<div>\n";
|
||||
html += "<ul class=\"ansible-breadcrumb\">\n";
|
||||
html += "<li ng-repeat=\"crumb in breadcrumbs\"><a href=\"\" " + "ng-click=\"closeStream(crumb.path)\">" +
|
||||
"{{ crumb.title }}</a></li>\n";
|
||||
html += "<li class=\"active\"><a href=\"\">";
|
||||
html += list.editTitle;
|
||||
html += "</a></li>\n</ul>\n</div>\n";
|
||||
}
|
||||
//else if (options.mode !== 'lookup' && (options.breadCrumbs === undefined || options.breadCrumbs)) {
|
||||
else if (options.breadCrumbs) {
|
||||
html += Breadcrumbs({
|
||||
list: list,
|
||||
mode: options.mode
|
||||
});
|
||||
}
|
||||
|
||||
if (options.mode === 'edit' && list.editInstructions) {
|
||||
html += "<div class=\"alert alert-info alert-block\">\n";
|
||||
html += "<button type=\"button\" class=\"close\" data-dismiss=\"alert\">×</button>\n";
|
||||
|
||||
@ -1,9 +1,4 @@
|
||||
<section class="SystemTrackingContainer" ng-if="noModuleData">
|
||||
<breadcrumbs>
|
||||
<breadcrumb path="/inventories" title="Inventories"></breadcrumb>
|
||||
<breadcrumb path="/inventories/{{inventory.id}}/manage" title="{{inventory.name}}"></breadcrumb>
|
||||
<breadcrumb path="/inventories/{{inventory.id}}/system-tracking/{{hostIds}}" title="System Tracking" current="true"></breadcrumb>
|
||||
</breadcrumbs>
|
||||
|
||||
<section class="FactDataError SystemTrackingContainer-main">
|
||||
<p class="FactDataError-note--full">
|
||||
@ -12,11 +7,6 @@
|
||||
</section>
|
||||
</section>
|
||||
<section class="SystemTrackingContainer" ng-hide="noModuleData">
|
||||
<breadcrumbs>
|
||||
<breadcrumb path="/inventories" title="Inventories"></breadcrumb>
|
||||
<breadcrumb path="/inventories/{{inventory.id}}/manage" title="{{inventory.name}}"></breadcrumb>
|
||||
<breadcrumb path="/inventories/{{inventory.id}}/system-tracking/{{hostIds}}" title="System Tracking" current="true"></breadcrumb>
|
||||
</breadcrumbs>
|
||||
|
||||
<div class="FactModulePickers">
|
||||
<div class="FactModulePickers-dateContainer FactModulePickers-dateContainer--left">
|
||||
|
||||
@ -67,8 +67,8 @@ angular.module('StreamWidget', ['RestServices', 'Utilities', 'StreamListDefiniti
|
||||
}
|
||||
])
|
||||
|
||||
.factory('HideStream', ['LoadBreadCrumbs',
|
||||
function (LoadBreadCrumbs) {
|
||||
.factory('HideStream', [
|
||||
function () {
|
||||
return function () {
|
||||
// Remove the stream widget
|
||||
|
||||
@ -92,62 +92,6 @@ angular.module('StreamWidget', ['RestServices', 'Utilities', 'StreamListDefiniti
|
||||
'min-height': 0
|
||||
}); //let the parent height go back to normal
|
||||
}, 500);
|
||||
|
||||
LoadBreadCrumbs();
|
||||
};
|
||||
}
|
||||
])
|
||||
|
||||
.factory('StreamBreadCrumbs', ['$rootScope', '$location',
|
||||
function ($rootScope, $location) {
|
||||
return function () {
|
||||
// Load the breadcrumbs array. We have to do things a bit different than Utilities.LoadBreadcrumbs.
|
||||
// Rather than botch that all up, we'll do our own thing here.
|
||||
$rootScope.breadcrumbs = [];
|
||||
var path, title, i, j, paths = $location.path().split('/'),
|
||||
capitalizeTitle = function(title) {
|
||||
return title.split("_")
|
||||
.map(function(title) {
|
||||
return title.charAt(0).toUpperCase() + title.slice(1);
|
||||
}).join(" ");
|
||||
};
|
||||
paths.splice(0, 1);
|
||||
for (i = 0; i < paths.length; i++) {
|
||||
if (/^\d+/.test(paths[i])) {
|
||||
path = '';
|
||||
title = '';
|
||||
for (j = 0; j <= i; j++) {
|
||||
path += '/' + paths[j];
|
||||
}
|
||||
for (j = 0; j < $rootScope.crumbCache.length; j++) {
|
||||
if ($rootScope.crumbCache[j].path === path) {
|
||||
title = $rootScope.crumbCache[j].title;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!title) {
|
||||
title = paths[i - 1].substr(0, paths[i - 1].length - 1);
|
||||
title = capitalizeTitle(title);
|
||||
title = (title === 'Inventorie') ? 'Inventory' : title;
|
||||
}
|
||||
} else {
|
||||
path = '';
|
||||
title = '';
|
||||
if (i > 0) {
|
||||
for (j = 0; j <= i; j++) {
|
||||
path += '/' + paths[j];
|
||||
}
|
||||
} else {
|
||||
path = '/' + paths[i];
|
||||
}
|
||||
title = paths[i];
|
||||
title = capitalizeTitle(title);
|
||||
}
|
||||
$rootScope.breadcrumbs.push({
|
||||
path: path,
|
||||
title: title
|
||||
});
|
||||
}
|
||||
};
|
||||
}
|
||||
])
|
||||
@ -393,9 +337,9 @@ angular.module('StreamWidget', ['RestServices', 'Utilities', 'StreamListDefiniti
|
||||
|
||||
.factory('Stream', ['$rootScope', '$location', 'Rest', 'GetBasePath', 'ProcessErrors', 'Wait', 'StreamList', 'SearchInit',
|
||||
'PaginateInit', 'generateList', 'FormatDate', 'ShowStream', 'HideStream', 'BuildDescription', 'FixUrl', 'BuildUrl',
|
||||
'ShowDetail', 'StreamBreadCrumbs', 'setStreamHeight', 'Find', 'Store',
|
||||
'ShowDetail', 'setStreamHeight', 'Find', 'Store',
|
||||
function ($rootScope, $location, Rest, GetBasePath, ProcessErrors, Wait, StreamList, SearchInit, PaginateInit, GenerateList,
|
||||
FormatDate, ShowStream, HideStream, BuildDescription, FixUrl, BuildUrl, ShowDetail, StreamBreadCrumbs, setStreamHeight,
|
||||
FormatDate, ShowStream, HideStream, BuildDescription, FixUrl, BuildUrl, ShowDetail, setStreamHeight,
|
||||
Find, Store) {
|
||||
return function (params) {
|
||||
|
||||
@ -440,16 +384,6 @@ angular.module('StreamWidget', ['RestServices', 'Utilities', 'StreamListDefiniti
|
||||
// Add a container for the stream widget
|
||||
$('#main-view').append("<div id=\"stream-container\"><div id=\"stream-content\"></div></div><!-- Stream widget -->");
|
||||
|
||||
StreamBreadCrumbs();
|
||||
|
||||
// Fix inventory name. The way we're doing breadcrumbs doesn't support bind variables.
|
||||
if (inventory_name) {
|
||||
itm = Find({ list: $rootScope.breadcrumbs, key: 'title', val: '{{ inventory.name }}' });
|
||||
if (itm) {
|
||||
itm.title = inventory_name;
|
||||
}
|
||||
}
|
||||
|
||||
ShowStream();
|
||||
|
||||
// Generate the list
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user