Compare commits

...

54 Commits
1.24 ... demo

Author SHA1 Message Date
Anthony Lapenna
df3886fd25 Merge tag '1.24.1' into demo
Release 1.24.1
2020-07-23 11:43:41 +12:00
Anthony Lapenna
f2682d82b6 merge branch master into demo 2020-06-05 11:55:22 +12:00
Anthony Lapenna
d3576fe8e6 merge branch master into demo 2020-06-05 11:55:14 +12:00
Anthony Lapenna
f34d27df0f Merge branch 'master' into demo 2020-03-20 11:43:39 +13:00
Anthony Lapenna
f228b28639 Merge branch 'master' into demo 2020-02-18 13:49:34 +13:00
Anthony Lapenna
d7b4e4aba1 Merge branch 'master' into demo 2019-12-04 17:30:43 +13:00
Anthony Lapenna
7234c443e8 Merge branch 'develop' into demo 2019-10-11 12:17:32 +13:00
Anthony Lapenna
5b844fd40a fix(http): allow endpoint update operation on demo environment 2019-07-26 15:25:13 +12:00
Anthony Lapenna
7f2ef8fb06 Merge branch 'develop' into demo
# Conflicts:
#	api/cmd/portainer/main.go
2019-07-26 14:43:10 +12:00
Anthony Lapenna
9f817749c1 Merge branch 'develop' into demo 2019-06-04 16:12:31 +12:00
Anthony Lapenna
36198b57a5 Merge branch 'develop' into demo 2019-03-05 18:48:33 +13:00
Anthony Lapenna
70f9e37eab fix(api): fix missing endpoint identifier 2019-02-14 11:37:54 +13:00
Anthony Lapenna
24f69f0185 Merge branch 'develop' into demo 2019-01-31 15:23:48 +13:00
Anthony Lapenna
4a2e9a892d fix(demo): fix invalid demo data and trigger snapshot at startup 2018-12-12 20:17:53 +13:00
Anthony Lapenna
1e4bedde4b Merge branch 'develop' into demo 2018-12-12 17:59:46 +13:00
Anthony Lapenna
9db07e7f4e Merge branch 'develop' into demo 2018-12-12 14:52:50 +13:00
Anthony Lapenna
d4b8d9947d Merge branch 'master' into demo 2018-09-15 19:30:58 +08:00
Anthony Lapenna
9194ddcd03 Merge branch 'develop' into demo 2018-07-28 20:35:14 +02:00
Anthony Lapenna
e1edf37770 Merge branch 'develop' into demo
Conflicts:
	app/portainer/views/settings/settings.html
2018-07-27 18:03:52 +02:00
Anthony Lapenna
82b73c06b4 Merge branch 'develop' into demo 2018-06-25 16:44:43 +03:00
Anthony Lapenna
ae286998ab Merge branch 'develop' into demo
Conflicts:
	api/cmd/portainer/main.go
	api/http/handler/endpoint.go
	api/http/handler/user.go
2018-06-21 16:47:13 +03:00
Anthony Lapenna
ffc3ed67e2 Merge branch 'develop' into demo
Conflicts:
	api/cmd/portainer/main.go
2018-05-21 13:45:45 +02:00
Anthony Lapenna
6252be4a08 Merge branch 'develop' into demo
Conflicts:
	api/cmd/portainer/main.go
	app/portainer/views/settings/settings.html
2018-05-10 18:14:48 +02:00
Anthony Lapenna
75481d928e Merge branch 'develop' into demo 2018-04-02 08:57:02 +10:00
Anthony Lapenna
d65d65803f Merge branch 'develop' into demo 2018-03-11 20:30:52 +10:00
Anthony Lapenna
6a8fc253bd fix(demo): fix demo init data 2018-03-03 10:31:09 +10:00
Anthony Lapenna
1fa8921c11 Merge branch 'develop' into demo 2018-03-03 10:16:10 +10:00
Anthony Lapenna
ba3892aebf Merge branch 'develop' into demo 2018-02-08 10:22:47 +01:00
Anthony Lapenna
27fc700d6f Merge branch 'develop' into demo 2018-01-21 18:29:26 +01:00
Anthony Lapenna
3187cb0ada feat(api): add demo.portainer.io as the Public URL of the endpoint 2018-01-16 15:53:49 +01:00
Anthony Lapenna
b462a15921 Merge branch 'develop' into demo 2017-12-11 17:29:33 +01:00
Anthony Lapenna
11a646a076 Merge branch 'develop' into demo
Conflicts:
	app/components/endpoints/endpoints.html
	app/components/users/users.html
2017-12-10 11:32:26 +01:00
Anthony Lapenna
4c1edaf251 Merge branch 'develop' into demo 2017-11-26 11:18:14 +01:00
Anthony Lapenna
b45c4f8bea Merge branch 'develop' into demo
Conflicts:
	app/components/settings/settings.html
2017-11-13 12:07:24 +01:00
Anthony Lapenna
968f070b0b Merge branch 'develop' into demo 2017-11-08 09:33:45 +01:00
Anthony Lapenna
e679483ffd Merge branch 'develop' into demo 2017-10-15 20:50:36 +02:00
Anthony Lapenna
494ef6c392 Merge branch 'develop' into 'demo' 2017-10-15 20:27:59 +02:00
Anthony Lapenna
7951c1d150 Merge branch 'develop' into demo 2017-09-28 19:03:22 +02:00
Anthony Lapenna
0083bdb6a2 Merge branch 'master' into demo 2017-09-21 17:49:21 +02:00
Anthony Lapenna
e65881223d Merge branch 'develop' into 'demo' 2017-09-20 16:15:23 +02:00
Anthony Lapenna
f0c9058568 Merge branch 'develop' into 'demo' 2017-08-13 21:03:39 +02:00
Anthony Lapenna
afd654e4a8 Merge branch 'develop' into demo 2017-07-17 16:01:00 +02:00
Anthony Lapenna
0ef116d6b5 Merge branch 'develop' into demo 2017-07-13 18:19:14 +02:00
Anthony Lapenna
ee64a53782 Merge branch 'develop' into demo 2017-06-29 16:41:40 +02:00
Anthony Lapenna
4a0c899df5 Merge branch 'develop' into 'demo' 2017-06-20 13:24:29 +02:00
Anthony Lapenna
840603bb8c feat(settings): prevent the display of the URL field for custom templates 2017-06-05 09:56:04 +02:00
Anthony Lapenna
5fe79621a6 feat(settings): set a default value for custom templates 2017-06-05 09:51:01 +02:00
Anthony Lapenna
d3b9822105 Merge branch 'develop' into 'demo' 2017-06-05 09:45:06 +02:00
Anthony Lapenna
9163bcae25 Merge branch 'develop' into demo 2017-05-25 12:40:11 +02:00
Anthony Lapenna
17dad6e36f fix(api): prevent the deletion of the admin user 2017-05-23 21:51:30 +02:00
Anthony Lapenna
75b836453a merge branch 'develop' into demo 2017-05-23 21:06:50 +02:00
Anthony Lapenna
b8866d487f Merge branch 'develop' into demo 2017-04-06 11:02:27 +02:00
Anthony Lapenna
dfb3b3aaa1 Merge branch 'develop' into demo 2017-03-28 15:38:24 +02:00
Anthony Lapenna
09fdc9781c feat(demo): add demo restrictions 2017-03-14 08:47:57 +01:00
33 changed files with 205 additions and 130 deletions

View File

@@ -6,10 +6,10 @@ Some basic conventions for contributing to this project.
Please make sure that there aren't existing pull requests attempting to address the issue mentioned. Likewise, please check for issues related to update, as someone else may be working on the issue in a branch or fork.
* Please open a discussion in a new issue / existing issue to talk about the changes you'd like to bring
* Develop in a topic branch, not master/develop
- Please open a discussion in a new issue / existing issue to talk about the changes you'd like to bring
- Develop in a topic branch, not master/develop
When creating a new branch, prefix it with the *type* of the change (see section **Commit Message Format** below), the associated opened issue number, a dash and some text describing the issue (using dash as a separator).
When creating a new branch, prefix it with the _type_ of the change (see section **Commit Message Format** below), the associated opened issue number, a dash and some text describing the issue (using dash as a separator).
For example, if you work on a bugfix for the issue #361, you could name the branch `fix361-template-selection`.
@@ -37,14 +37,14 @@ Lines should not exceed 100 characters. This allows the message to be easier to
Must be one of the following:
* **feat**: A new feature
* **fix**: A bug fix
* **docs**: Documentation only changes
* **style**: Changes that do not affect the meaning of the code (white-space, formatting, missing
- **feat**: A new feature
- **fix**: A bug fix
- **docs**: Documentation only changes
- **style**: Changes that do not affect the meaning of the code (white-space, formatting, missing
semi-colons, etc)
* **refactor**: A code change that neither fixes a bug or adds a feature
* **test**: Adding missing tests
* **chore**: Changes to the build process or auxiliary tools and libraries such as documentation
- **refactor**: A code change that neither fixes a bug or adds a feature
- **test**: Adding missing tests
- **chore**: Changes to the build process or auxiliary tools and libraries such as documentation
generation
### Scope
@@ -57,9 +57,9 @@ You can use the **area** label tag associated on the issue here (for `area/conta
The subject contains succinct description of the change:
* use the imperative, present tense: "change" not "changed" nor "changes"
* don't capitalize first letter
* no dot (.) at the end
- use the imperative, present tense: "change" not "changed" nor "changes"
- don't capitalize first letter
- no dot (.) at the end
## Contribution process

View File

@@ -70,6 +70,45 @@ func initStore(dataStorePath string, fileService portainer.FileService) *bolt.St
return store
}
func initDemoData(store *bolt.Store, cryptoService portainer.CryptoService) error {
password, err := cryptoService.Hash("tryportainer")
if err != nil {
return err
}
admin := &portainer.User{
Username: "admin",
Password: password,
Role: portainer.AdministratorRole,
}
err = store.UserService.CreateUser(admin)
if err != nil {
return err
}
localEndpoint := &portainer.Endpoint{
ID: portainer.EndpointID(1),
Name: "local",
URL: "unix:///var/run/docker.sock",
PublicURL: "demo.portainer.io",
TLSConfig: portainer.TLSConfiguration{
TLS: false,
},
AuthorizedUsers: []portainer.UserID{},
AuthorizedTeams: []portainer.TeamID{},
Extensions: []portainer.EndpointExtension{},
Tags: []string{},
}
err = store.EndpointService.CreateEndpoint(localEndpoint)
if err != nil {
return err
}
return nil
}
func initComposeStackManager(dataStorePath string, reverseTunnelService portainer.ReverseTunnelService) portainer.ComposeStackManager {
return libcompose.NewComposeStackManager(dataStorePath, reverseTunnelService)
}
@@ -532,6 +571,8 @@ func main() {
cryptoService := initCryptoService()
initDemoData(store, cryptoService)
digitalSignatureService := initDigitalSignatureService()
err := initKeyPair(fileService, digitalSignatureService)

View File

@@ -89,6 +89,11 @@ const (
ErrUndefinedTLSFileType = Error("Undefined TLS file type")
)
// Demo errors.
const (
ErrNotAvailableInDemo = Error("This feature is not available in the demo version of Portainer")
)
// Extension errors.
const (
ErrExtensionAlreadyEnabled = Error("This extension is already enabled")

View File

@@ -21,6 +21,10 @@ func (handler *Handler) endpointDelete(w http.ResponseWriter, r *http.Request) *
return &httperror.HandlerError{http.StatusBadRequest, "Invalid endpoint identifier route variable", err}
}
if endpointID == 1 {
return &httperror.HandlerError{http.StatusForbidden, "This feature is not available in the demo version of Portainer", portainer.ErrNotAvailableInDemo}
}
endpoint, err := handler.EndpointService.Endpoint(portainer.EndpointID(endpointID))
if err == portainer.ErrObjectNotFound {
return &httperror.HandlerError{http.StatusNotFound, "Unable to find an endpoint with the specified identifier inside the database", err}

View File

@@ -22,6 +22,10 @@ func (handler *Handler) userDelete(w http.ResponseWriter, r *http.Request) *http
return &httperror.HandlerError{http.StatusInternalServerError, "Unable to retrieve user authentication token", err}
}
if userID == 1 {
return &httperror.HandlerError{http.StatusForbidden, "This feature is not available in the demo version of Portainer", portainer.ErrNotAvailableInDemo}
}
if tokenData.ID == portainer.UserID(userID) {
return &httperror.HandlerError{http.StatusForbidden, "Cannot remove your own user account. Contact another administrator", portainer.ErrAdminCannotRemoveSelf}
}

View File

@@ -29,6 +29,10 @@ func (handler *Handler) userUpdate(w http.ResponseWriter, r *http.Request) *http
return &httperror.HandlerError{http.StatusBadRequest, "Invalid user identifier route variable", err}
}
if userID == 1 {
return &httperror.HandlerError{http.StatusForbidden, "This feature is not available in the demo version of Portainer", portainer.ErrNotAvailableInDemo}
}
tokenData, err := security.RetrieveTokenData(r)
if err != nil {
return &httperror.HandlerError{http.StatusInternalServerError, "Unable to retrieve user authentication token", err}

View File

@@ -33,6 +33,10 @@ func (handler *Handler) userUpdatePassword(w http.ResponseWriter, r *http.Reques
return &httperror.HandlerError{http.StatusBadRequest, "Invalid user identifier route variable", err}
}
if userID == 1 {
return &httperror.HandlerError{http.StatusForbidden, "This feature is not available in the demo version of Portainer", portainer.ErrNotAvailableInDemo}
}
tokenData, err := security.RetrieveTokenData(r)
if err != nil {
return &httperror.HandlerError{http.StatusInternalServerError, "Unable to retrieve user authentication token", err}

View File

@@ -1,81 +1,82 @@
import _ from 'lodash-es';
angular.module('portainer.docker')
.controller('ContainerNetworksDatatableController', ['$scope', '$controller', 'DatatableService',
function ($scope, $controller, DatatableService) {
angular.module('portainer.docker').controller('ContainerNetworksDatatableController', [
'$scope',
'$controller',
'DatatableService',
function ($scope, $controller, DatatableService) {
angular.extend(this, $controller('GenericDatatableController', { $scope: $scope }));
this.state = Object.assign(this.state, {
expandedItems: [],
expandAll: true,
});
angular.extend(this, $controller('GenericDatatableController', { $scope: $scope }));
this.state = Object.assign(this.state, {
expandedItems: [],
expandAll: true
});
this.expandItem = function (item, expanded) {
if (!this.itemCanExpand(item)) {
return;
}
item.Expanded = expanded;
if (!expanded) {
item.Highlighted = false;
}
if (!item.Expanded) {
this.state.expandAll = false;
}
};
this.itemCanExpand = function (item) {
return item.GlobalIPv6Address !== '';
this.expandItem = function (item, expanded) {
if (!this.itemCanExpand(item)) {
return;
}
this.hasExpandableItems = function () {
return _.filter(this.dataset, (item) => this.itemCanExpand(item)).length;
};
item.Expanded = expanded;
if (!expanded) {
item.Highlighted = false;
}
if (!item.Expanded) {
this.state.expandAll = false;
}
};
this.expandAll = function () {
this.state.expandAll = !this.state.expandAll;
_.forEach(this.dataset, (item) => {
if (this.itemCanExpand(item)) {
this.expandItem(item, this.state.expandAll);
}
});
};
this.itemCanExpand = function (item) {
return item.GlobalIPv6Address !== '';
};
this.$onInit = function () {
this.setDefaults();
this.prepareTableFromDataset();
this.hasExpandableItems = function () {
return _.filter(this.dataset, (item) => this.itemCanExpand(item)).length;
};
this.state.orderBy = this.orderBy;
var storedOrder = DatatableService.getDataTableOrder(this.tableKey);
if (storedOrder !== null) {
this.state.reverseOrder = storedOrder.reverse;
this.state.orderBy = storedOrder.orderBy;
this.expandAll = function () {
this.state.expandAll = !this.state.expandAll;
_.forEach(this.dataset, (item) => {
if (this.itemCanExpand(item)) {
this.expandItem(item, this.state.expandAll);
}
});
};
var textFilter = DatatableService.getDataTableTextFilters(this.tableKey);
if (textFilter !== null) {
this.state.textFilter = textFilter;
this.onTextFilterChange();
}
this.$onInit = function () {
this.setDefaults();
this.prepareTableFromDataset();
var storedFilters = DatatableService.getDataTableFilters(this.tableKey);
if (storedFilters !== null) {
this.filters = storedFilters;
}
if (this.filters && this.filters.state) {
this.filters.state.open = false;
}
this.state.orderBy = this.orderBy;
var storedOrder = DatatableService.getDataTableOrder(this.tableKey);
if (storedOrder !== null) {
this.state.reverseOrder = storedOrder.reverse;
this.state.orderBy = storedOrder.orderBy;
}
var storedSettings = DatatableService.getDataTableSettings(this.tableKey);
if (storedSettings !== null) {
this.settings = storedSettings;
this.settings.open = false;
}
var textFilter = DatatableService.getDataTableTextFilters(this.tableKey);
if (textFilter !== null) {
this.state.textFilter = textFilter;
this.onTextFilterChange();
}
_.forEach(this.dataset, (item) => {
item.Expanded = true;
item.Highlighted = true;
});
};
}
]);
var storedFilters = DatatableService.getDataTableFilters(this.tableKey);
if (storedFilters !== null) {
this.filters = storedFilters;
}
if (this.filters && this.filters.state) {
this.filters.state.open = false;
}
var storedSettings = DatatableService.getDataTableSettings(this.tableKey);
if (storedSettings !== null) {
this.settings = storedSettings;
this.settings.open = false;
}
_.forEach(this.dataset, (item) => {
item.Expanded = true;
item.Highlighted = true;
});
};
},
]);

View File

@@ -38,7 +38,14 @@
<div class="form-group col-md-12">
<label for="nfs_mountpoint" class="col-sm-2 col-md-1 control-label text-left">Mount point</label>
<div class="col-sm-10 col-md-11">
<input type="text" class="form-control" ng-model="$ctrl.data.mountPoint" name="nfs_mountpoint" placeholder="e.g. /export/share, :/export/share, /share or :/share" required />
<input
type="text"
class="form-control"
ng-model="$ctrl.data.mountPoint"
name="nfs_mountpoint"
placeholder="e.g. /export/share, :/export/share, /share or :/share"
required
/>
</div>
</div>
<div class="form-group col-md-12" ng-show="nfsInformationForm.nfs_mountpoint.$invalid">

View File

@@ -1,4 +1,4 @@
import { ContainerDetailsViewModel, ContainerViewModel, ContainerStatsViewModel } from '../models/container';
import { ContainerDetailsViewModel, ContainerStatsViewModel, ContainerViewModel } from '../models/container';
angular.module('portainer.docker').factory('ContainerService', [
'$q',

View File

@@ -99,7 +99,6 @@
<td colspan="2">
<p class="small text-muted" authorization="DockerServiceUpdate">
Note: you can only rollback one level of changes. Clicking the rollback button without making a new change will undo your previous rollback </p
><p>
<a
authorization="DockerServiceLogs"

View File

@@ -72,9 +72,7 @@
<input type="checkbox" name="useNFS" ng-model="formValues.NFSData.useNFS" ng-click="formValues.CIFSData.useCIFS = false" />
<i></i>
</label>
<div ng-if="formValues.NFSData.useNFS" class="small text-muted" style="margin-top: 10px;">
Ensure <code>nfs-utils</code> are installed on your hosts.
</div>
<div ng-if="formValues.NFSData.useNFS" class="small text-muted" style="margin-top: 10px;"> Ensure <code>nfs-utils</code> are installed on your hosts. </div>
</div>
<volumes-nfs-form data="formValues.NFSData" ng-show="formValues.Driver === 'local'"></volumes-nfs-form>
<!-- !nfs-management -->
@@ -87,9 +85,7 @@
<input type="checkbox" name="useCIFS" ng-model="formValues.CIFSData.useCIFS" ng-click="formValues.NFSData.useNFS = false" />
<i></i>
</label>
<div ng-if="formValues.CIFSData.useCIFS" class="small text-muted" style="margin-top: 10px;">
Ensure <code>cifs-utils</code> are installed on your hosts.
</div>
<div ng-if="formValues.CIFSData.useCIFS" class="small text-muted" style="margin-top: 10px;"> Ensure <code>cifs-utils</code> are installed on your hosts. </div>
</div>
<volumes-cifs-form data="formValues.CIFSData" ng-show="formValues.Driver === 'local'"></volumes-cifs-form>
<!-- !cifs-management -->

View File

@@ -1,16 +1,10 @@
<ui-select
multiple
ng-model="$ctrl.model"
close-on-select="false"
>
<ui-select multiple ng-model="$ctrl.model" close-on-select="false">
<ui-select-match placeholder="Select one or multiple group(s)">
<span>
{{ $item.Name }}
</span>
</ui-select-match>
<ui-select-choices
repeat="item.Id as item in $ctrl.items | filter: { Name: $select.search }"
>
<ui-select-choices repeat="item.Id as item in $ctrl.items | filter: { Name: $select.search }">
<span>
{{ item.Name }}
</span>

View File

@@ -2,6 +2,6 @@ angular.module('portainer.edge').component('edgeGroupsSelector', {
templateUrl: './edge-groups-selector.html',
bindings: {
model: '=',
items: '<'
}
items: '<',
},
});

View File

@@ -1,8 +1,4 @@
import {
RoleViewModel,
// EndpointRoleCreateRequest,
// EndpointRoleUpdateRequest
} from '../models/role';
import { RoleViewModel } from '../models/role';
angular.module('portainer.extensions.rbac').factory('RoleService', [
'$q',

View File

@@ -1,4 +1,5 @@
import _ from 'lodash-es';
export function RegistryRepositoryViewModel(item) {
if (item.name && item.tags) {
this.Name = item.name;

View File

@@ -1,6 +1,5 @@
import _ from 'lodash-es';
import { RepositoryShortTag } from '../models/repositoryTag';
import { RepositoryAddTagPayload } from '../models/repositoryTag';
import { RepositoryAddTagPayload, RepositoryShortTag } from '../models/repositoryTag';
import { RegistryRepositoryViewModel } from '../models/registryRepository';
import genericAsyncGenerator from './genericAsyncGenerator';

View File

@@ -1,5 +1,5 @@
import _ from 'lodash-es';
import { RepositoryTagViewModel, RepositoryShortTag } from '../../../models/repositoryTag';
import { RepositoryShortTag, RepositoryTagViewModel } from '../../../models/repositoryTag';
angular.module('portainer.app').controller('RegistryRepositoryController', [
'$q',

View File

@@ -1,4 +1,4 @@
import { StoridgeNodeModel, StoridgeNodeDetailedModel } from '../models/node';
import { StoridgeNodeDetailedModel, StoridgeNodeModel } from '../models/node';
angular.module('portainer.integrations.storidge').factory('StoridgeNodeService', [
'$q',

View File

@@ -1,6 +1,6 @@
import _ from 'lodash-es';
import { ResourceControlOwnership as RCO } from 'Portainer/models/resourceControl/resourceControlOwnership';
import { ResourceControlTypeString as RCTS, ResourceControlTypeInt as RCTI } from 'Portainer/models/resourceControl/resourceControlTypes';
import { ResourceControlTypeInt as RCTI, ResourceControlTypeString as RCTS } from 'Portainer/models/resourceControl/resourceControlTypes';
import { AccessControlPanelData } from './porAccessControlPanelModel';
angular.module('portainer.app').controller('porAccessControlPanelController', [

View File

@@ -5,11 +5,7 @@
<span ng-if="$item.TagIds.length"> - <i class="fa fa-tags"></i> {{ $ctrl.tagIdsToTagNames($item.TagIds) | arraytostr }}</span>
</span>
</ui-select-match>
<ui-select-choices
group-by="$ctrl.groupEndpoints"
group-filter="$ctrl.sortGroups"
repeat="endpoint.Id as endpoint in $ctrl.endpoints | filter: { Name: $select.search }"
>
<ui-select-choices group-by="$ctrl.groupEndpoints" group-filter="$ctrl.sortGroups" repeat="endpoint.Id as endpoint in $ctrl.endpoints | filter: { Name: $select.search }">
<span>
{{ endpoint.Name }}
<span ng-if="endpoint.TagIds.length"> - <i class="fa fa-tags"></i> {{ $ctrl.tagIdsToTagNames(endpoint.TagIds) | arraytostr }}</span>

View File

@@ -1,5 +1,5 @@
import _ from 'lodash-es';
import { createStatus } from '../../docker/models/container';
import {createStatus} from '../../docker/models/container';
export function ScheduleDefaultModel() {
this.Name = '';

View File

@@ -1,6 +1,5 @@
import _ from 'lodash-es';
import { UserAccessViewModel } from '../../models/access';
import { TeamAccessViewModel } from '../../models/access';
import { TeamAccessViewModel, UserAccessViewModel } from '../../models/access';
angular.module('portainer.app').factory('AccessService', [
'$q',

View File

@@ -1,7 +1,7 @@
import _ from 'lodash-es';
import { PorImageRegistryModel } from 'Docker/models/porImageRegistry';
import { RegistryTypes } from 'Extensions/registry-management/models/registryTypes';
import { RegistryViewModel, RegistryCreateRequest } from '../../models/registry';
import { RegistryCreateRequest, RegistryViewModel } from '../../models/registry';
angular.module('portainer.app').factory('RegistryService', [
'$q',

View File

@@ -1,4 +1,4 @@
import { ScheduleModel, ScheduleCreateRequest, ScheduleUpdateRequest, ScriptExecutionTaskModel } from '../../models/schedule';
import { ScheduleCreateRequest, ScheduleModel, ScheduleUpdateRequest, ScriptExecutionTaskModel } from '../../models/schedule';
angular.module('portainer.app').factory('ScheduleService', [
'$q',

View File

@@ -1,4 +1,4 @@
import { SettingsViewModel, PublicSettingsViewModel } from '../../models/settings';
import { PublicSettingsViewModel, SettingsViewModel } from '../../models/settings';
angular.module('portainer.app').factory('SettingsService', [
'$q',

View File

@@ -1,5 +1,5 @@
import _ from 'lodash-es';
import { StackViewModel, ExternalStackViewModel } from '../../models/stack';
import { ExternalStackViewModel, StackViewModel } from '../../models/stack';
angular.module('portainer.app').factory('StackService', [
'$q',

View File

@@ -1,4 +1,4 @@
import { TemplateViewModel, TemplateCreateRequest, TemplateUpdateRequest } from '../../models/template';
import { TemplateCreateRequest, TemplateUpdateRequest, TemplateViewModel } from '../../models/template';
angular.module('portainer.app').factory('TemplateService', [
'$q',

View File

@@ -91,12 +91,11 @@ angular.module('portainer.app').factory('FileUploadService', [
data: {
file: file,
Name: stackName,
EdgeGroups: Upload.json(edgeGroups)
EdgeGroups: Upload.json(edgeGroups),
},
ignoreLoadingBar: true
ignoreLoadingBar: true,
});
};
service.configureRegistry = function (registryId, registryManagementConfigurationModel) {
return Upload.upload({

View File

@@ -3,6 +3,17 @@
<rd-header-content>User settings</rd-header-content>
</rd-header>
<div class="row" ng-if="UserId === 1">
<div class="col-lg-12 col-md-12 col-xs-12">
<rd-widget>
<rd-widget-header icon="fa-exclamation-triangle" title="Feature not available"> </rd-widget-header>
<rd-widget-body>
<span class="small text-muted">You cannot change the password of this account in the demo version of Portainer.</span>
</rd-widget-body>
</rd-widget>
</div>
</div>
<div class="row">
<div class="col-lg-12 col-md-12 col-xs-12">
<rd-widget>

View File

@@ -36,10 +36,10 @@
<div style="margin-top: 10px;">
<uib-tabset active="state.deploymentTab">
<uib-tab index="0" heading="Standalone">
<code style="display: block; white-space: pre-wrap; padding: 16px 90px;">{{dockerCommands.standalone}}</code>
<code style="display: block; white-space: pre-wrap; padding: 16px 90px;">{{ dockerCommands.standalone }}</code>
</uib-tab>
<uib-tab index="1" heading="Swarm">
<code style="display: block; white-space: pre-wrap; padding: 16px 90px;">{{dockerCommands.swarm}}</code>
<code style="display: block; white-space: pre-wrap; padding: 16px 90px;">{{ dockerCommands.swarm }}</code>
</uib-tab>
</uib-tabset>
<div style="margin-top: 10px;">

View File

@@ -3,6 +3,17 @@
<rd-header-content>Settings</rd-header-content>
</rd-header>
<div class="row" ng-if="UserId === 1">
<div class="col-lg-12 col-md-12 col-xs-12">
<rd-widget>
<rd-widget-header icon="fa-exclamation-triangle" title="Feature not available"> </rd-widget-header>
<rd-widget-body>
<span class="small text-muted">You cannot change the password of this account in the demo version of Portainer.</span>
</rd-widget-body>
</rd-widget>
</div>
</div>
<div class="row">
<div class="col-sm-12">
<rd-widget>
@@ -23,7 +34,10 @@
<label for="toggle_logo" class="control-label text-left">
Use custom logo
</label>
<label class="switch" style="margin-left: 20px;"> <input type="checkbox" name="toggle_logo" ng-model="formValues.customLogo" /><i></i> </label>
<label class="switch" style="margin-left: 20px;"> <input type="checkbox" disabled name="toggle_logo" ng-model="formValues.customLogo" /><i></i> </label>
</div>
<div class="col-sm-12">
<span class="small text-muted">You cannot use this feature in the demo version of Portainer.</span>
</div>
</div>
<div ng-if="formValues.customLogo">

View File

@@ -15,7 +15,6 @@ import 'angular-moment-picker/dist/angular-moment-picker.min.css';
import 'angular-multiselect/isteven-multi-select.css';
import angular from 'angular';
window.angular = angular;
import 'moment';
import '@uirouter/angularjs';
import 'ui-select';
@@ -39,3 +38,5 @@ import 'js-yaml/dist/js-yaml.js';
import 'angular-ui-bootstrap';
import 'angular-moment-picker';
import 'angular-multiselect/isteven-multi-select.js';
window.angular = angular;