From 1b1a50d6b574c3d71030ff89734d930a7bc9b6ea Mon Sep 17 00:00:00 2001 From: Chaim Lev-Ari Date: Mon, 17 Jan 2022 07:53:32 +0200 Subject: [PATCH] fix(app): add github action for linting and formatting [EE-2344] (#6356) --- .eslintrc.yml | 4 + .git-blame-ignore-revs | 4 + .github/workflows/lint.yml | 41 ++ .github/workflows/test-client.yaml | 11 + .prettierrc | 11 +- .vscode.example/settings.json | 3 +- api/datastore/init.go | 4 +- api/docker/client.go | 2 +- api/exec/common.go | 2 +- .../handler/endpointproxy/proxy_docker.go | 2 +- .../handler/registries/registry_configure.go | 2 +- .../handler/registries/registry_update.go | 6 +- api/http/handler/webhooks/webhook_create.go | 2 +- api/http/handler/webhooks/webhook_execute.go | 4 +- .../proxy/factory/kubernetes/deployments.go | 2 +- api/http/proxy/factory/kubernetes/pods.go | 2 +- .../factory/kubernetes/refresh_registry.go | 2 +- api/internal/endpointutils/endpoint_test.go | 2 +- api/kubernetes/cli/client.go | 2 +- api/kubernetes/cli/registries.go | 4 +- .../file-uploader/fileUploader.html | 2 +- .../files-datatable/filesDatatable.html | 4 +- app/assets/ico/manifest.json | 34 +- .../azureEndpointConfig.html | 4 +- .../containerGroupsDatatable.html | 10 +- .../containerInstanceDetails.html | 22 +- .../create/createcontainerinstance.html | 26 +- .../containerCapabilities.html | 8 +- .../configs-datatable/configsDatatable.html | 16 +- .../containerNetworksDatatable.html | 6 +- .../containerProcessesDatatable.html | 6 +- .../events-datatable/eventsDatatable.html | 6 +- .../images-datatable/imagesDatatable.html | 22 +- .../macvlanNodesDatatable.html | 6 +- .../networkRowContent.html | 2 +- .../networks-datatable/networksDatatable.html | 18 +- .../nodeTasksDatatable.html | 6 +- .../nodes-datatable/nodesDatatable.html | 16 +- .../secrets-datatable/secretsDatatable.html | 16 +- .../serviceTasksDatatable.html | 8 +- .../services-datatable/servicesDatatable.html | 18 +- .../tasks-datatable/tasksDatatable.html | 6 +- .../volumes-datatable/volumesDatatable.html | 22 +- .../devices-panel/devices-panel.html | 4 +- .../disks-panel/disks-panel.html | 4 +- .../host-details-panel.html | 4 +- .../node-labels-table/node-labels-table.html | 8 +- .../swarm-node-details-panel.html | 4 +- .../por-image-registry-rate-limits.html | 8 +- .../imageRegistry/por-image-registry.html | 8 +- .../components/log-viewer/logViewer.html | 38 +- .../networkMacvlanForm.html | 12 +- .../volumesCIFSForm/volumesCifsForm.html | 4 +- .../volumesNFSForm/volumesnfsForm.html | 4 +- .../ContainersDatatable.tsx | 8 +- .../ContainersDatatableContainer.tsx | 1 - .../views/configs/create/createconfig.html | 14 +- .../containers/create/createcontainer.html | 180 +++--- .../containers/stats/containerstats.html | 14 +- app/docker/views/dashboard/dashboard.html | 8 +- .../docker-features-configuration.html | 20 +- app/docker/views/images/build/buildimage.html | 58 +- app/docker/views/images/edit/image.html | 22 +- app/docker/views/images/images.html | 4 +- .../views/images/import/importimage.html | 20 +- .../views/networks/create/createnetwork.html | 56 +- .../views/secrets/create/createsecret.html | 16 +- .../views/services/create/createservice.html | 120 ++-- .../services/create/includes/config.html | 14 +- .../create/includes/resources-placement.html | 64 +- .../services/create/includes/secret.html | 14 +- .../create/includes/update-restart.html | 38 +- .../views/services/edit/includes/configs.html | 4 +- .../edit/includes/container-specs.html | 20 +- .../views/services/edit/includes/logging.html | 2 +- .../services/edit/includes/networks.html | 2 +- .../services/edit/includes/resources.html | 44 +- .../views/services/edit/includes/restart.html | 12 +- .../views/services/edit/includes/secrets.html | 4 +- .../services/edit/includes/servicelabels.html | 8 +- .../services/edit/includes/updateconfig.html | 16 +- app/docker/views/services/edit/service.html | 4 +- .../swarm/visualizer/swarmvisualizer.html | 22 +- .../views/volumes/create/createvolume.html | 42 +- .../associatedEndpointsDatatable.html | 6 +- .../components/edge-job-form/edgeJobForm.html | 58 +- .../edge-job-form/edgeJobFormController.js | 3 +- .../edgeJobResultsDatatable.html | 26 +- .../edgeJobsDatatable.html | 6 +- .../edge-stack-deployment-type-selector.html | 4 +- .../edgeStackEndpointsDatatable.html | 6 +- .../edgeStacksDatatable.html | 28 +- .../editEdgeStackForm.html | 12 +- app/edge/components/group-form/groupForm.html | 32 +- .../groups-datatable/groupsDatatable.html | 8 +- app/edge/views/edge-jobs/edgeJob/edgeJob.html | 2 +- .../create-edge-stack-view.html | 14 +- .../docker-compose-form.html | 20 +- .../kube-deploy-description.html | 2 +- .../kube-manifest-form.html | 4 +- .../editEdgeStackView/editEdgeStackView.html | 4 +- app/index.html | 8 +- .../storidgeClusterEventsDatatable.html | 6 +- .../storidgeDrivesDatatable.html | 10 +- .../storidgeNodesDatatable.html | 10 +- .../storidgeProfilesDatatable.html | 6 +- .../storidgeSnapshotsDatatable.html | 6 +- .../volumeStoridgeInfo.html | 8 +- .../storidge/views/cluster/cluster.html | 4 +- .../storidge/views/monitor/monitor.html | 18 +- .../views/profiles/create/createprofile.html | 70 +-- .../storidge/views/profiles/edit/profile.html | 70 +-- .../containersDatatable.html | 20 +- .../applications-datatable-details.html | 6 +- .../applications-datatable-url.html | 4 +- .../applicationsDatatable.html | 32 +- .../applicationsPortsDatatable.html | 46 +- .../applicationsStacksDatatable.html | 28 +- .../configurationsDatatable.html | 20 +- .../events-datatable/eventsDatatable.html | 16 +- .../integratedApplicationsDatatable.html | 16 +- .../nodeApplicationsDatatable.html | 20 +- .../nodes-datatable/nodesDatatable.html | 24 +- .../resourcePoolApplicationsDatatable.html | 18 +- .../resourcePoolsDatatable.html | 28 +- .../volumes-datatable/volumesDatatable.html | 30 +- .../helm-add-repository.html | 4 +- .../helm-templates-list-item.html | 4 +- .../helm-templates-list.html | 14 +- .../helm/helm-templates/helm-templates.html | 26 +- .../kube-services/kube-services.html | 26 +- .../kubectl-shell/kubectl-shell.html | 4 +- .../kubernetesConfigurationData.html | 20 +- .../resourceReservation.html | 36 +- .../yaml-inspector/yamlInspector.html | 7 +- .../kube-create-custom-template-view.html | 14 +- .../kube-custom-templates-view.html | 4 +- .../kube-edit-custom-template-view.html | 6 +- .../kube-registry-access-view.html | 12 +- .../views/applications/applications.html | 4 +- .../views/applications/console/console.html | 10 +- .../create/createApplication.html | 248 ++++---- .../views/applications/edit/application.html | 104 ++-- .../placements-datatable/template.html | 32 +- .../views/applications/helm/helm.html | 6 +- .../views/applications/logs/logs.html | 18 +- .../views/applications/stats/stats.html | 12 +- app/kubernetes/views/cluster/cluster.html | 16 +- app/kubernetes/views/cluster/node/node.html | 66 +-- .../views/cluster/node/stats/stats.html | 12 +- .../views/configurations/configurations.html | 4 +- .../create/createConfiguration.html | 30 +- .../configurations/edit/configuration.html | 28 +- app/kubernetes/views/configure/configure.html | 98 ++-- app/kubernetes/views/dashboard/dashboard.html | 4 +- app/kubernetes/views/deploy/deploy.html | 34 +- .../access/resourcePoolAccess.html | 4 +- .../create/createResourcePool.html | 106 ++-- .../ingresses-datatable/template.html | 24 +- .../resource-pools/edit/resourcePool.html | 110 ++-- .../views/resource-pools/resourcePools.html | 4 +- app/kubernetes/views/stacks/logs/logs.html | 18 +- app/kubernetes/views/summary/summary.html | 6 +- .../volumes-storages-datatable/template.html | 22 +- app/kubernetes/views/volumes/edit/volume.html | 14 +- app/kubernetes/views/volumes/volumes.html | 4 +- app/portainer/components/BoxSelector/index.ts | 12 +- .../components/Code/Code.stories.tsx | 5 +- .../components/ReactExample.test.tsx | 11 - .../access-datatable/accessDatatable.html | 10 +- .../components/access-table/accessTable.html | 8 +- .../porAccessControlPanel.html | 46 +- .../por-access-management-users-selector.html | 8 +- .../accessManagement/porAccessManagement.html | 6 +- .../associatedEndpointsSelector.html | 6 +- .../components/beta-panel/betaPanel.html | 2 +- .../customTemplateCommonFields.html | 4 +- .../custom-template-selector.html | 8 +- .../customTemplatesList.html | 14 +- .../access-tokens-datatable.html | 8 +- .../components/QuickActionsSettings.tsx | 5 +- .../datatables/components/SearchBar.tsx | 4 +- .../components/useTableSettings.tsx | 51 +- .../datatable-columns-visibility.html | 4 +- .../endpointsDatatable.html | 8 +- .../datatables/filter/datatable-filter.html | 6 +- .../groups-datatable/groupsDatatable.html | 6 +- .../datatables/pagination/pagination.html | 2 +- .../registriesDatatable.html | 22 +- .../stacks-datatable/stacksDatatable.html | 26 +- .../tags-datatable/tagsDatatable.html | 6 +- .../teams-datatable/teamsDatatable.html | 6 +- .../titlebar/datatable-titlebar.html | 4 +- .../users-datatable/usersDatatable.html | 12 +- .../endpoint-item/endpointItem.html | 26 +- .../endpoint-list/endpointList.html | 18 +- .../endpointSecurity/porEndpointSecurity.html | 26 +- .../environment-variables-panel.html | 6 +- ...nvironment-variables-simple-mode-item.html | 2 +- .../FileUpload/FileUploadField.stories.tsx | 4 +- .../FileUpload/FileUploadForm.stories.tsx | 4 +- .../form-components/InputGroup/index.ts | 3 +- .../form-components/InputList/InputList.tsx | 4 +- .../form-components/InputList/utils.test.ts | 13 +- .../form-components/InputList/utils.ts | 14 +- .../web-editor-form/web-editor-form.html | 4 +- .../git-form-additional-file-item.html | 2 +- .../git-form-additional-files-panel.html | 6 +- .../git-form-auth-fieldset.html | 6 +- .../git-form-auto-update-fieldset.html | 20 +- .../git-form-url-field.html | 4 +- .../components/forms/git-form/git-form.html | 4 +- .../forms/group-form/groupForm.html | 24 +- .../kubernetes-app-git-form.html | 16 +- .../kubernetes-redeploy-app-git-form.html | 16 +- .../registry-form-ecr.html | 14 +- .../registry-form-azure.html | 8 +- .../registry-form-custom.html | 14 +- .../registry-form-dockerhub.html | 8 +- .../gitlabProjectsDatatable.html | 6 +- .../registry-form-gitlab.html | 18 +- .../registry-form-proget.html | 12 +- .../registry-form-quay.html | 14 +- .../stackFromTemplateForm.html | 16 +- .../stack-redeploy-git-form.html | 8 +- .../groupAssociationTable.html | 16 +- .../informationPanelOffline.html | 4 +- .../information-panel/informationPanel.html | 4 +- .../components/motd-panel/motdPanel.html | 4 +- .../components/product-list/productList.html | 2 +- .../stack-duplication-form.html | 14 +- .../components/tag-selector/tagSelector.html | 26 +- .../template-list/templateList.html | 20 +- .../components/theme/theme-settings.html | 2 +- .../oauth-providers-selector.html | 4 +- .../access-viewer-datatable.html | 8 +- .../access-viewer/access-viewer.html | 16 +- .../roles-datatable/roles-datatable.html | 6 +- .../auto-user-provision-toggle.html | 10 +- .../internal-auth/internal-auth.html | 8 +- .../ldap/ad-settings/ad-settings.html | 22 +- .../ldap-custom-admin-group.html | 12 +- .../ldap-custom-group-search.html | 18 +- .../ldap-custom-user-search.html | 18 +- .../ldap-group-search-item.html | 18 +- .../ldap-group-search/ldap-group-search.html | 12 +- .../ldap-groups-datatable.html | 12 +- .../ldap-settings-custom.html | 8 +- .../ldap-settings-dn-builder.html | 4 +- .../ldap-settings-group-dn-builder.html | 6 +- .../ldap-settings-openldap.html | 26 +- .../ldap-settings-security.html | 8 +- .../ldap-settings-test-login.html | 10 +- .../ldap/ldap-settings/ldap-settings.html | 6 +- .../ldap-user-search-item.html | 24 +- .../ldap-user-search/ldap-user-search.html | 12 +- .../ldap-users-datatable.html | 6 +- .../save-auth-settings-button.html | 4 +- .../settings/general/open-amt/open-amt.html | 30 +- .../ssl-certificate/ssl-certificate.html | 28 +- .../CreateTeamForm/CreateTeamForm.stories.tsx | 4 +- .../CreateTeamForm.validation.ts | 6 +- app/portainer/teams/CreateTeamForm/index.ts | 7 +- .../activity-logs-datatable.html | 12 +- .../auth-logs-datatable.html | 8 +- .../views/account/CreateAccessToken/index.ts | 7 +- app/portainer/views/account/account.html | 6 +- app/portainer/views/auth/auth.html | 24 +- app/portainer/views/auth/authController.js | 2 +- .../createCustomTemplateView.html | 40 +- .../customTemplatesView.html | 8 +- .../editCustomTemplateView.html | 14 +- .../create/createEndpointController.js | 533 ++++++++--------- .../endpoints/create/createendpoint.html | 102 ++-- .../views/endpoints/edit/endpoint.html | 52 +- app/portainer/views/home/home.html | 8 +- app/portainer/views/home/homeController.js | 174 +++--- app/portainer/views/init/admin/initAdmin.html | 60 +- .../views/init/endpoint/includes/agent.html | 12 +- .../init/endpoint/includes/localDocker.html | 14 +- .../endpoint/includes/localKubernetes.html | 8 +- .../views/init/endpoint/initEndpoint.html | 8 +- app/portainer/views/logout/logout.html | 4 +- .../registries/create/createRegistry.html | 20 +- .../views/registries/edit/registry.html | 8 +- .../views/registries/registries.html | 4 +- .../settingsAuthentication.html | 12 +- app/portainer/views/settings/settings.html | 72 +-- app/portainer/views/sidebar/sidebar.html | 4 +- .../stacks/create/createStackController.js | 545 +++++++++--------- .../views/stacks/create/createstack.html | 34 +- app/portainer/views/tags/tags.html | 4 +- app/portainer/views/teams/edit/team.html | 14 +- app/portainer/views/templates/templates.html | 56 +- app/portainer/views/users/edit/user.html | 6 +- app/portainer/views/users/users.html | 12 +- .../wizard-endpoint-aci/wizard-aci.html | 8 +- .../wizard-endpoint-docker/wizard-docker.html | 50 +- .../wizard-kubernetes.html | 20 +- .../wizard-endpoint-list.html | 2 +- .../wizard-endpoints/wizard-endpoints.html | 4 +- .../wizard-endpoint-type.html | 4 +- .../views/wizard/wizard-link/wizard-link.html | 4 +- app/portainer/views/wizard/wizard-view.html | 8 +- app/react-table-config.d.ts | 26 +- jsconfig.json | 2 +- lint-staged.config.js | 2 +- package.json | 4 +- test/e2e/cypress/support/commands.js | 6 +- tool-versions.json | 8 +- translations/en/translation.json | 2 +- tsconfig.json | 2 +- webpack/webpack.common.js | 1 - 313 files changed, 2633 insertions(+), 3821 deletions(-) create mode 100644 .git-blame-ignore-revs create mode 100644 .github/workflows/lint.yml create mode 100644 .github/workflows/test-client.yaml delete mode 100644 app/portainer/components/ReactExample.test.tsx diff --git a/.eslintrc.yml b/.eslintrc.yml index cc4e73a73..7a34eedcb 100644 --- a/.eslintrc.yml +++ b/.eslintrc.yml @@ -99,3 +99,7 @@ overrides: 'jest/globals': true rules: 'react/jsx-no-constructed-context-values': off + - files: + - app/**/*.stories.* + rules: + 'no-alert': off diff --git a/.git-blame-ignore-revs b/.git-blame-ignore-revs new file mode 100644 index 000000000..7d15d6796 --- /dev/null +++ b/.git-blame-ignore-revs @@ -0,0 +1,4 @@ +# prettier +cf5056d9c03b62d91a25c3b9127caac838695f98 + +# prettier v2 (put here after fix/EE-2344/fix-eslint-issues is merged) \ No newline at end of file diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml new file mode 100644 index 000000000..926c760aa --- /dev/null +++ b/.github/workflows/lint.yml @@ -0,0 +1,41 @@ +name: Lint + +on: + push: + branches: + - master + - develop + - release/* + pull_request: + branches: + - master + - develop + - release/* + +jobs: + run-linters: + name: Run linters + runs-on: ubuntu-latest + + steps: + - name: Check out Git repository + uses: actions/checkout@v2 + + - name: Set up Node.js + uses: actions/setup-node@v1 + with: + node-version: 12 + + # ESLint and Prettier must be in `package.json` + - name: Install Node.js dependencies + run: yarn + + - name: Run linters + uses: wearerequired/lint-action@v1 + with: + eslint: true + eslint_extensions: ts,tsx,js,jsx + prettier: true + prettier_dir: app/ + gofmt: true + gofmt_dir: api/ diff --git a/.github/workflows/test-client.yaml b/.github/workflows/test-client.yaml new file mode 100644 index 000000000..256849b43 --- /dev/null +++ b/.github/workflows/test-client.yaml @@ -0,0 +1,11 @@ +name: Test Frontend +on: push +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Install modules + run: yarn + - name: Run tests + run: yarn test:client diff --git a/.prettierrc b/.prettierrc index 184ed56cb..a9d2ada8a 100644 --- a/.prettierrc +++ b/.prettierrc @@ -4,21 +4,16 @@ "htmlWhitespaceSensitivity": "strict", "overrides": [ { - "files": [ - "*.html" - ], + "files": ["*.html"], "options": { "parser": "angular" } }, { - "files": [ - "*.{j,t}sx", - "*.ts" - ], + "files": ["*.{j,t}sx", "*.ts"], "options": { "printWidth": 80 } } ] -} \ No newline at end of file +} diff --git a/.vscode.example/settings.json b/.vscode.example/settings.json index 64be114a1..02a896c80 100644 --- a/.vscode.example/settings.json +++ b/.vscode.example/settings.json @@ -1,4 +1,5 @@ { "go.lintTool": "golangci-lint", - "go.lintFlags": ["--fast", "-E", "exportloopref"] + "go.lintFlags": ["--fast", "-E", "exportloopref"], + "gitlens.advanced.blame.customArguments": ["–ignore-revs-file", ".git-blame-ignore-revs"] } diff --git a/api/datastore/init.go b/api/datastore/init.go index a92abe3da..d46d76297 100644 --- a/api/datastore/init.go +++ b/api/datastore/init.go @@ -34,10 +34,10 @@ func (store *Store) Init() error { AutoCreateUsers: true, TLSConfig: portainer.TLSConfiguration{}, SearchSettings: []portainer.LDAPSearchSettings{ - portainer.LDAPSearchSettings{}, + {}, }, GroupSearchSettings: []portainer.LDAPGroupSearchSettings{ - portainer.LDAPGroupSearchSettings{}, + {}, }, }, OAuthSettings: portainer.OAuthSettings{}, diff --git a/api/docker/client.go b/api/docker/client.go index b80c772da..eac3b238c 100644 --- a/api/docker/client.go +++ b/api/docker/client.go @@ -95,7 +95,7 @@ func createEdgeClient(endpoint *portainer.Endpoint, signatureService portainer.D if err != nil { return nil, err } - + endpointURL := fmt.Sprintf("http://127.0.0.1:%d", tunnel.Port) return client.NewClientWithOpts( diff --git a/api/exec/common.go b/api/exec/common.go index abae6dac7..97a10f432 100644 --- a/api/exec/common.go +++ b/api/exec/common.go @@ -33,7 +33,7 @@ func (s StringSet) List() []string { list := make([]string, s.Len()) i := 0 - for k, _ := range s { + for k := range s { list[i] = k i++ } diff --git a/api/http/handler/endpointproxy/proxy_docker.go b/api/http/handler/endpointproxy/proxy_docker.go index d84588b65..96a539ddb 100644 --- a/api/http/handler/endpointproxy/proxy_docker.go +++ b/api/http/handler/endpointproxy/proxy_docker.go @@ -4,9 +4,9 @@ import ( "errors" httperror "github.com/portainer/libhttp/error" "github.com/portainer/libhttp/request" + portainer "github.com/portainer/portainer/api" "strconv" "strings" - portainer "github.com/portainer/portainer/api" "net/http" ) diff --git a/api/http/handler/registries/registry_configure.go b/api/http/handler/registries/registry_configure.go index 146d425b0..0c56e267d 100644 --- a/api/http/handler/registries/registry_configure.go +++ b/api/http/handler/registries/registry_configure.go @@ -21,7 +21,7 @@ type registryConfigurePayload struct { // Password used to authenticate against this registry. required when Authentication is true Password string `example:"registry_password"` // ECR region - Region string + Region string // Use TLS TLS bool `example:"true"` // Skip the verification of the server TLS certificate diff --git a/api/http/handler/registries/registry_update.go b/api/http/handler/registries/registry_update.go index 57075880c..cf0a6a51a 100644 --- a/api/http/handler/registries/registry_update.go +++ b/api/http/handler/registries/registry_update.go @@ -25,13 +25,13 @@ type registryUpdatePayload struct { // Username used to authenticate against this registry. Required when Authentication is true Username *string `example:"registry_user"` // Password used to authenticate against this registry. required when Authentication is true - Password *string `example:"registry_password"` + Password *string `example:"registry_password"` // Quay data - Quay *portainer.QuayRegistryData + Quay *portainer.QuayRegistryData // Registry access control RegistryAccesses *portainer.RegistryAccesses `json:",omitempty"` // ECR data - Ecr *portainer.EcrData `json:",omitempty"` + Ecr *portainer.EcrData `json:",omitempty"` } func (payload *registryUpdatePayload) Validate(r *http.Request) error { diff --git a/api/http/handler/webhooks/webhook_create.go b/api/http/handler/webhooks/webhook_create.go index 077f159d7..78326b720 100644 --- a/api/http/handler/webhooks/webhook_create.go +++ b/api/http/handler/webhooks/webhook_create.go @@ -17,7 +17,7 @@ import ( type webhookCreatePayload struct { ResourceID string EndpointID int - RegistryID portainer.RegistryID + RegistryID portainer.RegistryID WebhookType int } diff --git a/api/http/handler/webhooks/webhook_execute.go b/api/http/handler/webhooks/webhook_execute.go index e7e9c1394..e312c3b64 100644 --- a/api/http/handler/webhooks/webhook_execute.go +++ b/api/http/handler/webhooks/webhook_execute.go @@ -80,13 +80,13 @@ func (handler *Handler) executeServiceWebhook( } service.Spec.TaskTemplate.ForceUpdate++ - + var imageName = strings.Split(service.Spec.TaskTemplate.ContainerSpec.Image, "@sha")[0] if imageTag != "" { var tagIndex = strings.LastIndex(imageName, ":") if tagIndex == -1 { - tagIndex = len(imageName) + tagIndex = len(imageName) } service.Spec.TaskTemplate.ContainerSpec.Image = imageName[:tagIndex] + ":" + imageTag } else { diff --git a/api/http/proxy/factory/kubernetes/deployments.go b/api/http/proxy/factory/kubernetes/deployments.go index ee8e85e0b..2cd7257d1 100644 --- a/api/http/proxy/factory/kubernetes/deployments.go +++ b/api/http/proxy/factory/kubernetes/deployments.go @@ -12,4 +12,4 @@ func (transport *baseTransport) proxyDeploymentsRequest(request *http.Request, n default: return transport.executeKubernetesRequest(request) } -} \ No newline at end of file +} diff --git a/api/http/proxy/factory/kubernetes/pods.go b/api/http/proxy/factory/kubernetes/pods.go index 743c716b7..9a88508a3 100644 --- a/api/http/proxy/factory/kubernetes/pods.go +++ b/api/http/proxy/factory/kubernetes/pods.go @@ -12,4 +12,4 @@ func (transport *baseTransport) proxyPodsRequest(request *http.Request, namespac default: return transport.executeKubernetesRequest(request) } -} \ No newline at end of file +} diff --git a/api/http/proxy/factory/kubernetes/refresh_registry.go b/api/http/proxy/factory/kubernetes/refresh_registry.go index 7e9025bfb..e58f672ae 100644 --- a/api/http/proxy/factory/kubernetes/refresh_registry.go +++ b/api/http/proxy/factory/kubernetes/refresh_registry.go @@ -14,4 +14,4 @@ func (transport *baseTransport) refreshRegistry(request *http.Request, namespace err = registryutils.RefreshEcrSecret(cli, transport.endpoint, transport.dataStore, namespace) return -} \ No newline at end of file +} diff --git a/api/internal/endpointutils/endpoint_test.go b/api/internal/endpointutils/endpoint_test.go index 8d65552a2..ad6b3c76f 100644 --- a/api/internal/endpointutils/endpoint_test.go +++ b/api/internal/endpointutils/endpoint_test.go @@ -101,4 +101,4 @@ func Test_FilterByExcludeIDs(t *testing.T) { tt.asserts(t, output) }) } -} \ No newline at end of file +} diff --git a/api/kubernetes/cli/client.go b/api/kubernetes/cli/client.go index 88f73e32b..bc3e43c46 100644 --- a/api/kubernetes/cli/client.go +++ b/api/kubernetes/cli/client.go @@ -50,7 +50,7 @@ func (factory *ClientFactory) GetInstanceID() (instanceID string) { } // Remove the cached kube client so a new one can be created - func (factory *ClientFactory) RemoveKubeClient(endpointID portainer.EndpointID) { +func (factory *ClientFactory) RemoveKubeClient(endpointID portainer.EndpointID) { factory.endpointClients.Remove(strconv.Itoa(int(endpointID))) } diff --git a/api/kubernetes/cli/registries.go b/api/kubernetes/cli/registries.go index b8c7e5278..ed6fb736c 100644 --- a/api/kubernetes/cli/registries.go +++ b/api/kubernetes/cli/registries.go @@ -16,8 +16,8 @@ import ( const ( secretDockerConfigKey = ".dockerconfigjson" - labelRegistryType = "io.portainer.kubernetes.registry.type" - annotationRegistryID = "portainer.io/registry.id" + labelRegistryType = "io.portainer.kubernetes.registry.type" + annotationRegistryID = "portainer.io/registry.id" ) type ( diff --git a/app/agent/components/file-uploader/fileUploader.html b/app/agent/components/file-uploader/fileUploader.html index 27b741b0a..aced458fa 100644 --- a/app/agent/components/file-uploader/fileUploader.html +++ b/app/agent/components/file-uploader/fileUploader.html @@ -1,3 +1,3 @@ diff --git a/app/agent/components/files-datatable/filesDatatable.html b/app/agent/components/files-datatable/filesDatatable.html index c29562d61..d4e719d47 100644 --- a/app/agent/components/files-datatable/filesDatatable.html +++ b/app/agent/components/files-datatable/filesDatatable.html @@ -41,9 +41,7 @@ - - Actions - + Actions diff --git a/app/assets/ico/manifest.json b/app/assets/ico/manifest.json index 843e03e83..f70fd66f2 100644 --- a/app/assets/ico/manifest.json +++ b/app/assets/ico/manifest.json @@ -1,18 +1,18 @@ { - "name": "Portainer", - "icons": [ - { - "src": "ico/android-chrome-192x192.png", - "sizes": "192x192", - "type": "image/png" - }, - { - "src": "ico/android-chrome-256x256.png", - "sizes": "256x256", - "type": "image/png" - } - ], - "theme_color": "#ffffff", - "background_color": "#ffffff", - "display": "standalone" -} \ No newline at end of file + "name": "Portainer", + "icons": [ + { + "src": "ico/android-chrome-192x192.png", + "sizes": "192x192", + "type": "image/png" + }, + { + "src": "ico/android-chrome-256x256.png", + "sizes": "256x256", + "type": "image/png" + } + ], + "theme_color": "#ffffff", + "background_color": "#ffffff", + "display": "standalone" +} diff --git a/app/azure/components/azure-endpoint-config/azureEndpointConfig.html b/app/azure/components/azure-endpoint-config/azureEndpointConfig.html index efc8bd79f..b6ee79f3d 100644 --- a/app/azure/components/azure-endpoint-config/azureEndpointConfig.html +++ b/app/azure/components/azure-endpoint-config/azureEndpointConfig.html @@ -1,7 +1,5 @@
-
- Azure configuration -
+
Azure configuration
diff --git a/app/azure/components/datatables/containergroups-datatable/containerGroupsDatatable.html b/app/azure/components/datatables/containergroups-datatable/containerGroupsDatatable.html index bea19d1fc..abcc2e92a 100644 --- a/app/azure/components/datatables/containergroups-datatable/containerGroupsDatatable.html +++ b/app/azure/components/datatables/containergroups-datatable/containerGroupsDatatable.html @@ -2,7 +2,7 @@
-
{{ $ctrl.titleText }}
+
{{ $ctrl.titleText }}
- {{ state.formValidationError }} + {{ state.formValidationError }}
diff --git a/app/docker/components/container-capabilities/containerCapabilities.html b/app/docker/components/container-capabilities/containerCapabilities.html index 22d6b9aed..89163c10a 100644 --- a/app/docker/components/container-capabilities/containerCapabilities.html +++ b/app/docker/components/container-capabilities/containerCapabilities.html @@ -1,12 +1,10 @@ - -
- Container capabilities -
+ +
Container capabilities
-
-
{{ $ctrl.titleText }}
+
{{ $ctrl.titleText }}
Settings