+
+ {{ getAppIcon(item.tpl_app) }}
+
+
{{ TEMPLATE_TYPE_ICONS[item.tpl_type] }}
@@ -94,9 +101,10 @@ import TaskStatus from '@/components/TaskStatus.vue';
import TaskLink from '@/components/TaskLink.vue';
import socket from '@/socket';
import { TEMPLATE_TYPE_ICONS } from '@/lib/constants';
+import AppsMixin from '@/components/AppsMixin';
export default {
- mixins: [ItemListPageBase],
+ mixins: [ItemListPageBase, AppsMixin],
data() {
return { TEMPLATE_TYPE_ICONS };
diff --git a/web/src/views/project/TemplateView.vue b/web/src/views/project/TemplateView.vue
index 6ed19624..77453ab6 100644
--- a/web/src/views/project/TemplateView.vue
+++ b/web/src/views/project/TemplateView.vue
@@ -202,7 +202,7 @@ import {
} from '@/lib/constants';
import ObjectRefsDialog from '@/components/ObjectRefsDialog.vue';
import NewTaskDialog from '@/components/NewTaskDialog.vue';
-import EditTemplateDialogue from '@/components/EditTemplateDialogue.vue';
+import EditTemplateDialogue from '@/components/EditTemplateDialog.vue';
import PermissionsCheck from '@/components/PermissionsCheck';
export default {
diff --git a/web/src/views/project/Templates.vue b/web/src/views/project/Templates.vue
index 679b584e..b9b6defa 100644
--- a/web/src/views/project/Templates.vue
+++ b/web/src/views/project/Templates.vue
@@ -26,13 +26,13 @@
-
+ >
0 || editItem('new')"
+ @click="activeAppIds.length > 0 || editItem('new')"
>
{{ $t('newTemplate') }}
- mdi-chevron-down
+ mdi-chevron-down
- {{ APP_ICONS[item].icon }}
+ {{ getAppIcon(appID) }}
- {{ APP_TITLE[item] }}
+ {{ getAppTitle(appID) }}
+
+
+
+
+ mdi-cogs
+
+ Applications
@@ -132,9 +143,8 @@
- {{ APP_ICONS[item.app].icon }}
+ {{ getAppIcon(item.app) }}
@@ -258,16 +268,15 @@ import socket from '@/socket';
import NewTaskDialog from '@/components/NewTaskDialog.vue';
import {
- APP_ICONS,
- APP_TITLE,
TEMPLATE_TYPE_ACTION_TITLES,
TEMPLATE_TYPE_ICONS,
} from '@/lib/constants';
-import EditTemplateDialogue from '@/components/EditTemplateDialogue.vue';
+import EditTemplateDialog from '@/components/EditTemplateDialog.vue';
+import AppsMixin from '@/components/AppsMixin';
export default {
components: {
- EditTemplateDialogue,
+ EditTemplateDialog,
TableSettingsSheet,
TaskStatus,
TaskLink,
@@ -275,7 +284,7 @@ export default {
EditViewsForm,
NewTaskDialog,
},
- mixins: [ItemListPageBase],
+ mixins: [ItemListPageBase, AppsMixin],
async created() {
socket.addListener((data) => this.onWebsocketDataReceived(data));
@@ -283,8 +292,6 @@ export default {
},
data() {
return {
- APP_TITLE,
- APP_ICONS,
TEMPLATE_TYPE_ICONS,
TEMPLATE_TYPE_ACTION_TITLES,
inventory: null,
@@ -298,13 +305,7 @@ export default {
editViewsDialog: null,
viewItemsLoading: null,
viewTab: null,
- templateApps: [
- '', // Ansible
- 'terraform',
- 'tofu',
- 'bash',
- // 'pulumi',
- ],
+ apps: null,
itemApp: '',
};
},
@@ -342,7 +343,8 @@ export default {
&& this.inventory
&& this.environment
&& this.repositories
- && this.views;
+ && this.views
+ && this.isAppsLoaded;
},
},
watch: {