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!
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

29 lines
591B

  1. //
  2. // Copyright (C) Stanislaw Adaszewski, 2020
  3. // Contact: s.adaszewski@gmail.com
  4. // Website: https://adared.ch/wba
  5. // License: GNU Affero General Public License, Version 3
  6. //
  7. const typeIdToName = {
  8. 'tpzed': 'user',
  9. 'j7d0g': 'group',
  10. 'xvhdp': 'container_request',
  11. 'dz642': 'container',
  12. '7fd4e': 'workflow',
  13. 'ozdt8': 'api_client',
  14. '4zz18': 'collection'
  15. };
  16. function arvadosTypeName(id) {
  17. if (!id)
  18. return;
  19. if (id.length === 5)
  20. return typeIdToName[id];
  21. else
  22. return typeIdToName[id.split('-')[1]];
  23. }
  24. export default arvadosTypeName;