Merge branch 'develop' into oath-poc

pull/2749/head
Anthony Lapenna 2019-02-17 16:39:23 +13:00
commit 17cf374c30
3 changed files with 16 additions and 6 deletions

View File

@ -180,7 +180,7 @@ func loadEndpointSyncSystemSchedule(jobScheduler portainer.JobScheduler, schedul
endpointSyncJob := &portainer.EndpointSyncJob{}
endointSyncSchedule := &portainer.Schedule{
endpointSyncSchedule := &portainer.Schedule{
ID: portainer.ScheduleID(scheduleService.GetNextIdentifier()),
Name: "system_endpointsync",
CronExpression: "@every " + *flags.SyncInterval,
@ -191,14 +191,14 @@ func loadEndpointSyncSystemSchedule(jobScheduler portainer.JobScheduler, schedul
}
endpointSyncJobContext := cron.NewEndpointSyncJobContext(endpointService, *flags.ExternalEndpoints)
endpointSyncJobRunner := cron.NewEndpointSyncJobRunner(endointSyncSchedule, endpointSyncJobContext)
endpointSyncJobRunner := cron.NewEndpointSyncJobRunner(endpointSyncSchedule, endpointSyncJobContext)
err = jobScheduler.ScheduleJob(endpointSyncJobRunner)
if err != nil {
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 {

View File

@ -457,6 +457,16 @@ angular.module('portainer.app', [])
var templates = {
name: 'portainer.templates',
url: '/templates',
resolve: {
endpointID: ['EndpointProvider', '$state',
function (EndpointProvider, $state) {
var id = EndpointProvider.endpointID();
if (!id) {
return $state.go('portainer.home');
}
}
]
},
views: {
'content@': {
templateUrl: 'app/portainer/views/templates/templates.html',

View File

@ -36,7 +36,7 @@
"angular-clipboard": "^1.6.2",
"angular-cookies": "~1.5.0",
"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-jwt": "~0.1.8",
"angular-loading-bar": "~0.9.0",
@ -62,8 +62,8 @@
"moment": "^2.21.0",
"ng-file-upload": "~12.2.13",
"rdash-ui": "1.0.*",
"splitargs": "github:deviantony/splitargs#~0.2.0",
"toastr": "github:CodeSeven/toastr#~2.1.3",
"splitargs": "github:deviantony/splitargs#semver:~0.2.0",
"toastr": "github:CodeSeven/toastr#semver:~2.1.3",
"ui-select": "^0.19.8",
"xterm": "^3.8.0"
},