blub
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
<ui-header-bar title="@country.list" :count="count" :back-button="true">
|
||||
<ui-table-filter :attach="$refs.table" />
|
||||
<ui-add-button :route="createRoute" blueprint-alias="country" />
|
||||
<ui-button type="accent" @click="showNotification()" label="load" />
|
||||
<ui-button type="accent" @click="loadData()" label="load" />
|
||||
</ui-header-bar>
|
||||
<div class="ui-blank-box">
|
||||
<!--<ui-table ref="table" config="countries" @count="count = $event" />-->
|
||||
@@ -15,6 +15,7 @@
|
||||
<script lang="ts">
|
||||
import { defineComponent } from 'vue';
|
||||
import * as notifications from '../../services/notification';
|
||||
import api from './api';
|
||||
|
||||
export default defineComponent({
|
||||
data: () => ({
|
||||
@@ -30,8 +31,9 @@
|
||||
|
||||
async loadData()
|
||||
{
|
||||
var schema = await this.zero.getSchema('country');
|
||||
console.info(schema);
|
||||
//var schema = await this.zero.getSchema('country');
|
||||
var result = await api.getByQuery({ pageSize: 10 });
|
||||
console.info(result);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
@@ -0,0 +1,72 @@
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Raven.Client.Documents.Indexes;
|
||||
using zero.Context;
|
||||
using zero.Persistence;
|
||||
using zero.Routing;
|
||||
|
||||
namespace zero.Demo.Controllers;
|
||||
|
||||
public class SetupController : Controller
|
||||
{
|
||||
//ISetupApi Api;
|
||||
|
||||
//public SetupController(ISetupApi api)
|
||||
//{
|
||||
// Api = api;
|
||||
//}
|
||||
|
||||
|
||||
//[HttpGet]
|
||||
//public async Task<IActionResult> Install([FromQuery] string password)
|
||||
//{
|
||||
// var result = await Api.Install(new SetupModel()
|
||||
// {
|
||||
// AppName = "switchcase",
|
||||
// ContentRootPath = "O:/zero/zero.Web",
|
||||
// Database = new SetupDatabaseModel()
|
||||
// {
|
||||
// Name = "switchcase",
|
||||
// Url = "http://localhost:9800"
|
||||
// },
|
||||
// User = new SetupUserModel()
|
||||
// {
|
||||
// Email = "cee@live.at",
|
||||
// Name = "Tobias Klika",
|
||||
// Password = password
|
||||
// }
|
||||
// });
|
||||
|
||||
// return Json(result);
|
||||
//}
|
||||
|
||||
|
||||
[HttpGet]
|
||||
public async Task<IActionResult> Indexes([FromServices] IZeroStore store, [FromServices] IZeroContext context)
|
||||
{
|
||||
var indexes = context.Options.For<RavenOptions>().Indexes;
|
||||
var builtIndexes = indexes.BuildAll(context.Options, store.Raven);
|
||||
|
||||
await IndexCreation.CreateIndexesAsync(builtIndexes, store.Raven, database: "laola");
|
||||
await IndexCreation.CreateIndexesAsync(builtIndexes, store.Raven, database: "laola.hofbauer");
|
||||
await IndexCreation.CreateIndexesAsync(builtIndexes, store.Raven, database: "laola.brothers");
|
||||
|
||||
return Json(new
|
||||
{
|
||||
indexes = true
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
[HttpGet]
|
||||
public async Task<IActionResult> Routes([FromServices] IZeroStore store, [FromServices] IZeroContext context, [FromServices] IEnumerable<IRouteProvider> providers)
|
||||
{
|
||||
RouteBulkRefresher refresher = new(store, context, providers);
|
||||
|
||||
int routes = await refresher.RebuildAllRoutes();
|
||||
|
||||
return Json(new
|
||||
{
|
||||
routes = routes
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -20,4 +20,4 @@
|
||||
<Folder Include="wwwroot\" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
</Project>
|
||||
Reference in New Issue
Block a user