-
Notifications
You must be signed in to change notification settings - Fork 375
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
New CatalogFunctions and YourDataYourRegions #4861
Comments
YourDataYourRegionsHow to try out
Then:
PRsMobx dimension selector + add WMS Dimensions + TableMixin manual reigon mapping MERGED Next: Add header option to loadText MERGED Mobx dragdrop file fix MERGED Mobx Legend improvements for TableMixin MERGED
Mobxify MapboxVectorTileCatalogItem WIP Potential Issues
Things to discuss
To be done for National Map release TerriaJS/nationalmap#968 |
Thoughts
All done! |
@KeyboardSounds & @na9da to first review assumptions / context surrounding this, before looking at the PR |
The While a good thing to have, is the following a common scenario?
|
This was a requirement for YDYR, and would have been common for proposed work with Mahesh (that hasn't happened yet) |
The architecture you've outlined here makes a lot of sense to me! I don't think I could have done better myself 😉 I particularly appreciate the attention you've paid to making this work with sharing. You should turn it into an ADR and stick it into the repo itself for posterity so that we don't lose it in the multitude of GitHub issues. |
This is the only big UI change I would make to v1. The way job info is currently displayed is really confusing because you don't know what each job actually produced. As a quick fix, I'd stick all of that job info into each result catalog item under a "Click to Expand" panel. Even though this results in duplication of information, I think it's still easier for users to understand. Also, put it in a monospace font, with a different colour background, to distinguish it from UI text. I don't think the workbench should be the permanent home of job info at all, but I think that's going to take some implementing that is probably beyond the scope of v1. |
Yep I agree with this, but I think we should get some UI/UX people onto it - which is why I have tried to not make massive changes to the UI |
Closing! |
Next Catalog Function
Intro
Catalog functions have function parameters, which are rendered as a form. The user then creates catalog function jobs with the form.
Catalog function jobs take those parameters, perform some unit of work (usually on a server), download results, and show results as catalog items - all job state is handled by catalog function job (eg starting, polling, error handling...)
Why
FunctionParameter
state) - so values entered by user in form are savedjobStatus
- inactive, running, finished...)CatalogFunction
andCatalogFunctionJob
to make creating catalog functions easierFunctionParameters
FunctionParameters
Similar to
SelectableDimensions
, but is a class instead of interface, and it wraps up interaction withCatalogFunctionMixin's
parameters
trait - it has asetValue
andclearValue
method which setscatalogFunction.parameters[functionParameter.id]
A few examples of function parameters:
DateTimeParameter
StringParameter
PolygonParameter
CatalogFunctionMixin
function parameters are defined in the implementation'sget functionParameters(): FunctionParameter[]
Function parameters should be stateless other than the
parameters
trait (or other traits attached to theCatalogFunctionMixin
, as they may be deleted and re-created as other observable/computed properties change.For more info see CatalogFunctionMixin#functionParameters
CatalogFunctionMixin
Extends
CatalogMemberMixin
- adds the following:parameters:JsonValue
traitContains values for
functionParameters
.functionParameters
Function parameters are rendered as
ParameterEditors
, their values directly map to theparameters
trait. When aFunctionParameter
value is modified, it will automatically updateparameters
trait.When a job is created, the
parameters
are copied across automatically (seeCatalogFunctionMixin#submitJob
)createJob()
Note:
name
andparameters
traits are automatically copied across when submitted (seeCatalogFunctionMixin#submitJob
)All user-configured job parameters should be in the
parameters
trait, this is the ensure that function parameter state behaves correctly, and that values can be easily copied across jobs.Other job traits can be set in this function, as long as they aren't related to function parameters - for example the
url
andprocessIdentier
trait for WPS are copied from the WPSCatalogFunction.submitJob()
Submit job:
CatalogFunctionMixin#createJob
name
,parameters
,jobStatus
, ...)CatalogFunctionJobMixin#invoke
CatalogFunctionJobMixin
Extends
AutoRefreshTraits
(to handle polling for job results),CatalogFunctionTraits
(which only containsparameters
trait) and adds the following:logs: string[]
traitFor log messages
jobStatus: "inactive" | "running" | "error" | "finished"
traitjobStatus
should not be modified outside ofCatalogFunctionJobMixin
_invoke()
Must be implemented.
Returns
true
for FINISHED,false
for RUNNING (will then callpollForResults
)invoke()
This wraps up
_invoke()
and handles changes tojobStatus
andrefreshEnabled
based on return value of_invoke()
pollForResults()
Called every
refreshInterval
. Usually here you would poll a server for job status (for example WPS)This returns
true
if job has finished,false
otherwise (which will continue polling).If the job "fails" -
setOnError(message:string)
is calledThis behaves like AutoRefreshMixin's
refreshData
(implemented inCatalogFunctionJobMixin
)onJobFinish()
This handles downloading job results, it can be triggered three ways:
_invoke()
returnstrue
(see CatalogFunctionJobMixin#invoke)pollForResults()
returnstrue
(see CatalogFunctionJobMixin#refreshData)loadMetadata
ifjobStatus
is "finished", and!downloadedResults
(see CatalogFunctionJobMixin#forceLoadMetadata)downloadResults()
Called in
onJobFinish()
returns catalog members which are added to the workbench
results
Job result
CatalogMembers
- set from callingCatalogFunctionJobMixin#downloadResults
(inCatalogFunctionJobMixin#onJobFinish
)Job history
Jobs are added to the My Data tab when submitted - they act like Catalog Groups - all results are members of the
CatalogFunctionJob
PRs
Add show to ShortReportTraits and Tsxify ShortReport MERGED
Add refreshEnabled trait and AsyncMappableMixin to AutoRefreshMixin MERGED
Issues
Things to discuss / Further development
ShortReportsSection
UI issues... - where should logs go?InfoParameters
as error messages is questionableA
CatalogFunctionJob
can create multipleCatalogItem
s for resultsCatalogFunctionJob
(or mappableGroupMixin
) with its child layers?To be done for National Map release TerriaJS/nationalmap#968
The text was updated successfully, but these errors were encountered: