Skip to content

Commit

Permalink
style(9656): makes linter happy
Browse files Browse the repository at this point in the history
Signed-off-by: Athitya Kumar <Athitya_Kumar@intuit.com>
  • Loading branch information
athityakumar authored and Athitya Kumar committed Oct 22, 2022
1 parent 10a97d8 commit 2c5b1f1
Showing 1 changed file with 12 additions and 12 deletions.
Expand Up @@ -182,53 +182,53 @@ export class ArchivedWorkflowList extends BasePage<RouteComponentProps<any>, Sta
}

private filterStateObject(state: State, whitelistedStates: string[], blacklistedStates: string[]) {
let filteredState: State = {} as State;
const filteredState: State = {} as State;

if (whitelistedStates.includes("pagination") || !blacklistedStates.includes("pagination")) {
if (whitelistedStates.includes('pagination') || !blacklistedStates.includes('pagination')) {
filteredState.pagination = state.pagination;
}

if (whitelistedStates.includes("namespace") || !blacklistedStates.includes("namespace")) {
if (whitelistedStates.includes('namespace') || !blacklistedStates.includes('namespace')) {
filteredState.namespace = state.namespace;
}

if (whitelistedStates.includes("name") || !blacklistedStates.includes("name")) {
if (whitelistedStates.includes('name') || !blacklistedStates.includes('name')) {
filteredState.name = state.name;
}

if (whitelistedStates.includes("namePrefix") || !blacklistedStates.includes("namePrefix")) {
if (whitelistedStates.includes('namePrefix') || !blacklistedStates.includes('namePrefix')) {
filteredState.namePrefix = state.namePrefix;
}

if (whitelistedStates.includes("selectedPhases") || !blacklistedStates.includes("selectedPhases")) {
if (whitelistedStates.includes('selectedPhases') || !blacklistedStates.includes('selectedPhases')) {
filteredState.selectedPhases = state.selectedPhases;
}

if (whitelistedStates.includes("selectedLabels") || !blacklistedStates.includes("selectedLabels")) {
if (whitelistedStates.includes('selectedLabels') || !blacklistedStates.includes('selectedLabels')) {
filteredState.selectedLabels = state.selectedLabels;
}

if (whitelistedStates.includes("minStartedAt") || !blacklistedStates.includes("minStartedAt")) {
if (whitelistedStates.includes('minStartedAt') || !blacklistedStates.includes('minStartedAt')) {
filteredState.minStartedAt = state.minStartedAt;
}

if (whitelistedStates.includes("maxStartedAt") || !blacklistedStates.includes("maxStartedAt")) {
if (whitelistedStates.includes('maxStartedAt') || !blacklistedStates.includes('maxStartedAt')) {
filteredState.maxStartedAt = state.maxStartedAt;
}

if (whitelistedStates.includes("error") || !blacklistedStates.includes("error")) {
if (whitelistedStates.includes('error') || !blacklistedStates.includes('error')) {
filteredState.error = state.error;
}

if (whitelistedStates.includes("deep") || !blacklistedStates.includes("deep")) {
if (whitelistedStates.includes('deep') || !blacklistedStates.includes('deep')) {
filteredState.deep = state.deep;
}

return filteredState;
}

private saveHistory() {
this.storage.setItem('options', this.filterStateObject(this.state, [], ["workflows"]), {} as State);
this.storage.setItem('options', this.filterStateObject(this.state, [], ['workflows']), {} as State);
const newNamespace = Utils.managedNamespace ? '' : this.state.namespace;
this.url = uiUrl('archived-workflows' + (newNamespace ? '/' + newNamespace : '') + '?' + this.filterParams.toString());
Utils.currentNamespace = this.state.namespace;
Expand Down

0 comments on commit 2c5b1f1

Please sign in to comment.