mirror of
https://github.com/ansible/awx.git
synced 2026-03-07 19:51:08 -03:30
update search widgets across ui
This commit is contained in:
@@ -1970,7 +1970,6 @@ tr td button i {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.list-actions {
|
.list-actions {
|
||||||
margin-bottom: 20px;
|
|
||||||
text-align: left;
|
text-align: left;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2239,3 +2238,7 @@ a:hover {
|
|||||||
.dropdown-menu>li>a {
|
.dropdown-menu>li>a {
|
||||||
padding: 3px 10px;
|
padding: 3px 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#scheduled-jobs-tab .List-header {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|||||||
@@ -564,3 +564,8 @@ input[type='radio']:checked:before {
|
|||||||
padding-right: 50px;
|
padding-right: 50px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.action_column {
|
||||||
|
float: right;
|
||||||
|
margin-bottom: 20px;
|
||||||
|
}
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
export default function() {
|
export default function() {
|
||||||
return {
|
return {
|
||||||
|
searchSize: 'col-lg-12 col-md-12 col-sm-12 col-xs-12',
|
||||||
name: 'teams',
|
name: 'teams',
|
||||||
iterator: 'team',
|
iterator: 'team',
|
||||||
listTitleBadge: false,
|
listTitleBadge: false,
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
export default function() {
|
export default function() {
|
||||||
return {
|
return {
|
||||||
|
searchSize: 'col-lg-12 col-md-12 col-sm-12 col-xs-12',
|
||||||
name: 'users',
|
name: 'users',
|
||||||
iterator: 'user',
|
iterator: 'user',
|
||||||
title: false,
|
title: false,
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ export default ['templateUrl', function(templateUrl) {
|
|||||||
{label: 'Inventories', value: 'inventory'},
|
{label: 'Inventories', value: 'inventory'},
|
||||||
{label: 'Inventory Scripts', value: 'inventory_script'},
|
{label: 'Inventory Scripts', value: 'inventory_script'},
|
||||||
{label: 'Job Templates', value: 'job_template'},
|
{label: 'Job Templates', value: 'job_template'},
|
||||||
{label: 'Management Jobs', value: 'management_job'},
|
{label: 'Jobs', value: 'job'},
|
||||||
{label: 'Organizations', value: 'organization'},
|
{label: 'Organizations', value: 'organization'},
|
||||||
{label: 'Projects', value: 'project'},
|
{label: 'Projects', value: 'project'},
|
||||||
{label: 'Schedules', value: 'schedule'},
|
{label: 'Schedules', value: 'schedule'},
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ export default function(){
|
|||||||
basePath: 'unified_jobs',
|
basePath: 'unified_jobs',
|
||||||
label: '',
|
label: '',
|
||||||
iconOnly: true,
|
iconOnly: true,
|
||||||
searchable: true,
|
searchable: false,
|
||||||
searchType: 'select',
|
searchType: 'select',
|
||||||
nosort: true,
|
nosort: true,
|
||||||
searchOptions: [],
|
searchOptions: [],
|
||||||
|
|||||||
@@ -448,13 +448,15 @@ export default
|
|||||||
label: 'Role',
|
label: 'Role',
|
||||||
type: 'role',
|
type: 'role',
|
||||||
noSort: true,
|
noSort: true,
|
||||||
class: 'col-lg-4 col-md-4 col-sm-4 col-xs-4'
|
class: 'col-lg-4 col-md-4 col-sm-4 col-xs-4',
|
||||||
|
searchable: false
|
||||||
},
|
},
|
||||||
team_roles: {
|
team_roles: {
|
||||||
label: 'Team Roles',
|
label: 'Team Roles',
|
||||||
type: 'team_roles',
|
type: 'team_roles',
|
||||||
noSort: true,
|
noSort: true,
|
||||||
class: 'col-lg-5 col-md-5 col-sm-5 col-xs-4'
|
class: 'col-lg-5 col-md-5 col-sm-5 col-xs-4',
|
||||||
|
searchable: false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -185,13 +185,15 @@ export default
|
|||||||
label: 'Role',
|
label: 'Role',
|
||||||
type: 'role',
|
type: 'role',
|
||||||
noSort: true,
|
noSort: true,
|
||||||
class: 'col-lg-4 col-md-4 col-sm-4 col-xs-4'
|
class: 'col-lg-4 col-md-4 col-sm-4 col-xs-4',
|
||||||
|
noSearch: true
|
||||||
},
|
},
|
||||||
team_roles: {
|
team_roles: {
|
||||||
label: 'Team Roles',
|
label: 'Team Roles',
|
||||||
type: 'team_roles',
|
type: 'team_roles',
|
||||||
noSort: true,
|
noSort: true,
|
||||||
class: 'col-lg-5 col-md-5 col-sm-5 col-xs-4'
|
class: 'col-lg-5 col-md-5 col-sm-5 col-xs-4',
|
||||||
|
noSearch: true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -224,41 +224,6 @@ export default
|
|||||||
text: 'Prompt on launch'
|
text: 'Prompt on launch'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
labels: {
|
|
||||||
label: 'Labels',
|
|
||||||
type: 'select',
|
|
||||||
ngOptions: 'label.label for label in labelOptions track by label.value',
|
|
||||||
multiSelect: true,
|
|
||||||
addRequired: false,
|
|
||||||
editRequired: false,
|
|
||||||
dataTitle: 'Labels',
|
|
||||||
dataPlacement: 'right',
|
|
||||||
awPopOver: 'You can add labels to a job template to aid in filtering',
|
|
||||||
dataContainer: 'body'
|
|
||||||
},
|
|
||||||
variables: {
|
|
||||||
label: 'Extra Variables',
|
|
||||||
type: 'textarea',
|
|
||||||
class: 'Form-textAreaLabel Form-formGroup--fullWidth',
|
|
||||||
rows: 6,
|
|
||||||
addRequired: false,
|
|
||||||
editRequired: false,
|
|
||||||
"default": "---",
|
|
||||||
column: 2,
|
|
||||||
awPopOver: "<p>Pass extra command line variables to the playbook. This is the -e or --extra-vars command line parameter " +
|
|
||||||
"for ansible-playbook. Provide key/value pairs using either YAML or JSON.</p>" +
|
|
||||||
"JSON:<br />\n" +
|
|
||||||
"<blockquote>{<br /> \"somevar\": \"somevalue\",<br /> \"password\": \"magic\"<br /> }</blockquote>\n" +
|
|
||||||
"YAML:<br />\n" +
|
|
||||||
"<blockquote>---<br />somevar: somevalue<br />password: magic<br /></blockquote>\n",
|
|
||||||
dataTitle: 'Extra Variables',
|
|
||||||
dataPlacement: 'right',
|
|
||||||
dataContainer: "body",
|
|
||||||
subCheckbox: {
|
|
||||||
variable: 'ask_variables_on_launch',
|
|
||||||
text: 'Prompt on launch'
|
|
||||||
}
|
|
||||||
},
|
|
||||||
become_enabled: {
|
become_enabled: {
|
||||||
label: 'Enable Privilege Escalation',
|
label: 'Enable Privilege Escalation',
|
||||||
type: 'checkbox',
|
type: 'checkbox',
|
||||||
@@ -309,6 +274,42 @@ export default
|
|||||||
dataPlacement: 'right',
|
dataPlacement: 'right',
|
||||||
dataTitle: "Host Config Key",
|
dataTitle: "Host Config Key",
|
||||||
dataContainer: "body"
|
dataContainer: "body"
|
||||||
|
},
|
||||||
|
labels: {
|
||||||
|
label: 'Labels',
|
||||||
|
type: 'select',
|
||||||
|
class: 'Form-formGroup--fullWidth',
|
||||||
|
ngOptions: 'label.label for label in labelOptions track by label.value',
|
||||||
|
multiSelect: true,
|
||||||
|
addRequired: false,
|
||||||
|
editRequired: false,
|
||||||
|
dataTitle: 'Labels',
|
||||||
|
dataPlacement: 'right',
|
||||||
|
awPopOver: 'You can add labels to a job template to aid in filtering',
|
||||||
|
dataContainer: 'body'
|
||||||
|
},
|
||||||
|
variables: {
|
||||||
|
label: 'Extra Variables',
|
||||||
|
type: 'textarea',
|
||||||
|
class: 'Form-textAreaLabel Form-formGroup--fullWidth',
|
||||||
|
rows: 6,
|
||||||
|
addRequired: false,
|
||||||
|
editRequired: false,
|
||||||
|
"default": "---",
|
||||||
|
column: 2,
|
||||||
|
awPopOver: "<p>Pass extra command line variables to the playbook. This is the -e or --extra-vars command line parameter " +
|
||||||
|
"for ansible-playbook. Provide key/value pairs using either YAML or JSON.</p>" +
|
||||||
|
"JSON:<br />\n" +
|
||||||
|
"<blockquote>{<br /> \"somevar\": \"somevalue\",<br /> \"password\": \"magic\"<br /> }</blockquote>\n" +
|
||||||
|
"YAML:<br />\n" +
|
||||||
|
"<blockquote>---<br />somevar: somevalue<br />password: magic<br /></blockquote>\n",
|
||||||
|
dataTitle: 'Extra Variables',
|
||||||
|
dataPlacement: 'right',
|
||||||
|
dataContainer: "body",
|
||||||
|
subCheckbox: {
|
||||||
|
variable: 'ask_variables_on_launch',
|
||||||
|
text: 'Prompt on launch'
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -365,13 +366,15 @@ export default
|
|||||||
label: 'Role',
|
label: 'Role',
|
||||||
type: 'role',
|
type: 'role',
|
||||||
noSort: true,
|
noSort: true,
|
||||||
class: 'col-lg-4 col-md-4 col-sm-4 col-xs-4'
|
class: 'col-lg-4 col-md-4 col-sm-4 col-xs-4',
|
||||||
|
searchable: false
|
||||||
},
|
},
|
||||||
team_roles: {
|
team_roles: {
|
||||||
label: 'Team Roles',
|
label: 'Team Roles',
|
||||||
type: 'team_roles',
|
type: 'team_roles',
|
||||||
noSort: true,
|
noSort: true,
|
||||||
class: 'col-lg-5 col-md-5 col-sm-5 col-xs-4'
|
class: 'col-lg-5 col-md-5 col-sm-5 col-xs-4',
|
||||||
|
searchable: false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -47,6 +47,7 @@ export default
|
|||||||
|
|
||||||
related: {
|
related: {
|
||||||
permissions: {
|
permissions: {
|
||||||
|
basePath: 'organizations/:id/access_list/',
|
||||||
awToolTip: 'Please save before assigning permissions',
|
awToolTip: 'Please save before assigning permissions',
|
||||||
dataPlacement: 'top',
|
dataPlacement: 'top',
|
||||||
type: 'collection',
|
type: 'collection',
|
||||||
@@ -76,13 +77,15 @@ export default
|
|||||||
label: 'Role',
|
label: 'Role',
|
||||||
type: 'role',
|
type: 'role',
|
||||||
noSort: true,
|
noSort: true,
|
||||||
class: 'col-lg-4 col-md-4 col-sm-4 col-xs-4'
|
class: 'col-lg-4 col-md-4 col-sm-4 col-xs-4',
|
||||||
|
searchable: false
|
||||||
},
|
},
|
||||||
team_roles: {
|
team_roles: {
|
||||||
label: 'Team Roles',
|
label: 'Team Roles',
|
||||||
type: 'team_roles',
|
type: 'team_roles',
|
||||||
noSort: true,
|
noSort: true,
|
||||||
class: 'col-lg-5 col-md-5 col-sm-5 col-xs-4'
|
class: 'col-lg-5 col-md-5 col-sm-5 col-xs-4',
|
||||||
|
searchable: false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -243,13 +243,15 @@ angular.module('ProjectFormDefinition', ['SchedulesListDefinition'])
|
|||||||
label: 'Role',
|
label: 'Role',
|
||||||
type: 'role',
|
type: 'role',
|
||||||
noSort: true,
|
noSort: true,
|
||||||
class: 'col-lg-4 col-md-4 col-sm-4 col-xs-4'
|
class: 'col-lg-4 col-md-4 col-sm-4 col-xs-4',
|
||||||
|
noSearch: true
|
||||||
},
|
},
|
||||||
team_roles: {
|
team_roles: {
|
||||||
label: 'Team Roles',
|
label: 'Team Roles',
|
||||||
type: 'team_roles',
|
type: 'team_roles',
|
||||||
noSort: true,
|
noSort: true,
|
||||||
class: 'col-lg-5 col-md-5 col-sm-5 col-xs-4'
|
class: 'col-lg-5 col-md-5 col-sm-5 col-xs-4',
|
||||||
|
noSearch: true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -90,19 +90,23 @@ export default
|
|||||||
label: 'Role',
|
label: 'Role',
|
||||||
type: 'role',
|
type: 'role',
|
||||||
noSort: true,
|
noSort: true,
|
||||||
class: 'col-lg-4 col-md-4 col-sm-4 col-xs-4'
|
class: 'col-lg-4 col-md-4 col-sm-4 col-xs-4',
|
||||||
|
searchable: false
|
||||||
},
|
},
|
||||||
team_roles: {
|
team_roles: {
|
||||||
label: 'Team Roles',
|
label: 'Team Roles',
|
||||||
type: 'team_roles',
|
type: 'team_roles',
|
||||||
noSort: true,
|
noSort: true,
|
||||||
class: 'col-lg-5 col-md-5 col-sm-5 col-xs-4'
|
class: 'col-lg-5 col-md-5 col-sm-5 col-xs-4',
|
||||||
|
searchable: false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
roles: {
|
roles: {
|
||||||
|
hideSearchAndActions: true,
|
||||||
dataPlacement: 'top',
|
dataPlacement: 'top',
|
||||||
awToolTip: 'Please save before assigning permissions',
|
awToolTip: 'Please save before assigning permissions',
|
||||||
|
basePath: 'teams/:id/roles/',
|
||||||
type: 'collection',
|
type: 'collection',
|
||||||
title: 'Permissions',
|
title: 'Permissions',
|
||||||
iterator: 'role',
|
iterator: 'role',
|
||||||
|
|||||||
@@ -109,6 +109,7 @@ export default
|
|||||||
|
|
||||||
related: {
|
related: {
|
||||||
organizations: {
|
organizations: {
|
||||||
|
basePath: 'users/:id/organizations',
|
||||||
awToolTip: 'Please save before assigning to organizations',
|
awToolTip: 'Please save before assigning to organizations',
|
||||||
dataPlacement: 'top',
|
dataPlacement: 'top',
|
||||||
type: 'collection',
|
type: 'collection',
|
||||||
@@ -131,6 +132,7 @@ export default
|
|||||||
hideOnSuperuser: true
|
hideOnSuperuser: true
|
||||||
},
|
},
|
||||||
teams: {
|
teams: {
|
||||||
|
basePath: 'users/:id/teams',
|
||||||
awToolTip: 'Please save before assigning to teams',
|
awToolTip: 'Please save before assigning to teams',
|
||||||
dataPlacement: 'top',
|
dataPlacement: 'top',
|
||||||
type: 'collection',
|
type: 'collection',
|
||||||
|
|||||||
@@ -40,8 +40,8 @@ export default
|
|||||||
case 'organization':
|
case 'organization':
|
||||||
rtnTitle = 'ORGANIZATIONS';
|
rtnTitle = 'ORGANIZATIONS';
|
||||||
break;
|
break;
|
||||||
case 'management_job':
|
case 'job':
|
||||||
rtnTitle = 'MANAGEMENT JOBS';
|
rtnTitle = 'JOBS';
|
||||||
break;
|
break;
|
||||||
case 'inventory_script':
|
case 'inventory_script':
|
||||||
rtnTitle = 'INVENTORY SCRIPTS';
|
rtnTitle = 'INVENTORY SCRIPTS';
|
||||||
|
|||||||
@@ -175,25 +175,26 @@
|
|||||||
color: @btn-txt;
|
color: @btn-txt;
|
||||||
}
|
}
|
||||||
.JobSubmission-revertButton {
|
.JobSubmission-revertButton {
|
||||||
background-color: @default-link;
|
background-color: @default-bg;
|
||||||
color: @default-bg;
|
color: @default-link;
|
||||||
text-transform: uppercase;
|
text-transform: uppercase;
|
||||||
padding-left:15px;
|
padding-left:15px;
|
||||||
padding-right: 15px;
|
padding-right: 15px;
|
||||||
font-size: 9px;
|
font-size: 11px;
|
||||||
}
|
}
|
||||||
.JobSubmission-revertButton:hover{
|
.JobSubmission-revertButton:hover{
|
||||||
background-color: @default-link-hov;
|
background-color: @default-bg;
|
||||||
color: @default-bg;
|
color: @default-link-hov;
|
||||||
}
|
}
|
||||||
.JobSubmission-selectedItem {
|
.JobSubmission-selectedItem {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex: 1 0 auto;
|
flex: 1 0 auto;
|
||||||
margin-bottom: 15px;
|
margin-bottom: 15px;
|
||||||
|
align-items: baseline;
|
||||||
}
|
}
|
||||||
.JobSubmission-selectedItemInfo {
|
.JobSubmission-selectedItemInfo {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex: 1 0 auto;
|
flex: 0 0 auto;
|
||||||
}
|
}
|
||||||
.JobSubmission-selectedItemRevert {
|
.JobSubmission-selectedItemRevert {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|||||||
@@ -280,7 +280,14 @@ export default
|
|||||||
if($scope.ask_inventory_on_launch) {
|
if($scope.ask_inventory_on_launch) {
|
||||||
var inventory_url = GetBasePath('inventory');
|
var inventory_url = GetBasePath('inventory');
|
||||||
|
|
||||||
GenerateList.inject(InventoryList, {
|
var invList = _.cloneDeep(InventoryList);
|
||||||
|
invList.fields.status.searchable = false;
|
||||||
|
invList.fields.organization.searchable = false;
|
||||||
|
invList.fields.has_inventory_sources.searchable = false;
|
||||||
|
invList.fields.has_active_failures.searchable = false;
|
||||||
|
invList.fields.inventory_sources_with_failures.searchable = false;
|
||||||
|
|
||||||
|
GenerateList.inject(invList, {
|
||||||
mode: 'lookup',
|
mode: 'lookup',
|
||||||
id: 'job-submission-inventory-lookup',
|
id: 'job-submission-inventory-lookup',
|
||||||
scope: $scope,
|
scope: $scope,
|
||||||
@@ -320,7 +327,11 @@ export default
|
|||||||
if($scope.ask_credential_on_launch) {
|
if($scope.ask_credential_on_launch) {
|
||||||
var credential_url = GetBasePath('credentials') + '?kind=ssh';
|
var credential_url = GetBasePath('credentials') + '?kind=ssh';
|
||||||
|
|
||||||
GenerateList.inject(CredentialList, {
|
var credList = _.cloneDeep(CredentialList);
|
||||||
|
credList.fields.description.searchable = false;
|
||||||
|
credList.fields.kind.searchable = false;
|
||||||
|
|
||||||
|
GenerateList.inject(credList, {
|
||||||
mode: 'lookup',
|
mode: 'lookup',
|
||||||
id: 'job-submission-credential-lookup',
|
id: 'job-submission-credential-lookup',
|
||||||
scope: $scope,
|
scope: $scope,
|
||||||
@@ -448,7 +459,7 @@ export default
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if($scope.step === "credential") {
|
else if($scope.step === "credential") {
|
||||||
if($scope.selected_credential && $scope.forms.credentialpasswords.$valid) {
|
if($scope.selected_credential && $scope.forms.credentialpasswords && $scope.forms.credentialpasswords.$valid) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|||||||
@@ -26,7 +26,7 @@
|
|||||||
<span class="JobSubmission-selectedItemNone" ng-show="!selected_inventory">None selected</span>
|
<span class="JobSubmission-selectedItemNone" ng-show="!selected_inventory">None selected</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="JobSubmission-selectedItemRevert" ng-if="ask_inventory_on_launch && has_default_inventory">
|
<div class="JobSubmission-selectedItemRevert" ng-if="ask_inventory_on_launch && has_default_inventory">
|
||||||
<button class="btn btn-xs JobSubmission-revertButton" ng-disabled="selected_inventory.id === defaults.inventory.id" ng-click="revertToDefaultInventory()">REVERT TO DEFAULT</button>
|
<button class="btn btn-xs JobSubmission-revertButton" ng-hide="selected_inventory.id === defaults.inventory.id" ng-click="revertToDefaultInventory()">REVERT TO DEFAULT</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div id="job-submission-inventory-lookup"></div>
|
<div id="job-submission-inventory-lookup"></div>
|
||||||
@@ -41,7 +41,7 @@
|
|||||||
<span class="JobSubmission-selectedItemNone" ng-show="!selected_credential">None selected</span>
|
<span class="JobSubmission-selectedItemNone" ng-show="!selected_credential">None selected</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="JobSubmission-selectedItemRevert" ng-if="ask_credential_on_launch && has_default_credential">
|
<div class="JobSubmission-selectedItemRevert" ng-if="ask_credential_on_launch && has_default_credential">
|
||||||
<button class="btn btn-xs JobSubmission-revertButton" ng-disabled="selected_credential.id === defaults.credential.id" ng-click="revertToDefaultCredential()">REVERT TO DEFAULT</button>
|
<button class="btn btn-xs JobSubmission-revertButton" ng-hide="selected_credential.id === defaults.credential.id" ng-click="revertToDefaultCredential()">REVERT TO DEFAULT</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div id="job-submission-credential-lookup"></div>
|
<div id="job-submission-credential-lookup"></div>
|
||||||
|
|||||||
@@ -37,10 +37,10 @@ export default
|
|||||||
searchType: 'select',
|
searchType: 'select',
|
||||||
nosort: true,
|
nosort: true,
|
||||||
searchOptions: [
|
searchOptions: [
|
||||||
{ name: "Success", value: "successful" },
|
{ label: "Success", value: "successful" },
|
||||||
{ name: "Error", value: "error" },
|
{ label: "Error", value: "error" },
|
||||||
{ name: "Failed", value: "failed" },
|
{ label: "Failed", value: "failed" },
|
||||||
{ name: "Canceled", value: "canceled" }
|
{ label: "Canceled", value: "canceled" }
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
id: {
|
id: {
|
||||||
@@ -74,7 +74,7 @@ export default
|
|||||||
link: false,
|
link: false,
|
||||||
columnClass: "col-lg-2 col-md-2 hidden-sm hidden-xs",
|
columnClass: "col-lg-2 col-md-2 hidden-sm hidden-xs",
|
||||||
columnShow: "showJobType",
|
columnShow: "showJobType",
|
||||||
searchable: true,
|
searchOnly: true,
|
||||||
searchType: 'select',
|
searchType: 'select',
|
||||||
searchOptions: [] // populated via GetChoices() in controller
|
searchOptions: [] // populated via GetChoices() in controller
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -52,7 +52,8 @@ export default
|
|||||||
key: true,
|
key: true,
|
||||||
ngClick: "groupSelect(group.id)",
|
ngClick: "groupSelect(group.id)",
|
||||||
columnClass: 'col-lg-3 col-md-3 col-sm-3 col-xs-3',
|
columnClass: 'col-lg-3 col-md-3 col-sm-3 col-xs-3',
|
||||||
class: 'InventoryManage-breakWord'
|
class: 'InventoryManage-breakWord',
|
||||||
|
searchLabel: 'name'
|
||||||
},
|
},
|
||||||
total_groups: {
|
total_groups: {
|
||||||
nosort: true,
|
nosort: true,
|
||||||
@@ -61,31 +62,31 @@ export default
|
|||||||
ngHide: 'group.total_groups == 0',
|
ngHide: 'group.total_groups == 0',
|
||||||
noLink: true,
|
noLink: true,
|
||||||
awToolTip: "{{group.name}} contains {{group.total_groups}} {{group.total_groups === 1 ? 'child' : 'children'}}",
|
awToolTip: "{{group.name}} contains {{group.total_groups}} {{group.total_groups === 1 ? 'child' : 'children'}}",
|
||||||
|
searchable: false,
|
||||||
},
|
},
|
||||||
source: {
|
source: {
|
||||||
label: 'Source',
|
label: 'Source',
|
||||||
searchType: 'select',
|
searchType: 'select',
|
||||||
searchOptions: [{
|
searchOptions: [{
|
||||||
name: "Amazon Web Services",
|
label: "Amazon Web Services",
|
||||||
value: "ec2"
|
value: "ec2"
|
||||||
}, {
|
}, {
|
||||||
name: "none",
|
label: "none",
|
||||||
value: ""
|
value: ""
|
||||||
}, {
|
}, {
|
||||||
name: "Rackspace",
|
label: "Rackspace",
|
||||||
value: "rax"
|
value: "rax"
|
||||||
},{
|
},{
|
||||||
name: "VMware",
|
label: "VMware",
|
||||||
value: "vmware"
|
value: "vmware"
|
||||||
},{
|
},{
|
||||||
name: "Google Compute Engine",
|
label: "Google Compute Engine",
|
||||||
value: "gce"
|
value: "gce"
|
||||||
},{
|
},{
|
||||||
name: "Microsoft Azure",
|
label: "Microsoft Azure",
|
||||||
value: "azure"
|
value: "azure"
|
||||||
},{
|
},{
|
||||||
name: "OpenStack",
|
label: "OpenStack",
|
||||||
value: "openstack"
|
value: "openstack"
|
||||||
}],
|
}],
|
||||||
sourceModel: 'inventory_source',
|
sourceModel: 'inventory_source',
|
||||||
|
|||||||
@@ -42,6 +42,7 @@ export default
|
|||||||
name: {
|
name: {
|
||||||
key: true,
|
key: true,
|
||||||
label: 'Hosts',
|
label: 'Hosts',
|
||||||
|
searchLabel: 'Name',
|
||||||
ngClick: "editHost(host.id)",
|
ngClick: "editHost(host.id)",
|
||||||
ngClass: "{ 'host-disabled-label': !host.enabled }",
|
ngClass: "{ 'host-disabled-label': !host.enabled }",
|
||||||
columnClass: 'col-lg-6 col-md-8 col-sm-8 col-xs-7',
|
columnClass: 'col-lg-6 col-md-8 col-sm-8 col-xs-7',
|
||||||
|
|||||||
@@ -51,9 +51,9 @@ export default
|
|||||||
searchable: true,
|
searchable: true,
|
||||||
searchType: 'select',
|
searchType: 'select',
|
||||||
searchOptions: [
|
searchOptions: [
|
||||||
{ value: 'inventory source', name: 'Inventory Sync' },
|
{ value: 'inventory source', label: 'Inventory Sync' },
|
||||||
{ value: 'job template', name: 'Playbook Run' },
|
{ value: 'job template', label: 'Playbook Run' },
|
||||||
{ value: 'project', name: 'SCM Update' }
|
{ value: 'project', label: 'SCM Update' }
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
next_run: {
|
next_run: {
|
||||||
|
|||||||
@@ -37,8 +37,6 @@ export default
|
|||||||
ngBindHtml: 'activity.user',
|
ngBindHtml: 'activity.user',
|
||||||
sourceModel: 'actor',
|
sourceModel: 'actor',
|
||||||
sourceField: 'username',
|
sourceField: 'username',
|
||||||
//awToolTip: "\{\{ userToolTip \}\}",
|
|
||||||
//dataPlacement: 'top',
|
|
||||||
searchPlaceholder: 'Username',
|
searchPlaceholder: 'Username',
|
||||||
searchWidget: 1,
|
searchWidget: 1,
|
||||||
columnClass: 'col-lg-3 col-md-3 col-sm-3 col-xs-3'
|
columnClass: 'col-lg-3 col-md-3 col-sm-3 col-xs-3'
|
||||||
@@ -53,207 +51,9 @@ export default
|
|||||||
actor: {
|
actor: {
|
||||||
label: 'System event',
|
label: 'System event',
|
||||||
searchOnly: true,
|
searchOnly: true,
|
||||||
searchType: 'isnull',
|
searchType: 'boolean',
|
||||||
searchWidget: 1
|
sourceModel: 'actor',
|
||||||
},
|
sourceField: 'isnull'
|
||||||
|
|
||||||
// The following fields exist to force loading each type of object into the search
|
|
||||||
// dropdown
|
|
||||||
all_objects: {
|
|
||||||
label: 'All',
|
|
||||||
searchOnly: true,
|
|
||||||
searchObject: 'all',
|
|
||||||
searchPlaceholder: 'All resources',
|
|
||||||
searchWidget: 2
|
|
||||||
},
|
|
||||||
credential_search: {
|
|
||||||
label: 'Credential',
|
|
||||||
searchOnly: true,
|
|
||||||
searchObject: 'credential',
|
|
||||||
searchPlaceholder: 'Credential name',
|
|
||||||
searchWidget: 2,
|
|
||||||
searchField: 'object1'
|
|
||||||
},
|
|
||||||
custom_inventory_search: {
|
|
||||||
label: 'Custom Inventory Script',
|
|
||||||
searchOnly: true,
|
|
||||||
searchObject: 'custom_inventory_script',
|
|
||||||
searchPlaceholder: 'Custom inventory script name',
|
|
||||||
searchWidget: 2,
|
|
||||||
searchField: 'object1'
|
|
||||||
},
|
|
||||||
group_search: {
|
|
||||||
label: 'Group',
|
|
||||||
searchOnly: true,
|
|
||||||
searchObject: 'group',
|
|
||||||
searchPlaceholder: 'Group name',
|
|
||||||
searchWidget: 2,
|
|
||||||
searchField: 'object1'
|
|
||||||
},
|
|
||||||
host_search: {
|
|
||||||
label: 'Host',
|
|
||||||
searchOnly: true,
|
|
||||||
searchObject: 'host',
|
|
||||||
searchPlaceholder: 'Host name',
|
|
||||||
searchWidget: 2,
|
|
||||||
searchField: 'object1'
|
|
||||||
},
|
|
||||||
inventory_search: {
|
|
||||||
label: 'Inventory',
|
|
||||||
searchOnly: true,
|
|
||||||
searchObject: 'inventory',
|
|
||||||
searchPlaceholder: 'Inventory name',
|
|
||||||
searchWidget: 2,
|
|
||||||
searchField: 'object1'
|
|
||||||
},
|
|
||||||
job_template_search: {
|
|
||||||
label: 'Job Template',
|
|
||||||
searchOnly: true,
|
|
||||||
searchObject: 'job_template',
|
|
||||||
searchPlaceholder: 'Job template name',
|
|
||||||
searchWidget: 2,
|
|
||||||
searchField: 'object1'
|
|
||||||
},
|
|
||||||
job_search: {
|
|
||||||
label: 'Job',
|
|
||||||
searchOnly: true,
|
|
||||||
searchObject: 'job',
|
|
||||||
searchPlaceholder: 'Job name',
|
|
||||||
//searchOnID: true,
|
|
||||||
searchWidget: 2,
|
|
||||||
searchField: 'object1'
|
|
||||||
},
|
|
||||||
organization_search: {
|
|
||||||
label: 'Organization',
|
|
||||||
searchOnly: true,
|
|
||||||
searchObject: 'organization',
|
|
||||||
searchPlaceholder: 'Organization name',
|
|
||||||
searchWidget: 2,
|
|
||||||
searchField: 'object1'
|
|
||||||
},
|
|
||||||
project_search: {
|
|
||||||
label: 'Project',
|
|
||||||
searchOnly: true,
|
|
||||||
searchObject: 'project',
|
|
||||||
searchPlaceholder: 'Project name',
|
|
||||||
searchWidget: 2,
|
|
||||||
searchField: 'object1'
|
|
||||||
},
|
|
||||||
schedule_search: {
|
|
||||||
label: 'Schedule',
|
|
||||||
searchOnly: true,
|
|
||||||
searchObject: 'schedule',
|
|
||||||
searchPlaceholder: 'Schedule name',
|
|
||||||
searchWidget: 2,
|
|
||||||
searchField: 'object1'
|
|
||||||
},
|
|
||||||
user_search: {
|
|
||||||
label: 'User',
|
|
||||||
searchOnly: true,
|
|
||||||
searchObject: 'user',
|
|
||||||
searchPlaceholder: 'Primary username',
|
|
||||||
searchWidget: 2,
|
|
||||||
searchField: 'object1'
|
|
||||||
},
|
|
||||||
|
|
||||||
// The following fields exist to force loading each type of object into the search
|
|
||||||
// dropdown
|
|
||||||
all_objects3: {
|
|
||||||
label: 'All',
|
|
||||||
searchOnly: true,
|
|
||||||
searchObject: 'all',
|
|
||||||
searchPlaceholder: 'All related resources',
|
|
||||||
searchWidget: 3,
|
|
||||||
searchField: 'object2'
|
|
||||||
},
|
|
||||||
credential_search3: {
|
|
||||||
label: 'Credential',
|
|
||||||
searchOnly: true,
|
|
||||||
searchObject: 'credential',
|
|
||||||
searchPlaceholder: 'Related credential name',
|
|
||||||
searchWidget: 3,
|
|
||||||
searchField: 'object2'
|
|
||||||
},
|
|
||||||
custom_inventory_script_search3: {
|
|
||||||
label: 'Custom Inventory Script',
|
|
||||||
searchOnly: true,
|
|
||||||
searchObject: 'custom_inventory_script',
|
|
||||||
searchPlaceholder: 'Related custom inventory script name',
|
|
||||||
searchWidget: 3,
|
|
||||||
searchField: 'object2'
|
|
||||||
},
|
|
||||||
group_search3: {
|
|
||||||
label: 'Group',
|
|
||||||
searchOnly: true,
|
|
||||||
searchObject: 'group',
|
|
||||||
searchPlaceholder: 'Related group name',
|
|
||||||
searchWidget: 3,
|
|
||||||
searchField: 'object2'
|
|
||||||
},
|
|
||||||
host_search3: {
|
|
||||||
label: 'Host',
|
|
||||||
searchOnly: true,
|
|
||||||
searchObject: 'host',
|
|
||||||
searchPlaceholder: 'Related host name',
|
|
||||||
searchWidget: 3,
|
|
||||||
searchField: 'object2'
|
|
||||||
},
|
|
||||||
inventory_search3: {
|
|
||||||
label: 'Inventory',
|
|
||||||
searchOnly: true,
|
|
||||||
searchObject: 'inventory',
|
|
||||||
searchPlaceholder: 'Related inventory name',
|
|
||||||
searchWidget: 3,
|
|
||||||
searchField: 'object2'
|
|
||||||
},
|
|
||||||
job_search3: {
|
|
||||||
label: 'Job',
|
|
||||||
searchOnly: true,
|
|
||||||
searchObject: 'job',
|
|
||||||
searchPlaceholder: 'Related job name',
|
|
||||||
//searchOnID: true,
|
|
||||||
searchWidget: 3,
|
|
||||||
searchField: 'object2'
|
|
||||||
},
|
|
||||||
job_template_search3: {
|
|
||||||
label: 'Job Template',
|
|
||||||
searchOnly: true,
|
|
||||||
searchObject: 'job_template',
|
|
||||||
searchPlaceholder: 'Related job template name',
|
|
||||||
searchWidget: 3,
|
|
||||||
searchField: 'object2'
|
|
||||||
},
|
|
||||||
organization_search3: {
|
|
||||||
label: 'Organization',
|
|
||||||
searchOnly: true,
|
|
||||||
searchObject: 'organization',
|
|
||||||
searchPlaceholder: 'Related organization name',
|
|
||||||
searchWidget: 3,
|
|
||||||
searchField: 'object2'
|
|
||||||
},
|
|
||||||
project_search3: {
|
|
||||||
label: 'Project',
|
|
||||||
searchOnly: true,
|
|
||||||
searchObject: 'project',
|
|
||||||
searchPlaceholder: 'Related project name',
|
|
||||||
searchWidget: 3,
|
|
||||||
searchField: 'object2'
|
|
||||||
},
|
|
||||||
schedule_search3: {
|
|
||||||
label: 'Schedule',
|
|
||||||
searchOnly: true,
|
|
||||||
searchObject: 'schedule',
|
|
||||||
searchPlaceholder: 'Schedule name',
|
|
||||||
searchWidget: 3,
|
|
||||||
searchField: 'object1'
|
|
||||||
},
|
|
||||||
user_search3: {
|
|
||||||
label: 'User',
|
|
||||||
searchOnly: true,
|
|
||||||
searchObject: 'user',
|
|
||||||
searchPlaceholder: 'Related username',
|
|
||||||
searchWidget: 3,
|
|
||||||
searchField: 'object2'
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ export default ['Rest', 'ProcessErrors', 'generateList',
|
|||||||
|
|
||||||
var parent_scope = params.scope,
|
var parent_scope = params.scope,
|
||||||
form = params.form,
|
form = params.form,
|
||||||
list = params.list,
|
list = _.cloneDeep(params.list),
|
||||||
field = params.field,
|
field = params.field,
|
||||||
instructions = params.instructions,
|
instructions = params.instructions,
|
||||||
postAction = params.postAction,
|
postAction = params.postAction,
|
||||||
@@ -132,6 +132,7 @@ export default ['Rest', 'ProcessErrors', 'generateList',
|
|||||||
master[field] = scope[field];
|
master[field] = scope[field];
|
||||||
master[form.fields[field].sourceModel + '_' + form.fields[field].sourceField] =
|
master[form.fields[field].sourceModel + '_' + form.fields[field].sourceField] =
|
||||||
scope[form.fields[field].sourceModel + '_' + form.fields[field].sourceField];
|
scope[form.fields[field].sourceModel + '_' + form.fields[field].sourceField];
|
||||||
|
list.searchSize = 'col-lg-12 col-md-12 col-sm-12 col-xs-12';
|
||||||
GenerateList.inject(list, {
|
GenerateList.inject(list, {
|
||||||
mode: 'lookup',
|
mode: 'lookup',
|
||||||
id: 'LookupModal-dialog',
|
id: 'LookupModal-dialog',
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ export default {
|
|||||||
controller: 'managementJobsCardController',
|
controller: 'managementJobsCardController',
|
||||||
data: {
|
data: {
|
||||||
activityStream: true,
|
activityStream: true,
|
||||||
activityStreamTarget: 'management_job'
|
activityStreamTarget: 'job'
|
||||||
},
|
},
|
||||||
ncyBreadcrumb: {
|
ncyBreadcrumb: {
|
||||||
parent: 'setup',
|
parent: 'setup',
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ export default function(){
|
|||||||
index: false,
|
index: false,
|
||||||
hover: false,
|
hover: false,
|
||||||
emptyListText: 'No Notifications exist',
|
emptyListText: 'No Notifications exist',
|
||||||
basePath: 'notifications',
|
basePath: 'notification_templates',
|
||||||
fields: {
|
fields: {
|
||||||
name: {
|
name: {
|
||||||
key: true,
|
key: true,
|
||||||
|
|||||||
@@ -19,6 +19,7 @@ export default [
|
|||||||
SchedulesList, Rest, ProcessErrors, ReturnToCaller, ClearScope,
|
SchedulesList, Rest, ProcessErrors, ReturnToCaller, ClearScope,
|
||||||
GetBasePath, Wait, Find, LoadSchedulesScope, GetChoices,
|
GetBasePath, Wait, Find, LoadSchedulesScope, GetChoices,
|
||||||
$q) {
|
$q) {
|
||||||
|
var schedList = _.cloneDeep(SchedulesList);
|
||||||
|
|
||||||
ClearScope();
|
ClearScope();
|
||||||
|
|
||||||
@@ -51,16 +52,18 @@ export default [
|
|||||||
}
|
}
|
||||||
$scope.removeParentLoaded = $scope.$on('ParentLoaded', function() {
|
$scope.removeParentLoaded = $scope.$on('ParentLoaded', function() {
|
||||||
url += "schedules/";
|
url += "schedules/";
|
||||||
SchedulesList.well = true;
|
schedList.well = true;
|
||||||
|
|
||||||
// include name of item in listTitle
|
// include name of item in listTitle
|
||||||
SchedulesList.listTitle = title ? title : parentObject.name;
|
schedList.listTitle = title ? title : parentObject.name;
|
||||||
SchedulesList.listTitle = `${SchedulesList.listTitle}<div class='List-titleLockup'></div>Schedules`;
|
schedList.listTitle = `${schedList.listTitle}<div class='List-titleLockup'></div>Schedules`;
|
||||||
|
|
||||||
|
schedList.basePath = parentObject.url + "schedules";
|
||||||
|
|
||||||
LoadSchedulesScope({
|
LoadSchedulesScope({
|
||||||
parent_scope: $scope,
|
parent_scope: $scope,
|
||||||
scope: $scope,
|
scope: $scope,
|
||||||
list: SchedulesList,
|
list: schedList,
|
||||||
id: 'schedule-list-target',
|
id: 'schedule-list-target',
|
||||||
url: url,
|
url: url,
|
||||||
pageSize: 20
|
pageSize: 20
|
||||||
|
|||||||
@@ -30,7 +30,6 @@
|
|||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
max-height: 400px;
|
max-height: 400px;
|
||||||
width: 120px;
|
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
text-transform: uppercase;
|
text-transform: uppercase;
|
||||||
}
|
}
|
||||||
@@ -40,8 +39,6 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.TagSearch-typeDropdownName {
|
.TagSearch-typeDropdownName {
|
||||||
width: 66px;
|
|
||||||
text-overflow: ellipsis;
|
|
||||||
display: block;
|
display: block;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
@@ -80,6 +77,7 @@
|
|||||||
.TagSearch-dropdownItem {
|
.TagSearch-dropdownItem {
|
||||||
padding: 5px 10px;
|
padding: 5px 10px;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
|
text-transform: capitalize;
|
||||||
}
|
}
|
||||||
|
|
||||||
.TagSearch-dropdownItem:hover {
|
.TagSearch-dropdownItem:hover {
|
||||||
@@ -92,13 +90,13 @@
|
|||||||
|
|
||||||
.TagSearch-searchTermContainer {
|
.TagSearch-searchTermContainer {
|
||||||
flex: initial;
|
flex: initial;
|
||||||
width: ~"calc(100% - 70px)";
|
width: ~"calc(100% - 50px)";
|
||||||
border: 1px solid @d7grey;
|
border: 1px solid @d7grey;
|
||||||
border-left: 0px;
|
border-left: 0px;
|
||||||
border-top-right-radius: 5px;
|
border-top-right-radius: 5px;
|
||||||
border-bottom-right-radius: 5px;
|
border-bottom-right-radius: 5px;
|
||||||
display: flex;
|
display: flex;
|
||||||
background-color: @default-secondary-bg;
|
background-color: @default-bg;
|
||||||
}
|
}
|
||||||
|
|
||||||
.TagSearch-searchTermContainer.is-open {
|
.TagSearch-searchTermContainer.is-open {
|
||||||
|
|||||||
@@ -42,7 +42,6 @@ export default ['$scope', 'Refresh', 'tagSearchService',
|
|||||||
.updateFilteredUrl($scope.endpoint, tags, pageSize);
|
.updateFilteredUrl($scope.endpoint, tags, pageSize);
|
||||||
|
|
||||||
$scope.$parent[iterator + "_active_search"] = true;
|
$scope.$parent[iterator + "_active_search"] = true;
|
||||||
|
|
||||||
Refresh({
|
Refresh({
|
||||||
scope: listScope,
|
scope: listScope,
|
||||||
set: set,
|
set: set,
|
||||||
@@ -50,6 +49,12 @@ export default ['$scope', 'Refresh', 'tagSearchService',
|
|||||||
url: url
|
url: url
|
||||||
});
|
});
|
||||||
|
|
||||||
|
listScope.$on('PostRefresh', function() {
|
||||||
|
if (set === 'notifications') {
|
||||||
|
$scope.$emit('relatednotifications');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
$scope.currentSearchFilters = tags;
|
$scope.currentSearchFilters = tags;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -8,14 +8,15 @@
|
|||||||
<span class="TagSearch-typeDropdownName" ng-cloak>
|
<span class="TagSearch-typeDropdownName" ng-cloak>
|
||||||
{{ currentSearchType.label }}
|
{{ currentSearchType.label }}
|
||||||
</span>
|
</span>
|
||||||
<i class="TagSearch-selectDownIcon fa fa-angle-down"></i>
|
<i class="TagSearch-selectDownIcon fa fa-angle-down"
|
||||||
|
ng-hide="searchTypes.length === 1"></i>
|
||||||
</div>
|
</div>
|
||||||
<div aw-click-off="showTypeDropdown" class="TagSearch-dropdownContainer
|
<div aw-click-off="showTypeDropdown" class="TagSearch-dropdownContainer
|
||||||
TagSearch-dropdownContainer--searchTypes"
|
TagSearch-dropdownContainer--searchTypes"
|
||||||
ng-show="showTypeDropdown">
|
ng-show="showTypeDropdown">
|
||||||
<div class="TagSearch-dropdownItem"
|
<div class="TagSearch-dropdownItem"
|
||||||
ng-repeat="type in searchTypes track by $index"
|
ng-repeat="type in searchTypes track by $index"
|
||||||
ng-class="{'is-selected': (currentSearchType.value === type.value)}"
|
ng-class="{'is-selected': (currentSearchType.id === type.id)}"
|
||||||
ng-click="setSearchType(type)">
|
ng-click="setSearchType(type)">
|
||||||
{{ type.label }}
|
{{ type.label }}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -53,6 +53,9 @@ export default ['Rest', '$q', 'GetBasePath', 'Wait', 'ProcessErrors', '$log', fu
|
|||||||
|
|
||||||
var options = Object
|
var options = Object
|
||||||
.keys(list)
|
.keys(list)
|
||||||
|
.filter(function(fieldType) {
|
||||||
|
return list[fieldType].noSearch !== true;
|
||||||
|
})
|
||||||
.map(function(key, id) {
|
.map(function(key, id) {
|
||||||
return that.buildType(list[key], key, id);
|
return that.buildType(list[key], key, id);
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -1819,7 +1819,7 @@ angular.module('FormGenerator', [GeneratorHelpers.name, 'Utilities', listGenerat
|
|||||||
!(is_superuser && ${hideOnSuperuser})\">
|
!(is_superuser && ${hideOnSuperuser})\">
|
||||||
${tagSearch}
|
${tagSearch}
|
||||||
</div>
|
</div>
|
||||||
<div class=\"col-lg-4 col-md-4 col-sm-4 col-xs-12\">
|
<div class=\"col-lg-4 col-md-4 col-sm-4 col-xs-12 action_column\">
|
||||||
<div class=\"list-actions\">
|
<div class=\"list-actions\">
|
||||||
${actionButtons}
|
${actionButtons}
|
||||||
</div>
|
</div>
|
||||||
@@ -1868,36 +1868,39 @@ angular.module('FormGenerator', [GeneratorHelpers.name, 'Utilities', listGenerat
|
|||||||
`;
|
`;
|
||||||
html += (collection.index === undefined || collection.index !== false) ? "<th class=\"col-xs-1\">#</th>\n" : "";
|
html += (collection.index === undefined || collection.index !== false) ? "<th class=\"col-xs-1\">#</th>\n" : "";
|
||||||
for (fld in collection.fields) {
|
for (fld in collection.fields) {
|
||||||
html += "<th class=\"List-tableHeader list-header ";
|
if (!collection.fields[fld].searchOnly) {
|
||||||
html += (collection.fields[fld].class) ? collection.fields[fld].class : "";
|
|
||||||
html += "\" id=\"" + collection.iterator + '-' + fld + "-header\" ";
|
|
||||||
|
|
||||||
if (!collection.fields[fld].noSort) {
|
html += "<th class=\"List-tableHeader list-header ";
|
||||||
html += "ng-click=\"sort('" + collection.iterator + "', '" + fld + "')\">";
|
html += (collection.fields[fld].columnClass) ? collection.fields[fld].columnClass : "";
|
||||||
} else {
|
html += "\" id=\"" + collection.iterator + '-' + fld + "-header\" ";
|
||||||
html += ">";
|
|
||||||
}
|
|
||||||
|
|
||||||
|
if (!(collection.fields[fld].noSort || collection.fields[fld].nosort)) {
|
||||||
html += collection.fields[fld].label;
|
html += "ng-click=\"sort('" + collection.iterator + "', '" + fld + "')\">";
|
||||||
|
|
||||||
if (!collection.fields[fld].noSort) {
|
|
||||||
html += " <i class=\"";
|
|
||||||
|
|
||||||
|
|
||||||
if (collection.fields[fld].key) {
|
|
||||||
if (collection.fields[fld].desc) {
|
|
||||||
html += "fa fa-sort-down";
|
|
||||||
} else {
|
|
||||||
html += "fa fa-sort-up";
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
html += "fa fa-sort";
|
html += ">";
|
||||||
}
|
}
|
||||||
html += "\"></i>";
|
|
||||||
}
|
|
||||||
|
|
||||||
html += "</a></th>\n";
|
|
||||||
|
html += collection.fields[fld].label;
|
||||||
|
|
||||||
|
if (!(collection.fields[fld].noSort || collection.fields[fld].nosort)) {
|
||||||
|
html += " <i class=\"";
|
||||||
|
|
||||||
|
|
||||||
|
if (collection.fields[fld].key) {
|
||||||
|
if (collection.fields[fld].desc) {
|
||||||
|
html += "fa fa-sort-down";
|
||||||
|
} else {
|
||||||
|
html += "fa fa-sort-up";
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
html += "fa fa-sort";
|
||||||
|
}
|
||||||
|
html += "\"></i>";
|
||||||
|
}
|
||||||
|
|
||||||
|
html += "</a></th>\n";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (collection.fieldActions) {
|
if (collection.fieldActions) {
|
||||||
html += "<th class=\"List-tableHeader List-tableHeader--actions\">Actions</th>\n";
|
html += "<th class=\"List-tableHeader List-tableHeader--actions\">Actions</th>\n";
|
||||||
@@ -1920,13 +1923,15 @@ angular.module('FormGenerator', [GeneratorHelpers.name, 'Utilities', listGenerat
|
|||||||
base = (collection.base) ? collection.base : itm;
|
base = (collection.base) ? collection.base : itm;
|
||||||
base = base.replace(/^\//, '');
|
base = base.replace(/^\//, '');
|
||||||
for (fld in collection.fields) {
|
for (fld in collection.fields) {
|
||||||
cnt++;
|
if (!collection.fields[fld].searchOnly) {
|
||||||
html += Column({
|
cnt++;
|
||||||
list: collection,
|
html += Column({
|
||||||
fld: fld,
|
list: collection,
|
||||||
options: options,
|
fld: fld,
|
||||||
base: base
|
options: options,
|
||||||
});
|
base: base
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Row level actions
|
// Row level actions
|
||||||
|
|||||||
@@ -4,30 +4,36 @@
|
|||||||
* All Rights Reserved
|
* All Rights Reserved
|
||||||
*************************************************/
|
*************************************************/
|
||||||
|
|
||||||
export default ['$http', function($http) {
|
export default ['$http', '$q', function($http, $q) {
|
||||||
return {
|
return {
|
||||||
getInitialPageForList: function(id, url, pageSize) {
|
getInitialPageForList: function(id, url, pageSize) {
|
||||||
// get the name of the object
|
// get the name of the object
|
||||||
return $http.get(url + "?id=" + id)
|
if ($.isNumeric(id)) {
|
||||||
.then(function (data) {
|
return $http.get(url + "?id=" + id)
|
||||||
var queryValue, queryType;
|
.then(function (data) {
|
||||||
if (data.data.results[0].type === "user") {
|
var queryValue, queryType;
|
||||||
queryValue = data.data.results[0].username;
|
if (data.data.results[0].type === "user") {
|
||||||
queryType = "username";
|
queryValue = data.data.results[0].username;
|
||||||
} else {
|
queryType = "username";
|
||||||
queryValue = data.data.results[0].name;
|
} else {
|
||||||
queryType = "name";
|
queryValue = data.data.results[0].name;
|
||||||
}
|
queryType = "name";
|
||||||
// get how many results are less than or equal to
|
}
|
||||||
// the name
|
// get how many results are less than or equal to
|
||||||
return $http.get(url + "?" + queryType + "__lte=" + queryValue)
|
// the name
|
||||||
.then(function (data) {
|
return $http.get(url + "?" + queryType + "__lte=" + queryValue)
|
||||||
// divide by the page size to get what
|
.then(function (data) {
|
||||||
// page the data should be on
|
// divide by the page size to get what
|
||||||
var count = data.data.count;
|
// page the data should be on
|
||||||
return Math.ceil(count/parseInt(pageSize));
|
var count = data.data.count;
|
||||||
});
|
return Math.ceil(count/parseInt(pageSize));
|
||||||
});
|
});
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
var defer = $q.defer();
|
||||||
|
defer.resolve(1);
|
||||||
|
return(defer.promise);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}];
|
}];
|
||||||
|
|||||||
@@ -272,7 +272,7 @@ angular.module('StreamWidget', ['RestServices', 'Utilities', 'StreamListDefiniti
|
|||||||
BuildDescription, FixUrl, BuildUrl, ShowDetail, setStreamHeight) {
|
BuildDescription, FixUrl, BuildUrl, ShowDetail, setStreamHeight) {
|
||||||
return function (params) {
|
return function (params) {
|
||||||
|
|
||||||
var list = StreamList,
|
var list = _.cloneDeep(StreamList),
|
||||||
defaultUrl = GetBasePath('activity_stream'),
|
defaultUrl = GetBasePath('activity_stream'),
|
||||||
view = GenerateList,
|
view = GenerateList,
|
||||||
parent_scope = params.scope,
|
parent_scope = params.scope,
|
||||||
@@ -292,11 +292,109 @@ angular.module('StreamWidget', ['RestServices', 'Utilities', 'StreamListDefiniti
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
// We just have a type
|
// We just have a type
|
||||||
defaultUrl += '?or__object1=' + $state.params.target + '&or__object2=' + $state.params.target;
|
if ($state.params.target === 'inventory_script') {
|
||||||
|
defaultUrl += '?or__object1=custom_inventory_script&or__object2=custom_inventory_script';
|
||||||
|
} else if ($state.params.target === 'management_job') {
|
||||||
|
defaultUrl += '?or__object1=job&or__object2=job';
|
||||||
|
} else {
|
||||||
|
defaultUrl += '?or__object1=' + $state.params.target + '&or__object2=' + $state.params.target;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($state.params.target === 'credential') {
|
||||||
|
list.fields.customSearchField = {
|
||||||
|
label: 'Credential',
|
||||||
|
searchType: 'text',
|
||||||
|
searchOnly: 'true',
|
||||||
|
sourceModel: 'credential',
|
||||||
|
sourceField: 'name'
|
||||||
|
};
|
||||||
|
} else if ($state.params.target === 'host') {
|
||||||
|
list.fields.customSearchField = {
|
||||||
|
label: 'Host',
|
||||||
|
searchType: 'text',
|
||||||
|
searchOnly: 'true',
|
||||||
|
sourceModel: 'host',
|
||||||
|
sourceField: 'name'
|
||||||
|
};
|
||||||
|
} else if ($state.params.target === 'inventory') {
|
||||||
|
list.fields.customSearchField = {
|
||||||
|
label: 'Inventory',
|
||||||
|
searchType: 'text',
|
||||||
|
searchOnly: 'true',
|
||||||
|
sourceModel: 'inventory',
|
||||||
|
sourceField: 'name'
|
||||||
|
};
|
||||||
|
} else if ($state.params.target === 'inventory_script') {
|
||||||
|
list.fields.customSearchField = {
|
||||||
|
label: 'Inventory Script',
|
||||||
|
searchType: 'text',
|
||||||
|
searchOnly: 'true',
|
||||||
|
sourceModel: 'custom_inventory_script',
|
||||||
|
sourceField: 'name'
|
||||||
|
};
|
||||||
|
} else if ($state.params.target === 'job_template') {
|
||||||
|
list.fields.customSearchField = {
|
||||||
|
label: 'Job Template',
|
||||||
|
searchType: 'text',
|
||||||
|
searchOnly: 'true',
|
||||||
|
sourceModel: 'job_template',
|
||||||
|
sourceField: 'name'
|
||||||
|
};
|
||||||
|
} else if ($state.params.target === 'job') {
|
||||||
|
list.fields.customSearchField = {
|
||||||
|
label: 'Job',
|
||||||
|
searchType: 'text',
|
||||||
|
searchOnly: 'true',
|
||||||
|
sourceModel: 'job',
|
||||||
|
sourceField: 'name'
|
||||||
|
};
|
||||||
|
} else if ($state.params.target === 'organization') {
|
||||||
|
list.fields.customSearchField = {
|
||||||
|
label: 'Organization',
|
||||||
|
searchType: 'text',
|
||||||
|
searchOnly: 'true',
|
||||||
|
sourceModel: 'organization',
|
||||||
|
sourceField: 'name'
|
||||||
|
};
|
||||||
|
} else if ($state.params.target === 'project') {
|
||||||
|
list.fields.customSearchField = {
|
||||||
|
label: 'Project',
|
||||||
|
searchType: 'text',
|
||||||
|
searchOnly: 'true',
|
||||||
|
sourceModel: 'project',
|
||||||
|
sourceField: 'name'
|
||||||
|
};
|
||||||
|
} else if ($state.params.target === 'schedule') {
|
||||||
|
list.fields.customSearchField = {
|
||||||
|
label: 'Schedule',
|
||||||
|
searchType: 'text',
|
||||||
|
searchOnly: 'true',
|
||||||
|
sourceModel: 'schedule',
|
||||||
|
sourceField: 'name'
|
||||||
|
};
|
||||||
|
} else if ($state.params.target === 'team') {
|
||||||
|
list.fields.customSearchField = {
|
||||||
|
label: 'Team',
|
||||||
|
searchType: 'text',
|
||||||
|
searchOnly: 'true',
|
||||||
|
sourceModel: 'team',
|
||||||
|
sourceField: 'name'
|
||||||
|
};
|
||||||
|
} else if ($state.params.target === 'user') {
|
||||||
|
list.fields.customSearchField = {
|
||||||
|
label: 'User',
|
||||||
|
searchType: 'text',
|
||||||
|
searchOnly: 'true',
|
||||||
|
sourceModel: 'user',
|
||||||
|
sourceField: 'username'
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
list.basePath = defaultUrl;
|
||||||
|
|
||||||
// Generate the list
|
// Generate the list
|
||||||
view.inject(list, { mode: 'edit', id: 'stream-content', searchSize: 'col-lg-4 col-md-4 col-sm-12 col-xs-12', secondWidget: true, activityStream: true, scope: scope });
|
view.inject(list, { mode: 'edit', id: 'stream-content', searchSize: 'col-lg-4 col-md-4 col-sm-12 col-xs-12', secondWidget: true, activityStream: true, scope: scope });
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user