Jump to content

Hayri ASLAN

Moderators
  • Posts

    1577
  • Joined

  • Last visited

  • Days Won

    134

Posts posted by Hayri ASLAN

  1. 20 hours ago, andyhill said:

    When we add a Vector to the UniMap we have the option of VectorType (polygon/circle etc.), LineColor, LineWeight etc. BUT I cannot see LineType.

    I would like to use DASHED and DOTTED options. Does it have something to do with Options.dashArray ? I tried Options.dashArray:= '4 1' but no change (also '4, 1').

    Please show in code how to create a DASHED Line Vector polygon - Thanks in advance.

    Please try dashArray option

    Options.dashArray := '20 20';

    image.thumb.png.d4802e132e5a5927ac2f579ade9954e6.png

  2. 4 hours ago, AMIT said:

    I have laptop with 4K display (3840 x 1200) with Windows 11 Pro and Display scale setting to 225%.   I also have Rad Studio 11.2 which was configured the user interface to High DPI scale 215%.    I try to create simple web application and I found problem. 

    1. When placing the uniLabel, uniEdit all displaying fonts are too small and not usable.    

    2. To make it look good, I set the font size to be bigger and also the height and width of those components.

    3. When run the application the result on the browser is weird and ugly.   please see the attached files. 

       Is uniGUI capable to develop web application on 4K Monitor with the correct scaling?

     

    1.png

    2.png

    3.png

    Hello

    Please check the below help file

    http://www.unigui.com/doc/online_help/delphi-11-and-high-dpi-mode.htm

  3. On 1/10/2023 at 8:50 PM, newsanti said:
    procedure TMainForm.UniFormCreate(Sender: TObject);
    begin  
      UniSession.AddJS('Ext.util.CSS.createStyleSheet(".x-grid-group-title {font-size: 12px;}")');
    end;

    How to remove css for memory management?

     

     

    UniSession.AddJS('Ext.util.CSS.createStyleSheet(".x-grid-group-title {font-size: 12px;}", "customId")');
    
    UniSession.AddJS('Ext.util.CSS.removeStyleSheet("customId")');

     

    • Like 1
  4. 8 hours ago, erich.wanker said:

    Hi .. 🙂

    what is wrong with this code (embeeded  in UniHTMLFrame) -> servermodule -options - soControlNameAsID = true

    .. i cant find the problem 😉 

    <script>
    var theInput = document.getElementById("kb_selected_color");
    var theColor = theInput.value;

    theInput.addEventListener("input", to_delphi, false);

    function to_delphi()
    {
    ajaxRequest(f_color.form,''Farbe'' , [''param0='+theInput.value+''']);                     <-----------------HERE is the problem
    }


    </script>

    Hello

    Try to create ajaxRequest like the below code

    theInput = document.getElementById("O14_id-inputEl");
    ajaxRequest(UniLoginForm1.form, "Farbe", {param0: theInput.value })

     

    • Thanks 1
  5. 6 hours ago, fabiotj said:

    Hayri, will this change later be incorporated into the unigui source or is it something I'll need to do every time? It's not a complaint, but just to know and already leave a note for when you change the version of UniGui.

    Hello,

    Yes we will work on this and we will add all required headers in the one of the next build

    • Like 2
  6. And you can also add custom headers like the below code:

     

    procedure TUniServerModule.UniGUIServerModuleHTTPCommand(
      ARequestInfo: TIdHTTPRequestInfo; AResponseInfo: TIdHTTPResponseInfo;
      var Handled: Boolean);
    begin
      AResponseInfo.CustomHeaders.AddValue('X-Content-Type-Options', 'nosniff');
      AResponseInfo.CustomHeaders.AddValue('X-Frame-Options', 'SAMEORIGIN');
      AResponseInfo.CustomHeaders.AddValue('X-XSS-Protection', '1; mode=block');
    end;

     

    • Like 1
  7. 24 minutes ago, fabiotj said:

    I decided to open this post because for the first time I am making an application that will need a higher level of security, and after reading the post http://forums.unigui.com/index.php?/topic/16334-can-we-apply -some-protection-against-different-attacks/#comment-89591 I found it necessary to research a little more on the topic.

    I found a tool that does basic testing for free and I submitted my site and would like other more experienced users or even the support team to comment or give security tips. The tool used was: https://pentest-tools.com/website-vulnerability-scanning/website-scanner 

    Attached report of the results. If you have tips on other tools, I would also appreciate it. At some point I plan to take up a paid subscription to have access to a full scanner.

     

     

    PentestTools-WebsiteScanner-report - public.pdf 301.14 kB · 6 downloads

    Hello,

     

    For the first 2 issue, you can change the code in your end.

    Open UniGUIApplication.pas and change Line 1946 to

        if (not FServerMonitor) and (TUGS(FUniServerInstance).ServerLimits.SessionRestrict in [srOnePerPC]) then
        begin
          FUniGUIApplication.Cookies.SetCookie(UniSessionIDCookie,  //ACookieName
                                               SessionID,           //AValue
                                               0,                   //AExpires
                                               SSL,                 //ASecure
                                               True                 //AHTTPOnly
                                               );
        end;

     

  8. 10 minutes ago, delagoutte said:

    @Hayri ASLAN ithink i found the solution in the property :

    i use this :

    if aObject.ClassName = 'TJSMenuItem' then
              begin
                OurComponent:= TJSMenuItem(aObject).AttachedMenuItem;
              end
              else
              begin
                OurComponent:= TExtObject(aObject).AttachedComponent;
                if OurComponent is TUniMenuControl then
                  OurComponent:= TUniMenuControl(OurComponent).AttachedComponent;
              end;

     

    can you try this

              OurComponent:= TExtObject(aObject).AttachedComponent;
    
              if TExtObject(aObject) is TJSMenuItem then
              begin
                OurComponent:= TJSMenuItem(TExtObject(aObject)).AttachedMenuItem;
              end;

     

    • Thanks 1
  9. 17 hours ago, Franco Grech said:

    Hello @Wicket
    I know this function, it's ok.
    My problem is that, I want to see this forwarded IP in HyperServer console as well. Now I see only the proxy IP.

    With the next build, if you have forwarded ip, it will show it.

    • Like 1
    • Thanks 1
  10. On 11/28/2022 at 3:07 PM, JohanC said:

    Hello,
    I use FMSoft_uniGUI_HyperServer_1.90.0.1560 (licensed) with SSL
    I have configured hyperserver (hyper_server.cfg) as per your instructions and also the hyper_server.ssl.cfg file 
    My reports, are as per your examples using FastReport VCL 6
    I create the report and then to view it in UniPDFFrame1.PdfURL := AUrl; I use this code to create the frxPDFExport1.FileName
    frReportModule.frxPDFExport1.FileName := UniServerModule.NewCacheFileUrl(False, 'pdf', FileNsurname, '', AUrl, True);
    My domain "https://new.sadfm.co.za" is pointed at the IP of my server 
    I get this error message when I run reports on my server using hyperserver (but not when I use the standalone version "binary_name=sadfm.exe" on my server)
    Message: Missing PDF "https://new.sadfm.co.za/cache/sadfm_exe/n0/0_w8LPJEcDME10B8D85DE/$z$z$z/CORNELIUS-%20Beta%20Scale%20Report.pdf".
    This seems to tell me that the pdf viewer is trying to display the file at the location created by NewCacheFileUrl as "https://new.sadfm.co.za/cache/"
    This location on the server obviously does not exist
    This does not happen when I test on my local development PC,
    On my development pc I do not use hyperserver, I could never get it working, maybe because of ESET antivirus
    My production standalone app runs on my server, Microsoft Server 2019, absolutely a standard setup, no ESET
    I do not know what else to configure and need help to configure HyperServer correctly
    When I use hyperserver, everything else works except the reports
    Thank you

    Hello

    Are you using ISAPI HyperServer?

    Also when you get this error, can you please check the related folder whether you have a pdf there or not

  11. 1 hour ago, andyhill said:

    I have tried the following but it fails

      MessageDlg('Choose', mtConfirmation, [mbOK, mbYes, mbNo, mbCancel], MyCallback);
      UniSession.AddJS('Ext.select("#ext-messagebox .x-button .x-text-el").elements[0].innerHTML="A"');
      UniSession.AddJS('Ext.select("#ext-messagebox .x-button .x-text-el").elements[1].innerHTML="B"');
      UniSession.AddJS('Ext.select("#ext-messagebox .x-button .x-text-el").elements[2].innerHTML="C"');
      UniSession.AddJS('Ext.select("#ext-messagebox .x-button .x-text-el").elements[3].innerHTML="D"');
     

    Please advise - thanks

    Hello

    Please try this

    
      MessageDlg('Dialog1', mtWarning, [mbOK, mbYes, mbNo, mbCancel], DCallBack1);
      UniSession.AddJS('Ext.select("#messagebox-1001 .x-btn").elements[0].querySelectorAll(''[data-ref="btnInnerEl"]'')[0].innerHTML="A"');
      UniSession.AddJS('Ext.select("#messagebox-1001 .x-btn").elements[1].querySelectorAll(''[data-ref="btnInnerEl"]'')[0].innerHTML="B"');
      UniSession.AddJS('Ext.select("#messagebox-1001 .x-btn").elements[2].querySelectorAll(''[data-ref="btnInnerEl"]'')[0].innerHTML="C"');
      UniSession.AddJS('Ext.select("#messagebox-1001 .x-btn").elements[3].querySelectorAll(''[data-ref="btnInnerEl"]'')[0].innerHTML="D"');

     

  12. 6 hours ago, pro_imaj said:

    @Hayri ASLAN When I translate the field type as text, it gets fixed, but when the field type is date on the mssql side, the following error occurs.

    Which user are you using for hyperservice? 

    Can you make sure you are using a user with correct regional settings?

    image.png.5ddbcec1073155710fc1f6d2e6ba020c.png

    Please make sure you applied your regional settings to Welcome Screen and System Accounts.

    image.png.a87ed807db2180083b2cd09f92f57798.pngimage.png.60d64d29e90271dbe19b88c749cd45e2.png

×
×
  • Create New...