feat: 🎸 update the tags badge in workers list view (#1326)
* feat: 🎸 update the tags badge in workers list view ✅ Closes: ICU-6035
This commit is contained in:
1 parent
346e0d356a
commit
82bbe798fd
6 files changed
+54
-14
No files matched your search
@@ -21,6 +21,21 @@ export default class WorkerModel extends GeneratedWorkerModel {
|
||||
return this.type === 'pki';
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the number of config tags present on the worker.
|
||||
* @type {number}
|
||||
*/
|
||||
get tagCount() {
|
||||
if (!this.config_tags) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
return Object.values(this.config_tags).reduce(
|
||||
(previousCount, currentTags) => previousCount + currentTags.length,
|
||||
0
|
||||
);
|
||||
}
|
||||
|
||||
@attr({
|
||||
description:
|
||||
'The deduplicated union of the tags reported by the worker ' +
|
||||
|
||||
Reference in new issue
Block a user