public IActionResult Index() { return(View(new DashboardViewModel { SchemaNames = FIleHelper.GetAllFiles(_settings.SchemaDirectory, Constants.AvroSchemaFileExtension), TypeNames = FIleHelper.GetAllFiles(_settings.MessageTypeDirectory, Constants.AvroTypeFileExtension, true) })); }
public IActionResult Populate(string topicname) { var text = AvroHelper.PopulateAvroJson(_schema[topicname]); return(View("Produce", new ProducerViewModel { TopicNames = FIleHelper.GetAllFiles(_settings.SchemaDirectory, Constants.AvroSchemaFileExtension) })); }
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 })); }