mirror of https://github.com/portainer/portainer
parent
e1951baac0
commit
53679f9381
|
@ -352,7 +352,7 @@
|
|||
<!-- #region CONFIGMAPS -->
|
||||
<div class="form-group">
|
||||
<div class="col-sm-12 vertical-center">
|
||||
<label class="control-label !pt-0 text-left">ConfigMap</label>
|
||||
<label class="control-label !pt-0 text-left">ConfigMaps</label>
|
||||
</div>
|
||||
<div class="col-sm-12 small text-muted vertical-center" style="margin-top: 15px" ng-if="ctrl.formValues.ConfigMaps.length">
|
||||
<pr-icon icon="'info'" mode="'primary'"></pr-icon>
|
||||
|
@ -503,7 +503,7 @@
|
|||
<!-- #region SECRETS -->
|
||||
<div class="form-group">
|
||||
<div class="col-sm-12 vertical-center pt-2.5">
|
||||
<label class="control-label !pt-0 text-left">Secret</label>
|
||||
<label class="control-label !pt-0 text-left">Secrets</label>
|
||||
</div>
|
||||
<div class="col-sm-12 small text-muted vertical-center" style="margin-top: 15px" ng-if="ctrl.formValues.Secrets.length">
|
||||
<pr-icon icon="'info'" mode="'primary'"></pr-icon>
|
||||
|
|
|
@ -117,8 +117,8 @@ export function createMockEnvironment(): Environment {
|
|||
StartTime: '',
|
||||
},
|
||||
StatusMessage: {
|
||||
Detail: '',
|
||||
Summary: '',
|
||||
detail: '',
|
||||
summary: '',
|
||||
},
|
||||
};
|
||||
}
|
||||
|
|
|
@ -20,12 +20,12 @@ export function ApplicationEnvVarsTable({ namespace, app }: Props) {
|
|||
<>
|
||||
<div className="text-muted mb-4 mt-6 flex items-center">
|
||||
<Icon icon={File} className="!mr-2" />
|
||||
Configuration
|
||||
Environment variables, ConfigMaps or Secrets
|
||||
</div>
|
||||
{appEnvVars.length === 0 && (
|
||||
<TextTip color="blue">
|
||||
This application is not using any environment variable or
|
||||
configuration.
|
||||
This application is not using any environment variable, ConfigMap or
|
||||
Secret.
|
||||
</TextTip>
|
||||
)}
|
||||
{appEnvVars.length > 0 && (
|
||||
|
|
|
@ -133,7 +133,11 @@ export function CreateIngressView() {
|
|||
...group,
|
||||
options: [
|
||||
...group.options,
|
||||
{ label: service.Name, value: service.Name },
|
||||
{
|
||||
label: service.Name,
|
||||
selectedLabel: `${service.Name} (${service.Type})`,
|
||||
value: service.Name,
|
||||
},
|
||||
],
|
||||
};
|
||||
}
|
||||
|
@ -540,14 +544,14 @@ export function CreateIngressView() {
|
|||
return (
|
||||
<>
|
||||
<PageHeader
|
||||
title={isEdit ? 'Edit ingress' : 'Add ingress'}
|
||||
title={isEdit ? 'Edit ingress' : 'Create ingress'}
|
||||
breadcrumbs={[
|
||||
{
|
||||
link: 'kubernetes.ingresses',
|
||||
label: 'Ingresses',
|
||||
},
|
||||
{
|
||||
label: isEdit ? 'Edit ingress' : 'Add ingress',
|
||||
label: isEdit ? 'Edit ingress' : 'Create ingress',
|
||||
},
|
||||
]}
|
||||
/>
|
||||
|
|
|
@ -489,7 +489,10 @@ export function IngressForm({
|
|||
path.ServiceName
|
||||
? {
|
||||
value: path.ServiceName,
|
||||
label: path.ServiceName,
|
||||
label: getServiceLabel(
|
||||
serviceOptions,
|
||||
path.ServiceName
|
||||
),
|
||||
}
|
||||
: null
|
||||
}
|
||||
|
@ -728,3 +731,9 @@ export function IngressForm({
|
|||
</Widget>
|
||||
);
|
||||
}
|
||||
|
||||
function getServiceLabel(options: GroupedServiceOptions, value: string) {
|
||||
const allOptions = options.flatMap((group) => group.options);
|
||||
const option = allOptions.find((o) => o.value === value);
|
||||
return option?.selectedLabel || '';
|
||||
}
|
||||
|
|
|
@ -32,7 +32,11 @@ export interface ServicePorts {
|
|||
[serviceName: string]: Option<string>[];
|
||||
}
|
||||
|
||||
interface ServiceOption extends Option<string> {
|
||||
selectedLabel: string;
|
||||
}
|
||||
|
||||
export type GroupedServiceOptions = {
|
||||
label: string;
|
||||
options: Option<string>[];
|
||||
options: ServiceOption[];
|
||||
}[];
|
||||
|
|
|
@ -30,6 +30,7 @@ export function confirmUpdateNamespace(
|
|||
a service interruption for these applications.
|
||||
</p>
|
||||
)}
|
||||
<p>Are you sure you want to continue?</p>
|
||||
</>
|
||||
);
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { CellContext } from '@tanstack/react-table';
|
||||
import { AlertCircle, HelpCircle, Settings } from 'lucide-react';
|
||||
import { AlertCircle, HelpCircle, Loader2 } from 'lucide-react';
|
||||
|
||||
import {
|
||||
EnvironmentStatus,
|
||||
|
@ -10,6 +10,8 @@ import { notifySuccess } from '@/portainer/services/notifications';
|
|||
|
||||
import { TooltipWithChildren } from '@@/Tip/TooltipWithChildren';
|
||||
import { Button } from '@@/buttons';
|
||||
import { Icon } from '@@/Icon';
|
||||
import { Tooltip } from '@@/Tip/Tooltip';
|
||||
|
||||
import { EnvironmentListItem } from '../types';
|
||||
import { useUpdateEnvironmentMutation } from '../../queries/useUpdateEnvironmentMutation';
|
||||
|
@ -33,17 +35,17 @@ function Cell({
|
|||
return (
|
||||
<>
|
||||
{environment.URL}
|
||||
{environment.StatusMessage?.Summary &&
|
||||
environment.StatusMessage?.Detail && (
|
||||
{environment.StatusMessage?.summary &&
|
||||
environment.StatusMessage?.detail && (
|
||||
<div className="ml-2 inline-block">
|
||||
<span className="text-danger vertical-center inline-flex">
|
||||
<AlertCircle className="lucide" aria-hidden="true" />
|
||||
<span>{environment.StatusMessage.Summary}</span>
|
||||
<span>{environment.StatusMessage.summary}</span>
|
||||
</span>
|
||||
<TooltipWithChildren
|
||||
message={
|
||||
<div>
|
||||
{environment.StatusMessage.Detail}
|
||||
{environment.StatusMessage.detail}
|
||||
{environment.URL && (
|
||||
<div className="mt-2 text-right">
|
||||
<Button
|
||||
|
@ -71,27 +73,19 @@ function Cell({
|
|||
);
|
||||
}
|
||||
|
||||
if (environment.Type === 4) {
|
||||
if (environment.Type === EnvironmentType.EdgeAgentOnDocker) {
|
||||
return <>-</>;
|
||||
}
|
||||
|
||||
if (environment.Status === 3) {
|
||||
const status = (
|
||||
<span className="vertical-center inline-flex text-base">
|
||||
<Settings className="lucide animate-spin-slow" />
|
||||
{environment.StatusMessage?.Summary}
|
||||
</span>
|
||||
);
|
||||
if (!environment.StatusMessage?.Detail) {
|
||||
return status;
|
||||
}
|
||||
if (environment.Status === EnvironmentStatus.Provisioning) {
|
||||
return (
|
||||
<TooltipWithChildren
|
||||
message={environment.StatusMessage?.Detail}
|
||||
position="bottom"
|
||||
>
|
||||
{status}
|
||||
</TooltipWithChildren>
|
||||
<div className="inline-flex items-center text-base">
|
||||
<Icon icon={Loader2} className="!mr-1 animate-spin-slow" />
|
||||
{environment.StatusMessage?.summary}
|
||||
{environment.StatusMessage?.detail && (
|
||||
<Tooltip message={environment.StatusMessage?.detail} />
|
||||
)}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
@ -133,8 +133,8 @@ interface EndpointChangeWindow {
|
|||
EndTime: string;
|
||||
}
|
||||
export interface EnvironmentStatusMessage {
|
||||
Summary: string;
|
||||
Detail: string;
|
||||
summary: string;
|
||||
detail: string;
|
||||
}
|
||||
|
||||
export type Environment = {
|
||||
|
|
Loading…
Reference in New Issue