def getYamlDictForAllResourcesOf(self, resourceId): """ Get a dictionary with all resources with data to be YAMLed. It returns a dictionary with data that can be processed by the yaml module. """ resourceTag = config.getResourceTag(config.getResourceFromId(resourceId)) resourceList = [resource.getYamlDict()[resourceId] for resource in self.resources if resourceId in resource.getResourceId()] return {resourceTag: resourceList} if resourceList else {}
def OnClickConfig(self, ev): """ OnClick any resource button event handler. It handles events when a resource button is clicked. Dialog for the given resource will be launched. """ resId = ev.GetEventObject().Label resource = config.getResourceFromId(resId) dialog = configDialog.ConfigDialog(self, -1, resource) self._createResource(dialog)