Skip to content

Commit

Permalink
Merge branch '4.x' into docs-v4
Browse files Browse the repository at this point in the history
  • Loading branch information
vcastellm committed Feb 11, 2024
2 parents 80dd294 + f7eaff0 commit e245ea5
Show file tree
Hide file tree
Showing 9 changed files with 191 additions and 137 deletions.
8 changes: 6 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,12 @@ clean:

.PHONY: docs apidoc test ui updatetestcert
docs:
#scripts/run doc --dir website/docs/cli
cd website; bun run build --out-dir ../public
# scripts/run doc --dir website/docs/cli

# Build with docker while bun reach compatibility with docusaurs
# cd website; bun run yarn build --out-dir ../public
docker run -v `pwd`:/app --workdir /app/website node yarn build --out-dir ../public

ghp-import -p public

test:
Expand Down

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dkron/ui-dist/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@
window.DKRON_SUCCESSFUL_JOBS = {{.DKRON_SUCCESSFUL_JOBS }};
window.DKRON_FAILED_JOBS = {{.DKRON_FAILED_JOBS }};
window.DKRON_UNTRIGGERED_JOBS = {{.DKRON_UNTRIGGERED_JOBS }};</script>
<script type="module" crossorigin src="./assets/index-2356520b.js"></script>
<script type="module" crossorigin src="./assets/index-6c9b7c17.js"></script>
<link rel="stylesheet" href="./assets/index-73a69410.css">
</head>

Expand Down
24 changes: 14 additions & 10 deletions ui/src/jobs/JobEdit.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,29 +6,32 @@ import {
SimpleForm,
BooleanInput,
NumberInput,
DateTimeInput
DateTimeInput,
required,
useRecordContext
} from 'react-admin';
import { JsonInput } from "react-admin-json-view";

export const JobEdit = (props: any) => (
<Edit {...props}>
export const JobEdit = () => {
const record = useRecordContext();
return (<Edit {...record}>
<EditForm />
</Edit>
);
</Edit>);
}

export const JobCreate = (props: any) => (
<Create {...props}>
<EditForm />
</Create>
);

const EditForm = (props: any) => (
<SimpleForm {...props}>
const EditForm = (record: any) => (
<SimpleForm {...record}>
<TextInput disabled source="id" helperText="Job id. Must be unique, it's a copy of name." />
<TextInput source="name" helperText="Job name. Must be unique, acts as the id." />
<TextInput source="name" helperText="Job name. Must be unique, acts as the id." validate={required()} />
<TextInput source="displayname" helperText="Display name of the job. If present, displayed instead of the name." />
<TextInput source="timezone" helperText="The timezone where the cron expression will be evaluated in." />
<TextInput source="schedule" helperText="Cron expression for the job. When to run the job." />
<TextInput source="schedule" helperText="Cron expression for the job. When to run the job." validate={required()} />
<TextInput source="owner" helperText="Arbitrary string indicating the owner of the job." />
<TextInput source="owner_email" helperText="Email address to use for notifications."/>
<TextInput source="parent_job" helperText="Job id of job that this job is dependent upon." />
Expand Down Expand Up @@ -71,7 +74,7 @@ const EditForm = (props: any) => (
}}
helperText="Job metadata describes the job and allows filtering from the API."
/>
<TextInput source="executor" helperText="Executor plugin to be used in this job." />
<TextInput source="executor" helperText="Executor plugin to be used in this job." validate={required()} />
<JsonInput
source="executor_config"
// validate={required(){ return true }}
Expand All @@ -83,6 +86,7 @@ const EditForm = (props: any) => (
displayDataTypes: false,
}}
helperText="Configuration arguments for the specific executor."
validate={required()}
/>
<BooleanInput source="disabled" helperText="Is this job disabled?" />
<NumberInput source="retries" helperText="Number of times to retry a job that failed an execution." />
Expand Down
17 changes: 12 additions & 5 deletions ui/src/jobs/JobShow.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ import { apiUrl } from '../dataProvider';
// basePath={basePath}
const JobShowActions = ({ basePath, data, resource }: any) => (
<TopToolbar>
<RunButton record={data} />
<ToggleButton record={data} />
<RunButton />
<ToggleButton />
<EditButton record={data} />
</TopToolbar>
);
Expand Down Expand Up @@ -99,7 +99,6 @@ const JobShow = (props: any) => (
<JsonField
source="processors"
reactJsonOptions={{
// Props passed to react-json-view
name: null,
collapsed: false,
enableClipboard: false,
Expand All @@ -109,17 +108,25 @@ const JobShow = (props: any) => (
<JsonField
source="tags"
reactJsonOptions={{
// Props passed to react-json-view
name: null,
collapsed: false,
enableClipboard: false,
displayDataTypes: false,
}}
/>
<JsonField
source="metadata"
reactJsonOptions={{
name: null,
collapsed: false,
enableClipboard: true,
displayDataTypes: false,
}}
/>
<TextField source="executor" />
<JsonField
source="executor_config"
reactJsonOptions={{
// Props passed to react-json-view
name: null,
collapsed: false,
enableClipboard: false,
Expand Down
5 changes: 3 additions & 2 deletions ui/src/jobs/RunButton.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import { useState } from 'react';
import { useNotify, useRefresh, Button } from 'react-admin';
import { useNotify, useRefresh, Button, useRecordContext } from 'react-admin';
import { apiUrl } from '../dataProvider';
import RunIcon from '@mui/icons-material/PlayArrow';

const RunButton = ({record}: any) => {
const RunButton = () => {
const record = useRecordContext();
const refresh = useRefresh();
const notify = useNotify();
const [loading, setLoading] = useState(false);
Expand Down
5 changes: 3 additions & 2 deletions ui/src/jobs/ToggleButton.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import { useState } from 'react';
import { useNotify, useRefresh, Button } from 'react-admin';
import { useNotify, useRefresh, Button, useRecordContext } from 'react-admin';
import { apiUrl } from '../dataProvider';
import ToggleIcon from '@mui/icons-material/Pause';

const ToggleButton = ({record}: any) => {
const ToggleButton = () => {
const record = useRecordContext();
const refresh = useRefresh();
const notify = useNotify();
const [loading, setLoading] = useState(false);
Expand Down
37 changes: 37 additions & 0 deletions website/blog/dkron-4-0-beta.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
---
Description: "Dkron release v4.0 Beta"
Keywords: [ "Development", "OpenSource", "Distributed systems", "cron" ]
Tags: [ "Development", "OpenSource", "Distributed systems", "cron" ]
date: "2024-02-11"
Topics: [ "Development", "OpenSource", "Distributed Systems" ]
Slug: "dkron-4-0-beta"
---

# Dkron 4.0 Beta

## Introducing Dkron v4.0.0-beta1

We are excited to announce the release of Dkron v4.0.0-beta1, which comes with major improvements and better performance. If you are using Dkron for distributed cron jobs, now is the perfect time to give the beta a try!

Stay tunned to upcoming beta releases here https://github.com/distribworks/dkron/releases

## New Features

### Run Dkron as a Single Binary

The new release includes the ability to run Dkron as a single binary, as it embeds the shell plugin. This makes it even easier and faster to get started with Dkron for simple cron job management, especially for those who only need to run shell jobs.

### Docker Light Image

We are thrilled to announce the release of a new Docker light image for Dkron v4.0.0-beta1. This image contains only the main Dkron binary with the built-in shell plugin and no other plugins, all in a single file. If you're looking for a lean and efficient way to run Dkron, this is it! You can find the image on Docker Hub.

### Reporting Issues

As this is a beta release, we encourage users to report any issues they encounter to help us make the final release even better. Your feedback is essential in ensuring that the final release meets your expectations.

### Changelog
The release includes a substantial list of changes, including the bumping of various dependencies, clean up in CI, handling of IP changes, removal of the old UI, and many more improvements and fixes. You can view the [full changelog here](https://github.com/distribworks/dkron/releases/tag/v4.0.0-beta1).

We are looking forward to your feedback on this beta release, and we hope that Dkron v4.0 Beta will bring added value and convenience to your cron job management.

Happy scheduling! 🚀🎉
6 changes: 3 additions & 3 deletions website/src/components/HomepageBanner.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@ export default function HomepageBanner() {
<SpeakerphoneIcon className="w-6 h-6 text-white" aria-hidden="true" />
</span>
<p className="mb-0 ml-3 font-medium text-white truncate">
<span className="md:hidden">Dkron 3.0 is here!</span>
<span className="hidden md:inline">Big news! We're excited to announce that Dkron 3.2 is here!</span>
<span className="md:hidden">Dkron 4.0 Beta is here!</span>
<span className="hidden md:inline">Big news! We're excited to announce that Dkron 4.0 Beta is here!</span>
</p>
</div>
<div className="flex-shrink-0 order-3 w-full mt-2 sm:order-2 sm:mt-0 sm:w-auto">
<a
href="/blog/dkron-3-2/"
href="/blog/dkron-4-0-beta/"
className="flex items-center justify-center px-4 py-2 text-sm font-medium bg-white border border-transparent rounded-sm shadow-sm text-fuchsia-600 hover:bg-indigo-50"
>
Learn more
Expand Down

0 comments on commit e245ea5

Please sign in to comment.