3
0
Fork 0
mirror of https://github.com/ZeppelinBot/Zeppelin.git synced 2025-05-18 07:35:02 +00:00

Initial dashboard work (auth flow)

This commit is contained in:
Dragory 2019-05-26 00:13:42 +03:00
parent 9109e9a2c3
commit c94c8849a5
18 changed files with 3808 additions and 31 deletions

View file

@ -1,5 +1,4 @@
import has from "lodash.has";
import at from "lodash.at";
import { has, get } from "./utils";
const TEMPLATE_CACHE_SIZE = 200;
const templateCache: Map<string, ParsedTemplate> = new Map();
@ -219,7 +218,7 @@ export function parseTemplate(str: string): ParsedTemplate {
}
async function evaluateTemplateVariable(theVar: ITemplateVar, values) {
let value = has(values, theVar.identifier) ? at(values, theVar.identifier)[0] : undefined;
const value = has(values, theVar.identifier) ? get(values, theVar.identifier)[0] : undefined;
if (typeof value === "function") {
const args = [];