mirror of
https://github.com/ansible/awx.git
synced 2026-03-15 07:57:29 -02:30
Fixed project related links on home page. Add missing Reset button to all list pages. Fixed bug in sort that prevented searching where drop-down item is empty.
This commit is contained in:
@@ -13,7 +13,7 @@
|
|||||||
function ProjectsList ($scope, $rootScope, $location, $log, $routeParams, Rest, Alert, ProjectList,
|
function ProjectsList ($scope, $rootScope, $location, $log, $routeParams, Rest, Alert, ProjectList,
|
||||||
GenerateList, LoadBreadCrumbs, Prompt, SearchInit, PaginateInit, ReturnToCaller,
|
GenerateList, LoadBreadCrumbs, Prompt, SearchInit, PaginateInit, ReturnToCaller,
|
||||||
ClearScope, ProcessErrors, GetBasePath, SelectionInit, ProjectUpdate, ProjectStatus,
|
ClearScope, ProcessErrors, GetBasePath, SelectionInit, ProjectUpdate, ProjectStatus,
|
||||||
FormatDate, Refresh, Wait, Stream)
|
FormatDate, Refresh, Wait, Stream, GetChoices)
|
||||||
{
|
{
|
||||||
ClearScope('htmlTemplate'); //Garbage collection. Don't leave behind any listeners/watchers from the prior
|
ClearScope('htmlTemplate'); //Garbage collection. Don't leave behind any listeners/watchers from the prior
|
||||||
//scope.
|
//scope.
|
||||||
@@ -41,34 +41,77 @@ function ProjectsList ($scope, $rootScope, $location, $log, $routeParams, Rest,
|
|||||||
$('#prompt-modal').off();
|
$('#prompt-modal').off();
|
||||||
|
|
||||||
if (scope.projects) {
|
if (scope.projects) {
|
||||||
for (var i=0; i < scope.projects.length; i++) {
|
for (var i=0; i < scope.projects.length; i++) {
|
||||||
if (scope.projects[i].status == 'ok') {
|
if (scope.projects[i].status == 'ok') {
|
||||||
scope.projects[i].status = 'n/a';
|
scope.projects[i].status = 'n/a';
|
||||||
}
|
}
|
||||||
switch(scope.projects[i].status) {
|
switch(scope.projects[i].status) {
|
||||||
case 'n/a':
|
case 'n/a':
|
||||||
scope.projects[i].badge = 'none';
|
scope.projects[i].badge = 'none';
|
||||||
break;
|
break;
|
||||||
case 'updating':
|
case 'updating':
|
||||||
case 'successful':
|
case 'successful':
|
||||||
case 'ok':
|
case 'ok':
|
||||||
scope.projects[i].badge = 'false';
|
scope.projects[i].badge = 'false';
|
||||||
break;
|
break;
|
||||||
case 'never updated':
|
case 'never updated':
|
||||||
case 'failed':
|
case 'failed':
|
||||||
case 'missing':
|
case 'missing':
|
||||||
scope.projects[i].badge = 'true';
|
scope.projects[i].badge = 'true';
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
scope.projects[i].last_updated = (scope.projects[i].last_updated !== null) ?
|
scope.projects[i].last_updated = (scope.projects[i].last_updated !== null) ?
|
||||||
FormatDate(new Date(scope.projects[i].last_updated)) : null;
|
FormatDate(new Date(scope.projects[i].last_updated)) : null;
|
||||||
}
|
|
||||||
|
for (var j=0; j < scope.project_scm_type_options.length; j++) {
|
||||||
|
if (scope.project_scm_type_options[j].value == scope.projects[i].scm_type) {
|
||||||
|
scope.projects[i].scm_type = scope.project_scm_type_options[j].label
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
SearchInit({ scope: scope, set: 'projects', list: list, url: defaultUrl });
|
if (scope.removeChoicesReady) {
|
||||||
PaginateInit({ scope: scope, list: list, url: defaultUrl });
|
scope.removeChoicesReady();
|
||||||
scope.search(list.iterator);
|
}
|
||||||
|
scope.removeChoicesReady = scope.$on('choicesReady', function() {
|
||||||
|
|
||||||
|
list.fields.scm_type.searchOptions = scope.project_scm_type_options;
|
||||||
|
|
||||||
|
if ($routeParams['scm_type'] && $routeParams['status']) {
|
||||||
|
// Request coming from home page. User wants all errors for an scm_type
|
||||||
|
defaultUrl += '?status=' + $routeParams['status'];
|
||||||
|
}
|
||||||
|
|
||||||
|
SearchInit({ scope: scope, set: 'projects', list: list, url: defaultUrl });
|
||||||
|
PaginateInit({ scope: scope, list: list, url: defaultUrl });
|
||||||
|
|
||||||
|
if ($routeParams['scm_type']) {
|
||||||
|
scope[list.iterator + 'SearchField'] = 'scm_type';
|
||||||
|
scope[list.iterator + 'SelectShow'] = true;
|
||||||
|
scope[list.iterator + 'SearchSelectOpts'] = list.fields['scm_type'].searchOptions;
|
||||||
|
scope[list.iterator + 'SearchFieldLabel'] = list.fields['scm_type'].label.replace(/\<br\>/g,' ');
|
||||||
|
for (var opt in list.fields['scm_type'].searchOptions) {
|
||||||
|
if (list.fields['scm_type'].searchOptions[opt].value == $routeParams['scm_type']) {
|
||||||
|
scope[list.iterator + 'SearchSelectValue'] = list.fields['scm_type'].searchOptions[opt];
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
scope.search(list.iterator);
|
||||||
|
});
|
||||||
|
|
||||||
|
// Load the list of options for Kind
|
||||||
|
GetChoices({
|
||||||
|
scope: scope,
|
||||||
|
url: defaultUrl,
|
||||||
|
field: 'scm_type',
|
||||||
|
variable: 'project_scm_type_options',
|
||||||
|
callback: 'choicesReady'
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
LoadBreadCrumbs();
|
LoadBreadCrumbs();
|
||||||
|
|
||||||
@@ -232,7 +275,8 @@ function ProjectsList ($scope, $rootScope, $location, $log, $routeParams, Rest,
|
|||||||
|
|
||||||
ProjectsList.$inject = [ '$scope', '$rootScope', '$location', '$log', '$routeParams', 'Rest', 'Alert', 'ProjectList', 'GenerateList',
|
ProjectsList.$inject = [ '$scope', '$rootScope', '$location', '$log', '$routeParams', 'Rest', 'Alert', 'ProjectList', 'GenerateList',
|
||||||
'LoadBreadCrumbs', 'Prompt', 'SearchInit', 'PaginateInit', 'ReturnToCaller', 'ClearScope', 'ProcessErrors',
|
'LoadBreadCrumbs', 'Prompt', 'SearchInit', 'PaginateInit', 'ReturnToCaller', 'ClearScope', 'ProcessErrors',
|
||||||
'GetBasePath', 'SelectionInit', 'ProjectUpdate', 'ProjectStatus', 'FormatDate', 'Refresh', 'Wait', 'Stream'];
|
'GetBasePath', 'SelectionInit', 'ProjectUpdate', 'ProjectStatus', 'FormatDate', 'Refresh', 'Wait', 'Stream',
|
||||||
|
'GetChoices' ];
|
||||||
|
|
||||||
|
|
||||||
function ProjectsAdd ($scope, $rootScope, $compile, $location, $log, $routeParams, ProjectsForm,
|
function ProjectsAdd ($scope, $rootScope, $compile, $location, $log, $routeParams, ProjectsForm,
|
||||||
|
|||||||
@@ -346,7 +346,7 @@ angular.module('SearchHelper', ['RestServices', 'Utilities', 'RefreshHelper'])
|
|||||||
else if ( (list.fields[scope[iterator + 'SearchField' + modifier]].searchType == 'select') &&
|
else if ( (list.fields[scope[iterator + 'SearchField' + modifier]].searchType == 'select') &&
|
||||||
(scope[iterator + 'SearchSelectValue' + modifier].value == '' ||
|
(scope[iterator + 'SearchSelectValue' + modifier].value == '' ||
|
||||||
scope[iterator + 'SearchSelectValue' + modifier].value == null) ) {
|
scope[iterator + 'SearchSelectValue' + modifier].value == null) ) {
|
||||||
scope[iterator + 'SearchParams'] += '&' + scope[iterator + 'SearchField' + modifier];
|
scope[iterator + 'SearchParams'] += '&' + scope[iterator + 'SearchField' + modifier] + '__';
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
scope[iterator + 'SearchParams'] += '&' + scope[iterator + 'SearchField' + modifier] + '__';
|
scope[iterator + 'SearchParams'] += '&' + scope[iterator + 'SearchField' + modifier] + '__';
|
||||||
|
|||||||
@@ -62,6 +62,15 @@ angular.module('CredentialsListDefinition', [])
|
|||||||
"class": 'btn-success btn-xs',
|
"class": 'btn-success btn-xs',
|
||||||
awToolTip: 'Create a new credential'
|
awToolTip: 'Create a new credential'
|
||||||
},
|
},
|
||||||
|
reset: {
|
||||||
|
dataPlacement: 'top',
|
||||||
|
icon: "icon-undo",
|
||||||
|
mode: 'all',
|
||||||
|
'class': 'btn-xs btn-primary',
|
||||||
|
awToolTip: "Reset the search filter",
|
||||||
|
ngClick: "resetSearch()",
|
||||||
|
iconSize: 'large'
|
||||||
|
},
|
||||||
stream: {
|
stream: {
|
||||||
'class': "btn-primary btn-xs activity-btn",
|
'class': "btn-primary btn-xs activity-btn",
|
||||||
ngClick: "showActivity()",
|
ngClick: "showActivity()",
|
||||||
|
|||||||
@@ -110,6 +110,15 @@ angular.module('HomeGroupListDefinition', [])
|
|||||||
},
|
},
|
||||||
|
|
||||||
actions: {
|
actions: {
|
||||||
|
reset: {
|
||||||
|
dataPlacement: 'top',
|
||||||
|
icon: "icon-undo",
|
||||||
|
mode: 'all',
|
||||||
|
'class': 'btn-xs btn-primary',
|
||||||
|
awToolTip: "Reset the search filter",
|
||||||
|
ngClick: "resetSearch()",
|
||||||
|
iconSize: 'large'
|
||||||
|
},
|
||||||
stream: {
|
stream: {
|
||||||
'class': "btn-primary btn-xs activity-btn",
|
'class': "btn-primary btn-xs activity-btn",
|
||||||
ngClick: "showActivity()",
|
ngClick: "showActivity()",
|
||||||
|
|||||||
@@ -81,6 +81,15 @@ angular.module('HomeHostListDefinition', [])
|
|||||||
},
|
},
|
||||||
|
|
||||||
actions: {
|
actions: {
|
||||||
|
reset: {
|
||||||
|
dataPlacement: 'top',
|
||||||
|
icon: "icon-undo",
|
||||||
|
mode: 'all',
|
||||||
|
'class': 'btn-xs btn-primary',
|
||||||
|
awToolTip: "Reset the search filter",
|
||||||
|
ngClick: "resetSearch()",
|
||||||
|
iconSize: 'large'
|
||||||
|
},
|
||||||
stream: {
|
stream: {
|
||||||
'class': "btn-primary btn-xs activity-btn",
|
'class': "btn-primary btn-xs activity-btn",
|
||||||
ngClick: "showActivity()",
|
ngClick: "showActivity()",
|
||||||
|
|||||||
@@ -89,6 +89,15 @@ angular.module('InventoriesListDefinition', [])
|
|||||||
"class": 'btn-xs btn-success',
|
"class": 'btn-xs btn-success',
|
||||||
awToolTip: 'Create a new inventory'
|
awToolTip: 'Create a new inventory'
|
||||||
},
|
},
|
||||||
|
reset: {
|
||||||
|
dataPlacement: 'top',
|
||||||
|
icon: "icon-undo",
|
||||||
|
mode: 'all',
|
||||||
|
'class': 'btn-xs btn-primary',
|
||||||
|
awToolTip: "Reset the search filter",
|
||||||
|
ngClick: "resetSearch()",
|
||||||
|
iconSize: 'large'
|
||||||
|
},
|
||||||
stream: {
|
stream: {
|
||||||
'class': "btn-primary btn-xs activity-btn",
|
'class': "btn-primary btn-xs activity-btn",
|
||||||
ngClick: "showActivity()",
|
ngClick: "showActivity()",
|
||||||
|
|||||||
@@ -136,6 +136,15 @@ angular.module('InventorySummaryDefinition', [])
|
|||||||
ngClick: "refresh()",
|
ngClick: "refresh()",
|
||||||
iconSize: 'large'
|
iconSize: 'large'
|
||||||
},
|
},
|
||||||
|
reset: {
|
||||||
|
dataPlacement: 'top',
|
||||||
|
icon: "icon-undo",
|
||||||
|
mode: 'all',
|
||||||
|
'class': 'btn-xs btn-primary',
|
||||||
|
awToolTip: "Reset the search filter",
|
||||||
|
ngClick: "resetSearch()",
|
||||||
|
iconSize: 'large'
|
||||||
|
},
|
||||||
stream: {
|
stream: {
|
||||||
'class': "btn-primary btn-xs activity-btn",
|
'class': "btn-primary btn-xs activity-btn",
|
||||||
ngClick: "showActivity()",
|
ngClick: "showActivity()",
|
||||||
|
|||||||
@@ -89,11 +89,20 @@ angular.module('JobEventsListDefinition', [])
|
|||||||
dataPlacement: 'top',
|
dataPlacement: 'top',
|
||||||
icon: "icon-refresh",
|
icon: "icon-refresh",
|
||||||
mode: 'all',
|
mode: 'all',
|
||||||
ngShow: "job_status == 'pending' || job_status == 'waiting' || job_status == 'running'",
|
//ngShow: "job_status == 'pending' || job_status == 'waiting' || job_status == 'running'",
|
||||||
'class': 'btn-xs btn-primary',
|
'class': 'btn-xs btn-primary',
|
||||||
awToolTip: "Refresh the page",
|
awToolTip: "Refresh the page",
|
||||||
ngClick: "refresh()",
|
ngClick: "refresh()",
|
||||||
iconSize: 'large'
|
iconSize: 'large'
|
||||||
|
},
|
||||||
|
reset: {
|
||||||
|
dataPlacement: 'top',
|
||||||
|
icon: "icon-undo",
|
||||||
|
mode: 'all',
|
||||||
|
'class': 'btn-xs btn-primary',
|
||||||
|
awToolTip: "Reset the search filter",
|
||||||
|
ngClick: "resetSearch()",
|
||||||
|
iconSize: 'large'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
@@ -128,6 +128,15 @@ angular.module('JobHostDefinition', [])
|
|||||||
awToolTip: "Refresh the page",
|
awToolTip: "Refresh the page",
|
||||||
ngClick: "refresh()",
|
ngClick: "refresh()",
|
||||||
iconSize: 'large'
|
iconSize: 'large'
|
||||||
|
},
|
||||||
|
reset: {
|
||||||
|
dataPlacement: 'top',
|
||||||
|
icon: "icon-undo",
|
||||||
|
mode: 'all',
|
||||||
|
'class': 'btn-xs btn-primary',
|
||||||
|
awToolTip: "Reset the search filter",
|
||||||
|
ngClick: "resetSearch()",
|
||||||
|
iconSize: 'large'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
@@ -38,6 +38,15 @@ angular.module('JobTemplatesListDefinition', [])
|
|||||||
basePaths: ['job_templates'],
|
basePaths: ['job_templates'],
|
||||||
awToolTip: 'Create a new template'
|
awToolTip: 'Create a new template'
|
||||||
},
|
},
|
||||||
|
reset: {
|
||||||
|
dataPlacement: 'top',
|
||||||
|
icon: "icon-undo",
|
||||||
|
mode: 'all',
|
||||||
|
'class': 'btn-xs btn-primary',
|
||||||
|
awToolTip: "Reset the search filter",
|
||||||
|
ngClick: "resetSearch()",
|
||||||
|
iconSize: 'large'
|
||||||
|
},
|
||||||
stream: {
|
stream: {
|
||||||
'class': "btn-primary btn-xs activity-btn",
|
'class': "btn-primary btn-xs activity-btn",
|
||||||
ngClick: "showActivity()",
|
ngClick: "showActivity()",
|
||||||
|
|||||||
@@ -83,6 +83,15 @@ angular.module('JobsListDefinition', [])
|
|||||||
awToolTip: "Refresh the page",
|
awToolTip: "Refresh the page",
|
||||||
ngClick: "refresh()",
|
ngClick: "refresh()",
|
||||||
iconSize: 'large'
|
iconSize: 'large'
|
||||||
|
},
|
||||||
|
reset: {
|
||||||
|
dataPlacement: 'top',
|
||||||
|
icon: "icon-undo",
|
||||||
|
mode: 'all',
|
||||||
|
'class': 'btn-xs btn-primary',
|
||||||
|
awToolTip: "Reset the search filter",
|
||||||
|
ngClick: "resetSearch()",
|
||||||
|
iconSize: 'large'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
@@ -51,6 +51,15 @@ angular.module('PermissionListDefinition', [])
|
|||||||
awToolTip: 'Add a new permission',
|
awToolTip: 'Add a new permission',
|
||||||
ngShow: 'PermissionAddAllowed'
|
ngShow: 'PermissionAddAllowed'
|
||||||
},
|
},
|
||||||
|
reset: {
|
||||||
|
dataPlacement: 'top',
|
||||||
|
icon: "icon-undo",
|
||||||
|
mode: 'all',
|
||||||
|
'class': 'btn-xs btn-primary',
|
||||||
|
awToolTip: "Reset the search filter",
|
||||||
|
ngClick: "resetSearch()",
|
||||||
|
iconSize: 'large'
|
||||||
|
},
|
||||||
stream: {
|
stream: {
|
||||||
'class': "btn-primary btn-xs activity-btn",
|
'class': "btn-primary btn-xs activity-btn",
|
||||||
ngClick: "showActivity()",
|
ngClick: "showActivity()",
|
||||||
|
|||||||
@@ -29,6 +29,13 @@ angular.module('ProjectsListDefinition', [])
|
|||||||
columnClass: 'hidden-sm hidden-xs',
|
columnClass: 'hidden-sm hidden-xs',
|
||||||
excludeModal: true
|
excludeModal: true
|
||||||
},
|
},
|
||||||
|
scm_type: {
|
||||||
|
label: 'SCM Type',
|
||||||
|
searchType: 'select',
|
||||||
|
searchOptions: [], // will be set by Options call to projects resource
|
||||||
|
excludeModal: true,
|
||||||
|
nosort: true
|
||||||
|
},
|
||||||
status: {
|
status: {
|
||||||
label: 'Update Status',
|
label: 'Update Status',
|
||||||
ngClick: 'showSCMStatus(\{\{ project.id \}\})',
|
ngClick: 'showSCMStatus(\{\{ project.id \}\})',
|
||||||
@@ -72,7 +79,7 @@ angular.module('ProjectsListDefinition', [])
|
|||||||
dataTitle: 'Project Status',
|
dataTitle: 'Project Status',
|
||||||
iconSize: 'large'
|
iconSize: 'large'
|
||||||
},
|
},
|
||||||
refresh: {
|
refresh: {
|
||||||
dataPlacement: 'top',
|
dataPlacement: 'top',
|
||||||
icon: "icon-refresh",
|
icon: "icon-refresh",
|
||||||
mode: 'all',
|
mode: 'all',
|
||||||
@@ -81,6 +88,15 @@ angular.module('ProjectsListDefinition', [])
|
|||||||
ngClick: "refresh()",
|
ngClick: "refresh()",
|
||||||
iconSize: 'large'
|
iconSize: 'large'
|
||||||
},
|
},
|
||||||
|
reset: {
|
||||||
|
dataPlacement: 'top',
|
||||||
|
icon: "icon-undo",
|
||||||
|
mode: 'all',
|
||||||
|
'class': 'btn-xs btn-primary',
|
||||||
|
awToolTip: "Reset the search filter",
|
||||||
|
ngClick: "resetSearch()",
|
||||||
|
iconSize: 'large'
|
||||||
|
},
|
||||||
stream: {
|
stream: {
|
||||||
'class': "btn-primary btn-xs activity-btn",
|
'class': "btn-primary btn-xs activity-btn",
|
||||||
ngClick: "showActivity()",
|
ngClick: "showActivity()",
|
||||||
|
|||||||
@@ -43,6 +43,15 @@ angular.module('TeamsListDefinition', [])
|
|||||||
"class": 'btn-xs btn-success',
|
"class": 'btn-xs btn-success',
|
||||||
awToolTip: 'Create a new team'
|
awToolTip: 'Create a new team'
|
||||||
},
|
},
|
||||||
|
reset: {
|
||||||
|
dataPlacement: 'top',
|
||||||
|
icon: "icon-undo",
|
||||||
|
mode: 'all',
|
||||||
|
'class': 'btn-xs btn-primary',
|
||||||
|
awToolTip: "Reset the search filter",
|
||||||
|
ngClick: "resetSearch()",
|
||||||
|
iconSize: 'large'
|
||||||
|
},
|
||||||
stream: {
|
stream: {
|
||||||
'class': "btn-primary btn-xs activity-btn",
|
'class': "btn-primary btn-xs activity-btn",
|
||||||
ngClick: "showActivity()",
|
ngClick: "showActivity()",
|
||||||
|
|||||||
@@ -43,6 +43,15 @@ angular.module('UserListDefinition', [])
|
|||||||
"class": 'btn-success btn-xs',
|
"class": 'btn-success btn-xs',
|
||||||
awToolTip: 'Create a new user'
|
awToolTip: 'Create a new user'
|
||||||
},
|
},
|
||||||
|
reset: {
|
||||||
|
dataPlacement: 'top',
|
||||||
|
icon: "icon-undo",
|
||||||
|
mode: 'all',
|
||||||
|
'class': 'btn-xs btn-primary',
|
||||||
|
awToolTip: "Reset the search filter",
|
||||||
|
ngClick: "resetSearch()",
|
||||||
|
iconSize: 'large'
|
||||||
|
},
|
||||||
stream: {
|
stream: {
|
||||||
'class': "btn-primary btn-xs activity-btn",
|
'class': "btn-primary btn-xs activity-btn",
|
||||||
ngClick: "showActivity()",
|
ngClick: "showActivity()",
|
||||||
|
|||||||
@@ -33,49 +33,6 @@ angular.module('ObjectCountWidget', ['RestServices', 'Utilities'])
|
|||||||
html += "</thead>\n";
|
html += "</thead>\n";
|
||||||
html += "<tbody>\n";
|
html += "<tbody>\n";
|
||||||
|
|
||||||
/*function makeRow(params) {
|
|
||||||
var html = '';
|
|
||||||
var label = params.label;
|
|
||||||
var link = params.link;
|
|
||||||
var fail_link = params.fail_link;
|
|
||||||
var count = params.count;
|
|
||||||
var fail = params.fail;
|
|
||||||
|
|
||||||
html += "<tr><td class=\"capitalize\">\n";
|
|
||||||
html += "<a href=\"/#/";
|
|
||||||
var link;
|
|
||||||
switch(label) {
|
|
||||||
case 'inventory':
|
|
||||||
link = 'inventories';
|
|
||||||
break;
|
|
||||||
case 'hosts':
|
|
||||||
link = 'home/hosts';
|
|
||||||
break;
|
|
||||||
case 'groups':
|
|
||||||
link = 'home/groups';
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
link = label;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
html += link;
|
|
||||||
html += "\"";
|
|
||||||
html += (label == 'hosts' || label == 'groups') ? " class=\"pad-left-sm\" " : "";
|
|
||||||
html += ">";
|
|
||||||
if (label == 'inventory') {
|
|
||||||
html += 'inventories';
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
html += label.replace(/\_/g,' ');
|
|
||||||
}
|
|
||||||
html += "</a></td>\n"
|
|
||||||
html += "<td class=\"text-right\"><a href=\"/#/";
|
|
||||||
html += ( label == 'inventory') ? 'inventories' : label;
|
|
||||||
html += "\">";
|
|
||||||
html += counts[keys[i]] + "</a></td></tr>\n";
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
function makeRow(params) {
|
function makeRow(params) {
|
||||||
var html = '';
|
var html = '';
|
||||||
var label = params.label;
|
var label = params.label;
|
||||||
@@ -95,7 +52,7 @@ angular.module('ObjectCountWidget', ['RestServices', 'Utilities'])
|
|||||||
html += makeRow({
|
html += makeRow({
|
||||||
label: keys[i],
|
label: keys[i],
|
||||||
link: '/#/' + keys[i],
|
link: '/#/' + keys[i],
|
||||||
count: [(dashboard[keys[i]] && dashboard[keys[i]].total) ? dashboard[keys[i]].total : 0],
|
count: [(dashboard[keys[i]] && dashboard[keys[i]].total) ? dashboard[keys[i]].total : 0]
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user