Base solution for your next web application
Ends in:
01 DAYS
01 HRS
01 MIN
01 SEC

Activities of "BobIngham"

@ismcagdas, That's some discussion you must be having. It's nearly six months since this thread promised movement on a fuller feature set of subscriptions! Any update?

Hi @ajayak, I think I see the problem but I can't comment without seeing your code. You shouldn't need the timer at all, I think you're mixing implementations of Zero's background workers and Hangfire when you really only need one or the other. Can you show me the code where you are referring to Timer.Period and I will try advise accordingly.

@ajayak, Hope this helps. This definition will run at midnight, first day of the month.

RecurringJob.AddOrUpdate<InvoiceBackgroundWorker>(job => job.Start(), "0 0 1 * *");

I'm sure it will be fired by server time and not by system time and therefore Timer.Period should be irrelevant. That's why clocks go back and forward at 02:00 and not 01:00!!!! If you have a system which has several timezones then it's another matter altogether, you will need a job to run at the offset between server time and UTC to run each hour and process data for each timezone in the system. Good luck with that if that's what you have to do. I once worked on a global betting system which had to do something similar!

@ismcagdas - thanks for the reply. This ended up a re-install of Windows. I believe that Windows defender was blocking compiles and additions to node_modules folders . I added folder exceptions but I think all files were being locked and checked before being passed. I switched off Defender and the problem was lessened but there was still something not quite right. I decided to go for the nuclear option having lost two days work! Thanks for the interest and the input.

A general question, guys. Is anyone recently having problems with yarn? I have had to resort to npm install --save due to an error reading "there appears to be problems with your network connection" when running yarn, even with a timeout setting of 60000. I have googled it and it seems many other people seem to be having the same problem. The general jabberwockery solution suggested in this link [https://github.com/yarnpkg/yarn/issues/5259#issuecomment-379769451]) didn't work for me and my yarn-error.log reads

Error: https://registry.yarnpkg.com/rxjs/-/rxjs-6.2.2.tgz: ESOCKETTIMEDOUT
      at ClientRequest.<anonymous> (C:\Program Files (x86)\Yarn\lib\cli.js:135306:19)
      at Object.onceWrapper (events.js:313:30)
      at emitNone (events.js:106:13)
      at ClientRequest.emit (events.js:208:7)
      at TLSSocket.emitTimeout (_http_client.js:708:34)
      at Object.onceWrapper (events.js:313:30)
      at emitNone (events.js:106:13)
      at TLSSocket.emit (events.js:208:7)
      at TLSSocket.Socket._onTimeout (net.js:407:8)
      at ontimeout (timers.js:475:11)

This is not a Zero problem but I was wondering if anyone was experiencing similar problems and had found any work arounds?

@ryancyq, DOH! Thanks.

aspnet-core, angular; 5.4.1 I have used Kendo grids for many years in my MVC projects and my users love the functionality of the grids for data analysis. To implement similar functionality using the Zero framework results in far too much code for filtering, grouping (I'm not even sure it's possible), export to Excel, PDF etc. Kendo grids use a DataSourceRequest object to carry out the vase majority of this functionality and to this end I have created a new controller in the [projectname].Web.Host project to implement this functionality:

using Abp.Auditing;
using Kendo.Mvc.Extensions;
using Kendo.Mvc.UI;
using Microsoft.AspNetCore.Mvc;
using Nuagecare.NcEntity;
using Nuagecare.Web.Controllers;
using System.Threading.Tasks;

namespace Nuagecare.Web.Host.Controllers
{
    [Produces("application/json")]
    [ApiExplorerSettings(IgnoreApi = true)]
    [DisableAuditing]
    public class KendoController :  NuagecareControllerBase
    {
        private readonly INcEntityAppService _ncEntityAppService;

        public KendoController(INcEntityAppService ncEntityAppService)
        {
            _ncEntityAppService = ncEntityAppService;
        }

        public async Task<ActionResult> GetEntities([DataSourceRequest]DataSourceRequest request)
        {
            var model = await _ncEntityAppService.GetAllForKendoGrid();
            return Json(model.ToDataSourceResult(request));
        }
    }
}

Next I implement a new service in my angular project:

import { Injectable, Inject, Optional, InjectionToken } from '@angular/core';
import { HttpClient } from '@angular/common/http';
import { toDataSourceRequestString, translateDataSourceResultGroups, translateAggregateResults, DataResult, DataSourceRequestState } from '@progress/kendo-data-query';
import { GridDataResult } from '@progress/kendo-angular-grid';

import { Observable } from 'rxjs';
import 'rxjs/add/operator/map';

export const API_BASE_URL = new InjectionToken<string>('API_BASE_URL');

@Injectable({
  providedIn: 'root'
})
export class KendoGridService {
  private http: HttpClient;
  private baseUrl: string;

  constructor(@Inject(HttpClient) http: HttpClient, @Optional() @Inject(API_BASE_URL) baseUrl?: string) {
    this.http = http;
    this.baseUrl = baseUrl ? baseUrl : '';
  }

  getEntities(state: DataSourceRequestState): Observable<DataResult> {
    let url_ = this.baseUrl + 'kendo/getentities';
    url_ = url_.replace(/[?&]$/, '');

    const queryStr = `${toDataSourceRequestString(state)}`; // Serialize the state
    const hasGroups = state.group && state.group.length;

    return this.http
      .get(`${url_}?${queryStr}`) // Send the state to the server
      .map(({ data, total/*, aggregateResults*/ }: GridDataResult) => // Process the response
        (<GridDataResult>{
          // If there are groups, convert them to a compatible format
          data: hasGroups ? translateDataSourceResultGroups(data) : data,
          total: total,
          // Convert the aggregates if such exist
          //aggregateResult: translateAggregateResults(aggregateResults)
        })
      );
  }
}

All is working well except the injection of the API_BASE_URL (copied from the dynamically created service-proxies.ts) results in an empty value.

How do I properly inject API_BASE_URL to a new service?

Answer

@mmukkara - no, I didn't get portlets working. I simply don't have the time to work out what needs to be done and, having got close, I realised there were far too many changes to core files (package.json, angular.json etc) making future upgrades more difficult. Hopefully the upgrade to 5.5 should help but I'm not holding my breath! Let me know if you manage to get the wizard working because it's definitely something I would like to use.

Answer

Hi @ismcagdas - My request is to upgrade to Metronic 5.5, the full angular version: [https://themeforest.net/item/metronic-responsive-admin-dashboard-template/4021469]) Can you indicate the release this will be targeted for?

@alper. Thanks, problem solved.

Showing 441 to 450 of 619 entries