component updates
This commit is contained in:
parent
82fd03fde8
commit
d792b3aec9
@ -1,18 +0,0 @@
|
||||
@page "/counter"
|
||||
|
||||
<PageTitle>Counter</PageTitle>
|
||||
|
||||
<h1>Counter</h1>
|
||||
|
||||
<p role="status">Current count: @currentCount</p>
|
||||
|
||||
<button class="btn btn-primary" @onclick="IncrementCount">Click me</button>
|
||||
|
||||
@code {
|
||||
private int currentCount = 0;
|
||||
|
||||
private void IncrementCount()
|
||||
{
|
||||
currentCount++;
|
||||
}
|
||||
}
|
||||
@ -13,7 +13,7 @@
|
||||
<div class="col-12">
|
||||
<div class="form-group">
|
||||
<label for="imageName">Image Name</label>
|
||||
<input type="text" class="form-control" id="imageName" @bind="ModuleConfig.ImageName" />
|
||||
<input type="text" class="form-control" id="imageName" name="ImageName" @bind="ModuleConfig.ImageName" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -29,14 +29,14 @@
|
||||
<div class="card-body">
|
||||
<div class="form-group">
|
||||
<label for="key1">Key</label>
|
||||
<input type="text" class="form-control" id="key1" @bind="Key1" />
|
||||
<input type="text" class="form-control" name="env_key" @bind="Key1" />
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="value1">Value</label>
|
||||
<input type="text" class="form-control" id="value1" @bind="Value1" />
|
||||
<input type="text" class="form-control" name="env_val" @bind="Value1" />
|
||||
</div>
|
||||
<button class="btn btn-primary" @onclick="AddKeyValuePair1">Add</button>
|
||||
<table class="table mt-2">
|
||||
<table class="table mt-2" name="env_table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Key</th>
|
||||
@ -64,14 +64,14 @@
|
||||
<div class="card-body">
|
||||
<div class="form-group">
|
||||
<label for="key2">Key</label>
|
||||
<input type="text" class="form-control" id="key2" @bind="Key2" />
|
||||
<input type="text" class="form-control" name="vol_key" @bind="Key2" />
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="value2">Value</label>
|
||||
<input type="text" class="form-control" id="value2" @bind="Value2" />
|
||||
<input type="text" class="form-control" name="vol_val" @bind="Value2" />
|
||||
</div>
|
||||
<button class="btn btn-primary" @onclick="AddKeyValuePair2">Add</button>
|
||||
<table class="table mt-2">
|
||||
<table class="table mt-2" name="vol_table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Key</th>
|
||||
@ -106,7 +106,7 @@
|
||||
private string Value1 { get; set; }
|
||||
private string Key2 { get; set; }
|
||||
private string Value2 { get; set; }
|
||||
private ModuleConfig ModuleConfig { get; set; } = new ModuleConfig();
|
||||
public ModuleConfig ModuleConfig { get; set; } = new ModuleConfig();
|
||||
|
||||
|
||||
|
||||
@ -128,6 +128,7 @@
|
||||
{
|
||||
// Log ModuleConfig object to console and send to backend
|
||||
var config = JsonSerializer.Serialize(ModuleConfig);
|
||||
Console.WriteLine(config);
|
||||
await httpService.PostAsync("http://localhost:8080/config_module", config);
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user