diff --git a/api/cmd/portainer/main.go b/api/cmd/portainer/main.go index 60bb071e1..7c956a05c 100644 --- a/api/cmd/portainer/main.go +++ b/api/cmd/portainer/main.go @@ -127,6 +127,7 @@ func initSettings(settingsService portainer.SettingsService, flags *portainer.CL if err == portainer.ErrSettingsNotFound { settings := &portainer.Settings{ LogoURL: *flags.Logo, + DisplayDonationHeader: true, DisplayExternalContributors: false, AuthenticationMethod: portainer.AuthenticationInternal, LDAPSettings: portainer.LDAPSettings{ diff --git a/api/http/handler/settings.go b/api/http/handler/settings.go index 5e47c92f5..40b14977b 100644 --- a/api/http/handler/settings.go +++ b/api/http/handler/settings.go @@ -46,6 +46,7 @@ func NewSettingsHandler(bouncer *security.RequestBouncer) *SettingsHandler { type ( publicSettingsResponse struct { LogoURL string `json:"LogoURL"` + DisplayDonationHeader bool `json:"DisplayDonationHeader"` DisplayExternalContributors bool `json:"DisplayExternalContributors"` AuthenticationMethod portainer.AuthenticationMethod `json:"AuthenticationMethod"` AllowBindMountsForRegularUsers bool `json:"AllowBindMountsForRegularUsers"` @@ -56,6 +57,7 @@ type ( TemplatesURL string `valid:"required"` LogoURL string `valid:""` BlackListedLabels []portainer.Pair `valid:""` + DisplayDonationHeader bool `valid:""` DisplayExternalContributors bool `valid:""` AuthenticationMethod int `valid:"required"` LDAPSettings portainer.LDAPSettings `valid:""` @@ -90,6 +92,7 @@ func (handler *SettingsHandler) handleGetPublicSettings(w http.ResponseWriter, r publicSettings := &publicSettingsResponse{ LogoURL: settings.LogoURL, + DisplayDonationHeader: settings.DisplayDonationHeader, DisplayExternalContributors: settings.DisplayExternalContributors, AuthenticationMethod: settings.AuthenticationMethod, AllowBindMountsForRegularUsers: settings.AllowBindMountsForRegularUsers, @@ -118,6 +121,7 @@ func (handler *SettingsHandler) handlePutSettings(w http.ResponseWriter, r *http TemplatesURL: req.TemplatesURL, LogoURL: req.LogoURL, BlackListedLabels: req.BlackListedLabels, + DisplayDonationHeader: req.DisplayDonationHeader, DisplayExternalContributors: req.DisplayExternalContributors, LDAPSettings: req.LDAPSettings, AllowBindMountsForRegularUsers: req.AllowBindMountsForRegularUsers, diff --git a/api/portainer.go b/api/portainer.go index c437f0df6..050e70fc7 100644 --- a/api/portainer.go +++ b/api/portainer.go @@ -73,6 +73,7 @@ type ( TemplatesURL string `json:"TemplatesURL"` LogoURL string `json:"LogoURL"` BlackListedLabels []Pair `json:"BlackListedLabels"` + DisplayDonationHeader bool `json:"DisplayDonationHeader"` DisplayExternalContributors bool `json:"DisplayExternalContributors"` AuthenticationMethod AuthenticationMethod `json:"AuthenticationMethod"` LDAPSettings LDAPSettings `json:"LDAPSettings"` diff --git a/api/swagger.yaml b/api/swagger.yaml index 3e5abf7fc..edbfab891 100644 --- a/api/swagger.yaml +++ b/api/swagger.yaml @@ -1880,6 +1880,10 @@ definitions: description: "URL to a logo that will be displayed on the login page as well\ \ as on top of the sidebar. Will use default Portainer logo when value is\ \ empty string" + DisplayDonationHeader: + type: "boolean" + example: true + description: "Whether to display or not the donation message in the header."\ DisplayExternalContributors: type: "boolean" example: false @@ -1983,6 +1987,10 @@ definitions: \ when querying containers" items: $ref: "#/definitions/Settings_BlackListedLabels" + DisplayDonationHeader: + type: "boolean" + example: true + description: "Whether to display or not the donation message in the header." DisplayExternalContributors: type: "boolean" example: false @@ -2398,6 +2406,10 @@ definitions: \ when querying containers" items: $ref: "#/definitions/Settings_BlackListedLabels" + DisplayDonationHeader: + type: "boolean" + example: true + description: "Whether to display or not the donation message in the header." DisplayExternalContributors: type: "boolean" example: false diff --git a/app/components/about/about.html b/app/components/about/about.html new file mode 100644 index 000000000..918c8532a --- /dev/null +++ b/app/components/about/about.html @@ -0,0 +1,100 @@ + + + + + About Portainer + + + +
+
+ + + Portainer is a free and open-source software brought to you with by portainer.io and contributors. + + +
+
+ +
+
+ + + +
+

+ It is a community effort to make Portainer as feature-rich as simple it is to deploy and use. We need all the help we can get! +

+

+ Fund our work +

+

+

+ Contribute +

+

+

+ Spread the word +

    +
  • Talk to your friends and colleagues about how awesome Portainer is!
  • +
  • Follow us on Twitter
  • +
+

+
+
+
+
+
+ +
+
+ + + +
+

+ Documentation +

+

+

+ Community support +

+

+

+ Services +

+

+
+
+
+
+
+ +
+
+ + + +
+ Portainer has full support for Docker >=1.10 and Docker Swarm >= 1.2.3, and partial support for Docker 1.9 (some features may not be available). +
+
+
+
+
diff --git a/app/components/settings/settings.html b/app/components/settings/settings.html index 1cc2e712b..a12aa4f0c 100644 --- a/app/components/settings/settings.html +++ b/app/components/settings/settings.html @@ -9,6 +9,43 @@
+
+
+ + +
+
+ +
+
+ + +
+
+
+
+ + You can specify the URL to your logo here. For an optimal display, logo dimensions should be 155px by 55px. + +
+
+ +
+ +
+
+
+
Security @@ -36,36 +73,6 @@
- -
- Logo -
-
-
- - -
-
-
-
- - You can specify the URL to your logo here. For an optimal display, logo dimensions should be 155px by 55px. - -
-
- -
- -
-
-
-
App Templates diff --git a/app/components/settings/settingsController.js b/app/components/settings/settingsController.js index ef177641b..a9ee117fa 100644 --- a/app/components/settings/settingsController.js +++ b/app/components/settings/settingsController.js @@ -9,6 +9,7 @@ function ($scope, $state, Notifications, SettingsService, StateManager, DEFAULT_ $scope.formValues = { customLogo: false, customTemplates: false, + donationHeader: true, externalContributions: false, restrictBindMounts: false, restrictPrivilegedMode: false, @@ -45,6 +46,7 @@ function ($scope, $state, Notifications, SettingsService, StateManager, DEFAULT_ settings.TemplatesURL = DEFAULT_TEMPLATES_URL; } + settings.DisplayDonationHeader = !$scope.formValues.donationHeader; settings.DisplayExternalContributors = !$scope.formValues.externalContributions; settings.AllowBindMountsForRegularUsers = !$scope.formValues.restrictBindMounts; settings.AllowPrivilegedModeForRegularUsers = !$scope.formValues.restrictPrivilegedMode; @@ -63,6 +65,7 @@ function ($scope, $state, Notifications, SettingsService, StateManager, DEFAULT_ .then(function success(data) { Notifications.success('Settings updated'); StateManager.updateLogo(settings.LogoURL); + StateManager.updateDonationHeader(settings.DisplayDonationHeader); StateManager.updateExternalContributions(settings.DisplayExternalContributors); if (resetForm) { resetFormValues(); @@ -87,6 +90,7 @@ function ($scope, $state, Notifications, SettingsService, StateManager, DEFAULT_ if (settings.TemplatesURL !== DEFAULT_TEMPLATES_URL) { $scope.formValues.customTemplates = true; } + $scope.formValues.donationHeader = !settings.DisplayDonationHeader; $scope.formValues.externalContributions = !settings.DisplayExternalContributors; $scope.formValues.restrictBindMounts = !settings.AllowBindMountsForRegularUsers; $scope.formValues.restrictPrivilegedMode = !settings.AllowPrivilegedModeForRegularUsers; diff --git a/app/components/sidebar/sidebar.html b/app/components/sidebar/sidebar.html index db12a7dca..dd1b0d293 100644 --- a/app/components/sidebar/sidebar.html +++ b/app/components/sidebar/sidebar.html @@ -9,75 +9,75 @@