-
-
-
-
-
-
-
-
-
+
+
+
+
+ {{ 'services.controls.serviceType.label' | transloco }}
+
+
-
-
-
+
+ Search service types...
+
+
+
+
+
+
+
+
+
+
+
+
+ Service Details
+
+
+
+ {{
+ 'services.controls.namespace.label' | transloco
+ }}
+
+
+
+
+ {{
+ 'services.controls.label.label' | transloco
+ }}
+
+
+
+
+ {{
+ 'services.controls.description.label' | transloco
+ }}
+
+
+
+
+
{{ 'active' | transloco }}
+
+
+
+
+
+
+
+
+
+ Service Options
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 1
+ 2
+ 3
+
+
+
+
+ 1
+ 2
+ 3
+
+
+
-
-
-
-
+
+
+ {{
+ 'services.controls.serviceType.label' | transloco
+ }}
+
+
+ {{ type.label }}
+
+
+
+
+
+ {{
+ 'services.controls.namespace.label' | transloco
+ }}
+
+
+
+
+ {{ 'services.controls.label.label' | transloco }}
+
+
+
+
+ {{
+ 'services.controls.description.label' | transloco
+ }}
+
+
+
+ {{ 'active' | transloco }}
+
+
+
+
+ {{ 'services.options' | transloco }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/app/adf-services/df-service-details/df-service-details.component.scss b/src/app/adf-services/df-service-details/df-service-details.component.scss
index e69de29b..ce960eb2 100644
--- a/src/app/adf-services/df-service-details/df-service-details.component.scss
+++ b/src/app/adf-services/df-service-details/df-service-details.component.scss
@@ -0,0 +1,97 @@
+.grid-wrapper {
+ display: flex;
+ flex-wrap: wrap;
+ gap: 20px;
+}
+
+label.radio-card {
+ cursor: pointer;
+
+ .card-content-wrapper {
+ background: #fff;
+ border-radius: 5px;
+ max-width: 200px;
+ min-height: 200px;
+ padding: 12px;
+ display: grid;
+ box-shadow: 0 2px 4px 0 rgba(219, 215, 215, 0.04);
+ background-size: contain;
+ background-repeat: no-repeat;
+ opacity: 0.8;
+ }
+
+ .check-icon {
+ width: 20px;
+ height: 20px;
+ display: inline-block;
+ border: solid 2px #e3e3e3;
+ border-radius: 50%;
+ position: relative;
+
+ &:before {
+ content: '';
+ position: absolute;
+ inset: 0;
+ background-image: url("data:image/svg+xml,%3Csvg width='12' height='9' viewBox='0 0 12 9' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0.93552 4.58423C0.890286 4.53718 0.854262 4.48209 0.829309 4.42179C0.779553 4.28741 0.779553 4.13965 0.829309 4.00527C0.853759 3.94471 0.889842 3.88952 0.93552 3.84283L1.68941 3.12018C1.73378 3.06821 1.7893 3.02692 1.85185 2.99939C1.91206 2.97215 1.97736 2.95796 2.04345 2.95774C2.11507 2.95635 2.18613 2.97056 2.2517 2.99939C2.31652 3.02822 2.3752 3.06922 2.42456 3.12018L4.69872 5.39851L9.58026 0.516971C9.62828 0.466328 9.68554 0.42533 9.74895 0.396182C9.81468 0.367844 9.88563 0.353653 9.95721 0.354531C10.0244 0.354903 10.0907 0.369582 10.1517 0.397592C10.2128 0.425602 10.2672 0.466298 10.3112 0.516971L11.0651 1.25003C11.1108 1.29672 11.1469 1.35191 11.1713 1.41247C11.2211 1.54686 11.2211 1.69461 11.1713 1.82899C11.1464 1.88929 11.1104 1.94439 11.0651 1.99143L5.06525 7.96007C5.02054 8.0122 4.96514 8.0541 4.90281 8.08294C4.76944 8.13802 4.61967 8.13802 4.4863 8.08294C4.42397 8.0541 4.36857 8.0122 4.32386 7.96007L0.93552 4.58423Z' fill='white'/%3E%3C/svg%3E%0A");
+ background-repeat: no-repeat;
+ background-size: 12px;
+ background-position: center center;
+ transform: scale(1.6);
+ opacity: 0;
+ }
+ }
+
+ input[type='radio'] {
+ appearance: none;
+ -webkit-appearance: none;
+ -moz-appearance: none;
+ &:checked {
+ + .card-content-wrapper {
+ box-shadow:
+ 0 2px 4px 0 rgba(219, 215, 215, 0.5),
+ 0 0 0 2px;
+ opacity: 1;
+
+ .check-icon {
+ transform: scale(1.2);
+ &:before {
+ transform: scale(1);
+ opacity: 1;
+ }
+ }
+ }
+ }
+
+ &:focus {
+ + .card-content-wrapper {
+ .check-icon {
+ box-shadow: 0 0 0 4px rgba(48, 86, 213, 0.2);
+ border-color: #3056d5;
+ }
+ }
+ }
+ }
+
+ .card-content {
+ width: 100%;
+ img {
+ margin-bottom: 10px;
+ width: 100%;
+ height: 110px;
+ }
+ }
+}
+
+.details-section {
+ .section-header,
+ .action-container {
+ display: flex;
+ justify-content: space-between;
+ width: 100%;
+ }
+}
+mat-icon {
+ display: flex;
+ align-items: center;
+ justify-content: center;
+}
diff --git a/src/app/adf-services/df-service-details/df-service-details.component.ts b/src/app/adf-services/df-service-details/df-service-details.component.ts
index 0193469d..59bb671f 100644
--- a/src/app/adf-services/df-service-details/df-service-details.component.ts
+++ b/src/app/adf-services/df-service-details/df-service-details.component.ts
@@ -8,6 +8,7 @@ import {
ReactiveFormsModule,
Validators,
} from '@angular/forms';
+import { MatStepper, MatStepperModule } from '@angular/material/stepper';
import { MatCheckboxModule } from '@angular/material/checkbox';
import { MatExpansionModule } from '@angular/material/expansion';
import { MatFormFieldModule } from '@angular/material/form-field';
@@ -38,6 +39,9 @@ import {
SILVER_SERVICES,
} from 'src/app/shared/constants/services';
import { DfPaywallComponent } from 'src/app/shared/components/df-paywall/df-paywall.component';
+import { CommonModule } from '@angular/common';
+import { MatIconModule } from '@angular/material/icon';
+import { HttpClient } from '@angular/common/http';
@UntilDestroy({ checkProperties: true })
@Component({
@@ -66,15 +70,21 @@ import { DfPaywallComponent } from 'src/app/shared/components/df-paywall/df-payw
MatButtonModule,
DfScriptEditorComponent,
DfPaywallComponent,
+ MatStepperModule,
+ CommonModule,
+ MatIconModule,
],
})
export class DfServiceDetailsComponent implements OnInit {
edit = false;
+ isDatabase = false;
serviceTypes: Array
;
serviceForm: FormGroup;
faCircleInfo = faCircleInfo;
serviceData: Service;
configSchema: Array;
+ images: Array;
+ search = '';
systemEvents: Array<{ label: string; value: string }>;
@@ -84,7 +94,8 @@ export class DfServiceDetailsComponent implements OnInit {
@Inject(SERVICES_SERVICE_TOKEN)
private servicesService: DfBaseCrudService,
private router: Router,
- private systemConfigDataService: DfSystemConfigDataService
+ private systemConfigDataService: DfSystemConfigDataService,
+ private http: HttpClient
) {
this.serviceForm = this.fb.group({
type: ['', Validators.required],
@@ -100,6 +111,11 @@ export class DfServiceDetailsComponent implements OnInit {
}
ngOnInit(): void {
+ this.http
+ .get>('assets/img/databaseImages.json')
+ .subscribe(images => {
+ this.images = images;
+ });
this.systemConfigDataService.environment$
.pipe(
switchMap(env =>
@@ -107,6 +123,9 @@ export class DfServiceDetailsComponent implements OnInit {
)
)
.subscribe(({ env, route }) => {
+ if (route['groups'][0] === 'Database') {
+ this.isDatabase = true;
+ }
const { data, serviceTypes, groups } = route;
const licenseType = env.platform?.license;
this.serviceTypes = serviceTypes;
@@ -138,6 +157,11 @@ export class DfServiceDetailsComponent implements OnInit {
});
}
});
+ this.serviceForm.controls['type'].valueChanges.subscribe(value => {
+ this.serviceForm.patchValue({
+ label: value,
+ });
+ });
}
initializeConfig() {
@@ -234,4 +258,30 @@ export class DfServiceDetailsComponent implements OnInit {
goBack() {
this.router.navigate(['../'], { relativeTo: this.activatedRoute });
}
+
+ getBackgroundImage(typeLable: string) {
+ const image = this.images.find(img => img.label == typeLable);
+ if (!image) {
+ return '';
+ }
+ return image ? image.src : '';
+ }
+
+ get filteredServiceTypes() {
+ return this.serviceTypes.filter(type =>
+ type.label
+ .replace(/\s/g, '')
+ .toLowerCase()
+ .includes(this.search.toLowerCase())
+ );
+ }
+
+ nextStep(stepper: MatStepper) {
+ stepper.next();
+ }
+}
+interface ImageObject {
+ alt: string;
+ src: string;
+ label: string;
}
diff --git a/src/app/shared/components/df-dynamic-field/df-dynamic-field.component.html b/src/app/shared/components/df-dynamic-field/df-dynamic-field.component.html
index 03fa0fff..afde76ea 100644
--- a/src/app/shared/components/df-dynamic-field/df-dynamic-field.component.html
+++ b/src/app/shared/components/df-dynamic-field/df-dynamic-field.component.html
@@ -1,5 +1,6 @@