mirror of https://github.com/portainer/portainer
Merge branch 'develop' into oath-poc
commit
17cf374c30
|
@ -180,7 +180,7 @@ func loadEndpointSyncSystemSchedule(jobScheduler portainer.JobScheduler, schedul
|
||||||
|
|
||||||
endpointSyncJob := &portainer.EndpointSyncJob{}
|
endpointSyncJob := &portainer.EndpointSyncJob{}
|
||||||
|
|
||||||
endointSyncSchedule := &portainer.Schedule{
|
endpointSyncSchedule := &portainer.Schedule{
|
||||||
ID: portainer.ScheduleID(scheduleService.GetNextIdentifier()),
|
ID: portainer.ScheduleID(scheduleService.GetNextIdentifier()),
|
||||||
Name: "system_endpointsync",
|
Name: "system_endpointsync",
|
||||||
CronExpression: "@every " + *flags.SyncInterval,
|
CronExpression: "@every " + *flags.SyncInterval,
|
||||||
|
@ -191,14 +191,14 @@ func loadEndpointSyncSystemSchedule(jobScheduler portainer.JobScheduler, schedul
|
||||||
}
|
}
|
||||||
|
|
||||||
endpointSyncJobContext := cron.NewEndpointSyncJobContext(endpointService, *flags.ExternalEndpoints)
|
endpointSyncJobContext := cron.NewEndpointSyncJobContext(endpointService, *flags.ExternalEndpoints)
|
||||||
endpointSyncJobRunner := cron.NewEndpointSyncJobRunner(endointSyncSchedule, endpointSyncJobContext)
|
endpointSyncJobRunner := cron.NewEndpointSyncJobRunner(endpointSyncSchedule, endpointSyncJobContext)
|
||||||
|
|
||||||
err = jobScheduler.ScheduleJob(endpointSyncJobRunner)
|
err = jobScheduler.ScheduleJob(endpointSyncJobRunner)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
return scheduleService.CreateSchedule(endointSyncSchedule)
|
return scheduleService.CreateSchedule(endpointSyncSchedule)
|
||||||
}
|
}
|
||||||
|
|
||||||
func loadSchedulesFromDatabase(jobScheduler portainer.JobScheduler, jobService portainer.JobService, scheduleService portainer.ScheduleService, endpointService portainer.EndpointService, fileService portainer.FileService) error {
|
func loadSchedulesFromDatabase(jobScheduler portainer.JobScheduler, jobService portainer.JobService, scheduleService portainer.ScheduleService, endpointService portainer.EndpointService, fileService portainer.FileService) error {
|
||||||
|
|
|
@ -457,6 +457,16 @@ angular.module('portainer.app', [])
|
||||||
var templates = {
|
var templates = {
|
||||||
name: 'portainer.templates',
|
name: 'portainer.templates',
|
||||||
url: '/templates',
|
url: '/templates',
|
||||||
|
resolve: {
|
||||||
|
endpointID: ['EndpointProvider', '$state',
|
||||||
|
function (EndpointProvider, $state) {
|
||||||
|
var id = EndpointProvider.endpointID();
|
||||||
|
if (!id) {
|
||||||
|
return $state.go('portainer.home');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
views: {
|
views: {
|
||||||
'content@': {
|
'content@': {
|
||||||
templateUrl: 'app/portainer/views/templates/templates.html',
|
templateUrl: 'app/portainer/views/templates/templates.html',
|
||||||
|
|
|
@ -36,7 +36,7 @@
|
||||||
"angular-clipboard": "^1.6.2",
|
"angular-clipboard": "^1.6.2",
|
||||||
"angular-cookies": "~1.5.0",
|
"angular-cookies": "~1.5.0",
|
||||||
"angular-file-saver": "^1.1.3",
|
"angular-file-saver": "^1.1.3",
|
||||||
"angular-google-analytics": "github:revolunet/angular-google-analytics#~1.1.9",
|
"angular-google-analytics": "github:revolunet/angular-google-analytics#semver:~1.1.9",
|
||||||
"angular-json-tree": "1.0.1",
|
"angular-json-tree": "1.0.1",
|
||||||
"angular-jwt": "~0.1.8",
|
"angular-jwt": "~0.1.8",
|
||||||
"angular-loading-bar": "~0.9.0",
|
"angular-loading-bar": "~0.9.0",
|
||||||
|
@ -62,8 +62,8 @@
|
||||||
"moment": "^2.21.0",
|
"moment": "^2.21.0",
|
||||||
"ng-file-upload": "~12.2.13",
|
"ng-file-upload": "~12.2.13",
|
||||||
"rdash-ui": "1.0.*",
|
"rdash-ui": "1.0.*",
|
||||||
"splitargs": "github:deviantony/splitargs#~0.2.0",
|
"splitargs": "github:deviantony/splitargs#semver:~0.2.0",
|
||||||
"toastr": "github:CodeSeven/toastr#~2.1.3",
|
"toastr": "github:CodeSeven/toastr#semver:~2.1.3",
|
||||||
"ui-select": "^0.19.8",
|
"ui-select": "^0.19.8",
|
||||||
"xterm": "^3.8.0"
|
"xterm": "^3.8.0"
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue