vue_delayed_job_dashboard 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- metadata +2 -34
- data/.babelrc +0 -5
- data/.gitignore +0 -10
- data/.rspec +0 -2
- data/.travis.yml +0 -5
- data/CODE_OF_CONDUCT.md +0 -49
- data/Gemfile +0 -8
- data/LICENSE.txt +0 -21
- data/README.md +0 -40
- data/Rakefile +0 -6
- data/b02bdc1b846fd65473922f5f62832108.ttf +0 -0
- data/bin/console +0 -14
- data/bin/setup +0 -8
- data/d2f69a92faa6fe990d2e613c358be705.woff +0 -0
- data/delayed_job_dashboard.gemspec +0 -25
- data/lib/delayed_job_dashboard.rb +0 -2
- data/lib/delayed_job_dashboard/version.rb +0 -3
- data/lib/delayed_job_dashboard/web/app.rb +0 -62
- data/lib/delayed_job_dashboard/web/priv/App.vue +0 -52
- data/lib/delayed_job_dashboard/web/priv/JobsList.vue +0 -144
- data/lib/delayed_job_dashboard/web/priv/app.js +0 -14
- data/lib/delayed_job_dashboard/web/public/b02bdc1b846fd65473922f5f62832108.ttf +0 -0
- data/lib/delayed_job_dashboard/web/public/bundle.js +0 -63960
- data/lib/delayed_job_dashboard/web/public/d2f69a92faa6fe990d2e613c358be705.woff +0 -0
- data/lib/delayed_job_dashboard/web/views/enqueued.haml +0 -0
- data/lib/delayed_job_dashboard/web/views/error.haml +0 -2
- data/lib/delayed_job_dashboard/web/views/failed.haml +0 -1
- data/lib/delayed_job_dashboard/web/views/layout.haml +0 -16
- data/lib/delayed_job_dashboard/web/views/overview.haml +0 -1
- data/lib/delayed_job_dashboard/web/views/pending.haml +0 -1
- data/lib/delayed_job_dashboard/web/views/working.haml +0 -1
- data/package.json +0 -29
- data/webpack.config.js +0 -34
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3dba257bced7445cba1c2d23d68e7b2372e469e9
|
4
|
+
data.tar.gz: 0a2e4d00c5541ef93d80e6cb37a162a619e0e7e7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1f2121e7dbcba8376bf873f95901e88153140d452bdc6784d43e00c00a9039a5cc0de97ac00178e457d804ad58de4df2c625409d0a8d476e11cbd4a23e405c95
|
7
|
+
data.tar.gz: d9fbbd151fa208f65e6cb00874934ccd6943d529edc701ae202e1621752a64b8bdbd2aea875f6c468985650ccdf1f316ca0ce466968de2149c272e10a61abcb4
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vue_delayed_job_dashboard
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Long Nguyen
|
@@ -58,39 +58,7 @@ email:
|
|
58
58
|
executables: []
|
59
59
|
extensions: []
|
60
60
|
extra_rdoc_files: []
|
61
|
-
files:
|
62
|
-
- ".babelrc"
|
63
|
-
- ".gitignore"
|
64
|
-
- ".rspec"
|
65
|
-
- ".travis.yml"
|
66
|
-
- CODE_OF_CONDUCT.md
|
67
|
-
- Gemfile
|
68
|
-
- LICENSE.txt
|
69
|
-
- README.md
|
70
|
-
- Rakefile
|
71
|
-
- b02bdc1b846fd65473922f5f62832108.ttf
|
72
|
-
- bin/console
|
73
|
-
- bin/setup
|
74
|
-
- d2f69a92faa6fe990d2e613c358be705.woff
|
75
|
-
- delayed_job_dashboard.gemspec
|
76
|
-
- lib/delayed_job_dashboard.rb
|
77
|
-
- lib/delayed_job_dashboard/version.rb
|
78
|
-
- lib/delayed_job_dashboard/web/app.rb
|
79
|
-
- lib/delayed_job_dashboard/web/priv/App.vue
|
80
|
-
- lib/delayed_job_dashboard/web/priv/JobsList.vue
|
81
|
-
- lib/delayed_job_dashboard/web/priv/app.js
|
82
|
-
- lib/delayed_job_dashboard/web/public/b02bdc1b846fd65473922f5f62832108.ttf
|
83
|
-
- lib/delayed_job_dashboard/web/public/bundle.js
|
84
|
-
- lib/delayed_job_dashboard/web/public/d2f69a92faa6fe990d2e613c358be705.woff
|
85
|
-
- lib/delayed_job_dashboard/web/views/enqueued.haml
|
86
|
-
- lib/delayed_job_dashboard/web/views/error.haml
|
87
|
-
- lib/delayed_job_dashboard/web/views/failed.haml
|
88
|
-
- lib/delayed_job_dashboard/web/views/layout.haml
|
89
|
-
- lib/delayed_job_dashboard/web/views/overview.haml
|
90
|
-
- lib/delayed_job_dashboard/web/views/pending.haml
|
91
|
-
- lib/delayed_job_dashboard/web/views/working.haml
|
92
|
-
- package.json
|
93
|
-
- webpack.config.js
|
61
|
+
files: []
|
94
62
|
homepage: https://github.com/kimquy/delayed_job_dashboard
|
95
63
|
licenses:
|
96
64
|
- MIT
|
data/.gitignore
DELETED
data/.rspec
DELETED
data/.travis.yml
DELETED
data/CODE_OF_CONDUCT.md
DELETED
@@ -1,49 +0,0 @@
|
|
1
|
-
# Contributor Code of Conduct
|
2
|
-
|
3
|
-
As contributors and maintainers of this project, and in the interest of
|
4
|
-
fostering an open and welcoming community, we pledge to respect all people who
|
5
|
-
contribute through reporting issues, posting feature requests, updating
|
6
|
-
documentation, submitting pull requests or patches, and other activities.
|
7
|
-
|
8
|
-
We are committed to making participation in this project a harassment-free
|
9
|
-
experience for everyone, regardless of level of experience, gender, gender
|
10
|
-
identity and expression, sexual orientation, disability, personal appearance,
|
11
|
-
body size, race, ethnicity, age, religion, or nationality.
|
12
|
-
|
13
|
-
Examples of unacceptable behavior by participants include:
|
14
|
-
|
15
|
-
* The use of sexualized language or imagery
|
16
|
-
* Personal attacks
|
17
|
-
* Trolling or insulting/derogatory comments
|
18
|
-
* Public or private harassment
|
19
|
-
* Publishing other's private information, such as physical or electronic
|
20
|
-
addresses, without explicit permission
|
21
|
-
* Other unethical or unprofessional conduct
|
22
|
-
|
23
|
-
Project maintainers have the right and responsibility to remove, edit, or
|
24
|
-
reject comments, commits, code, wiki edits, issues, and other contributions
|
25
|
-
that are not aligned to this Code of Conduct, or to ban temporarily or
|
26
|
-
permanently any contributor for other behaviors that they deem inappropriate,
|
27
|
-
threatening, offensive, or harmful.
|
28
|
-
|
29
|
-
By adopting this Code of Conduct, project maintainers commit themselves to
|
30
|
-
fairly and consistently applying these principles to every aspect of managing
|
31
|
-
this project. Project maintainers who do not follow or enforce the Code of
|
32
|
-
Conduct may be permanently removed from the project team.
|
33
|
-
|
34
|
-
This code of conduct applies both within project spaces and in public spaces
|
35
|
-
when an individual is representing the project or its community.
|
36
|
-
|
37
|
-
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
38
|
-
reported by contacting a project maintainer at long.polyglot@gmail.com. All
|
39
|
-
complaints will be reviewed and investigated and will result in a response that
|
40
|
-
is deemed necessary and appropriate to the circumstances. Maintainers are
|
41
|
-
obligated to maintain confidentiality with regard to the reporter of an
|
42
|
-
incident.
|
43
|
-
|
44
|
-
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
|
45
|
-
version 1.3.0, available at
|
46
|
-
[http://contributor-covenant.org/version/1/3/0/][version]
|
47
|
-
|
48
|
-
[homepage]: http://contributor-covenant.org
|
49
|
-
[version]: http://contributor-covenant.org/version/1/3/0/
|
data/Gemfile
DELETED
data/LICENSE.txt
DELETED
@@ -1,21 +0,0 @@
|
|
1
|
-
The MIT License (MIT)
|
2
|
-
|
3
|
-
Copyright (c) 2017 Long Nguyen
|
4
|
-
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
7
|
-
in the Software without restriction, including without limitation the rights
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
10
|
-
furnished to do so, subject to the following conditions:
|
11
|
-
|
12
|
-
The above copyright notice and this permission notice shall be included in
|
13
|
-
all copies or substantial portions of the Software.
|
14
|
-
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
-
THE SOFTWARE.
|
data/README.md
DELETED
@@ -1,40 +0,0 @@
|
|
1
|
-
# DelayedJobDashboard (Under development)
|
2
|
-
|
3
|
-
![screenshot1](https://cloud.githubusercontent.com/assets/2282642/24837740/2de53704-1d65-11e7-89dc-8d8fe85e093f.png)
|
4
|
-
|
5
|
-
![screenshot2](https://cloud.githubusercontent.com/assets/2282642/24837741/309915e2-1d65-11e7-92fa-239a729709f7.png)
|
6
|
-
|
7
|
-
## Installation
|
8
|
-
|
9
|
-
Add this line to your application's Gemfile:
|
10
|
-
|
11
|
-
```ruby
|
12
|
-
gem 'vue_delayed_job_dashboard'
|
13
|
-
```
|
14
|
-
|
15
|
-
And then execute:
|
16
|
-
|
17
|
-
$ bundle
|
18
|
-
|
19
|
-
Or install it yourself as:
|
20
|
-
|
21
|
-
$ gem install vue_delayed_job_dashboard
|
22
|
-
|
23
|
-
## Usage
|
24
|
-
|
25
|
-
TODO: Write usage instructions here
|
26
|
-
|
27
|
-
## Development
|
28
|
-
|
29
|
-
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
30
|
-
|
31
|
-
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
32
|
-
|
33
|
-
## Contributing
|
34
|
-
|
35
|
-
Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/delayed_job_dashboard. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
|
36
|
-
|
37
|
-
|
38
|
-
## License
|
39
|
-
|
40
|
-
The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
|
data/Rakefile
DELETED
Binary file
|
data/bin/console
DELETED
@@ -1,14 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
|
3
|
-
require "bundler/setup"
|
4
|
-
require "delayed_job_dashboard"
|
5
|
-
|
6
|
-
# You can add fixtures and/or initialization code here to make experimenting
|
7
|
-
# with your gem easier. You can also use a different console, if you like.
|
8
|
-
|
9
|
-
# (If you use this, don't forget to add pry to your Gemfile!)
|
10
|
-
# require "pry"
|
11
|
-
# Pry.start
|
12
|
-
|
13
|
-
require "irb"
|
14
|
-
IRB.start
|
data/bin/setup
DELETED
Binary file
|
@@ -1,25 +0,0 @@
|
|
1
|
-
# coding: utf-8
|
2
|
-
lib = File.expand_path('../lib', __FILE__)
|
3
|
-
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
-
require 'delayed_job_dashboard/version'
|
5
|
-
|
6
|
-
Gem::Specification.new do |spec|
|
7
|
-
spec.name = "vue_delayed_job_dashboard"
|
8
|
-
spec.version = DelayedJobDashboard::VERSION
|
9
|
-
spec.authors = ["Long Nguyen"]
|
10
|
-
spec.email = ["long.polyglot@gmail.com"]
|
11
|
-
|
12
|
-
spec.summary = %q{Modern DelayedJob Dashboard}
|
13
|
-
spec.description = %q{Modern DelayedJob Dashboard built with VueJS and Sinatra.}
|
14
|
-
spec.homepage = "https://github.com/kimquy/delayed_job_dashboard"
|
15
|
-
spec.license = "MIT"
|
16
|
-
|
17
|
-
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
18
|
-
spec.bindir = "exe"
|
19
|
-
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
20
|
-
spec.require_paths = ["lib"]
|
21
|
-
|
22
|
-
spec.add_development_dependency "bundler", "~> 1.12"
|
23
|
-
spec.add_development_dependency "rake", "~> 10.0"
|
24
|
-
spec.add_development_dependency "rspec", "~> 3.0"
|
25
|
-
end
|
@@ -1,62 +0,0 @@
|
|
1
|
-
require 'sinatra/base'
|
2
|
-
|
3
|
-
module DelayedJobDashboard
|
4
|
-
class WebApplication < Sinatra::Base
|
5
|
-
set :root, File.dirname(__FILE__)
|
6
|
-
set :static, true
|
7
|
-
set :public_folder, File.expand_path('../public', __FILE__)
|
8
|
-
set :views, File.expand_path('../views', __FILE__)
|
9
|
-
|
10
|
-
get "/" do
|
11
|
-
redirect "/delayed_job/overview"
|
12
|
-
end
|
13
|
-
|
14
|
-
get '/overview' do
|
15
|
-
if defined?(Delayed::Job)
|
16
|
-
haml :overview, escape_html: false
|
17
|
-
else
|
18
|
-
@message = "Delayed::Job is not available"
|
19
|
-
haml :error
|
20
|
-
end
|
21
|
-
end
|
22
|
-
|
23
|
-
get '/enqueued' do
|
24
|
-
haml :enqueued, escape_html: false
|
25
|
-
end
|
26
|
-
|
27
|
-
get '/pending' do
|
28
|
-
haml :pending, escape_html: false
|
29
|
-
end
|
30
|
-
|
31
|
-
get '/failed' do
|
32
|
-
haml :failed, escape_html: false
|
33
|
-
end
|
34
|
-
|
35
|
-
get '/working' do
|
36
|
-
haml :working, escape_html: false
|
37
|
-
end
|
38
|
-
|
39
|
-
get '/jobs.json' do
|
40
|
-
content_type :json
|
41
|
-
|
42
|
-
case params["filter"]
|
43
|
-
when "pending"
|
44
|
-
@jobs = Delayed::Job.where(locked_at: nil, attempts: 0).order(created_at: :desc)
|
45
|
-
when "failed"
|
46
|
-
@jobs = Delayed::Job.where.not(failed_at: nil).order(created_at: :desc)
|
47
|
-
when "working"
|
48
|
-
@jobs = Delayed::Job.where.not(locked_at: nil).order(created_at: :desc)
|
49
|
-
when "enqueued"
|
50
|
-
@jobs = Delayed::Job.order(created_at: :desc)
|
51
|
-
end
|
52
|
-
|
53
|
-
@jobs = Delayed::Job.order(created_at: :desc) if @jobs.nil?
|
54
|
-
|
55
|
-
@jobs_json = @jobs.as_json
|
56
|
-
@jobs_json.each_with_index do |job, index|
|
57
|
-
job["payload_object"] = @jobs[index].payload_object
|
58
|
-
end
|
59
|
-
@jobs_json.to_json
|
60
|
-
end
|
61
|
-
end
|
62
|
-
end
|
@@ -1,52 +0,0 @@
|
|
1
|
-
<template>
|
2
|
-
<el-row>
|
3
|
-
<el-menu theme="dark" :default-active="activeIndex" class="el-menu-demo" mode="horizontal">
|
4
|
-
<el-menu-item index="1"><a href="/delayed_job/overview">DELAYED JOB DASHBOARD</a></el-menu-item>
|
5
|
-
<el-menu-item index="2"><a href="/delayed_job/enqueued">Enqueued</a></el-menu-item>
|
6
|
-
<el-menu-item index="3"><a href="/delayed_job/working">Working</a></el-menu-item>
|
7
|
-
<el-menu-item index="4"><a href="/delayed_job/pending">Pending</a></el-menu-item>
|
8
|
-
<el-menu-item index="5"><a href="/delayed_job/failed">Failed</a></el-menu-item>
|
9
|
-
</el-menu>
|
10
|
-
|
11
|
-
<el-col :span="24">
|
12
|
-
<jobs-list></jobs-list>
|
13
|
-
</el-col>
|
14
|
-
</el-row>
|
15
|
-
</template>
|
16
|
-
|
17
|
-
<script>
|
18
|
-
import JobsList from './JobsList.vue'
|
19
|
-
|
20
|
-
export default {
|
21
|
-
data () {
|
22
|
-
return {
|
23
|
-
activeIndex: '1'
|
24
|
-
}
|
25
|
-
},
|
26
|
-
|
27
|
-
created () {
|
28
|
-
let path = window.location.pathname;
|
29
|
-
if (path.includes("overview")) {
|
30
|
-
this.activeIndex = '1'
|
31
|
-
} else if (path.includes("enqueued")) {
|
32
|
-
this.activeIndex = '2'
|
33
|
-
} else if (path.includes("working")) {
|
34
|
-
this.activeIndex = '3'
|
35
|
-
} else if (path.includes("pending")) {
|
36
|
-
this.activeIndex = '4'
|
37
|
-
} else if (path.includes("failed")) {
|
38
|
-
this.activeIndex = '5'
|
39
|
-
}
|
40
|
-
},
|
41
|
-
|
42
|
-
components: {
|
43
|
-
jobsList: JobsList
|
44
|
-
}
|
45
|
-
}
|
46
|
-
</script>
|
47
|
-
|
48
|
-
<style scoped>
|
49
|
-
a {
|
50
|
-
text-decoration: none;
|
51
|
-
}
|
52
|
-
</style>
|
@@ -1,144 +0,0 @@
|
|
1
|
-
<template>
|
2
|
-
<div>
|
3
|
-
<el-table
|
4
|
-
:data="jobs"
|
5
|
-
v-loading.body="loading"
|
6
|
-
style="width: 100%">
|
7
|
-
<el-table-column
|
8
|
-
prop="id"
|
9
|
-
label="Job ID">
|
10
|
-
</el-table-column>
|
11
|
-
<el-table-column
|
12
|
-
label="Status">
|
13
|
-
<template scope="scope">
|
14
|
-
<el-tag
|
15
|
-
:type="filterTag(scope.row)">{{filterTagName(scope.row)}}</el-tag>
|
16
|
-
</template>
|
17
|
-
</el-table-column>
|
18
|
-
<el-table-column
|
19
|
-
prop="payload_object"
|
20
|
-
label="Handler"
|
21
|
-
:formatter="formatter"
|
22
|
-
width="400">
|
23
|
-
</el-table-column>
|
24
|
-
<el-table-column
|
25
|
-
prop="priority"
|
26
|
-
label="Priority">
|
27
|
-
</el-table-column>
|
28
|
-
<el-table-column
|
29
|
-
prop="attempts"
|
30
|
-
label="Attempts">
|
31
|
-
</el-table-column>
|
32
|
-
<el-table-column
|
33
|
-
prop="run_at"
|
34
|
-
label="Run At"
|
35
|
-
width="180"
|
36
|
-
:formatter="runAtFormatter">
|
37
|
-
</el-table-column>
|
38
|
-
<el-table-column
|
39
|
-
prop="created_at"
|
40
|
-
label="Created At"
|
41
|
-
:formatter="createdAtFormatter">
|
42
|
-
</el-table-column>
|
43
|
-
|
44
|
-
<el-table-column
|
45
|
-
label="Actions"
|
46
|
-
width="120">
|
47
|
-
<template scope="scope">
|
48
|
-
<el-button type="info" size="mini" @click.native.prevent="handleClickDialog(scope.$index, jobs)">
|
49
|
-
Show
|
50
|
-
</el-button>
|
51
|
-
</template>
|
52
|
-
</el-table-column>
|
53
|
-
</el-table>
|
54
|
-
|
55
|
-
<el-dialog title="Object Payload" v-model="dialogVisible" size="small">
|
56
|
-
<pre>{{jobDetailHandler}}</pre>
|
57
|
-
<span slot="footer" class="dialog-footer">
|
58
|
-
<el-button type="primary" @click="dialogVisible = false">Ok!</el-button>
|
59
|
-
</span>
|
60
|
-
</el-dialog>
|
61
|
-
</div>
|
62
|
-
</template>
|
63
|
-
|
64
|
-
<script>
|
65
|
-
const moment = require('moment');
|
66
|
-
|
67
|
-
export default {
|
68
|
-
props: ["mydata"],
|
69
|
-
data () {
|
70
|
-
return {
|
71
|
-
jobs: [],
|
72
|
-
dialogVisible: false,
|
73
|
-
jobDetailHandler: "",
|
74
|
-
jobDetailId: "",
|
75
|
-
loading: true
|
76
|
-
|
77
|
-
}
|
78
|
-
},
|
79
|
-
created () {
|
80
|
-
let path = window.location.pathname;
|
81
|
-
if (path.includes("pending")) {
|
82
|
-
this.loadJobs({ params: { filter: "pending" } });
|
83
|
-
} else if (path.includes("failed")) {
|
84
|
-
this.loadJobs({ params: { filter: "failed" } });
|
85
|
-
} else if (path.includes("working")) {
|
86
|
-
this.loadJobs({ params: { filter: "working" } });
|
87
|
-
} else if (path.includes("enqueued")) {
|
88
|
-
this.loadJobs({ params: { filter: "enqueued" } });
|
89
|
-
}
|
90
|
-
else {
|
91
|
-
this.loadJobs({ params: {} });
|
92
|
-
}
|
93
|
-
},
|
94
|
-
|
95
|
-
methods: {
|
96
|
-
handleClickDialog(index, jobs){
|
97
|
-
this.jobDetailHandler = jobs[index].payload_object;
|
98
|
-
this.jobDetailId = jobs[index].id;
|
99
|
-
this.dialogVisible = true;
|
100
|
-
},
|
101
|
-
|
102
|
-
formatter(row, column){
|
103
|
-
return row.handler.substring(0,300)
|
104
|
-
},
|
105
|
-
|
106
|
-
filterTag(row){
|
107
|
-
if (row.failed_at !== null) {
|
108
|
-
return "danger"
|
109
|
-
} else if (row.locked_at !== null) {
|
110
|
-
return "warning"
|
111
|
-
} else {
|
112
|
-
return "gray"
|
113
|
-
}
|
114
|
-
},
|
115
|
-
|
116
|
-
filterTagName(row) {
|
117
|
-
if (row.failed_at !== null) {
|
118
|
-
return "Failed"
|
119
|
-
} else if (row.locked_at !== null) {
|
120
|
-
return "Running"
|
121
|
-
} else {
|
122
|
-
return "Queued"
|
123
|
-
}
|
124
|
-
},
|
125
|
-
|
126
|
-
runAtFormatter(row, column){
|
127
|
-
return moment(row.run_at).format('MMMM Do YYYY, h:mm:ss a');
|
128
|
-
},
|
129
|
-
|
130
|
-
createdAtFormatter(row, column){
|
131
|
-
return moment(row.created_at).format('MMMM Do YYYY, h:mm:ss a');
|
132
|
-
},
|
133
|
-
|
134
|
-
loadJobs(queries) {
|
135
|
-
this.$http.get("/delayed_job/jobs.json", queries).then(response => {
|
136
|
-
this.jobs = response.body;
|
137
|
-
this.loading = false;
|
138
|
-
}, response => {
|
139
|
-
this.loading = false;
|
140
|
-
});
|
141
|
-
}
|
142
|
-
}
|
143
|
-
}
|
144
|
-
</script>
|