Esempio n. 1
0
 public IActionResult Index()
 {
     return(View(new DashboardViewModel
     {
         SchemaNames = FIleHelper.GetAllFiles(_settings.SchemaDirectory, Constants.AvroSchemaFileExtension),
         TypeNames = FIleHelper.GetAllFiles(_settings.MessageTypeDirectory, Constants.AvroTypeFileExtension, true)
     }));
 }
Esempio n. 2
0
        public IActionResult Populate(string topicname)
        {
            var text = AvroHelper.PopulateAvroJson(_schema[topicname]);

            return(View("Produce", new ProducerViewModel
            {
                TopicNames = FIleHelper.GetAllFiles(_settings.SchemaDirectory, Constants.AvroSchemaFileExtension)
            }));
        }
Esempio n. 3
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
            }));
        }