Skip to content

Commit

Permalink
web-apps: Remove all the Rok references (#7020)
Browse files Browse the repository at this point in the history
* web-apps(front): Remove rok references

Signed-off-by: Elena Zioga <elena@arrikto.com>

* web-apps(back): Remove rok references

Signed-off-by: Elena Zioga <elena@arrikto.com>

---------

Signed-off-by: Elena Zioga <elena@arrikto.com>
  • Loading branch information
elenzio9 committed Mar 14, 2023
1 parent e9d957d commit 7f0dae5
Show file tree
Hide file tree
Showing 16 changed files with 0 additions and 449 deletions.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ import { NameNamespaceInputsComponent } from './name-namespace-inputs/name-names
import { NameInputComponent } from './name-namespace-inputs/name-input/name-input.component';
import { IconModule } from '../icon/icon.module';
import { PositiveNumberInputComponent } from './positive-number-input/positive-number-input.component';
import { RokUrlInputComponent } from './rok-url-input/rok-url-input.component';
import { AdvancedOptionsComponent } from './advanced-options/advanced-options.component';
import { PopoverModule } from '../popover/popover.module';
import { SubmitBarComponent } from './submit-bar/submit-bar.component';
Expand All @@ -33,7 +32,6 @@ import { StepInfoComponent } from './step-info/step-info.component';
NameNamespaceInputsComponent,
NameInputComponent,
PositiveNumberInputComponent,
RokUrlInputComponent,
AdvancedOptionsComponent,
SubmitBarComponent,
StepInfoComponent,
Expand All @@ -57,7 +55,6 @@ import { StepInfoComponent } from './step-info/step-info.component';
NameNamespaceInputsComponent,
NameInputComponent,
PositiveNumberInputComponent,
RokUrlInputComponent,
AdvancedOptionsComponent,
SubmitBarComponent,
StepInfoComponent,
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import {

import { Observable, of, timer, of as observableOf } from 'rxjs';
import { switchMap, map, catchError } from 'rxjs/operators';
import { RokService } from '../services/rok/rok.service';

const dns1123LabelFmt = '[a-z0-9]([-a-z0-9]*[a-z0-9])?';

Expand Down Expand Up @@ -130,36 +129,3 @@ export function getNameAsyncValidators(
]),
];
}

// Rok
export function getRokUrlError(rokUrlCtrl: AbstractControl) {
if (rokUrlCtrl.hasError('required')) {
return 'Rok URL cannot be empty';
}

if (rokUrlCtrl.hasError('invalidRokUrl')) {
return 'Not a valid Rok URL';
}
}

export function rokUrlValidator(rok: RokService): AsyncValidatorFn {
return (control: AbstractControl): Observable<ValidationErrors | null> => {
const url = control.value;

// Don't return error if the url is empty
if (url.length === 0) {
return of(null);
}

// Ensure a protocol is given
// Don't fire while the user is writting
return timer(DEBOUNCE_TIME).pipe(
switchMap(() =>
rok.getObjectMetadata(url, false).pipe(
map(resp => null),
catchError((msg: string) => observableOf({ invalidRokUrl: true })),
),
),
);
};
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import {
HTTP_INTERCEPTORS,
HttpClientXsrfModule,
} from '@angular/common/http';
import { HeadersInterceptor } from './services/rok/injector';
import { PopoverModule } from './popover/popover.module';
import { TitleActionsToolbarModule } from './title-actions-toolbar/title-actions-toolbar.module';
import { ConditionsTableModule } from './conditions-table/conditions-table.module';
Expand Down Expand Up @@ -46,8 +45,5 @@ import { StatusIconModule } from './status-icon/status-icon.module';
StatusIconModule,
],
imports: [CommonModule, HttpClientModule, HttpClientXsrfModule],
providers: [
{ provide: HTTP_INTERCEPTORS, useClass: HeadersInterceptor, multi: true },
],
})
export class KubeflowModule {}

This file was deleted.

0 comments on commit 7f0dae5

Please sign in to comment.