Skip to content

Commit

Permalink
fix: better ui and credentials
Browse files Browse the repository at this point in the history
  • Loading branch information
saintsebastian committed Dec 21, 2021
1 parent f96c599 commit 9bf4f20
Showing 1 changed file with 19 additions and 22 deletions.
41 changes: 19 additions & 22 deletions packages/nodes-base/nodes/Jenkins/Jenkins.node.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,14 @@ export class Jenkins implements INodeType {
name: 'JenkinsApi',
required: true,
testedBy: 'buildsGetApiTest',
displayOptions: {
hide: {
operation: [
'trigger',
'triggerParams',
],
},
},
},
],
properties: [
Expand Down Expand Up @@ -326,7 +334,7 @@ export class Jenkins implements INodeType {
},
options: [
{
name: 'Get All Builds',
name: 'Get All',
value: 'build:getAll',
description: 'List Builds',
},
Expand All @@ -335,24 +343,6 @@ export class Jenkins implements INodeType {
description: 'Build operation',
noDataExpression: true,
},
{
displayName: 'Depth',
name: 'depth',
type: 'number',
displayOptions: {
show: {
resource: [
'build',
],
operation: [
'build:getAll',
],
},
},
required: true,
default: 1,
description: '',
},
{
displayName: 'Filters',
name: 'filters',
Expand All @@ -370,6 +360,13 @@ export class Jenkins implements INodeType {
},
},
options: [
{
displayName: 'Depth',
name: 'depth',
type: 'number',
default: 1,
description: 'Number depth parameter',
},
{
displayName: 'Tree',
name: 'tree',
Expand Down Expand Up @@ -532,16 +529,16 @@ export class Jenkins implements INodeType {
if (resource === 'build') {
if (operation === 'build:getAll') {
const endpoint = `${baseUrl}/api/xml`;
const depth = this.getNodeParameter('depth', i) as number;

const filters = this.getNodeParameter('filters', i) as IDataObject;

const tree = filters.tree as string ;
const xpath = filters.xpath as string;
const exclude = filters.exclude as string;
const depth = filters.depth as number;


const queryParams = {
depth,
depth: depth ? depth : 1,
tree,
xpath,
exclude,
Expand Down

0 comments on commit 9bf4f20

Please sign in to comment.