sha256 stringlengths 64 64 | language stringclasses 27
values | size int32 1 491k | lines int32 1 21.8k | content stringlengths 1 200k |
|---|---|---|---|---|
3658ea9b4d87178ab293318232e09645123aeeec8715f17aeb5970ed5ce44aec | TypeScript | 275 | 5 | // Tell the portal-ui shell this view has unsaved in-memory state, so a project
// switch can warn before reloading the iframe.
export function postViewDirty(dirty: boolean): void {
window.parent.postMessage({ type: 'kaapana:view-dirty', dirty }, window.location.origin)
}
|
13b3673ebd19550084d6ec6b03a3e694a20595fad61228c87a04eecb843cb54b | TypeScript | 281 | 18 | /**
* plugins/index.ts
*
* Automatically included in `./src/main.ts`
*/
// Plugins
import vuetify from './vuetify'
import router from '../router'
// Types
import type { App } from 'vue'
export function registerPlugins (app: App) {
app
.use(vuetify)
.use(router)
}
|
3fc839ac8c1ec58eb4b244dde9d7b89a6899da3370a4aff5db97c936f3eea5d3 | TypeScript | 283 | 13 | export interface JsonSchema {
type?: string | string[]
title?: string
description?: string
properties?: Record<string, JsonSchema>
enum?: unknown[]
items?: JsonSchema
format?: string
default?: unknown
required?: string[]
minLength?: number
maxLength?: number
}
|
600e9ec892fc2c0c516e546e5a738a9a7b0b4a29ff43f9dd45331fb9ff963b95 | TypeScript | 299 | 20 | /**
* main.ts
*
* Bootstraps Vuetify and other plugins then mounts the App`
*/
// Plugins
import { registerPlugins } from '@/plugins'
// Components
import App from './App.vue'
// Composables
import { createApp } from 'vue'
const app = createApp(App)
registerPlugins(app)
app.mount('#app')
|
b3e7f63751a88736216ff7e700e48fa76843173e59d4695c63094efc859a27b5 | TypeScript | 305 | 13 | import { createApp } from 'vue'
import { createPinia } from 'pinia'
import App from './App.vue'
import { vuetify } from './plugins/vuetify'
import { router } from './router'
import './styles/main.scss'
const app = createApp(App)
app.use(createPinia())
app.use(vuetify)
app.use(router)
app.mount('#app')
|
0d7ca11ecd2fcaee947da04bf3e9184c28db4b309552e452be715067199ee5b9 | TypeScript | 306 | 13 | import Vue, { VNode } from 'vue';
declare global {
namespace JSX {
// tslint:disable no-empty-interface
interface Element extends VNode {}
// tslint:disable no-empty-interface
interface ElementClass extends Vue {}
interface IntrinsicElements {
[elem: string]: any;
}
}
}
|
610c54803545a19e338e23f813695e2d3ac8aaf3e7df5026a525480aadf2bee6 | TypeScript | 307 | 7 | import { h, type VNode } from 'vue'
// One-line framing above a reference example: what rule it shows and what to
// notice. The long-form rule stays in the design guidelines, not here.
export function note(text: string): VNode {
return h('p', { class: 'text-body-2 text-medium-emphasis mb-4' }, text)
}
|
bb7038860862b26ac241fe411a979314eb4b27478862ac5a185e6967d1c5b528 | TypeScript | 315 | 9 | import axios from 'axios'
export function getApiErrorMessage(err: unknown, fallbackMessage: string): string {
if (!axios.isAxiosError(err)) return fallbackMessage
const detail = (err.response?.data as { detail?: unknown } | undefined)?.detail
return typeof detail === 'string' ? detail : fallbackMessage
}
|
5ddc8bb75ef484f0eb2fd47709ff6cc00434d99b9ad818169cbb0236ae4db3a9 | TypeScript | 319 | 15 | import 'vuetify/styles'
import { createVuetify } from 'vuetify'
import { aliases, mdi } from 'vuetify/iconsets/mdi'
import '@mdi/font/css/materialdesignicons.css'
export const vuetify = createVuetify({
icons: {
defaultSet: 'mdi',
aliases,
sets: { mdi },
},
theme: {
defaultTheme: 'dark',
},
})
|
385b379c00ea09cef351cd2187082966324fa2f77ed410c13c89057d9b6784e0 | TypeScript | 320 | 8 | import { WorkflowTriggerPlugin } from './plugin';
// This exports static code and TypeScript types,
// as well as, OpenSearch Dashboards Platform `plugin()` initializer.
export function plugin() {
return new WorkflowTriggerPlugin();
}
export { WorkflowTriggerPluginSetup, WorkflowTriggerPluginStart } from './types';
|
c3c53efb704d52543b35c06730c3488836134c3c87f05996e9e1f35c834a8560 | TypeScript | 322 | 11 | import { Reducer } from 'redux';
import { IMPORT_APPLICATION_STATE, GeppettoAction } from '../actions'
export const reducerDecorator = (subReducer: Reducer) => (state, action: GeppettoAction) => {
if (action.type === IMPORT_APPLICATION_STATE) {
state = action.data.redux;
}
return subReducer(state, action)
... |
fda15dd5e374877a292cb48121f8945b0564a663c6766b644e03699a4034930e | TypeScript | 342 | 11 | import 'vuetify/styles'
import * as components from 'vuetify/components'
import * as directives from 'vuetify/directives'
import { createKaapanaVuetify } from '@kaapana/base-ui'
// Theme, icon set and typeface come from the shared factory; do not re-declare
// them here.
export default createKaapanaVuetify({
compone... |
93764b07a8fe3ee04e3a9e8f743e1afcdebc590350a98fa38190eac33aa2b7d1 | TypeScript | 343 | 7 | export const projectNameRules: Array<(value: string) => boolean | string> = [
(v) => !!v || 'Required.',
(v) => v.length <= 13 || 'Max 13 characters',
(v) => v === v.toLowerCase() || 'Only lowercase characters are supported',
(v) => !v.includes(' ') || 'Spaces are not allowed',
(v) => v !== 'admin' || 'Name "... |
da108a7e10f828c7f52349a6e662f096d0b747526691810026e80ad171d9d479 | TypeScript | 343 | 13 | import { createApp } from 'vue'
import { createPinia } from 'pinia'
import Notifications from '@kyvg/vue3-notification'
import App from './App.vue'
import router from './routes'
import vuetify from './plugins/vuetify'
const app = createApp(App)
app.use(createPinia())
app.use(router)
app.use(vuetify)
app.use(Notificati... |
6ce2086a1c83aac7358988da321ec2484445bb349c1240b4deb21be3c5d7a5ce | TypeScript | 347 | 5 | export enum ICloseType {
Visible = 1, // close if selected or hovered, i.e. when x is visible (will only close selected on mobile, where css hover is not available)
Always = 2, // close always (both selected and unselected when x rect tapped e.g where a custom image has been added for close)
Selected = 3, /... |
51044584a0ed2e6a5b898bf661b57310ec81261501a7244e87127844113ed1c7 | TypeScript | 350 | 13 | import { createApp } from 'vue'
import router from './router/router'
import vuetify from './plugins/vuetify'
import App from './App.vue'
import '@mdi/font/css/materialdesignicons.css'
import 'roboto-fontface/css/roboto/roboto-fontface.css'
import './assets/styles.scss'
const app = createApp(App)
app.use(router)
app.u... |
139e3c3199ac0970d412d3d6a1f0e0401ff4b3352a2eab757841cbb6bd23eb10 | TypeScript | 362 | 17 | import type { ExtensionManifest, Repository } from '@/shared/types/apiSchemas'
export interface ExtensionManifestFilters {
tags?: string[]
}
export interface CatalogEntry {
repository: Repository
tag: string
manifest: ExtensionManifest
}
export interface CatalogEntryGroup {
repository: Repository
manifes... |
0228638e46a482fb67f52fe63400413939864dc7a844e0cdcb757e6b3e80534b | TypeScript | 363 | 25 | /**
* main.ts
*
* Bootstraps Vuetify and other plugins then mounts the App`
*/
// Plugins
import { registerPlugins } from '@/plugins'
// Components
import App from './App.vue'
// Composables
import { createApp } from 'vue'
import { createPinia } from "pinia";
const app = createApp(App)
registerPlugins(app)
... |
3c5f1cf040780f8ed6261dc8be1ebb70773ad126fb0dcf3f6071efb4cbde6874 | TypeScript | 364 | 14 | import type { Meta, StoryObj } from '@storybook/vue3-vite'
import { HelpIcon } from './HelpIcon'
const meta: Meta<typeof HelpIcon> = {
title: 'Library / HelpIcon',
component: HelpIcon,
}
export default meta
type Story = StoryObj<typeof HelpIcon>
export const Default: Story = {
args: { text: 'On which instances... |
d0276aa498f9d44f3751cc709f941a00fb18b7dc8ce6fa5371ef966b82a85db5 | TypeScript | 371 | 13 | import type { ExtensionStatus } from '@/shared/types/apiSchemas'
export const extensionStatusColor: Record<ExtensionStatus, string> = {
pending: 'warning',
pulling: 'warning',
pulling_failed: 'error',
installing: 'warning',
installing_failed: 'error',
installed: 'success',
uninstalling: 'warning',
unin... |
099b6644319a5847c8be1980808630000dd3437890355de182c8e957f628cb0f | TypeScript | 374 | 7 | // The shell seeds localStorage["settings"] with the settings shared by all
// views before this one loads. These defaults only cover the case where it has
// not done so, and therefore hold no more than the single setting this view
// reads: the fields the dataset dashboard groups its histograms by.
export const setti... |
f2a72b6a98bdb1b0869433b58991651ed3c2fcb2664771bcd0c3dbac3aa4f5d2 | TypeScript | 383 | 15 | import { createApp } from 'vue'
import router from './router/router'
import vuetify from './plugins/vuetify'
import App from './App.vue'
import 'vuetify/styles';
import '@mdi/font/css/materialdesignicons.css';
import 'roboto-fontface/css/roboto/roboto-fontface.css';
import './assets/styles.scss';
const app = createA... |
d9af21e2a258c01abdcc797ad076986d3272e38188df7e5ead13d7aee83ccb3c | TypeScript | 387 | 13 | import { kaapanaIcons } from '@kaapana/base-ui'
// Platform-wide actions use the shared icon map from base-ui.
export { kaapanaIcons }
// Icons for this view's own vocabulary.
export const extensionIcons = {
workflow: 'mdi-gamepad-variant',
application: 'mdi-application-outline',
experimental: 'mdi-test-tube',
... |
1d7f0e3964ee83e3bb0956fc3ef56ddccc284a7805aac3ea402a4eecc8606d68 | TypeScript | 391 | 15 | import { createApp } from 'vue'
import { createPinia } from 'pinia'
import Notifications from '@kyvg/vue3-notification'
import App from './App.vue'
import router from './routes'
import vuetify from './plugins/vuetify'
import '@mdi/font/css/materialdesignicons.css'
const app = createApp(App)
app.use(createPinia())
app... |
ce4a99b7d0fb2bf769d83a9c40918febf4be7119c8b8966632ea0560921f7952 | TypeScript | 391 | 15 | import { createApp } from 'vue'
import { createPinia } from 'pinia'
import Notifications from '@kyvg/vue3-notification'
import App from './App.vue'
import router from './router'
import vuetify from './plugins/vuetify'
import '@mdi/font/css/materialdesignicons.css'
const app = createApp(App)
app.use(createPinia())
app... |
ba7219876ff36422b1c41cff62ba2e11b36c0161d323d1d06300dabf3e3f7ef4 | TypeScript | 415 | 16 | import { createApp } from 'vue'
import { createPinia } from 'pinia'
import Notifications from '@kyvg/vue3-notification'
import router from './router'
import vuetify from './plugins/vuetify'
import App from './App.vue'
import 'vuetify/styles'
import '@mdi/font/css/materialdesignicons.css'
const app = createApp(App)
ap... |
e62502a0c0157c49ac2b6bc54f1adfaac991c1fb0a613b2dfe1129c2676aee77 | TypeScript | 415 | 15 | import { ref } from 'vue'
export function useSnackbar() {
const showSnackbar = ref(false)
const snackbarText = ref('')
const snackbarColor = ref('info')
function notify(text: string, color: 'success' | 'error' | 'info' | 'warning' = 'info') {
snackbarText.value = text
snackbarColor.value = color
s... |
fbf7184910c43fd7928f2f2852066bd512de9d6ec21697ab3bb89cbe91faba87 | TypeScript | 415 | 16 | import { createApp } from 'vue'
import { createPinia } from 'pinia'
import Notifications from '@kyvg/vue3-notification'
import App from './App.vue'
import router from './routes'
import vuetify from './plugins/vuetify'
import 'vuetify/styles'
import '@mdi/font/css/materialdesignicons.css'
const app = createApp(App)
ap... |
9890d449a644f5742307ebec0cea4c5f46317d999bafab68fff8191a44e49ad7 | TypeScript | 418 | 17 | import request from '@/request'
const CommonDataService = {
getCommonData() {
return new Promise((resolve, reject) => {
request.get('/jsons/commonData.json').then((response: any) => {
resolve(response.data)
}).catch((error: any) => {
console.log('Something went wrong loading the comm... |
9f2a38510cd46a1f08cfb29fd9d81a065f5f8fdb3b0474b86b68bcbab3ce2111 | TypeScript | 423 | 20 | import { createRouter, createWebHistory, type RouteRecordRaw } from 'vue-router'
import EntitiesPage from '@/views/EntitiesPage.vue'
const routes: RouteRecordRaw[] = [
{
path: '/',
name: 'entities',
component: EntitiesPage,
},
]
export const router = createRouter({
history: createWebHistory(import.m... |
1f99d934360a67aa30e8604234437fc3f64985a5c9e68b2d652848cd9b7e15e1 | TypeScript | 426 | 8 | // Ask the portal-ui shell to re-read its project list after a mutation here, so
// the sidebar does not show a stale set until its next poll. The wire contract
// is documented in docs/source/development_guide/preview/landing_page_integration.rst.
export function refreshShell(): void {
if (window.parent !== window... |
81a311825c926e2a5544d40da40b63e13f8bfba3c2e544f0bc38bdfe4ef9742c | TypeScript | 451 | 17 | import { createApp } from 'vue'
import { createPinia } from 'pinia'
import Notifications from '@kyvg/vue3-notification'
import router from './routes'
import vuetify from './plugins/vuetify'
import App from './App.vue'
import 'vuetify/styles'
import '@mdi/font/css/materialdesignicons.css'
import '@kaapana/base-ui/style... |
07e14a5688fc6e45b6a5f5015746bcfab880a880e91f480b205123569e976560 | TypeScript | 471 | 19 | // store.js
import { ref, reactive } from 'vue'
import {UserItem} from '@/common/types';
const state = reactive({
user : ref<UserItem|null>(null), // Initialize as null or a valid default
fetching: false,
});
function updateUser(newUser: UserItem) {
// Ensure reactivity by updating properties of the existing ob... |
eebfa5888ebfdbd1053f9f918e5b0ef200d8301ac0e6b19dc318fb0cdddbe541 | TypeScript | 478 | 26 | /**
* plugins/vuetify.ts
*
* Framework documentation: https://vuetifyjs.com`
*/
// Styles
import '@mdi/font/css/materialdesignicons.css'
import 'vuetify/styles'
// Composables
import { createVuetify } from 'vuetify'
// https://vuetifyjs.com/en/introduction/why-vuetify/#feature-guides
export default createVuetify... |
03958253045c3c728b035bf7c7a998aa359e5353ad8ea5095519597ac073f04c | TypeScript | 480 | 22 | const routes = [
{
name: 'Platforms',
path: '/platforms',
component: () => import('@/views/Platforms.vue'),
title: 'Platforms',
permissions: {
isPublic: false,
},
},
{
name: 'Extensions',
path: '/extensions',
component: () =... |
01b1e53001afdd1e51e0155d03eca1e94a40faea9642aa056f1170e42b11294a | TypeScript | 481 | 11 | /**
* Ask the portal-ui shell to re-read what it shows about the platform — its
* menu and the user's project list — after this view changed something there.
* Standalone this does nothing: there is no shell menu to refresh, and
* reloading the document would discard the view's just-submitted state.
*/
export func... |
65e3f64c68596e6359313d88cf7fc8820b3a171aaf7463ac2f147443957520e0 | TypeScript | 485 | 20 | import axios from 'axios'
import type { AxiosError, AxiosResponse } from 'axios'
const apiClient = axios.create({
baseURL: import.meta.env.VITE_EXTENSION_MANAGER_API_URL ?? '/extensions-api',
timeout: 10000,
headers: {
'Content-Type': 'application/json',
},
})
apiClient.interceptors.response.use(
(respo... |
9175fcfbb6e96337b62d1896e76aad71e7e1a7b722efe9e9697f097fc2b130ec | TypeScript | 492 | 13 | import DockLocation from "../DockLocation";
import DropInfo from "../DropInfo";
import IDraggable from "./IDraggable";
import Node from "./Node";
export default interface IDropTarget {
/** @hidden @internal */
canDrop(dragNode: Node & IDraggable, x: number, y: number): DropInfo | undefined;
/** @hidden @in... |
22cf38668bba0314ac7bca39f5920deeb15499b318aae2fc04fb1355efda239c | TypeScript | 505 | 23 | import { fileURLToPath, URL } from 'node:url'
import { defineConfig } from 'vitest/config'
import vue from '@vitejs/plugin-vue'
export default defineConfig({
plugins: [vue()],
resolve: {
alias: {
'@': fileURLToPath(new URL('./src', import.meta.url)),
},
},
test: {
environment: 'jsdom',
in... |
d33857ca443c1fdf78fa846631cce847f48de4c58f344727959911333636283b | TypeScript | 507 | 13 | export enum I18nLabel {
Close_Tab = "Close",
Move_Tab = "Move: ",
Move_Tabset = "Move tabset",
Maximize = "Maximize tabset",
Restore = "Restore tabset",
Float_Tab = "Show selected tab in floating window",
Overflow_Menu_Tooltip = "Hidden tabs",
Floating_Window_Message = "This panel is sho... |
3a06fb1047d4c04162cd35063f7e9ef8842fcab321628d1f9d999ab0828db14b | TypeScript | 513 | 24 | import 'vuetify/styles'
import { createVuetify } from 'vuetify'
import { aliases, mdi } from 'vuetify/iconsets/mdi'
import {
kaapanaThemeLight,
kaapanaThemeDark,
KAAPANA_THEME_LIGHT,
KAAPANA_THEME_DARK,
} from '@kaapana/base-ui'
export default createVuetify({
theme: {
defaultTheme: KAAPANA_THEME_LIGHT,
... |
d25b6cd493d0c9184f7ef5c4ab241766ff8fab9fd7392aa79b90affbe41785b8 | TypeScript | 524 | 13 | /**
* Ask the portal-ui shell to open another view. `path` is a shell route as the
* menu addresses it: `/web/<section>/<id>`, or `/web/-/<id>` for a top-level
* entry. Embedded, the shell resolves it (running its view-dirty confirm
* first); standalone, navigate this document directly.
*/
export function navigate... |
01640a4a6a333f8b155b4e29fc0000b57f049fca326a375dc0b8b72d58628597 | TypeScript | 539 | 27 | export interface User {
username: string
roles: string[]
groups: string[]
id: string
}
export interface Project {
id: string | number
name: string
short_id?: string
access_level?: string
}
// series-instance-UIDs grouped study -> series
export type Studies = Record<string, string[]>
// patient -> stud... |
653d456d290cfbcf4b4568b8948259da1ba8da00946a5bcd03530dd0bece01ff | TypeScript | 542 | 20 | import type { Meta, StoryObj } from '@storybook/vue3-vite'
import { WorkflowExecution } from '../workflowExecution'
// The backend calls fired on mount have no responder in Storybook, so stories
// render only the empty execution-card shell.
const meta: Meta<typeof WorkflowExecution> = {
title: 'Library / WorkflowEx... |
a4e9890437e84315246544eaab0925502bc5802fd8fc533b7aaadf3065ef98b9 | TypeScript | 554 | 16 | import { httpClient } from '@kaapana/base-ui'
/**
* Count behind a menu-badge path (the `kaapana.ai/ui.badge-path` an ingress
* declares, e.g. kube-helm's pending-applications-count). Null on any failure
* — callers keep the last known count, like the shell's menu badges do.
*/
export async function fetchBadgeCoun... |
a636a684e584e5da746b7df50adc455115bcd679534c1d3d25c309c267b63ab3 | TypeScript | 559 | 30 | export type ProjectItem = {
id: string,
short_id: string,
external_id?: number,
name: string,
description?: string,
multiinstallable_whitelist?: string[],
is_archived: boolean,
}
export type UserItem = {
id: string,
username: string,
first_name: string,
last_name: string,
... |
b78c10c5dda8988cc730836edb534b0e9ee2e1f4733b4ecf56bf96a2c3f441a1 | TypeScript | 560 | 25 | import 'vuetify/styles'
import { createVuetify } from 'vuetify'
import { aliases, mdi } from 'vuetify/iconsets/mdi'
import '@mdi/font/css/materialdesignicons.css'
import {
kaapanaThemeLight,
kaapanaThemeDark,
KAAPANA_THEME_LIGHT,
KAAPANA_THEME_DARK,
} from '@kaapana/base-ui'
export default createVuetify({
th... |
90398ac9c4ee404d817ebde0d0ba7338ccc4d02927ed5f0dcc463f82b438f202 | TypeScript | 563 | 26 | import Vue from 'vue';
import Vuetify from 'vuetify/lib';
import 'vuetify/dist/vuetify.min.css'
import '@mdi/font/css/materialdesignicons.css' // Ensure you are using css-loader
import colors from 'vuetify/lib/util/colors'
Vue.use(Vuetify);
export default new Vuetify({
theme: {
themes: {
light: {
... |
9b51e884798a943527e2285e3cee440f3c750d8de5d49e1612783bd3b9bbdaf3 | TypeScript | 571 | 26 | import 'babel-polyfill'
import Vue from 'vue'
import App from './App.vue'
import router from './routes'
import store from './store'
import vuetify from './plugins/vuetify'
import IdleVue from 'idle-vue'
const eventsHub = new Vue()
Vue.use(IdleVue, {
eventEmitter: eventsHub,
// idleTime: 240000, //every 6 minute
... |
983551a55525be940134b2ac64435c42cbd7a22b017d067888897f7abfc51995 | TypeScript | 575 | 18 | import { test, expect } from '@playwright/test';
test('has title', async ({ page }) => {
await page.goto('https://playwright.dev/');
// Expect a title "to contain" a substring.
await expect(page).toHaveTitle(/Playwright/);
});
test('get started link', async ({ page }) => {
await page.goto('https://playwright.dev... |
f7b75656abadcf66ccd632e4466fe33b92ed620ca9f839dc5bc7570df028be4a | TypeScript | 582 | 21 | import DockLocation from "./DockLocation";
import IDropTarget from "./model/IDropTarget";
import Node from "./model/Node";
import Rect from "./Rect";
class DropInfo {
node: Node & IDropTarget;
rect: Rect;
location: DockLocation;
index: number;
className: string;
constructor(node: Node & IDropT... |
a8bf90745e06429cc498459366726e7d60b6e01615d3d1ffd8fc73a269b3ac34 | TypeScript | 584 | 30 | class Orientation {
static HORZ = new Orientation("horz");
static VERT = new Orientation("vert");
static flip(from: Orientation) {
if (from === Orientation.HORZ) {
return Orientation.VERT;
} else {
return Orientation.HORZ;
}
}
/** @hidden @internal *... |
b7d8121c0564c133605b01bfa6fdbcbb62a3192e18b92d6802a684ff8c722997 | TypeScript | 604 | 26 | // Composables
import { createRouter, createWebHistory } from 'vue-router'
const routes = [
{
path: '/',
component: () => import('@/layouts/default/Default.vue'),
children: [
{
path: '',
name: 'Home',
// route level code-splitting
// this generates a separate chunk (... |
ee19bcb47bca565db6e3fa6a04737610f39cb1ec3901459363bff841526faab4 | TypeScript | 616 | 30 | export interface SearchProps {
datasource: string;
searchConfiguration: any,
datasourceConfiguration: any;
searchStyle?: any;
customDatasourceHandler?: Function
};
export interface SearchState {
isOpen: boolean;
value: string;
filters: Array<any>
};
export interface ResultsProps {
da... |
1c3cdf1aec74d2ee5386f73bdeaee94c6f759e67433895d8013866b2cf7c3be7 | TypeScript | 631 | 27 | import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import vuetify from 'vite-plugin-vuetify'
import path from 'node:path'
// https://vite.dev/config/
export default defineConfig({
base: process.env.BASE_URL || '/data-ui/',
plugins: [vue(), vuetify({ autoImport: true })],
resolve: {
alia... |
6b0999ebc49c8c6f34e57ef723e8806cbe67d9b7bafc49bbd3c5f0d4fb3bebc7 | TypeScript | 639 | 28 | import 'vuetify/styles'
import { createVuetify } from 'vuetify'
import { aliases, mdi } from 'vuetify/iconsets/mdi'
import * as components from 'vuetify/components'
import * as directives from 'vuetify/directives'
import {
kaapanaThemeLight,
kaapanaThemeDark,
KAAPANA_THEME_LIGHT,
KAAPANA_THEME_DARK,
} from '@ka... |
0dd977e3879e476cc5f5bdfd9e7464665c6a5ce92a63bd163b63de042270ae5d | TypeScript | 640 | 22 | import type { Meta, StoryObj } from '@storybook/vue3-vite'
import { defineComponent, h } from 'vue'
import AuthService from './authService'
// Surface listing only — getToken()/logout() are not safe to call in a story.
const AuthServiceDemo = defineComponent({
name: 'AuthServiceDemo',
setup() {
return () =>
... |
95e8df3f762a77d464bab164dfcbedea60280a7cd5f3b0c93b38a79e42910c7b | TypeScript | 643 | 22 | import { defineStore } from 'pinia'
import { kaapanaApiService } from '@kaapana/base-ui'
// The open-policy data decides which admin-only controls the view renders.
// Loaded by the router before the view mounts; a failed load leaves it empty,
// which hides those controls (fail closed).
export const usePolicyStore = ... |
7893f8c22c3f58dec8361734e3d2106a655868ba3806a74686e50cc92d1113ab | TypeScript | 654 | 25 | declare module 'idle-vue' {
import Vue, { PluginFunction } from 'vue'
export interface IdleVueUseOptions {
events?: string[]
eventEmitter?: any
idleTime?: number
keepTracking?: boolean
moduleName?: string
startAtIdle?: boolean
store?: any
}
module "vue/types/vue... |
c043e159a2a086c0ccb5118c1fd2672dec7ff44fc22c5e3a79fce740d0b4306b | TypeScript | 655 | 23 | import { globalIgnores } from 'eslint/config'
import { defineConfigWithVueTs, vueTsConfigs } from '@vue/eslint-config-typescript'
import pluginVue from 'eslint-plugin-vue'
import pluginVitest from '@vitest/eslint-plugin'
import skipFormatting from '@vue/eslint-config-prettier/skip-formatting'
export default defineConf... |
dae54449cf3582efc44c98be1b9c4ff7f4016f35fc112965c0f0e6355cec4183 | TypeScript | 656 | 18 | import { VisualizationsSetup, VisualizationsStart } from 'src/plugins/visualizations/public/';
import { DataPublicPluginSetup, DataPublicPluginStart } from 'src/plugins/data/public/';
// eslint-disable-next-line @typescript-eslint/no-empty-interface
export interface WorkflowTriggerPluginSetup {}
// eslint-disable-next... |
357d6ddddc20cd86aefabcb924f0861960be4c35c1ee6144956b06e032739127 | TypeScript | 663 | 25 | import axios from 'axios'
import { prefixProjectScope } from '@/utils/projectScope'
const apiClient = axios.create({
baseURL: import.meta.env.VITE_WORKFLOW_API_URL + "/v1",
timeout: 10000,
headers: {
'Content-Type': 'application/json',
},
})
// workflow-api's POST /workflow-runs requires the ... |
e8c90bc8dade0f2720d26a34d1bf07fa70638f14d9bd1e5e9514234d8442dccf | TypeScript | 672 | 24 | import { defineStore } from 'pinia'
import type { ApiErrorInfo } from '@kaapana/base-ui'
export interface FailureDetails {
title: string
/** The user-facing sentence the notification or alert already showed. */
text: string
error: ApiErrorInfo
}
// State of the one ErrorDetailsDialog on the page, rendered in ... |
e354af04bf221640bc2657e4fac8765257c34d11fb7f4a52b0709686d2071c04 | TypeScript | 674 | 22 | import type { Meta, StoryObj } from '@storybook/vue3-vite'
import { defineComponent, h } from 'vue'
import kaapanaApiService from './kaapanaApiService'
// Surface listing only — calling the wrappers would hit the platform.
const KaapanaApiServiceDemo = defineComponent({
name: 'KaapanaApiServiceDemo',
setup() {
... |
ba8822ba01e4b4e37b5576ab63feeca49a410c75339a8ef5163e714130901517 | TypeScript | 706 | 18 | import { notify } from '@kyvg/vue3-notification'
import { apiErrorInfo } from '@kaapana/base-ui'
import type { FailureDetails } from '@/stores/failureDetails'
// Reports a failed action as a transient error notification. The technical
// detail travels in `data.failure`, and App.vue opens ErrorDetailsDialog when
// th... |
f36d60e0615c9d8c3484298ecdee8e427c3b45145c221ce1292d1688213bd30b | TypeScript | 709 | 25 | import { notify } from '@kyvg/vue3-notification'
import { httpClient } from '@kaapana/base-ui'
const KAAPANA_BACKEND_ENDPOINT = import.meta.env.VITE_KAAPANA_BACKEND_ENDPOINT
const loadDatasets = async (skipIdentifiers = true) => {
try {
const datasets = await httpClient.get(KAAPANA_BACKEND_ENDPOINT + 'client/da... |
fa1ffca7f8df112fb89bf21746a42efe673b940f970da577394c09caed3062cc | TypeScript | 732 | 24 | import http from '@/api/http'
import type { PolicyData } from '@/utils/opa'
export interface UserinfoJwt {
preferredUsername: string
groups: string[]
user: string
}
export async function fetchUserinfo(): Promise<UserinfoJwt> {
// In dev mode the auth proxy is absent; a static token file stands in.
const oau... |
43f43e156921249988b41da7d8205730a84e3461e08b44bff45a32312fcc926d | TypeScript | 752 | 26 | export function stringToColour(str: string): string {
if (str === '' || str === null) return ''
let hash = 0
for (let i = 0; i < str.length; i++) {
hash = str.charCodeAt(i) + ((hash << 5) - hash)
}
let colour = '#'
for (let i = 0; i < 3; i++) {
const value = (hash >> (i * 8)) & 0xff
colour += ('... |
3f0db132b8619e7fd600b6555e199a55a25afb3eb0f29b843b28f1d64fd77e88 | TypeScript | 757 | 25 | import store from '@/common/store'
import { UserItem } from '@/common/types'
export function isSystemUser(u: UserItem): boolean {
const username = (u.username || '').toLowerCase();
const lastName = (u.last_name || '').toLowerCase();
return username === 'system' || lastName === 'system' || username.endsWith('-sys... |
5195de18acd0584b84f4286f45cecf444311567def52c29514fd815c70853dee | TypeScript | 780 | 28 | import type { Meta, StoryObj } from '@storybook/vue3-vite'
import { defineComponent, h } from 'vue'
import { useAuthStore } from './auth'
// Initial (logged-out) state only — checkAuth() would hit the auth proxy.
const AuthStoreDemo = defineComponent({
name: 'AuthStoreDemo',
setup() {
const auth = useAuthStore... |
d3a1884c6c70fc77b586a37880af178b20de6671794ac44ed80fc9e5e0203acf | TypeScript | 785 | 25 | import http from '@/api/http'
export interface SettingsItem {
key: string
value: unknown
}
export async function fetchSettings(): Promise<SettingsItem[]> {
const res = await http.get<SettingsItem[]>('/kaapana-backend/settings')
return res.data
}
export async function putSettingsItem(item: SettingsItem): Prom... |
6832882e0ec907c3e20ed1c7abe2141d53db3d9b8c1ee41a058eb99144615779 | TypeScript | 794 | 32 | import { fileURLToPath, URL } from 'node:url'
import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import vueDevTools from 'vite-plugin-vue-devtools'
export default defineConfig(() => ({
base: '/',
plugins: [vue(), vueDevTools()],
resolve: {
alias: {
'@': fileURLToPath(new URL('./s... |
9762a434303a142db92c241570f610d4920ecc920a927bc17a777f31fa3d0838 | TypeScript | 800 | 25 | import { defineStore } from 'pinia'
import { httpClient } from '@kaapana/base-ui'
interface CommonDataState {
policyData: Record<string, any>
}
export const useCommonDataStore = defineStore('commonData', {
state: (): CommonDataState => ({
policyData: {},
}),
actions: {
// Deliberately not @kaapana/bas... |
bdb6193e30e888f914e2fea2a5e7501abc7ef01b3b98862fc3c36623e0e64f37 | TypeScript | 815 | 27 | import Vue from 'vue'
import request from '@/request'
const AuthService = {
getToken() {
return new Promise((resolve, reject) => {
let oauthUrl = ''
if (Vue.config.productionTip === true) {
oauthUrl = '/oauth2/userinfo'
} else {
oauthUrl = '/jsons/testingAuthenticationToken.json... |
59407de3534c49988767e366af2fdfdf1bd1225b794595523bdfb0e6a42a80ca | TypeScript | 817 | 27 | import type { Meta, StoryObj } from '@storybook/vue3-vite'
import { defineComponent, h } from 'vue'
import { getProjectBase, getProjectSlug } from './selectedProject'
// The Storybook URL carries no /project/ prefix, so both helpers report unscoped.
const SelectedProjectDemo = defineComponent({
name: 'SelectedProjec... |
f836d0494744ae46979c80b7e874dae49e375b22a68869b9346fe34fd0ddea81 | TypeScript | 821 | 36 | export interface KaapanaInstance {
instance_name: string
remote?: boolean
[key: string]: any
}
export interface Workflow {
workflow_name: string
workflow_id: string
dataset_name: { name: string; access_level: string } | null
time_created: string
time_updated: string
username: string
kaapana_instanc... |
18883f48b74084938b33a9a00cfc7da429481de18baedc7186217aa6039c4ba5 | TypeScript | 827 | 29 | import { globalIgnores } from 'eslint/config'
import { defineConfigWithVueTs, vueTsConfigs } from '@vue/eslint-config-typescript'
import pluginVue from 'eslint-plugin-vue'
import pluginVitest from '@vitest/eslint-plugin'
import pluginPlaywright from 'eslint-plugin-playwright'
import skipFormatting from '@vue/eslint-con... |
867dec17d16d115345631cb7e6f40df1eed32d068d3cd92f69d835dad3175161 | TypeScript | 834 | 28 | import type { Meta, StoryObj } from '@storybook/vue3-vite'
import { defineComponent, h } from 'vue'
import { useProjectStore } from './project'
// Initial state only — getSelectedProject() would hit the backend and redirect.
const ProjectStoreDemo = defineComponent({
name: 'ProjectStoreDemo',
setup() {
const p... |
4f9524ba2a4cc3472f71dee05443aeaff6eebf2be848cb21de752cb0e20cd6db | TypeScript | 835 | 27 | import type { Meta, StoryObj } from '@storybook/vue3-vite'
import { defineComponent, h } from 'vue'
import { httpClient, httpClientWithoutTimeout } from './httpClient'
// The scoping interceptor is a no-op here — the story URL is unscoped.
const HttpClientDemo = defineComponent({
name: 'HttpClientDemo',
setup() {
... |
c616d6377e4dab5b8fca1167e1edaeb5f4f8f03675d4e354daf58594e9ea33d6 | TypeScript | 840 | 22 | import { test, expect } from '@playwright/test'
import { bootGallery, makeDefaultMockData } from './fixtures/mock-backend'
test('deleting a tag chip on a series posts a tags2delete update', async ({ page }) => {
const data = makeDefaultMockData()
data.seriesData['1.2.3'].metadata.Tags = ['review']
await bootGall... |
f3d61cd8b6178112b09aae23774963925bf424ff107d266b6489e1c853ecccdb | TypeScript | 861 | 25 | /* eslint-disable */
/* prettier-ignore */
// @ts-nocheck
// Generated by unplugin-vue-router. ‼️ DO NOT MODIFY THIS FILE ‼️
// It's recommended to commit this file.
// Make sure to add this file to your tsconfig.json file as an "includes" or "files" entry.
declare module 'vue-router/auto-routes' {
import type {
... |
35b9f4bebee7b563859f176b5546a868fd8f45c7d41098a0aca3aeac023871c1 | TypeScript | 862 | 34 | import type { QueryNode } from '@/types/domain'
export function shouldIgnoreHotkeyTarget(target: EventTarget | null): boolean {
if (!(target instanceof HTMLElement)) {
return false
}
const tagName = target.tagName
if (['INPUT', 'TEXTAREA', 'SELECT'].includes(tagName)) {
return true
}
return Boolean... |
0de0a1564af60902ea523986896a37e651c3ce2b2723c9701e5e8a04249ff564 | TypeScript | 863 | 36 | // Shape of localStorage["settings"] shared with the extracted view containers.
// defaultUIConfig.ts provides the defaults.
export interface DatasetPropItem {
name: string
display: boolean
truncate: boolean
dashboard: boolean
patientView?: boolean
studyView?: boolean
}
export interface WorkflowFormDefaul... |
ad0fb8167771479b9cadeab05c6c00867b87d494f6fb29e1b4aa1c5573cc9a9a | TypeScript | 864 | 26 | import { defineComponent, h } from 'vue'
import { VBtn, VTooltip } from 'vuetify/components'
import { kaapanaIcons } from '../utils/icons'
// A keyboard-focusable (i) button that reveals a field's help in a tooltip on
// hover and focus. type="button" keeps it from submitting a surrounding v-form.
export const HelpIco... |
21d06b63ea8a1af71c88c6e85bb5897f2e270b264367133f6b72fc18f62e80a4 | TypeScript | 878 | 43 | import { fileURLToPath, URL } from 'node:url'
import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import vueDevTools from 'vite-plugin-vue-devtools'
export default defineConfig(() => ({
base: "/workflow-ui",
plugins: [
vue(),
vueDevTools(),
],
resolve: {
alias: {
'@': fi... |
253f659a4f00a8d73069243452c3fc251f98babdfb93d965b4b0a31acde63a34 | TypeScript | 878 | 40 | import { createRouter, createWebHistory } from 'vue-router'
import Catalog from '@/views/Catalog.vue'
import Extensions from '@/views/Extensions.vue'
import Repositories from '@/views/Repositories.vue'
const routes = [
{
path: '/',
redirect: '/catalog',
},
{
path: '/catalog',
name: 'Catalog',
... |
b9cb4cc808be077650933238de18fe11c6564e2fe61c13e8d014872f0510ba70 | TypeScript | 912 | 32 | import 'vuetify/styles';
import { createVuetify } from 'vuetify';
import { aliases, mdi } from 'vuetify/iconsets/mdi';
import * as components from 'vuetify/components';
import * as directives from 'vuetify/directives';
import {
kaapanaThemeLight,
kaapanaThemeDark,
KAAPANA_THEME_LIGHT,
KAAPANA_THEME_DARK,
} from... |
2e8505ca27961ebedffa79593039af5284732ba3d559397684214d5e26a466ce | TypeScript | 917 | 33 | import { httpClient } from './httpClient'
export interface UserinfoJwt {
preferredUsername: string
groups: string[]
user: string
}
const AuthService = {
getToken(): Promise<UserinfoJwt> {
return new Promise((resolve, reject) => {
// In dev mode the auth proxy is absent; a static token file stands in... |
5711b6215064b50e245caf5fa160c090e5cd6bb528c0a41c22ec03268f5848e1 | TypeScript | 939 | 44 | /** @hidden @internal */
class Attribute {
static NUMBER = "number";
static STRING = "string";
static BOOLEAN = "boolean";
name: string;
modelName?: string;
defaultValue: any;
alwaysWriteJson?: boolean;
type?: string;
required: boolean;
fixed: boolean;
constructor(name: st... |
5e68b49f3301e17f0dbb04209c80dd9ed41dceb29901e89417c37e79b0b712fa | TypeScript | 941 | 35 | import { createRouter, createWebHistory, type RouteRecordRaw } from 'vue-router'
import { getProjectBase, useAuthStore } from '@kaapana/base-ui'
const routes: RouteRecordRaw[] = [
{
name: 'datasets',
path: '/',
component: () => import('@/views/Datasets.vue'),
meta: { title: 'Datasets' },
},
]
cons... |
6d071dd946ed1a637c1fcf22d50cea775efaeded7b70a039c1b410767542b4f0 | TypeScript | 956 | 28 | import axios, { type InternalAxiosRequestConfig } from 'axios'
import { getProjectBase } from './selectedProject'
export const httpClient = axios.create({
headers: {},
timeout: 10000,
})
export const httpClientWithoutTimeout = axios.create({
headers: {},
timeout: 0,
})
// Calls to project-scoped services are... |
3a675f316d5cf17d9933c239b46c359b38a0542332dd33e7e379eed2e6f44539 | TypeScript | 957 | 35 | import { createRouter, createWebHistory, type RouteRecordRaw } from 'vue-router'
import { getProjectBase, useAuthStore } from '@kaapana/base-ui'
const routes: RouteRecordRaw[] = [
{
name: 'results-browser',
path: '/',
component: () => import('@/views/ResultsBrowser.vue'),
meta: { title: 'Workflow Res... |
f1db905fa3129728471bbfb120f687aef5dd8dce340c1b8cac00e0591f398325 | TypeScript | 962 | 30 | import apiClient from '@/shared/api/client'
import type { InstalledExtension } from '@/shared/types/apiSchemas'
const API_BASE = '/extensions'
export async function installExtension(repositoryId: string, tag: string): Promise<void> {
await apiClient.post(`${API_BASE}/install`, null, {
params: {
repository... |
9f1e45f10401795553903372cd011891d9d6bc95543b9db006ed8e1290164ce1 | TypeScript | 985 | 33 | import { createRouter, createWebHistory } from 'vue-router'
import WorkflowRuns from '../views/WorkflowRuns.vue'
import Workflows from '../views/Workflows.vue'
import { getProjectBase } from '../utils/projectScope'
const routes = [
{
path: '/workflows',
name: 'Workflows',
component: Workflo... |
35d1acca0de4f8daff1ffba2796f010ff2c66d9454457609be49d6c88fde6e27 | TypeScript | 986 | 37 | import 'vuetify/styles';
import { createVuetify } from 'vuetify';
import { aliases, mdi } from 'vuetify/iconsets/mdi';
import * as components from 'vuetify/components';
import * as directives from 'vuetify/directives';
import {
kaapanaThemeLight,
kaapanaThemeDark,
KAAPANA_THEME_LIGHT,
KAAPANA_THEME_DARK,
} from... |
3a827c25a633bbe15ed3ec25ba508a47c45e69f4112222442cbdc6a6db16e80a | TypeScript | 1,007 | 21 | import { test } from '@playwright/test'
import { installMockBackend, seedShellState, viewPathFor } from './fixtures/mock-backend'
// The /project/<short_id> document prefix IS the project selection: API calls
// must be scoped to it (not to a default or any shared state). This view keeps
// no project store, so served... |
4e5da65fca71bed9369fb73ba1b8ed29cb426c112cda5f38b5eec13fa7c5d46b | TypeScript | 1,021 | 26 | // The shell serves every view under /project/<short_id>/<view>/ and reloads
// the iframe on a project switch, so the document URL is the single source of
// the selected project. Served without the prefix (standalone), the selection
// is empty.
export function getProjectSlug(): string | null {
return window.locati... |
540773ef5d887538c8a35087fa6f131f497ac0a38427abf7ab1e80a7aa1c848c | TypeScript | 1,025 | 28 | export function checkRoleAuthR(policyData: any, endpoint: string, role: string, method = 'GET') {
'Check if role is authorized to access the requested endpoint with the requested method'
let policyDataEndpoints = []
policyDataEndpoints =
policyData.endpoints_per_role && policyData.endpoints_per_role[role]
... |
6648c7236ab3f78e8f6beb4b3437251a4611164f02433b1c7d3cb652b1fd4f30 | TypeScript | 1,028 | 20 | import { test, expect } from '@playwright/test';
test.use({
ignoreHTTPSErrors: true
});
test('First Login and Change Password of Platform', async ({ page }) => {
await page.goto('$KAAPANA_TEST_INSTANCE_UI');
await page.getByRole('textbox', { name: 'Username or email' }).click();
await page.getByRole('... |
f8f64967999c45024d40ae01846a30ab61796d150041ee24eb21f06605018623 | TypeScript | 1,028 | 50 | import kaapanaApiService from '@/common/kaapanaApi.service'
import CommonDataService from '@/common/commonData.service'
import {
LOAD_COMMON_DATA,
} from '@/store/actions.type'
import { SET_COMMON_DATA } from '@/store/mutations.type'
const defaults = {
commonData: {},
availableApplications: []
}
const state =... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.