Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
setup(): Record {
const i18n = useI18n();
const router = useRouter();
const store = useStore();
const chart = ref(cloneDeep(defaultChart));
const createChart = (): void => {
// Prefill series data into store
store.commit("routeData", {prefill: chart.value.series});
router.push({name: "admin-charts-edit", params: {id: "new"}});
};
const onShow = (params: ModalChartPreviewParams): void => {
chart.value.series = [{expr: params.expr}];
};
return {
setup(): Record {
const i18n = useI18n();
const router = useRouter();
const store = useStore();
const ui = useUI();
const {
applyRouteParams,
beforeRoute,
erred,
loading,
modifiers,
onBulkRejected,
onFetchRejected,
prevRoute,
routeGuarded,
watchGuard,
unwatchGuard,
} = common;
setup(): Record {
const i18n = useI18n();
const router = useRouter();
const store = useStore();
const ui = useUI();
const {erred, loading, onFetchRejected} = common;
let intersection: IntersectionObserver | null = null;
const accordion = ref | null>(null);
const expandState = ref>({});
const filter = ref("");
const labels = ref>([]);
const matcher = ref([]);
const metrics = ref>([]);
const options = ref(Object.assign({}, defaultOptions));
const page = ref(1);
const spinner = ref(null);
setup(props: Record): Record {
const i18n = useI18n();
const router = useRouter();
const store = useStore();
const ui = useUI();
const {erred, loading, onBulkRejected, onFetchRejected} = common;
const filter = ref("");
const objects = ref>([]);
const options = ref(Object.assign({}, defaultOptions));
const selection = ref>([]);
const table = ref(null);
const total = ref(0);
const selectionEnabled = computed(() => {
return props.type === "providers" ? (selection.value as Array).map(obj => obj.enabled) : [];
});
setup(): Record {
const i18n = useI18n();
const router = useRouter();
const store = useStore();
const ui = useUI();
const {erred, error, loading, onFetchRejected, sidebar} = common;
const dashboards = ref>([]);
const dashboardsLoading = ref(false);
const section = ref(defaultSection);
const sections = ref>([
{label: i18n.t("labels.home"), value: "home", icon: "home"},
{label: i18n.t("labels.basket._"), value: "basket", icon: "shopping-basket"},
]);
const dashboard = computed(() => {
return (store.state.routeData?.dashboard ?? null) as Dashboard | null;
setup(props: Record): Record {
const i18n = useI18n();
const router = useRouter();
const store = useStore();
const ui = useUI();
const {erred, loading, modifiers, onFetchRejected} = common;
let refreshInterval: number | null = null;
let refreshSuspended = false;
const countdown = ref(null);
const dashboard = ref(null);
const dashboardRefs = ref>({});
const dynamicData = ref>>({});
const grid = ref(null);
const highlightIndex = ref(null);
const options = ref(cloneDeep(defaultOptions));
const timeRangeSynced = ref(true);
setup(): Record {
const i18n = useI18n();
const router = useRouter();
const store = useStore();
const ui = useUI();
const {
applyRouteParams,
beforeRoute,
erred,
loading,
modifiers,
onFetchRejected,
routeGuarded,
watchGuard,
unwatchGuard,
} = common;
const form = ref(null);
setup(): Record {
const i18n = useI18n();
const router = useRouter();
const store = useStore();
const ui = useUI();
const {
applyRouteParams,
beforeRoute,
erred,
loading,
modifiers,
onFetchRejected,
prevRoute,
routeGuarded,
watchGuard,
unwatchGuard,
} = common;