>{{ 'services.options' | transloco }}
-
+
;
notIncludedServices: Array;
serviceForm: FormGroup;
@@ -146,12 +147,12 @@ export class DfServiceDetailsComponent implements OnInit {
if (route['groups'] && route['groups'][0] === 'Database') {
this.isDatabase = true;
}
- if (
- (route['groups'] && route['groups'][0] === 'Remote Service') ||
- (route['groups'] && route['groups'][0] === 'Script')
- ) {
+ if (route['groups'] && route['groups'][0] === 'Remote Service') {
this.isNetworkService = true;
}
+ if (route['groups'] && route['groups'][0] === 'Script') {
+ this.isScriptService = true;
+ }
const { data, serviceTypes, groups } = route;
const licenseType = env.platform?.license;
this.serviceTypes = serviceTypes;
@@ -307,8 +308,16 @@ export class DfServiceDetailsComponent implements OnInit {
data.service_doc_by_service_id.format = Number(
this.serviceDefinitionType
);
+ } else if (this.isScriptService) {
+ params = {
+ ...params,
+ fields: '*',
+ related: 'service_doc_by_service_id',
+ };
+ data.service_doc_by_service_id = null;
+ data.config.content = this.serviceDefinition;
} else {
- delete data.service_doc_by_service_id; // Remove service_doc_by_service_id if it's not a network service
+ delete data.service_doc_by_service_id;
}
if (this.edit) {
diff --git a/src/app/shared/services/df-base-crud.service.ts b/src/app/shared/services/df-base-crud.service.ts
index c1481bea..2129c6e9 100644
--- a/src/app/shared/services/df-base-crud.service.ts
+++ b/src/app/shared/services/df-base-crud.service.ts
@@ -68,7 +68,9 @@ export class DfBaseCrudService {
) {
const url = Array.isArray(id)
? `${this.url}?ids=${id.join(',')}`
- : `${this.url}/${id}`;
+ : id
+ ? `${this.url}/${id}`
+ : `${this.url}`;
return this.http.delete(
url,
this.getOptions({ snackbarError: 'server', ...options })
diff --git a/src/assets/i18n/cache/en.json b/src/assets/i18n/cache/en.json
index 1a2e5596..b94d8b56 100644
--- a/src/assets/i18n/cache/en.json
+++ b/src/assets/i18n/cache/en.json
@@ -2,6 +2,7 @@
"cache": "Cache",
"overview": "Cache Overview",
"flushService": "Flush {{serviceName}} Cache",
+ "flushCache": "Flush Cache",
"description": "Flush system-wide cache or per-service caches. Use the cache clearing buttons below to refresh any changes made to your system configuration values.",
"flushSystemCache": "Flush System-Wide Cache",
"perServiceCaches": "Per-Service Caches",