mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-05-18 07:35:02 +00:00
Dashboard work and related
This commit is contained in:
parent
5279ab06fa
commit
1ecce52973
44 changed files with 637 additions and 272 deletions
|
@ -32,6 +32,18 @@ export class Configs extends BaseRepository {
|
|||
return (await this.getActiveByKey(key)) != null;
|
||||
}
|
||||
|
||||
getRevisions(key, num = 10) {
|
||||
return this.configs.find({
|
||||
relations: this.getRelations(),
|
||||
where: { key },
|
||||
select: ["id", "key", "is_active", "edited_by", "edited_at"],
|
||||
order: {
|
||||
edited_at: "DESC",
|
||||
},
|
||||
take: num,
|
||||
});
|
||||
}
|
||||
|
||||
async saveNewRevision(key, config, editedBy) {
|
||||
return connection.transaction(async entityManager => {
|
||||
const repo = entityManager.getRepository(Config);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue