IF YOU WOULD LIKE TO GET AN ACCOUNT, please write an email to s dot adaszewski at gmail dot com. User accounts are meant only to report issues and/or generate pull requests. This is a purpose-specific Git hosting for ADARED projects. Thank you for your understanding!
Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

arvados-object-name.js 538B

1234567891011121314151617181920
  1. //
  2. // Copyright (C) Stanislaw Adaszewski, 2020
  3. // Contact: s.adaszewski@gmail.com
  4. // Website: https://adared.ch/wba
  5. // License: GPLv3
  6. //
  7. import arvadosTypeName from 'arvados-type-name';
  8. function arvadosObjectName(item) {
  9. let typeName = arvadosTypeName(item['uuid']);
  10. if (typeName === 'user')
  11. return (item.first_name + ' ' + item.last_name);
  12. else if (typeName === 'container')
  13. return ('Container running image ' + item.container_image);
  14. else
  15. return item.name;
  16. }
  17. export default arvadosObjectName;