Small improvements on Cockpit-Node

This commit is contained in:
Jan Oberhauser
2020-04-06 10:03:49 +02:00
parent 30e5960248
commit 7e17486383
6 changed files with 84 additions and 58 deletions

View File

@@ -8,7 +8,7 @@ export const collectionOperations = [
displayOptions: {
show: {
resource: [
'collections',
'collection',
],
},
},
@@ -46,7 +46,7 @@ export const collectionFields = [
displayOptions: {
show: {
resource: [
'collections',
'collection',
],
},
},
@@ -54,7 +54,7 @@ export const collectionFields = [
description: 'Name of the collection to operate on.'
},
// Collections:entry:create
// Collection:entry:create
{
displayName: 'Data',
name: 'data',
@@ -67,7 +67,7 @@ export const collectionFields = [
displayOptions: {
show: {
resource: [
'collections',
'collection',
],
operation: [
'create',
@@ -77,7 +77,48 @@ export const collectionFields = [
description: 'The data to create.',
},
// Collections:entry:getAll
// Collection:entry:getAll
{
displayName: 'Return All',
name: 'returnAll',
type: 'boolean',
displayOptions: {
show: {
operation: [
'getAll',
],
resource: [
'collection',
],
},
},
default: false,
description: 'If all results should be returned or only up to a given limit.',
},
{
displayName: 'Limit',
name: 'limit',
type: 'number',
displayOptions: {
show: {
operation: [
'getAll',
],
resource: [
'collection',
],
returnAll: [
false,
],
},
},
typeOptions: {
minValue: 1,
maxValue: 500,
},
default: 100,
description: 'How many results to return.',
},
{
displayName: 'Options',
name: 'options',
@@ -87,7 +128,7 @@ export const collectionFields = [
displayOptions: {
show: {
resource: [
'collections',
'collection',
],
operation: [
'getAll',
@@ -122,13 +163,6 @@ export const collectionFields = [
default: '',
description: 'Return normalized language fields.',
},
{
displayName: 'Limit',
name: 'limit',
type: 'number',
default: '',
description: 'Limit number of returned entries.',
},
{
displayName: 'Populate',
name: 'populate',
@@ -144,14 +178,6 @@ export const collectionFields = [
default: false,
description: `Returns the data exactly in the way it got received from the API.`,
},
{
displayName: 'Simple',
name: 'simple',
type: 'boolean',
required: true,
default: true,
description: 'Return only result entries.',
},
{
displayName: 'Skip',
name: 'skip',
@@ -169,7 +195,7 @@ export const collectionFields = [
],
},
// Collections:entry:update
// Collection:entry:update
{
displayName: 'Entry ID',
name: 'id',
@@ -179,7 +205,7 @@ export const collectionFields = [
displayOptions: {
show: {
resource: [
'collections',
'collection',
],
operation: [
'update',
@@ -200,7 +226,7 @@ export const collectionFields = [
displayOptions: {
show: {
resource: [
'collections',
'collection',
],
operation: [
'update',