mirror of
https://github.com/argoproj/argo-cd
synced 2026-04-21 17:07:16 +00:00
fix(ui): avoid minimatch namespace calls
Signed-off-by: Varun5711 <varunhotani@gmail.com>
This commit is contained in:
parent
b2a8bc99e4
commit
8de49a112b
4 changed files with 20 additions and 3 deletions
|
|
@ -1,5 +1,4 @@
|
|||
import {useData, Checkbox} from 'argo-ui/v2';
|
||||
import * as minimatch from 'minimatch';
|
||||
import * as React from 'react';
|
||||
import {
|
||||
Application,
|
||||
|
|
@ -21,6 +20,8 @@ import {ComparisonStatusIcon, getAppAllSources, getAppSetHealthStatus, HealthSta
|
|||
import {formatClusterQueryParam} from '../../../shared/utils';
|
||||
import {COLORS} from '../../../shared/components/colors';
|
||||
|
||||
const minimatch = require('minimatch');
|
||||
|
||||
export interface FilterResult {
|
||||
sync: boolean;
|
||||
autosync: boolean;
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import * as React from 'react';
|
||||
import {resourceIcons} from './resources';
|
||||
import {resourceIconGroups as resourceCustomizations} from './resource-customizations';
|
||||
import * as minimatch from 'minimatch';
|
||||
const minimatch = require('minimatch');
|
||||
|
||||
export const ResourceIcon = ({group, kind, customStyle}: {group: string; kind: string; customStyle?: React.CSSProperties}) => {
|
||||
if (kind === 'node') {
|
||||
|
|
|
|||
16
ui/src/app/shared/services/extensions-service.test.ts
Normal file
16
ui/src/app/shared/services/extensions-service.test.ts
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
import {ExtensionsService} from './extensions-service';
|
||||
|
||||
describe('ExtensionsService', () => {
|
||||
it('matches wildcard resource extensions when resolving resource tabs', () => {
|
||||
const service = new ExtensionsService();
|
||||
const group = '*.interop26935.example.io';
|
||||
const kind = 'Widget26935';
|
||||
const title = 'Wildcard extension';
|
||||
|
||||
(window as any).extensionsAPI.registerResourceExtension((() => null) as any, group, kind, title);
|
||||
|
||||
expect(service.getResourceTabs('team.interop26935.example.io', kind)).toEqual(
|
||||
expect.arrayContaining([expect.objectContaining({group, kind, title})])
|
||||
);
|
||||
});
|
||||
});
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
import * as React from 'react';
|
||||
import * as minimatch from 'minimatch';
|
||||
const minimatch = require('minimatch');
|
||||
|
||||
import {Application, ApplicationTree, State} from '../models';
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue