[Pkg] Sake : Sake-SchedulerSeaside-kph.1.mcz
squeak-dev-noreply at lists.squeakfoundation.org
squeak-dev-noreply at lists.squeakfoundation.org
Mon Jul 20 19:08:31 UTC 2009
A new version of Sake-SchedulerSeaside was added to project Sake :
http://www.squeaksource.com/Sake/Sake-SchedulerSeaside-kph.1.mcz
==================== Summary ====================
Name: Sake-SchedulerSeaside-kph.1
Author: kph
Time: 20 July 2009, 8:08:29 pm
UUID: 68406afe-f643-44fb-a75e-69c298318ad2
Ancestors:
Seaside control panel for Sake/Scheduler
==================== Snapshot ====================
SystemOrganization addCategory: #'Sake-SchedulerSeaside'!
WAComponent subclass: #SakeSchedulerComponent
instanceVariableNames: ''
classVariableNames: ''
poolDictionaries: ''
category: 'Sake-SchedulerSeaside'!
----- Method: SakeSchedulerComponent>>renderContentOn: (in category 'as yet unclassified') -----
renderContentOn: html
| allServices |
html preformatted: self scheduler printString.
self scheduler isRunning
ifFalse: [
html anchor
on: #start of: self.
]
ifTrue: [
html anchor
on: #stop of: self.
].
html table: [
html tableRow: [
html tableHeading: 'Class'.
html tableHeading: 'Description'.
html tableHeading: 'Status'.
html tableHeading: 'Next Run Time'.
html tableHeading: 'Last Run Time'.
html tableHeading: 'Control'.
].
allServices := (self scheduler class allServices gather: [ :ea | ea services ]) asOrderedCollection.
self scheduler tasksDo: [ :task |
html tableRow: [ self renderTask: task on: html ].
allServices remove: task.
].
allServices do: [ :task |
html tableRow: [ self renderTask: task on: html ]
].
]!
----- Method: SakeSchedulerComponent>>renderTask:on: (in category 'as yet unclassified') -----
renderTask: task on: html
html tableData
title: task description;
with: [
html render: task class name
].
html tableData
title: task description;
with: [
html render: task name
].
html tableData: [
task isScheduled ifFalse: [ html render: '--']
ifTrue: [
self scheduler isRunning ifFalse: [ html render: 'paused' ].
task isRunning ifTrue: [ html render: 'RUNNING'].
task isSuspended ifTrue: [ html render:'(suspended)'].
]
].
html tableData: [
task isScheduled ifTrue: [
html render: task nextRunTime asTimeStamp asString
].
].
html tableData: [
task isScheduled ifTrue: [
html render: task printLastRunTime
]
].
html tableData: [
task isRunning ifTrue: [
html space anchor
callback: [ self taskSuspend: task ];
with: 'Suspend'.
html space anchor
callback: [ self taskTerminate: task ];
with: 'Stop'.
]
ifFalse: [
html space anchor
callback: [ self taskRun: task ];
with: 'Run Now'.
].
task isScheduled ifFalse: [
html space anchor
callback: [ self taskAdd: task ];
with: 'Schedule'.
] ifTrue: [
html space anchor
callback: [ self taskDelete: task ];
with: 'Unschedule'.
].
].!
----- Method: SakeSchedulerComponent>>scheduler (in category 'as yet unclassified') -----
scheduler
^ Scheduler default!
----- Method: SakeSchedulerComponent>>start (in category 'as yet unclassified') -----
start
^ self scheduler start!
----- Method: SakeSchedulerComponent>>stop (in category 'as yet unclassified') -----
stop
^ self scheduler stop!
----- Method: SakeSchedulerComponent>>taskAdd: (in category 'as yet unclassified') -----
taskAdd: aTask
self scheduler addTask: aTask!
----- Method: SakeSchedulerComponent>>taskDelete: (in category 'as yet unclassified') -----
taskDelete: aTask
aTask delete!
----- Method: SakeSchedulerComponent>>taskDoNow: (in category 'as yet unclassified') -----
taskDoNow: aTask
aTask run!
----- Method: SakeSchedulerComponent>>taskRun: (in category 'as yet unclassified') -----
taskRun: aTask
aTask run!
----- Method: SakeSchedulerComponent>>taskSuspend: (in category 'as yet unclassified') -----
taskSuspend: aTask
aTask suspend!
----- Method: SakeSchedulerComponent>>taskTerminate: (in category 'as yet unclassified') -----
taskTerminate: aTask
aTask stop!
More information about the Packages
mailing list