Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions applicationFE/src/api/softwareCatalog.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,13 @@ export const objectStorageSmokeCheck = (params: {
return request.post(`/applications/k8s/object-storage/smoke-check`, params)
}

export const getK8sStorageClasses = (params: {
namespace: string,
clusterName: string
}) => {
return request.get(`/applications/k8s/storage-classes?namespace=${params.namespace}&clusterName=${params.clusterName}`)
}

export const vmSpecCheck = (params: {
namespace: string,
mciName: string,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
const STATUS_LABELS: Record<string, string> = {
PREPARING_RUNTIME: 'Preparing Runtime',
PREPARING_RUNTIME: 'Initializing',
PREPARING_METRICS_SERVER: 'Initializing',
PREPARING_INGRESS_NGINX: 'Initializing',
DEPLOYING: 'Deploying',
INSTALL: 'Deployment Submitted',
INSTALL: 'Installing',
IN_PROGRESS: 'In Progress',
PENDING: 'Pending',
START: 'Starting',
STARTING: 'Starting',
RESTART: 'Restarting',
RESTARTING: 'Restarting',
RUN: 'Running',
RUNNING: 'Running',
SUCCESS: 'Running',
Expand All @@ -15,16 +20,42 @@ const STATUS_LABELS: Record<string, string> = {
UNINSTALLED: 'Uninstalled',
NOT_FOUND: 'Not Found',
UNKNOWN: 'Unknown',
IMAGE_PULL_ERROR: 'Image Pull Error',
FAILED: 'Failed',
ERROR: 'Error'
}

const PROGRESS_STATUSES = new Set(['PREPARING_RUNTIME', 'DEPLOYING', 'IN_PROGRESS', 'INSTALL', 'RESTART'])
const PROGRESS_STATUSES = new Set([
'PREPARING_RUNTIME',
'PREPARING_METRICS_SERVER',
'PREPARING_INGRESS_NGINX',
'DEPLOYING',
'IN_PROGRESS',
'INSTALL',
'START',
'STARTING',
'RESTART',
'RESTARTING'
])
const SUCCESS_STATUSES = new Set(['RUN', 'RUNNING', 'SUCCESS', 'COMPLETED'])
const WARNING_STATUSES = new Set(['NOT_FOUND', 'PENDING', 'UNKNOWN'])
const TERMINAL_STATUSES = new Set(['STOP', 'STOPPED', 'UNINSTALL', 'UNINSTALLED'])
const DANGER_STATUSES = new Set(['FAILED', 'ERROR'])
const ACTION_DISABLED_STATUSES = new Set(['PREPARING_RUNTIME', 'DEPLOYING', 'IN_PROGRESS', 'UNINSTALL', 'UNINSTALLED'])
const DANGER_STATUSES = new Set(['FAILED', 'ERROR', 'IMAGE_PULL_ERROR'])
const ACTION_DISABLED_STATUSES = new Set([
'PREPARING_RUNTIME',
'PREPARING_METRICS_SERVER',
'PREPARING_INGRESS_NGINX',
'DEPLOYING',
'IN_PROGRESS',
'INSTALL',
'START',
'STARTING',
'RESTART',
'RESTARTING',
'UNINSTALL',
'UNINSTALLED',
'FAILED'
])

const normalizeStatus = (status: string | null | undefined) => String(status || '').trim().toUpperCase()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -398,6 +398,7 @@
<tr>
<th>Resource Type</th>
<th>HPA</th>
<th>Rebalancing</th>
<th>Min Replicas</th>
<th>Max Replicas</th>
<th>CPU Threshold</th>
Expand All @@ -412,6 +413,11 @@
{{ applicationDetail.hpaEnabled ? 'Enabled' : 'Disabled' }}
</span>
</td>
<td>
<span :class="applicationDetail.workloadRebalancingEnabled ? 'text-success' : 'text-muted'">
{{ applicationDetail.workloadRebalancingEnabled ? 'Enabled' : 'Disabled' }}
</span>
</td>
<td>{{ applicationDetail.minReplicas || 'N/A' }}</td>
<td>{{ applicationDetail.maxReplicas || 'N/A' }}</td>
<td>{{ applicationDetail.cpuThreshold ? `${applicationDetail.cpuThreshold}%` : 'N/A' }}</td>
Expand Down
Loading
Loading