Skip to content
Open
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
9 changes: 6 additions & 3 deletions locales/en/plugin__gitops-plugin.json
Original file line number Diff line number Diff line change
Expand Up @@ -101,10 +101,14 @@
"App Project": "AppProject",
"Argo CD project that this ApplicationSet belongs to.": "Argo CD project that this ApplicationSet belongs to.",
"Git repository URL where the ApplicationSet configuration is stored.": "Git repository URL where the ApplicationSet configuration is stored.",
"Progressive Sync Step {{x}}": "Progressive Sync Step {{x}}",
"Applications": "Applications",
"Show all match expressions": "Show all match expressions",
"Edit ApplicationSet": "Edit ApplicationSet",
"Delete ApplicationSet": "Delete ApplicationSet",
"View Graph": "View Graph",
"Match Expressions": "Match Expressions",
"Name must be unique within a namespace.": "Name must be unique within a namespace.",
"AppSet ownerReference Tree View": "AppSet ownerReference Tree View",
"Progressive Sync Flow View": "Progressive Sync Flow View",
"Expand or collapse all progressive sync step groups": "Expand or collapse all progressive sync step groups",
Expand Down Expand Up @@ -257,6 +261,8 @@
"Created At": "Created At",
"No pods": "No pods",
"There are no pods associated with the rollout.": "There are no pods associated with the rollout.",
"Close": "Close",
"{{x}} failed with an error.": "{{x}} failed with an error.",
"Edit Pod": "Edit Pod",
"Edit Rollout": "Edit Rollout",
"Promote": "Promote",
Expand All @@ -271,9 +277,7 @@
"ready": "ready",
"0 Pods": "0 Pods",
"Scaling down in:": "Scaling down in:",
"{{x}} failed with an error.": "{{x}} failed with an error.",
"Rollout Revisions": "Rollout Revisions",
"Close": "Close",
"Stable": "Stable",
"Active": "Active",
"Preview": "Preview",
Expand Down Expand Up @@ -331,7 +335,6 @@
"ApplicationSets": "ApplicationSets",
"Create ApplicationSet": "Create ApplicationSet",
"No labels": "No labels",
"Name must be unique within a namespace.": "Name must be unique within a namespace.",
"Namespace defines the space within which each name must be unique.": "Namespace defines the space within which each name must be unique.",
"Map of string keys and values that can be used to organize and categorize (scope and select) objects.": "Map of string keys and values that can be used to organize and categorize (scope and select) objects.",
"Edit": "Edit",
Expand Down
9 changes: 6 additions & 3 deletions locales/ja/plugin__gitops-plugin.json
Original file line number Diff line number Diff line change
Expand Up @@ -101,10 +101,14 @@
"App Project": "AppProject",
"Argo CD project that this ApplicationSet belongs to.": "Argo CD project that this ApplicationSet belongs to.",
"Git repository URL where the ApplicationSet configuration is stored.": "Git repository URL where the ApplicationSet configuration is stored.",
"Progressive Sync Step {{x}}": "Progressive Sync Step {{x}}",
"Applications": "Applications",
"Show all match expressions": "Show all match expressions",
"Edit ApplicationSet": "Edit ApplicationSet",
"Delete ApplicationSet": "Delete ApplicationSet",
"View Graph": "View Graph",
"Match Expressions": "Match Expressions",
"Name must be unique within a namespace.": "Name must be unique within a namespace.",
"AppSet ownerReference Tree View": "AppSet ownerReference Tree View",
"Progressive Sync Flow View": "Progressive Sync Flow View",
"Expand or collapse all progressive sync step groups": "Expand or collapse all progressive sync step groups",
Expand Down Expand Up @@ -257,6 +261,8 @@
"Created At": "Created At",
"No pods": "No pods",
"There are no pods associated with the rollout.": "There are no pods associated with the rollout.",
"Close": "Close",
"{{x}} failed with an error.": "{{x}} failed with an error.",
"Edit Pod": "Edit Pod",
"Edit Rollout": "Edit Rollout",
"Promote": "Promote",
Expand All @@ -271,9 +277,7 @@
"ready": "ready",
"0 Pods": "0 Pods",
"Scaling down in:": "Scaling down in:",
"{{x}} failed with an error.": "{{x}} failed with an error.",
"Rollout Revisions": "Rollout Revisions",
"Close": "Close",
"Stable": "Stable",
"Active": "Active",
"Preview": "Preview",
Expand Down Expand Up @@ -331,7 +335,6 @@
"ApplicationSets": "ApplicationSets",
"Create ApplicationSet": "Create ApplicationSet",
"No labels": "No labels",
"Name must be unique within a namespace.": "Name must be unique within a namespace.",
"Namespace defines the space within which each name must be unique.": "Namespace defines the space within which each name must be unique.",
"Map of string keys and values that can be used to organize and categorize (scope and select) objects.": "Map of string keys and values that can be used to organize and categorize (scope and select) objects.",
"Edit": "Edit",
Expand Down
9 changes: 6 additions & 3 deletions locales/ko/plugin__gitops-plugin.json
Original file line number Diff line number Diff line change
Expand Up @@ -101,10 +101,14 @@
"App Project": "App Project",
"Argo CD project that this ApplicationSet belongs to.": "Argo CD project that this ApplicationSet belongs to.",
"Git repository URL where the ApplicationSet configuration is stored.": "Git repository URL where the ApplicationSet configuration is stored.",
"Progressive Sync Step {{x}}": "Progressive Sync Step {{x}}",
"Applications": "Applications",
"Show all match expressions": "Show all match expressions",
"Edit ApplicationSet": "Edit ApplicationSet",
"Delete ApplicationSet": "Delete ApplicationSet",
"View Graph": "View Graph",
"Match Expressions": "Match Expressions",
"Name must be unique within a namespace.": "Name must be unique within a namespace.",
"AppSet ownerReference Tree View": "AppSet ownerReference Tree View",
"Progressive Sync Flow View": "Progressive Sync Flow View",
"Expand or collapse all progressive sync step groups": "Expand or collapse all progressive sync step groups",
Expand Down Expand Up @@ -257,6 +261,8 @@
"Created At": "Created At",
"No pods": "No pods",
"There are no pods associated with the rollout.": "There are no pods associated with the rollout.",
"Close": "Close",
"{{x}} failed with an error.": "{{x}} failed with an error.",
"Edit Pod": "Edit Pod",
"Edit Rollout": "Edit Rollout",
"Promote": "Promote",
Expand All @@ -271,9 +277,7 @@
"ready": "ready",
"0 Pods": "0 Pods",
"Scaling down in:": "Scaling down in:",
"{{x}} failed with an error.": "{{x}} failed with an error.",
"Rollout Revisions": "Rollout Revisions",
"Close": "Close",
"Stable": "Stable",
"Active": "Active",
"Preview": "Preview",
Expand Down Expand Up @@ -331,7 +335,6 @@
"ApplicationSets": "ApplicationSets",
"Create ApplicationSet": "Create ApplicationSet",
"No labels": "No labels",
"Name must be unique within a namespace.": "Name must be unique within a namespace.",
"Namespace defines the space within which each name must be unique.": "Namespace defines the space within which each name must be unique.",
"Map of string keys and values that can be used to organize and categorize (scope and select) objects.": "Map of string keys and values that can be used to organize and categorize (scope and select) objects.",
"Edit": "Edit",
Expand Down
9 changes: 6 additions & 3 deletions locales/zh/plugin__gitops-plugin.json
Original file line number Diff line number Diff line change
Expand Up @@ -101,10 +101,14 @@
"App Project": "App Project",
"Argo CD project that this ApplicationSet belongs to.": "Argo CD project that this ApplicationSet belongs to.",
"Git repository URL where the ApplicationSet configuration is stored.": "Git repository URL where the ApplicationSet configuration is stored.",
"Progressive Sync Step {{x}}": "Progressive Sync Step {{x}}",
"Applications": "Applications",
"Show all match expressions": "Show all match expressions",
"Edit ApplicationSet": "Edit ApplicationSet",
"Delete ApplicationSet": "Delete ApplicationSet",
"View Graph": "View Graph",
"Match Expressions": "Match Expressions",
"Name must be unique within a namespace.": "Name must be unique within a namespace.",
"AppSet ownerReference Tree View": "AppSet ownerReference Tree View",
"Progressive Sync Flow View": "Progressive Sync Flow View",
"Expand or collapse all progressive sync step groups": "Expand or collapse all progressive sync step groups",
Expand Down Expand Up @@ -257,6 +261,8 @@
"Created At": "Created At",
"No pods": "No pods",
"There are no pods associated with the rollout.": "There are no pods associated with the rollout.",
"Close": "Close",
"{{x}} failed with an error.": "{{x}} failed with an error.",
"Edit Pod": "Edit Pod",
"Edit Rollout": "Edit Rollout",
"Promote": "Promote",
Expand All @@ -271,9 +277,7 @@
"ready": "ready",
"0 Pods": "0 Pods",
"Scaling down in:": "Scaling down in:",
"{{x}} failed with an error.": "{{x}} failed with an error.",
"Rollout Revisions": "Rollout Revisions",
"Close": "Close",
"Stable": "Stable",
"Active": "Active",
"Preview": "Preview",
Expand Down Expand Up @@ -331,7 +335,6 @@
"ApplicationSets": "ApplicationSets",
"Create ApplicationSet": "Create ApplicationSet",
"No labels": "No labels",
"Name must be unique within a namespace.": "Name must be unique within a namespace.",
"Namespace defines the space within which each name must be unique.": "Namespace defines the space within which each name must be unique.",
"Map of string keys and values that can be used to organize and categorize (scope and select) objects.": "Map of string keys and values that can be used to organize and categorize (scope and select) objects.",
"Edit": "Edit",
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,8 @@
"react-redux": "7.2.9",
"react-router-dom-v5-compat": "^6.30.0",
"react-router-hash-link": "2.4.3",
"redux": "4.0.1"
"redux": "4.0.1",
"yaml": "^2.9.0"
},
"//TODO": [
"For @patternfly/react-icons: find another solution for icons from older react-icons version and remove this dependency."
Expand Down
10 changes: 10 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,8 @@

.pf-topology__node__label__background {
fill: var(--pf-t--global--background--color--floating--default);
stroke: var(--pf-t--global--border--color--default);
stroke-width: 1;
}

.pf-topology__node__action-icon:hover svg{
Expand Down
4 changes: 4 additions & 0 deletions src/gitops/components/application/graph/graph-utils.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,10 @@ const createApplicationNode = (
height: APP_NODE_HEIGHT,
data: {
name: application?.metadata?.name,
namespace: application?.metadata?.namespace,
kind: application?.kind,
version: ApplicationModel.apiVersion || 'v1alpha1',
group: ApplicationModel.apiGroup || 'argoproj.io',
badge: 'A',
badgeColor: RESOURCE_COLORS.get(
RESOURCE_BADGE_COLORS.get('.co-m-resource-' + application?.kind.toLowerCase()),
Expand Down
58 changes: 58 additions & 0 deletions src/gitops/components/appset/AppSetMatchExpressionsTab.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
import * as React from 'react';
import { RouteComponentProps } from 'react-router';
import * as YamlFormatter from 'yaml';

import { SidebarSectionHeading } from '@gitops/topology/sidebar/DeploymentSideBarDetails';
import { Card, CardBody, Flex, FlexItem, PageSection } from '@patternfly/react-core';

import { ApplicationSetKind } from '../../models/ApplicationSetModel';
import { useGitOpsTranslation } from '../../utils/hooks/useGitOpsTranslation';

import './AppSetDetailsTab.scss';

type AppSetMatchExpressionsTabProps = RouteComponentProps<{ ns: string; name: string }> & {
obj?: ApplicationSetKind;
customData?: object;
};

const AppSetMatchExpressionsTab: React.FC<AppSetMatchExpressionsTabProps> = ({
obj,
customData,
}) => {
const { t } = useGitOpsTranslation();
const index = customData.step !== undefined ? parseInt(customData?.step) - 1 : -1;
if (index >= 0) {
const yaml = obj?.spec?.strategy?.rollingSync?.steps[index] || {};
return (
<>
<PageSection>
<Flex
justifyContent={{ default: 'justifyContentSpaceEvenly' }}
direction={{ default: 'column', lg: 'row' }}
>
<Flex flex={{ default: 'flex_2' }}>
<FlexItem fullWidth={{ default: 'fullWidth' }}>
<div>
<div>
<SidebarSectionHeading
text={t('Progressive Sync Step {{x}}', { x: customData?.step })}
/>
</div>
</div>
<Card>
<CardBody>
<pre>{YamlFormatter.stringify(yaml, null, 2)}</pre>
</CardBody>
</Card>
</FlexItem>
</Flex>
</Flex>
</PageSection>
</>
);
} else {
return <div></div>;
}
};

export default AppSetMatchExpressionsTab;
Loading
Loading