Commit d01fc73d authored by Dillenn Terumalai's avatar Dillenn Terumalai
Browse files

// WIP

parent 215081fa
......@@ -13,7 +13,7 @@ return [
|
*/
'path' => env('LARAVEL_CLUSTER_PATH', 'cluster'),
'path' => env('LARAVEL_CLUSTER_PATH', 'laravel-cluster'),
/*
|--------------------------------------------------------------------------
......
......@@ -4,8 +4,13 @@ use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
class CreateClusterJobsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('cluster_jobs', function (Blueprint $table) {
......@@ -18,13 +23,18 @@ return new class extends Migration
$table->text('std_err_path');
$table->text('export_path')->nullable();
$table->unsignedTinyInteger('attempts');
$table->dateTime('queued_at');
$table->dateTime('queued_at')->default('NOW');
$table->dateTime('cancelled_at')->nullable();
$table->dateTime('failed_at')->nullable();
$table->dateTime('completed_at')->nullable();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('cluster_jobs');
......
......@@ -1153,6 +1153,12 @@
"lodash.isequal": "^4.5.0"
}
},
"@mdi/font": {
"version": "5.9.55",
"resolved": "https://registry.npmjs.org/@mdi/font/-/font-5.9.55.tgz",
"integrity": "sha512-jswRF6q3eq8NWpWiqct6q+6Fg/I7nUhrxYJfiEM8JJpap0wVJLQdbKtyS65GdlK7S7Ytnx3TTi/bmw+tBhkGmg==",
"dev": true
},
"@nodelib/fs.scandir": {
"version": "2.1.5",
"resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz",
......
This diff is collapsed.
This diff is collapsed.
{
"/js/app.js": "/js/app.js?id=f4d6e8f4d834a138e40f"
}
<template>
<cluster>
<cluster-layout>
<v-card>
<v-card-title>
<p class="text-h6 mb-0">Cancelled Jobs</p>
......@@ -18,28 +18,27 @@
v-slot:item.job="{ item }"
>
<div class="pa-3">
<a class="primary--text text-subtitle-1" @click="$inertia.visit('cluster.cancelled.show', item.id)">{{
<a class="primary--text text-subtitle-1"
@click="$inertia.visit(route('cluster.cancelled.show', item.id))">{{
item.job_name.toUpperCase()
}}</a>
<p class="text-caption grey--text text--darken-1 mb-0">Partition: {{ item.partition }} | ID: {{ item.id }}</p>
<p class="text-caption grey--text text--darken-1 mb-0">Partition: {{ item.partition }} | ID:
{{ item.id }}</p>
</div>
</template>
</v-data-table>
</v-card-text>
</v-card>
</cluster>
</cluster-layout>
</template>
<script lang="ts">
import 'reflect-metadata'
import { Component, Prop, Vue } from 'vue-property-decorator'
import Cluster from '@/Layouts/cluster.vue'
import {Component, Prop, Vue} from 'vue-property-decorator'
import ClusterLayout from '@/Layouts/ClusterLayout.vue'
@Component({
components: { Cluster },
metaInfo: {
title: 'Cancelled jobs'
}
components: {ClusterLayout}
})
export default class CancelledJobs extends Vue {
@Prop() readonly items: any
......
<template>
<cluster>
<cluster-layout>
<v-card>
<v-card-title>
<p class="text-h6 mb-0">Completed Jobs</p>
......@@ -18,7 +18,7 @@
v-slot:item.job="{ item }"
>
<div class="pa-3">
<a class="primary--text text-subtitle-1" @click="$inertia.visit('cluster.completed.show', item.id)">{{
<a class="primary--text text-subtitle-1" @click="$inertia.visit(route('cluster.completed.show', item.id))">{{
item.job_name.toUpperCase()
}}</a>
<p class="text-caption grey--text text--darken-1 mb-0">Partition: {{ item.partition }} | ID:
......@@ -28,16 +28,16 @@
</v-data-table>
</v-card-text>
</v-card>
</cluster>
</cluster-layout>
</template>
<script lang="ts">
import 'reflect-metadata'
import { Component, Prop, Vue } from 'vue-property-decorator'
import Cluster from '@/Layouts/cluster.vue'
import ClusterLayout from '@/Layouts/ClusterLayout.vue'
@Component({
components: { Cluster }
components: { ClusterLayout }
})
export default class CompletedJobs extends Vue {
@Prop() readonly items: any
......
<template>
<cluster>
<cluster-layout>
<v-card class="mb-10">
<v-card-title>
<p class="text-h6 mb-0">Overview</p>
......@@ -49,16 +49,16 @@
></v-data-table>
</v-card-text>
</v-card>
</cluster>
</cluster-layout>
</template>
<script lang="ts">
import 'reflect-metadata'
import { Component, Prop, Vue } from 'vue-property-decorator'
import Cluster from '@/Layouts/cluster.vue'
import ClusterLayout from '@/Layouts/ClusterLayout.vue'
@Component({
components: { Cluster }
components: { ClusterLayout }
})
export default class Dashboard extends Vue {
@Prop() readonly totalJobs: number
......
<template>
<cluster>
<cluster-layout>
<v-card>
<v-card-title>
<p class="text-h6 mb-0">Failed Jobs</p>
......@@ -18,7 +18,7 @@
v-slot:item.job="{ item }"
>
<div class="pa-3">
<a class="primary--text text-subtitle-1" @click="$inertia.visit('cluster.failed.show', item.id)">{{
<a class="primary--text text-subtitle-1" @click="$inertia.visit(route('cluster.failed.show', item.id))">{{
item.job_name.toUpperCase()
}}</a>
<p class="text-caption grey--text text--darken-1 mb-0">Partition: {{ item.partition }} | ID:
......@@ -28,16 +28,16 @@
</v-data-table>
</v-card-text>
</v-card>
</cluster>
</cluster-layout>
</template>
<script lang="ts">
import 'reflect-metadata'
import { Component, Prop, Vue } from 'vue-property-decorator'
import Cluster from '@/Layouts/cluster.vue'
import ClusterLayout from '@/Layouts/ClusterLayout.vue'
@Component({
components: { Cluster }
components: { ClusterLayout }
})
export default class FailedJobs extends Vue {
@Prop() readonly items: any
......
<template>
<cluster>
<cluster-layout>
<v-card class="mb-10">
<v-card-title>
<p class="text-h6 mb-0">Inspector</p>
......@@ -11,34 +11,37 @@
</v-card-title>
<v-card-text class="px-0 pb-0">
<v-sheet color="black" dark class="pa-5">
<p class="format-text text-subtitle-1 font-weight-medium formatted-output">{{ formattedInformation }}</p>
<p class="format-text text-subtitle-1 font-weight-medium formatted-output">{{
formattedInformation
}}</p>
</v-sheet>
</v-card-text>
</v-card>
</cluster>
</cluster-layout>
</template>
<script lang="ts">
import 'reflect-metadata'
import { Component, Prop, Vue } from 'vue-property-decorator'
import Cluster from '@/Layouts/cluster.vue'
import {Component, Prop, Vue} from 'vue-property-decorator'
import ClusterLayout from '@/Layouts/ClusterLayout.vue'
import route from 'ziggy-js';
@Component({
components: { Cluster }
components: {ClusterLayout}
})
export default class Inspector extends Vue {
@Prop() readonly information: string;
private jobId: string | null = null
inspectJob () {
this.$inertia.get(this.route('cluster.inspector'), {
jobId: this.jobId
}
inspectJob() {
this.$inertia.get(route('cluster.inspector'), {
jobId: this.jobId
}
)
}
get formattedInformation () {
get formattedInformation() {
if (this.information) {
return this.information.replace(/\\n/g, '')
}
......
<template>
<cluster>
<cluster-layout>
<v-card>
<v-card-title>
<p class="text-h6 mb-0">Pending Jobs</p>
......@@ -18,7 +18,7 @@
v-slot:item.job="{ item }"
>
<div class="pa-3">
<a class="primary--text text-subtitle-1" @click="$inertia.visit('cluster.pending.show', item.id)">{{
<a class="primary--text text-subtitle-1" @click="$inertia.visit(route('cluster.pending.show', item.id))">{{
item.job_name.toUpperCase()
}}</a>
<p class="text-caption grey--text text--darken-1 mb-0">Partition: {{ item.partition }} | ID: {{ item.id }}</p>
......@@ -27,16 +27,16 @@
</v-data-table>
</v-card-text>
</v-card>
</cluster>
</cluster-layout>
</template>
<script lang="ts">
import 'reflect-metadata'
import { Component, Prop, Vue } from 'vue-property-decorator'
import Cluster from '@/Layouts/cluster.vue'
import ClusterLayout from '@/Layouts/ClusterLayout.vue'
@Component({
components: { Cluster }
components: { ClusterLayout }
})
export default class PendingJobs extends Vue {
@Prop() readonly items: any
......
<template>
<cluster>
<cluster-layout>
<v-card>
<v-card-title>
<p class="text-h6 mb-0">Queue</p>
......@@ -13,16 +13,16 @@
></v-data-table>
</v-card-text>
</v-card>
</cluster>
</cluster-layout>
</template>
<script lang="ts">
import 'reflect-metadata'
import { Component, Prop, Vue } from 'vue-property-decorator'
import Cluster from '@/Layouts/cluster.vue'
import ClusterLayout from '@/Layouts/ClusterLayout.vue'
@Component({
components: { Cluster }
components: { ClusterLayout }
})
export default class Queue extends Vue {
@Prop() readonly queues: any
......
<template>
<cluster>
<cluster-layout>
<v-card class="mb-10">
<v-card-title>
<p class="text-h6 mb-0">{{ job.job_name }}</p>
......@@ -32,16 +32,16 @@
</v-sheet>
</v-card-text>
</v-card>
</cluster>
</cluster-layout>
</template>
<script lang="ts">
import 'reflect-metadata'
import { Component, Prop, Vue } from 'vue-property-decorator'
import Cluster from '@/Layouts/cluster.vue'
import ClusterLayout from '@/Layouts/ClusterLayout.vue'
@Component({
components: { Cluster }
components: { ClusterLayout }
})
export default class ShowCancelledJob extends Vue {
@Prop() readonly job: any
......
<template>
<cluster>
<cluster-layout>
<v-card class="mb-10">
<v-card-title>
<p class="text-h6 mb-0">{{ job.job_name }}</p>
......@@ -69,17 +69,17 @@
></v-data-table>
</v-card-text>
</v-card>
</cluster>
</cluster-layout>
</template>
<script lang="ts">
import 'reflect-metadata'
import { Component, Prop, Vue } from 'vue-property-decorator'
import Cluster from '@/Layouts/cluster.vue'
import ClusterLayout from '@/Layouts/ClusterLayout.vue'
import { DataTableHeader } from 'vuetify'
@Component({
components: { Cluster }
components: { ClusterLayout }
})
export default class ShowCompletedJob extends Vue {
@Prop() readonly job: any
......
<template>
<cluster>
<cluster-layout>
<v-card class="mb-10">
<v-card-title>
<p class="text-h6 mb-0">{{ job.job_name }}</p>
......@@ -66,16 +66,16 @@
</v-sheet>
</v-card-text>
</v-card>
</cluster>
</cluster-layout>
</template>
<script lang="ts">
import 'reflect-metadata'
import { Component, Prop, Vue } from 'vue-property-decorator'
import Cluster from '@/Layouts/cluster.vue'
import ClusterLayout from '@/Layouts/ClusterLayout.vue'
@Component({
components: { Cluster }
components: { ClusterLayout }
})
export default class ShowFailedJob extends Vue {
@Prop() readonly job: any
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment