fluency-v8-components 1.3.5 → 1.3.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/fluency-v8-components.es.js +1 -1
- package/dist/fluency-v8-components.umd.js +99 -99
- package/dist/{index-q2NbjdVo.mjs → index-ChEFiXF5.mjs} +12 -11
- package/dist/{index.es-PAPL4E6Y.mjs → index.es-CjjN70eV.mjs} +1 -1
- package/package.json +3 -2
- package/src/assets/images/ai.svg +1 -0
- package/src/assets/images/github-dark.svg +1 -0
- package/src/assets/images/github.svg +1 -0
- package/src/assets/images/high-priority.svg +1 -0
- package/src/assets/images/power-off.svg +1 -0
- package/src/assets/images/save.svg +1 -0
- package/src/assets/index.ts +15 -0
- package/src/assets/main.css +495 -0
- package/src/assets/prism-theme.css +290 -0
- package/src/components/buttons/ActionButtons.vue +374 -0
- package/src/components/buttons/DropdownButton.vue +104 -0
- package/src/components/buttons/IconButton.vue +63 -0
- package/src/components/buttons/ImageButton.vue +16 -0
- package/src/components/buttons/MenuButton.vue +138 -0
- package/src/components/buttons/SubmitButtons.vue +51 -0
- package/src/components/buttons/TextButton.vue +40 -0
- package/src/components/charts/AlertChart.vue +376 -0
- package/src/components/charts/BarChart.vue +212 -0
- package/src/components/charts/BarChartHorizontal.vue +243 -0
- package/src/components/charts/CronChart.vue +146 -0
- package/src/components/charts/EmptyChart.vue +76 -0
- package/src/components/charts/GradientChart.vue +310 -0
- package/src/components/charts/LineChart.test.js +59 -0
- package/src/components/charts/LineChart.vue +434 -0
- package/src/components/charts/PieChart.vue +293 -0
- package/src/components/charts/ProgressChart.vue +106 -0
- package/src/components/charts/StackedChart.vue +364 -0
- package/src/components/charts/StackedChartClustered.vue +395 -0
- package/src/components/charts/TimelineChart.vue +215 -0
- package/src/components/charts/WorkflowChart.vue +520 -0
- package/src/components/common/AutoCompleteSearchBar.vue +100 -0
- package/src/components/common/AutoRefreshButton.vue +53 -0
- package/src/components/common/Breadcrumb.vue +45 -0
- package/src/components/common/ButtonToggle.vue +24 -0
- package/src/components/common/Card.vue +116 -0
- package/src/components/common/Carousel.vue +66 -0
- package/src/components/common/CategoryCard.vue +28 -0
- package/src/components/common/CodeEditor.vue +59 -0
- package/src/components/common/DatePicker.vue +21 -0
- package/src/components/common/DatePickerInput.vue +109 -0
- package/src/components/common/Dialog.vue +103 -0
- package/src/components/common/EditorHeading.vue +10 -0
- package/src/components/common/EventList.vue +41 -0
- package/src/components/common/Facet.vue +206 -0
- package/src/components/common/Feed.vue +58 -0
- package/src/components/common/Flag.vue +27 -0
- package/src/components/common/HomeCard.vue +20 -0
- package/src/components/common/ItemBox.vue +49 -0
- package/src/components/common/Loading.vue +19 -0
- package/src/components/common/LoadingDots.vue +12 -0
- package/src/components/common/PageHeading.vue +30 -0
- package/src/components/common/Pagination.vue +105 -0
- package/src/components/common/Popover.vue +24 -0
- package/src/components/common/PowerToggle.vue +130 -0
- package/src/components/common/ProgressBar.vue +33 -0
- package/src/components/common/RadioButtons.vue +52 -0
- package/src/components/common/Schedule.vue +79 -0
- package/src/components/common/SearchBar.vue +30 -0
- package/src/components/common/Separator.vue +3 -0
- package/src/components/common/Slideout.vue +95 -0
- package/src/components/common/Sort.vue +83 -0
- package/src/components/common/Table.vue +48 -0
- package/src/components/common/Tabs.vue +129 -0
- package/src/components/common/Tag.vue +53 -0
- package/src/components/common/Tooltip.vue +49 -0
- package/src/components/common/VerticalTabs.vue +34 -0
- package/src/components/common/card/CardItem.vue +27 -0
- package/src/components/common/card/CardItemGroup.vue +45 -0
- package/src/components/common/facet/Leaf.vue +97 -0
- package/src/components/common/facet/TriState.vue +37 -0
- package/src/components/common/table/TableData.vue +48 -0
- package/src/components/common/table/TableHeader.vue +21 -0
- package/src/components/dialogs/ChooseValueDialog.vue +97 -0
- package/src/components/dialogs/ConfirmDialog.vue +73 -0
- package/src/components/dialogs/CopyDialog.vue +51 -0
- package/src/components/dialogs/DownloadDialog.vue +48 -0
- package/src/components/dialogs/NameDescDialog.vue +74 -0
- package/src/components/dialogs/NameDialog.vue +56 -0
- package/src/components/dialogs/PopupEditor.vue +113 -0
- package/src/components/dialogs/ProgressDialog.vue +58 -0
- package/src/components/dialogs/ResetPasswordDialog.vue +58 -0
- package/src/components/dialogs/Wizard.vue +99 -0
- package/src/components/dialogs/wizard/Stepper.vue +31 -0
- package/src/components/form/CheckBox.vue +26 -0
- package/src/components/form/Editor.vue +93 -0
- package/src/components/form/FormCol.vue +19 -0
- package/src/components/form/FormRow.vue +19 -0
- package/src/components/form/FormSection.vue +21 -0
- package/src/components/form/GreyForm.vue +7 -0
- package/src/components/form/GreyInput.vue +51 -0
- package/src/components/form/GreyInputAutocomplete.vue +100 -0
- package/src/components/form/GreyInputCopy.vue +66 -0
- package/src/components/form/GreyInputGrow.vue +42 -0
- package/src/components/form/GreyInputToken.vue +78 -0
- package/src/components/form/GreyPassword.vue +36 -0
- package/src/components/form/GreySelect.vue +154 -0
- package/src/components/form/GreySelectInput.vue +123 -0
- package/src/components/form/GreySelectInputMultiple.vue +218 -0
- package/src/components/form/GreyTel.vue +58 -0
- package/src/components/form/HamburgerItem.vue +95 -0
- package/src/components/form/KeyValueEntry.vue +74 -0
- package/src/components/form/RadioInput.vue +38 -0
- package/src/components/form/UploadFile.vue +99 -0
- package/src/components/icons/AiIcon.vue +6 -0
- package/src/components/icons/GithubIcon.vue +18 -0
- package/src/components/icons/HighPriorityIcon.vue +6 -0
- package/src/components/icons/PowerOffIcon.vue +6 -0
- package/src/components/icons/SaveIcon.vue +6 -0
- package/src/components/index.js +134 -0
- package/src/components/menu/DialogMenu.vue +142 -0
- package/src/components/menu/GrandChild.vue +39 -0
- package/src/components/menu/GridMenu.vue +88 -0
- package/src/components/menu/MenuAvatar.vue +66 -0
- package/src/components/menu/MenuDesktop.vue +90 -0
- package/src/components/notifications/Notify.vue +123 -0
- package/src/components/notifications/NotifyList.vue +130 -0
- package/src/components/page-structure/FacetPage.vue +77 -0
- package/src/components/query/Child.vue +63 -0
- package/src/components/query/LVDBQuery.vue +38 -0
- package/src/components/status/Active.vue +44 -0
- package/src/components/status/ScoreLevel.vue +43 -0
- package/src/components/status/Status.vue +51 -0
- package/src/components/status/TaskDot.vue +25 -0
- package/src/components/status/TaskStatus.vue +26 -0
- package/src/components/status/TicketStatus.vue +201 -0
- package/src/components/status/Trend.vue +20 -0
- package/src/components/tables/ArgumentRunTable.vue +96 -0
- package/src/components/tables/ArgumentTable.vue +67 -0
- package/src/components/tables/CloudFormationParameters.vue +25 -0
- package/src/constants/colors.js +248 -0
- package/src/constants/font-map.js +128 -0
- package/src/constants/fpl2.js +162 -0
- package/src/constants/icon-svg.js +405 -0
- package/src/constants/schedule.js +52 -0
- package/src/fpl/AddPanel.vue +237 -0
- package/src/fpl/Configs/Alert.vue +16 -0
- package/src/fpl/Configs/AlertSprite.vue +2 -0
- package/src/fpl/Configs/Chart.vue +63 -0
- package/src/fpl/Configs/Config.js +154 -0
- package/src/fpl/Configs/Counter.vue +35 -0
- package/src/fpl/Configs/Histogram.vue +70 -0
- package/src/fpl/Configs/IPMap.vue +37 -0
- package/src/fpl/Configs/Image.vue +163 -0
- package/src/fpl/Configs/MetricChart.vue +20 -0
- package/src/fpl/Configs/PieChart.vue +37 -0
- package/src/fpl/Configs/SparkChart.vue +41 -0
- package/src/fpl/Configs/StackedBarChart.vue +49 -0
- package/src/fpl/Configs/Table.vue +211 -0
- package/src/fpl/Configs/Text.vue +14 -0
- package/src/fpl/Configs/TopNChart.vue +37 -0
- package/src/fpl/Outputs/FPLAlert.vue +64 -0
- package/src/fpl/Outputs/FPLStream.vue +41 -0
- package/src/fpl/Outputs/FPLTable.vue +77 -0
- package/src/fpl/Panel.vue +202 -0
- package/src/fpl/Panels/Alert.vue +85 -0
- package/src/fpl/Panels/AlertSprite.vue +9 -0
- package/src/fpl/Panels/Chart.vue +98 -0
- package/src/fpl/Panels/Counter.vue +43 -0
- package/src/fpl/Panels/Histogram.vue +138 -0
- package/src/fpl/Panels/IPMap.vue +48 -0
- package/src/fpl/Panels/Image.vue +35 -0
- package/src/fpl/Panels/MetricChart.vue +97 -0
- package/src/fpl/Panels/PieChart.vue +54 -0
- package/src/fpl/Panels/SparkChart.vue +166 -0
- package/src/fpl/Panels/StackedBarChart.vue +74 -0
- package/src/fpl/Panels/Table.vue +103 -0
- package/src/fpl/Panels/Text.vue +24 -0
- package/src/fpl/Panels/TopNChart.vue +69 -0
- package/src/fpl/index.js +39 -0
- package/src/utils/download.js +220 -0
- package/src/utils/formatOutput.js +156 -0
- package/src/utils/random.js +32 -0
- package/src/utils/timeUtils.js +138 -0
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<nav class="flex" aria-label="Breadcrumb">
|
|
3
|
+
<ol role="list" class="flex items-center space-x-4">
|
|
4
|
+
<li>
|
|
5
|
+
<div>
|
|
6
|
+
<span
|
|
7
|
+
class="hover:text-gray-400 cursor-pointer"
|
|
8
|
+
@click="emits('home')"
|
|
9
|
+
>
|
|
10
|
+
<HomeIcon class="icon-md flex-shrink-0" aria-hidden="true" />
|
|
11
|
+
</span>
|
|
12
|
+
</div>
|
|
13
|
+
</li>
|
|
14
|
+
<li v-for="(page, i) in pages" :key="page.name">
|
|
15
|
+
<div class="flex items-center">
|
|
16
|
+
<svg
|
|
17
|
+
class="icon-md flex-shrink-0 dark:text-gray-300"
|
|
18
|
+
fill="currentColor"
|
|
19
|
+
viewBox="0 0 20 20"
|
|
20
|
+
aria-hidden="true"
|
|
21
|
+
>
|
|
22
|
+
<path d="M5.555 17.776l8-16 .894.448-8 16-.894-.448z" />
|
|
23
|
+
</svg>
|
|
24
|
+
<span
|
|
25
|
+
:href="page.path"
|
|
26
|
+
class="ml-4 text-sm font-medium hover:text-gray-400 cursor-pointer"
|
|
27
|
+
@click="emits('navigate', page, i)"
|
|
28
|
+
>
|
|
29
|
+
{{ page.name }}
|
|
30
|
+
</span>
|
|
31
|
+
</div>
|
|
32
|
+
</li>
|
|
33
|
+
</ol>
|
|
34
|
+
</nav>
|
|
35
|
+
</template>
|
|
36
|
+
|
|
37
|
+
<script setup>
|
|
38
|
+
import { HomeIcon } from "@heroicons/vue/20/solid";
|
|
39
|
+
|
|
40
|
+
const props = defineProps({
|
|
41
|
+
pages: Array,
|
|
42
|
+
homeURL: String,
|
|
43
|
+
});
|
|
44
|
+
const emits = defineEmits(["navigate", "home"]);
|
|
45
|
+
</script>
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<span class="isolate inline-flex rounded-md shadow-xs rounded-md">
|
|
3
|
+
<button
|
|
4
|
+
v-for="(option, i) in options"
|
|
5
|
+
type="button"
|
|
6
|
+
:class="[
|
|
7
|
+
'button-toggle bg-gray-200 text-black',
|
|
8
|
+
{ 'text-gray-500 opacity-75': option.value !== inputValue },
|
|
9
|
+
{ 'rounded-l-lg': i === 0 },
|
|
10
|
+
{ 'rounded-r-lg': i === options.length - 1 },
|
|
11
|
+
]"
|
|
12
|
+
@click="emits('toggle', option.value)"
|
|
13
|
+
>
|
|
14
|
+
{{ option.label }}
|
|
15
|
+
</button>
|
|
16
|
+
</span>
|
|
17
|
+
</template>
|
|
18
|
+
<script setup>
|
|
19
|
+
const props = defineProps({
|
|
20
|
+
options: Array,
|
|
21
|
+
inputValue: String,
|
|
22
|
+
});
|
|
23
|
+
const emits = defineEmits(["toggle"]);
|
|
24
|
+
</script>
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<li
|
|
3
|
+
:class="[
|
|
4
|
+
'overflow-hidden rounded-xl border border-gray-300 dark:border-neutral-600',
|
|
5
|
+
{
|
|
6
|
+
'bg-green-300 dark:bg-green-900 ': color === 'green',
|
|
7
|
+
},
|
|
8
|
+
{
|
|
9
|
+
'bg-red-400 dark:bg-red-800 ': color === 'red',
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
'bg-sky-200 dark:bg-sky-800': color === 'blue',
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
'bg-white dark:dark-bg': color === 'default',
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
'cursor-pointer': clickable,
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
'hover:bg-green-500 dark:hover:bg-green-700':
|
|
22
|
+
clickable && color === 'green',
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
'hover:bg-red-600 dark:hover:bg-red-700': clickable && color === 'red',
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
'hover:bg-sky-300 dark:hover:bg-sky-700': clickable && color === 'blue',
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
'hover:white-bg-hover hover:dark:dark-bg-hover':
|
|
32
|
+
clickable && color === 'default',
|
|
33
|
+
},
|
|
34
|
+
]"
|
|
35
|
+
@click="emits('boxClick')"
|
|
36
|
+
>
|
|
37
|
+
<div
|
|
38
|
+
v-if="title || description"
|
|
39
|
+
class="flex items-center gap-x-4 border-b border-gray-200 dark:border-neutral-600 px-6 py-5"
|
|
40
|
+
>
|
|
41
|
+
<div class="font-medium leading-6 max-w-full">
|
|
42
|
+
<div class="row gap-x-3 items-center truncate">
|
|
43
|
+
<slot name="title" />
|
|
44
|
+
{{ title }}
|
|
45
|
+
</div>
|
|
46
|
+
<div class="text-sm leading-6 font-extralight">
|
|
47
|
+
{{ description }}
|
|
48
|
+
</div>
|
|
49
|
+
</div>
|
|
50
|
+
<Menu
|
|
51
|
+
v-if="menuItems && menuItems.length > 0"
|
|
52
|
+
as="div"
|
|
53
|
+
class="relative ml-auto"
|
|
54
|
+
>
|
|
55
|
+
<MenuButton
|
|
56
|
+
class="-m-2.5 block p-2.5 text-gray-400 hover:text-gray-500"
|
|
57
|
+
@click="($event) => $event.stopPropagation()"
|
|
58
|
+
>
|
|
59
|
+
<span class="sr-only">Open options</span>
|
|
60
|
+
<EllipsisHorizontalIcon class="icon-md" aria-hidden="true" />
|
|
61
|
+
</MenuButton>
|
|
62
|
+
<transition
|
|
63
|
+
enter-active-class="transition ease-out duration-100"
|
|
64
|
+
enter-from-class="transform opacity-0 scale-95"
|
|
65
|
+
enter-to-class="transform opacity-100 scale-100"
|
|
66
|
+
leave-active-class="transition ease-in duration-75"
|
|
67
|
+
leave-from-class="transform opacity-100 scale-100"
|
|
68
|
+
leave-to-class="transform opacity-0 scale-95"
|
|
69
|
+
>
|
|
70
|
+
<MenuItems
|
|
71
|
+
class="absolute right-0 z-10 mt-0.5 w-32 origin-top-right rounded-md py-2 shadow-lg ring-1 ring-gray-900/5 focus:outline-hidden bg-white dark:bg-black"
|
|
72
|
+
>
|
|
73
|
+
<MenuItem v-for="menuItem in menuItems" v-slot="{ active }">
|
|
74
|
+
<div
|
|
75
|
+
:class="[
|
|
76
|
+
active ? 'cursor-pointer bg-gray-50 dark:bg-gray-800' : '',
|
|
77
|
+
'block px-3 py-1 text-sm leading-6',
|
|
78
|
+
]"
|
|
79
|
+
@click.stop="emits('menuClick', menuItem)"
|
|
80
|
+
>
|
|
81
|
+
{{ menuItem }}
|
|
82
|
+
</div>
|
|
83
|
+
</MenuItem>
|
|
84
|
+
</MenuItems>
|
|
85
|
+
</transition>
|
|
86
|
+
</Menu>
|
|
87
|
+
</div>
|
|
88
|
+
<dl
|
|
89
|
+
class="-my-3 divide-y divide-gray-200 dark:divide-neutral-600 px-6 py-4 text-sm leading-6"
|
|
90
|
+
>
|
|
91
|
+
<slot name="content" />
|
|
92
|
+
</dl>
|
|
93
|
+
</li>
|
|
94
|
+
</template>
|
|
95
|
+
<script setup>
|
|
96
|
+
import { Menu, MenuButton, MenuItem, MenuItems } from "@headlessui/vue";
|
|
97
|
+
import { EllipsisHorizontalIcon } from "@heroicons/vue/20/solid";
|
|
98
|
+
|
|
99
|
+
const props = defineProps({
|
|
100
|
+
title: String,
|
|
101
|
+
description: {
|
|
102
|
+
type: String,
|
|
103
|
+
default: "",
|
|
104
|
+
},
|
|
105
|
+
menuItems: Array,
|
|
106
|
+
color: {
|
|
107
|
+
type: String,
|
|
108
|
+
default: "default",
|
|
109
|
+
},
|
|
110
|
+
clickable: {
|
|
111
|
+
type: Boolean,
|
|
112
|
+
default: false,
|
|
113
|
+
},
|
|
114
|
+
});
|
|
115
|
+
const emits = defineEmits(["boxClick", "menuClick"]);
|
|
116
|
+
</script>
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="relative">
|
|
3
|
+
<slot name="content" />
|
|
4
|
+
<!-- slider buttons -->
|
|
5
|
+
<button
|
|
6
|
+
v-if="size > 1"
|
|
7
|
+
type="button"
|
|
8
|
+
class="absolute top-0 start-0 z-30 flex items-center justify-center h-full cursor-pointer group focus:outline-hidden"
|
|
9
|
+
@click="slideLeft"
|
|
10
|
+
>
|
|
11
|
+
<ChevronLeftIcon class="icon-lg" />
|
|
12
|
+
</button>
|
|
13
|
+
<button
|
|
14
|
+
v-if="size > 1"
|
|
15
|
+
type="button"
|
|
16
|
+
class="absolute top-0 end-0 z-30 flex items-center justify-center h-full cursor-pointer group focus:outline-hidden"
|
|
17
|
+
@click="slideRight"
|
|
18
|
+
>
|
|
19
|
+
<ChevronRightIcon class="icon-lg" />
|
|
20
|
+
</button>
|
|
21
|
+
<!-- sliders -->
|
|
22
|
+
<div
|
|
23
|
+
class="absolute z-30 flex -translate-x-1/2 space-x-3 bottom-2 left-1/2"
|
|
24
|
+
>
|
|
25
|
+
<button
|
|
26
|
+
v-for="(a, i) in sizeArray"
|
|
27
|
+
type="button"
|
|
28
|
+
:class="[
|
|
29
|
+
'w-3 h-3 rounded-full',
|
|
30
|
+
current === i
|
|
31
|
+
? 'bg-gray-400 dark:bg-gray-300'
|
|
32
|
+
: 'bg-gray-200 dark:bg-gray-600',
|
|
33
|
+
]"
|
|
34
|
+
@click="emits('update', i)"
|
|
35
|
+
/>
|
|
36
|
+
</div>
|
|
37
|
+
</div>
|
|
38
|
+
</template>
|
|
39
|
+
<script setup>
|
|
40
|
+
import { computed } from "vue";
|
|
41
|
+
import { ChevronLeftIcon, ChevronRightIcon } from "@heroicons/vue/20/solid";
|
|
42
|
+
|
|
43
|
+
// props and emits
|
|
44
|
+
const props = defineProps({
|
|
45
|
+
current: Number,
|
|
46
|
+
size: Number,
|
|
47
|
+
});
|
|
48
|
+
const emits = defineEmits(["update"]);
|
|
49
|
+
// computed
|
|
50
|
+
const sizeArray = computed(() => Array.from({ length: props.size }));
|
|
51
|
+
// function defs
|
|
52
|
+
function slideLeft() {
|
|
53
|
+
if (props.current === 0) {
|
|
54
|
+
emits("update", props.size - 1);
|
|
55
|
+
} else {
|
|
56
|
+
emits("update", props.current - 1);
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
function slideRight() {
|
|
60
|
+
if (props.current === props.size - 1) {
|
|
61
|
+
emits("update", 0);
|
|
62
|
+
} else {
|
|
63
|
+
emits("update", props.current + 1);
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
</script>
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<GreyForm>
|
|
3
|
+
<div class="mb-3 flex items-center justify-between relative">
|
|
4
|
+
<slot name="icon" />
|
|
5
|
+
<div class="min-w-0 flex-1">
|
|
6
|
+
<h3 class="row truncate font-medium">
|
|
7
|
+
{{ category.name || category }}
|
|
8
|
+
<slot name="title" />
|
|
9
|
+
</h3>
|
|
10
|
+
</div>
|
|
11
|
+
<div class="flex mt-0 ml-4">
|
|
12
|
+
<slot name="header" />
|
|
13
|
+
</div>
|
|
14
|
+
</div>
|
|
15
|
+
<slot />
|
|
16
|
+
</GreyForm>
|
|
17
|
+
</template>
|
|
18
|
+
|
|
19
|
+
<script setup>
|
|
20
|
+
import { GreyForm } from "@/components";
|
|
21
|
+
|
|
22
|
+
const props = defineProps({
|
|
23
|
+
category: {
|
|
24
|
+
type: [Object, String],
|
|
25
|
+
required: true,
|
|
26
|
+
},
|
|
27
|
+
});
|
|
28
|
+
</script>
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<PrismEditor
|
|
3
|
+
class="editor-style"
|
|
4
|
+
v-bind="$attrs"
|
|
5
|
+
:style="`fontSize: ${props.fontSize}`"
|
|
6
|
+
:readonly="props.readonly"
|
|
7
|
+
:tab-size="props.tabSize"
|
|
8
|
+
:highlight="highlighter"
|
|
9
|
+
:line-numbers="props.lineNumbers"
|
|
10
|
+
/>
|
|
11
|
+
</template>
|
|
12
|
+
<script setup>
|
|
13
|
+
import { PrismEditor } from "vue-prism-editor";
|
|
14
|
+
import { fpl2, fpl2Traces } from "@/constants/fpl2";
|
|
15
|
+
import "vue-prism-editor/dist/prismeditor.min.css"; // import the styles somewhere
|
|
16
|
+
import { highlight } from "prismjs/components/prism-core";
|
|
17
|
+
import "@/assets/prism-theme.css"; // import syntax highlighting styles
|
|
18
|
+
|
|
19
|
+
// props and emits
|
|
20
|
+
const props = defineProps({
|
|
21
|
+
fontSize: {
|
|
22
|
+
type: String,
|
|
23
|
+
default: "12px",
|
|
24
|
+
},
|
|
25
|
+
isFPL: {
|
|
26
|
+
type: Boolean,
|
|
27
|
+
default: true,
|
|
28
|
+
},
|
|
29
|
+
readonly: {
|
|
30
|
+
type: Boolean,
|
|
31
|
+
default: false,
|
|
32
|
+
},
|
|
33
|
+
lineNumbers: {
|
|
34
|
+
type: Boolean,
|
|
35
|
+
default: false,
|
|
36
|
+
},
|
|
37
|
+
tabSize: {
|
|
38
|
+
type: Number,
|
|
39
|
+
default: 4,
|
|
40
|
+
},
|
|
41
|
+
noHighlight: {
|
|
42
|
+
type: Boolean,
|
|
43
|
+
default: false,
|
|
44
|
+
},
|
|
45
|
+
});
|
|
46
|
+
|
|
47
|
+
// function defs
|
|
48
|
+
function highlighter(code) {
|
|
49
|
+
if (code.length > 100000) {
|
|
50
|
+
return highlight(code, {});
|
|
51
|
+
}
|
|
52
|
+
if (props.noHighlight) {
|
|
53
|
+
return highlight(code, {});
|
|
54
|
+
} else if (props.isFPL) {
|
|
55
|
+
return highlight(code, fpl2);
|
|
56
|
+
}
|
|
57
|
+
return highlight(code, fpl2Traces); // languages.<insert language> to return html with markup
|
|
58
|
+
}
|
|
59
|
+
</script>
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="flex justify-center">
|
|
3
|
+
<vue-tailwind-datepicker
|
|
4
|
+
v-model="dateValue"
|
|
5
|
+
no-input
|
|
6
|
+
:disable-date="(date) => date > new Date()"
|
|
7
|
+
as-single
|
|
8
|
+
use-range
|
|
9
|
+
:shortcuts="false"
|
|
10
|
+
@update:model-value="emits('setTime', dateValue)"
|
|
11
|
+
/>
|
|
12
|
+
</div>
|
|
13
|
+
</template>
|
|
14
|
+
|
|
15
|
+
<script setup>
|
|
16
|
+
import { ref } from "vue";
|
|
17
|
+
import VueTailwindDatepicker from "vue-tailwind-datepicker";
|
|
18
|
+
|
|
19
|
+
const emits = defineEmits(["setTime"]);
|
|
20
|
+
const dateValue = ref([]);
|
|
21
|
+
</script>
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="col">
|
|
3
|
+
<vue-tailwind-datepicker :shortcuts="customShortcuts" v-model="dateValue" />
|
|
4
|
+
</div>
|
|
5
|
+
</template>
|
|
6
|
+
|
|
7
|
+
<script setup>
|
|
8
|
+
import { ref, watch, onMounted } from "vue";
|
|
9
|
+
import VueTailwindDatepicker from "vue-tailwind-datepicker";
|
|
10
|
+
import moment from "moment";
|
|
11
|
+
|
|
12
|
+
const props = defineProps({
|
|
13
|
+
from: Number,
|
|
14
|
+
to: Number,
|
|
15
|
+
});
|
|
16
|
+
const emits = defineEmits(["selectTime"]);
|
|
17
|
+
const dateValue = ref([]);
|
|
18
|
+
|
|
19
|
+
watch(dateValue, (val) => {
|
|
20
|
+
emits("selectTime", [moment(val[0]).valueOf(), moment(val[1]).valueOf()]);
|
|
21
|
+
});
|
|
22
|
+
watch(
|
|
23
|
+
() => props.from,
|
|
24
|
+
(val) => {
|
|
25
|
+
if (val) {
|
|
26
|
+
dateValue.value[0] = formatTime(val);
|
|
27
|
+
} else {
|
|
28
|
+
resetDate();
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
);
|
|
32
|
+
watch(
|
|
33
|
+
() => props.to,
|
|
34
|
+
(val) => {
|
|
35
|
+
if (val) {
|
|
36
|
+
dateValue.value[1] = formatTime(val);
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
);
|
|
40
|
+
|
|
41
|
+
onMounted(() => {
|
|
42
|
+
if (props.from && props.to) {
|
|
43
|
+
const fromFormatted = formatTime(props.from);
|
|
44
|
+
const toFormatted = formatTime(props.to);
|
|
45
|
+
dateValue.value = [fromFormatted, toFormatted];
|
|
46
|
+
} else {
|
|
47
|
+
resetDate();
|
|
48
|
+
}
|
|
49
|
+
});
|
|
50
|
+
|
|
51
|
+
function customShortcuts() {
|
|
52
|
+
const date = moment().valueOf();
|
|
53
|
+
return [
|
|
54
|
+
{
|
|
55
|
+
label: "Last Hour",
|
|
56
|
+
atClick: () => {
|
|
57
|
+
return [moment().subtract(1, "hours").valueOf(), date];
|
|
58
|
+
},
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
label: "Last Three Hours",
|
|
62
|
+
atClick: () => {
|
|
63
|
+
return [moment().subtract(3, "hours").valueOf(), date];
|
|
64
|
+
},
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
label: "Last Six Hours",
|
|
68
|
+
atClick: () => {
|
|
69
|
+
return [moment().subtract(6, "hours").valueOf(), date];
|
|
70
|
+
},
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
label: "Last Twelve Hours",
|
|
74
|
+
atClick: () => {
|
|
75
|
+
return [moment().subtract(12, "hours").valueOf(), date];
|
|
76
|
+
},
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
label: "Last Day",
|
|
80
|
+
atClick: () => {
|
|
81
|
+
return [moment().subtract(1, "days").valueOf(), date];
|
|
82
|
+
},
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
label: "Last Three Days",
|
|
86
|
+
atClick: () => {
|
|
87
|
+
return [moment().subtract(3, "days").valueOf(), date];
|
|
88
|
+
},
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
label: "Last Week",
|
|
92
|
+
atClick: () => {
|
|
93
|
+
return [moment().subtract(7, "days").valueOf(), date];
|
|
94
|
+
},
|
|
95
|
+
},
|
|
96
|
+
];
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
function resetDate() {
|
|
100
|
+
dateValue.value = [
|
|
101
|
+
formatTime(moment().subtract(1, "hours")),
|
|
102
|
+
formatTime(moment()),
|
|
103
|
+
];
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
function formatTime(time) {
|
|
107
|
+
return moment(time).format("YYYY-MM-DD HH:mm:ss");
|
|
108
|
+
}
|
|
109
|
+
</script>
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<TransitionRoot appear :show="open" as="template">
|
|
3
|
+
<Dialog as="div" @close="emits('close')" class="relative z-40">
|
|
4
|
+
<TransitionChild
|
|
5
|
+
as="template"
|
|
6
|
+
enter="duration-300 ease-out"
|
|
7
|
+
enter-from="opacity-0"
|
|
8
|
+
enter-to="opacity-100"
|
|
9
|
+
leave="duration-200 ease-in"
|
|
10
|
+
leave-from="opacity-100"
|
|
11
|
+
leave-to="opacity-0"
|
|
12
|
+
>
|
|
13
|
+
<div
|
|
14
|
+
class="fixed inset-0 bg-gray-500/75 transition-opacity"
|
|
15
|
+
/>
|
|
16
|
+
</TransitionChild>
|
|
17
|
+
|
|
18
|
+
<div class="fixed inset-0 overflow-y-auto">
|
|
19
|
+
<div
|
|
20
|
+
class="flex min-h-full items-center justify-center p-4 text-center"
|
|
21
|
+
>
|
|
22
|
+
<TransitionChild
|
|
23
|
+
as="template"
|
|
24
|
+
enter="duration-300 ease-out"
|
|
25
|
+
enter-from="opacity-0 scale-95"
|
|
26
|
+
enter-to="opacity-100 scale-100"
|
|
27
|
+
leave="duration-200 ease-in"
|
|
28
|
+
leave-from="opacity-100 scale-100"
|
|
29
|
+
leave-to="opacity-0 scale-95"
|
|
30
|
+
>
|
|
31
|
+
<DialogPanel
|
|
32
|
+
:class="[
|
|
33
|
+
'white-bg dark:dark-bg transform rounded-2xl p-6 text-left align-middle shadow-xl transition-all',
|
|
34
|
+
{ 'w-full max-w-md': size === 'small' },
|
|
35
|
+
{
|
|
36
|
+
'min-w-150 px-4 pb-4 pt-5 sm:my-8 w-full sm:max-w-lg sm:p-6':
|
|
37
|
+
size === 'medium',
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
'px-4 pb-4 pt-5 sm:my-8 w-full sm:max-w-4xl sm:p-6':
|
|
41
|
+
size === 'large',
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
'px-4 pb-4 pt-5 sm:my-8 w-full sm:max-w-7xl sm:p-6':
|
|
45
|
+
size === 'xlarge',
|
|
46
|
+
},
|
|
47
|
+
]"
|
|
48
|
+
>
|
|
49
|
+
<DialogTitle
|
|
50
|
+
as="h3"
|
|
51
|
+
class="relative text-lg font-medium leading-6"
|
|
52
|
+
>
|
|
53
|
+
{{ title }}
|
|
54
|
+
<div v-if="loading" class="mx-2 inline-block spinner"></div>
|
|
55
|
+
<div class="absolute right-2 top-0">
|
|
56
|
+
<slot name="header" />
|
|
57
|
+
</div>
|
|
58
|
+
</DialogTitle>
|
|
59
|
+
<p class="text-xs">{{ description }}</p>
|
|
60
|
+
<div class="pt-4">
|
|
61
|
+
<slot name="content" />
|
|
62
|
+
</div>
|
|
63
|
+
<div class="mt-4 space-x-3">
|
|
64
|
+
<slot name="footer" />
|
|
65
|
+
</div>
|
|
66
|
+
</DialogPanel>
|
|
67
|
+
</TransitionChild>
|
|
68
|
+
</div>
|
|
69
|
+
</div>
|
|
70
|
+
</Dialog>
|
|
71
|
+
</TransitionRoot>
|
|
72
|
+
</template>
|
|
73
|
+
|
|
74
|
+
<script lang="ts" setup>
|
|
75
|
+
import { computed } from "vue";
|
|
76
|
+
import {
|
|
77
|
+
TransitionRoot,
|
|
78
|
+
TransitionChild,
|
|
79
|
+
Dialog,
|
|
80
|
+
DialogPanel,
|
|
81
|
+
DialogTitle,
|
|
82
|
+
} from "@headlessui/vue";
|
|
83
|
+
|
|
84
|
+
const props = defineProps({
|
|
85
|
+
open: Boolean,
|
|
86
|
+
title: String,
|
|
87
|
+
description: {
|
|
88
|
+
type: String,
|
|
89
|
+
default: "",
|
|
90
|
+
},
|
|
91
|
+
size: {
|
|
92
|
+
type: String,
|
|
93
|
+
default: "small",
|
|
94
|
+
},
|
|
95
|
+
loading: {
|
|
96
|
+
type: Boolean,
|
|
97
|
+
default: false,
|
|
98
|
+
},
|
|
99
|
+
});
|
|
100
|
+
const emits = defineEmits(["close"]);
|
|
101
|
+
const open = computed(() => props.open);
|
|
102
|
+
const title = computed(() => props.title);
|
|
103
|
+
</script>
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<ul
|
|
3
|
+
role="list"
|
|
4
|
+
class="divide-y divide-gray-300 h-full list-style overflow-auto p-2"
|
|
5
|
+
>
|
|
6
|
+
<li
|
|
7
|
+
v-for="event in events"
|
|
8
|
+
class="relative flex justify-between hover:bg-gray-500 cursor-pointer"
|
|
9
|
+
@click="emits('copy', event)"
|
|
10
|
+
>
|
|
11
|
+
<p class="font-light leading-5 truncate">
|
|
12
|
+
{{ event.substring(0, 100) }}
|
|
13
|
+
</p>
|
|
14
|
+
<div class="flex items-center">
|
|
15
|
+
<ClipboardIcon
|
|
16
|
+
class="icon-md flex-none text-gray-400"
|
|
17
|
+
aria-hidden="true"
|
|
18
|
+
/>
|
|
19
|
+
</div>
|
|
20
|
+
</li>
|
|
21
|
+
<li v-if="events.length === 0" class="px-2">
|
|
22
|
+
<p class="font-light leading-5">No events found</p>
|
|
23
|
+
</li>
|
|
24
|
+
</ul>
|
|
25
|
+
</template>
|
|
26
|
+
|
|
27
|
+
<script setup>
|
|
28
|
+
import { ClipboardIcon } from "@heroicons/vue/20/solid";
|
|
29
|
+
const props = defineProps({
|
|
30
|
+
events: Array,
|
|
31
|
+
});
|
|
32
|
+
const emits = defineEmits(["copy"]);
|
|
33
|
+
</script>
|
|
34
|
+
|
|
35
|
+
<style scoped>
|
|
36
|
+
.list-style {
|
|
37
|
+
background: #303030;
|
|
38
|
+
color: #ffffff;
|
|
39
|
+
font-size: 14px;
|
|
40
|
+
}
|
|
41
|
+
</style>
|