From 23ec7834b3432e4f50275da24f2f0f2e1904a94e Mon Sep 17 00:00:00 2001 From: hanif salafi Date: Sun, 21 Dec 2025 23:30:19 +0700 Subject: [PATCH 1/5] feat: add license page for admin --- .../settings/license/component/table.tsx | 255 ++++++++++++++++++ .../admin/settings/license/page.tsx | 13 + lib/license/licenseKey_2025.xml | 59 ++++ lib/menus.ts | 7 + messages/en.json | 1 + messages/in.json | 1 + 6 files changed, 336 insertions(+) create mode 100644 app/[locale]/(protected)/admin/settings/license/component/table.tsx create mode 100644 app/[locale]/(protected)/admin/settings/license/page.tsx create mode 100644 lib/license/licenseKey_2025.xml diff --git a/app/[locale]/(protected)/admin/settings/license/component/table.tsx b/app/[locale]/(protected)/admin/settings/license/component/table.tsx new file mode 100644 index 00000000..6eb621cf --- /dev/null +++ b/app/[locale]/(protected)/admin/settings/license/component/table.tsx @@ -0,0 +1,255 @@ +"use client"; + +import * as React from "react"; +import { + ColumnDef, + flexRender, + getCoreRowModel, + useReactTable, +} from "@tanstack/react-table"; + +import { + Table, + TableBody, + TableCell, + TableHead, + TableHeader, + TableRow, +} from "@/components/ui/table"; +import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card"; +import { useTranslations } from "next-intl"; +import { Icon } from "@iconify/react"; + +interface LicenseComponent { + id: string; + serialNumber: string; + licensor: string; + product: string; + customer: string; + capacity: string; +} + +const LicenseTable = () => { + const t = useTranslations("Menu"); + const [licenseData, setLicenseData] = React.useState([]); + + React.useEffect(() => { + // Static license data from XML file + const licenseComponents: LicenseComponent[] = [ + { + id: "1", + serialNumber: "IDC-ML-134360021025", + licensor: "SmartFace Tech Private Limited", + product: "Intelligent Digital Content", + customer: "HUMAS POLRI Indonesia", + capacity: "Unlimited" + }, + { + id: "2", + serialNumber: "ANV-ML-90370021025", + licensor: "SmartFace Tech Private Limited", + product: "Analytics and Visualization", + customer: "HUMAS POLRI Indonesia", + capacity: "Unlimited" + }, + { + id: "3", + serialNumber: "CORA-L1.1-134400021025", + licensor: "SmartFace Tech Private Limited", + product: "Content Curation", + customer: "HUMAS POLRI Indonesia", + capacity: "Unlimited" + }, + { + id: "4", + serialNumber: "TEMA-ML-134500021025", + licensor: "SmartFace Tech Private Limited", + product: "Content Management", + customer: "HUMAS POLRI Indonesia", + capacity: "Unlimited" + }, + { + id: "5", + serialNumber: "ERI-L1.1-134900021025", + licensor: "SmartFace Tech Private Limited", + product: "Emergency Issue", + customer: "HUMAS POLRI Indonesia", + capacity: "Unlimited" + }, + { + id: "6", + serialNumber: "FEC-L1.1-134800021025", + licensor: "SmartFace Tech Private Limited", + product: "Feedback Center", + customer: "HUMAS POLRI Indonesia", + capacity: "Unlimited" + }, + { + id: "7", + serialNumber: "OPTIC-L.1.1-134600021025", + licensor: "SmartFace Tech Private Limited", + product: "Optimization Content", + customer: "HUMAS POLRI Indonesia", + capacity: "Unlimited" + }, + { + id: "8", + serialNumber: "PREC-L1.1-134700021025", + licensor: "SmartFace Tech Private Limited", + product: "Press Conference", + customer: "HUMAS POLRI Indonesia", + capacity: "Unlimited" + } + ]; + + setLicenseData(licenseComponents); + }, []); + + const columns: ColumnDef[] = [ + { + accessorKey: "id", + header: "No", + cell: ({ row }) => ( +
{row.getValue("id")}
+ ), + }, + { + accessorKey: "product", + header: "Product", + cell: ({ row }) => ( +
{row.getValue("product")}
+ ), + }, + { + accessorKey: "serialNumber", + header: "Serial Number", + cell: ({ row }) => ( +
{row.getValue("serialNumber")}
+ ), + }, + { + accessorKey: "licensor", + header: "Licensor", + cell: ({ row }) =>
{row.getValue("licensor")}
, + }, + { + accessorKey: "customer", + header: "Customer", + cell: ({ row }) =>
{row.getValue("customer")}
, + }, + { + accessorKey: "capacity", + header: "Capacity", + cell: ({ row }) => ( +
+ + {row.getValue("capacity")} + +
+ ), + }, + ]; + + const table = useReactTable({ + data: licenseData, + columns, + getCoreRowModel: getCoreRowModel(), + }); + + return ( + + +
+
+ + {t("license")} Information +
+
+

+ License details for SmartFace Tech products - Valid start from 2025 +

+
+ +
+ + + {table.getHeaderGroups().map((headerGroup) => ( + + {headerGroup.headers.map((header) => ( + + {header.isPlaceholder + ? null + : flexRender( + header.column.columnDef.header, + header.getContext() + )} + + ))} + + ))} + + + {table.getRowModel().rows?.length ? ( + table.getRowModel().rows.map((row) => ( + + {row.getVisibleCells().map((cell) => ( + + {flexRender( + cell.column.columnDef.cell, + cell.getContext() + )} + + ))} + + )) + ) : ( + + + No license data available. + + + )} + +
+
+ + {licenseData.length > 0 && ( +
+
+
+ +
+

Customer

+

{licenseData[0]?.customer}

+
+
+
+ +
+

Licensor

+

{licenseData[0]?.licensor}

+
+
+
+ +
+

Total Components

+

{licenseData.length} Products Licensed

+
+
+
+
+ )} +
+
+ ); +}; + +export default LicenseTable; + diff --git a/app/[locale]/(protected)/admin/settings/license/page.tsx b/app/[locale]/(protected)/admin/settings/license/page.tsx new file mode 100644 index 00000000..41df58f4 --- /dev/null +++ b/app/[locale]/(protected)/admin/settings/license/page.tsx @@ -0,0 +1,13 @@ +"use client"; +import SiteBreadcrumb from "@/components/site-breadcrumb"; +import LicenseTable from "./component/table"; + +export default function LicensePage() { + return ( + <> + + + + ); +} + diff --git a/lib/license/licenseKey_2025.xml b/lib/license/licenseKey_2025.xml new file mode 100644 index 00000000..f9a75d62 --- /dev/null +++ b/lib/license/licenseKey_2025.xml @@ -0,0 +1,59 @@ + + + +IDC-ML-134360021025 +SmartFace Tech Private Limited +Intelligent Digital Content +HUMAS POLRI Indonesia +Unlimited + + +ANV-ML-90370021025 +SmartFace Tech Private Limited +Analytics and Visualization +HUMAS POLRI Indonesia +Unlimited + + +CORA-L1.1-134400021025 +SmartFace Tech Private Limited +Content Curation +HUMAS POLRI Indonesia +Unlimited + + +TEMA-ML-134500021025 +SmartFace Tech Private Limited +Content Management +HUMAS POLRI Indonesia +Unlimited + + +ERI-L1.1-134900021025 +SmartFace Tech Private Limited +Emergency Issue +HUMAS POLRI Indonesia +Unlimited + + +FEC-L1.1-134800021025 +SmartFace Tech Private Limited +Feedback Center +HUMAS POLRI Indonesia +Unlimited + + +OPTIC-L.1.1-134600021025 +SmartFace Tech Private Limited +Optimization Content +HUMAS POLRI Indonesia +Unlimited + + +PREC-L1.1-134700021025 +SmartFace Tech Private Limited +Press Conference +HUMAS POLRI Indonesia +Unlimited + + diff --git a/lib/menus.ts b/lib/menus.ts index 99dccd27..3e6edb5c 100644 --- a/lib/menus.ts +++ b/lib/menus.ts @@ -3888,6 +3888,13 @@ export function getMenuList(pathname: string, t: any): Group[] { icon: "heroicons:arrow-trending-up", children: [], }, + { + href: "/admin/settings/license", + label: t("license"), + active: pathname === "/admin/settings/license", + icon: "heroicons:key", + children: [], + }, // { // href: "/admin/settings/tag", // label: "Tag", diff --git a/messages/en.json b/messages/en.json index d5536714..ba2490b0 100644 --- a/messages/en.json +++ b/messages/en.json @@ -178,6 +178,7 @@ "collaboration": "Collaboration", "account-report": "Account Report", "settings": "Settings", + "license": "License", "feedback": "Feedback", "survey": "Survey", "content-production": "Content Production", diff --git a/messages/in.json b/messages/in.json index ec7a6481..0fbbf685 100644 --- a/messages/in.json +++ b/messages/in.json @@ -179,6 +179,7 @@ "collaboration": "Kolaborasi", "account-report": "Pelaporan Akun", "settings": "Pengaturan", + "license": "Lisensi", "feedback": "Feedback", "survey": "Survey", "content-production": "Produksi Konten", From 06ca0a0e0d9333ef76354dd7ea694968f0950dd2 Mon Sep 17 00:00:00 2001 From: hanif salafi Date: Tue, 23 Dec 2025 02:30:19 +0000 Subject: [PATCH 2/5] Edit .gitlab-ci.yml --- .gitlab-ci.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 9050b4dd..038334bc 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -13,14 +13,14 @@ build-prod: name: docker:25.0.3-cli services: - name: docker:25.0.3-dind - command: ["--insecure-registry=103.82.242.92:8900"] + command: ["--insecure-registry=103.31.38.120:8900"] script: - docker logout - echo "Username:$DEPLOY_USERNAME" - echo "Token:$DEPLOY_TOKEN" - - echo "$DEPLOY_TOKEN" | docker login 103.82.242.92:8900 --username "$DEPLOY_USERNAME" --password-stdin - - docker build --no-cache -t 103.82.242.92:8900/mediahub/new-mediahub-fe:prod . - - docker push 103.82.242.92:8900/mediahub/new-mediahub-fe:prod + - echo "$DEPLOY_TOKEN" | docker login 103.31.38.120:8900 --username "$DEPLOY_USERNAME" --password-stdin + - docker build --no-cache -t 103.31.38.120:8900/mediahub/new-mediahub-fe:prod . + - docker push 103.31.38.120:8900/mediahub/new-mediahub-fe:prod auto-deploy: stage: deploy From 10905dd2087d1017b68561421ade77742385b2f1 Mon Sep 17 00:00:00 2001 From: hanif salafi Date: Wed, 24 Dec 2025 06:51:34 +0700 Subject: [PATCH 3/5] fix : change url banner --- service/landing/landing.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/service/landing/landing.ts b/service/landing/landing.ts index 7ed87e8e..4a956752 100644 --- a/service/landing/landing.ts +++ b/service/landing/landing.ts @@ -47,7 +47,7 @@ export async function listStaticBanner( group: any = "", isInt: Boolean = false ) { - const url = `media/public/banner?group=${group}&isInt=${isInt}`; + const url = `media/banner/public?group=${group}&isInt=${isInt}`; return httpGetInterceptor(url); } From 2f8923fbfb8302978b8ee7453e10b98d07b112ca Mon Sep 17 00:00:00 2001 From: hanif salafi Date: Fri, 26 Dec 2025 09:35:04 +0700 Subject: [PATCH 4/5] feat: update metadata --- app/[locale]/(public)/video/detail/[slug]/page.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/[locale]/(public)/video/detail/[slug]/page.tsx b/app/[locale]/(public)/video/detail/[slug]/page.tsx index 787308e3..261b6d02 100644 --- a/app/[locale]/(public)/video/detail/[slug]/page.tsx +++ b/app/[locale]/(public)/video/detail/[slug]/page.tsx @@ -47,7 +47,7 @@ export async function generateMetadata({ params }: any): Promise { type: "video.other", images: [ { - url: video?.thumbnailLink, + url: video?.thumbnailLink + "&isSmall=true", width: 1280, height: 720, alt: video?.title || "Thumbnail Mediahub Polri", From 3b3ec846f454aed89a153526986bf5d1cfbc92eb Mon Sep 17 00:00:00 2001 From: hanif salafi Date: Fri, 26 Dec 2025 10:05:52 +0700 Subject: [PATCH 5/5] feat: change docker repo --- .gitlab-ci.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 038334bc..2dbd3bf1 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -13,14 +13,14 @@ build-prod: name: docker:25.0.3-cli services: - name: docker:25.0.3-dind - command: ["--insecure-registry=103.31.38.120:8900"] + command: ["--insecure-registry=38.47.185.86:8900"] script: - docker logout - echo "Username:$DEPLOY_USERNAME" - echo "Token:$DEPLOY_TOKEN" - - echo "$DEPLOY_TOKEN" | docker login 103.31.38.120:8900 --username "$DEPLOY_USERNAME" --password-stdin - - docker build --no-cache -t 103.31.38.120:8900/mediahub/new-mediahub-fe:prod . - - docker push 103.31.38.120:8900/mediahub/new-mediahub-fe:prod + - echo "$DEPLOY_TOKEN" | docker login 38.47.185.86:8900 --username "$DEPLOY_USERNAME" --password-stdin + - docker build --no-cache -t 38.47.185.86:8900/mediahub/new-mediahub-fe:prod . + - docker push 38.47.185.86:8900/mediahub/new-mediahub-fe:prod auto-deploy: stage: deploy @@ -32,4 +32,4 @@ auto-deploy: services: - docker:dind script: - - curl --user admin:$JENKINS_PWD http://103.31.38.120:8080/job/auto-deploy-new-mediahub-fe/build?token=autodeploynewmediahub + - curl --user admin:$JENKINS_PWD http://38.47.185.86:8080/job/auto-deploy-new-mediahub-fe/build?token=autodeploynewmediahub