diff --git a/samples/prometheus/ProjectGroupPrometheus.groupproj b/samples/prometheus/ProjectGroupPrometheus.groupproj
deleted file mode 100644
index bc6fd020e..000000000
--- a/samples/prometheus/ProjectGroupPrometheus.groupproj
+++ /dev/null
@@ -1,48 +0,0 @@
-
-
- {AF04BD45-3137-4757-B1AC-147D4136E52C}
-
-
-
-
-
-
-
-
-
-
- Default.Personality.12
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/samples/prometheus/README.TXT b/samples/prometheus/README.TXT
new file mode 100644
index 000000000..70da958ba
--- /dev/null
+++ b/samples/prometheus/README.TXT
@@ -0,0 +1 @@
+Check https://github.com/marcobreveglieri/dmvc-prometheus-metrics
\ No newline at end of file
diff --git a/samples/prometheus/articles_crud_server_prometheus/Controllers.Articles.pas b/samples/prometheus/articles_crud_server_prometheus/Controllers.Articles.pas
deleted file mode 100644
index ff42dd2ee..000000000
--- a/samples/prometheus/articles_crud_server_prometheus/Controllers.Articles.pas
+++ /dev/null
@@ -1,179 +0,0 @@
-unit Controllers.Articles;
-
-interface
-
-uses
- mvcframework,
- mvcframework.Commons,
- mvcframework.Serializer.Commons,
- System.Generics.Collections,
- Controllers.Base, BusinessObjects;
-
-type
-
- [MVCDoc('Resource that manages articles CRUD')]
- [MVCPath('/articles')]
- TArticlesController = class(TBaseController)
- public
- [MVCDoc('Returns the list of articles')]
- [MVCPath]
- [MVCHTTPMethod([httpGET])]
- procedure GetArticles;
-
- [MVCDoc('Returns the list of articles')]
- [MVCPath('/searches')]
- [MVCHTTPMethod([httpGET])]
- procedure GetArticlesByDescription(const [MVCFromQueryString('q', '')] Search: String);
-
- [MVCDoc('Returns the article with the specified id')]
- [MVCPath('/meta')]
- [MVCHTTPMethod([httpGET])]
- procedure GetArticleMeta;
-
- [MVCDoc('Returns the article with the specified id')]
- [MVCPath('/($id)')]
- [MVCHTTPMethod([httpGET])]
- procedure GetArticleByID(id: Integer);
-
- [MVCDoc('Deletes the article with the specified id')]
- [MVCPath('/($id)')]
- [MVCHTTPMethod([httpDelete])]
- procedure DeleteArticleByID(id: Integer);
-
- [MVCDoc('Updates the article with the specified id and return "200: OK"')]
- [MVCPath('/($id)')]
- [MVCHTTPMethod([httpPUT])]
- procedure UpdateArticleByID(const [MVCFromBody] Article: TArticle; const id: Integer);
-
- [MVCDoc('Creates a new article and returns "201: Created"')]
- [MVCPath]
- [MVCHTTPMethod([httpPOST])]
- procedure CreateArticle(const [MVCFromBody] Article: TArticle);
-
- [MVCDoc('Creates new articles from a list and returns "201: Created"')]
- [MVCPath('/bulk')]
- [MVCHTTPMethod([httpPOST])]
- procedure CreateArticles(const [MVCFromBody] ArticleList: TObjectList);
- end;
-
-implementation
-
-{ TArticlesController }
-
-uses
- Services,
- Commons,
- mvcframework.Serializer.Intf,
- System.SysUtils, MVCFramework.Middleware.Prometheus;
-
-procedure TArticlesController.CreateArticle(const Article: TArticle);
-begin
- GetArticlesService.Add(Article);
- Render201Created('/articles/' + Article.id.ToString, 'Article Created');
- Metrics.IncCounterValue('new_article');
-end;
-
-procedure TArticlesController.CreateArticles(const ArticleList: TObjectList);
-var
- lArticle: TArticle;
-begin
- GetArticlesService.StartTransaction;
- try
- for lArticle in ArticleList do
- begin
- GetArticlesService.Add(lArticle);
- end;
- GetArticlesService.Commit;
- Metrics.IncCounterValue('new_article', ArticleList.Count);
- except
- GetArticlesService.Rollback;
- raise;
- end;
- Render(201, 'Articles Created');
-end;
-
-procedure TArticlesController.DeleteArticleByID(id: Integer);
-var
- Article: TArticle;
-begin
- GetArticlesService.StartTransaction;
- try
- Article := GetArticlesService.GetByID(id);
- try
- GetArticlesService.Delete(Article);
- finally
- Article.Free;
- end;
- GetArticlesService.Commit;
- except
- GetArticlesService.Rollback;
- raise;
- end;
-end;
-
-procedure TArticlesController.GetArticles;
-begin
- Render(ObjectDict().Add('data', GetArticlesService.GetAll));
-end;
-
-procedure TArticlesController.GetArticlesByDescription(const Search: String);
-var
- lDict: IMVCObjectDictionary;
-begin
- try
- if Search = '' then
- begin
- lDict := ObjectDict().Add('data', GetArticlesService.GetAll);
- end
- else
- begin
- lDict := ObjectDict().Add('data', GetArticlesService.GetArticles(Search));
- end;
- Render(lDict);
- Metrics.IncCounterValue('searches');
- except
- on E: EServiceException do
- begin
- raise EMVCException.Create(E.Message, '', 0, 404);
- end
- else
- raise;
- end;
-end;
-
-procedure TArticlesController.UpdateArticleByID(const Article: TArticle; const id: Integer);
-begin
- Article.id := id;
- GetArticlesService.Update(Article);
- Render(200, 'Article Updated');
-end;
-
-procedure TArticlesController.GetArticleByID(id: Integer);
-begin
- try
- Render(ObjectDict().Add('data', GetArticlesService.GetByID(id)));
- except
- on E: EServiceException do
- begin
- raise EMVCException.Create(E.Message, '', 0, 404);
- end
- else
- raise;
- end;
-end;
-
-procedure TArticlesController.GetArticleMeta;
-begin
- try
- Render(ObjectDict().Add('data', GetArticlesService.GetMeta));
- except
- on E: EServiceException do
- begin
- raise EMVCException.Create(E.Message, '', 0, 404);
- end
- else
- raise;
- end;
-end;
-
-end.
diff --git a/samples/prometheus/articles_crud_server_prometheus/Controllers.Base.pas b/samples/prometheus/articles_crud_server_prometheus/Controllers.Base.pas
deleted file mode 100644
index 29b536af9..000000000
--- a/samples/prometheus/articles_crud_server_prometheus/Controllers.Base.pas
+++ /dev/null
@@ -1,64 +0,0 @@
-unit Controllers.Base;
-
-interface
-
-uses
- MVCFramework, MVCFramework.Commons, Services, MainDM;
-
-type
- TBaseController = class abstract(TMVCController)
- strict private
- FDM: TdmMain;
- FArticlesService: TArticlesService;
- function GetDataModule: TdmMain;
- strict protected
- function GetArticlesService: TArticlesService;
- public
- destructor Destroy; override;
-
- end;
-
- [MVCPath('/private')]
- TPrivateController = class(TBaseController)
- public
- [MVCPath('/articles')]
- [MVCHTTPMethods([httpDELETE])]
- procedure DeleteAllArticles;
- end;
-
-implementation
-
-uses
- System.SysUtils;
-
-{ TBaseController }
-
-destructor TBaseController.Destroy;
-begin
- FArticlesService.Free;
- FDM.Free;
- inherited;
-end;
-
-function TBaseController.GetArticlesService: TArticlesService;
-begin
- if not Assigned(FArticlesService) then
- FArticlesService := TArticlesService.Create(GetDataModule);
- Result := FArticlesService;
-end;
-
-function TBaseController.GetDataModule: TdmMain;
-begin
- if not Assigned(FDM) then
- FDM := TdmMain.Create(nil);
- Result := FDM;
-end;
-
-{ TPrivateController }
-
-procedure TPrivateController.DeleteAllArticles;
-begin
- GetArticlesService.DeleteAllArticles();
-end;
-
-end.
diff --git a/samples/prometheus/articles_crud_server_prometheus/MVCFramework.Middleware.Prometheus.pas b/samples/prometheus/articles_crud_server_prometheus/MVCFramework.Middleware.Prometheus.pas
deleted file mode 100644
index 5412b99e5..000000000
--- a/samples/prometheus/articles_crud_server_prometheus/MVCFramework.Middleware.Prometheus.pas
+++ /dev/null
@@ -1,180 +0,0 @@
-unit MVCFramework.Middleware.Prometheus;
-
-interface
-
-uses
- MVCFramework, System.SysUtils;
-
-type
- TMVCPrometheusMiddleware = class(TInterfacedObject, IMVCMiddleware)
- private
- fPrometheusRoute: String;
- fOnBeforeMetricsGet: TProc;
- protected
- procedure OnAfterControllerAction(
- AContext: TWebContext;
- const AControllerQualifiedClassName: string; const AActionName: string;
- const AHandled: Boolean);
- procedure OnBeforeRouting(AContext: TWebContext; var AHandled: Boolean);
- procedure OnBeforeControllerAction(AContext: TWebContext;
- const AControllerQualifiedClassName: string; const AActionNAme: string;
- var AHandled: Boolean);
- procedure OnAfterRouting(AContext: TWebContext; const AHandled: Boolean);
- public
- constructor Create(const PrometheusRoute: String = '/metrics'; const OnBeforeMetricsGet: TProc = nil);
- end;
-
- {Simplified access to the most common Prometheus metrics}
- Metrics = class sealed
- public
- // "Counter" metric
- class procedure IncCounterValue(const MetricName: string; const Amount: Double = 1); overload;
- class procedure IncCounterValue(const MetricName: string; const Amount: Double; const Labels: TArray); overload;
- // "Gauge" metric
- class procedure SetGaugeValue(const MetricName: string; const Amount: Double = 1); overload;
- class procedure SetGaugeValue(const MetricName: string; const Amount: Double; const Labels: TArray); overload;
- class procedure IncGaugeValue(const MetricName: string; const Amount: Double = 1); overload;
- class procedure IncGaugeValue(const MetricName: string; const Amount: Double; const Labels: TArray); overload;
- class procedure DecGaugeValue(const MetricName: string; const Amount: Double = -1); overload;
- class procedure DecGaugeValue(const MetricName: string; const Amount: Double; const Labels: TArray); overload;
- end;
-
-
-implementation
-
-uses
- System.Classes,
- MVCFramework.Commons,
- Prometheus.Registry,
- Prometheus.Collectors.Counter,
- Prometheus.Exposers.Text, Prometheus.Collectors.Gauge;
-
-{ TMVCPrometheusMiddleware }
-
-constructor TMVCPrometheusMiddleware.Create(const PrometheusRoute: String; const OnBeforeMetricsGet: TProc);
-begin
- inherited Create;
- fPrometheusRoute := PrometheusRoute;
- fOnBeforeMetricsGet := OnBeforeMetricsGet;
-end;
-
-procedure TMVCPrometheusMiddleware.OnAfterControllerAction(
- AContext: TWebContext; const AControllerQualifiedClassName,
- AActionName: string; const AHandled: Boolean);
-begin
-
-end;
-
-procedure TMVCPrometheusMiddleware.OnAfterRouting(AContext: TWebContext;
- const AHandled: Boolean);
-begin
- Metrics.IncCounterValue('http_requests_handled', 1,
- [AContext.Request.PathInfo, IntToStr(AContext.Response.StatusCode)]);
-end;
-
-procedure TMVCPrometheusMiddleware.OnBeforeControllerAction(
- AContext: TWebContext; const AControllerQualifiedClassName,
- AActionName: string; var AHandled: Boolean);
-begin
-
-end;
-
-procedure TMVCPrometheusMiddleware.OnBeforeRouting(AContext: TWebContext;
- var AHandled: Boolean);
-begin
- if not SameText(AContext.Request.PathInfo, fPrometheusRoute) then
- begin
- // Get the metric counter and increment it.
- Metrics.IncCounterValue('http_requests_count');
- end
- else
- begin
- if Assigned(fOnBeforeMetricsGet) then
- begin
- fOnBeforeMetricsGet();
- end;
- var lMetricsStream := TMemoryStream.Create;
- AContext.Response.SetContentStream(lMetricsStream, TMVCMediaType.TEXT_PLAIN);
- var LExposer := TTextExposer.Create;
- try
- LExposer.Render(lMetricsStream, TCollectorRegistry.DefaultRegistry.Collect);
- finally
- LExposer.Free;
- end;
- lMetricsStream.Position := 0;
- AHandled := True;
- end;
-end;
-
-{ Metrics }
-
-class procedure Metrics.IncCounterValue(const MetricName: string; const Amount: Double);
-begin
- TCollectorRegistry
- .DefaultRegistry
- .GetCollector(MetricName)
- .Inc(Amount);
-end;
-
-class procedure Metrics.DecGaugeValue(const MetricName: string;
- const Amount: Double; const Labels: TArray);
-begin
- TCollectorRegistry.DefaultRegistry
- .GetCollector(MetricName)
- .Labels(Labels)
- .Dec(Amount);
-end;
-
-class procedure Metrics.DecGaugeValue(const MetricName: string;
- const Amount: Double);
-begin
- TCollectorRegistry.DefaultRegistry
- .GetCollector(MetricName)
- .Dec(Amount);
-end;
-
-class procedure Metrics.IncCounterValue(const MetricName: string; const Amount: Double;
- const Labels: TArray);
-begin
- TCollectorRegistry
- .DefaultRegistry
- .GetCollector(MetricName)
- .Labels(Labels)
- .Inc(Amount);
-end;
-
-class procedure Metrics.IncGaugeValue(const MetricName: string;
- const Amount: Double);
-begin
- TCollectorRegistry.DefaultRegistry
- .GetCollector(MetricName)
- .Inc(Amount);
-end;
-
-class procedure Metrics.IncGaugeValue(const MetricName: string;
- const Amount: Double; const Labels: TArray);
-begin
- TCollectorRegistry.DefaultRegistry
- .GetCollector(MetricName)
- .Labels(Labels)
- .Inc(Amount);
-end;
-
-class procedure Metrics.SetGaugeValue(const MetricName: string;
- const Amount: Double; const Labels: TArray);
-begin
- TCollectorRegistry.DefaultRegistry
- .GetCollector(MetricName)
- .Labels(Labels)
- .SetTo(Amount);
-end;
-
-class procedure Metrics.SetGaugeValue(const MetricName: string;
- const Amount: Double);
-begin
- TCollectorRegistry.DefaultRegistry
- .GetCollector(MetricName)
- .SetTo(Amount);
-end;
-
-end.
diff --git a/samples/prometheus/articles_crud_server_prometheus/UtilsU.pas b/samples/prometheus/articles_crud_server_prometheus/UtilsU.pas
deleted file mode 100644
index bf307ee7d..000000000
--- a/samples/prometheus/articles_crud_server_prometheus/UtilsU.pas
+++ /dev/null
@@ -1,34 +0,0 @@
-unit UtilsU;
-
-interface
-
-function GetMemoryUsed: UInt64;
-
-implementation
-
-uses
- System.SysUtils;
-
-function GetMemoryUsed: UInt64;
-{$IF Defined(MSWINDOWS)}
-{$WARN SYMBOL_PLATFORM OFF}
-var
- st: TMemoryManagerState;
- sb: TSmallBlockTypeState;
-begin
- GetMemoryManagerState(st);
- result := st.TotalAllocatedMediumBlockSize
- + st.TotalAllocatedLargeBlockSize;
- for sb in st.SmallBlockTypeStates do
- begin
- Result := Result + sb.UseableBlockSize * sb.AllocatedBlockCount;
- end;
-end;
-{$WARN SYMBOL_PLATFORM ON}
-{$ELSE}
-begin
- raise Exception.Create('GetMemoryUsed is not supported on current platform');
-end;
-{$ENDIF}
-
-end.
diff --git a/samples/prometheus/articles_crud_server_prometheus/WebModuleUnit1.dfm b/samples/prometheus/articles_crud_server_prometheus/WebModuleUnit1.dfm
deleted file mode 100644
index 2c58d387f..000000000
--- a/samples/prometheus/articles_crud_server_prometheus/WebModuleUnit1.dfm
+++ /dev/null
@@ -1,11 +0,0 @@
-object WebModule1: TWebModule1
- OnCreate = WebModuleCreate
- Actions = <
- item
- Default = True
- Name = 'DefaultHandler'
- PathInfo = '/'
- end>
- Height = 230
- Width = 415
-end
diff --git a/samples/prometheus/articles_crud_server_prometheus/WebModuleUnit1.pas b/samples/prometheus/articles_crud_server_prometheus/WebModuleUnit1.pas
deleted file mode 100644
index 778008657..000000000
--- a/samples/prometheus/articles_crud_server_prometheus/WebModuleUnit1.pas
+++ /dev/null
@@ -1,51 +0,0 @@
-unit WebModuleUnit1;
-
-interface
-
-uses System.SysUtils, System.Classes, Web.HTTPApp, mvcframework;
-
-type
- TWebModule1 = class(TWebModule)
- procedure WebModuleCreate(Sender: TObject);
- private
- FEngine: TMVCEngine;
- public
- { Public declarations }
- end;
-
-var
- WebModuleClass: TComponentClass = TWebModule1;
-
-implementation
-
-{ %CLASSGROUP 'Vcl.Controls.TControl' }
-
-uses Controllers.Articles, mvcframework.Middleware.CORS, mvcframework.Middleware.Compression,
- Controllers.Base, MVCFramework.Commons, MVCFramework.Middleware.Prometheus,
- UtilsU;
-
-{$R *.dfm}
-
-procedure TWebModule1.WebModuleCreate(Sender: TObject);
-begin
- FEngine := TMVCEngine.Create(self,
- procedure(Config: TMVCConfig)
- begin
- //Enabling the following line, the API will start to respond from "/api/v1"
- //So "/articles/1" becomes "/api/v1/articles/1"
- //Config[TMVCConfigKey.PathPrefix] := '/api/v1';
- end);
- FEngine.AddController(TArticlesController);
-{$IFDEF TESTINSTANCE}
- FEngine.AddController(TPrivateController);
-{$ENDIF}
- FEngine.AddMiddleware(TMVCPrometheusMiddleware.Create('/metrics',
- procedure
- begin
- Metrics.SetGaugeValue('memory_allocated_total', GetMemoryUsed);
- end));
- FEngine.AddMiddleware(TCORSMiddleware.Create);
- FEngine.AddMiddleware(TMVCCompressionMiddleware.Create(256));
-end;
-
-end.
diff --git a/samples/prometheus/articles_crud_server_prometheus/articles_crud_service_with_prometheus.dpr b/samples/prometheus/articles_crud_server_prometheus/articles_crud_service_with_prometheus.dpr
deleted file mode 100644
index 66b975072..000000000
--- a/samples/prometheus/articles_crud_server_prometheus/articles_crud_service_with_prometheus.dpr
+++ /dev/null
@@ -1,92 +0,0 @@
-program articles_crud_service_with_prometheus;
-
-{$APPTYPE CONSOLE}
-
-
-
-{----------------------------------------------------------------}
-{- THIS SAMPLE REQUIRES -----------------------------------------}
-{- https://github.com/marcobreveglieri/prometheus-client-delphi -}
-{----------------------------------------------------------------}
-
-uses
- Prometheus.Registry,
- Prometheus.Collectors.Counter,
- Prometheus.Collectors.Gauge,
- MVCFramework.Signal,
- System.SysUtils,
- IdHTTPWebBrokerBridge,
- Web.WebReq,
- Web.WebBroker,
- WebModuleUnit1 in 'WebModuleUnit1.pas' {WebModule1: TWebModule},
- Controllers.Base in 'Controllers.Base.pas',
- Controllers.Articles in 'Controllers.Articles.pas',
- BusinessObjects in '..\..\articles_crud_server\BusinessObjects.pas',
- Commons in '..\..\articles_crud_server\Commons.pas',
- MainDM in '..\..\articles_crud_server\MainDM.pas',
- Services in '..\..\articles_crud_server\Services.pas',
- MVCFramework.Middleware.Prometheus in 'MVCFramework.Middleware.Prometheus.pas',
- UtilsU in 'UtilsU.pas';
-
-{$R *.res}
-
-
-procedure RunServer(APort: Integer);
-var
- LServer: TIdHTTPWebBrokerBridge;
-begin
- WriteLn('ARTICLES CRUD Sample. Use articles_crud_vcl_client.dproj to manage data');
- WriteLn(Format('Starting HTTP Server on port %d', [APort]));
- LServer := TIdHTTPWebBrokerBridge.Create(nil);
- try
- LServer.DefaultPort := APort;
- LServer.Active := True;
- WriteLn('CTRL+C to stop the server');
- WaitForTerminationSignal;
- ReadLn;
- finally
- LServer.Free;
- end;
-end;
-
-
-procedure ConfigurePrometheusMetrics;
-var
- lGauge: TGauge;
-begin
- // Configure some sample metrics... add metrics as you wish
- TCounter
- .Create('http_requests_count', 'Received HTTP request count')
- .Register();
-
- TCounter
- .Create('new_article', 'Articles Created')
- .Register();
-
- TCounter
- .Create('searches', 'Searches Count')
- .Register();
-
- TCounter
- .Create('http_requests_handled', 'HTTP handled request count',
- ['path', 'status'])
- .Register();
-
- lGauge := TGauge.Create('memory_allocated_total', 'Total memory allocated by the process');
- lGauge.SetTo(GetMemoryUsed);
- lGauge.Register();
-end;
-
-begin
- ReportMemoryLeaksOnShutdown := True;
- try
- if WebRequestHandler <> nil then
- WebRequestHandler.WebModuleClass := WebModuleClass;
- ConfigurePrometheusMetrics;
- RunServer(8080);
- except
- on E: Exception do
- WriteLn(E.ClassName, ': ', E.Message);
- end
-
-end.
diff --git a/samples/prometheus/articles_crud_server_prometheus/articles_crud_service_with_prometheus.dproj b/samples/prometheus/articles_crud_server_prometheus/articles_crud_service_with_prometheus.dproj
deleted file mode 100644
index 47d899792..000000000
--- a/samples/prometheus/articles_crud_server_prometheus/articles_crud_service_with_prometheus.dproj
+++ /dev/null
@@ -1,877 +0,0 @@
-
-
- {1576AA4D-0623-40AC-97D3-AA4BB4381A0A}
- 19.5
- VCL
- articles_crud_service_with_prometheus.dpr
- True
- Debug
- Win32
- 1
- Console
-
-
- true
-
-
- true
- Base
- true
-
-
- true
- Base
- true
-
-
- true
- Base
- true
-
-
- true
- Cfg_1
- true
- true
-
-
- true
- Base
- true
-
-
- ..\..\lib\loggerpro;..\..\lib\delphistompclient;..\..\lib\dmustache;..\..\..\delphiredisclient\sources;$(DCC_UnitSearchPath)
- $(BDS)\bin\delphi_PROJECTICNS.icns
- CompanyName=;FileDescription=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=;ProductVersion=1.0.0.0;Comments=
- articles_crud_service_with_prometheus
- 1040
- $(BDS)\bin\delphi_PROJECTICON.ico
- None
- System;Xml;Data;Datasnap;Web;Soap;Vcl;Vcl.Imaging;Vcl.Touch;Vcl.Samples;Vcl.Shell;$(DCC_Namespace)
- error
- .\$(Platform)\$(Config)
- .\$(Platform)\$(Config)
- false
- false
- false
- false
- false
-
-
- ..\..\lib\iocpdelphiframework\Base;..\..\lib\luadelphibinding;$(DCC_UnitSearchPath)
- ..\bin
- 1033
- FireDACSqliteDriver;FireDACDSDriver;DBXSqliteDriver;SampleListViewMultiDetailAppearancePackage;FireDACPgDriver;fmx;IndySystem;TeeDB;tethering;ITDevCon2012AdapterPackage;inetdbbde;vclib;DBXInterBaseDriver;DataSnapClient;DataSnapServer;DataSnapCommon;DataSnapProviderClient;DBXSybaseASEDriver;DbxCommonDriver;vclimg;dbxcds;DatasnapConnectorsFreePascal;MetropolisUILiveTile;vcldb;vcldsnap;fmxFireDAC;DBXDb2Driver;DBXOracleDriver;CustomIPTransport;vclribbon;dsnap;IndyIPServer;fmxase;vcl;IndyCore;DBXMSSQLDriver;IndyIPCommon;CloudService;FmxTeeUI;FireDACIBDriver;CodeSiteExpressPkg;DataSnapFireDAC;FireDACDBXDriver;soapserver;inetdbxpress;dsnapxml;FireDACInfxDriver;FireDACDb2Driver;adortl;CustomAdaptersMDPackage;FireDACASADriver;bindcompfmx;vcldbx;FireDACODBCDriver;RESTBackendComponents;rtl;dbrtl;DbxClientDriver;FireDACCommon;bindcomp;inetdb;SampleListViewRatingsAppearancePackage;Tee;DBXOdbcDriver;vclFireDAC;xmlrtl;DataSnapNativeClient;svnui;ibxpress;IndyProtocols;DBXMySQLDriver;FireDACCommonDriver;bindcompdbx;bindengine;vclactnband;soaprtl;FMXTee;TeeUI;bindcompvcl;vclie;FireDACADSDriver;vcltouch;VclSmp;FireDACMSSQLDriver;FireDAC;DBXInformixDriver;Intraweb;VCLRESTComponents;DataSnapConnectors;DataSnapServerMidas;dsnapcon;DBXFirebirdDriver;SampleGenerator1Package;inet;fmxobj;FireDACMySQLDriver;soapmidas;vclx;svn;DBXSybaseASADriver;FireDACOracleDriver;fmxdae;RESTComponents;bdertl;FireDACMSAccDriver;dbexpress;DataSnapIndy10ServerTransport;IndyIPClient;$(DCC_UsePackage)
- Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;Bde;$(DCC_Namespace)
- none
-
-
- FireDACSqliteDriver;FireDACDSDriver;DBXSqliteDriver;FireDACPgDriver;fmx;IndySystem;TeeDB;tethering;vclib;DBXInterBaseDriver;DataSnapClient;DataSnapServer;DataSnapCommon;DataSnapProviderClient;DBXSybaseASEDriver;DbxCommonDriver;vclimg;dbxcds;DatasnapConnectorsFreePascal;MetropolisUILiveTile;vcldb;vcldsnap;fmxFireDAC;DBXDb2Driver;DBXOracleDriver;CustomIPTransport;vclribbon;dsnap;IndyIPServer;fmxase;vcl;IndyCore;DBXMSSQLDriver;IndyIPCommon;CloudService;FmxTeeUI;FireDACIBDriver;DataSnapFireDAC;FireDACDBXDriver;soapserver;inetdbxpress;dsnapxml;FireDACInfxDriver;FireDACDb2Driver;adortl;FireDACASADriver;bindcompfmx;FireDACODBCDriver;RESTBackendComponents;rtl;dbrtl;DbxClientDriver;FireDACCommon;bindcomp;inetdb;Tee;DBXOdbcDriver;vclFireDAC;xmlrtl;DataSnapNativeClient;ibxpress;IndyProtocols;DBXMySQLDriver;FireDACCommonDriver;bindcompdbx;bindengine;vclactnband;soaprtl;FMXTee;TeeUI;bindcompvcl;vclie;FireDACADSDriver;vcltouch;VclSmp;FireDACMSSQLDriver;FireDAC;DBXInformixDriver;Intraweb;VCLRESTComponents;DataSnapConnectors;DataSnapServerMidas;dsnapcon;DBXFirebirdDriver;inet;fmxobj;FireDACMySQLDriver;soapmidas;vclx;DBXSybaseASADriver;FireDACOracleDriver;fmxdae;RESTComponents;FireDACMSAccDriver;dbexpress;DataSnapIndy10ServerTransport;IndyIPClient;$(DCC_UsePackage)
-
-
- DEBUG;TESTINSTANCE;$(DCC_Define)
- true
- false
- true
- true
- true
-
-
- 1033
- false
- none
-
-
- false
- RELEASE;$(DCC_Define)
- 0
- 0
-
-
-
- MainSource
-
-
-
- TWebModule
-
-
-
-
-
-
-
-
-
-
- Base
-
-
- Cfg_1
- Base
-
-
- Cfg_2
- Base
-
-
-
- Delphi.Personality.12
-
-
-
-
-
- Embarcadero C++Builder Office 2000 Servers Package
- Embarcadero C++Builder Office XP Servers Package
- Microsoft Office 2000 Sample Automation Server Wrapper Components
- Microsoft Office XP Sample Automation Server Wrapper Components
-
-
-
-
-
- articles_crud_service_with_prometheus.exe
- true
-
-
-
-
-
- 1
-
-
- 0
-
-
-
-
- classes
- 64
-
-
- classes
- 64
-
-
-
-
- res\xml
- 1
-
-
- res\xml
- 1
-
-
-
-
- library\lib\armeabi-v7a
- 1
-
-
-
-
- library\lib\armeabi
- 1
-
-
- library\lib\armeabi
- 1
-
-
-
-
- library\lib\armeabi-v7a
- 1
-
-
-
-
- library\lib\mips
- 1
-
-
- library\lib\mips
- 1
-
-
-
-
- library\lib\armeabi-v7a
- 1
-
-
- library\lib\arm64-v8a
- 1
-
-
-
-
- library\lib\armeabi-v7a
- 1
-
-
-
-
- res\drawable
- 1
-
-
- res\drawable
- 1
-
-
-
-
- res\values
- 1
-
-
- res\values
- 1
-
-
-
-
- res\values-v21
- 1
-
-
- res\values-v21
- 1
-
-
-
-
- res\values
- 1
-
-
- res\values
- 1
-
-
-
-
- res\drawable
- 1
-
-
- res\drawable
- 1
-
-
-
-
- res\drawable-xxhdpi
- 1
-
-
- res\drawable-xxhdpi
- 1
-
-
-
-
- res\drawable-xxxhdpi
- 1
-
-
- res\drawable-xxxhdpi
- 1
-
-
-
-
- res\drawable-ldpi
- 1
-
-
- res\drawable-ldpi
- 1
-
-
-
-
- res\drawable-mdpi
- 1
-
-
- res\drawable-mdpi
- 1
-
-
-
-
- res\drawable-hdpi
- 1
-
-
- res\drawable-hdpi
- 1
-
-
-
-
- res\drawable-xhdpi
- 1
-
-
- res\drawable-xhdpi
- 1
-
-
-
-
- res\drawable-mdpi
- 1
-
-
- res\drawable-mdpi
- 1
-
-
-
-
- res\drawable-hdpi
- 1
-
-
- res\drawable-hdpi
- 1
-
-
-
-
- res\drawable-xhdpi
- 1
-
-
- res\drawable-xhdpi
- 1
-
-
-
-
- res\drawable-xxhdpi
- 1
-
-
- res\drawable-xxhdpi
- 1
-
-
-
-
- res\drawable-xxxhdpi
- 1
-
-
- res\drawable-xxxhdpi
- 1
-
-
-
-
- res\drawable-small
- 1
-
-
- res\drawable-small
- 1
-
-
-
-
- res\drawable-normal
- 1
-
-
- res\drawable-normal
- 1
-
-
-
-
- res\drawable-large
- 1
-
-
- res\drawable-large
- 1
-
-
-
-
- res\drawable-xlarge
- 1
-
-
- res\drawable-xlarge
- 1
-
-
-
-
- res\values
- 1
-
-
- res\values
- 1
-
-
-
-
- 1
-
-
- 1
-
-
- 0
-
-
-
-
- 1
- .framework
-
-
- 1
- .framework
-
-
- 1
- .framework
-
-
- 0
-
-
-
-
- 1
- .dylib
-
-
- 1
- .dylib
-
-
- 1
- .dylib
-
-
- 0
- .dll;.bpl
-
-
-
-
- 1
- .dylib
-
-
- 1
- .dylib
-
-
- 1
- .dylib
-
-
- 1
- .dylib
-
-
- 1
- .dylib
-
-
- 1
- .dylib
-
-
- 0
- .bpl
-
-
-
-
- 0
-
-
- 0
-
-
- 0
-
-
- 0
-
-
- 0
-
-
- 0
-
-
- 0
-
-
- 0
-
-
- 0
-
-
-
-
- 1
-
-
- 1
-
-
-
-
-
-
-
- Contents\Resources
- 1
-
-
- Contents\Resources
- 1
-
-
- Contents\Resources
- 1
-
-
-
-
- library\lib\armeabi-v7a
- 1
-
-
- library\lib\arm64-v8a
- 1
-
-
- 1
-
-
- 1
-
-
- 1
-
-
- 1
-
-
- 1
-
-
- 1
-
-
- 1
-
-
- 0
-
-
-
-
- library\lib\armeabi-v7a
- 1
-
-
-
-
- 1
-
-
- 1
-
-
-
-
- ..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF
- 1
-
-
- ..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF
- 1
-
-
- ..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF
- 1
-
-
-
-
-
-
-
- 1
-
-
- 1
-
-
- 1
-
-
-
-
- Assets
- 1
-
-
- Assets
- 1
-
-
-
-
- Assets
- 1
-
-
- Assets
- 1
-
-
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
- 1
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
- 1
-
-
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
- 1
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
- 1
-
-
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
- 1
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
- 1
-
-
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset
- 1
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset
- 1
-
-
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset
- 1
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset
- 1
-
-
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
- 1
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
- 1
-
-
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
- 1
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
- 1
-
-
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
- 1
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
- 1
-
-
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
- 1
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
- 1
-
-
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
- 1
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
- 1
-
-
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset
- 1
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset
- 1
-
-
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset
- 1
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset
- 1
-
-
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset
- 1
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset
- 1
-
-
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset
- 1
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset
- 1
-
-
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
- 1
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
- 1
-
-
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
- 1
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
- 1
-
-
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
- 1
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
- 1
-
-
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
- 1
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
- 1
-
-
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
- 1
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
- 1
-
-
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
- 1
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
- 1
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- True
- False
-
- False
-
- 12
-
-
-
-
-
diff --git a/samples/prometheus/articles_crud_server_prometheus/bin/article_crud_dmvcframework.yml b/samples/prometheus/articles_crud_server_prometheus/bin/article_crud_dmvcframework.yml
deleted file mode 100644
index 3f9428bcc..000000000
--- a/samples/prometheus/articles_crud_server_prometheus/bin/article_crud_dmvcframework.yml
+++ /dev/null
@@ -1,29 +0,0 @@
-# my global config
-global:
- scrape_interval: 15s # Set the scrape interval to every 15 seconds. Default is every 1 minute.
- evaluation_interval: 15s # Evaluate rules every 15 seconds. The default is every 1 minute.
- # scrape_timeout is set to the global default (10s).
-
-# Alertmanager configuration
-alerting:
- alertmanagers:
- - static_configs:
- - targets:
- # - alertmanager:9093
-
-# Load rules once and periodically evaluate them according to the global 'evaluation_interval'.
-rule_files:
- # - "first_rules.yml"
- # - "second_rules.yml"
-
-# A scrape configuration containing exactly one endpoint to scrape:
-# Here it's Prometheus itself.
-scrape_configs:
- # The job name is added as a label `job=` to any timeseries scraped from this config.
- - job_name: "article_crud_dmvcframework"
-
- # metrics_path defaults to '/metrics'
- # scheme defaults to 'http'.
-
- static_configs:
- - targets: ["localhost:8080"]
diff --git a/samples/prometheus/articles_crud_server_prometheus/bin/run_prometheus.bat b/samples/prometheus/articles_crud_server_prometheus/bin/run_prometheus.bat
deleted file mode 100644
index caa36ede3..000000000
--- a/samples/prometheus/articles_crud_server_prometheus/bin/run_prometheus.bat
+++ /dev/null
@@ -1,2 +0,0 @@
-start C:\Tools\prometheus-2.37.6.windows-amd64\prometheus-2.37.6.windows-amd64\prometheus.exe --config.file .\article_crud_dmvcframework.yml
-start "" "chrome.exe" -kiosk "http://localhost:9090/"
\ No newline at end of file
diff --git a/samples/prometheus/articles_crud_vcl_client/MainFormU.dfm b/samples/prometheus/articles_crud_vcl_client/MainFormU.dfm
deleted file mode 100644
index 303fad557..000000000
--- a/samples/prometheus/articles_crud_vcl_client/MainFormU.dfm
+++ /dev/null
@@ -1,197 +0,0 @@
-object MainForm: TMainForm
- Left = 0
- Top = 0
- Caption = 'Articles CRUD SAMPLE'
- ClientHeight = 391
- ClientWidth = 876
- Color = clBtnFace
- Font.Charset = DEFAULT_CHARSET
- Font.Color = clWindowText
- Font.Height = -11
- Font.Name = 'Tahoma'
- Font.Style = []
- OnCreate = FormCreate
- TextHeight = 13
- object Panel1: TPanel
- Left = 0
- Top = 0
- Width = 876
- Height = 112
- Align = alTop
- TabOrder = 0
- ExplicitWidth = 872
- object DBNavigator1: TDBNavigator
- AlignWithMargins = True
- Left = 585
- Top = 4
- Width = 287
- Height = 40
- DataSource = dsrcArticles
- Align = alRight
- TabOrder = 3
- ExplicitLeft = 581
- end
- object btnOpen: TButton
- AlignWithMargins = True
- Left = 4
- Top = 4
- Width = 75
- Height = 40
- Align = alLeft
- Caption = 'Open'
- TabOrder = 0
- OnClick = btnOpenClick
- end
- object btnRefreshRecord: TButton
- AlignWithMargins = True
- Left = 166
- Top = 4
- Width = 107
- Height = 40
- Align = alLeft
- Caption = 'Refresh Record'
- TabOrder = 2
- OnClick = btnRefreshRecordClick
- end
- object Button1: TButton
- AlignWithMargins = True
- Left = 85
- Top = 4
- Width = 75
- Height = 40
- Align = alLeft
- Caption = 'Close'
- TabOrder = 1
- OnClick = btnCloseClick
- end
- object Panel2: TPanel
- Left = 1
- Top = 47
- Width = 874
- Height = 64
- Align = alBottom
- BevelOuter = bvNone
- TabOrder = 4
- ExplicitWidth = 870
- object Label1: TLabel
- Left = 3
- Top = 11
- Width = 24
- Height = 13
- Caption = 'Filter'
- end
- object EditFilter: TEdit
- Left = 3
- Top = 30
- Width = 156
- Height = 21
- TabOrder = 1
- end
- object btnFilter: TButton
- Left = 165
- Top = 19
- Width = 107
- Height = 40
- Caption = 'Filter by description'
- TabOrder = 0
- OnClick = btnFilterClick
- end
- end
- end
- object DBGrid1: TDBGrid
- Left = 0
- Top = 112
- Width = 876
- Height = 279
- Align = alClient
- DataSource = dsrcArticles
- TabOrder = 1
- TitleFont.Charset = DEFAULT_CHARSET
- TitleFont.Color = clWindowText
- TitleFont.Height = -11
- TitleFont.Name = 'Tahoma'
- TitleFont.Style = []
- Columns = <
- item
- Expanded = False
- FieldName = 'id'
- Title.Caption = '#ID'
- Visible = True
- end
- item
- Expanded = False
- FieldName = 'code'
- Title.Caption = 'Code'
- Visible = True
- end
- item
- Expanded = False
- FieldName = 'description'
- Title.Caption = 'Description'
- Width = 265
- Visible = True
- end
- item
- Expanded = False
- FieldName = 'price'
- Title.Caption = 'Price'
- Visible = True
- end
- item
- Expanded = False
- FieldName = 'createdat'
- ReadOnly = True
- Visible = True
- end
- item
- Expanded = False
- FieldName = 'updatedat'
- ReadOnly = True
- Visible = True
- end>
- end
- object dsArticles: TFDMemTable
- AfterOpen = dsArticlesAfterOpen
- BeforePost = dsArticlesBeforePost
- BeforeDelete = dsArticlesBeforeDelete
- BeforeRefresh = dsArticlesBeforeRefresh
- FieldDefs = <>
- IndexDefs = <>
- BeforeRowRequest = dsArticlesBeforeRowRequest
- FetchOptions.AssignedValues = [evMode]
- FetchOptions.Mode = fmAll
- ResourceOptions.AssignedValues = [rvSilentMode]
- ResourceOptions.SilentMode = True
- UpdateOptions.AssignedValues = [uvCheckRequired]
- UpdateOptions.CheckRequired = False
- StoreDefs = True
- Left = 136
- Top = 120
- object dsArticlesid: TIntegerField
- FieldName = 'id'
- end
- object dsArticlescode: TStringField
- FieldName = 'code'
- end
- object dsArticlesdescription: TStringField
- FieldName = 'description'
- Size = 50
- end
- object dsArticlesprice: TCurrencyField
- FieldName = 'price'
- end
- object dsArticlescreatedat: TDateTimeField
- AutoGenerateValue = arDefault
- FieldName = 'createdat'
- end
- object dsArticlesupdatedat: TDateTimeField
- AutoGenerateValue = arDefault
- FieldName = 'updatedat'
- end
- end
- object dsrcArticles: TDataSource
- DataSet = dsArticles
- Left = 136
- Top = 184
- end
-end
diff --git a/samples/prometheus/articles_crud_vcl_client/MainFormU.pas b/samples/prometheus/articles_crud_vcl_client/MainFormU.pas
deleted file mode 100644
index 9ad321d5b..000000000
--- a/samples/prometheus/articles_crud_vcl_client/MainFormU.pas
+++ /dev/null
@@ -1,206 +0,0 @@
-unit MainFormU;
-
-interface
-
-uses
- Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
- Vcl.Controls, Vcl.Forms, Vcl.Dialogs, FireDAC.Stan.Intf, FireDAC.Stan.Option,
- FireDAC.Stan.Param, FireDAC.Stan.Error, FireDAC.DatS, FireDAC.Phys.Intf,
- FireDAC.DApt.Intf, Data.DB, FireDAC.Comp.DataSet, FireDAC.Comp.Client,
- Vcl.Grids, Vcl.DBGrids, Vcl.ExtCtrls, Vcl.StdCtrls, MVCFramework.RESTClient.Intf, MVCFramework.RESTClient,
- Vcl.DBCtrls;
-
-type
- TMainForm = class(TForm)
- Panel1: TPanel;
- DBGrid1: TDBGrid;
- dsArticles: TFDMemTable;
- dsArticlesid: TIntegerField;
- dsArticlescode: TStringField;
- dsArticlesdescription: TStringField;
- dsArticlesprice: TCurrencyField;
- dsrcArticles: TDataSource;
- DBNavigator1: TDBNavigator;
- btnOpen: TButton;
- btnRefreshRecord: TButton;
- Button1: TButton;
- Panel2: TPanel;
- EditFilter: TEdit;
- Label1: TLabel;
- btnFilter: TButton;
- dsArticlescreatedat: TDateTimeField;
- dsArticlesupdatedat: TDateTimeField;
- procedure FormCreate(Sender: TObject);
- procedure dsArticlesBeforePost(DataSet: TDataSet);
- procedure dsArticlesBeforeDelete(DataSet: TDataSet);
- procedure FormClose(Sender: TObject; var Action: TCloseAction);
- procedure dsArticlesBeforeRefresh(DataSet: TDataSet);
- procedure dsArticlesAfterOpen(DataSet: TDataSet);
- procedure btnOpenClick(Sender: TObject);
- procedure btnCloseClick(Sender: TObject);
- procedure dsArticlesBeforeRowRequest(DataSet: TFDDataSet);
- procedure btnRefreshRecordClick(Sender: TObject);
- procedure btnFilterClick(Sender: TObject);
- private
- fFilter: string;
- fLoading: Boolean;
- fRESTClient: IMVCRESTClient;
- { Private declarations }
- procedure ShowError(const AResponse: IMVCRESTResponse);
- procedure SetFilter(const Value: string);
- public
- property Filter: string read fFilter write SetFilter;
- end;
-
-var
- MainForm: TMainForm;
-
-implementation
-
-uses
- System.UITypes, MVCFramework.DataSet.Utils;
-
-{$R *.dfm}
-
-
-procedure TMainForm.btnCloseClick(Sender: TObject);
-begin
- dsArticles.Close;
-end;
-
-procedure TMainForm.btnFilterClick(Sender: TObject);
-begin
- dsArticles.Close;
- Filter := EditFilter.Text;
- dsArticles.Open;
-end;
-
-procedure TMainForm.btnOpenClick(Sender: TObject);
-begin
- dsArticles.Close;
- Filter := '';
- dsArticles.Open;
-end;
-
-procedure TMainForm.btnRefreshRecordClick(Sender: TObject);
-begin
- dsArticles.RefreshRecord;
-end;
-
-procedure TMainForm.dsArticlesAfterOpen(DataSet: TDataSet);
-var
- Res: IMVCRESTResponse;
-begin
- if fFilter.IsEmpty then
- begin
- // this a simple sychronous request...
- Res := fRESTClient.Get('/articles');
- end
- else
- begin
- Res := fRESTClient
- .AddQueryStringParam('q', fFilter)
- .Get('/articles/searches');
- end;
-
- if not Res.Success then
- begin
- ShowError(Res);
- Exit;
- end;
-
- DataSet.DisableControls;
- try
- fLoading := true;
- dsArticles.LoadJSONArrayFromJSONObjectProperty('data', Res.Content);
- fLoading := false;
- dsArticles.First;
- finally
- DataSet.EnableControls;
- end;
-end;
-
-procedure TMainForm.dsArticlesBeforeDelete(DataSet: TDataSet);
-var
- Res: IMVCRESTResponse;
-begin
- if dsArticles.State = dsBrowse then
- Res := fRESTClient.DataSetDelete('/articles', dsArticlesid.AsString);
- if not(Res.StatusCode in [200]) then
- begin
- ShowError(Res);
- Abort;
- end;
-end;
-
-procedure TMainForm.dsArticlesBeforePost(DataSet: TDataSet);
-var
- Res: IMVCRESTResponse;
-begin
- if not fLoading then
- begin
- if dsArticles.State = dsInsert then
- Res := fRESTClient.DataSetInsert('/articles', dsArticles)
- else
- Res := fRESTClient.DataSetUpdate('/articles', dsArticlesid.AsString, dsArticles);
- if not(Res.StatusCode in [200, 201]) then
- begin
- ShowError(Res);
- Abort;
- end
- else
- begin
- DataSet.Refresh;
- end;
- end;
-end;
-
-procedure TMainForm.dsArticlesBeforeRefresh(DataSet: TDataSet);
-begin
- DataSet.Close;
- DataSet.Open;
-end;
-
-procedure TMainForm.dsArticlesBeforeRowRequest(DataSet: TFDDataSet);
-var
- Res: IMVCRESTResponse;
-begin
- Res := fRESTClient
- .AddPathParam('param1', DataSet.FieldByName('id').AsString)
- .Get('/articles/{param1}');
- fLoading := true;
- DataSet.LoadJSONObjectFromJSONObjectProperty('data', Res.Content);
- fLoading := false;
-end;
-
-procedure TMainForm.FormClose(Sender: TObject; var Action: TCloseAction);
-begin
- fRESTClient := nil;
-end;
-
-procedure TMainForm.FormCreate(Sender: TObject);
-begin
- fRESTClient := TMVCRESTClient.New.BaseURL('localhost', 8080);
-end;
-
-procedure TMainForm.SetFilter(const Value: string);
-begin
- fFilter := Value;
- EditFilter.Text := Value;
-end;
-
-procedure TMainForm.ShowError(const AResponse: IMVCRESTResponse);
-begin
- if not AResponse.Success then
- MessageDlg(
- AResponse.StatusCode.ToString + ': ' + AResponse.StatusText + sLineBreak +
- '[' + AResponse.Content + ']',
- mtError, [mbOK], 0)
- else
- MessageDlg(
- AResponse.StatusCode.ToString + ': ' + AResponse.StatusText + sLineBreak +
- AResponse.Content,
- mtError, [mbOK], 0);
-end;
-
-end.
diff --git a/samples/prometheus/articles_crud_vcl_client/articles_crud_vcl_client.dpr b/samples/prometheus/articles_crud_vcl_client/articles_crud_vcl_client.dpr
deleted file mode 100644
index 99bc6b9f0..000000000
--- a/samples/prometheus/articles_crud_vcl_client/articles_crud_vcl_client.dpr
+++ /dev/null
@@ -1,15 +0,0 @@
-program articles_crud_vcl_client;
-
-uses
- Vcl.Forms,
- MainFormU in 'MainFormU.pas' {MainForm},
- MVCFramework.Serializer.Defaults in '..\..\sources\MVCFramework.Serializer.Defaults.pas';
-
-{$R *.res}
-
-begin
- Application.Initialize;
- Application.MainFormOnTaskbar := True;
- Application.CreateForm(TMainForm, MainForm);
- Application.Run;
-end.
diff --git a/samples/prometheus/articles_crud_vcl_client/articles_crud_vcl_client.dproj b/samples/prometheus/articles_crud_vcl_client/articles_crud_vcl_client.dproj
deleted file mode 100644
index e0a5e86b6..000000000
--- a/samples/prometheus/articles_crud_vcl_client/articles_crud_vcl_client.dproj
+++ /dev/null
@@ -1,966 +0,0 @@
-
-
- {C3AD62C8-92C8-4742-A585-69B14E177684}
- 19.5
- VCL
- articles_crud_vcl_client.dpr
- True
- Debug
- Win32
- 1
- Application
-
-
- true
-
-
- true
- Base
- true
-
-
- true
- Base
- true
-
-
- true
- Base
- true
-
-
- true
- Cfg_1
- true
- true
-
-
- true
- Base
- true
-
-
- 1040
- CompanyName=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductVersion=1.0.0.0;Comments=;ProgramID=com.embarcadero.$(MSBuildProjectName);FileDescription=$(MSBuildProjectName);ProductName=$(MSBuildProjectName)
- ..\..\lib\loggerpro;..\..\lib\delphistompclient;..\..\lib\dmustache;..\..\..\delphiredisclient\sources;$(DCC_UnitSearchPath)
- articles_crud_vcl_client
- $(BDS)\bin\delphi_PROJECTICON.ico
- System;Xml;Data;Datasnap;Web;Soap;Vcl;Vcl.Imaging;Vcl.Touch;Vcl.Samples;Vcl.Shell;$(DCC_Namespace)
- .\$(Platform)\$(Config)
- .\$(Platform)\$(Config)
- false
- false
- false
- false
- false
-
-
- $(BDS)\bin\Artwork\Windows\UWP\delphi_UwpDefault_44.png
- $(BDS)\bin\Artwork\Windows\UWP\delphi_UwpDefault_150.png
- true
- Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;Bde;$(DCC_Namespace)
- $(BDS)\bin\default_app.manifest
- 1033
- FireDACSqliteDriver;FireDACDSDriver;DBXSqliteDriver;SampleListViewMultiDetailAppearancePackage;FireDACPgDriver;fmx;IndySystem;TeeDB;tethering;ITDevCon2012AdapterPackage;inetdbbde;vclib;DBXInterBaseDriver;DataSnapClient;DataSnapServer;DataSnapCommon;DataSnapProviderClient;DBXSybaseASEDriver;DbxCommonDriver;vclimg;dbxcds;DatasnapConnectorsFreePascal;MetropolisUILiveTile;vcldb;vcldsnap;fmxFireDAC;DBXDb2Driver;DBXOracleDriver;CustomIPTransport;vclribbon;dsnap;IndyIPServer;fmxase;vcl;IndyCore;DBXMSSQLDriver;IndyIPCommon;CloudService;FmxTeeUI;FireDACIBDriver;CodeSiteExpressPkg;DataSnapFireDAC;FireDACDBXDriver;soapserver;inetdbxpress;dsnapxml;FireDACInfxDriver;FireDACDb2Driver;adortl;CustomAdaptersMDPackage;FireDACASADriver;bindcompfmx;vcldbx;FireDACODBCDriver;RESTBackendComponents;rtl;dbrtl;DbxClientDriver;FireDACCommon;bindcomp;inetdb;SampleListViewRatingsAppearancePackage;Tee;DBXOdbcDriver;vclFireDAC;xmlrtl;DataSnapNativeClient;svnui;ibxpress;IndyProtocols;DBXMySQLDriver;FireDACCommonDriver;bindcompdbx;bindengine;vclactnband;soaprtl;FMXTee;TeeUI;bindcompvcl;vclie;FireDACADSDriver;vcltouch;VclSmp;FireDACMSSQLDriver;FireDAC;DBXInformixDriver;Intraweb;VCLRESTComponents;DataSnapConnectors;DataSnapServerMidas;dsnapcon;DBXFirebirdDriver;SampleGenerator1Package;inet;fmxobj;FireDACMySQLDriver;soapmidas;vclx;svn;DBXSybaseASADriver;FireDACOracleDriver;fmxdae;RESTComponents;bdertl;FireDACMSAccDriver;dbexpress;DataSnapIndy10ServerTransport;IndyIPClient;$(DCC_UsePackage)
- none
- ..\bin
-
-
- $(BDS)\bin\Artwork\Windows\UWP\delphi_UwpDefault_150.png
- $(BDS)\bin\Artwork\Windows\UWP\delphi_UwpDefault_44.png
- FireDACSqliteDriver;FireDACDSDriver;DBXSqliteDriver;FireDACPgDriver;fmx;IndySystem;TeeDB;tethering;vclib;DBXInterBaseDriver;DataSnapClient;DataSnapServer;DataSnapCommon;DataSnapProviderClient;DBXSybaseASEDriver;DbxCommonDriver;vclimg;dbxcds;DatasnapConnectorsFreePascal;MetropolisUILiveTile;vcldb;vcldsnap;fmxFireDAC;DBXDb2Driver;DBXOracleDriver;CustomIPTransport;vclribbon;dsnap;IndyIPServer;fmxase;vcl;IndyCore;DBXMSSQLDriver;IndyIPCommon;CloudService;FmxTeeUI;FireDACIBDriver;DataSnapFireDAC;FireDACDBXDriver;soapserver;inetdbxpress;dsnapxml;FireDACInfxDriver;FireDACDb2Driver;adortl;FireDACASADriver;bindcompfmx;FireDACODBCDriver;RESTBackendComponents;rtl;dbrtl;DbxClientDriver;FireDACCommon;bindcomp;inetdb;Tee;DBXOdbcDriver;vclFireDAC;xmlrtl;DataSnapNativeClient;ibxpress;IndyProtocols;DBXMySQLDriver;FireDACCommonDriver;bindcompdbx;bindengine;vclactnband;soaprtl;FMXTee;TeeUI;bindcompvcl;vclie;FireDACADSDriver;vcltouch;VclSmp;FireDACMSSQLDriver;FireDAC;DBXInformixDriver;Intraweb;VCLRESTComponents;DataSnapConnectors;DataSnapServerMidas;dsnapcon;DBXFirebirdDriver;inet;fmxobj;FireDACMySQLDriver;soapmidas;vclx;DBXSybaseASADriver;FireDACOracleDriver;fmxdae;RESTComponents;FireDACMSAccDriver;dbexpress;DataSnapIndy10ServerTransport;IndyIPClient;$(DCC_UsePackage)
-
-
- DEBUG;$(DCC_Define)
- true
- false
- true
- true
- true
-
-
- 1033
- true
- none
- Debug
- false
-
-
- false
- RELEASE;$(DCC_Define)
- 0
- 0
-
-
-
- MainSource
-
-
-
- dfm
-
-
-
- Base
-
-
- Cfg_1
- Base
-
-
- Cfg_2
- Base
-
-
-
- Delphi.Personality.12
-
-
-
-
- articles_crud_vcl_client.dpr
-
-
- Embarcadero C++Builder Office 2000 Servers Package
- Embarcadero C++Builder Office XP Servers Package
- Microsoft Office 2000 Sample Automation Server Wrapper Components
- Microsoft Office XP Sample Automation Server Wrapper Components
-
-
-
-
-
-
- 1
-
-
- Contents\MacOS
- 1
-
-
- 0
-
-
-
-
- classes
- 64
-
-
- classes
- 64
-
-
-
-
- res\xml
- 1
-
-
- res\xml
- 1
-
-
-
-
- library\lib\armeabi-v7a
- 1
-
-
-
-
- library\lib\armeabi
- 1
-
-
- library\lib\armeabi
- 1
-
-
-
-
- library\lib\armeabi-v7a
- 1
-
-
-
-
- library\lib\mips
- 1
-
-
- library\lib\mips
- 1
-
-
-
-
- library\lib\armeabi-v7a
- 1
-
-
- library\lib\arm64-v8a
- 1
-
-
-
-
- library\lib\armeabi-v7a
- 1
-
-
-
-
- res\drawable
- 1
-
-
- res\drawable
- 1
-
-
-
-
- res\values
- 1
-
-
- res\values
- 1
-
-
-
-
- res\values-v21
- 1
-
-
- res\values-v21
- 1
-
-
-
-
- res\values
- 1
-
-
- res\values
- 1
-
-
-
-
- res\drawable
- 1
-
-
- res\drawable
- 1
-
-
-
-
- res\drawable-xxhdpi
- 1
-
-
- res\drawable-xxhdpi
- 1
-
-
-
-
- res\drawable-xxxhdpi
- 1
-
-
- res\drawable-xxxhdpi
- 1
-
-
-
-
- res\drawable-ldpi
- 1
-
-
- res\drawable-ldpi
- 1
-
-
-
-
- res\drawable-mdpi
- 1
-
-
- res\drawable-mdpi
- 1
-
-
-
-
- res\drawable-hdpi
- 1
-
-
- res\drawable-hdpi
- 1
-
-
-
-
- res\drawable-xhdpi
- 1
-
-
- res\drawable-xhdpi
- 1
-
-
-
-
- res\drawable-mdpi
- 1
-
-
- res\drawable-mdpi
- 1
-
-
-
-
- res\drawable-hdpi
- 1
-
-
- res\drawable-hdpi
- 1
-
-
-
-
- res\drawable-xhdpi
- 1
-
-
- res\drawable-xhdpi
- 1
-
-
-
-
- res\drawable-xxhdpi
- 1
-
-
- res\drawable-xxhdpi
- 1
-
-
-
-
- res\drawable-xxxhdpi
- 1
-
-
- res\drawable-xxxhdpi
- 1
-
-
-
-
- res\drawable-small
- 1
-
-
- res\drawable-small
- 1
-
-
-
-
- res\drawable-normal
- 1
-
-
- res\drawable-normal
- 1
-
-
-
-
- res\drawable-large
- 1
-
-
- res\drawable-large
- 1
-
-
-
-
- res\drawable-xlarge
- 1
-
-
- res\drawable-xlarge
- 1
-
-
-
-
- res\values
- 1
-
-
- res\values
- 1
-
-
-
-
- 1
-
-
- Contents\MacOS
- 1
-
-
- 0
-
-
-
-
- Contents\MacOS
- 1
- .framework
-
-
- Contents\MacOS
- 1
- .framework
-
-
- Contents\MacOS
- 1
- .framework
-
-
- 0
-
-
-
-
- 1
- .dylib
-
-
- 1
- .dylib
-
-
- 1
- .dylib
-
-
- Contents\MacOS
- 1
- .dylib
-
-
- Contents\MacOS
- 1
- .dylib
-
-
- Contents\MacOS
- 1
- .dylib
-
-
- 0
- .dll;.bpl
-
-
-
-
- 1
- .dylib
-
-
- 1
- .dylib
-
-
- 1
- .dylib
-
-
- Contents\MacOS
- 1
- .dylib
-
-
- Contents\MacOS
- 1
- .dylib
-
-
- Contents\MacOS
- 1
- .dylib
-
-
- 0
- .bpl
-
-
-
-
- 0
-
-
- 0
-
-
- 0
-
-
- 0
-
-
- 0
-
-
- Contents\Resources\StartUp\
- 0
-
-
- Contents\Resources\StartUp\
- 0
-
-
- Contents\Resources\StartUp\
- 0
-
-
- 0
-
-
-
-
- 1
-
-
- 1
-
-
-
-
- ..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF
- 1
-
-
- ..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF
- 1
-
-
-
-
- ..\
- 1
-
-
- ..\
- 1
-
-
- ..\
- 1
-
-
-
-
- Contents
- 1
-
-
- Contents
- 1
-
-
- Contents
- 1
-
-
-
-
- Contents\Resources
- 1
-
-
- Contents\Resources
- 1
-
-
- Contents\Resources
- 1
-
-
-
-
- library\lib\armeabi-v7a
- 1
-
-
- library\lib\arm64-v8a
- 1
-
-
- 1
-
-
- 1
-
-
- 1
-
-
- 1
-
-
- Contents\MacOS
- 1
-
-
- Contents\MacOS
- 1
-
-
- Contents\MacOS
- 1
-
-
- 0
-
-
-
-
- library\lib\armeabi-v7a
- 1
-
-
-
-
- 1
-
-
- 1
-
-
-
-
- ..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF
- 1
-
-
- ..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF
- 1
-
-
- ..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF
- 1
-
-
-
-
- ..\
- 1
-
-
- ..\
- 1
-
-
- ..\
- 1
-
-
-
-
- 1
-
-
- 1
-
-
- 1
-
-
-
-
- ..\$(PROJECTNAME).launchscreen
- 64
-
-
- ..\$(PROJECTNAME).launchscreen
- 64
-
-
-
-
- 1
-
-
- 1
-
-
- 1
-
-
-
-
- Assets
- 1
-
-
- Assets
- 1
-
-
-
-
- Assets
- 1
-
-
- Assets
- 1
-
-
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
- 1
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
- 1
-
-
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
- 1
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
- 1
-
-
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
- 1
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
- 1
-
-
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset
- 1
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset
- 1
-
-
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset
- 1
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset
- 1
-
-
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
- 1
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
- 1
-
-
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
- 1
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
- 1
-
-
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
- 1
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
- 1
-
-
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
- 1
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
- 1
-
-
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
- 1
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
- 1
-
-
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset
- 1
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset
- 1
-
-
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset
- 1
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset
- 1
-
-
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset
- 1
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset
- 1
-
-
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset
- 1
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset
- 1
-
-
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
- 1
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
- 1
-
-
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
- 1
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
- 1
-
-
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
- 1
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
- 1
-
-
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
- 1
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
- 1
-
-
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
- 1
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
- 1
-
-
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
- 1
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
- 1
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- True
- False
-
-
- 12
-
-
-
-
-