@eclipse-slm/ui 0.0.0-stage → 1.5.0-snapshot.1017
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +278 -2
- package/index.html +19 -0
- package/package.json +105 -4
- package/public/favicon.ico +0 -0
- package/public/favicon.png +0 -0
- package/public/favicon_white.png +0 -0
- package/public/sidebar-image.jpg +0 -0
- package/src/App.vue +40 -0
- package/src/api/ansible-service/ansible-service-client.ts +15 -0
- package/src/api/ansible-service/ansible-service-sse.ts +124 -0
- package/src/api/apiState.js +7 -0
- package/src/api/catalog/catalogRestApi.js +17 -0
- package/src/api/notification-service/notification-service-client.ts +7 -0
- package/src/api/notification-service/notificationServiceActuatorRestApi.js +26 -0
- package/src/api/notification-service/notificationServiceWebsocketClient.js +60 -0
- package/src/api/platform-management/platform-management-client.ts +46 -0
- package/src/api/platform-management/platformManagementActuatorRestApi.js +26 -0
- package/src/api/resource-management/resource-management-client.ts +37 -0
- package/src/api/resource-management/resourceManagementActuatorRestApi.js +26 -0
- package/src/api/restApiHelper.js +11 -0
- package/src/api/service-management/service-management-client.ts +31 -0
- package/src/api/service-management/serviceManagementActuatorRestApi.ts +26 -0
- package/src/app/appInstance.ts +8 -0
- package/src/app/navigation.ts +224 -0
- package/src/app/routes.ts +215 -0
- package/src/assets/clint-mckoy.jpg +0 -0
- package/src/assets/img/avatarImg.jpg +0 -0
- package/src/assets/img/fabos_logo.png +0 -0
- package/src/assets/img/fabos_logo_fabweiss.png +0 -0
- package/src/assets/img/fraunhofer-logo.png +0 -0
- package/src/assets/img/sidebar-1.jpg +0 -0
- package/src/assets/img/sidebar-2.jpg +0 -0
- package/src/assets/img/sidebar-3.jpg +0 -0
- package/src/assets/img/sidebar-4.jpg +0 -0
- package/src/assets/img/sidebar-5.jpg +0 -0
- package/src/assets/img/sidebar-image.jpg +0 -0
- package/src/assets/img/vue-logo.png +0 -0
- package/src/assets/lock.jpg +0 -0
- package/src/assets/login.jpg +0 -0
- package/src/assets/logo.png +0 -0
- package/src/assets/pricing.jpg +0 -0
- package/src/assets/register.jpg +0 -0
- package/src/assets/vuetify.svg +1 -0
- package/src/components/admin/VersionsOverview.vue +149 -0
- package/src/components/admin/ansible/AnsibleAdminImages.vue +113 -0
- package/src/components/admin/ansible/AnsibleAdminJobs.vue +179 -0
- package/src/components/admin/ansible/AnsibleAdminOperations.vue +124 -0
- package/src/components/base/ActionButton.vue +63 -0
- package/src/components/base/ActionButtonType.ts +5 -0
- package/src/components/base/Card.vue +17 -0
- package/src/components/base/ConfirmDialog.vue +101 -0
- package/src/components/base/CustomDialog.vue +116 -0
- package/src/components/base/IconPickerDialog.vue +155 -0
- package/src/components/base/Item.vue +79 -0
- package/src/components/base/ItemGroup.vue +131 -0
- package/src/components/base/ItemSubGroup.vue +25 -0
- package/src/components/base/MaterialAlert.vue +56 -0
- package/src/components/base/MaterialCard.vue +166 -0
- package/src/components/base/MaterialChartCard.vue +95 -0
- package/src/components/base/MaterialSnackbar.vue +71 -0
- package/src/components/base/MaterialStatsCard.vue +115 -0
- package/src/components/base/MaterialTabs.vue +43 -0
- package/src/components/base/MaterialTestimony.vue +79 -0
- package/src/components/base/NoItemAvailableNote.vue +22 -0
- package/src/components/base/OverviewHeading.vue +25 -0
- package/src/components/base/ProgressCircular.vue +68 -0
- package/src/components/base/RowWithLabel.vue +228 -0
- package/src/components/base/Subheading.vue +35 -0
- package/src/components/base/TextWithLabel.vue +41 -0
- package/src/components/base/VComponent.vue +40 -0
- package/src/components/capabilities/CapabilitiesTable.vue +209 -0
- package/src/components/capabilities/CapabilityActionCard.vue +77 -0
- package/src/components/capabilities/CapabilityCreateDialog.vue +86 -0
- package/src/components/capabilities/CapabilityCreateForm.vue +306 -0
- package/src/components/capabilities/CapabilityImportDialog.vue +108 -0
- package/src/components/capabilities/capabilityForm.ts +244 -0
- package/src/components/charts/AasCircularChart.vue +170 -0
- package/src/components/charts/AasCircularChartFilterBar.vue +72 -0
- package/src/components/charts/LineChart.js +14 -0
- package/src/components/clusters/ClustersOverview.vue +76 -0
- package/src/components/clusters/dialogs/ClusterDeleteDialog.vue +125 -0
- package/src/components/clusters/dialogs/ClusterScaleDialog.vue +272 -0
- package/src/components/clusters/dialogs/ClustersCreateDialog.vue +112 -0
- package/src/components/clusters/dialogs/ClustersCreateDialogPage.ts +7 -0
- package/src/components/clusters/dialogs/ClustersCreateDialogPageAddExistingCluster.vue +261 -0
- package/src/components/clusters/dialogs/ClustersCreateDialogPageCreateNewCluster.vue +244 -0
- package/src/components/clusters/dialogs/ClustersCreateDialogPageStart.vue +75 -0
- package/src/components/core/AppBar.vue +301 -0
- package/src/components/core/Drawer.vue +217 -0
- package/src/components/core/Footer.vue +43 -0
- package/src/components/core/View.vue +32 -0
- package/src/components/credentials/CredentialCreateDialog.vue +121 -0
- package/src/components/credentials/CredentialDisplay.vue +105 -0
- package/src/components/credentials/CredentialForm.vue +394 -0
- package/src/components/credentials/CredentialTypes.ts +26 -0
- package/src/components/dashboard/Buttons.vue +431 -0
- package/src/components/dashboard/DashboardResourceStatistics.vue +53 -0
- package/src/components/dashboard/Grid.vue +300 -0
- package/src/components/dashboard/Icons.vue +300 -0
- package/src/components/dashboard/Notifications.vue +402 -0
- package/src/components/dashboard/Tabs.vue +418 -0
- package/src/components/dashboard/Typography.vue +120 -0
- package/src/components/discovery/DiscoverDialog.vue +186 -0
- package/src/components/discovery/DiscoveredResourcesTable.vue +176 -0
- package/src/components/discovery/DiscoveryJobDetailsDialog.vue +65 -0
- package/src/components/discovery/DiscoveryJobsDeleteDialog.vue +88 -0
- package/src/components/discovery/DiscoveryJobsTable.vue +131 -0
- package/src/components/discovery/DiscoveryOverview.vue +99 -0
- package/src/components/discovery/DriversTable.vue +70 -0
- package/src/components/discovery/OnboardingDialog.vue +82 -0
- package/src/components/jobs/JobDetail.vue +413 -0
- package/src/components/jobs/JobStatusChip.vue +16 -0
- package/src/components/jobs/JobsOverview.vue +160 -0
- package/src/components/notifications/NotificationsOverview.vue +154 -0
- package/src/components/profilers/ProfilerDialog.vue +95 -0
- package/src/components/profilers/ProfilerForm.vue +102 -0
- package/src/components/profilers/ProfilersTable.vue +98 -0
- package/src/components/profilers/profilerForm.ts +61 -0
- package/src/components/provider/ProviderOverview.vue +64 -0
- package/src/components/provider/ServiceHosterTable.vue +47 -0
- package/src/components/provider/VirtualResourceProviderTable.vue +73 -0
- package/src/components/provider/dialogs/VmCreateDialog.vue +99 -0
- package/src/components/provider/dialogs/VmCreateDialogForm.vue +59 -0
- package/src/components/resources/ResourceConnectionIcon.vue +40 -0
- package/src/components/resources/ResourcesDeleteDialog.vue +102 -0
- package/src/components/resources/ResourcesTableClusters.vue +192 -0
- package/src/components/resources/ResourcesTableDevices.vue +338 -0
- package/src/components/resources/ResourcesTableTypes.vue +106 -0
- package/src/components/resources/capabilities/CapabilitiesButton.vue +164 -0
- package/src/components/resources/capabilities/CapabilityIcon.vue +44 -0
- package/src/components/resources/capabilities/CapabilityParamsDialog.vue +119 -0
- package/src/components/resources/capabilities/CapabilityParamsDialogInputField.vue +51 -0
- package/src/components/resources/deviceinfo/DeviceInfoCapabilitiesView.vue +239 -0
- package/src/components/resources/deviceinfo/DeviceInfoCredentialsView.vue +205 -0
- package/src/components/resources/deviceinfo/DeviceInfoHardwareView.vue +162 -0
- package/src/components/resources/deviceinfo/DeviceInfoNameplateView.vue +201 -0
- package/src/components/resources/deviceinfo/DeviceInfoSubmodelsView.vue +173 -0
- package/src/components/resources/deviceinfo/DeviceInfoView.vue +207 -0
- package/src/components/resources/deviceinfo/common/DeviceInfoCommonBasicsSection.vue +101 -0
- package/src/components/resources/deviceinfo/common/DeviceInfoCommonRemoteAccessSection.vue +224 -0
- package/src/components/resources/deviceinfo/common/DeviceInfoCommonView.vue +43 -0
- package/src/components/resources/deviceinfo/firmware/DeviceInfoFirmwareView.vue +113 -0
- package/src/components/resources/deviceinfo/firmware/FirmwareAvailableVersionsSection.vue +193 -0
- package/src/components/resources/deviceinfo/firmware/FirmwareCredentialsSection.vue +250 -0
- package/src/components/resources/deviceinfo/firmware/FirmwareUpdateJobsSection.vue +149 -0
- package/src/components/resources/deviceinfo/firmware/FirmwareUpdateStatusSection.vue +117 -0
- package/src/components/resources/deviceinfo/firmware/sectionState.ts +12 -0
- package/src/components/resources/devicetypeinfo/DeviceTypeInfoCommonView.vue +58 -0
- package/src/components/resources/devicetypeinfo/DeviceTypeInfoFirmwareView.vue +270 -0
- package/src/components/resources/devicetypeinfo/DeviceTypeInfoView.vue +110 -0
- package/src/components/resources/dialogs/AddItemChooserDialog.vue +68 -0
- package/src/components/resources/dialogs/DeviceCreateDeviceDetailsForm.vue +109 -0
- package/src/components/resources/dialogs/DeviceCreateDialog.vue +224 -0
- package/src/components/resources/dialogs/DeviceDialogCreateTypes.ts +11 -0
- package/src/components/resources/remoteaccess/RemoteAccessDialog.vue +82 -0
- package/src/components/resources/remoteaccess/RemoteAccessForm.vue +149 -0
- package/src/components/resources/remoteaccess/RemoteAccessHandler.ts +73 -0
- package/src/components/resources/remoteaccess/RemoteAccessTypes.ts +11 -0
- package/src/components/service_offerings/ServiceCategoriesTable.vue +154 -0
- package/src/components/service_offerings/ServiceCategoryCreateOrEditDialog.vue +117 -0
- package/src/components/service_offerings/ServiceOfferingCardGrid.vue +173 -0
- package/src/components/service_offerings/ServiceOfferingCardList.vue +117 -0
- package/src/components/service_offerings/ServiceOfferingDetailsOverview.vue +89 -0
- package/src/components/service_offerings/ServiceOfferingDetailsRequirements.vue +89 -0
- package/src/components/service_offerings/ServiceOfferingTable.vue +291 -0
- package/src/components/service_offerings/ServiceOfferingToolbar.vue +133 -0
- package/src/components/service_offerings/ServiceOptionValue.vue +213 -0
- package/src/components/service_offerings/dialogs/ServiceOfferingCreateDialog.vue +70 -0
- package/src/components/service_offerings/wizard_service_offering/ServiceOfferingWizardGitStep1Common.vue +214 -0
- package/src/components/service_offerings/wizard_service_offering/ServiceOfferingWizardManualStep1Common.vue +196 -0
- package/src/components/service_offerings/wizard_service_offering_version/Docker/DockerContainerImageName.vue +112 -0
- package/src/components/service_offerings/wizard_service_offering_version/Docker/DockerContainerLabels.vue +158 -0
- package/src/components/service_offerings/wizard_service_offering_version/Docker/DockerContainerPortMappings.vue +177 -0
- package/src/components/service_offerings/wizard_service_offering_version/Docker/DockerContainerRestartPolicy.vue +63 -0
- package/src/components/service_offerings/wizard_service_offering_version/Docker/DockerContainerVolumes.vue +157 -0
- package/src/components/service_offerings/wizard_service_offering_version/Docker/DockerEnvironmentVariables.vue +163 -0
- package/src/components/service_offerings/wizard_service_offering_version/ServiceOfferingVersionWizardStep1Common.vue +154 -0
- package/src/components/service_offerings/wizard_service_offering_version/ServiceOfferingVersionWizardStep2DeploymentDefinitionCodesys.vue +139 -0
- package/src/components/service_offerings/wizard_service_offering_version/ServiceOfferingVersionWizardStep2DeploymentDefinitionDockerCompose.vue +423 -0
- package/src/components/service_offerings/wizard_service_offering_version/ServiceOfferingVersionWizardStep2DeploymentDefinitionDockerContainer.vue +293 -0
- package/src/components/service_offerings/wizard_service_offering_version/ServiceOfferingVersionWizardStep2DeploymentDefinitionKubernetes.vue +382 -0
- package/src/components/service_offerings/wizard_service_offering_version/ServiceOfferingVersionWizardStep3ServiceOptions.vue +193 -0
- package/src/components/service_offerings/wizard_service_offering_version/ServiceOfferingVersionWizardStep4Requirements.vue +238 -0
- package/src/components/service_offerings/wizard_service_offering_version/ServiceRepositorySelect.vue +90 -0
- package/src/components/service_offerings/wizard_service_offering_version/serviceOptions/serviceOptionsDefinitionTable.vue +210 -0
- package/src/components/service_vendors/ServiceRepositoryCreateDialog.vue +165 -0
- package/src/components/service_vendors/ServiceVendorCreateOrEditDialog.vue +171 -0
- package/src/components/service_vendors/ServiceVendorDevelopersTable.vue +201 -0
- package/src/components/service_vendors/ServiceVendorTable.vue +158 -0
- package/src/components/services/ServiceInstanceDeleteDialog.vue +29 -0
- package/src/components/services/ServiceInstancesOverview.vue +63 -0
- package/src/components/services/ServiceInstancesTable.vue +379 -0
- package/src/components/services/dialog/ServiceInstanceDetailsDialog.vue +369 -0
- package/src/components/services/serviceInstanceMixin.js +29 -0
- package/src/components/tables/RegularTables.vue +186 -0
- package/src/components/updates/FirmwareUpdateStatusIcon.vue +54 -0
- package/src/components/updates/FirmwareUpdateVersion.vue +65 -0
- package/src/components/user/UserCredentials.vue +278 -0
- package/src/components/user/UserProfileDetails.vue +89 -0
- package/src/customization/customizeApp.ts +6 -0
- package/src/customization/customizeMessages.ts +6 -0
- package/src/customization/customizeNavigation.ts +6 -0
- package/src/customization/customizeRoutes.ts +6 -0
- package/src/customization/deepMerge.ts +28 -0
- package/src/customization/theme.ts +15 -0
- package/src/design/overrides.sass +62 -0
- package/src/design/serviceOfferingCard.scss +38 -0
- package/src/design/variables.scss +34 -0
- package/src/design/vuetify-material/_appbar.sass +54 -0
- package/src/design/vuetify-material/_buttons.sass +67 -0
- package/src/design/vuetify-material/_card.sass +107 -0
- package/src/design/vuetify-material/_chip.sass +9 -0
- package/src/design/vuetify-material/_footer.sass +29 -0
- package/src/design/vuetify-material/_map.sass +3 -0
- package/src/design/vuetify-material/_modal.sass +25 -0
- package/src/design/vuetify-material/_notification.sass +12 -0
- package/src/design/vuetify-material/_pagination.sass +5 -0
- package/src/design/vuetify-material/_settings.sass +36 -0
- package/src/design/vuetify-material/_sidebar.sass +69 -0
- package/src/design/vuetify-material/_tab.sass +12 -0
- package/src/design/vuetify-material/_table.sass +22 -0
- package/src/design/vuetify-material/_view.sass +23 -0
- package/src/docker/entrypoint.sh +85 -0
- package/src/docker/nginx.conf +35 -0
- package/src/docker/slm.conf +15 -0
- package/src/localisation/de.json +91 -0
- package/src/localisation/en.json +387 -0
- package/src/main.ts +167 -0
- package/src/pages/AccessDeniedPage.vue +10 -0
- package/src/pages/AdminAnsibleServicePage.vue +111 -0
- package/src/pages/AdminCapabilitiesPage.vue +60 -0
- package/src/pages/AdminComponentsPage.vue +34 -0
- package/src/pages/AdminPage.vue +68 -0
- package/src/pages/AdminProfilersPage.vue +73 -0
- package/src/pages/AdminServiceCategoriesPage.vue +34 -0
- package/src/pages/AdminServiceVendorsPage.vue +53 -0
- package/src/pages/AdminUsersPage.vue +367 -0
- package/src/pages/ClustersPage.vue +64 -0
- package/src/pages/DashboardPage.vue +351 -0
- package/src/pages/DiscoveryDriversPage.vue +35 -0
- package/src/pages/DiscoveryInboxPage.vue +31 -0
- package/src/pages/DiscoveryJobsPage.vue +34 -0
- package/src/pages/IndexPage.vue +29 -0
- package/src/pages/JobDetailPage.vue +7 -0
- package/src/pages/JobsPage.vue +18 -0
- package/src/pages/NotificationsPage.vue +13 -0
- package/src/pages/ProviderPage.vue +18 -0
- package/src/pages/ResourceInstancesPage.vue +177 -0
- package/src/pages/ResourceTypesPage.vue +102 -0
- package/src/pages/ServiceInstancesPage.vue +33 -0
- package/src/pages/ServiceOfferingCreateOrEditPage.vue +197 -0
- package/src/pages/ServiceOfferingDetailsPage.vue +180 -0
- package/src/pages/ServiceOfferingOrderPage.vue +300 -0
- package/src/pages/ServiceOfferingVersionCreateOrEditPage.vue +431 -0
- package/src/pages/ServiceOfferingsPage.vue +149 -0
- package/src/pages/ServiceVendorPage.vue +431 -0
- package/src/pages/UserProfilePage.vue +64 -0
- package/src/pages/router.js +34 -0
- package/src/shims-vue.d.ts +5 -0
- package/src/stores/ansibleAdminStore.ts +206 -0
- package/src/stores/capabilitiesStore.ts +159 -0
- package/src/stores/catalogStore.ts +50 -0
- package/src/stores/discoveryStore.ts +88 -0
- package/src/stores/environmentStore.ts +61 -0
- package/src/stores/jobsStore.ts +73 -0
- package/src/stores/notificationStore.ts +169 -0
- package/src/stores/profilersStore.ts +80 -0
- package/src/stores/providerStore.ts +52 -0
- package/src/stores/resourceClustersStore.ts +98 -0
- package/src/stores/resourceDevicesStore.ts +294 -0
- package/src/stores/serviceInstancesStore.ts +92 -0
- package/src/stores/serviceOfferingsStore.ts +208 -0
- package/src/stores/store.ts +66 -0
- package/src/stores/userStore.ts +126 -0
- package/src/utils/capabilityUtils.js +114 -0
- package/src/utils/dateUtils.js +21 -0
- package/src/utils/deviceUtils.js +74 -0
- package/src/utils/firmwareUtils.ts +35 -0
- package/src/utils/i18n.ts +28 -0
- package/src/utils/imageUtil.js +37 -0
- package/src/utils/jobStatus.ts +76 -0
- package/src/utils/mdiIcons.ts +49 -0
- package/src/utils/notificationTextGenerator.ts +108 -0
- package/src/utils/serviceOptionUtil.js +106 -0
- package/src/utils/tokenInterceptor.js +59 -0
- package/src/utils/updateToken.js +18 -0
- package/src/utils/yup.custom.js +11 -0
- package/vite/dist/apiClients.d.ts +5 -0
- package/vite/dist/apiClients.js +59 -0
- package/vite/dist/drift.d.ts +9 -0
- package/vite/dist/drift.js +57 -0
- package/vite/dist/index.d.ts +4 -0
- package/vite/dist/index.js +94 -0
- package/vite/dist/overrides.d.ts +3 -0
- package/vite/dist/overrides.js +71 -0
- package/vite/dist/paths.d.ts +18 -0
- package/vite/dist/paths.js +22 -0
- package/vite/package.json +1 -0
|
@@ -0,0 +1,338 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { ref, computed, onMounted } from 'vue';
|
|
3
|
+
import { useResourceDevicesStore } from "@/stores/resourceDevicesStore";
|
|
4
|
+
import ResourceManagementClient from "@/api/resource-management/resource-management-client";
|
|
5
|
+
import logRequestError from "@/api/restApiHelper";
|
|
6
|
+
import CapabilitiesButton from "@/components/resources/capabilities/CapabilitiesButton.vue";
|
|
7
|
+
import CapabilityIcon from "@/components/resources/capabilities/CapabilityIcon.vue";
|
|
8
|
+
import {storeToRefs} from "pinia";
|
|
9
|
+
import FirmwareUpdateVersion from "@/components/updates/FirmwareUpdateVersion.vue";
|
|
10
|
+
import ApiState from "@/api/apiState";
|
|
11
|
+
import DeviceUtils from '@/utils/deviceUtils';
|
|
12
|
+
import {useCapabilitiesStore} from "@/stores/capabilitiesStore";
|
|
13
|
+
import {useToast} from "vue-toast-notification";
|
|
14
|
+
import ResourcesDeleteDialog from "@/components/resources/ResourcesDeleteDialog.vue";
|
|
15
|
+
import {useCapabilityUtils} from "@/utils/capabilityUtils";
|
|
16
|
+
|
|
17
|
+
const emit = defineEmits(['resourceClicked']);
|
|
18
|
+
|
|
19
|
+
const $toast = useToast();
|
|
20
|
+
|
|
21
|
+
const capabilityUtils = useCapabilityUtils()
|
|
22
|
+
|
|
23
|
+
const resourceDevicesStore = useResourceDevicesStore();
|
|
24
|
+
const {resources} = storeToRefs(resourceDevicesStore);
|
|
25
|
+
const capabilitiesStore = useCapabilitiesStore();
|
|
26
|
+
const { capabilityServiceById } = storeToRefs(capabilitiesStore);
|
|
27
|
+
|
|
28
|
+
const tableHeaders = [
|
|
29
|
+
{ title: "Product", key: "product", width: "20%" },
|
|
30
|
+
{ title: "Manufacturer", key: "manufacturer", width: "20%" },
|
|
31
|
+
{ title: 'Capabilities', key: 'deploymentCapabilityServices', value: 'deploymentCapabilityServices', width: "10%" },
|
|
32
|
+
{ title: 'Configurations', key: 'configurationCapabilityServices', value: 'configurationCapabilityServices', width: "10%" },
|
|
33
|
+
{ title: 'Hostname', key: 'hostname', value: 'hostname', width: "10%" },
|
|
34
|
+
{ title: 'IP', key: 'ip', value: 'ip', width: "5%" },
|
|
35
|
+
{ title: 'Location', key: 'location.name', value: 'location.name', width: "10%"},
|
|
36
|
+
{ title: 'Firmware', key: 'firmware', width: "10%" },
|
|
37
|
+
{ title: 'Actions', value: 'actions', sortable: false, width: "5%" },
|
|
38
|
+
];
|
|
39
|
+
|
|
40
|
+
const groupBy = ref([]);
|
|
41
|
+
const sortBy = ref([{ key: 'product', order: 'asc' }]);
|
|
42
|
+
const filterResourcesByLocations = ref([]);
|
|
43
|
+
const searchResources = ref(undefined);
|
|
44
|
+
const apiState = computed(() => resourceDevicesStore.apiState);
|
|
45
|
+
|
|
46
|
+
const selectedResourcesIds = ref([])
|
|
47
|
+
|
|
48
|
+
const showResourcesDeleteDialog = ref(false);
|
|
49
|
+
|
|
50
|
+
const filteredResources = computed(() => {
|
|
51
|
+
if (filterResourcesByLocations.value.length === 0) {
|
|
52
|
+
return resources.value
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
return resources.value.filter(r => {
|
|
56
|
+
if (r.location == null)
|
|
57
|
+
return false;
|
|
58
|
+
|
|
59
|
+
return filterResourcesByLocations.value.includes(r.location.id);
|
|
60
|
+
});
|
|
61
|
+
});
|
|
62
|
+
|
|
63
|
+
const tableItems = computed(() => {
|
|
64
|
+
return filteredResources.value.map(resource => ({
|
|
65
|
+
...resource,
|
|
66
|
+
product: DeviceUtils.getProduct(resource.id),
|
|
67
|
+
manufacturer: DeviceUtils.getManufacturer(resource.id),
|
|
68
|
+
}));
|
|
69
|
+
});
|
|
70
|
+
|
|
71
|
+
const locations = computed(() => resourceDevicesStore.locations);
|
|
72
|
+
const profiler = computed(() => resourceDevicesStore.profiler);
|
|
73
|
+
|
|
74
|
+
onMounted(() => {
|
|
75
|
+
resourceDevicesStore.getResourceAasValues();
|
|
76
|
+
});
|
|
77
|
+
|
|
78
|
+
const setSelectedResource = (event, { item, section }) => {
|
|
79
|
+
emit('resourceClicked', item, section);
|
|
80
|
+
};
|
|
81
|
+
|
|
82
|
+
const getLocationNameForGroupHeader = (items) => {
|
|
83
|
+
if (items[0].location === null)
|
|
84
|
+
return "no location";
|
|
85
|
+
|
|
86
|
+
return items[0].location.name;
|
|
87
|
+
};
|
|
88
|
+
|
|
89
|
+
const resourcesHaveLocations = () => {
|
|
90
|
+
const locationNames = [...new Set(
|
|
91
|
+
resources.value.map(r => {
|
|
92
|
+
if (r.location == null)
|
|
93
|
+
return '';
|
|
94
|
+
else
|
|
95
|
+
return r.location.name;
|
|
96
|
+
})
|
|
97
|
+
)];
|
|
98
|
+
const hasLocations = locationNames.length > 0;
|
|
99
|
+
|
|
100
|
+
if (!hasLocations)
|
|
101
|
+
groupBy.value = null;
|
|
102
|
+
|
|
103
|
+
return hasLocations;
|
|
104
|
+
};
|
|
105
|
+
|
|
106
|
+
const runProfiler = () => {
|
|
107
|
+
ResourceManagementClient.profilerApi.runProfiler1().then().catch(logRequestError);
|
|
108
|
+
$toast.info('Started Profiler for all devices.');
|
|
109
|
+
};
|
|
110
|
+
|
|
111
|
+
const colorRowItem = (row) => {
|
|
112
|
+
if (selectedResourcesIds.value.includes(row.item.id)) {
|
|
113
|
+
return { class: 'v-data-table__selected' };
|
|
114
|
+
}
|
|
115
|
+
};
|
|
116
|
+
|
|
117
|
+
</script>
|
|
118
|
+
|
|
119
|
+
<template>
|
|
120
|
+
<v-container fluid>
|
|
121
|
+
<v-row
|
|
122
|
+
dense
|
|
123
|
+
class="ml-8 mb-8"
|
|
124
|
+
align="center"
|
|
125
|
+
>
|
|
126
|
+
<v-col cols="4">
|
|
127
|
+
<v-text-field
|
|
128
|
+
v-model="searchResources"
|
|
129
|
+
label="Search resources"
|
|
130
|
+
append-inner-icon="mdi-magnify"
|
|
131
|
+
clearable
|
|
132
|
+
variant="underlined"
|
|
133
|
+
/>
|
|
134
|
+
</v-col>
|
|
135
|
+
<v-col cols="3">
|
|
136
|
+
<div v-if="resourcesHaveLocations()">
|
|
137
|
+
<v-row class="mx-8">
|
|
138
|
+
<!-- <div class="mr-10">-->
|
|
139
|
+
<!-- <v-btn-toggle-->
|
|
140
|
+
<!-- v-model="groupBy"-->
|
|
141
|
+
<!-- mandatory-->
|
|
142
|
+
<!-- >-->
|
|
143
|
+
<!-- <v-btn-->
|
|
144
|
+
<!-- size="small"-->
|
|
145
|
+
<!-- :model-value="null"-->
|
|
146
|
+
<!-- :color="groupBy == null ? 'secondary' : 'disabled'"-->
|
|
147
|
+
<!-- style="height:40px"-->
|
|
148
|
+
<!-- >-->
|
|
149
|
+
<!-- <v-icon>mdi-ungroup</v-icon>-->
|
|
150
|
+
<!-- </v-btn>-->
|
|
151
|
+
<!-- <v-btn-->
|
|
152
|
+
<!-- size="small"-->
|
|
153
|
+
<!-- model-value="location.name"-->
|
|
154
|
+
<!-- :color="groupBy === 'location.name' ? 'secondary' : 'disabled'"-->
|
|
155
|
+
<!-- style="height:40px"-->
|
|
156
|
+
<!-- >-->
|
|
157
|
+
<!-- <v-icon>mdi-group</v-icon>-->
|
|
158
|
+
<!-- </v-btn>-->
|
|
159
|
+
<!-- </v-btn-toggle>-->
|
|
160
|
+
<!-- </div>-->
|
|
161
|
+
<div class="mr-10">
|
|
162
|
+
<v-select
|
|
163
|
+
v-model="filterResourcesByLocations"
|
|
164
|
+
:items="locations"
|
|
165
|
+
item-title="name"
|
|
166
|
+
item-value="id"
|
|
167
|
+
label="Location"
|
|
168
|
+
density="compact"
|
|
169
|
+
variant="outlined"
|
|
170
|
+
hide-details
|
|
171
|
+
closable-chips
|
|
172
|
+
:width="200"
|
|
173
|
+
multiple
|
|
174
|
+
clearable
|
|
175
|
+
/>
|
|
176
|
+
</div>
|
|
177
|
+
</v-row>
|
|
178
|
+
</div>
|
|
179
|
+
</v-col>
|
|
180
|
+
<v-col cols="2">
|
|
181
|
+
<v-spacer />
|
|
182
|
+
</v-col>
|
|
183
|
+
<v-col cols="3">
|
|
184
|
+
<v-row justify="end">
|
|
185
|
+
<v-btn
|
|
186
|
+
class="mx-4"
|
|
187
|
+
color="secondary"
|
|
188
|
+
@click="resourceDevicesStore.updateStore()"
|
|
189
|
+
>
|
|
190
|
+
<v-icon
|
|
191
|
+
icon="mdi-refresh"
|
|
192
|
+
color="white"
|
|
193
|
+
/>
|
|
194
|
+
</v-btn>
|
|
195
|
+
<v-tooltip
|
|
196
|
+
start
|
|
197
|
+
close-delay="2000"
|
|
198
|
+
>
|
|
199
|
+
<template #activator="{ props }">
|
|
200
|
+
<v-btn
|
|
201
|
+
v-if="profiler.length > 0"
|
|
202
|
+
class="mx-4"
|
|
203
|
+
color="secondary"
|
|
204
|
+
v-bind="props"
|
|
205
|
+
@click="runProfiler"
|
|
206
|
+
>
|
|
207
|
+
<v-icon
|
|
208
|
+
icon="mdi-tab-search"
|
|
209
|
+
color="white"
|
|
210
|
+
/>
|
|
211
|
+
</v-btn>
|
|
212
|
+
</template>
|
|
213
|
+
<span>Run all available <a href="https://eclipse-slm.github.io/slm/docs/usage/profiler/">profilers</a> on all devices</span>
|
|
214
|
+
</v-tooltip>
|
|
215
|
+
<v-btn
|
|
216
|
+
:disabled="selectedResourcesIds.length === 0"
|
|
217
|
+
class="mx-4"
|
|
218
|
+
color="secondary"
|
|
219
|
+
@click="showResourcesDeleteDialog = true"
|
|
220
|
+
>
|
|
221
|
+
<v-icon
|
|
222
|
+
icon="mdi-delete"
|
|
223
|
+
color="white"
|
|
224
|
+
/>
|
|
225
|
+
<ResourcesDeleteDialog
|
|
226
|
+
:show="showResourcesDeleteDialog"
|
|
227
|
+
:resource-ids="selectedResourcesIds"
|
|
228
|
+
@completed="showResourcesDeleteDialog = false; selectedResourcesIds = [];"
|
|
229
|
+
@canceled="showResourcesDeleteDialog = false"
|
|
230
|
+
></ResourcesDeleteDialog>
|
|
231
|
+
</v-btn>
|
|
232
|
+
</v-row>
|
|
233
|
+
</v-col>
|
|
234
|
+
</v-row>
|
|
235
|
+
|
|
236
|
+
<v-data-table
|
|
237
|
+
id="resource-table-devices"
|
|
238
|
+
:model-value="selectedResourcesIds"
|
|
239
|
+
@update:model-value="val => selectedResourcesIds = val"
|
|
240
|
+
:headers="tableHeaders"
|
|
241
|
+
:items="tableItems"
|
|
242
|
+
:search="searchResources"
|
|
243
|
+
v-model:sort-by="sortBy"
|
|
244
|
+
item-key="id"
|
|
245
|
+
:items-per-page="25"
|
|
246
|
+
:loading="apiState === ApiState.LOADING || apiState === ApiState.UPDATING"
|
|
247
|
+
show-select
|
|
248
|
+
:row-props="colorRowItem"
|
|
249
|
+
@click:row="setSelectedResource"
|
|
250
|
+
>
|
|
251
|
+
<template #group.header="{items, isOpen, toggle}">
|
|
252
|
+
<th
|
|
253
|
+
:colspan="tableHeaders.length"
|
|
254
|
+
>
|
|
255
|
+
<v-icon @click="toggle">
|
|
256
|
+
{{ isOpen ? 'mdi-minus' : 'mdi-plus' }}
|
|
257
|
+
</v-icon>
|
|
258
|
+
{{ getLocationNameForGroupHeader(items) }}
|
|
259
|
+
</th>
|
|
260
|
+
</template>
|
|
261
|
+
|
|
262
|
+
<template #item.product="{ item }">
|
|
263
|
+
<div>
|
|
264
|
+
{{ item.product }}
|
|
265
|
+
</div>
|
|
266
|
+
</template>
|
|
267
|
+
|
|
268
|
+
<template #item.manufacturer="{ item }">
|
|
269
|
+
<div>
|
|
270
|
+
{{ item.manufacturer }}
|
|
271
|
+
</div>
|
|
272
|
+
</template>
|
|
273
|
+
|
|
274
|
+
<template #item.deploymentCapabilityServices="{ item }">
|
|
275
|
+
<div>
|
|
276
|
+
<v-tooltip
|
|
277
|
+
v-for="capabilityServiceId in capabilityUtils.filterDeploymentCapabilityServices(item.capabilityServiceIds)"
|
|
278
|
+
:key="capabilityServiceId"
|
|
279
|
+
location="top"
|
|
280
|
+
>
|
|
281
|
+
<template #activator="{ props }">
|
|
282
|
+
<CapabilityIcon
|
|
283
|
+
v-if="capabilityServiceById(capabilityServiceId)"
|
|
284
|
+
v-bind="props"
|
|
285
|
+
:capability-service="capabilityServiceById(capabilityServiceId)"
|
|
286
|
+
/>
|
|
287
|
+
</template>
|
|
288
|
+
<span>Status: {{ capabilityServiceById(capabilityServiceId)?.status }}</span>
|
|
289
|
+
</v-tooltip>
|
|
290
|
+
</div>
|
|
291
|
+
</template>
|
|
292
|
+
|
|
293
|
+
<template #item.configurationCapabilityServices="{ item }">
|
|
294
|
+
<div>
|
|
295
|
+
<v-tooltip
|
|
296
|
+
v-for="capabilityServiceId in capabilityUtils.filterConfigurationCapabilityServices(item.capabilityServiceIds)"
|
|
297
|
+
:key="capabilityServiceId"
|
|
298
|
+
location="top"
|
|
299
|
+
>
|
|
300
|
+
<template #activator="{ props }">
|
|
301
|
+
<CapabilityIcon
|
|
302
|
+
v-if="capabilityServiceById(capabilityServiceId)"
|
|
303
|
+
v-bind="props"
|
|
304
|
+
:capability-service="capabilityServiceById(capabilityServiceId)"
|
|
305
|
+
/>
|
|
306
|
+
</template>
|
|
307
|
+
<span>Status: {{ capabilityServiceById(capabilityServiceId)?.status }}</span>
|
|
308
|
+
</v-tooltip>
|
|
309
|
+
</div>
|
|
310
|
+
</template>
|
|
311
|
+
|
|
312
|
+
<template #item.firmware="{ item }">
|
|
313
|
+
<FirmwareUpdateVersion
|
|
314
|
+
:resource-id="item.id"
|
|
315
|
+
@click="setSelectedResource( undefined, { item, section: 'firmware' })"
|
|
316
|
+
/>
|
|
317
|
+
</template>
|
|
318
|
+
|
|
319
|
+
<!-- Column: Actions -->
|
|
320
|
+
<template
|
|
321
|
+
#item.actions="{ item }"
|
|
322
|
+
>
|
|
323
|
+
<v-row
|
|
324
|
+
class="ma-2"
|
|
325
|
+
>
|
|
326
|
+
<CapabilitiesButton :resourceId="item.id" />
|
|
327
|
+
</v-row>
|
|
328
|
+
</template>
|
|
329
|
+
</v-data-table>
|
|
330
|
+
|
|
331
|
+
</v-container>
|
|
332
|
+
</template>
|
|
333
|
+
|
|
334
|
+
<style>
|
|
335
|
+
tr.v-data-table__selected {
|
|
336
|
+
background: rgb(var(--v-theme-secondary), 0.05) !important;
|
|
337
|
+
}
|
|
338
|
+
</style>
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import {ref} from 'vue';
|
|
3
|
+
import {useResourceDevicesStore} from "@/stores/resourceDevicesStore";
|
|
4
|
+
import FirmwareUpdateVersion from "@/components/updates/FirmwareUpdateVersion.vue";
|
|
5
|
+
|
|
6
|
+
const props = defineProps({
|
|
7
|
+
resourceTypes: {
|
|
8
|
+
type: Array,
|
|
9
|
+
default: () => []
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
|
|
13
|
+
const emit = defineEmits(['resource-type-selected', 'resource-instance-selected']);
|
|
14
|
+
|
|
15
|
+
const resourceDevicesStore = useResourceDevicesStore();
|
|
16
|
+
const expanded = ref([]);
|
|
17
|
+
|
|
18
|
+
const tableHeadersResourceTypes = [
|
|
19
|
+
{ title: 'Manufacturer', key: 'manufacturerName', width: "35%" },
|
|
20
|
+
{ title: 'Type Name', key: 'typeName', width: "55%" },
|
|
21
|
+
{ title: 'Instances', key: 'resourceInstanceCount', width: "10%" }
|
|
22
|
+
];
|
|
23
|
+
|
|
24
|
+
const tableHeadersResourceInstancesOfType = [
|
|
25
|
+
{ title: 'Hostname', key: 'hostname', width: "25%" },
|
|
26
|
+
{ title: 'IP', key: 'ip', width: "25%" },
|
|
27
|
+
{ title: 'ID', key: 'id', width: "30%" },
|
|
28
|
+
{ title: 'Firmware', key: 'firmware', width: "20%" },
|
|
29
|
+
];
|
|
30
|
+
|
|
31
|
+
const onRowClickResourceTypes = (click, row) => {
|
|
32
|
+
emit('resource-type-selected', row.item);
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
const onRowClickResourceInstance = (click, row) => {
|
|
36
|
+
console.log(row.item.id)
|
|
37
|
+
emit('resource-instance-selected', row.item, "common");
|
|
38
|
+
};
|
|
39
|
+
</script>
|
|
40
|
+
|
|
41
|
+
<template>
|
|
42
|
+
<div>
|
|
43
|
+
<v-data-table
|
|
44
|
+
:expanded="expanded"
|
|
45
|
+
:headers="tableHeadersResourceTypes"
|
|
46
|
+
:items="props.resourceTypes"
|
|
47
|
+
item-key="typeName"
|
|
48
|
+
item-value="typeName"
|
|
49
|
+
class="elevation-1"
|
|
50
|
+
show-expand
|
|
51
|
+
:items-per-page="25"
|
|
52
|
+
@click:row="onRowClickResourceTypes"
|
|
53
|
+
>
|
|
54
|
+
<template #item.resourceInstanceCount="{ item }">
|
|
55
|
+
{{ item.resourceInstanceIds ? item.resourceInstanceIds.length : 0 }}
|
|
56
|
+
</template>
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
<template #expanded-row="{ item }">
|
|
60
|
+
<td
|
|
61
|
+
:colspan="tableHeadersResourceTypes.length+1"
|
|
62
|
+
class="expanded-row-spacing expanded-row-highlight"
|
|
63
|
+
>
|
|
64
|
+
<v-data-table
|
|
65
|
+
:headers="tableHeadersResourceInstancesOfType"
|
|
66
|
+
:items="item.resourceInstanceIds.map(id => ({ id }))"
|
|
67
|
+
hide-default-footer
|
|
68
|
+
:items-per-page="-1"
|
|
69
|
+
class="expanded-table"
|
|
70
|
+
@click:row="onRowClickResourceInstance"
|
|
71
|
+
>
|
|
72
|
+
<template #item.hostname="{ item }">
|
|
73
|
+
{{ resourceDevicesStore.resourceById(item.id)?.hostname ?? "N/A" }}
|
|
74
|
+
</template>
|
|
75
|
+
<template #item.ip="{ item }">
|
|
76
|
+
{{ resourceDevicesStore.resourceById(item.id)?.ip ?? "N/A" }}
|
|
77
|
+
</template>
|
|
78
|
+
<template #item.id="{ item }">
|
|
79
|
+
{{ item.id }}
|
|
80
|
+
</template>
|
|
81
|
+
<template #item.firmware="{ item }">
|
|
82
|
+
<FirmwareUpdateVersion
|
|
83
|
+
:resource-id="item.id"
|
|
84
|
+
@click="emit('resource-instance-selected', item, 'firmware')"
|
|
85
|
+
/>
|
|
86
|
+
</template>
|
|
87
|
+
</v-data-table>
|
|
88
|
+
</td>
|
|
89
|
+
</template>
|
|
90
|
+
</v-data-table>
|
|
91
|
+
</div>
|
|
92
|
+
</template>
|
|
93
|
+
|
|
94
|
+
<style scoped>
|
|
95
|
+
.expanded-row-spacing {
|
|
96
|
+
border-bottom: 15px solid transparent;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
.expanded-row-highlight {
|
|
100
|
+
background: rgba(var(--v-theme-secondary), 0.04);
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
.expanded-table {
|
|
104
|
+
background: rgba(0, 0, 0, 0.00) !important;
|
|
105
|
+
}
|
|
106
|
+
</style>
|
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
|
|
3
|
+
import ResourceManagementClient from "@/api/resource-management/resource-management-client";
|
|
4
|
+
import logRequestError from "@/api/restApiHelper";
|
|
5
|
+
import {useCapabilityUtils} from "@/utils/capabilityUtils";
|
|
6
|
+
import CapabilityParamsDialog from "@/components/resources/capabilities/CapabilityParamsDialog.vue";
|
|
7
|
+
import {onMounted, ref} from "vue";
|
|
8
|
+
import {useCapabilitiesStore} from "@/stores/capabilitiesStore";
|
|
9
|
+
import {storeToRefs} from "pinia";
|
|
10
|
+
import {useToast} from "vue-toast-notification";
|
|
11
|
+
import {useResourceDevicesStore} from "@/stores/resourceDevicesStore";
|
|
12
|
+
import {useUserStore} from "@/stores/userStore";
|
|
13
|
+
|
|
14
|
+
const emit = defineEmits(['closed']);
|
|
15
|
+
|
|
16
|
+
const props = defineProps({
|
|
17
|
+
resourceId: {
|
|
18
|
+
type: String,
|
|
19
|
+
required: true
|
|
20
|
+
}
|
|
21
|
+
})
|
|
22
|
+
|
|
23
|
+
const $toast = useToast();
|
|
24
|
+
|
|
25
|
+
const selectedCapabilityId = ref(undefined)
|
|
26
|
+
const selectedSkipInstall = ref(false)
|
|
27
|
+
const showCapabilityParamsDialog = ref(false)
|
|
28
|
+
|
|
29
|
+
const userStore = useUserStore();
|
|
30
|
+
const resourceDevicesStore = useResourceDevicesStore();
|
|
31
|
+
const { resourceById } = storeToRefs(resourceDevicesStore);
|
|
32
|
+
const capabilitiesStore = useCapabilitiesStore();
|
|
33
|
+
const { availableSingleHostCapabilities, isCapabilityInstalledOnResource } = storeToRefs(capabilitiesStore);
|
|
34
|
+
const capabilityUtils = useCapabilityUtils();
|
|
35
|
+
|
|
36
|
+
const insertWhiteSpaceInCamelCase = (string) => {
|
|
37
|
+
return string.replace(/([A-Z])/g, ' $1').trim()
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
const addCapability = (capabilityId, skipInstall, configParameterMap) => {
|
|
41
|
+
console.log(props.resourceId)
|
|
42
|
+
ResourceManagementClient.capabilityApi.installCapabilityOnSingleHost(props.resourceId, capabilityId, userStore.fullPathUserGroupId, configParameterMap, skipInstall)
|
|
43
|
+
.then()
|
|
44
|
+
.catch((e) => {
|
|
45
|
+
logRequestError(e);
|
|
46
|
+
$toast.error(`Failed to install capability '${capabilitiesStore.capabilityById(capabilityId).name}' on device '${resourceById.value(props.resourceId).hostname}'`);
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
const removeCapability = (capabilityId) => {
|
|
51
|
+
console.log(props.resourceId)
|
|
52
|
+
ResourceManagementClient.capabilityApi.removeCapabilityFromSingleHost(props.resourceId, capabilityId)
|
|
53
|
+
.then()
|
|
54
|
+
.catch((e) => {
|
|
55
|
+
logRequestError(e);
|
|
56
|
+
$toast.error(`Failed to uninstall capability '${capabilitiesStore.capabilityById(capabilityId).name}' on device '${resourceById.value(props.resourceId).hostname}'`);
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
const onInstallButtonClicked = (capabilityId, skipInstall) => {
|
|
61
|
+
if(capabilityUtils.isDefineCapabilityDialogRequired(capabilityId, skipInstall)) {
|
|
62
|
+
selectedCapabilityId.value = capabilityId
|
|
63
|
+
selectedSkipInstall.value = skipInstall
|
|
64
|
+
showCapabilityParamsDialog.value = true
|
|
65
|
+
}
|
|
66
|
+
else {
|
|
67
|
+
addCapability(capabilityId,skipInstall,{})
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
const onCapabilityParamsDialogCanceled = () => {
|
|
72
|
+
showCapabilityParamsDialog.value = false;
|
|
73
|
+
};
|
|
74
|
+
|
|
75
|
+
const onCapabilityParamsDialogConfirmed = (capabilityParametersMap) => {
|
|
76
|
+
addCapability(selectedCapabilityId.value, selectedSkipInstall.value, capabilityParametersMap)
|
|
77
|
+
showCapabilityParamsDialog.value = false;
|
|
78
|
+
};
|
|
79
|
+
</script>
|
|
80
|
+
|
|
81
|
+
<template>
|
|
82
|
+
<div>
|
|
83
|
+
<v-menu>
|
|
84
|
+
<template #activator="{ props }">
|
|
85
|
+
<v-btn
|
|
86
|
+
id="mushroom-button"
|
|
87
|
+
color="info"
|
|
88
|
+
size="small"
|
|
89
|
+
v-bind="props"
|
|
90
|
+
:disabled="resourceById(props.resourceId)?.clusterMember || availableSingleHostCapabilities.length === 0"
|
|
91
|
+
>
|
|
92
|
+
<v-icon
|
|
93
|
+
color="white"
|
|
94
|
+
icon="mdi-mushroom-outline"
|
|
95
|
+
/>
|
|
96
|
+
</v-btn>
|
|
97
|
+
</template>
|
|
98
|
+
<v-list>
|
|
99
|
+
<v-list
|
|
100
|
+
v-for="capabilityClass in capabilityUtils.getUniqueCapabilityClasses()"
|
|
101
|
+
:key="capabilityClass"
|
|
102
|
+
class="resources-capability-menu"
|
|
103
|
+
>
|
|
104
|
+
<h4 class="ml-4">
|
|
105
|
+
{{ insertWhiteSpaceInCamelCase(capabilityClass) }}
|
|
106
|
+
</h4>
|
|
107
|
+
<v-list-item
|
|
108
|
+
v-for="capability in capabilityUtils.getCapabilitiesByCapabilityClass(capabilityClass)"
|
|
109
|
+
:key="capability.id"
|
|
110
|
+
>
|
|
111
|
+
<v-btn-toggle>
|
|
112
|
+
<!-- Install Button -->
|
|
113
|
+
<v-btn
|
|
114
|
+
v-if="!isCapabilityInstalledOnResource(resourceById(props.resourceId), capability.id)"
|
|
115
|
+
:disabled="!resourceById(props.resourceId).remoteAccessAvailable"
|
|
116
|
+
size="small"
|
|
117
|
+
base-color="info"
|
|
118
|
+
variant="flat"
|
|
119
|
+
:prepend-icon="capability.logo"
|
|
120
|
+
@click="onInstallButtonClicked(capability.id, false)"
|
|
121
|
+
>
|
|
122
|
+
{{ capability.name }}
|
|
123
|
+
</v-btn>
|
|
124
|
+
<!-- Skip Install Button -->
|
|
125
|
+
<v-btn
|
|
126
|
+
v-if="!isCapabilityInstalledOnResource(resourceById(props.resourceId), capability.id) && capabilityUtils.isCapabilitySkipable(capability)"
|
|
127
|
+
base-color="info"
|
|
128
|
+
variant="flat"
|
|
129
|
+
size="small"
|
|
130
|
+
@click="onInstallButtonClicked(capability.id, true)"
|
|
131
|
+
>
|
|
132
|
+
<v-icon icon="mdi-skip-next" />
|
|
133
|
+
</v-btn>
|
|
134
|
+
<!-- Uninstall Button -->
|
|
135
|
+
<v-btn
|
|
136
|
+
v-if="isCapabilityInstalledOnResource(resourceById(props.resourceId), capability.id)"
|
|
137
|
+
base-color="error"
|
|
138
|
+
size="small"
|
|
139
|
+
variant="flat"
|
|
140
|
+
:prepend-icon="capability.logo"
|
|
141
|
+
@click="removeCapability(capability.id)"
|
|
142
|
+
>
|
|
143
|
+
{{ capability.name }}
|
|
144
|
+
</v-btn>
|
|
145
|
+
</v-btn-toggle>
|
|
146
|
+
</v-list-item>
|
|
147
|
+
</v-list>
|
|
148
|
+
</v-list>
|
|
149
|
+
</v-menu>
|
|
150
|
+
|
|
151
|
+
<capability-params-dialog
|
|
152
|
+
:show="showCapabilityParamsDialog"
|
|
153
|
+
:capability-id="selectedCapabilityId"
|
|
154
|
+
:resource-id="props.resourceId"
|
|
155
|
+
:skip-install="selectedSkipInstall"
|
|
156
|
+
@confirmed="onCapabilityParamsDialogConfirmed"
|
|
157
|
+
@canceled="onCapabilityParamsDialogCanceled"
|
|
158
|
+
/>
|
|
159
|
+
</div>
|
|
160
|
+
</template>
|
|
161
|
+
|
|
162
|
+
<style scoped>
|
|
163
|
+
|
|
164
|
+
</style>
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { computed } from 'vue'
|
|
3
|
+
import {useCapabilitiesStore} from "@/stores/capabilitiesStore";
|
|
4
|
+
import {CapabilityServiceDTO} from "@/api/resource-management/client";
|
|
5
|
+
import {storeToRefs} from "pinia";
|
|
6
|
+
|
|
7
|
+
const props = defineProps<{
|
|
8
|
+
capabilityService: CapabilityServiceDTO
|
|
9
|
+
}>()
|
|
10
|
+
|
|
11
|
+
const capabilitiesStore = useCapabilitiesStore();
|
|
12
|
+
const { capabilityById } = storeToRefs(capabilitiesStore);
|
|
13
|
+
|
|
14
|
+
const chipIcon = computed(() => {
|
|
15
|
+
switch (props.capabilityService.status) {
|
|
16
|
+
case 'READY':
|
|
17
|
+
return 'mdi-check'
|
|
18
|
+
case 'INSTALL':
|
|
19
|
+
return 'mdi-plus'
|
|
20
|
+
case 'UNINSTALL':
|
|
21
|
+
return 'mdi-minus'
|
|
22
|
+
case 'UNKNOWN':
|
|
23
|
+
return 'mdi-help'
|
|
24
|
+
case 'FAILED':
|
|
25
|
+
return 'mdi-alert-circle-outline'
|
|
26
|
+
default:
|
|
27
|
+
return ''
|
|
28
|
+
}
|
|
29
|
+
})
|
|
30
|
+
</script>
|
|
31
|
+
|
|
32
|
+
<template>
|
|
33
|
+
<div v-if="capabilityById(props.capabilityService?.capabilityId)?.name">
|
|
34
|
+
<v-chip class="ma-1">
|
|
35
|
+
<v-icon start>
|
|
36
|
+
{{ chipIcon }}
|
|
37
|
+
</v-icon>
|
|
38
|
+
{{ capabilityById(props.capabilityService.capabilityId).name }}
|
|
39
|
+
</v-chip>
|
|
40
|
+
</div>
|
|
41
|
+
</template>
|
|
42
|
+
|
|
43
|
+
<style scoped>
|
|
44
|
+
</style>
|