mirror of
https://github.com/aaru-dps/Aaru.Server.git
synced 2025-12-16 19:24:27 +00:00
Remove details and edit from SCSI MODE SENSE pages.
This commit is contained in:
@@ -18,76 +18,6 @@ namespace DiscImageChef.Server.Areas.Admin.Controllers
|
||||
// GET: Admin/ScsiPages
|
||||
public async Task<IActionResult> Index() => View(await _context.ScsiPage.ToListAsync());
|
||||
|
||||
// GET: Admin/ScsiPages/Details/5
|
||||
public async Task<IActionResult> Details(int? id)
|
||||
{
|
||||
if(id == null)
|
||||
{
|
||||
return NotFound();
|
||||
}
|
||||
|
||||
ScsiPage scsiPage = await _context.ScsiPage.FirstOrDefaultAsync(m => m.Id == id);
|
||||
|
||||
if(scsiPage == null)
|
||||
{
|
||||
return NotFound();
|
||||
}
|
||||
|
||||
return View(scsiPage);
|
||||
}
|
||||
|
||||
// GET: Admin/ScsiPages/Edit/5
|
||||
public async Task<IActionResult> Edit(int? id)
|
||||
{
|
||||
if(id == null)
|
||||
{
|
||||
return NotFound();
|
||||
}
|
||||
|
||||
ScsiPage scsiPage = await _context.ScsiPage.FindAsync(id);
|
||||
|
||||
if(scsiPage == null)
|
||||
{
|
||||
return NotFound();
|
||||
}
|
||||
|
||||
return View(scsiPage);
|
||||
}
|
||||
|
||||
// POST: Admin/ScsiPages/Edit/5
|
||||
// To protect from overposting attacks, please enable the specific properties you want to bind to, for
|
||||
// more details see http://go.microsoft.com/fwlink/?LinkId=317598.
|
||||
[HttpPost, ValidateAntiForgeryToken]
|
||||
public async Task<IActionResult> Edit(int id, [Bind("Id,page,subpage,value")] ScsiPage scsiPage)
|
||||
{
|
||||
if(id != scsiPage.Id)
|
||||
{
|
||||
return NotFound();
|
||||
}
|
||||
|
||||
if(ModelState.IsValid)
|
||||
{
|
||||
try
|
||||
{
|
||||
_context.Update(scsiPage);
|
||||
await _context.SaveChangesAsync();
|
||||
}
|
||||
catch(DbUpdateConcurrencyException)
|
||||
{
|
||||
if(!ScsiPageExists(scsiPage.Id))
|
||||
{
|
||||
return NotFound();
|
||||
}
|
||||
|
||||
throw;
|
||||
}
|
||||
|
||||
return RedirectToAction(nameof(Index));
|
||||
}
|
||||
|
||||
return View(scsiPage);
|
||||
}
|
||||
|
||||
// GET: Admin/ScsiPages/Delete/5
|
||||
public async Task<IActionResult> Delete(int? id)
|
||||
{
|
||||
@@ -116,7 +46,5 @@ namespace DiscImageChef.Server.Areas.Admin.Controllers
|
||||
|
||||
return RedirectToAction(nameof(Index));
|
||||
}
|
||||
|
||||
bool ScsiPageExists(int id) => _context.ScsiPage.Any(e => e.Id == id);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user