diff --git a/src/i18n/locales/de.json b/src/i18n/locales/de.json index e9831aa0..eeffbc1c 100644 --- a/src/i18n/locales/de.json +++ b/src/i18n/locales/de.json @@ -471,6 +471,7 @@ "delete": "Löschen", "delete_license_group": "Lizenzgruppe löschen", "delete_policy": "Richtlinie löschen", + "delete_selected": "Ausgewählte Elemente löschen", "dependency_graph": "Abhängigkeitsdiagramm", "deprecated": "Veraltet", "description": "Beschreibung", @@ -479,6 +480,7 @@ "direction": "Richtung", "download_bom": "BOM herunterladen", "email": "E-Mail", + "empty_selection": "Keine Elemente ausgewählt", "endpoints": "Endpunkte", "epss": "EPSS", "epss_percentile": "EPSS-Perzentil", @@ -779,6 +781,7 @@ "select_license": "Lizenz auswählen", "select_project": "Projekt auswählen", "select_tag": "Tag auswählen", + "selection_deleted": "Auswahl gelöscht", "service_deleted": "Dienst gelöscht", "service_details": "Leistungsdetails", "service_name": "Dienstname", @@ -809,6 +812,7 @@ "swid_tagid": "SWID-Tag-ID", "switch_view": "Während der Suche kann die Ansicht nicht gewechselt werden", "tag_name": "Verlinke den Namen", + "tag_unassigned_successfully": "Tag-Zuweisung erfolgreich aufgehoben", "tags": "Stichworte", "template": "Vorlage", "text_search": "Textsuche", @@ -819,6 +823,7 @@ "total_findings_excluding_aliases": "Gesamtanzahl der Funde (ohne Aliase)", "total_findings_including_aliases": "Gesamtanzahl der Funde (einschließlich Aliase)", "type": "Typ", + "unassign_tag_from_selection": "Tag-Zuweisung für Auswahl aufheben", "update": "Aktualisieren", "update_details": "Details zum Update", "updated": "Aktualisiert", diff --git a/src/i18n/locales/en.json b/src/i18n/locales/en.json index 1b791d40..585508a5 100644 --- a/src/i18n/locales/en.json +++ b/src/i18n/locales/en.json @@ -471,6 +471,7 @@ "delete": "Delete", "delete_license_group": "Delete License Group", "delete_policy": "Delete Policy", + "delete_selected": "Delete selected items", "dependency_graph": "Dependency Graph", "deprecated": "Deprecated", "description": "Description", @@ -479,6 +480,7 @@ "direction": "Direction", "download_bom": "Download BOM", "email": "Email", + "empty_selection": "No items selected", "endpoints": "Endpoints", "epss": "EPSS", "epss_percentile": "EPSS Percentile", @@ -779,6 +781,7 @@ "select_license": "Select License", "select_project": "Select Project", "select_tag": "Select Tag", + "selection_deleted": "Selection deleted", "service_deleted": "Service deleted", "service_details": "Service Details", "service_name": "Service name", @@ -809,6 +812,7 @@ "swid_tagid": "SWID Tag ID", "switch_view": "Cannot switch view while searching", "tag_name": "Tag Name", + "tag_unassigned_successfully": "Untagged successfully", "tags": "Tags", "template": "Template", "text_search": "Text Search", @@ -819,6 +823,7 @@ "total_findings_excluding_aliases": "Total Findings (excluding aliases)", "total_findings_including_aliases": "Total Findings (including aliases)", "type": "Type", + "unassign_tag_from_selection": "Unassign tag from selection", "update": "Update", "update_details": "Update Details", "updated": "Updated", diff --git a/src/i18n/locales/es.json b/src/i18n/locales/es.json index 611189d5..7fa5de77 100644 --- a/src/i18n/locales/es.json +++ b/src/i18n/locales/es.json @@ -471,6 +471,7 @@ "delete": "Borrar", "delete_license_group": "Eliminar grupo de licencias", "delete_policy": "Eliminar política", + "delete_selected": "Eliminar elementos seleccionados", "dependency_graph": "Gráfico de dependencia", "deprecated": "Obsoleto", "description": "Descripción", @@ -479,6 +480,7 @@ "direction": "Dirección", "download_bom": "Descargar lista de materiales", "email": "Correo electrónico", + "empty_selection": "No hay elementos seleccionados", "endpoints": "Puntos finales", "epss": "EPS", "epss_percentile": "Percentil EPSS", @@ -779,6 +781,7 @@ "select_license": "Seleccionar licencia", "select_project": "Seleccionar Proyecto", "select_tag": "Seleccionar etiqueta", + "selection_deleted": "Selección eliminada", "service_deleted": "Servicio eliminado", "service_details": "Detalles del servicio", "service_name": "Nombre del Servicio", @@ -809,6 +812,7 @@ "swid_tagid": "ID de etiqueta SWID", "switch_view": "No se puede cambiar de vista durante la búsqueda", "tag_name": "Nombre de etiqueta", + "tag_unassigned_successfully": "Sin etiquetar con éxito", "tags": "Etiquetas", "template": "Plantilla", "text_search": "Búsqueda de texto", @@ -819,6 +823,7 @@ "total_findings_excluding_aliases": "Hallazgos totales (excluyendo alias)", "total_findings_including_aliases": "Hallazgos totales (incluidos alias)", "type": "Tipo", + "unassign_tag_from_selection": "Desasignar etiqueta de la selección", "update": "Actualizar", "update_details": "Detalles de actualización", "updated": "Actualizado", diff --git a/src/i18n/locales/fr.json b/src/i18n/locales/fr.json index 4ab17cbb..9c4aa6bc 100644 --- a/src/i18n/locales/fr.json +++ b/src/i18n/locales/fr.json @@ -471,6 +471,7 @@ "delete": "Supprimer", "delete_license_group": "Supprimer le groupe de licences", "delete_policy": "Supprimer la stratégie", + "delete_selected": "Supprimer les éléments sélectionnés", "dependency_graph": "Graph de dépendance", "deprecated": "Dépréciée", "description": "Description", @@ -479,6 +480,7 @@ "direction": "Direction", "download_bom": "Télécharger la nomenclature", "email": "Courriel", + "empty_selection": "Aucun élément sélectionné", "endpoints": "Points de terminaison", "epss": "EPSS", "epss_percentile": "Centile EPSS", @@ -779,6 +781,7 @@ "select_license": "Sélectionner une licence", "select_project": "Sélectionner un projet", "select_tag": "Sélectionner une balise", + "selection_deleted": "Sélection supprimée", "service_deleted": "Service supprimé", "service_details": "Détails des services", "service_name": "Nom du service", @@ -809,6 +812,7 @@ "swid_tagid": "ID de tag SWID", "switch_view": "Impossible de changer de vue pendant la recherche", "tag_name": "Nom de la tag", + "tag_unassigned_successfully": "Détaché avec succès", "tags": "Tags", "template": "Modèle", "text_search": "Recherche de texte", @@ -819,6 +823,7 @@ "total_findings_excluding_aliases": "Total des résultats (alias exclus)", "total_findings_including_aliases": "Total des résultats (alias inclus)", "type": "Type", + "unassign_tag_from_selection": "Annuler l'attribution d'une balise de la sélection", "update": "Mise à jour", "update_details": "Détails de la mise à jour", "updated": "Mis à jour", diff --git a/src/i18n/locales/hi.json b/src/i18n/locales/hi.json index 53157a24..87bf6281 100644 --- a/src/i18n/locales/hi.json +++ b/src/i18n/locales/hi.json @@ -471,6 +471,7 @@ "delete": "मिटाना", "delete_license_group": "लाइसेंस समूह हटाएं", "delete_policy": "नीति हटाएं", + "delete_selected": "चयनित आइटम हटाएँ", "dependency_graph": "निर्भरता ग्राफ", "deprecated": "पदावनत", "description": "विवरण", @@ -479,6 +480,7 @@ "direction": "दिशा", "download_bom": "BOM डाउनलोड करें", "email": "ईमेल", + "empty_selection": "कोई आइटम चयनित नहीं", "endpoints": "अंतिमबिंदुओं", "epss": "ईपीएसएस", "epss_percentile": "ईपीएसएस प्रतिशत", @@ -779,6 +781,7 @@ "select_license": "लाइसेंस चुनें", "select_project": "प्रोजेक्ट चुनें", "select_tag": "टैग चुनें", + "selection_deleted": "चयन हटा दिया गया", "service_deleted": "सेवा हटा दी गई", "service_details": "सेवा विवरण", "service_name": "सेवा का नाम", @@ -809,6 +812,7 @@ "swid_tagid": "SWID टैग आईडी", "switch_view": "खोज करते समय दृश्य स्विच नहीं किया जा सकता", "tag_name": "टैग नाम", + "tag_unassigned_successfully": "सफलतापूर्वक अनटैग किया गया", "tags": "टैग", "template": "खाका", "text_search": "पाठ्य खोज", @@ -819,6 +823,7 @@ "total_findings_excluding_aliases": "कुल निष्कर्ष (उपनाम को छोड़कर)", "total_findings_including_aliases": "कुल निष्कर्ष (उपनाम सहित)", "type": "प्रकार", + "unassign_tag_from_selection": "चयन से टैग अनअसाइन करें", "update": "अद्यतन", "update_details": "अद्यतन विवरण", "updated": "अद्यतन", diff --git a/src/i18n/locales/it.json b/src/i18n/locales/it.json index 04721ffc..12c0d2a1 100644 --- a/src/i18n/locales/it.json +++ b/src/i18n/locales/it.json @@ -471,6 +471,7 @@ "delete": "Eliminare", "delete_license_group": "Elimina gruppo di licenze", "delete_policy": "Elimina politica", + "delete_selected": "Eliminare elementi selezionati", "dependency_graph": "Grafico delle dipendenze", "deprecated": "Deprecato", "description": "Descrizione", @@ -479,6 +480,7 @@ "direction": "Direzione", "download_bom": "Scarica distinta base", "email": "E-mail", + "empty_selection": "Nessun elemento selezionato", "endpoints": "Endpoint", "epss": "EPSS", "epss_percentile": "Percentile EPSS", @@ -779,6 +781,7 @@ "select_license": "Seleziona Licenza", "select_project": "Seleziona Progetto", "select_tag": "Seleziona Etichetta", + "selection_deleted": "Selezione eliminata", "service_deleted": "Servizio eliminato", "service_details": "Dettagli del servizio", "service_name": "Nome di Servizio", @@ -809,6 +812,7 @@ "swid_tagid": "ID dell'etichetta SWID", "switch_view": "Impossibile cambiare visualizzazione durante la ricerca", "tag_name": "Nome dell'etichetta", + "tag_unassigned_successfully": "Deselezionato con successo", "tags": "Tag", "template": "Modello", "text_search": "Ricerca di testo", @@ -819,6 +823,7 @@ "total_findings_excluding_aliases": "Risultati totali (alias esclusi)", "total_findings_including_aliases": "Risultati totali (inclusi gli alias)", "type": "Tipo", + "unassign_tag_from_selection": "Annulla l'assegnazione del tag dalla selezione", "update": "Aggiornamento", "update_details": "Aggiorna dettagli", "updated": "Aggiornato", diff --git a/src/i18n/locales/ja.json b/src/i18n/locales/ja.json index c43bc22f..c7e25f91 100644 --- a/src/i18n/locales/ja.json +++ b/src/i18n/locales/ja.json @@ -471,6 +471,7 @@ "delete": "消去", "delete_license_group": "ライセンスグループの削除", "delete_policy": "ポリシーの削除", + "delete_selected": "選択した項目を削除します", "dependency_graph": "依存関係グラフ", "deprecated": "非推奨", "description": "説明", @@ -479,6 +480,7 @@ "direction": "方向", "download_bom": "BOMをダウンロード", "email": "Eメール", + "empty_selection": "項目が選択されていません", "endpoints": "エンドポイント", "epss": "EPSS", "epss_percentile": "EPSSパーセンタイル", @@ -779,6 +781,7 @@ "select_license": "ライセンスを選択", "select_project": "プロジェクトを選択", "select_tag": "タグを選択", + "selection_deleted": "選択範囲が削除されました", "service_deleted": "サービスが削除されました", "service_details": "サービス詳細", "service_name": "サービス名", @@ -809,6 +812,7 @@ "swid_tagid": "SWID タグ ID", "switch_view": "検索中にビューを切り替えることはできません", "tag_name": "タグ名", + "tag_unassigned_successfully": "タグが正常に解除されました", "tags": "タグ", "template": "テンプレート", "text_search": "テキスト検索", @@ -819,6 +823,7 @@ "total_findings_excluding_aliases": "合計調査結果(別名を除く)", "total_findings_including_aliases": "合計調査結果(別名を含む)", "type": "タイプ", + "unassign_tag_from_selection": "選択からタグの割り当てを解除する", "update": "アップデート", "update_details": "アップデートの詳細", "updated": "更新日", diff --git a/src/i18n/locales/pl.json b/src/i18n/locales/pl.json index 13548a3e..a73f37fd 100644 --- a/src/i18n/locales/pl.json +++ b/src/i18n/locales/pl.json @@ -471,6 +471,7 @@ "delete": "Usuwać", "delete_license_group": "Usuń grupę licencji", "delete_policy": "Usuń zasady", + "delete_selected": "Usuń wybrane elementy", "dependency_graph": "Wykres zależności", "deprecated": "Przestarzałe", "description": "Opis", @@ -479,6 +480,7 @@ "direction": "Kierunek", "download_bom": "Pobierz BOM", "email": "E-mail", + "empty_selection": "Nie wybrano żadnych elementów", "endpoints": "Punkty końcowe", "epss": "EPSS", "epss_percentile": "Percentyl EPSS", @@ -779,6 +781,7 @@ "select_license": "Wybierz Licencję", "select_project": "Wybierz Projekt", "select_tag": "Wybierz opcję Etykieta", + "selection_deleted": "Wybór usunięty", "service_deleted": "Usługa usunięta", "service_details": "Szczegóły usługi", "service_name": "Nazwa serwisu", @@ -809,6 +812,7 @@ "swid_tagid": "Identyfikator znacznika SWID", "switch_view": "Nie można przełączyć widoku podczas wyszukiwania", "tag_name": "Nazwa znacznika", + "tag_unassigned_successfully": "Pomyślnie nieoznaczono", "tags": "Tagi", "template": "Szablon", "text_search": "Wyszukiwanie tekstu", @@ -819,6 +823,7 @@ "total_findings_excluding_aliases": "Łączna liczba wyników (z wyłączeniem aliasów)", "total_findings_including_aliases": "Łączna liczba wyników (w tym aliasy)", "type": "Typ", + "unassign_tag_from_selection": "Usuń przypisanie tagu do zaznaczenia", "update": "Aktualizacja", "update_details": "Aktualizuj szczegóły", "updated": "Zaktualizowano", diff --git a/src/i18n/locales/pt-BR.json b/src/i18n/locales/pt-BR.json index 59191611..616c0faa 100644 --- a/src/i18n/locales/pt-BR.json +++ b/src/i18n/locales/pt-BR.json @@ -471,6 +471,7 @@ "delete": "Excluir", "delete_license_group": "Excluir grupo de licenças", "delete_policy": "Excluir política", + "delete_selected": "Excluir itens selecionados", "dependency_graph": "Gráfico de Dependência", "deprecated": "Descontinuada", "description": "Descrição", @@ -479,6 +480,7 @@ "direction": "Direção", "download_bom": "Baixe a lista técnica", "email": "E-mail", + "empty_selection": "Nenhum item selecionado", "endpoints": "Pontos finais", "epss": "EPSS", "epss_percentile": "Percentil EPSS", @@ -779,6 +781,7 @@ "select_license": "Selecione Licença", "select_project": "Selecione o projeto", "select_tag": "Selecione a etiqueta", + "selection_deleted": "Seleção excluída", "service_deleted": "Serviço excluído", "service_details": "Detalhes do serviço", "service_name": "Nome do Serviço", @@ -809,6 +812,7 @@ "swid_tagid": "ID da etiqueta SWID", "switch_view": "Não é possível mudar de visualização durante a pesquisa", "tag_name": "Nome da etiqueta", + "tag_unassigned_successfully": "Não marcado com sucesso", "tags": "Tag", "template": "Modelo", "text_search": "Pesquisa de texto", @@ -819,6 +823,7 @@ "total_findings_excluding_aliases": "Total de descobertas (excluindo aliases)", "total_findings_including_aliases": "Total de descobertas (incluindo aliases)", "type": "Tipo", + "unassign_tag_from_selection": "Cancelar atribuição de tag da seleção", "update": "Atualizar", "update_details": "Detalhes da atualização", "updated": "Atualizada", diff --git a/src/i18n/locales/pt.json b/src/i18n/locales/pt.json index deadda9e..73c70ab3 100644 --- a/src/i18n/locales/pt.json +++ b/src/i18n/locales/pt.json @@ -471,6 +471,7 @@ "delete": "Excluir", "delete_license_group": "Excluir grupo de licenças", "delete_policy": "Excluir política", + "delete_selected": "Excluir itens selecionados", "dependency_graph": "Gráfico de Dependência", "deprecated": "Descontinuada", "description": "Descrição", @@ -479,6 +480,7 @@ "direction": "Direção", "download_bom": "Baixe a lista técnica", "email": "E-mail", + "empty_selection": "Nenhum item selecionado", "endpoints": "Pontos finais", "epss": "EPSS", "epss_percentile": "Percentil EPSS", @@ -779,6 +781,7 @@ "select_license": "Selecione Licença", "select_project": "Selecione o projeto", "select_tag": "Selecione a etiqueta", + "selection_deleted": "Seleção excluída", "service_deleted": "Serviço excluído", "service_details": "Detalhes do serviço", "service_name": "Nome do Serviço", @@ -809,6 +812,7 @@ "swid_tagid": "ID da etiqueta SWID", "switch_view": "Não é possível mudar de visualização durante a pesquisa", "tag_name": "Nome da etiqueta", + "tag_unassigned_successfully": "Não marcado com sucesso", "tags": "Tag", "template": "Modelo", "text_search": "Pesquisa de texto", @@ -819,6 +823,7 @@ "total_findings_excluding_aliases": "Total de descobertas (excluindo aliases)", "total_findings_including_aliases": "Total de descobertas (incluindo aliases)", "type": "Tipo", + "unassign_tag_from_selection": "Cancelar atribuição de tag da seleção", "update": "Atualizar", "update_details": "Detalhes da atualização", "updated": "Atualizada", diff --git a/src/i18n/locales/ru.json b/src/i18n/locales/ru.json index 75df7275..873a0fa1 100644 --- a/src/i18n/locales/ru.json +++ b/src/i18n/locales/ru.json @@ -471,6 +471,7 @@ "delete": "Удалить", "delete_license_group": "Удалить группу лицензий", "delete_policy": "Удалить политику", + "delete_selected": "Удалить выбранные элементы", "dependency_graph": "Граф зависимостей", "deprecated": "Устарело", "description": "Описание", @@ -479,6 +480,7 @@ "direction": "Направление", "download_bom": "Скачать спецификацию", "email": "Электронная почта", + "empty_selection": "Элементы не выбраны", "endpoints": "Конечные точки", "epss": "ЭПСС", "epss_percentile": "Процентиль EPSS", @@ -779,6 +781,7 @@ "select_license": "Выберите лицензию", "select_project": "Выберите проект", "select_tag": "Выберите тег", + "selection_deleted": "Выбранное удалено.", "service_deleted": "Услуга удалена", "service_details": "Детали услуги", "service_name": "Наименование услуги", @@ -809,6 +812,7 @@ "swid_tagid": "Идентификатор SWID-тега", "switch_view": "Невозможно переключить вид во время поиска", "tag_name": "Название тэга", + "tag_unassigned_successfully": "Отметка успешно снята", "tags": "Теги", "template": "Шаблон", "text_search": "Текстовый поиск", @@ -819,6 +823,7 @@ "total_findings_excluding_aliases": "Всего результатов (исключая псевдонимы)", "total_findings_including_aliases": "Всего результатов (включая псевдонимы)", "type": "Тип", + "unassign_tag_from_selection": "Отменить назначение тега из выделения", "update": "Обновлять", "update_details": "Обновить детали", "updated": "Обновлено", diff --git a/src/i18n/locales/uk-UA.json b/src/i18n/locales/uk-UA.json index 560de1f0..c1cc2a2b 100644 --- a/src/i18n/locales/uk-UA.json +++ b/src/i18n/locales/uk-UA.json @@ -471,6 +471,7 @@ "delete": "Видалити", "delete_license_group": "Видалити групу ліцензій", "delete_policy": "Політика видалення", + "delete_selected": "Видалити вибрані елементи", "dependency_graph": "Граф залежностей", "deprecated": "Застаріле", "description": "опис", @@ -479,6 +480,7 @@ "direction": "Напрямок", "download_bom": "Завантажити BOM", "email": "Електронна пошта", + "empty_selection": "Елементи не вибрано", "endpoints": "Кінцеві точки", "epss": "EPSS", "epss_percentile": "Процентиль EPSS", @@ -779,6 +781,7 @@ "select_license": "Виберіть Ліцензія", "select_project": "Виберіть Проект", "select_tag": "Виберіть Тег", + "selection_deleted": "Вибір видалено", "service_deleted": "Сервіс видалено", "service_details": "Деталі послуги", "service_name": "Назва служби", @@ -809,6 +812,7 @@ "swid_tagid": "Ідентифікатор тегу SWID", "switch_view": "Неможливо переключити перегляд під час пошуку", "tag_name": "Назва тегу", + "tag_unassigned_successfully": "Теги успішно видалено", "tags": "Теги", "template": "Шаблон", "text_search": "Текстовий пошук", @@ -819,6 +823,7 @@ "total_findings_excluding_aliases": "Загальна кількість знахідок (без псевдонімів)", "total_findings_including_aliases": "Загальна кількість знахідок (включаючи псевдоніми)", "type": "Тип", + "unassign_tag_from_selection": "Скасувати призначення тегу з вибору", "update": "оновлення", "update_details": "Деталі оновлення", "updated": "Оновлено", diff --git a/src/i18n/locales/zh.json b/src/i18n/locales/zh.json index f5fa301e..6111686b 100644 --- a/src/i18n/locales/zh.json +++ b/src/i18n/locales/zh.json @@ -471,6 +471,7 @@ "delete": "删除", "delete_license_group": "删除许可证组", "delete_policy": "删除策略", + "delete_selected": "删除所选项目", "dependency_graph": "依赖图", "deprecated": "已弃用", "description": "描述", @@ -479,6 +480,7 @@ "direction": "方向", "download_bom": "下载 BOM", "email": "电子邮件", + "empty_selection": "没有选择任何项目", "endpoints": "终结点", "epss": "EPSS", "epss_percentile": "EPSS 百分位数", @@ -779,6 +781,7 @@ "select_license": "选择许可证", "select_project": "选择项目", "select_tag": "选择标签", + "selection_deleted": "选择已删除", "service_deleted": "服务已删除", "service_details": "服务详情", "service_name": "服务名称", @@ -809,6 +812,7 @@ "swid_tagid": "SWID标签编号", "switch_view": "搜索时无法切换视图", "tag_name": "标签名", + "tag_unassigned_successfully": "成功取消标记", "tags": "标签", "template": "模板", "text_search": "文本搜索", @@ -819,6 +823,7 @@ "total_findings_excluding_aliases": "查找结果(不包括别名)", "total_findings_including_aliases": "查找结果(包括别名)", "type": "类型", + "unassign_tag_from_selection": "从选择中取消分配标签", "update": "更新", "update_details": "更新详细信息", "updated": "更新", diff --git a/src/mixins/permissionsMixin.js b/src/mixins/permissionsMixin.js index f48d9b64..09df56a3 100644 --- a/src/mixins/permissionsMixin.js +++ b/src/mixins/permissionsMixin.js @@ -46,6 +46,8 @@ export default { POLICY_MANAGEMENT_READ: permissions.POLICY_MANAGEMENT_READ, POLICY_MANAGEMENT_UPDATE: permissions.POLICY_MANAGEMENT_UPDATE, POLICY_MANAGEMENT_DELETE: permissions.POLICY_MANAGEMENT_DELETE, + TAG_MANAGEMENT: permissions.TAG_MANAGEMENT, + TAG_MANAGEMENT_DELETE: permissions.TAG_MANAGEMENT_DELETE, }, }; }, diff --git a/src/shared/permissions.js b/src/shared/permissions.js index ce3a8cf5..632b5454 100644 --- a/src/shared/permissions.js +++ b/src/shared/permissions.js @@ -38,6 +38,8 @@ export const POLICY_MANAGEMENT_CREATE = 'POLICY_MANAGEMENT_CREATE'; export const POLICY_MANAGEMENT_READ = 'POLICY_MANAGEMENT_READ'; export const POLICY_MANAGEMENT_UPDATE = 'POLICY_MANAGEMENT_UPDATE'; export const POLICY_MANAGEMENT_DELETE = 'POLICY_MANAGEMENT_DELETE'; +export const TAG_MANAGEMENT = 'TAG_MANAGEMENT'; +export const TAG_MANAGEMENT_DELETE = 'TAG_MANAGEMENT_DELETE'; /** * Determines if the current logged in user has a specific permission. diff --git a/src/views/portfolio/projects/ProjectCreateProjectModal.vue b/src/views/portfolio/projects/ProjectCreateProjectModal.vue index bc9062ac..3346af88 100644 --- a/src/views/portfolio/projects/ProjectCreateProjectModal.vue +++ b/src/views/portfolio/projects/ProjectCreateProjectModal.vue @@ -88,6 +88,7 @@ :tags="tags" :add-on-key="addOnKeys" :placeholder="$t('message.add_tag')" + :autocomplete-items="tagsAutoCompleteItems" @tags-changed="(newTags) => (this.tags = newTags)" class="mw-100 bg-transparent text-lowercase" /> @@ -244,6 +245,8 @@ export default { project: {}, tag: '', // The contents of a tag as its being typed into the vue-tag-input tags: [], // An array of tags bound to the vue-tag-input + tagsAutoCompleteItems: [], + tagsAutoCompleteDebounce: null, addOnKeys: [9, 13, 32, ':', ';', ','], // Separators used when typing tags into the vue-tag-input labelIcon: { dataOn: '\u2713', @@ -274,6 +277,9 @@ export default { return this.availableClassifiers; }, }, + watch: { + tag: 'searchTags', + }, methods: { syncReadOnlyNameField: function (value) { this.readOnlyProjectName = value; @@ -374,6 +380,20 @@ export default { }); } }, + searchTags: function () { + if (!this.tag) { + return; + } + clearTimeout(this.tagsAutoCompleteDebounce); + this.tagsAutoCompleteDebounce = setTimeout(() => { + const url = `${this.$api.BASE_URL}/${this.$api.URL_TAG}?searchText=${encodeURIComponent(this.tag)}&pageNumber=1&pageSize=6`; + this.axios.get(url).then((response) => { + this.tagsAutoCompleteItems = response.data.map((tag) => { + return { text: tag.name }; + }); + }); + }, 250); + }, }, }; diff --git a/src/views/portfolio/projects/ProjectDetailsModal.vue b/src/views/portfolio/projects/ProjectDetailsModal.vue index 2513b9db..a5147296 100644 --- a/src/views/portfolio/projects/ProjectDetailsModal.vue +++ b/src/views/portfolio/projects/ProjectDetailsModal.vue @@ -115,6 +115,7 @@ :tags="tags" :add-on-key="addOnKeys" :placeholder="$t('message.add_tag')" + :autocomplete-items="tagsAutoCompleteItems" @tags-changed="(newTags) => (this.tags = newTags)" class="mw-100 bg-transparent text-lowercase" :readonly=" @@ -560,6 +561,8 @@ export default { availableParents: [], tag: '', // The contents of a tag as its being typed into the vue-tag-input tags: [], // An array of tags bound to the vue-tag-input + tagsAutoCompleteItems: [], + tagsAutoCompleteDebounce: null, addOnKeys: [9, 13, 32, ':', ';', ','], // Separators used when typing tags into the vue-tag-input labelIcon: { dataOn: '\u2713', @@ -708,6 +711,9 @@ export default { this.$root.$emit('bv::show::modal', 'projectDetailsModal'); }); }, + watch: { + tag: 'searchTags', + }, methods: { initializeTags: function () { this.tags = (this.project.tags || []).map((tag) => ({ text: tag.name })); @@ -810,6 +816,20 @@ export default { }); } }, + searchTags: function () { + if (!this.tag) { + return; + } + clearTimeout(this.tagsAutoCompleteDebounce); + this.tagsAutoCompleteDebounce = setTimeout(() => { + const url = `${this.$api.BASE_URL}/${this.$api.URL_TAG}?searchText=${encodeURIComponent(this.tag)}&pageNumber=1&pageSize=6`; + this.axios.get(url).then((response) => { + this.tagsAutoCompleteItems = response.data.map((tag) => { + return { text: tag.name }; + }); + }); + }, 250); + }, resetValues: function () { this.selectedParent = this.parent; this.availableParents = [{ name: '', version: '', uuid: null }]; diff --git a/src/views/portfolio/tags/TagList.vue b/src/views/portfolio/tags/TagList.vue index cf361b42..04fd36d3 100644 --- a/src/views/portfolio/tags/TagList.vue +++ b/src/views/portfolio/tags/TagList.vue @@ -28,6 +28,11 @@ export default { PortfolioWidgetRow, }, methods: { + deleteTags: function (tagNames) { + return this.axios.delete(`${this.$api.BASE_URL}/${this.$api.URL_TAG}`, { + data: tagNames, + }); + }, refreshTable: function () { this.$refs.table.refresh({ url: `${this.$api.BASE_URL}/${this.$api.URL_TAG}`, @@ -35,9 +40,23 @@ export default { }); }, }, + mounted() { + this.$refs.table.refreshOptions({ + showBtnDeleteSelected: this.isPermitted([ + this.PERMISSIONS.TAG_MANAGEMENT, + this.PERMISSIONS.TAG_MANAGEMENT_DELETE, + ]), + }); + }, data() { return { + errorsByTagName: {}, columns: [ + { + field: 'state', + checkbox: true, + align: 'center', + }, { title: this.$t('message.name'), field: 'name', @@ -64,12 +83,14 @@ export default { template: `