const Labels = {
  type: 'object',
  title: 'Labels',
  properties: {
    items: {
      type: 'array',
      duplicable: true,
      addLabel: 'Add Label',
      getter(job) {
        let labels = job.getLabels() || {};

        return Object.keys(labels).map(function (key) {
          return {
            key,
            value: labels[key]
          };
        });
      },
      itemShape: {
        properties: {
          key: {
            title: 'Label Name',
            type: 'string'
          },
          value: {
            title: 'Label Value',
            type: 'string'
          }
        }
      }
    }
  }
};

module.exports = Labels;

const Labels = {
  type: 'object',
  title: 'Labels',
  description: 'Attach metadata to jobs to expose additional information to other jobs.',
  properties: {
    items: {
      type: 'array',
      duplicable: true,
      addLabel: 'Add Label',
      getter(job) {
        let labels = job.getLabels() || {};

        return Object.keys(labels).map(function (key) {
          return {
            key,
            value: labels[key]
          };
        });
      },
      itemShape: {
        properties: {
          key: {
            title: 'Label Name',
            type: 'string'
          },
          value: {
            title: 'Label Value',
            type: 'string'
          }
        }
      }
    }
  }
};

module.exports = Labels;

Add job label description equal to service label description
Add job label description equal to service label description
