@terasky/backstage-plugin-vcf-automation 0.0.1 → 0.1.0
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 +36 -0
- package/dist/api/VcfAutomationClient.esm.js +90 -0
- package/dist/api/VcfAutomationClient.esm.js.map +1 -0
- package/dist/components/VCFAutomationDeploymentDetails.esm.js +182 -0
- package/dist/components/VCFAutomationDeploymentDetails.esm.js.map +1 -0
- package/dist/components/VCFAutomationDeploymentOverview.esm.js +43 -0
- package/dist/components/VCFAutomationDeploymentOverview.esm.js.map +1 -0
- package/dist/components/VCFAutomationGenericResourceDetails.esm.js +52 -0
- package/dist/components/VCFAutomationGenericResourceDetails.esm.js.map +1 -0
- package/dist/components/VCFAutomationGenericResourceOverview.esm.js +40 -0
- package/dist/components/VCFAutomationGenericResourceOverview.esm.js.map +1 -0
- package/dist/components/VCFAutomationProjectDetails.esm.js +172 -0
- package/dist/components/VCFAutomationProjectDetails.esm.js.map +1 -0
- package/dist/components/VCFAutomationProjectOverview.esm.js +47 -0
- package/dist/components/VCFAutomationProjectOverview.esm.js.map +1 -0
- package/dist/components/VCFAutomationVSphereVMDetails.esm.js +110 -0
- package/dist/components/VCFAutomationVSphereVMDetails.esm.js.map +1 -0
- package/dist/components/VCFAutomationVSphereVMOverview.esm.js +69 -0
- package/dist/components/VCFAutomationVSphereVMOverview.esm.js.map +1 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.esm.js +11 -881
- package/dist/index.esm.js.map +1 -1
- package/dist/plugin.esm.js +82 -0
- package/dist/plugin.esm.js.map +1 -0
- package/dist/routes.esm.js +20 -0
- package/dist/routes.esm.js.map +1 -0
- package/package.json +17 -10
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { useEntity, catalogApiRef } from '@backstage/plugin-catalog-react';
|
|
3
|
+
import { ResponseErrorPanel, Progress, InfoCard, StructuredMetadataTable, Table, Link } from '@backstage/core-components';
|
|
4
|
+
import { Grid } from '@material-ui/core';
|
|
5
|
+
import useAsync from 'react-use/lib/useAsync';
|
|
6
|
+
import { useApi } from '@backstage/core-plugin-api';
|
|
7
|
+
import { vcfAutomationApiRef } from '../api/VcfAutomationClient.esm.js';
|
|
8
|
+
import { viewProjectDetailsPermission } from '@terasky/backstage-plugin-vcf-automation-common';
|
|
9
|
+
import { usePermission } from '@backstage/plugin-permission-react';
|
|
10
|
+
|
|
11
|
+
const VCFAutomationProjectDetails = () => {
|
|
12
|
+
const { entity } = useEntity();
|
|
13
|
+
const vcfAutomationApi = useApi(vcfAutomationApiRef);
|
|
14
|
+
const catalogApi = useApi(catalogApiRef);
|
|
15
|
+
const projectId = entity.metadata.name;
|
|
16
|
+
const { allowed } = usePermission({
|
|
17
|
+
permission: viewProjectDetailsPermission
|
|
18
|
+
});
|
|
19
|
+
const { value: projectData, loading: projectLoading, error: projectError } = useAsync(async () => {
|
|
20
|
+
if (!projectId || !allowed) return void 0;
|
|
21
|
+
return await vcfAutomationApi.getProjectDetails(projectId);
|
|
22
|
+
}, [projectId, allowed]);
|
|
23
|
+
const { value: systemsData, loading: systemsLoading } = useAsync(async () => {
|
|
24
|
+
if (!projectId || !allowed) return void 0;
|
|
25
|
+
const systems = await catalogApi.getEntities({
|
|
26
|
+
filter: {
|
|
27
|
+
kind: "System",
|
|
28
|
+
"spec.domain": projectId
|
|
29
|
+
}
|
|
30
|
+
});
|
|
31
|
+
const deployments = await Promise.all(
|
|
32
|
+
systems.items.map(async (system) => {
|
|
33
|
+
const vms = await catalogApi.getEntities({
|
|
34
|
+
filter: {
|
|
35
|
+
kind: "Component",
|
|
36
|
+
"spec.type": "Cloud.vSphere.Machine",
|
|
37
|
+
"spec.system": system.metadata.name
|
|
38
|
+
}
|
|
39
|
+
});
|
|
40
|
+
const resources = await catalogApi.getEntities({
|
|
41
|
+
filter: {
|
|
42
|
+
kind: "Resource",
|
|
43
|
+
"spec.system": system.metadata.name
|
|
44
|
+
}
|
|
45
|
+
});
|
|
46
|
+
const owner = system.spec?.owner;
|
|
47
|
+
return {
|
|
48
|
+
name: system.metadata.name,
|
|
49
|
+
title: system.metadata.title || system.metadata.name,
|
|
50
|
+
owner: typeof owner === "string" ? owner : "N/A",
|
|
51
|
+
vmCount: vms.items.length,
|
|
52
|
+
resourceCount: resources.items.length,
|
|
53
|
+
entityRef: `/catalog/${system.metadata.namespace || "default"}/system/${system.metadata.name}`
|
|
54
|
+
};
|
|
55
|
+
})
|
|
56
|
+
);
|
|
57
|
+
return deployments;
|
|
58
|
+
}, [projectId, allowed]);
|
|
59
|
+
if (projectError) {
|
|
60
|
+
return /* @__PURE__ */ React.createElement(ResponseErrorPanel, { error: projectError });
|
|
61
|
+
}
|
|
62
|
+
if (projectLoading || systemsLoading) {
|
|
63
|
+
return /* @__PURE__ */ React.createElement(Progress, null);
|
|
64
|
+
}
|
|
65
|
+
if (!projectId) {
|
|
66
|
+
return /* @__PURE__ */ React.createElement(InfoCard, { title: "No project ID found" }, "This entity is not associated with a VCF project.");
|
|
67
|
+
}
|
|
68
|
+
if (!allowed) {
|
|
69
|
+
return /* @__PURE__ */ React.createElement(InfoCard, { title: "Permission Denied" }, "You don't have permission to view project details.");
|
|
70
|
+
}
|
|
71
|
+
if (!projectData) {
|
|
72
|
+
return /* @__PURE__ */ React.createElement(InfoCard, { title: "No Data" }, "No project details available.");
|
|
73
|
+
}
|
|
74
|
+
const renderMemberTable = (members, title) => /* @__PURE__ */ React.createElement(Grid, { item: true, xs: 12, md: 6 }, /* @__PURE__ */ React.createElement(InfoCard, { title }, /* @__PURE__ */ React.createElement(
|
|
75
|
+
Table,
|
|
76
|
+
{
|
|
77
|
+
columns: [
|
|
78
|
+
{ title: "Email", field: "email" },
|
|
79
|
+
{ title: "Type", field: "type" }
|
|
80
|
+
],
|
|
81
|
+
data: members,
|
|
82
|
+
options: { search: false, paging: false }
|
|
83
|
+
}
|
|
84
|
+
)));
|
|
85
|
+
return /* @__PURE__ */ React.createElement(Grid, { container: true, spacing: 3 }, /* @__PURE__ */ React.createElement(Grid, { item: true, xs: 12 }, /* @__PURE__ */ React.createElement(InfoCard, { title: "Project Overview" }, /* @__PURE__ */ React.createElement(
|
|
86
|
+
StructuredMetadataTable,
|
|
87
|
+
{
|
|
88
|
+
metadata: {
|
|
89
|
+
"Project Name": projectData.name,
|
|
90
|
+
"Project ID": projectData.id,
|
|
91
|
+
Description: projectData.description,
|
|
92
|
+
"Organization ID": projectData.organizationId,
|
|
93
|
+
"Operation Timeout": `${projectData.operationTimeout} seconds`,
|
|
94
|
+
"Machine Naming Template": projectData.machineNamingTemplate || "N/A",
|
|
95
|
+
"Shared Resources": projectData.sharedResources ? "Yes" : "No"
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
))), /* @__PURE__ */ React.createElement(Grid, { item: true, xs: 12 }, /* @__PURE__ */ React.createElement(InfoCard, { title: "Project Deployments" }, /* @__PURE__ */ React.createElement(
|
|
99
|
+
Table,
|
|
100
|
+
{
|
|
101
|
+
columns: [
|
|
102
|
+
{
|
|
103
|
+
title: "Name",
|
|
104
|
+
field: "title",
|
|
105
|
+
render: (row) => /* @__PURE__ */ React.createElement(Link, { to: row.entityRef }, row.title)
|
|
106
|
+
},
|
|
107
|
+
{ title: "Owner", field: "owner" },
|
|
108
|
+
{
|
|
109
|
+
title: "VMs",
|
|
110
|
+
field: "vmCount",
|
|
111
|
+
align: "right"
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
title: "Additional Resources",
|
|
115
|
+
field: "resourceCount",
|
|
116
|
+
align: "right"
|
|
117
|
+
}
|
|
118
|
+
],
|
|
119
|
+
data: systemsData || [],
|
|
120
|
+
options: {
|
|
121
|
+
search: true,
|
|
122
|
+
paging: true
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
))), /* @__PURE__ */ React.createElement(Grid, { item: true, xs: 12 }, /* @__PURE__ */ React.createElement(InfoCard, { title: "Project Members" }, /* @__PURE__ */ React.createElement(Grid, { container: true, spacing: 3 }, renderMemberTable(projectData.administrators, "Administrators"), renderMemberTable(projectData.members, "Members"), renderMemberTable(projectData.viewers, "Viewers"), renderMemberTable(projectData.supervisors, "Supervisors")))), /* @__PURE__ */ React.createElement(Grid, { item: true, xs: 12 }, /* @__PURE__ */ React.createElement(InfoCard, { title: "Project Zones" }, /* @__PURE__ */ React.createElement(
|
|
126
|
+
Table,
|
|
127
|
+
{
|
|
128
|
+
columns: [
|
|
129
|
+
{ title: "Zone ID", field: "zoneId" },
|
|
130
|
+
{ title: "Priority", field: "priority" },
|
|
131
|
+
{
|
|
132
|
+
title: "Instances",
|
|
133
|
+
field: "instances",
|
|
134
|
+
render: (row) => `${row.allocatedInstancesCount}/${row.maxNumberInstances || "\u221E"}`
|
|
135
|
+
},
|
|
136
|
+
{
|
|
137
|
+
title: "Memory (MB)",
|
|
138
|
+
field: "memory",
|
|
139
|
+
render: (row) => `${row.allocatedMemoryMB}/${row.memoryLimitMB || "\u221E"}`
|
|
140
|
+
},
|
|
141
|
+
{
|
|
142
|
+
title: "CPU",
|
|
143
|
+
field: "cpu",
|
|
144
|
+
render: (row) => `${row.allocatedCpu}/${row.cpuLimit || "\u221E"}`
|
|
145
|
+
},
|
|
146
|
+
{
|
|
147
|
+
title: "Storage (GB)",
|
|
148
|
+
field: "storage",
|
|
149
|
+
render: (row) => `${row.allocatedStorageGB}/${row.storageLimitGB || "\u221E"}`
|
|
150
|
+
}
|
|
151
|
+
],
|
|
152
|
+
data: projectData.zones,
|
|
153
|
+
options: {
|
|
154
|
+
search: true,
|
|
155
|
+
paging: true
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
))), Object.keys(projectData.constraints).length > 0 && /* @__PURE__ */ React.createElement(Grid, { item: true, xs: 12 }, /* @__PURE__ */ React.createElement(InfoCard, { title: "Constraints" }, /* @__PURE__ */ React.createElement(
|
|
159
|
+
StructuredMetadataTable,
|
|
160
|
+
{
|
|
161
|
+
metadata: projectData.constraints
|
|
162
|
+
}
|
|
163
|
+
))), Object.keys(projectData.customProperties).length > 0 && /* @__PURE__ */ React.createElement(Grid, { item: true, xs: 12 }, /* @__PURE__ */ React.createElement(InfoCard, { title: "Custom Properties" }, /* @__PURE__ */ React.createElement(
|
|
164
|
+
StructuredMetadataTable,
|
|
165
|
+
{
|
|
166
|
+
metadata: projectData.customProperties
|
|
167
|
+
}
|
|
168
|
+
))));
|
|
169
|
+
};
|
|
170
|
+
|
|
171
|
+
export { VCFAutomationProjectDetails };
|
|
172
|
+
//# sourceMappingURL=VCFAutomationProjectDetails.esm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"VCFAutomationProjectDetails.esm.js","sources":["../../src/components/VCFAutomationProjectDetails.tsx"],"sourcesContent":["import React from 'react';\nimport { useEntity, catalogApiRef } from '@backstage/plugin-catalog-react';\nimport {\n InfoCard,\n Progress,\n ResponseErrorPanel,\n StructuredMetadataTable,\n Table,\n Link,\n} from '@backstage/core-components';\nimport { Grid } from '@material-ui/core';\nimport useAsync from 'react-use/lib/useAsync';\nimport { useApi } from '@backstage/core-plugin-api';\nimport { vcfAutomationApiRef } from '../api/VcfAutomationClient';\nimport { viewProjectDetailsPermission } from '@terasky/backstage-plugin-vcf-automation-common';\nimport { usePermission } from '@backstage/plugin-permission-react';\nimport { VcfProjectZone } from '../types';\n\ntype ProjectMember = {\n email: string;\n type: string;\n};\n\ntype SystemDeployment = {\n name: string;\n title: string;\n owner: string;\n vmCount: number;\n resourceCount: number;\n entityRef: string;\n};\n\nexport const VCFAutomationProjectDetails = () => {\n const { entity } = useEntity();\n const vcfAutomationApi = useApi(vcfAutomationApiRef);\n const catalogApi = useApi(catalogApiRef);\n const projectId = entity.metadata.name;\n\n const { allowed } = usePermission({\n permission: viewProjectDetailsPermission,\n });\n\n const { value: projectData, loading: projectLoading, error: projectError } = useAsync(async () => {\n if (!projectId || !allowed) return undefined;\n return await vcfAutomationApi.getProjectDetails(projectId);\n }, [projectId, allowed]);\n\n const { value: systemsData, loading: systemsLoading } = useAsync(async () => {\n if (!projectId || !allowed) return undefined;\n\n // Get all systems that belong to this project's domain\n const systems = await catalogApi.getEntities({\n filter: {\n kind: 'System',\n 'spec.domain': projectId,\n },\n });\n\n const deployments = await Promise.all(\n systems.items.map(async (system) => {\n // Get VMs belonging to this system\n const vms = await catalogApi.getEntities({\n filter: {\n kind: 'Component',\n 'spec.type': 'Cloud.vSphere.Machine',\n 'spec.system': system.metadata.name,\n },\n });\n\n // Get other resources belonging to this system\n const resources = await catalogApi.getEntities({\n filter: {\n kind: 'Resource',\n 'spec.system': system.metadata.name,\n },\n });\n\n const owner = system.spec?.owner;\n return {\n name: system.metadata.name,\n title: system.metadata.title || system.metadata.name,\n owner: typeof owner === 'string' ? owner : 'N/A',\n vmCount: vms.items.length,\n resourceCount: resources.items.length,\n entityRef: `/catalog/${system.metadata.namespace || 'default'}/system/${system.metadata.name}`,\n } as SystemDeployment;\n }),\n );\n\n return deployments;\n }, [projectId, allowed]);\n\n if (projectError) {\n return <ResponseErrorPanel error={projectError} />;\n }\n\n if (projectLoading || systemsLoading) {\n return <Progress />;\n }\n\n if (!projectId) {\n return <InfoCard title=\"No project ID found\">This entity is not associated with a VCF project.</InfoCard>;\n }\n\n if (!allowed) {\n return <InfoCard title=\"Permission Denied\">You don't have permission to view project details.</InfoCard>;\n }\n\n if (!projectData) {\n return <InfoCard title=\"No Data\">No project details available.</InfoCard>;\n }\n\n const renderMemberTable = (members: ProjectMember[], title: string) => (\n <Grid item xs={12} md={6}>\n <InfoCard title={title}>\n <Table\n columns={[\n { title: 'Email', field: 'email' },\n { title: 'Type', field: 'type' },\n ]}\n data={members}\n options={{ search: false, paging: false }}\n />\n </InfoCard>\n </Grid>\n );\n\n return (\n <Grid container spacing={3}>\n <Grid item xs={12}>\n <InfoCard title=\"Project Overview\">\n <StructuredMetadataTable\n metadata={{\n 'Project Name': projectData.name,\n 'Project ID': projectData.id,\n Description: projectData.description,\n 'Organization ID': projectData.organizationId,\n 'Operation Timeout': `${projectData.operationTimeout} seconds`,\n 'Machine Naming Template': projectData.machineNamingTemplate || 'N/A',\n 'Shared Resources': projectData.sharedResources ? 'Yes' : 'No',\n }}\n />\n </InfoCard>\n </Grid>\n\n <Grid item xs={12}>\n <InfoCard title=\"Project Deployments\">\n <Table\n columns={[\n { \n title: 'Name', \n field: 'title',\n render: (row: SystemDeployment) => (\n <Link to={row.entityRef}>{row.title}</Link>\n ),\n },\n { title: 'Owner', field: 'owner' },\n { \n title: 'VMs', \n field: 'vmCount',\n align: 'right',\n },\n { \n title: 'Additional Resources', \n field: 'resourceCount',\n align: 'right',\n },\n ]}\n data={systemsData || []}\n options={{\n search: true,\n paging: true,\n }}\n />\n </InfoCard>\n </Grid>\n\n <Grid item xs={12}>\n <InfoCard title=\"Project Members\">\n <Grid container spacing={3}>\n {renderMemberTable(projectData.administrators, 'Administrators')}\n {renderMemberTable(projectData.members, 'Members')}\n {renderMemberTable(projectData.viewers, 'Viewers')}\n {renderMemberTable(projectData.supervisors, 'Supervisors')}\n </Grid>\n </InfoCard>\n </Grid>\n\n <Grid item xs={12}>\n <InfoCard title=\"Project Zones\">\n <Table\n columns={[\n { title: 'Zone ID', field: 'zoneId' },\n { title: 'Priority', field: 'priority' },\n { \n title: 'Instances', \n field: 'instances',\n render: (row: VcfProjectZone) => `${row.allocatedInstancesCount}/${row.maxNumberInstances || '∞'}`,\n },\n { \n title: 'Memory (MB)', \n field: 'memory',\n render: (row: VcfProjectZone) => `${row.allocatedMemoryMB}/${row.memoryLimitMB || '∞'}`,\n },\n { \n title: 'CPU', \n field: 'cpu',\n render: (row: VcfProjectZone) => `${row.allocatedCpu}/${row.cpuLimit || '∞'}`,\n },\n { \n title: 'Storage (GB)', \n field: 'storage',\n render: (row: VcfProjectZone) => `${row.allocatedStorageGB}/${row.storageLimitGB || '∞'}`,\n },\n ]}\n data={projectData.zones}\n options={{\n search: true,\n paging: true,\n }}\n />\n </InfoCard>\n </Grid>\n\n {Object.keys(projectData.constraints).length > 0 && (\n <Grid item xs={12}>\n <InfoCard title=\"Constraints\">\n <StructuredMetadataTable\n metadata={projectData.constraints}\n />\n </InfoCard>\n </Grid>\n )}\n\n {Object.keys(projectData.customProperties).length > 0 && (\n <Grid item xs={12}>\n <InfoCard title=\"Custom Properties\">\n <StructuredMetadataTable\n metadata={projectData.customProperties}\n />\n </InfoCard>\n </Grid>\n )}\n </Grid>\n );\n}; "],"names":[],"mappings":";;;;;;;;;;AAgCO,MAAM,8BAA8B,MAAM;AAC/C,EAAM,MAAA,EAAE,MAAO,EAAA,GAAI,SAAU,EAAA;AAC7B,EAAM,MAAA,gBAAA,GAAmB,OAAO,mBAAmB,CAAA;AACnD,EAAM,MAAA,UAAA,GAAa,OAAO,aAAa,CAAA;AACvC,EAAM,MAAA,SAAA,GAAY,OAAO,QAAS,CAAA,IAAA;AAElC,EAAM,MAAA,EAAE,OAAQ,EAAA,GAAI,aAAc,CAAA;AAAA,IAChC,UAAY,EAAA;AAAA,GACb,CAAA;AAED,EAAM,MAAA,EAAE,OAAO,WAAa,EAAA,OAAA,EAAS,gBAAgB,KAAO,EAAA,YAAA,EAAiB,GAAA,QAAA,CAAS,YAAY;AAChG,IAAA,IAAI,CAAC,SAAA,IAAa,CAAC,OAAA,EAAgB,OAAA,KAAA,CAAA;AACnC,IAAO,OAAA,MAAM,gBAAiB,CAAA,iBAAA,CAAkB,SAAS,CAAA;AAAA,GACxD,EAAA,CAAC,SAAW,EAAA,OAAO,CAAC,CAAA;AAEvB,EAAA,MAAM,EAAE,KAAO,EAAA,WAAA,EAAa,SAAS,cAAe,EAAA,GAAI,SAAS,YAAY;AAC3E,IAAA,IAAI,CAAC,SAAA,IAAa,CAAC,OAAA,EAAgB,OAAA,KAAA,CAAA;AAGnC,IAAM,MAAA,OAAA,GAAU,MAAM,UAAA,CAAW,WAAY,CAAA;AAAA,MAC3C,MAAQ,EAAA;AAAA,QACN,IAAM,EAAA,QAAA;AAAA,QACN,aAAe,EA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,WAAA,CAAY,gBAAgB,CAAE,CAAA,MAAA,GAAS,qBACjD,KAAA,CAAA,aAAA,CAAA,IAAA,EAAA,EAAK,MAAI,IAAC,EAAA,EAAA,EAAI,sBACZ,KAAA,CAAA,aAAA,CAAA,QAAA,EAAA,EAAS,OAAM,mBACd,EAAA,kBAAA,KAAA,CAAA,aAAA;AAAA,IAAC,uBAAA;AAAA,IAAA;AAAA,MACC,UAAU,WAAY,CAAA;AAAA;AAAA,GAE1B,CACF,CAEJ,CAAA;AAEJ;;;;"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { useEntity } from '@backstage/plugin-catalog-react';
|
|
3
|
+
import { useApi } from '@backstage/core-plugin-api';
|
|
4
|
+
import { vcfAutomationApiRef } from '../api/VcfAutomationClient.esm.js';
|
|
5
|
+
import { InfoCard, Progress, ResponseErrorPanel } from '@backstage/core-components';
|
|
6
|
+
import { Typography, Grid, Chip } from '@material-ui/core';
|
|
7
|
+
import useAsync from 'react-use/lib/useAsync';
|
|
8
|
+
import { usePermission } from '@backstage/plugin-permission-react';
|
|
9
|
+
import { viewProjectDetailsPermission } from '@terasky/backstage-plugin-vcf-automation-common';
|
|
10
|
+
|
|
11
|
+
const VCFAutomationProjectOverview = () => {
|
|
12
|
+
const { entity } = useEntity();
|
|
13
|
+
const api = useApi(vcfAutomationApiRef);
|
|
14
|
+
const projectId = entity.metadata.name;
|
|
15
|
+
const { allowed: hasViewPermission, loading: permissionLoading } = usePermission({
|
|
16
|
+
permission: viewProjectDetailsPermission
|
|
17
|
+
});
|
|
18
|
+
const { value: project, loading, error } = useAsync(async () => {
|
|
19
|
+
if (!projectId || !hasViewPermission) return void 0;
|
|
20
|
+
return await api.getProjectDetails(projectId);
|
|
21
|
+
}, [projectId, hasViewPermission]);
|
|
22
|
+
if (!projectId) {
|
|
23
|
+
return /* @__PURE__ */ React.createElement(InfoCard, { title: "VCF Automation Project" }, /* @__PURE__ */ React.createElement(Typography, null, "No project ID found for this entity."));
|
|
24
|
+
}
|
|
25
|
+
if (loading || permissionLoading) {
|
|
26
|
+
return /* @__PURE__ */ React.createElement(InfoCard, { title: "VCF Automation Project" }, /* @__PURE__ */ React.createElement(Progress, null));
|
|
27
|
+
}
|
|
28
|
+
if (!hasViewPermission) {
|
|
29
|
+
return /* @__PURE__ */ React.createElement(InfoCard, { title: "VCF Automation Project" }, /* @__PURE__ */ React.createElement(Typography, null, "You don't have permission to view project details."));
|
|
30
|
+
}
|
|
31
|
+
if (error) {
|
|
32
|
+
return /* @__PURE__ */ React.createElement(ResponseErrorPanel, { error });
|
|
33
|
+
}
|
|
34
|
+
if (!project) {
|
|
35
|
+
return /* @__PURE__ */ React.createElement(InfoCard, { title: "VCF Automation Project" }, /* @__PURE__ */ React.createElement(Typography, null, "No project details available."));
|
|
36
|
+
}
|
|
37
|
+
return /* @__PURE__ */ React.createElement(InfoCard, { title: "VCF Automation Project" }, /* @__PURE__ */ React.createElement(Grid, { container: true, spacing: 2 }, /* @__PURE__ */ React.createElement(Grid, { item: true, xs: 6 }, /* @__PURE__ */ React.createElement(Typography, { variant: "subtitle2" }, "Name"), /* @__PURE__ */ React.createElement(Typography, null, project.name)), /* @__PURE__ */ React.createElement(Grid, { item: true, xs: 6 }, /* @__PURE__ */ React.createElement(Typography, { variant: "subtitle2" }, "Description"), /* @__PURE__ */ React.createElement(Typography, null, project.description || "No description")), /* @__PURE__ */ React.createElement(Grid, { item: true, xs: 12 }, /* @__PURE__ */ React.createElement(Typography, { variant: "subtitle2" }, "Administrators"), /* @__PURE__ */ React.createElement(Grid, { container: true, spacing: 1 }, project.administrators.map((admin) => /* @__PURE__ */ React.createElement(Grid, { item: true, key: `${admin.email}-${admin.type}` }, /* @__PURE__ */ React.createElement(
|
|
38
|
+
Chip,
|
|
39
|
+
{
|
|
40
|
+
label: `${admin.email} (${admin.type})`,
|
|
41
|
+
size: "small"
|
|
42
|
+
}
|
|
43
|
+
))))), /* @__PURE__ */ React.createElement(Grid, { item: true, xs: 12 }, /* @__PURE__ */ React.createElement(Typography, { variant: "subtitle2" }, "Resource Allocation"), project.zones.map((zone) => /* @__PURE__ */ React.createElement(Grid, { container: true, spacing: 2, key: zone.id }, /* @__PURE__ */ React.createElement(Grid, { item: true, xs: 12 }, /* @__PURE__ */ React.createElement(Typography, { variant: "body2" }, "Zone: ", zone.zoneId)), /* @__PURE__ */ React.createElement(Grid, { item: true, xs: 4 }, /* @__PURE__ */ React.createElement(Typography, { variant: "caption" }, "Instances"), /* @__PURE__ */ React.createElement(Typography, null, zone.allocatedInstancesCount, " / ", zone.maxNumberInstances || "Unlimited")), /* @__PURE__ */ React.createElement(Grid, { item: true, xs: 4 }, /* @__PURE__ */ React.createElement(Typography, { variant: "caption" }, "Memory (MB)"), /* @__PURE__ */ React.createElement(Typography, null, zone.allocatedMemoryMB, " / ", zone.memoryLimitMB || "Unlimited")), /* @__PURE__ */ React.createElement(Grid, { item: true, xs: 4 }, /* @__PURE__ */ React.createElement(Typography, { variant: "caption" }, "CPU"), /* @__PURE__ */ React.createElement(Typography, null, zone.allocatedCpu, " / ", zone.cpuLimit || "Unlimited")), /* @__PURE__ */ React.createElement(Grid, { item: true, xs: 4 }, /* @__PURE__ */ React.createElement(Typography, { variant: "caption" }, "Storage (GB)"), /* @__PURE__ */ React.createElement(Typography, null, zone.allocatedStorageGB, " / ", zone.storageLimitGB || "Unlimited"))))), /* @__PURE__ */ React.createElement(Grid, { item: true, xs: 6 }, /* @__PURE__ */ React.createElement(Typography, { variant: "subtitle2" }, "Shared Resources"), /* @__PURE__ */ React.createElement(Typography, null, project.sharedResources ? "Yes" : "No")), /* @__PURE__ */ React.createElement(Grid, { item: true, xs: 6 }, /* @__PURE__ */ React.createElement(Typography, { variant: "subtitle2" }, "Placement Policy"), /* @__PURE__ */ React.createElement(Typography, null, project.placementPolicy))));
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
export { VCFAutomationProjectOverview };
|
|
47
|
+
//# sourceMappingURL=VCFAutomationProjectOverview.esm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"VCFAutomationProjectOverview.esm.js","sources":["../../src/components/VCFAutomationProjectOverview.tsx"],"sourcesContent":["import React from 'react';\nimport { useEntity } from '@backstage/plugin-catalog-react';\nimport { useApi } from '@backstage/core-plugin-api';\nimport { vcfAutomationApiRef } from '../api/VcfAutomationClient';\nimport {\n InfoCard,\n Progress,\n ResponseErrorPanel,\n} from '@backstage/core-components';\nimport { Grid, Typography, Chip } from '@material-ui/core';\nimport useAsync from 'react-use/lib/useAsync';\nimport { usePermission } from '@backstage/plugin-permission-react';\nimport { viewProjectDetailsPermission } from '@terasky/backstage-plugin-vcf-automation-common';\n\nexport const VCFAutomationProjectOverview = () => {\n const { entity } = useEntity();\n const api = useApi(vcfAutomationApiRef);\n const projectId = entity.metadata.name;\n\n const { allowed: hasViewPermission, loading: permissionLoading } = usePermission({\n permission: viewProjectDetailsPermission,\n });\n\n const { value: project, loading, error } = useAsync(async () => {\n if (!projectId || !hasViewPermission) return undefined;\n return await api.getProjectDetails(projectId);\n }, [projectId, hasViewPermission]);\n\n if (!projectId) {\n return (\n <InfoCard title=\"VCF Automation Project\">\n <Typography>No project ID found for this entity.</Typography>\n </InfoCard>\n );\n }\n\n if (loading || permissionLoading) {\n return (\n <InfoCard title=\"VCF Automation Project\">\n <Progress />\n </InfoCard>\n );\n }\n\n if (!hasViewPermission) {\n return (\n <InfoCard title=\"VCF Automation Project\">\n <Typography>You don't have permission to view project details.</Typography>\n </InfoCard>\n );\n }\n\n if (error) {\n return <ResponseErrorPanel error={error} />;\n }\n\n if (!project) {\n return (\n <InfoCard title=\"VCF Automation Project\">\n <Typography>No project details available.</Typography>\n </InfoCard>\n );\n }\n\n return (\n <InfoCard title=\"VCF Automation Project\">\n <Grid container spacing={2}>\n <Grid item xs={6}>\n <Typography variant=\"subtitle2\">Name</Typography>\n <Typography>{project.name}</Typography>\n </Grid>\n <Grid item xs={6}>\n <Typography variant=\"subtitle2\">Description</Typography>\n <Typography>{project.description || 'No description'}</Typography>\n </Grid>\n <Grid item xs={12}>\n <Typography variant=\"subtitle2\">Administrators</Typography>\n <Grid container spacing={1}>\n {project.administrators.map((admin: { email: any; type: any; }) => (\n <Grid item key={`${admin.email}-${admin.type}`}>\n <Chip\n label={`${admin.email} (${admin.type})`}\n size=\"small\"\n />\n </Grid>\n ))}\n </Grid>\n </Grid>\n <Grid item xs={12}>\n <Typography variant=\"subtitle2\">Resource Allocation</Typography>\n {project.zones.map((zone: { id: React.Key | null | undefined; zoneId: string | number | boolean | React.ReactElement<any, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | React.ReactPortal | null | undefined; allocatedInstancesCount: string | number | boolean | React.ReactElement<any, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | React.ReactPortal | null | undefined; maxNumberInstances: any; allocatedMemoryMB: string | number | boolean | React.ReactElement<any, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | React.ReactPortal | null | undefined; memoryLimitMB: any; allocatedCpu: string | number | boolean | React.ReactElement<any, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | React.ReactPortal | null | undefined; cpuLimit: any; allocatedStorageGB: string | number | boolean | React.ReactElement<any, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | React.ReactPortal | null | undefined; storageLimitGB: any; }) => (\n <Grid container spacing={2} key={zone.id}>\n <Grid item xs={12}>\n <Typography variant=\"body2\">Zone: {zone.zoneId}</Typography>\n </Grid>\n <Grid item xs={4}>\n <Typography variant=\"caption\">Instances</Typography>\n <Typography>\n {zone.allocatedInstancesCount} / {zone.maxNumberInstances || 'Unlimited'}\n </Typography>\n </Grid>\n <Grid item xs={4}>\n <Typography variant=\"caption\">Memory (MB)</Typography>\n <Typography>\n {zone.allocatedMemoryMB} / {zone.memoryLimitMB || 'Unlimited'}\n </Typography>\n </Grid>\n <Grid item xs={4}>\n <Typography variant=\"caption\">CPU</Typography>\n <Typography>\n {zone.allocatedCpu} / {zone.cpuLimit || 'Unlimited'}\n </Typography>\n </Grid>\n <Grid item xs={4}>\n <Typography variant=\"caption\">Storage (GB)</Typography>\n <Typography>\n {zone.allocatedStorageGB} / {zone.storageLimitGB || 'Unlimited'}\n </Typography>\n </Grid>\n </Grid>\n ))}\n </Grid>\n <Grid item xs={6}>\n <Typography variant=\"subtitle2\">Shared Resources</Typography>\n <Typography>{project.sharedResources ? 'Yes' : 'No'}</Typography>\n </Grid>\n <Grid item xs={6}>\n <Typography variant=\"subtitle2\">Placement Policy</Typography>\n <Typography>{project.placementPolicy}</Typography>\n </Grid>\n </Grid>\n </InfoCard>\n );\n}; "],"names":[],"mappings":";;;;;;;;;;AAcO,MAAM,+BAA+B,MAAM;AAChD,EAAM,MAAA,EAAE,MAAO,EAAA,GAAI,SAAU,EAAA;AAC7B,EAAM,MAAA,GAAA,GAAM,OAAO,mBAAmB,CAAA;AACtC,EAAM,MAAA,SAAA,GAAY,OAAO,QAAS,CAAA,IAAA;AAElC,EAAA,MAAM,EAAE,OAAS,EAAA,iBAAA,EAAmB,OAAS,EAAA,iBAAA,KAAsB,aAAc,CAAA;AAAA,IAC/E,UAAY,EAAA;AAAA,GACb,CAAA;AAED,EAAA,MAAM,EAAE,KAAO,EAAA,OAAA,EAAS,SAAS,KAAM,EAAA,GAAI,SAAS,YAAY;AAC9D,IAAA,IAAI,CAAC,SAAA,IAAa,CAAC,iBAAA,EAA0B,OAAA,KAAA,CAAA;AAC7C,IAAO,OAAA,MAAM,GAAI,CAAA,iBAAA,CAAkB,SAAS,CAAA;AAAA,GAC3C,EAAA,CAAC,SAAW,EAAA,iBAAiB,CAAC,CAAA;AAEjC,EAAA,IAAI,CAAC,SAAW,EAAA;AACd,IAAA,2CACG,QAAS,EAAA,EAAA,KAAA,EAAM,4CACb,KAAA,CAAA,aAAA,CAAA,UAAA,EAAA,IAAA,EAAW,sCAAoC,CAClD,CAAA;AAAA;AAIJ,EAAA,IAAI,WAAW,i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AAA,IAAA,EAAA,EAAK,MAAI,IAAC,EAAA,EAAA,EAAI,qBACZ,KAAA,CAAA,aAAA,CAAA,UAAA,EAAA,EAAW,SAAQ,WAAY,EAAA,EAAA,kBAAgB,mBAC/C,KAAA,CAAA,aAAA,CAAA,UAAA,EAAA,IAAA,EAAY,QAAQ,eAAgB,CACvC,CACF,CACF,CAAA;AAEJ;;;;"}
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { useEntity } from '@backstage/plugin-catalog-react';
|
|
3
|
+
import { ResponseErrorPanel, Progress, InfoCard, StructuredMetadataTable } from '@backstage/core-components';
|
|
4
|
+
import { Grid } from '@material-ui/core';
|
|
5
|
+
import useAsync from 'react-use/lib/useAsync';
|
|
6
|
+
import { useApi } from '@backstage/core-plugin-api';
|
|
7
|
+
import { vcfAutomationApiRef } from '../api/VcfAutomationClient.esm.js';
|
|
8
|
+
import { showDeploymentResourcesDataPermission } from '@terasky/backstage-plugin-vcf-automation-common';
|
|
9
|
+
import { usePermission } from '@backstage/plugin-permission-react';
|
|
10
|
+
|
|
11
|
+
const VCFAutomationVSphereVMDetails = () => {
|
|
12
|
+
const { entity } = useEntity();
|
|
13
|
+
const vcfAutomationApi = useApi(vcfAutomationApiRef);
|
|
14
|
+
const deploymentId = entity.spec?.system || "";
|
|
15
|
+
const resourceId = entity.metadata.name;
|
|
16
|
+
const { allowed } = usePermission({
|
|
17
|
+
permission: showDeploymentResourcesDataPermission
|
|
18
|
+
});
|
|
19
|
+
const { value, loading, error } = useAsync(async () => {
|
|
20
|
+
if (!resourceId || !deploymentId || !allowed) return void 0;
|
|
21
|
+
return await vcfAutomationApi.getVSphereVMDetails(deploymentId, resourceId);
|
|
22
|
+
}, [resourceId, deploymentId, allowed]);
|
|
23
|
+
if (error) {
|
|
24
|
+
return /* @__PURE__ */ React.createElement(ResponseErrorPanel, { error });
|
|
25
|
+
}
|
|
26
|
+
if (loading) {
|
|
27
|
+
return /* @__PURE__ */ React.createElement(Progress, null);
|
|
28
|
+
}
|
|
29
|
+
if (!resourceId || !deploymentId) {
|
|
30
|
+
return /* @__PURE__ */ React.createElement(InfoCard, { title: "No resource ID found" }, "This entity is not associated with a VCF resource or deployment.");
|
|
31
|
+
}
|
|
32
|
+
if (!allowed) {
|
|
33
|
+
return /* @__PURE__ */ React.createElement(InfoCard, { title: "Permission Denied" }, "You don't have permission to view resource details.");
|
|
34
|
+
}
|
|
35
|
+
if (!value) {
|
|
36
|
+
return /* @__PURE__ */ React.createElement(InfoCard, { title: "No Data" }, "No resource details available.");
|
|
37
|
+
}
|
|
38
|
+
return /* @__PURE__ */ React.createElement(Grid, { container: true, spacing: 3 }, /* @__PURE__ */ React.createElement(Grid, { item: true, xs: 12 }, /* @__PURE__ */ React.createElement(InfoCard, { title: "Resource Status" }, /* @__PURE__ */ React.createElement(
|
|
39
|
+
StructuredMetadataTable,
|
|
40
|
+
{
|
|
41
|
+
metadata: {
|
|
42
|
+
Name: value.name,
|
|
43
|
+
Type: value.type,
|
|
44
|
+
State: value.state,
|
|
45
|
+
"Sync Status": value.syncStatus,
|
|
46
|
+
"Created At": new Date(value.createdAt).toLocaleString(),
|
|
47
|
+
Origin: value.origin,
|
|
48
|
+
"Depends On": value.dependsOn
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
))), /* @__PURE__ */ React.createElement(Grid, { item: true, xs: 12, md: 6 }, /* @__PURE__ */ React.createElement(InfoCard, { title: "VM Properties" }, /* @__PURE__ */ React.createElement(
|
|
52
|
+
StructuredMetadataTable,
|
|
53
|
+
{
|
|
54
|
+
metadata: {
|
|
55
|
+
"Power State": value.properties.powerState,
|
|
56
|
+
Zone: value.properties.zone,
|
|
57
|
+
Environment: value.properties.environmentName,
|
|
58
|
+
"Host Type": value.properties.computeHostType,
|
|
59
|
+
"Memory (GB)": value.properties.memoryGB,
|
|
60
|
+
"CPU Count": value.properties.cpuCount,
|
|
61
|
+
"Total Memory (MB)": value.properties.totalMemoryMB,
|
|
62
|
+
"OS Type": value.properties.osType,
|
|
63
|
+
Region: value.properties.region,
|
|
64
|
+
"Host Name": value.properties.hostName,
|
|
65
|
+
"Data Center": value.properties.datacenter,
|
|
66
|
+
"Datastore": value.properties.datastoreName
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
))), /* @__PURE__ */ React.createElement(Grid, { item: true, xs: 12, md: 6 }, /* @__PURE__ */ React.createElement(InfoCard, { title: "Storage Configuration" }, /* @__PURE__ */ React.createElement(
|
|
70
|
+
StructuredMetadataTable,
|
|
71
|
+
{
|
|
72
|
+
metadata: {
|
|
73
|
+
"Primary Disk": {
|
|
74
|
+
Name: value.properties.storage?.disks[0]?.name || "N/A",
|
|
75
|
+
"Capacity (GB)": value.properties.storage?.disks[0]?.capacityGb || "N/A",
|
|
76
|
+
Type: value.properties.storage?.disks[0]?.type || "N/A",
|
|
77
|
+
"Provisioning": value.properties.storage?.disks[0]?.provisioningType || "N/A"
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
))), /* @__PURE__ */ React.createElement(Grid, { item: true, xs: 12, md: 6 }, /* @__PURE__ */ React.createElement(InfoCard, { title: "Network Configuration" }, /* @__PURE__ */ React.createElement(
|
|
82
|
+
StructuredMetadataTable,
|
|
83
|
+
{
|
|
84
|
+
metadata: {
|
|
85
|
+
"Primary Network": value.properties.networks?.[0] ? {
|
|
86
|
+
Name: value.properties.networks[0].name,
|
|
87
|
+
Address: value.properties.networks[0].address,
|
|
88
|
+
"MAC Address": value.properties.networks[0].mac_address,
|
|
89
|
+
Assignment: value.properties.networks[0].assignment,
|
|
90
|
+
"IPv6 Addresses": value.properties.networks[0].ipv6Addresses || []
|
|
91
|
+
} : "No network configuration available"
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
))), /* @__PURE__ */ React.createElement(Grid, { item: true, xs: 12, md: 6 }, /* @__PURE__ */ React.createElement(InfoCard, { title: "Expense Information" }, /* @__PURE__ */ React.createElement(
|
|
95
|
+
StructuredMetadataTable,
|
|
96
|
+
{
|
|
97
|
+
metadata: {
|
|
98
|
+
"Total Expense": `$${value.expense.totalExpense.toFixed(2)}`,
|
|
99
|
+
"Compute Expense": `$${value.expense.computeExpense.toFixed(2)}`,
|
|
100
|
+
"Storage Expense": `$${value.expense.storageExpense.toFixed(2)}`,
|
|
101
|
+
"Additional Expense": `$${value.expense.additionalExpense.toFixed(2)}`,
|
|
102
|
+
"Currency": value.expense.unit,
|
|
103
|
+
"Last Updated": new Date(value.expense.lastUpdatedTime).toLocaleString()
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
))));
|
|
107
|
+
};
|
|
108
|
+
|
|
109
|
+
export { VCFAutomationVSphereVMDetails };
|
|
110
|
+
//# sourceMappingURL=VCFAutomationVSphereVMDetails.esm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"VCFAutomationVSphereVMDetails.esm.js","sources":["../../src/components/VCFAutomationVSphereVMDetails.tsx"],"sourcesContent":["import React from 'react';\nimport { useEntity } from '@backstage/plugin-catalog-react';\nimport {\n InfoCard,\n Progress,\n ResponseErrorPanel,\n StructuredMetadataTable,\n} from '@backstage/core-components';\nimport { Grid } from '@material-ui/core';\nimport useAsync from 'react-use/lib/useAsync';\nimport { useApi } from '@backstage/core-plugin-api';\nimport { vcfAutomationApiRef } from '../api/VcfAutomationClient';\nimport { showDeploymentResourcesDataPermission } from '@terasky/backstage-plugin-vcf-automation-common';\nimport { usePermission } from '@backstage/plugin-permission-react';\n\nexport const VCFAutomationVSphereVMDetails = () => {\n const { entity } = useEntity();\n const vcfAutomationApi = useApi(vcfAutomationApiRef);\n const deploymentId = entity.spec?.system || '';\n const resourceId = entity.metadata.name;\n\n const { allowed } = usePermission({\n permission: showDeploymentResourcesDataPermission,\n });\n\n const { value, loading, error } = useAsync(async () => {\n if (!resourceId || !deploymentId || !allowed) return undefined;\n return await vcfAutomationApi.getVSphereVMDetails(deploymentId as string, resourceId);\n }, [resourceId, deploymentId, allowed]);\n\n if (error) {\n return <ResponseErrorPanel error={error} />;\n }\n\n if (loading) {\n return <Progress />;\n }\n\n if (!resourceId || !deploymentId) {\n return <InfoCard title=\"No resource ID found\">This entity is not associated with a VCF resource or deployment.</InfoCard>;\n }\n\n if (!allowed) {\n return <InfoCard title=\"Permission Denied\">You don't have permission to view resource details.</InfoCard>;\n }\n\n if (!value) {\n return <InfoCard title=\"No Data\">No resource details available.</InfoCard>;\n }\n\n return (\n <Grid container spacing={3}>\n <Grid item xs={12}>\n <InfoCard title=\"Resource Status\">\n <StructuredMetadataTable\n metadata={{\n Name: value.name,\n Type: value.type,\n State: value.state,\n 'Sync Status': value.syncStatus,\n 'Created At': new Date(value.createdAt).toLocaleString(),\n Origin: value.origin,\n 'Depends On': value.dependsOn,\n }}\n />\n </InfoCard>\n </Grid>\n\n <Grid item xs={12} md={6}>\n <InfoCard title=\"VM Properties\">\n <StructuredMetadataTable\n metadata={{\n 'Power State': value.properties.powerState,\n Zone: value.properties.zone,\n Environment: value.properties.environmentName,\n 'Host Type': value.properties.computeHostType,\n 'Memory (GB)': value.properties.memoryGB,\n 'CPU Count': value.properties.cpuCount,\n 'Total Memory (MB)': value.properties.totalMemoryMB,\n 'OS Type': value.properties.osType,\n Region: value.properties.region,\n 'Host Name': value.properties.hostName,\n 'Data Center': value.properties.datacenter,\n 'Datastore': value.properties.datastoreName,\n }}\n />\n </InfoCard>\n </Grid>\n\n <Grid item xs={12} md={6}>\n <InfoCard title=\"Storage Configuration\">\n <StructuredMetadataTable\n metadata={{\n 'Primary Disk': {\n Name: value.properties.storage?.disks[0]?.name || 'N/A',\n 'Capacity (GB)': value.properties.storage?.disks[0]?.capacityGb || 'N/A',\n Type: value.properties.storage?.disks[0]?.type || 'N/A',\n 'Provisioning': value.properties.storage?.disks[0]?.provisioningType || 'N/A',\n },\n }}\n />\n </InfoCard>\n </Grid>\n\n <Grid item xs={12} md={6}>\n <InfoCard title=\"Network Configuration\">\n <StructuredMetadataTable\n metadata={{\n 'Primary Network': value.properties.networks?.[0] ? {\n Name: value.properties.networks[0].name,\n Address: value.properties.networks[0].address,\n 'MAC Address': value.properties.networks[0].mac_address,\n Assignment: value.properties.networks[0].assignment,\n 'IPv6 Addresses': value.properties.networks[0].ipv6Addresses || [],\n } : 'No network configuration available',\n }}\n />\n </InfoCard>\n </Grid>\n\n <Grid item xs={12} md={6}>\n <InfoCard title=\"Expense Information\">\n <StructuredMetadataTable\n metadata={{\n 'Total Expense': `$${value.expense.totalExpense.toFixed(2)}`,\n 'Compute Expense': `$${value.expense.computeExpense.toFixed(2)}`,\n 'Storage Expense': `$${value.expense.storageExpense.toFixed(2)}`,\n 'Additional Expense': `$${value.expense.additionalExpense.toFixed(2)}`,\n 'Currency': value.expense.unit,\n 'Last Updated': new Date(value.expense.lastUpdatedTime).toLocaleString(),\n }}\n />\n </InfoCard>\n </Grid>\n </Grid>\n );\n}; "],"names":[],"mappings":";;;;;;;;;;AAeO,MAAM,gCAAgC,MAAM;AACjD,EAAM,MAAA,EAAE,MAAO,EAAA,GAAI,SAAU,EAAA;AAC7B,EAAM,MAAA,gBAAA,GAAmB,OAAO,mBAAmB,CAAA;AACnD,EAAM,MAAA,YAAA,GAAe,MAAO,CAAA,IAAA,EAAM,MAAU,IAAA,EAAA;AAC5C,EAAM,MAAA,UAAA,GAAa,OAAO,QAAS,CAAA,IAAA;AAEnC,EAAM,MAAA,EAAE,OAAQ,EAAA,GAAI,aAAc,CAAA;AAAA,IAChC,UAAY,EAAA;AAAA,GACb,CAAA;AAED,EAAA,MAAM,EAAE,KAAO,EAAA,OAAA,EAAS,KAAM,EAAA,GAAI,SAAS,YAAY;AACrD,IAAA,IAAI,CAAC,UAAc,IAAA,CAAC,YAAgB,IAAA,CAAC,SAAgB,OAAA,KAAA,CAAA;AACrD,IAAA,OAAO,MAAM,gBAAA,CAAiB,mBAAoB,CAAA,YAAA,EAAwB,UAAU,CAAA;AAAA,GACnF,EAAA,CAAC,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;AAAA,GAEJ,CACF,CAEA,kBAAA,KAAA,CAAA,aAAA,CAAC,QAAK,IAAI,EAAA,IAAA,EAAC,EAAI,EAAA,EAAA,EAAI,EAAI,EAAA,CAAA,EAAA,kBACpB,KAAA,CAAA,aAAA,CAAA,QAAA,EAAA,EAAS,OAAM,qBACd,EAAA,kBAAA,KAAA,CAAA,aAAA;AAAA,IAAC,uBAAA;AAAA,IAAA;AAAA,MACC,QAAU,EAAA;AAAA,QACR,iBAAiB,CAAI,CAAA,EAAA,KAAA,CAAM,QAAQ,YAAa,CAAA,OAAA,CAAQ,CAAC,CAAC,CAAA,CAAA;AAAA,QAC1D,mBAAmB,CAAI,CAAA,EAAA,KAAA,CAAM,QAAQ,cAAe,CAAA,OAAA,CAAQ,CAAC,CAAC,CAAA,CAAA;AAAA,QAC9D,mBAAmB,CAAI,CAAA,EAAA,KAAA,CAAM,QAAQ,cAAe,CAAA,OAAA,CAAQ,CAAC,CAAC,CAAA,CAAA;AAAA,QAC9D,sBAAsB,CAAI,CAAA,EAAA,KAAA,CAAM,QAAQ,iBAAkB,CAAA,OAAA,CAAQ,CAAC,CAAC,CAAA,CAAA;AAAA,QACpE,UAAA,EAAY,MAAM,OAAQ,CAAA,IAAA;AAAA,QAC1B,gBAAgB,IAAI,IAAA,CAAK,MAAM,OAAQ,CAAA,eAAe,EAAE,cAAe;AAAA;AACzE;AAAA,GAEJ,CACF,CACF,CAAA;AAEJ;;;;"}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { useEntity } from '@backstage/plugin-catalog-react';
|
|
3
|
+
import { useApi } from '@backstage/core-plugin-api';
|
|
4
|
+
import { vcfAutomationApiRef } from '../api/VcfAutomationClient.esm.js';
|
|
5
|
+
import { InfoCard, Progress, ResponseErrorPanel, StatusPending, StatusError, StatusOK } from '@backstage/core-components';
|
|
6
|
+
import { makeStyles, Typography, Grid } from '@material-ui/core';
|
|
7
|
+
import useAsync from 'react-use/lib/useAsync';
|
|
8
|
+
import { usePermission } from '@backstage/plugin-permission-react';
|
|
9
|
+
import { showDeploymentResourcesDataPermission } from '@terasky/backstage-plugin-vcf-automation-common';
|
|
10
|
+
|
|
11
|
+
const useStyles = makeStyles((theme) => ({
|
|
12
|
+
statusText: {
|
|
13
|
+
fontWeight: "bold",
|
|
14
|
+
"&.success": {
|
|
15
|
+
color: theme.palette.success.main
|
|
16
|
+
},
|
|
17
|
+
"&.error": {
|
|
18
|
+
color: theme.palette.error.main
|
|
19
|
+
},
|
|
20
|
+
"&.pending": {
|
|
21
|
+
color: theme.palette.warning.main
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
}));
|
|
25
|
+
const VCFAutomationVSphereVMOverview = () => {
|
|
26
|
+
const { entity } = useEntity();
|
|
27
|
+
const api = useApi(vcfAutomationApiRef);
|
|
28
|
+
const classes = useStyles();
|
|
29
|
+
const deploymentId = entity.spec?.system || "";
|
|
30
|
+
const resourceId = entity.metadata.name;
|
|
31
|
+
const { allowed: hasViewPermission, loading: permissionLoading } = usePermission({
|
|
32
|
+
permission: showDeploymentResourcesDataPermission
|
|
33
|
+
});
|
|
34
|
+
const { value: resource, loading, error } = useAsync(async () => {
|
|
35
|
+
if (!resourceId || !deploymentId || !hasViewPermission) return void 0;
|
|
36
|
+
return await api.getVSphereVMDetails(deploymentId, resourceId);
|
|
37
|
+
}, [resourceId, deploymentId, hasViewPermission]);
|
|
38
|
+
if (!resourceId || !deploymentId) {
|
|
39
|
+
return /* @__PURE__ */ React.createElement(InfoCard, { title: "VCF Automation Resource" }, /* @__PURE__ */ React.createElement(Typography, null, "No resource ID or deployment ID found for this entity."));
|
|
40
|
+
}
|
|
41
|
+
if (loading || permissionLoading) {
|
|
42
|
+
return /* @__PURE__ */ React.createElement(InfoCard, { title: "VCF Automation Resource" }, /* @__PURE__ */ React.createElement(Progress, null));
|
|
43
|
+
}
|
|
44
|
+
if (!hasViewPermission) {
|
|
45
|
+
return /* @__PURE__ */ React.createElement(InfoCard, { title: "VCF Automation Resource" }, /* @__PURE__ */ React.createElement(Typography, null, "You don't have permission to view resource details."));
|
|
46
|
+
}
|
|
47
|
+
if (error) {
|
|
48
|
+
return /* @__PURE__ */ React.createElement(ResponseErrorPanel, { error });
|
|
49
|
+
}
|
|
50
|
+
if (!resource) {
|
|
51
|
+
return /* @__PURE__ */ React.createElement(InfoCard, { title: "VCF Automation Resource" }, /* @__PURE__ */ React.createElement(Typography, null, "No resource details available."));
|
|
52
|
+
}
|
|
53
|
+
const getStatusComponent = (state) => {
|
|
54
|
+
switch (state.toUpperCase()) {
|
|
55
|
+
case "SUCCESS":
|
|
56
|
+
case "OK":
|
|
57
|
+
return /* @__PURE__ */ React.createElement(StatusOK, null);
|
|
58
|
+
case "ERROR":
|
|
59
|
+
case "FAILED":
|
|
60
|
+
return /* @__PURE__ */ React.createElement(StatusError, null);
|
|
61
|
+
default:
|
|
62
|
+
return /* @__PURE__ */ React.createElement(StatusPending, null);
|
|
63
|
+
}
|
|
64
|
+
};
|
|
65
|
+
return /* @__PURE__ */ React.createElement(InfoCard, { title: "VCF Automation Resource" }, /* @__PURE__ */ React.createElement(Grid, { container: true, spacing: 2 }, /* @__PURE__ */ React.createElement(Grid, { item: true, xs: 6 }, /* @__PURE__ */ React.createElement(Typography, { variant: "subtitle2" }, "Name"), /* @__PURE__ */ React.createElement(Typography, null, resource.name)), /* @__PURE__ */ React.createElement(Grid, { item: true, xs: 6 }, /* @__PURE__ */ React.createElement(Typography, { variant: "subtitle2" }, "Type"), /* @__PURE__ */ React.createElement(Typography, null, resource.type)), /* @__PURE__ */ React.createElement(Grid, { item: true, xs: 6 }, /* @__PURE__ */ React.createElement(Typography, { variant: "subtitle2" }, "State"), /* @__PURE__ */ React.createElement(Grid, { container: true, spacing: 1, alignItems: "center" }, getStatusComponent(resource.state), /* @__PURE__ */ React.createElement(Typography, { className: `${classes.statusText} ${resource.state.toLowerCase()}` }, resource.state))), /* @__PURE__ */ React.createElement(Grid, { item: true, xs: 6 }, /* @__PURE__ */ React.createElement(Typography, { variant: "subtitle2" }, "Sync Status"), /* @__PURE__ */ React.createElement(Grid, { container: true, spacing: 1, alignItems: "center" }, getStatusComponent(resource.syncStatus), /* @__PURE__ */ React.createElement(Typography, { className: `${classes.statusText} ${resource.syncStatus.toLowerCase()}` }, resource.syncStatus))), /* @__PURE__ */ React.createElement(Grid, { item: true, xs: 6 }, /* @__PURE__ */ React.createElement(Typography, { variant: "subtitle2" }, "Created At"), /* @__PURE__ */ React.createElement(Typography, null, new Date(resource.createdAt).toLocaleString())), /* @__PURE__ */ React.createElement(Grid, { item: true, xs: 6 }, /* @__PURE__ */ React.createElement(Typography, { variant: "subtitle2" }, "Region"), /* @__PURE__ */ React.createElement(Typography, null, resource.properties?.region || "N/A")), /* @__PURE__ */ React.createElement(Grid, { item: true, xs: 12 }, /* @__PURE__ */ React.createElement(Typography, { variant: "subtitle2" }, "Resource Metrics"), /* @__PURE__ */ React.createElement(Typography, null, `CPU: ${resource.properties?.cpuCount || "N/A"} cores, `, `Memory: ${resource.properties?.memoryGB || "N/A"} GB, `, `Storage: ${resource.properties?.storage?.disks?.[0]?.capacityGb || "N/A"} GB`)), /* @__PURE__ */ React.createElement(Grid, { item: true, xs: 12 }, /* @__PURE__ */ React.createElement(Typography, { variant: "subtitle2" }, "Expense Information"), /* @__PURE__ */ React.createElement(Typography, null, `Total: $${resource.expense?.totalExpense?.toFixed(2) || "N/A"}, `, `Compute: $${resource.expense?.computeExpense?.toFixed(2) || "N/A"}, `, `Storage: $${resource.expense?.storageExpense?.toFixed(2) || "N/A"}`))));
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
export { VCFAutomationVSphereVMOverview };
|
|
69
|
+
//# sourceMappingURL=VCFAutomationVSphereVMOverview.esm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"VCFAutomationVSphereVMOverview.esm.js","sources":["../../src/components/VCFAutomationVSphereVMOverview.tsx"],"sourcesContent":["import React from 'react';\nimport { useEntity } from '@backstage/plugin-catalog-react';\nimport { useApi } from '@backstage/core-plugin-api';\nimport { vcfAutomationApiRef } from '../api/VcfAutomationClient';\nimport {\n InfoCard,\n Progress,\n ResponseErrorPanel,\n StatusOK,\n StatusError,\n StatusPending,\n} from '@backstage/core-components';\nimport { Grid, Typography, makeStyles } from '@material-ui/core';\nimport useAsync from 'react-use/lib/useAsync';\nimport { usePermission } from '@backstage/plugin-permission-react';\nimport { showDeploymentResourcesDataPermission } from '@terasky/backstage-plugin-vcf-automation-common';\n\nconst useStyles = makeStyles(theme => ({\n statusText: {\n fontWeight: 'bold',\n '&.success': {\n color: theme.palette.success.main,\n },\n '&.error': {\n color: theme.palette.error.main,\n },\n '&.pending': {\n color: theme.palette.warning.main,\n },\n },\n}));\n\nexport const VCFAutomationVSphereVMOverview = () => {\n const { entity } = useEntity();\n const api = useApi(vcfAutomationApiRef);\n const classes = useStyles();\n const deploymentId = entity.spec?.system || '';\n const resourceId = entity.metadata.name;\n\n const { allowed: hasViewPermission, loading: permissionLoading } = usePermission({\n permission: showDeploymentResourcesDataPermission,\n });\n\n const { value: resource, loading, error } = useAsync(async () => {\n if (!resourceId || !deploymentId || !hasViewPermission) return undefined;\n return await api.getVSphereVMDetails(deploymentId as string, resourceId);\n }, [resourceId, deploymentId, hasViewPermission]);\n\n if (!resourceId || !deploymentId) {\n return (\n <InfoCard title=\"VCF Automation Resource\">\n <Typography>No resource ID or deployment ID found for this entity.</Typography>\n </InfoCard>\n );\n }\n\n if (loading || permissionLoading) {\n return (\n <InfoCard title=\"VCF Automation Resource\">\n <Progress />\n </InfoCard>\n );\n }\n\n if (!hasViewPermission) {\n return (\n <InfoCard title=\"VCF Automation Resource\">\n <Typography>You don't have permission to view resource details.</Typography>\n </InfoCard>\n );\n }\n\n if (error) {\n return <ResponseErrorPanel error={error} />;\n }\n\n if (!resource) {\n return (\n <InfoCard title=\"VCF Automation Resource\">\n <Typography>No resource details available.</Typography>\n </InfoCard>\n );\n }\n\n const getStatusComponent = (state: string) => {\n switch (state.toUpperCase()) {\n case 'SUCCESS':\n case 'OK':\n return <StatusOK />;\n case 'ERROR':\n case 'FAILED':\n return <StatusError />;\n default:\n return <StatusPending />;\n }\n };\n\n return (\n <InfoCard title=\"VCF Automation Resource\">\n <Grid container spacing={2}>\n <Grid item xs={6}>\n <Typography variant=\"subtitle2\">Name</Typography>\n <Typography>{resource.name}</Typography>\n </Grid>\n <Grid item xs={6}>\n <Typography variant=\"subtitle2\">Type</Typography>\n <Typography>{resource.type}</Typography>\n </Grid>\n <Grid item xs={6}>\n <Typography variant=\"subtitle2\">State</Typography>\n <Grid container spacing={1} alignItems=\"center\">\n {getStatusComponent(resource.state)}\n <Typography className={`${classes.statusText} ${resource.state.toLowerCase()}`}>\n {resource.state}\n </Typography>\n </Grid>\n </Grid>\n <Grid item xs={6}>\n <Typography variant=\"subtitle2\">Sync Status</Typography>\n <Grid container spacing={1} alignItems=\"center\">\n {getStatusComponent(resource.syncStatus)}\n <Typography className={`${classes.statusText} ${resource.syncStatus.toLowerCase()}`}>\n {resource.syncStatus}\n </Typography>\n </Grid>\n </Grid>\n <Grid item xs={6}>\n <Typography variant=\"subtitle2\">Created At</Typography>\n <Typography>{new Date(resource.createdAt).toLocaleString()}</Typography>\n </Grid>\n <Grid item xs={6}>\n <Typography variant=\"subtitle2\">Region</Typography>\n <Typography>{resource.properties?.region || 'N/A'}</Typography>\n </Grid>\n <Grid item xs={12}>\n <Typography variant=\"subtitle2\">Resource Metrics</Typography>\n <Typography>\n {`CPU: ${resource.properties?.cpuCount || 'N/A'} cores, `}\n {`Memory: ${resource.properties?.memoryGB || 'N/A'} GB, `}\n {`Storage: ${resource.properties?.storage?.disks?.[0]?.capacityGb || 'N/A'} GB`}\n </Typography>\n </Grid>\n <Grid item xs={12}>\n <Typography variant=\"subtitle2\">Expense Information</Typography>\n <Typography>\n {`Total: $${resource.expense?.totalExpense?.toFixed(2) || 'N/A'}, `}\n {`Compute: $${resource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
|
|
|
328
328
|
|
|
329
329
|
declare const rootRouteRef: _backstage_core_plugin_api.RouteRef<undefined>;
|
|
330
330
|
|
|
331
|
-
export { VCFAutomationDeploymentDetails, VCFAutomationDeploymentOverview, VCFAutomationGenericResourceDetails, VCFAutomationGenericResourceOverview, VCFAutomationProjectDetails, VCFAutomationProjectOverview, VCFAutomationVSphereVMDetails, VCFAutomationVSphereVMOverview, VcfAutomationApi, VcfAutomationClient, VcfDeploymentEvent$1 as VcfDeploymentEvent, VcfDeploymentHistory, VcfPageResponse, VcfPageable, VcfProject$1 as VcfProject, VcfProjectZone, VcfResource, VcfResourceDisk, VcfResourceExpense, VcfResourceNetwork, rootRouteRef, vcfAutomationApiRef, vcfAutomationPlugin };
|
|
331
|
+
export { VCFAutomationDeploymentDetails, VCFAutomationDeploymentOverview, VCFAutomationGenericResourceDetails, VCFAutomationGenericResourceOverview, VCFAutomationProjectDetails, VCFAutomationProjectOverview, VCFAutomationVSphereVMDetails, VCFAutomationVSphereVMOverview, type VcfAutomationApi, VcfAutomationClient, type VcfDeploymentEvent$1 as VcfDeploymentEvent, type VcfDeploymentHistory, type VcfPageResponse, type VcfPageable, type VcfProject$1 as VcfProject, type VcfProjectZone, type VcfResource, type VcfResourceDisk, type VcfResourceExpense, type VcfResourceNetwork, rootRouteRef, vcfAutomationApiRef, vcfAutomationPlugin };
|