Has anyone re-used pages and found a way to dynamically generate the breadcrumbs so they determine the previous page correctly?
For example, I have a page that is referenced in multiple locations throughout my solution.
The breadcrumbs are a list of breadcrumbitem and the helper renders it.
However, these are basically just hard coded.
Would it be better to do this client side and examine the history of the browser, or look at referrer (which could possibly be blocked)?
Not sure how to address this. I want to keep my code DRY.
V11 MVC Core JQuery
I have a host entity (HostEntity) with specific values for the tenants.
For the tenants, I have another entity (TenantEntity) when a FK to the host entity
When the app service, GetAll(), when the query includes HostEntityFK. The purpose is to get the name of the HostEntity for the view model.
However, if I disable the MayHaveTenant filter, I get all TenantEntities.
How can I disable the filter for the hostentityrepository in the IQueryable? Is this possible?
V11.3 MVC Core
I have entities with properties that could contain information that shouldn't be stored transparently in the logs.
In digging for securing history property values - It looks like I'd need to extend the EntityHistoryStore from here:
Specifically, during the changeset creation process.
For Audit logging - the JSON posted is stored (I'm not storying sent values) potentially contains sensitive information.
I'm thinking I should override the auditing helper from here:
For properties, I'd examine the entity type and if it had a particular property (securelogs, regardless of value), it would mask the previous and new values in the history.
For audit logs, perhaps I'd put a regex in the secure logs and anything matching that regex would be masked in the raw JSON?
I'm not sure of the best approach to this. Because the data needs to be audited and history tracked due to the nature of the data, I need this information. However, because of the nature of the data, I don't want the actual values visible in the logs.
What would be the best approach would be to add an attribute to the property for masking the data, I suppose - but I first need to determine how, in my project, I can intercept the auditing and history to ensure data matching my pattern is masked in the JSON value auditing logs - and also masked in the property change history.
Any guidance is most appreciated.
V11.3 MVC Core
I am trying to regenerate an entity and add IsDeleted.
My project compiles without issue.
The RadTool opens a command window but doesn't do anything.
I ran it from the command line, and I get: An error occured. : Object reference not set to an instance of an object.
I don't know where the rad tool log file is. There's nothing in the windows event log.
General question - but I'm on 11.3 MVC Jquery
To change a tenancyname - can I just update the database? Don't find a place in the UI to do it, so I'm not sure if there are unforeseen consequences to this.
Thanks!
V11 MVC Jquery
In trying to use a lookup modal in the registration process, I'm able to get everything working except when the user clicks select.
I'm still digging - but does anyone know what script I need to include in the account layout bundle that handles lookup modals?
v11.3 Jquery MVC
As part of a user registration, I am trying to walk the user through a wizard (using Metronic's stepper).
Part of this is I need to bring up a modal and to use DataTables.
I've gone through bundles - made sure Jquery is loading in account-layout - and DataTables is included in common-scripts after that.
However, when I load the login page, in the console $.fn.dataTable is undefined.
If I login, $.fn.dataTable exists.
I had a similar issue with stepper, but added it to my bundle for this specific page with success. I've verified DataTables is arriving in common scripts, and I know from the Layout.cshtml file for the Account view that jquery is loaded before.
Is there something I'm missing, or that I have to do to 'initialize' datatables into the document so my modal will leverage it? Traditionally, I've just made sure jquery & datatables were downloaded to use it.
Thanks
Version 11, MVC
I cloned the getall method and the api works great.
I see my data coming back.
I created a table with one column, copied the datatables method from the page, removed all the columndefs except for one...
And no matter what I'm getting the infamous Requested unknown parameter '0' for row 0, column 0. For more information about this error, please see http://datatables.net/tn/4
My results look fine, I have an items array with a list of objects.
Does anyone have a suggestion on how to troubleshoot why this is not working?
My table:
<table id="MyRecordStateTable" class="table dataTable align-middle gs-0 gy-3">
<!--begin::Table head-->
<thead>
<tr>
<th class="p-0 w-50px"></th>
</tr>
</thead>
<!--end::Table head-->
<!--begin::Table body-->
<!--end::Table body-->
</table>
My datatables:
var dataTable = _$myRecordStateTable.DataTable({
paging: false,
serverSide: true,
processing: true,
listAction: {
ajaxFunction: abp.services.app.recordStates.getAllForUserId,
inputFilter: function () {
return {
userId: _userid
}
},
columnDefs: [
{ "defaultContent": "-", "targets": "_all" },
//{ targets: 0, data: 'fullName'},
]
}
});
What my items in the array of 'items' look like:
{
"recordState": {
"state": 2,
"notes": "",
"recordId": "08da5a0b-e079-4edb-8ebb-17fcb45292ae",
"recordCategoryId": "08da5a0b-deaf-4372-87a1-2320eb5fbc2f",
"userId": 10,
"recordStatusId": "08da5a0b-df28-4ff8-829c-185c1a27586f",
"id": "0c252a48-8208-a9cf-06dc-3a04c3460dcc"
},
"recordStatus": {
"statusName": "Accepted",
"htmlColor": "#67c777",
"csscLass": "",
"isDefault": false,
"tenantDepartmentId": null,
"id": "08da5a0b-df28-4ff8-829c-185c1a27586f"
},
"recordfilename": "auto insurance.pdf",
"recordCategoryName": "Auto Insurance",
"userName": "Marble 68",
"recordStatusStatusName": "Accepted",
"fullName": "Marble 68",
"userId": 10
}
I get multiple of these, and yet, no matter what, I'm getting that error.
I tried adding this, from the generated page:
_$myRecordStateTable
.on('xhr.dt', function (e, settings, json, xhr) {
console.log('data back');
//sortingUser = settings.rawServerResponse.sortingUser;
dataTable.rawData = settings.rawServerResponse;
//debugger;
});
Any advice of things I should check? I'm beating my head against the wall on this.
Thanks in advance for any advice!
Version 11.2.0 Core MVC
The user would add a widget that would display a table of data, and the table could be filtered by groups. The widget would show a table and the user could change a drop down at the top of the widget to choose which group is displayed. The filter would be specific to that instance of the widget.
The user could add multiple widgets, each with a different group as a filter.
Users can customize a widgets' settings on a per widget basis for views on their dashboard(s).
I thought about extending the widget object with a key value pair, so it'd store on in settings under Dashboard / Page / Widgets.
Is this the best way? Or should I create an entirely different entity that holds the serialized widget settings and use that?
Is there a 'best practice' for doing this?
Thanks for any advice, Chris
MVC Core Jquery 11.2
Downloaded fresh project, did yarn / create bundles, used rad tool to create simple entity with a name and a datetime.
The resulting index.js throws a jquery error for .datetimepicker.
The datetimepicker library is not in the default bundles.
Should it be, or is a different library meant to be used?
If it should be, I'll can just add it - but before doing so I wanted to double check just in case.