mirror of
https://github.com/Unleash/unleash.git
synced 2025-11-10 01:19:53 +01:00
https://linear.app/unleash/issue/UNL-140/experiment-with-filtering-feature-toggles-by-tags-on-the-ui Going with a naïve approach for now, tags can be searchable the same way we search for text. The tags column only shows up if at least one toggle has tags set. There's a simple highlightable component that lets us know a match was found and then shows all the tags on a tooltip: <img width="1289" alt="image" src="https://user-images.githubusercontent.com/14320932/201155093-b8605ff2-5bf7-45c5-b240-a33da254c278.png">
253 lines
6.6 KiB
TypeScript
253 lines
6.6 KiB
TypeScript
/* tslint:disable */
|
|
/* eslint-disable */
|
|
/**
|
|
* Unleash API
|
|
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
*
|
|
* The version of the OpenAPI document: 4.11.0-beta.2
|
|
*
|
|
*
|
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
* https://openapi-generator.tech
|
|
* Do not edit the class manually.
|
|
*/
|
|
|
|
import { exists, mapValues } from '../runtime';
|
|
import {
|
|
FeatureEnvironmentSchema,
|
|
FeatureEnvironmentSchemaFromJSON,
|
|
FeatureEnvironmentSchemaFromJSONTyped,
|
|
FeatureEnvironmentSchemaToJSON,
|
|
} from './FeatureEnvironmentSchema';
|
|
import {
|
|
StrategySchema,
|
|
StrategySchemaFromJSON,
|
|
StrategySchemaFromJSONTyped,
|
|
StrategySchemaToJSON,
|
|
} from './StrategySchema';
|
|
import {
|
|
TagSchema,
|
|
TagSchemaFromJSON,
|
|
TagSchemaFromJSONTyped,
|
|
TagSchemaToJSON,
|
|
} from './TagSchema';
|
|
import {
|
|
VariantSchema,
|
|
VariantSchemaFromJSON,
|
|
VariantSchemaFromJSONTyped,
|
|
VariantSchemaToJSON,
|
|
} from './VariantSchema';
|
|
|
|
/**
|
|
*
|
|
* @export
|
|
* @interface FeatureSchema
|
|
*/
|
|
export interface FeatureSchema {
|
|
/**
|
|
*
|
|
* @type {string}
|
|
* @memberof FeatureSchema
|
|
*/
|
|
name: string;
|
|
/**
|
|
*
|
|
* @type {string}
|
|
* @memberof FeatureSchema
|
|
*/
|
|
type?: string;
|
|
/**
|
|
*
|
|
* @type {string}
|
|
* @memberof FeatureSchema
|
|
*/
|
|
description?: string;
|
|
/**
|
|
*
|
|
* @type {boolean}
|
|
* @memberof FeatureSchema
|
|
*/
|
|
archived?: boolean;
|
|
/**
|
|
*
|
|
* @type {string}
|
|
* @memberof FeatureSchema
|
|
*/
|
|
project?: string;
|
|
/**
|
|
*
|
|
* @type {boolean}
|
|
* @memberof FeatureSchema
|
|
*/
|
|
enabled?: boolean;
|
|
/**
|
|
*
|
|
* @type {boolean}
|
|
* @memberof FeatureSchema
|
|
*/
|
|
stale?: boolean;
|
|
/**
|
|
*
|
|
* @type {boolean}
|
|
* @memberof FeatureSchema
|
|
*/
|
|
impressionData?: boolean;
|
|
/**
|
|
*
|
|
* @type {Date}
|
|
* @memberof FeatureSchema
|
|
*/
|
|
createdAt?: Date | null;
|
|
/**
|
|
*
|
|
* @type {Date}
|
|
* @memberof FeatureSchema
|
|
*/
|
|
archivedAt?: Date | null;
|
|
/**
|
|
*
|
|
* @type {Date}
|
|
* @memberof FeatureSchema
|
|
*/
|
|
lastSeenAt?: Date | null;
|
|
/**
|
|
*
|
|
* @type {Array<FeatureEnvironmentSchema>}
|
|
* @memberof FeatureSchema
|
|
*/
|
|
environments?: Array<FeatureEnvironmentSchema>;
|
|
/**
|
|
*
|
|
* @type {Array<StrategySchema>}
|
|
* @memberof FeatureSchema
|
|
*/
|
|
strategies?: Array<StrategySchema>;
|
|
/**
|
|
*
|
|
* @type {Array<VariantSchema>}
|
|
* @memberof FeatureSchema
|
|
*/
|
|
variants?: Array<VariantSchema>;
|
|
/**
|
|
*
|
|
* @type {Array<TagSchema>}
|
|
* @memberof FeatureSchema
|
|
*/
|
|
tags?: Array<TagSchema> | null;
|
|
}
|
|
|
|
export function FeatureSchemaFromJSON(json: any): FeatureSchema {
|
|
return FeatureSchemaFromJSONTyped(json, false);
|
|
}
|
|
|
|
export function FeatureSchemaFromJSONTyped(
|
|
json: any,
|
|
ignoreDiscriminator: boolean
|
|
): FeatureSchema {
|
|
if (json === undefined || json === null) {
|
|
return json;
|
|
}
|
|
return {
|
|
name: json['name'],
|
|
type: !exists(json, 'type') ? undefined : json['type'],
|
|
description: !exists(json, 'description')
|
|
? undefined
|
|
: json['description'],
|
|
archived: !exists(json, 'archived') ? undefined : json['archived'],
|
|
project: !exists(json, 'project') ? undefined : json['project'],
|
|
enabled: !exists(json, 'enabled') ? undefined : json['enabled'],
|
|
stale: !exists(json, 'stale') ? undefined : json['stale'],
|
|
impressionData: !exists(json, 'impressionData')
|
|
? undefined
|
|
: json['impressionData'],
|
|
createdAt: !exists(json, 'createdAt')
|
|
? undefined
|
|
: json['createdAt'] === null
|
|
? null
|
|
: new Date(json['createdAt']),
|
|
archivedAt: !exists(json, 'archivedAt')
|
|
? undefined
|
|
: json['archivedAt'] === null
|
|
? null
|
|
: new Date(json['archivedAt']),
|
|
lastSeenAt: !exists(json, 'lastSeenAt')
|
|
? undefined
|
|
: json['lastSeenAt'] === null
|
|
? null
|
|
: new Date(json['lastSeenAt']),
|
|
environments: !exists(json, 'environments')
|
|
? undefined
|
|
: (json['environments'] as Array<any>).map(
|
|
FeatureEnvironmentSchemaFromJSON
|
|
),
|
|
strategies: !exists(json, 'strategies')
|
|
? undefined
|
|
: (json['strategies'] as Array<any>).map(StrategySchemaFromJSON),
|
|
variants: !exists(json, 'variants')
|
|
? undefined
|
|
: (json['variants'] as Array<any>).map(VariantSchemaFromJSON),
|
|
tags: !exists(json, 'tags')
|
|
? undefined
|
|
: json['tags'] === null
|
|
? null
|
|
: (json['tags'] as Array<any>).map(TagSchemaFromJSON),
|
|
};
|
|
}
|
|
|
|
export function FeatureSchemaToJSON(value?: FeatureSchema | null): any {
|
|
if (value === undefined) {
|
|
return undefined;
|
|
}
|
|
if (value === null) {
|
|
return null;
|
|
}
|
|
return {
|
|
name: value.name,
|
|
type: value.type,
|
|
description: value.description,
|
|
archived: value.archived,
|
|
project: value.project,
|
|
enabled: value.enabled,
|
|
stale: value.stale,
|
|
impressionData: value.impressionData,
|
|
createdAt:
|
|
value.createdAt === undefined
|
|
? undefined
|
|
: value.createdAt === null
|
|
? null
|
|
: value.createdAt.toISOString().substr(0, 10),
|
|
archivedAt:
|
|
value.archivedAt === undefined
|
|
? undefined
|
|
: value.archivedAt === null
|
|
? null
|
|
: value.archivedAt.toISOString().substr(0, 10),
|
|
lastSeenAt:
|
|
value.lastSeenAt === undefined
|
|
? undefined
|
|
: value.lastSeenAt === null
|
|
? null
|
|
: value.lastSeenAt.toISOString().substr(0, 10),
|
|
environments:
|
|
value.environments === undefined
|
|
? undefined
|
|
: (value.environments as Array<any>).map(
|
|
FeatureEnvironmentSchemaToJSON
|
|
),
|
|
strategies:
|
|
value.strategies === undefined
|
|
? undefined
|
|
: (value.strategies as Array<any>).map(StrategySchemaToJSON),
|
|
variants:
|
|
value.variants === undefined
|
|
? undefined
|
|
: (value.variants as Array<any>).map(VariantSchemaToJSON),
|
|
tags:
|
|
value.tags === undefined
|
|
? undefined
|
|
: value.tags === null
|
|
? null
|
|
: (value.tags as Array<any>).map(TagSchemaToJSON),
|
|
};
|
|
}
|