Skip to content
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
<textarea rows="1" matInput formControlName="description"></textarea>
</mat-form-field>

<div formArrayName="serviceAccess">
<div formArrayName="serviceAccess" class="full-width">
<df-roles-access
[formArray]="serviceAccess"
[roleForm]="roleForm"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<div class="service-access-accordion" [formGroup]="roleForm">
<div class="service-access-accordion full-width" [formGroup]="roleForm">
<mat-accordion>
<mat-expansion-panel>
<mat-expansion-panel-header>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
[formGroup]="serviceForm"
class="details-section"
[class]="(isDarkMode | async) ? 'dark-theme' : ''"
(ngSubmit)="save()">
(ngSubmit)="save(false)">
<ng-container *ngIf="this.isDatabase && !this.edit; else notDatabase">
<mat-stepper linear #stepper>
<mat-step errorMessage="Service Type is required." [editable]="true">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,10 @@ import { FontAwesomeModule } from '@fortawesome/angular-fontawesome';
import { MatTooltipModule } from '@angular/material/tooltip';
import { MatButtonModule } from '@angular/material/button';
import { UntilDestroy } from '@ngneat/until-destroy';
import { SERVICES_SERVICE_TOKEN } from 'src/app/shared/constants/tokens';
import {
CACHE_SERVICE_TOKEN,
SERVICES_SERVICE_TOKEN,
} from 'src/app/shared/constants/tokens';
import { DfBaseCrudService } from 'src/app/shared/services/df-base-crud.service';
import { Service } from 'src/app/shared/types/files';
import { AceEditorMode } from 'src/app/shared/types/scripts';
Expand Down Expand Up @@ -103,14 +106,13 @@ export class DfServiceDetailsComponent implements OnInit {
search = '';
serviceDefinition: string;
serviceDefinitionType: string;

systemEvents: Array<{ label: string; value: string }>;

constructor(
private activatedRoute: ActivatedRoute,
private fb: FormBuilder,
@Inject(SERVICES_SERVICE_TOKEN)
private servicesService: DfBaseCrudService,
@Inject(SERVICES_SERVICE_TOKEN) private servicesService: DfBaseCrudService,
@Inject(CACHE_SERVICE_TOKEN) private cacheService: DfBaseCrudService,
private router: Router,
private systemConfigDataService: DfSystemConfigDataService,
private http: HttpClient,
Expand Down Expand Up @@ -158,7 +160,9 @@ export class DfServiceDetailsComponent implements OnInit {
}
const { data, serviceTypes, groups } = route;
const licenseType = env.platform?.license;
this.serviceTypes = serviceTypes;
this.serviceTypes = serviceTypes.filter(
(s: { name: string }) => s.name.toLowerCase() !== 'python'
);
this.notIncludedServices = [];
if (this.isDatabase) {
if (licenseType === 'SILVER') {
Expand Down Expand Up @@ -318,7 +322,7 @@ export class DfServiceDetailsComponent implements OnInit {
return this.serviceForm.controls[name] as FormControl;
}

save() {
save(clearCache: boolean) {
if (this.serviceForm.invalid) {
return;
}
Expand Down Expand Up @@ -434,7 +438,21 @@ export class DfServiceDetailsComponent implements OnInit {
snackbarSuccess: 'services.updateSuccessMsg',
})
.subscribe(() => {
this.router.navigate(['../'], { relativeTo: this.activatedRoute });
if (clearCache) {
this.cacheService
.delete(payload.name, {
snackbarSuccess: 'cache.serviceCacheFlushed',
})
.subscribe({
next: () => {
console.log('Cache flushed');
this.router.navigate(['../'], {
relativeTo: this.activatedRoute,
});
},
error: (err: any) => console.error('Error flushing cache', err),
});
}
});
} else {
this.servicesService
Expand All @@ -446,7 +464,6 @@ export class DfServiceDetailsComponent implements OnInit {
)
.subscribe(() => {
this.router.navigate(['../'], { relativeTo: this.activatedRoute });
// this.router.navigate([`/api-connections/api-docs/${data.name}`]);
});
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@
class="toggle-icon">
<fa-icon [icon]="faBars" class="toggle-icon"></fa-icon>
</button>
<img class="logo" src="assets/img/logo.png" alt="Logo" routerLink="/" />
<a class="logo" routerLink="/">
<img class="logo" src="assets/img/logo.png" alt="Logo" />
</a>
</div>
<div class="search-bar">
<fa-icon [icon]="faMagnifyingGlass" class="search-icon"></fa-icon>
Expand Down
16 changes: 8 additions & 8 deletions src/app/shared/constants/services.ts
Original file line number Diff line number Diff line change
Expand Up @@ -159,14 +159,14 @@ export const SILVER_SERVICES: Array<ServiceType> = [
group: 'Script',
configSchema: [],
},
{
name: 'python',
label: 'Python',
description:
'Service that allows client-callable scripts utilizing the system scripting.',
group: 'Script',
configSchema: [],
},
// {
// name: 'python',
// label: 'Python',
// description:
// 'Service that allows client-callable scripts utilizing the system scripting.',
// group: 'Script',
// configSchema: [],
// },
{
name: 'python3',
label: 'Python3',
Expand Down