diff --git a/app/Livewire/MonacoEditor.php b/app/Livewire/MonacoEditor.php index bd2a3c868..156c63d3a 100644 --- a/app/Livewire/MonacoEditor.php +++ b/app/Livewire/MonacoEditor.php @@ -12,26 +12,26 @@ class MonacoEditor extends Component 'configurationChanged' => '$refresh', ]; - public $language; - public function __construct( - public ?string $id = null, - public ?string $name = null, - public ?string $type = 'text', - public ?string $monacoContent = null, - public ?string $value = null, - public ?string $label = null, - public ?string $placeholder = null, - public bool $required = false, - public bool $disabled = false, - public bool $readonly = false, - public bool $allowTab = false, - public bool $spellcheck = false, - public ?string $helper = null, - public bool $realtimeValidation = false, - public bool $allowToPeak = true, - public string $defaultClass = 'input scrollbar font-mono', - public string $defaultClassInput = 'input' + public ?string $id, + public ?string $name, + public ?string $type, + public ?string $monacoContent, + public ?string $value, + public ?string $label, + public ?string $placeholder, + public bool $required, + public bool $disabled, + public bool $readonly, + public bool $allowTab, + public bool $spellcheck, + public ?string $helper, + public bool $realtimeValidation, + public bool $allowToPeak, + public string $defaultClass, + public string $defaultClassInput, + public ?string $language + ) { // } diff --git a/app/Livewire/Project/Shared/Logs.php b/app/Livewire/Project/Shared/Logs.php index e646f8a26..5af0a6a50 100644 --- a/app/Livewire/Project/Shared/Logs.php +++ b/app/Livewire/Project/Shared/Logs.php @@ -59,15 +59,6 @@ public function loadContainers($server_id) } } - public function loadMetrics() - { - return; - $server = data_get($this->resource, 'destination.server'); - if ($server->isFunctional()) { - $this->cpu = $server->getCpuMetrics(); - } - } - public function mount() { try { @@ -122,7 +113,6 @@ public function mount() } - $this->loadMetrics(); } catch (\Exception $e) { return handleError($e, $this); } diff --git a/app/View/Components/ApexCharts.php b/app/View/Components/ApexCharts.php deleted file mode 100644 index 6b86055d9..000000000 --- a/app/View/Components/ApexCharts.php +++ /dev/null @@ -1,34 +0,0 @@ -chartId = $chartId; - $this->seriesData = $seriesData; - $this->categories = $categories; - $this->seriesName = $seriesName ?? 'Series'; - } - - /** - * Get the view / contents that represent the component. - */ - public function render(): View|Closure|string - { - return view('components.apex-charts'); - } -} diff --git a/resources/css/app.css b/resources/css/app.css index 42496cffe..a037def51 100644 --- a/resources/css/app.css +++ b/resources/css/app.css @@ -4,7 +4,6 @@ html, body { - zoom: 0.95; @apply h-full bg-neutral-50 text-neutral-800 dark:bg-base dark:text-neutral-400; } @@ -12,6 +11,18 @@ body { @apply text-sm antialiased scrollbar; } +.apexcharts-tooltip { + @apply dark:text-white dark:border-coolgray-300 dark:bg-coolgray-200 shadow-none !important; +} + +.apexcharts-tooltip-title { + @apply hidden !important; +} + +.apexcharts-xaxistooltip { + @apply hidden !important; +} + .input, .select { @apply text-black dark:bg-coolgray-100 dark:text-white ring-neutral-200 dark:ring-coolgray-300; @@ -116,15 +127,19 @@ .alert-success { .alert-error { @apply flex items-center gap-2 text-error; } + .tag { @apply px-2 py-1 cursor-pointer box-description dark:bg-coolgray-100 dark:hover:bg-coolgray-300 bg-neutral-100 hover:bg-neutral-200; } + .add-tag { @apply flex items-center px-2 text-xs cursor-pointer dark:text-neutral-500/20 text-neutral-500 group-hover:text-neutral-700 group-hover:dark:text-white dark:hover:bg-coolgray-300 hover:bg-neutral-200; } + .dropdown-item { @apply relative flex cursor-pointer select-none dark:text-white hover:bg-neutral-100 dark:hover:bg-coollabs items-center pr-4 pl-2 py-1 text-xs justify-start outline-none transition-colors data-[disabled]:pointer-events-none data-[disabled]:opacity-50 gap-2 w-full; } + .dropdown-item-no-padding { @apply relative flex cursor-pointer select-none dark:text-white hover:bg-neutral-100 dark:hover:bg-coollabs items-center py-1 text-xs justify-start outline-none transition-colors data-[disabled]:pointer-events-none data-[disabled]:opacity-50 gap-2 w-full; } @@ -200,12 +215,15 @@ .kbd-custom { .box { @apply relative flex lg:flex-row flex-col p-2 transition-colors cursor-pointer min-h-[4rem] dark:bg-coolgray-100 bg-white border text-black dark:text-white hover:text-black border-neutral-200 dark:border-black hover:bg-neutral-100 dark:hover:bg-coollabs-100 dark:hover:text-white hover:no-underline; } + .box-boarding { @apply flex lg:flex-row flex-col p-2 transition-colors cursor-pointer min-h-[4rem] dark:bg-coolgray-100 dark:text-white bg-neutral-50 border border-neutral-200 dark:border-black hover:bg-neutral-100 dark:hover:bg-coollabs-100 dark:hover:text-white hover:text-black hover:no-underline text-black; } + .box-without-bg { @apply flex p-2 transition-colors dark:hover:text-white hover:no-underline min-h-[4rem] border border-neutral-200 dark:border-black; } + .box-without-bg-without-border { @apply flex p-2 transition-colors dark:hover:text-white hover:no-underline min-h-[4rem]; } diff --git a/resources/views/components/forms/monaco-editor.blade.php b/resources/views/components/forms/monaco-editor.blade.php index 880e0759b..d3793785b 100644 --- a/resources/views/components/forms/monaco-editor.blade.php +++ b/resources/views/components/forms/monaco-editor.blade.php @@ -1,7 +1,5 @@
-
-
+
+ }, 5);" :id="monacoId">
-
- - - - -
-
+
+ :style="'font-size: ' + monacoFontSize" + class="w-full text-sm font-mono absolute z-50 text-gray-500 ml-14 -translate-x-0.5 mt-0.5 left-0 top-0" + x-text="monacoPlaceholderText">
diff --git a/resources/views/components/forms/textarea.blade.php b/resources/views/components/forms/textarea.blade.php index 7f7457c4f..24226ecdb 100644 --- a/resources/views/components/forms/textarea.blade.php +++ b/resources/views/components/forms/textarea.blade.php @@ -24,57 +24,53 @@ function handleKeydown(e) { @endif @endif - @if($useMonacoEditor) - + @if ($useMonacoEditor) + @else - @if ($type === 'password') -
- @if ($allowToPeak) -
- - - - - -
- @endif - merge(['class' => $defaultClassInput]) }} @required($required) - @if ($id !== 'null') wire:model={{ $id }} @endif - wire:dirty.class.remove='dark:focus:ring-coolgray-300 dark:ring-coolgray-300' - wire:dirty.class="dark:focus:ring-warning dark:ring-warning" wire:loading.attr="disabled" - type="{{ $type }}" @readonly($readonly) @disabled($disabled) id="{{ $id }}" - name="{{ $name }}" placeholder="{{ $attributes->get('placeholder') }}" - aria-placeholder="{{ $attributes->get('placeholder') }}"> - + @disabled($disabled) @readonly($readonly) @required($required) id="{{ $id }}" + name="{{ $name }}" name={{ $id }}> -
- @else - - @endif + @disabled($disabled) @readonly($readonly) @required($required) id="{{ $id }}" + name="{{ $name }}" name={{ $id }}> + @endif @endif @error($id)
diff --git a/resources/views/livewire/project/shared/metrics.blade.php b/resources/views/livewire/project/shared/metrics.blade.php index 95ef9ced7..91767d5d6 100644 --- a/resources/views/livewire/project/shared/metrics.blade.php +++ b/resources/views/livewire/project/shared/metrics.blade.php @@ -40,15 +40,15 @@ class="pt-5"> id: '{!! $chartId !!}-cpu', type: 'area', toolbar: { - show: false, + show: true, tools: { - download: true, + download: false, selection: false, - zoom: false, + zoom: true, zoomin: false, zoomout: false, pan: false, - reset: false + reset: true }, }, animations: { @@ -77,6 +77,7 @@ class="pt-5"> type: 'datetime', }, series: [{ + name: "CPU %", data: [] }], noData: { @@ -86,7 +87,10 @@ class="pt-5"> } }, tooltip: { - enabled: false, + enabled: true, + marker: { + show: false, + } }, legend: { show: false @@ -145,15 +149,15 @@ class="pt-5"> id: '{!! $chartId !!}-memory', type: 'area', toolbar: { - show: false, + show: true, tools: { - download: true, + download: false, selection: false, - zoom: false, + zoom: true, zoomin: false, zoomout: false, pan: false, - reset: false + reset: true }, }, animations: { @@ -188,6 +192,7 @@ class="pt-5"> } }, series: [{ + name: "Memory (MB)", data: [] }], noData: { @@ -197,7 +202,10 @@ class="pt-5"> } }, tooltip: { - enabled: false, + enabled: true, + marker: { + show: false, + } }, legend: { show: false diff --git a/resources/views/livewire/server/charts.blade.php b/resources/views/livewire/server/charts.blade.php index ab485bd9f..3d346e641 100644 --- a/resources/views/livewire/server/charts.blade.php +++ b/resources/views/livewire/server/charts.blade.php @@ -22,15 +22,15 @@ id: '{!! $chartId !!}-cpu', type: 'area', toolbar: { - show: false, + show: true, tools: { - download: true, + download: false, selection: false, - zoom: false, + zoom: true, zoomin: false, zoomout: false, pan: false, - reset: false + reset: true }, }, animations: { @@ -59,6 +59,7 @@ type: 'datetime', }, series: [{ + name: 'CPU %', data: [] }], noData: { @@ -68,7 +69,10 @@ } }, tooltip: { - enabled: false, + enabled: true, + marker: { + show: false, + } }, legend: { show: false @@ -129,15 +133,15 @@ id: '{!! $chartId !!}-memory', type: 'area', toolbar: { - show: false, + show: true, tools: { - download: true, + download: false, selection: false, - zoom: false, + zoom: true, zoomin: false, zoomout: false, pan: false, - reset: false + reset: true }, }, animations: { @@ -172,6 +176,7 @@ } }, series: [{ + name: "Memory (MB)", data: [] }], noData: { @@ -181,7 +186,10 @@ } }, tooltip: { - enabled: false, + enabled: true, + marker: { + show: false, + } }, legend: { show: false