diff --git a/ui/package-lock.json b/ui/package-lock.json index f3087d1bf98b..c9f90b6552a4 100644 --- a/ui/package-lock.json +++ b/ui/package-lock.json @@ -2816,6 +2816,12 @@ "@types/node": "*" } }, + "@types/trusted-types": { + "version": "2.0.7", + "resolved": "https://registry.npmjs.org/@types/trusted-types/-/trusted-types-2.0.7.tgz", + "integrity": "sha512-ScaPdn1dQczgbl0QFTeTOmVHFULt394XJgOQNoyVhZ6r2vLnMLJfBPd53SB52T/3G36VI1/g2MZaX0cwDuXsfw==", + "optional": true + }, "@types/uglify-js": { "version": "3.16.0", "resolved": "https://registry.npmjs.org/@types/uglify-js/-/uglify-js-3.16.0.tgz", @@ -9035,6 +9041,14 @@ } } }, + "dompurify": { + "version": "3.2.6", + "resolved": "https://registry.npmjs.org/dompurify/-/dompurify-3.2.6.tgz", + "integrity": "sha512-/2GogDQlohXPZe6D6NOgQvXLPSYBqIWMnZ8zzOhn09REE4eyAzb+Hed3jhoM9OkuaJ8P6ZGTTVWQKAi8ieIzfQ==", + "requires": { + "@types/trusted-types": "^2.0.7" + } + }, "domutils": { "version": "1.7.0", "resolved": "https://registry.npmjs.org/domutils/-/domutils-1.7.0.tgz", diff --git a/ui/package.json b/ui/package.json index df8c5d5f82b7..3c7e1299a9d2 100644 --- a/ui/package.json +++ b/ui/package.json @@ -49,6 +49,7 @@ "chartjs-adapter-moment": "^1.0.0", "core-js": "^3.21.1", "cronstrue": "^2.26.0", + "dompurify": "^3.2.6", "enquire.js": "^2.1.6", "js-cookie": "^2.2.1", "lodash": "^4.17.15", diff --git a/ui/public/config.json b/ui/public/config.json index 446256b5b189..d56e6f037831 100644 --- a/ui/public/config.json +++ b/ui/public/config.json @@ -100,5 +100,15 @@ "imageSelectionInterface": "modern", "showUserCategoryForModernImageSelection": true, "showAllCategoryForModernImageSelection": false, - "docHelpMappings": {} + "docHelpMappings": {}, + "announcementBanner": { + "enabled": false, + "showIcon": false, + "closable": true, + "persistDismissal": true, + "type": "info", + "message": "🤔 Sample Announcement: New Feature Available: Check out our latest dashboard improvements! Learn more", + "startDate": "2025-06-01T00:00:00Z", + "endDate": "2025-07-16T00:00:00Z" + } } diff --git a/ui/src/components/header/AnnouncementBanner.vue b/ui/src/components/header/AnnouncementBanner.vue new file mode 100644 index 000000000000..af4a760c110a --- /dev/null +++ b/ui/src/components/header/AnnouncementBanner.vue @@ -0,0 +1,145 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + + + + + + diff --git a/ui/src/components/page/GlobalLayout.vue b/ui/src/components/page/GlobalLayout.vue index 2002ca3bfc85..99a5707dc034 100644 --- a/ui/src/components/page/GlobalLayout.vue +++ b/ui/src/components/page/GlobalLayout.vue @@ -17,6 +17,7 @@