|
12345678910111213141516171819202122232425262728 |
- //
- // Copyright (C) Stanislaw Adaszewski, 2020
- // Contact: s.adaszewski@gmail.com
- // Website: https://adared.ch/wba
- // License: GNU Affero General Public License, Version 3
- //
-
- const typeIdToName = {
- 'tpzed': 'user',
- 'j7d0g': 'group',
- 'xvhdp': 'container_request',
- 'dz642': 'container',
- '7fd4e': 'workflow',
- 'ozdt8': 'api_client',
- '4zz18': 'collection'
- };
-
- function arvadosTypeName(id) {
- if (!id)
- return;
-
- if (id.length === 5)
- return typeIdToName[id];
- else
- return typeIdToName[id.split('-')[1]];
- }
-
- export default arvadosTypeName;
|