@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,60 @@
|
|
|
1
|
+
import SockJS from 'sockjs-client/dist/sockjs';
|
|
2
|
+
import Stomp from 'stomp-websocket';
|
|
3
|
+
import {useNotificationStore} from "@/stores/notificationStore";
|
|
4
|
+
import { globals } from '@/app/appInstance';
|
|
5
|
+
|
|
6
|
+
const API_URL = '/notification-service';
|
|
7
|
+
|
|
8
|
+
class NotificationServiceWebsocketClient {
|
|
9
|
+
socket = null
|
|
10
|
+
|
|
11
|
+
static processNotificationMessage(response) {
|
|
12
|
+
const content = JSON.parse(response.body);
|
|
13
|
+
const notificationStore = useNotificationStore();
|
|
14
|
+
notificationStore.processIncomingNotification(content);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
static resolveUserId() {
|
|
18
|
+
return globals.$keycloak?.tokenParsed?.sub
|
|
19
|
+
|| globals.$keycloak?.subject
|
|
20
|
+
|| globals.$keycloak?.keycloak?.subject
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
connect () {
|
|
24
|
+
this.socket = new SockJS(API_URL + `/ws/notifications`);
|
|
25
|
+
this.stompClient = Stomp.over(this.socket);
|
|
26
|
+
|
|
27
|
+
this.stompClient.reconnect_delay = 5000;
|
|
28
|
+
// remove for stump debug messages
|
|
29
|
+
this.stompClient.debug = (message) => {
|
|
30
|
+
// console.log(message)
|
|
31
|
+
};
|
|
32
|
+
const userId = NotificationServiceWebsocketClient.resolveUserId()
|
|
33
|
+
const subscriptionName = `/topic/notifications/${userId}`
|
|
34
|
+
|
|
35
|
+
this.stompClient.connect(
|
|
36
|
+
{
|
|
37
|
+
Authorization: 'Bearer ' + globals.$keycloak.token,
|
|
38
|
+
Issuer: `${globals.$keycloak.keycloak.authServerUrl}/realms/${globals.$keycloak.keycloak.realm}`
|
|
39
|
+
},
|
|
40
|
+
() => {
|
|
41
|
+
// The backend publishes every notification to both destinations, so subscribe to only one
|
|
42
|
+
// of them, otherwise each notification is processed (and toasted) twice
|
|
43
|
+
if (userId) {
|
|
44
|
+
this.stompClient.subscribe(subscriptionName, NotificationServiceWebsocketClient.processNotificationMessage);
|
|
45
|
+
} else {
|
|
46
|
+
console.warn('Unable to resolve websocket user id, falling back to /user/topic/notifications subscription')
|
|
47
|
+
this.stompClient.subscribe('/user/topic/notifications', NotificationServiceWebsocketClient.processNotificationMessage);
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
(error) => {
|
|
51
|
+
console.error('Notification websocket connection failed', error)
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
disconnect () {
|
|
56
|
+
this.socket.close();
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export default new NotificationServiceWebsocketClient();
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import axios from "axios";
|
|
2
|
+
import {
|
|
3
|
+
CredentialManagementApi,
|
|
4
|
+
type UserCreateRequest,
|
|
5
|
+
} from "@/api/platform-management/client";
|
|
6
|
+
|
|
7
|
+
export interface UserOverviewResponse {
|
|
8
|
+
username: string;
|
|
9
|
+
firstName: string;
|
|
10
|
+
lastName: string;
|
|
11
|
+
email: string;
|
|
12
|
+
admin: boolean;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
class PlatformManagementClient{
|
|
16
|
+
|
|
17
|
+
apiUrl = "/platform-management";
|
|
18
|
+
|
|
19
|
+
credentialsApi = new CredentialManagementApi(undefined, this.apiUrl);
|
|
20
|
+
|
|
21
|
+
async getUsers(): Promise<UserOverviewResponse[]> {
|
|
22
|
+
return axios
|
|
23
|
+
.get<UserOverviewResponse[]>(`${this.apiUrl}/users`)
|
|
24
|
+
.then(response => response.data);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
async createUser(userCreateRequest: UserCreateRequest): Promise<void> {
|
|
28
|
+
return axios
|
|
29
|
+
.post(`${this.apiUrl}/users`, userCreateRequest)
|
|
30
|
+
.then(() => undefined);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
async makeUserAdmin(username: string): Promise<void> {
|
|
34
|
+
return axios
|
|
35
|
+
.post(`${this.apiUrl}/users/${encodeURIComponent(username)}/admin`)
|
|
36
|
+
.then(() => undefined);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
async deleteUser(username: string): Promise<void> {
|
|
40
|
+
return axios
|
|
41
|
+
.delete(`${this.apiUrl}/users/${encodeURIComponent(username)}`)
|
|
42
|
+
.then(() => undefined);
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export default new PlatformManagementClient()
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import axios from 'axios'
|
|
2
|
+
import logRequestError from '@/api/restApiHelper.js'
|
|
3
|
+
|
|
4
|
+
class PlatformManagementActuatorRestApi {
|
|
5
|
+
API_URL = '/platform-management/actuator'
|
|
6
|
+
|
|
7
|
+
async getInfo () {
|
|
8
|
+
return axios
|
|
9
|
+
.get(this.API_URL + '/info')
|
|
10
|
+
.then(response => {
|
|
11
|
+
return response.data
|
|
12
|
+
})
|
|
13
|
+
.catch(logRequestError)
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
async getHealth () {
|
|
17
|
+
return axios
|
|
18
|
+
.get(this.API_URL + '/health')
|
|
19
|
+
.then(response => {
|
|
20
|
+
return response.data
|
|
21
|
+
})
|
|
22
|
+
.catch(logRequestError)
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export default new PlatformManagementActuatorRestApi()
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import {
|
|
2
|
+
CapabilitiesApi,
|
|
3
|
+
CapabilityProvidersApi,
|
|
4
|
+
ClustersApi, CredentialsApi,
|
|
5
|
+
DiscoveryApi,
|
|
6
|
+
LocationApi,
|
|
7
|
+
MetricsApi,
|
|
8
|
+
ProfilerApi,
|
|
9
|
+
ResourcesAASApi,
|
|
10
|
+
ResourcesApi,
|
|
11
|
+
ResourceTypesApi, SubmodelTemplatesApi,
|
|
12
|
+
UpdatesApi,
|
|
13
|
+
} from "@/api/resource-management/client";
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
class ResourceManagementClient{
|
|
17
|
+
|
|
18
|
+
apiUrl = "/resource-management";
|
|
19
|
+
|
|
20
|
+
resourcesApi = new ResourcesApi(undefined, this.apiUrl);
|
|
21
|
+
aasApi = new ResourcesAASApi(undefined, this.apiUrl);
|
|
22
|
+
submodelTemplatesRestControllerApi = new SubmodelTemplatesApi(undefined, this.apiUrl);
|
|
23
|
+
clusterApi = new ClustersApi(undefined, this.apiUrl)
|
|
24
|
+
credentialsApi = new CredentialsApi(undefined, this.apiUrl)
|
|
25
|
+
locationApi = new LocationApi(undefined, this.apiUrl);
|
|
26
|
+
metricsApi = new MetricsApi(undefined, this.apiUrl);
|
|
27
|
+
profilerApi = new ProfilerApi(undefined, this.apiUrl);
|
|
28
|
+
capabilityProvidersApi = new CapabilityProvidersApi(undefined, this.apiUrl);
|
|
29
|
+
capabilityApi = new CapabilitiesApi(undefined, this.apiUrl)
|
|
30
|
+
submodelsApi = new ResourcesAASApi(undefined, this.apiUrl);
|
|
31
|
+
discoveryApi = new DiscoveryApi(undefined, this.apiUrl);
|
|
32
|
+
resourcesSubmodelRepositoryApi = new ResourcesAASApi(undefined, this.apiUrl);
|
|
33
|
+
resourcesUpdatesApi = new UpdatesApi(undefined, this.apiUrl);
|
|
34
|
+
resourceTypesApi = new ResourceTypesApi(undefined, this.apiUrl);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export default new ResourceManagementClient()
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import axios from 'axios'
|
|
2
|
+
import logRequestError from '@/api/restApiHelper.js'
|
|
3
|
+
|
|
4
|
+
class ResourceManagementActuatorRestApi {
|
|
5
|
+
API_URL = '/resource-management/actuator'
|
|
6
|
+
|
|
7
|
+
async getInfo () {
|
|
8
|
+
return axios
|
|
9
|
+
.get(this.API_URL + '/info')
|
|
10
|
+
.then(response => {
|
|
11
|
+
return response.data
|
|
12
|
+
})
|
|
13
|
+
.catch(logRequestError)
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
async getHealth () {
|
|
17
|
+
return axios
|
|
18
|
+
.get(this.API_URL + '/health')
|
|
19
|
+
.then(response => {
|
|
20
|
+
return response.data
|
|
21
|
+
})
|
|
22
|
+
.catch(logRequestError)
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export default new ResourceManagementActuatorRestApi()
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export default function logRequestError (error) {
|
|
2
|
+
console.error(error);
|
|
3
|
+
if (error.response) {
|
|
4
|
+
console.error(`Request failed \n${error.response.config.method.toString().toUpperCase()} ${error.response.data.path} \nStatus-Code: ${error.response.status} ${error.response.statusText.toString().toUpperCase()} \nMessage: ${error.response.data.message}`);
|
|
5
|
+
console.error(error);
|
|
6
|
+
} else if (error.request) {
|
|
7
|
+
console.error(error.request);
|
|
8
|
+
} else {
|
|
9
|
+
console.error('Error', error.message);
|
|
10
|
+
}
|
|
11
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import {
|
|
2
|
+
ServiceCategoriesApi,
|
|
3
|
+
ServiceInstanceGroupsApi,
|
|
4
|
+
ServiceInstancesApi,
|
|
5
|
+
ServiceManagementVariablesApi,
|
|
6
|
+
ServiceOfferingsApi,
|
|
7
|
+
ServiceOfferingVersionsApi,
|
|
8
|
+
ServiceRepositoriesApi,
|
|
9
|
+
ServiceVendorsApi,
|
|
10
|
+
UsersApi
|
|
11
|
+
} from "@/api/service-management/client";
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
class ServiceManagementClient {
|
|
15
|
+
|
|
16
|
+
api = "/service-management";
|
|
17
|
+
|
|
18
|
+
serviceInstancesGroupsApi = new ServiceInstanceGroupsApi(undefined, this.api);
|
|
19
|
+
serviceInstancesApi = new ServiceInstancesApi(undefined, this.api);
|
|
20
|
+
variablesApi = new ServiceManagementVariablesApi(undefined, this.api);
|
|
21
|
+
serviceOfferingsApi = new ServiceOfferingsApi(undefined, this.api);
|
|
22
|
+
serviceOfferingVersionsApi = new ServiceOfferingVersionsApi(undefined, this.api);
|
|
23
|
+
serviceVendorsApi = new ServiceVendorsApi(undefined, this.api);
|
|
24
|
+
usersApi = new UsersApi(undefined, this.api);
|
|
25
|
+
serviceCategoriesApi = new ServiceCategoriesApi(undefined, this.api);
|
|
26
|
+
serviceRepositoriesApi = new ServiceRepositoriesApi(undefined, this.api);
|
|
27
|
+
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
export default new ServiceManagementClient();
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import axios from 'axios'
|
|
2
|
+
import logRequestError from '@/api/restApiHelper.js'
|
|
3
|
+
|
|
4
|
+
class ServiceManagementActuatorRestApi {
|
|
5
|
+
API_URL = '/service-management/actuator'
|
|
6
|
+
|
|
7
|
+
async getInfo () {
|
|
8
|
+
return axios
|
|
9
|
+
.get(this.API_URL + '/info')
|
|
10
|
+
.then(response => {
|
|
11
|
+
return response.data
|
|
12
|
+
})
|
|
13
|
+
.catch(logRequestError)
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
async getHealth () {
|
|
17
|
+
return axios
|
|
18
|
+
.get(this.API_URL + '/health')
|
|
19
|
+
.then(response => {
|
|
20
|
+
return response.data
|
|
21
|
+
})
|
|
22
|
+
.catch(logRequestError)
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export default new ServiceManagementActuatorRestApi()
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { createApp } from 'vue';
|
|
2
|
+
import App from '@/App.vue';
|
|
3
|
+
|
|
4
|
+
// The app lives in its own module so that other modules can reach it without importing the entry (main.ts):
|
|
5
|
+
// importing the entry from a module makes Vite (dev, package under node_modules) load a second copy of it.
|
|
6
|
+
export const app = createApp(App);
|
|
7
|
+
|
|
8
|
+
export const globals = app.config.globalProperties;
|
|
@@ -0,0 +1,224 @@
|
|
|
1
|
+
export interface NavContext {
|
|
2
|
+
roles: string[];
|
|
3
|
+
isDeveloper: boolean;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
export interface NavItem {
|
|
7
|
+
id?: string;
|
|
8
|
+
icon?: string;
|
|
9
|
+
titleKey?: string;
|
|
10
|
+
to?: string;
|
|
11
|
+
group?: string;
|
|
12
|
+
/** Defaults to true. */
|
|
13
|
+
visible?: boolean | ((ctx: NavContext) => boolean);
|
|
14
|
+
children?: NavItem[];
|
|
15
|
+
/** Rendering hints consumed by the drawer components. */
|
|
16
|
+
divider?: boolean;
|
|
17
|
+
text?: boolean;
|
|
18
|
+
subGroup?: boolean;
|
|
19
|
+
goToChildOnClick?: number;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export type ResolvedNavItem = Omit<NavItem, 'visible' | 'titleKey' | 'children'> & {
|
|
23
|
+
title?: string;
|
|
24
|
+
visible: boolean;
|
|
25
|
+
children?: ResolvedNavItem[];
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
const isAdmin = (ctx: NavContext) => ctx.roles.includes('slm-admin');
|
|
29
|
+
|
|
30
|
+
export const defaultNavigation: NavItem[] = [
|
|
31
|
+
{
|
|
32
|
+
id: 'main-menu-button-dashboard',
|
|
33
|
+
icon: 'mdi-view-dashboard',
|
|
34
|
+
titleKey: 'drawer.section.dashboard.title',
|
|
35
|
+
to: '/dashboard',
|
|
36
|
+
visible: true,
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
id: 'main-menu-button-jobs',
|
|
40
|
+
icon: 'mdi-account-hard-hat',
|
|
41
|
+
titleKey: 'drawer.section.jobs.title',
|
|
42
|
+
to: '/jobs',
|
|
43
|
+
visible: true,
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
id: 'main-menu-divider-resources',
|
|
47
|
+
titleKey: 'drawer.section.resources.title',
|
|
48
|
+
divider: true,
|
|
49
|
+
visible: true,
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
id: 'main-menu-button-resources',
|
|
53
|
+
icon: 'mdi-desktop-classic',
|
|
54
|
+
titleKey: 'drawer.section.resources.devices.title',
|
|
55
|
+
text: true,
|
|
56
|
+
group: '/resources',
|
|
57
|
+
subGroup: true,
|
|
58
|
+
visible: true,
|
|
59
|
+
goToChildOnClick: 0,
|
|
60
|
+
children: [
|
|
61
|
+
{
|
|
62
|
+
id: 'main-menu-button-admin-components',
|
|
63
|
+
titleKey: 'drawer.section.resources.devices.instances.title',
|
|
64
|
+
icon: 'mdi-menu-open',
|
|
65
|
+
to: 'instances',
|
|
66
|
+
visible: true,
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
id: 'main-menu-button-admin-service-categories',
|
|
70
|
+
titleKey: 'drawer.section.resources.devices.types.title',
|
|
71
|
+
icon: 'mdi-format-list-group',
|
|
72
|
+
to: 'types',
|
|
73
|
+
visible: true,
|
|
74
|
+
},
|
|
75
|
+
],
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
id: 'main-menu-button-clusters',
|
|
79
|
+
icon: 'mdi-server',
|
|
80
|
+
titleKey: 'drawer.section.resources.clusters.title',
|
|
81
|
+
to: '/clusters',
|
|
82
|
+
visible: false,
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
id: 'main-menu-button-discovery',
|
|
86
|
+
icon: 'mdi-tab-search',
|
|
87
|
+
titleKey: 'drawer.section.resources.discovery.title',
|
|
88
|
+
group: '/discovery',
|
|
89
|
+
subGroup: true,
|
|
90
|
+
text: true,
|
|
91
|
+
to: '/discovery/inbox',
|
|
92
|
+
visible: true,
|
|
93
|
+
goToChildOnClick: 0,
|
|
94
|
+
children: [
|
|
95
|
+
{
|
|
96
|
+
id: 'main-menu-button-discovery-inbox',
|
|
97
|
+
titleKey: 'drawer.section.resources.discovery.inbox.title',
|
|
98
|
+
icon: 'mdi-tray-full',
|
|
99
|
+
to: 'inbox',
|
|
100
|
+
visible: true,
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
id: 'main-menu-button-discovery-jobs',
|
|
104
|
+
titleKey: 'drawer.section.resources.discovery.jobs.title',
|
|
105
|
+
icon: 'mdi-file-tree',
|
|
106
|
+
to: 'jobs',
|
|
107
|
+
visible: true,
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
id: 'main-menu-button-discovery-drivers',
|
|
111
|
+
titleKey: 'drawer.section.resources.discovery.drivers.title',
|
|
112
|
+
icon: 'mdi-magnify-scan',
|
|
113
|
+
to: 'drivers',
|
|
114
|
+
visible: true,
|
|
115
|
+
},
|
|
116
|
+
],
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
id: 'main-menu-divider-services',
|
|
120
|
+
titleKey: 'drawer.section.services.title',
|
|
121
|
+
divider: true,
|
|
122
|
+
visible: true,
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
id: 'main-menu-button-service-offering',
|
|
126
|
+
titleKey: 'drawer.section.services.serviceOfferings.title',
|
|
127
|
+
icon: 'mdi-offer',
|
|
128
|
+
to: '/services/offerings',
|
|
129
|
+
visible: true,
|
|
130
|
+
},
|
|
131
|
+
{
|
|
132
|
+
id: 'main-menu-button-service-instances',
|
|
133
|
+
titleKey: 'drawer.section.services.services.title',
|
|
134
|
+
icon: 'mdi-apps',
|
|
135
|
+
to: '/services/instances',
|
|
136
|
+
visible: true,
|
|
137
|
+
},
|
|
138
|
+
{
|
|
139
|
+
id: 'main-menu-button-service-vendors',
|
|
140
|
+
titleKey: 'drawer.section.services.serviceVendor.title',
|
|
141
|
+
icon: 'mdi-toolbox',
|
|
142
|
+
to: '/services/vendors',
|
|
143
|
+
visible: ctx => ctx.isDeveloper,
|
|
144
|
+
},
|
|
145
|
+
{
|
|
146
|
+
id: 'main-menu-divider-admin',
|
|
147
|
+
divider: true,
|
|
148
|
+
visible: true,
|
|
149
|
+
},
|
|
150
|
+
{
|
|
151
|
+
id: 'main-menu-button-admin',
|
|
152
|
+
titleKey: 'drawer.section.admin.title',
|
|
153
|
+
icon: 'mdi-shield-account-variant-outline',
|
|
154
|
+
group: '/admin',
|
|
155
|
+
subGroup: true,
|
|
156
|
+
text: true,
|
|
157
|
+
visible: isAdmin,
|
|
158
|
+
children: [
|
|
159
|
+
{
|
|
160
|
+
id: 'main-menu-button-admin-components',
|
|
161
|
+
titleKey: 'drawer.section.admin.components.title',
|
|
162
|
+
icon: 'mdi-view-module',
|
|
163
|
+
to: 'components',
|
|
164
|
+
visible: isAdmin,
|
|
165
|
+
},
|
|
166
|
+
{
|
|
167
|
+
id: 'main-menu-button-admin-service-categories',
|
|
168
|
+
titleKey: 'drawer.section.admin.service-categories.title',
|
|
169
|
+
icon: 'mdi-shape-outline',
|
|
170
|
+
to: 'service-categories',
|
|
171
|
+
visible: isAdmin,
|
|
172
|
+
},
|
|
173
|
+
{
|
|
174
|
+
id: 'main-menu-button-admin-service-vendors',
|
|
175
|
+
titleKey: 'drawer.section.admin.service-vendors.title',
|
|
176
|
+
icon: 'mdi-treasure-chest',
|
|
177
|
+
to: 'service-vendors',
|
|
178
|
+
visible: isAdmin,
|
|
179
|
+
},
|
|
180
|
+
{
|
|
181
|
+
id: 'main-menu-button-admin-capabilities',
|
|
182
|
+
titleKey: 'drawer.section.admin.capabilities.title',
|
|
183
|
+
icon: 'mdi-puzzle',
|
|
184
|
+
to: 'capabilities',
|
|
185
|
+
visible: isAdmin,
|
|
186
|
+
},
|
|
187
|
+
{
|
|
188
|
+
id: 'main-menu-button-admin-profilers',
|
|
189
|
+
titleKey: 'drawer.section.admin.profilers.title',
|
|
190
|
+
icon: 'mdi-file-search-outline',
|
|
191
|
+
to: 'profilers',
|
|
192
|
+
visible: isAdmin,
|
|
193
|
+
},
|
|
194
|
+
{
|
|
195
|
+
id: 'main-menu-button-admin-ansible-service',
|
|
196
|
+
titleKey: 'drawer.section.admin.ansible-service.title',
|
|
197
|
+
icon: 'mdi-ansible',
|
|
198
|
+
to: 'ansible-service',
|
|
199
|
+
visible: isAdmin,
|
|
200
|
+
},
|
|
201
|
+
{
|
|
202
|
+
id: 'main-menu-button-admin-users',
|
|
203
|
+
// Original used the literal string 'User Management' (no i18n key); kept as-is.
|
|
204
|
+
titleKey: 'User Management',
|
|
205
|
+
icon: 'mdi-account-cog',
|
|
206
|
+
to: 'users',
|
|
207
|
+
visible: isAdmin,
|
|
208
|
+
},
|
|
209
|
+
],
|
|
210
|
+
},
|
|
211
|
+
];
|
|
212
|
+
|
|
213
|
+
export function resolveNavItems(
|
|
214
|
+
items: NavItem[],
|
|
215
|
+
ctx: NavContext,
|
|
216
|
+
t: (key: string) => string,
|
|
217
|
+
): ResolvedNavItem[] {
|
|
218
|
+
return items.map(({titleKey, visible, children, ...rest}) => ({
|
|
219
|
+
...rest,
|
|
220
|
+
title: titleKey === undefined ? undefined : t(titleKey),
|
|
221
|
+
visible: typeof visible === 'function' ? visible(ctx) : (visible ?? true),
|
|
222
|
+
children: children ? resolveNavItems(children, ctx, t) : undefined,
|
|
223
|
+
}));
|
|
224
|
+
}
|