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
@@ -1,35 +1,34 @@

export interface WebApiControllerDetails {
Controller: string;
Path: string;
IgnoreSecurity: boolean;
AllowAnonymous: boolean;
RequireVerificationToken: boolean;
ValidateAntiForgeryToken: boolean;
AutoValidateAntiforgeryToken: boolean;
IgnoreAntiforgeryToken: boolean;
View: boolean;
Edit: boolean;
Admin: boolean;
SuperUser: boolean;
RequireContext: boolean;
controller: string;
path: string;
ignoreSecurity: boolean;
allowAnonymous: boolean;
requireVerificationToken: boolean;
validateAntiForgeryToken: boolean;
autoValidateAntiforgeryToken: boolean;
ignoreAntiforgeryToken: boolean;
view: boolean;
edit: boolean;
admin: boolean;
superUser: boolean;
requireContext: boolean;
}

export interface WebApiControllerEndpoint {
Name: string;
EndpointPath: string;
Returns: string;
Verbs: string;
Parameters?: WebApiControllerParameter[];
Security?: WebApiSecurity;
IgnoreSecurity: boolean;
AllowAnonymous: boolean;
RequireVerificationToken: boolean;
View: boolean;
Edit: boolean;
Admin: boolean;
SuperUser: boolean;
RequireContext: boolean;
name: string;
endpointPath: string;
returns: string;
verbs: string;
parameters?: WebApiControllerParameter[];
security?: WebApiSecurity;
ignoreSecurity: boolean;
allowAnonymous: boolean;
requireVerificationToken: boolean;
view: boolean;
edit: boolean;
admin: boolean;
superUser: boolean;
requireContext: boolean;
}

export interface WebApiControllerParameter {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export class DialogConfigGlobalService extends HttpServiceBase {
params: { appId: appId ?? this.appId },
}).pipe(
map(dlgSettings => {
dlgSettings.Context.Language.List = dlgSettings.Context.Language.List.filter(language => language.IsEnabled);
dlgSettings.Context.Language.List = dlgSettings.Context.Language.List.filter(language => language.isEnabled);
return dlgSettings;
}),
tap(dlgSettings => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ export class LanguagePermissionsComponent implements OnInit {
}

openPermissions(language: SiteLanguagePermissions): void {
this.#dialogRouting.navRelative([GoToPermissions.getUrlLanguage(language.NameId)]);
this.#dialogRouting.navRelative([GoToPermissions.getUrlLanguage(language.nameId)]);
}


Expand All @@ -68,7 +68,7 @@ export class LanguagePermissionsComponent implements OnInit {
filter: 'agTextColumnFilter',
cellRendererParams: (() => {
const params: IdFieldParams<SiteLanguagePermissions> = {
tooltipGetter: (language) => `ID: ${language.Code}`,
tooltipGetter: (language) => `ID: ${language.code}`,
};
return params;
})(),
Expand All @@ -77,7 +77,7 @@ export class LanguagePermissionsComponent implements OnInit {
...ColumnDefinitions.TextWide,
field: 'Name',
sort: 'asc',
valueGetter: (p: { data: SiteLanguagePermissions }) => p.data.Culture,
valueGetter: (p: { data: SiteLanguagePermissions }) => p.data.culture,
},
{
...ColumnDefinitions.ActionsPinnedRight1,
Expand All @@ -93,5 +93,3 @@ export class LanguagePermissionsComponent implements OnInit {
return gridOptions;
}
}


Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,5 @@ import { LanguagesPermissionsActionsParams } from './languages-permissions-actio
export class LanguagesPermissionsActionsComponent
extends AgGridActionsBaseComponent<SiteLanguagePermissions, 'openPermissions', LanguagesPermissionsActionsParams> {

get permissionCount() { return this.data?.Permissions?.Count; }
}
get permissionCount() { return this.data?.permissions?.Count; }
}
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
export interface SiteLanguage {
Code: string;
Culture: string;
IsEnabled: boolean;
NameId: string;
code: string;
culture: string;
isEnabled: boolean;
nameId: string;
}

export interface SiteLanguagePermissions extends SiteLanguage {
IsAllowed: boolean;
Permissions: { Count: number; };
isAllowed: boolean;
permissions: { Count: number; };
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ export interface LicenseInfo {
}

export interface WarningsCount {
WarningsObsolete: number;
WarningsOther: number;
warningsObsolete: number;
warningsOther: number;
}

export interface SiteStats {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export class SiteLanguagesComponent {
async #toggleLanguage(language: SiteLanguage, enable: boolean) {
try {
// Wait for the API call to complete and get the status code
const status = await this.#zoneSvc.toggleLanguage(language.Code, enable);
const status = await this.#zoneSvc.toggleLanguage(language.code, enable);
if (status >= 200 && status < 300) {
this.#refreshLanguagesSig.set(this.#refreshLanguagesSig() + 1);
}
Expand All @@ -54,7 +54,7 @@ export class SiteLanguagesComponent {
filter: 'agTextColumnFilter',
cellRendererParams: (() => {
const params: IdFieldParams<SiteLanguage> = {
tooltipGetter: (language: SiteLanguage) => `ID: ${language.Code}`,
tooltipGetter: (language: SiteLanguage) => `ID: ${language.code}`,
};
return params;
})(),
Expand All @@ -66,7 +66,7 @@ export class SiteLanguagesComponent {
sort: 'asc',
onCellClicked: (params) => {
const language: SiteLanguage = params.data;
this.#toggleLanguage(language, !language.IsEnabled);
this.#toggleLanguage(language, !language.isEnabled);
},
},
{
Expand All @@ -76,7 +76,7 @@ export class SiteLanguagesComponent {
cellClass: 'no-padding no-outline'.split(' '),
sortable: true,
filter: BooleanFilterComponent,
valueGetter: (p: { data: SiteLanguage }) => p.data.IsEnabled,
valueGetter: (p: { data: SiteLanguage }) => p.data.isEnabled,
cellRenderer: SiteLanguagesStatusComponent,
cellRendererParams: (() => {
const params: SiteLanguagesStatusParams = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ export class SystemInfoComponent implements OnInit {
if (systemInfoSetValue == null || languagesValue == null) return;

const allLanguages = languagesValue.length;
const activeLanguages = languagesValue.filter(l => l.IsEnabled).length;
const activeLanguages = languagesValue.filter(l => l.isEnabled).length;

const info: InfoTemplate[] = [
{ label: 'Zone', value: systemInfoSetValue.Site.ZoneId.toString() },
Expand Down Expand Up @@ -148,7 +148,7 @@ export class SystemInfoComponent implements OnInit {
warningIcon = computed(() => {
const systemInfoSetValue = this.#systemInfoSet();
if (systemInfoSetValue == null) return undefined;
if (systemInfoSetValue.Messages.WarningsObsolete || systemInfoSetValue.Messages.WarningsOther) {
if (systemInfoSetValue.Messages.warningsObsolete || systemInfoSetValue.Messages.warningsOther) {
return 'warning';
}
return 'check';
Expand All @@ -161,8 +161,8 @@ export class SystemInfoComponent implements OnInit {
const info: InfoTemplate[] = [
{
label: 'Warnings Obsolete',
value: systemInfoSetValue.Messages.WarningsObsolete.toString(),
link: !systemInfoSetValue.Messages.WarningsObsolete
value: systemInfoSetValue.Messages.warningsObsolete.toString(),
link: !systemInfoSetValue.Messages.warningsObsolete
? undefined
: {
url: window.$2sxc.http.apiUrl('sys/insights/logs?key=warnings-obsolete'),
Expand All @@ -172,8 +172,8 @@ export class SystemInfoComponent implements OnInit {
},
{
label: 'Warnings Other',
value: systemInfoSetValue.Messages.WarningsOther.toString(),
link: !systemInfoSetValue.Messages.WarningsOther
value: systemInfoSetValue.Messages.warningsOther.toString(),
link: !systemInfoSetValue.Messages.warningsOther
? undefined
: {
url: window.$2sxc.http.apiUrl('sys/insights/logs'),
Expand Down
84 changes: 42 additions & 42 deletions projects/eav-ui/src/app/code-editor/services/source.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ const dataSourceAppWebApiControllerDetails = 'System.AppWebApiControllerDetails'
const dataSourceAppWebApiControllerEndpoints = 'System.AppWebApiControllerEndpoints';

interface AppWebApiControllerRow {
Path: string;
EndpointPath: string;
Edition: string;
Shared: boolean;
path: string;
endpointPath: string;
edition: string;
shared: boolean;
}

type WebApiControllerDetailsResponse = { Default?: WebApiControllerDetailsRaw[] };
Expand Down Expand Up @@ -98,7 +98,7 @@ export class SourceService extends HttpServiceBase {

// TODO: @2dg, ask 2dm
// getSig(viewKey: string, global: boolean, urlItems: ViewOrFileIdentifier[], initial: undefined): Signal<SourceView> {
// // Signal für die SourceView erstellen
// // Signal für die SourceView erstellen
// const temp = this.getSignal<SourceView>(appFilesAsset, {
// params: {
// appId: this.appId,
Expand Down Expand Up @@ -187,19 +187,19 @@ export class SourceService extends HttpServiceBase {

#mapWebApiRows(rows: AppWebApiControllerRow[]): WebApi[] {
return rows.map(row => {
const splitIndex = row.Path.lastIndexOf('/');
const fileExtIndex = row.Path.lastIndexOf('.');
const folder = row.Path.substring(0, splitIndex);
const name = row.Path.substring(splitIndex + 1, fileExtIndex);
const splitIndex = row.path.lastIndexOf('/');
const fileExtIndex = row.path.lastIndexOf('.');
const folder = row.path.substring(0, splitIndex);
const name = row.path.substring(splitIndex + 1, fileExtIndex);

return {
path: row.Path,
path: row.path,
folder,
name,
isShared: row.Shared,
endpointPath: row.EndpointPath,
isShared: row.shared,
endpointPath: row.endpointPath,
isCompiled: false,
edition: row.Edition,
edition: row.edition,
};
});
}
Expand All @@ -210,7 +210,7 @@ export class SourceService extends HttpServiceBase {
source: dataSourceAppWebApiControllerDetails,
params: {
AppId: this.appId,
Path: path,
path,
},
streams: 'Default',
noCamel: true,
Expand All @@ -232,7 +232,7 @@ export class SourceService extends HttpServiceBase {
source: dataSourceAppWebApiControllerEndpoints,
params: {
AppId: this.appId,
Path: path,
path,
},
streams: 'Default',
noCamel: true,
Expand Down Expand Up @@ -270,19 +270,19 @@ export class SourceService extends HttpServiceBase {
} = details;

return {
Controller: controller,
Path: path,
IgnoreSecurity: ignoreSecurity,
AllowAnonymous: allowAnonymous,
RequireVerificationToken: requireVerificationToken,
ValidateAntiForgeryToken: validateAntiForgeryToken,
AutoValidateAntiforgeryToken: autoValidateAntiforgeryToken,
IgnoreAntiforgeryToken: ignoreAntiforgeryToken,
View: view,
Edit: edit,
Admin: admin,
SuperUser: superUser,
RequireContext: requireContext,
controller,
path,
ignoreSecurity,
allowAnonymous,
requireVerificationToken,
validateAntiForgeryToken,
autoValidateAntiforgeryToken,
ignoreAntiforgeryToken,
view,
edit,
admin,
superUser,
requireContext,
};
}

Expand All @@ -305,20 +305,20 @@ export class SourceService extends HttpServiceBase {
} = endpoint;

return {
Name: name,
EndpointPath: endpointPath,
Returns: returns,
Verbs: verbs,
Parameters: parameters,
Security: security,
IgnoreSecurity: ignoreSecurity,
AllowAnonymous: allowAnonymous,
RequireVerificationToken: requireVerificationToken,
View: view,
Edit: edit,
Admin: admin,
SuperUser: superUser,
RequireContext: requireContext,
name,
endpointPath,
returns,
verbs,
parameters,
security,
ignoreSecurity,
allowAnonymous,
requireVerificationToken,
view,
edit,
admin,
superUser,
requireContext,
};
}

Expand Down
2 changes: 1 addition & 1 deletion projects/eav-ui/src/app/content-export/content-export.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<mat-select [(ngModel)]="formValues.language" name="Language">
<mat-option value="">All</mat-option>
@for (lang of languages; track lang) {
<mat-option [value]="lang.NameId">{{ lang.NameId }}</mat-option>
<mat-option [value]="lang.nameId">{{ lang.nameId }}</mat-option>
}
</mat-select>
</mat-form-field>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
<h3><code>{{ data()?.Name }}</code> Parameters</h3>
<h3><code>{{ data()?.name }}</code> Parameters</h3>

@if (!(data()?.Parameters?.length ?? 0)) {
@if (!(data()?.parameters?.length ?? 0)) {
<p class="warning info-box">
<mat-icon>info</mat-icon>
This endpoint doesn't seem to use any parameters.
</p>
}

@if (data()?.Parameters?.length) {
<ag-grid-angular class="ag-theme-material" [rowData]="data()?.Parameters ?? []"
[gridOptions]="gridOptions" [style.height]="(33 + (data()?.Parameters?.length ?? 0) * 48) + 'px'">
@if (data()?.parameters?.length) {
<ag-grid-angular class="ag-theme-material" [rowData]="data()?.parameters ?? []"
[gridOptions]="gridOptions" [style.height]="(33 + (data()?.parameters?.length ?? 0) * 48) + 'px'">
</ag-grid-angular>
}
}
Loading