MCPcopy Create free account
hub / github.com/pgadmin-org/pgadmin4 / getReportHeader

Function getReportHeader

web/pgadmin/llm/static/js/SecurityReport.jsx:269–290  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

267
268 // Build markdown header for the report
269 const getReportHeader = () => {
270 let title, subtitle;
271
272 if (reportType === 'schema') {
273 title = gettext('Schema Security Report') + ': ' + schemaName;
274 subtitle = `${schemaName} ${gettext('in')} ${databaseName} ${gettext('on')} ${serverName}`;
275 } else if (reportType === 'database') {
276 title = gettext('Database Security Report') + ': ' + databaseName;
277 subtitle = `${databaseName} ${gettext('on')} ${serverName}`;
278 } else {
279 title = gettext('Server Security Report') + ': ' + serverName;
280 subtitle = serverName;
281 }
282
283 const date = new Date().toLocaleDateString(undefined, {
284 year: 'numeric',
285 month: 'long',
286 day: 'numeric'
287 });
288
289 return `# ${title}\n\n*${subtitle} • ${date}*\n\n---\n\n`;
290 };
291
292 // Build filename for download based on report type
293 const getDownloadFilename = () => {

Callers 2

handleDownloadFunction · 0.70
SecurityReportFunction · 0.70

Calls 1

gettextFunction · 0.85

Tested by

no test coverage detected