Ejemplo n.º 1
0
        public IActionResult Populate(string topicname)
        {
            var text = AvroHelper.PopulateAvroJson(_schema[topicname]);

            return(View("Produce", new ProducerViewModel
            {
                TopicNames = FIleHelper.GetAllFiles(_settings.SchemaDirectory, Constants.AvroSchemaFileExtension)
            }));
        }
Ejemplo n.º 2
0
        public IActionResult Produce(string topicname = null)
        {
            var topics = FIleHelper.GetAllFiles(_settings.SchemaDirectory, Constants.AvroSchemaFileExtension);

            if (string.IsNullOrEmpty(topicname))
            {
                return(View(new ProducerViewModel
                {
                    TopicNames = topics
                }));
            }

            return(View(new ProducerViewModel
            {
                TopicNames = FIleHelper.GetAllFiles(_settings.SchemaDirectory, Constants.AvroSchemaFileExtension),
                CurrentTopic = topicname,
                AvroJson = _schema.ContainsKey(topicname) ? AvroHelper.PopulateAvroJson(_schema[topicname]) : string.Empty
            }));
        }