├── VERSION ├── .go-version ├── .golangci.yml ├── icon.png ├── .whitesource ├── .github ├── dependabot.yml └── workflows │ ├── reviewdog.yml │ ├── rebase.yml │ ├── automerge.yml │ ├── go.yml │ ├── release.yml │ └── codeql-analysis.yml ├── pkg └── dd │ ├── variables.go │ ├── service.go │ ├── board.go │ └── monitor.go ├── renovate.json ├── .gitignore ├── env.sh ├── go.mod ├── Makefile ├── LICENSE ├── README.md ├── config └── service.yaml ├── main.go ├── go.sum └── info.plist /VERSION: -------------------------------------------------------------------------------- 1 | 0.0.1 2 | -------------------------------------------------------------------------------- /.go-version: -------------------------------------------------------------------------------- 1 | 1.17.3 2 | -------------------------------------------------------------------------------- /.golangci.yml: -------------------------------------------------------------------------------- 1 | run: 2 | skip-files: 3 | - testenv/* 4 | -------------------------------------------------------------------------------- /icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nekottyo/alfred-datadog-workflow/HEAD/icon.png -------------------------------------------------------------------------------- /.whitesource: -------------------------------------------------------------------------------- 1 | { 2 | "checkRunSettings": { 3 | "vulnerableCheckRunConclusionLevel": "failure" 4 | }, 5 | "issueSettings": { 6 | "minSeverityLevel": "LOW" 7 | } 8 | } -------------------------------------------------------------------------------- /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | version: 2 2 | updates: 3 | - package-ecosystem: gomod 4 | directory: "/" 5 | schedule: 6 | interval: daily 7 | time: '20:00' 8 | open-pull-requests-limit: 10 9 | -------------------------------------------------------------------------------- /pkg/dd/variables.go: -------------------------------------------------------------------------------- 1 | package dd 2 | 3 | import "time" 4 | 5 | // How long to cache repo list for 6 | var ( 7 | maxCacheAge = 5 * time.Minute 8 | baseURL = "https://app.datadoghq.com" 9 | ) 10 | -------------------------------------------------------------------------------- /renovate.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": [ 3 | "@nekottyo" 4 | ], 5 | "packageRules": [ 6 | { 7 | "updateTypes": ["major"], 8 | "labels": ["bump:patch"] 9 | }, 10 | { 11 | "updateTypes": ["minor"], 12 | "labels": ["bump:patch"] 13 | }, 14 | { 15 | "updateTypes": ["patch"], 16 | "labels": ["bump:patch"] 17 | } 18 | ] 19 | } 20 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Binaries for programs and plugins 2 | *.exe 3 | *.exe~ 4 | *.dll 5 | *.so 6 | *.dylib 7 | 8 | # Test binary, built with `go test -c` 9 | *.test 10 | 11 | # Output of the go coverage tool, specifically when used with LiteIDE 12 | *.out 13 | 14 | # Dependency directories (remove the comment below to include it) 15 | # vendor/ 16 | 17 | !.gitkeep 18 | testenv/ 19 | release/ 20 | 21 | alfred-datadog-workflow 22 | -------------------------------------------------------------------------------- /env.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env zsh 2 | root="$( git rev-parse --show-toplevel )" 3 | testdir="${root}/testenv" 4 | 5 | # Absolute bare-minimum for AwGo to function... 6 | export alfred_workflow_bundleid="net.deanishe.awgo" 7 | export alfred_workflow_data="${testdir}/data" 8 | export alfred_workflow_cache="${testdir}/cache" 9 | export alfred_workflow_version="$(cat ${root}/VERSION)" 10 | export alfred_workflow_name="alfred-datadog-workflow" 11 | -------------------------------------------------------------------------------- /.github/workflows/reviewdog.yml: -------------------------------------------------------------------------------- 1 | name: reviewdog 2 | on: [pull_request] 3 | jobs: 4 | golangci-lint: 5 | name: runner / golangci-lint 6 | runs-on: ubuntu-latest 7 | steps: 8 | - name: Check out code into the Go module directory 9 | uses: actions/checkout@v1 10 | - name: golangci-lint 11 | uses: reviewdog/action-golangci-lint@v1 12 | with: 13 | github_token: ${{ secrets.github_token }} 14 | golangci_lint_flags: "" 15 | -------------------------------------------------------------------------------- /.github/workflows/rebase.yml: -------------------------------------------------------------------------------- 1 | on: 2 | issue_comment: 3 | types: [created] 4 | name: Automatic Rebase 5 | jobs: 6 | rebase: 7 | name: Rebase 8 | if: github.event.issue.pull_request != '' && contains(github.event.comment.body, '/rebase') 9 | runs-on: ubuntu-latest 10 | steps: 11 | - name: Checkout the latest code 12 | uses: actions/checkout@v2 13 | with: 14 | fetch-depth: 0 15 | - name: Automatic Rebase 16 | uses: cirrus-actions/rebase@1.3.1 17 | env: 18 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 19 | -------------------------------------------------------------------------------- /go.mod: -------------------------------------------------------------------------------- 1 | module github.com/nekottyo/alfred-datadog-workflow 2 | 3 | go 1.21 4 | 5 | toolchain go1.24.0 6 | 7 | require ( 8 | github.com/deanishe/awgo v0.29.1 9 | go.deanishe.net/fuzzy v1.0.0 10 | gopkg.in/yaml.v3 v3.0.1 11 | gopkg.in/zorkian/go-datadog-api.v2 v2.30.0 12 | ) 13 | 14 | require ( 15 | github.com/cenkalti/backoff v2.2.1+incompatible // indirect 16 | github.com/magefile/mage v1.15.0 // indirect 17 | github.com/zorkian/go-datadog-api v2.28.0+incompatible // indirect 18 | go.deanishe.net/env v0.5.1 // indirect 19 | golang.org/x/text v0.14.0 // indirect 20 | ) 21 | -------------------------------------------------------------------------------- /.github/workflows/automerge.yml: -------------------------------------------------------------------------------- 1 | name: automerge 2 | 3 | on: 4 | pull_request: 5 | types: 6 | - labeled 7 | - unlabeled 8 | - synchronize 9 | - opened 10 | - edited 11 | - ready_for_review 12 | - reopened 13 | - unlocked 14 | pull_request_review: 15 | types: 16 | - submitted 17 | check_suite: 18 | types: 19 | - completed 20 | status: {} 21 | jobs: 22 | automerge: 23 | runs-on: ubuntu-latest 24 | steps: 25 | - name: automerge 26 | uses: "pascalgn/automerge-action@80acb0f883348dcfd0e526288f7d27a12b9333be" 27 | env: 28 | GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" 29 | -------------------------------------------------------------------------------- /.github/workflows/go.yml: -------------------------------------------------------------------------------- 1 | name: Go 2 | 3 | on: 4 | push: 5 | branches: [ master ] 6 | pull_request: 7 | branches: [ master ] 8 | 9 | jobs: 10 | 11 | build: 12 | name: Build 13 | runs-on: ubuntu-latest 14 | steps: 15 | 16 | - name: Set up Go 17 | uses: actions/setup-go@v4 18 | with: 19 | go-version: 1.21 20 | id: go 21 | 22 | - uses: actions/checkout@v4 23 | 24 | - uses: actions/cache@v2 25 | with: 26 | path: ~/go/pkg/mod 27 | key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} 28 | restore-keys: | 29 | ${{ runner.os }}-go- 30 | 31 | - name: Build 32 | run: go build -v . 33 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | .PHONY: build tidy lint 2 | 3 | PKG_NAME = alfred-datadog-workflow 4 | RELEASE_DIR := release 5 | BUILD_CMD := CGO_ENABLED=0 GOOS=darwin GOARCH=amd64 go build -a -tags netgo -ldflags '-w -extldflags "-static"' 6 | 7 | build: get tidy 8 | @${BUILD_CMD} -o ${PKG_NAME} ${LDFLAGS} . 9 | 10 | get: 11 | @go get -v -t -d ./... 12 | 13 | clean: clean-release 14 | @go clean 15 | 16 | tidy: 17 | @go mod tidy 18 | 19 | lint: 20 | @golangci-lint run 21 | 22 | action-release: get 23 | @mkdir -p ${RELEASE_DIR} 24 | @${BUILD_CMD} -o ${RELEASE_DIR}/${PKG_NAME} ${LDFLAGS} . 25 | @cp -R config info.plist icon.png LICENSE README.md ${RELEASE_DIR} 26 | 27 | clean-release: 28 | @rm -rf ${RELEASE_DIR} 29 | 30 | -------------------------------------------------------------------------------- /pkg/dd/service.go: -------------------------------------------------------------------------------- 1 | package dd 2 | 3 | import ( 4 | "io/ioutil" 5 | 6 | "gopkg.in/yaml.v3" 7 | 8 | aw "github.com/deanishe/awgo" 9 | ) 10 | 11 | type Service struct { 12 | svcs []serviceMap 13 | wf *aw.Workflow 14 | } 15 | 16 | type serviceMap struct { 17 | Url string `yaml:"url"` 18 | Title string `yaml:"title"` 19 | } 20 | 21 | func NewServices(path string, wf *aw.Workflow) (Service, error) { 22 | buf, err := ioutil.ReadFile(path) 23 | if err != nil { 24 | return Service{}, err 25 | } 26 | 27 | svcs := make([]serviceMap, 20) 28 | if err := yaml.Unmarshal(buf, &svcs); err != nil { 29 | return Service{}, err 30 | } 31 | 32 | return Service{ 33 | svcs: svcs, 34 | wf: wf, 35 | }, nil 36 | } 37 | 38 | func (s *Service) ListServices() error { 39 | for _, svc := range s.svcs { 40 | s.wf.NewItem(svc.Title). 41 | Subtitle(svc.Url). 42 | Arg(svc.Url). 43 | UID(svc.Title). 44 | Valid(true) 45 | } 46 | return nil 47 | } 48 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2020 nekottyo 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 all 13 | 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 THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /pkg/dd/board.go: -------------------------------------------------------------------------------- 1 | package dd 2 | 3 | import ( 4 | "fmt" 5 | 6 | aw "github.com/deanishe/awgo" 7 | "gopkg.in/zorkian/go-datadog-api.v2" 8 | ) 9 | 10 | // Board is workflow structure of the board. 11 | type Board struct { 12 | client *datadog.Client 13 | cacheName string 14 | wf *aw.Workflow 15 | } 16 | 17 | // NewBoard returns a new dd.Board. 18 | func NewBoard(client *datadog.Client, wf *aw.Workflow) Board { 19 | return Board{ 20 | cacheName: boardCacheName(), 21 | client: client, 22 | wf: wf, 23 | } 24 | } 25 | 26 | // ListBoards is fetch board and appends to workflow items. 27 | func (d *Board) ListBoards() error { 28 | var boards []datadog.BoardLite 29 | 30 | call := func() (interface{}, error) { 31 | return d.client.GetBoards() 32 | } 33 | 34 | if err := d.wf.Cache.LoadOrStoreJSON(d.cacheName, maxCacheAge, call, &boards); err != nil { 35 | return err 36 | } 37 | 38 | for _, board := range boards { 39 | url := fmt.Sprintf("%s/dashboard/%s", baseURL, board.GetId()) 40 | d.wf.NewItem(board.GetTitle()). 41 | Subtitle(url). 42 | Arg(url). 43 | UID(board.GetTitle()). 44 | Valid(true) 45 | } 46 | return nil 47 | } 48 | 49 | // monitorCacheName returns filename for the dashbaord's cache. 50 | func boardCacheName() string { 51 | return "board.json" 52 | } 53 | -------------------------------------------------------------------------------- /pkg/dd/monitor.go: -------------------------------------------------------------------------------- 1 | package dd 2 | 3 | import ( 4 | "fmt" 5 | "strconv" 6 | 7 | aw "github.com/deanishe/awgo" 8 | "gopkg.in/zorkian/go-datadog-api.v2" 9 | ) 10 | 11 | // Monitor is workflow structure of the Monitor. 12 | type Monitor struct { 13 | client *datadog.Client 14 | cacheName string 15 | wf *aw.Workflow 16 | } 17 | 18 | // NewMonitor returns a new dd.Monitor. 19 | func NewMonitor(client *datadog.Client, wf *aw.Workflow) Monitor { 20 | return Monitor{ 21 | cacheName: monitorCacheName(), 22 | client: client, 23 | wf: wf, 24 | } 25 | } 26 | 27 | // ListMonitors is fetch monitor and appends to workflow items. 28 | func (d *Monitor) ListMonitors() error { 29 | var monitors []datadog.Monitor 30 | 31 | call := func() (interface{}, error) { 32 | return d.client.GetMonitors() 33 | } 34 | 35 | if err := d.wf.Cache.LoadOrStoreJSON(d.cacheName, maxCacheAge, call, &monitors); err != nil { 36 | return err 37 | } 38 | 39 | for _, monitor := range monitors { 40 | url := fmt.Sprintf("%s/monitors/%d", baseURL, monitor.GetId()) 41 | status := fmt.Sprintf("[%s] %s", monitor.GetOverallState(), monitor.GetName()) 42 | d.wf.NewItem(status). 43 | Subtitle(url). 44 | Arg(url). 45 | UID(strconv.Itoa(monitor.GetId())). 46 | Valid(true) 47 | } 48 | return nil 49 | } 50 | 51 | // monitorCacheName returns filename for the monitor's cache. 52 | func monitorCacheName() string { 53 | return "monitor.json" 54 | } 55 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # alfred-datadog-workflow 2 | 3 | [![version](https://img.shields.io/github/v/tag/nekottyo/alfred-datadog-workflow?sort=semver)](https://github.com/nekottyo/alfred-datadog-workflow/releases) 4 | [![Codacy Badge](https://api.codacy.com/project/badge/Grade/fe1cb90a9803401cb98c0b95fdcd3f93)](https://app.codacy.com/manual/nekottyo/alfred-datadog-workflow?utm_source=github.com&utm_medium=referral&utm_content=nekottyo/alfred-datadog-workflow&utm_campaign=Badge_Grade_Dashboard) 5 | [![Total alerts](https://img.shields.io/lgtm/alerts/g/nekottyo/alfred-datadog-workflow.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/nekottyo/alfred-datadog-workflow/alerts/) 6 | [![action-bumpr supported](https://img.shields.io/badge/bumpr-supported-ff69b4?logo=github&link=https://github.com/haya14busa/action-bumpr)](https://github.com/haya14busa/action-bumpr) 7 | 8 | ## Installation 9 | * [Download the latest release](https://github.com/nekottyo/alfred-datadog-workflow/releases) 10 | * Open the downloaded file in Finder 11 | 12 | ## Usage 13 | 14 | To use it, activate Alfred and type in `dd`. 15 | 16 | ### authentication 17 | register ApiKey and AppKey 18 | 19 | #### api key 20 | `dd auth ` 21 | `ApiKey ` 22 | `` 23 | 24 | #### app key 25 | `dd auth ` 26 | `AppKey ` 27 | `` 28 | 29 | ### open service 30 | 31 | `dd open ` 32 | 33 | ex) `event`, `monitor`, `dashboard`.. 34 | 35 | see [config/service.yaml](./config/service.yaml) 36 | 37 | ### serach monitor 38 | 39 | `dd monitor ` 40 | 41 | ### serach dashboard 42 | 43 | `dd dashboard ` 44 | 45 | ## License 46 | [MIT](https://github.com/nekottyo/alfred-datadog-workflow/blob/master/LICENSE) 47 | 48 | ## author 49 | [@nekottyo](https://github.com/nekottyo) 50 | -------------------------------------------------------------------------------- /config/service.yaml: -------------------------------------------------------------------------------- 1 | - url: https://app.datadoghq.com/watchdog 2 | title: Watchdog 3 | - url: https://app.datadoghq.com/event/explorer 4 | title: Eventt Explorers 5 | - url: https://app.datadoghq.com/dashboard 6 | title: Dashboards 7 | - url: https://app.datadoghq.com/infrastructure 8 | title: Infrastructure Host List 9 | - url: https://app.datadoghq.com/containers 10 | title: Infrastructure Containers 11 | - url: https://app.datadoghq.com/orchestration/overview/deployment 12 | title: Infrastructure Deployment 13 | - url: https://app.datadoghq.com/orchestration/overview/pod 14 | title: Infrastructure Pod 15 | - url: https://app.datadoghq.com/infrastructure/map 16 | title: Infrastructure Map 17 | - url: https://app.datadoghq.com/monitors/manage 18 | title: Monitors 19 | - url: https://app.datadoghq.com/monitors#/downtime 20 | title: Monitor Downtime 21 | - url: https://app.datadoghq.com/metric/explorer 22 | title: Metrics Explorers 23 | - url: https://app.datadoghq.com/metric/summary 24 | title: Metrics Summary 25 | - url: https://app.datadoghq.com/account/settings 26 | title: Integration 27 | - url: https://app.datadoghq.com/account/settings#api 28 | title: Integration api 29 | - url: https://app.datadoghq.com/services 30 | title: Service Catalog 31 | - url: https://app.datadoghq.com/notebook/list 32 | title: Notebooks 33 | - url: https://app.datadoghq.com/logs 34 | title: Logs 35 | - url: https://app.datadoghq.com/synthetics/list 36 | title: Synthetics 37 | - url: https://app.datadoghq.com/rum/list 38 | title: RUM Application 39 | - url: https://app.datadoghq.com/account/usage 40 | title: Plan & Usage 41 | - url: https://app.datadoghq.com/slo/manage 42 | title: SLO 43 | - url: https://app.datadoghq.com/infrastructure/catalog 44 | title: Resource Catalog 45 | - url: https://app.datadoghq.com/cost/overview 46 | title: Cloud Costs 47 | -------------------------------------------------------------------------------- /.github/workflows/release.yml: -------------------------------------------------------------------------------- 1 | # ref. https://github.com/haya14busa/action-update-semver/blob/master/.github/workflows/release.yml 2 | name: release 3 | 4 | on: 5 | push: 6 | branches: 7 | - master 8 | tags: 9 | - 'v*.*.*' 10 | pull_request: 11 | types: 12 | - labeled 13 | jobs: 14 | release: 15 | if: github.event.action != 'labeled' 16 | runs-on: ubuntu-latest 17 | steps: 18 | - uses: actions/checkout@v4 19 | 20 | - uses: actions/cache@v2 21 | with: 22 | path: ~/go/pkg/mod 23 | key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} 24 | restore-keys: | 25 | ${{ runner.os }}-go- 26 | 27 | - uses: actions/setup-go@v4 28 | with: 29 | go-version: 1.21 30 | 31 | - name: make action-release 32 | run: make action-release 33 | 34 | - name: Build Alfred Workflow 35 | id: alfred_builder 36 | uses: mperezi/build-alfred-workflow@v1 37 | with: 38 | workflow_dir: ./release 39 | 40 | # Bump version on merging Pull Requests with specific labels. 41 | # (bump:major,bump:minor,bump:patch) 42 | - id: bumpr 43 | if: "!startsWith(github.ref, 'refs/tags/')" 44 | uses: haya14busa/action-bumpr@v1 45 | 46 | - name: Create Release 47 | if: "!steps.bumpr.outputs.skip" 48 | id: create_release 49 | uses: actions/create-release@v1 50 | env: 51 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 52 | with: 53 | tag_name: ${{ steps.bumpr.outputs.next_version }} 54 | release_name: ${{ steps.bumpr.outputs.next_version }} 55 | draft: false 56 | prerelease: false 57 | 58 | - name: Upload Alfred Workflow 59 | uses: actions/upload-release-asset@v1 60 | env: 61 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 62 | with: 63 | upload_url: ${{ steps.create_release.outputs.upload_url }} 64 | asset_path: ${{ steps.alfred_builder.outputs.workflow_file }} 65 | asset_name: ${{ steps.alfred_builder.outputs.workflow_file }} 66 | asset_content_type: application/zip 67 | 68 | release-check: 69 | if: github.event.action == 'labeled' 70 | runs-on: ubuntu-latest 71 | steps: 72 | - uses: actions/checkout@v2 73 | - name: Post bumpr status comment 74 | uses: haya14busa/action-bumpr@v1 75 | -------------------------------------------------------------------------------- /.github/workflows/codeql-analysis.yml: -------------------------------------------------------------------------------- 1 | # For most projects, this workflow file will not need changing; you simply need 2 | # to commit it to your repository. 3 | # 4 | # You may wish to alter this file to override the set of languages analyzed, 5 | # or to provide custom queries or build logic. 6 | name: "CodeQL" 7 | 8 | on: 9 | push: 10 | branches: [master] 11 | pull_request: 12 | # The branches below must be a subset of the branches above 13 | branches: [master] 14 | schedule: 15 | - cron: '0 2 * * 5' 16 | 17 | jobs: 18 | analyze: 19 | name: Analyze 20 | runs-on: ubuntu-latest 21 | 22 | strategy: 23 | fail-fast: false 24 | matrix: 25 | # Override automatic language detection by changing the below list 26 | # Supported options are ['csharp', 'cpp', 'go', 'java', 'javascript', 'python'] 27 | language: ['go'] 28 | # Learn more... 29 | # https://docs.github.com/en/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#overriding-automatic-language-detection 30 | 31 | steps: 32 | - name: Checkout repository 33 | uses: actions/checkout@v2 34 | with: 35 | # We must fetch at least the immediate parents so that if this is 36 | # a pull request then we can checkout the head. 37 | fetch-depth: 2 38 | 39 | # If this run was triggered by a pull request event, then checkout 40 | # the head of the pull request instead of the merge commit. 41 | - run: git checkout HEAD^2 42 | if: ${{ github.event_name == 'pull_request' }} 43 | 44 | # Initializes the CodeQL tools for scanning. 45 | - name: Initialize CodeQL 46 | uses: github/codeql-action/init@v1 47 | with: 48 | languages: ${{ matrix.language }} 49 | # If you wish to specify custom queries, you can do so here or in a config file. 50 | # By default, queries listed here will override any specified in a config file. 51 | # Prefix the list here with "+" to use these queries and those in the config file. 52 | # queries: ./path/to/local/query, your-org/your-repo/queries@main 53 | 54 | # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). 55 | # If this step fails, then you should remove it and run the build manually (see below) 56 | - name: Autobuild 57 | uses: github/codeql-action/autobuild@v1 58 | 59 | # ℹ️ Command-line programs to run using the OS shell. 60 | # 📚 https://git.io/JvXDl 61 | 62 | # ✏️ If the Autobuild fails above, remove it and uncomment the following three lines 63 | # and modify them (or add more) to build your code if your project 64 | # uses a compiled language 65 | 66 | #- run: | 67 | # make bootstrap 68 | # make release 69 | 70 | - name: Perform CodeQL Analysis 71 | uses: github/codeql-action/analyze@v1 72 | -------------------------------------------------------------------------------- /main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "flag" 5 | "log" 6 | "os" 7 | 8 | "github.com/nekottyo/alfred-datadog-workflow/pkg/dd" 9 | "gopkg.in/zorkian/go-datadog-api.v2" 10 | 11 | aw "github.com/deanishe/awgo" 12 | "github.com/deanishe/awgo/keychain" 13 | "go.deanishe.net/fuzzy" 14 | ) 15 | 16 | const ( 17 | apiKeyName = "apikey" 18 | appKeyName = "appkey" 19 | ) 20 | 21 | var ( 22 | maxResults = 200 23 | 24 | // Command-line flags 25 | flagAPIKey bool 26 | flagAPPKey bool 27 | flagDashboard bool 28 | flagMonitor bool 29 | flagService bool 30 | 31 | // credentials 32 | apiKey string 33 | appKey string 34 | 35 | arg string 36 | 37 | // Workflow 38 | sopts []fuzzy.Option 39 | wf *aw.Workflow 40 | kc *keychain.Keychain 41 | client *datadog.Client 42 | ) 43 | 44 | func init() { 45 | flag.BoolVar(&flagAPIKey, "apikey", false, "register apikey") 46 | flag.BoolVar(&flagAPPKey, "appkey", false, "register appkey") 47 | flag.BoolVar(&flagDashboard, "dashboard", false, "list dashboard") 48 | flag.BoolVar(&flagMonitor, "monitor", false, "list monitor") 49 | flag.BoolVar(&flagService, "service", false, "list service") 50 | 51 | initWorkflow() 52 | } 53 | 54 | func initWorkflow() { 55 | sopts = []fuzzy.Option{ 56 | fuzzy.AdjacencyBonus(10.0), 57 | fuzzy.LeadingLetterPenalty(-0.1), 58 | fuzzy.MaxLeadingLetterPenalty(-3.0), 59 | fuzzy.UnmatchedLetterPenalty(-0.5), 60 | } 61 | 62 | wf = aw.New(aw.HelpURL("https://github.com/nekottyo/alfred-datadog-workflow"), 63 | aw.MaxResults(maxResults), 64 | aw.SortOptions(sopts...)) 65 | 66 | kc = keychain.New("net.nekottyo.alfred-datadog.workflow") 67 | } 68 | 69 | func getSecrets(kc *keychain.Keychain) (string, string, error) { 70 | var apiKey, appKey string 71 | var err error 72 | 73 | apiKey, err = kc.Get(apiKeyName) 74 | if err != nil { 75 | return apiKey, appKey, err 76 | } 77 | appKey, err = kc.Get(appKeyName) 78 | if err != nil { 79 | return apiKey, appKey, err 80 | } 81 | 82 | return apiKey, appKey, nil 83 | } 84 | 85 | func setupDatadogClient() { 86 | 87 | var err error 88 | apiKey, appKey, err = getSecrets(kc) 89 | if err != nil { 90 | wf.FatalError(err) 91 | } 92 | client = datadog.NewClient(apiKey, appKey) 93 | 94 | } 95 | 96 | func run() { 97 | wf.Args() 98 | flag.Parse() 99 | 100 | arg = flag.Arg(0) 101 | 102 | if flagAPIKey { 103 | if err := kc.Set(apiKeyName, arg); err != nil { 104 | wf.FatalError(err) 105 | } 106 | wf.SendFeedback() 107 | os.Exit(0) 108 | } 109 | 110 | if flagAPPKey { 111 | if err := kc.Set(appKeyName, arg); err != nil { 112 | wf.FatalError(err) 113 | } 114 | wf.SendFeedback() 115 | os.Exit(0) 116 | } 117 | 118 | setupDatadogClient() 119 | 120 | if flagDashboard { 121 | d := dd.NewBoard(client, wf) 122 | if err := d.ListBoards(); err != nil { 123 | wf.FatalError(err) 124 | } 125 | } 126 | if flagMonitor { 127 | d := dd.NewMonitor(client, wf) 128 | if err := d.ListMonitors(); err != nil { 129 | wf.FatalError(err) 130 | } 131 | } 132 | if flagService { 133 | d, err := dd.NewServices("config/service.yaml", wf) 134 | if err != nil { 135 | wf.FatalError(err) 136 | } 137 | if err := d.ListServices(); err != nil { 138 | wf.FatalError(err) 139 | } 140 | } 141 | if arg != "" { 142 | wf.Filter(arg) 143 | } 144 | log.Printf("[main] query=%s", arg) 145 | 146 | wf.WarnEmpty("No matching", "Try a different query") 147 | wf.SendFeedback() 148 | } 149 | 150 | func main() { 151 | wf.Run(run) 152 | } 153 | -------------------------------------------------------------------------------- /go.sum: -------------------------------------------------------------------------------- 1 | github.com/bmatcuk/doublestar v1.3.4/go.mod h1:wiQtGV+rzVYxB7WIlirSN++5HPtPlXEo9MEoZQC/PmE= 2 | github.com/cenkalti/backoff v2.2.1+incompatible h1:tNowT99t7UNflLxfYYSlKYsBpXdEet03Pg2g16Swow4= 3 | github.com/cenkalti/backoff v2.2.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM= 4 | github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= 5 | github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= 6 | github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= 7 | github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= 8 | github.com/deanishe/awgo v0.29.1 h1:yKAyy0e+HR60iPxaKHhY3hdTM5GCsECpWTP79j04bHg= 9 | github.com/deanishe/awgo v0.29.1/go.mod h1:1yGF+uQfWXX99TiDfAYYKjJpHTq5lHEmvHFEVCHo6KA= 10 | github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= 11 | github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= 12 | github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= 13 | github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= 14 | github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= 15 | github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= 16 | github.com/magefile/mage v1.10.0/go.mod h1:z5UZb/iS3GoOSn0JgWuiw7dxlurVYTu+/jHXqQg881A= 17 | github.com/magefile/mage v1.11.0/go.mod h1:z5UZb/iS3GoOSn0JgWuiw7dxlurVYTu+/jHXqQg881A= 18 | github.com/magefile/mage v1.15.0 h1:BvGheCMAsG3bWUDbZ8AyXXpCNwU9u5CB6sM+HNb9HYg= 19 | github.com/magefile/mage v1.15.0/go.mod h1:z5UZb/iS3GoOSn0JgWuiw7dxlurVYTu+/jHXqQg881A= 20 | github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e h1:fD57ERR4JtEqsWbfPhv4DMiApHyliiK5xCTNVSPiaAs= 21 | github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= 22 | github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= 23 | github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= 24 | github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= 25 | github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= 26 | github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= 27 | github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY= 28 | github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= 29 | github.com/zorkian/go-datadog-api v2.28.0+incompatible h1:bh/2jIkDFCZRjkuQKBFdmB+sScAMXf8fctKTT0ae+wE= 30 | github.com/zorkian/go-datadog-api v2.28.0+incompatible/go.mod h1:PkXwHX9CUQa/FpB9ZwAD45N1uhCW4MT/Wj7m36PbKss= 31 | go.deanishe.net/env v0.5.1 h1:WiOncK5uJj8Um57Vj2dc1bq1lMN7fgRag9up7I3LZy0= 32 | go.deanishe.net/env v0.5.1/go.mod h1:ihEYfDm0K0hq3f5ACTCQDrMTWxH9fTiA1lh1i0aMqm0= 33 | go.deanishe.net/fuzzy v1.0.0 h1:3Qp6PCX0DLb9z03b5OHwAGsbRSkgJpSLncsiDdXDt4Y= 34 | go.deanishe.net/fuzzy v1.0.0/go.mod h1:2yEEMfG7jWgT1s5EO0TteVWmx2MXFBRMr5cMm84bQNY= 35 | golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= 36 | golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= 37 | golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= 38 | golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= 39 | golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= 40 | gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= 41 | gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= 42 | gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f h1:BLraFXnmrev5lT+xlilqcH8XK9/i0At2xKjWk4p6zsU= 43 | gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= 44 | gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= 45 | gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= 46 | gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= 47 | gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= 48 | gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= 49 | gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= 50 | gopkg.in/zorkian/go-datadog-api.v2 v2.30.0 h1:umQdVO0Ytx+kYadhuJNjFtDgIsIEBnKrOTvNuu8ClKI= 51 | gopkg.in/zorkian/go-datadog-api.v2 v2.30.0/go.mod h1:kx0CSMRpzEZfx/nFH62GLU4stZjparh/BRpM89t4XCQ= 52 | howett.net/plist v0.0.0-20201203080718-1454fab16a06/go.mod h1:vMygbs4qMhSZSc4lCUl2OEE+rDiIIJAIdR4m7MiMcm0= 53 | -------------------------------------------------------------------------------- /info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | bundleid 6 | com.nekottyo.alfred-datadog-workflow 7 | category 8 | Tools 9 | connections 10 | 11 | 0C3DD8FF-BF53-4DB9-A37D-C755EF75F528 12 | 13 | 14 | destinationuid 15 | F624D40B-96FA-4EBC-A303-8EC0C8DB780E 16 | modifiers 17 | 0 18 | modifiersubtext 19 | 20 | vitoclose 21 | 22 | 23 | 24 | 150DB521-2E31-4A8F-AF74-D421B9FFE436 25 | 26 | 27 | destinationuid 28 | 4AD565F7-0DBE-47A1-A215-AA0CB60329AE 29 | modifiers 30 | 0 31 | modifiersubtext 32 | 33 | vitoclose 34 | 35 | 36 | 37 | 1C1450E5-2732-4FED-B07C-5AB5E26FE762 38 | 39 | 40 | destinationuid 41 | 699CE2F4-E0E2-4857-B343-D6FCAA12BE0A 42 | modifiers 43 | 0 44 | modifiersubtext 45 | 46 | vitoclose 47 | 48 | 49 | 50 | 493DC438-F04E-42BD-9C55-EAE89997C97E 51 | 52 | 53 | destinationuid 54 | 6C942901-1489-4E64-9BE4-CAFEE6EEF09C 55 | modifiers 56 | 0 57 | modifiersubtext 58 | 59 | vitoclose 60 | 61 | 62 | 63 | 4AD565F7-0DBE-47A1-A215-AA0CB60329AE 64 | 65 | 66 | destinationuid 67 | 493DC438-F04E-42BD-9C55-EAE89997C97E 68 | modifiers 69 | 0 70 | modifiersubtext 71 | 72 | sourceoutputuid 73 | EFAADA66-1A22-4081-BFE3-E5DE52BF581A 74 | vitoclose 75 | 76 | 77 | 78 | destinationuid 79 | 7054CFEE-11A4-4845-BE3A-CBA61582D572 80 | modifiers 81 | 0 82 | modifiersubtext 83 | 84 | sourceoutputuid 85 | 036F2B0E-C902-4D03-A265-782B5AE5746E 86 | vitoclose 87 | 88 | 89 | 90 | 7054CFEE-11A4-4845-BE3A-CBA61582D572 91 | 92 | 93 | destinationuid 94 | 13A75771-CA39-4870-B46C-D3F8AB5D9364 95 | modifiers 96 | 0 97 | modifiersubtext 98 | 99 | vitoclose 100 | 101 | 102 | 103 | 9DC276A9-F1C2-41BF-9DB3-7AC2B652E91D 104 | 105 | 106 | destinationuid 107 | D4C44BA6-3B4C-4F1F-833C-D5FF57FA2893 108 | modifiers 109 | 0 110 | modifiersubtext 111 | 112 | vitoclose 113 | 114 | 115 | 116 | D4C44BA6-3B4C-4F1F-833C-D5FF57FA2893 117 | 118 | 119 | destinationuid 120 | 150DB521-2E31-4A8F-AF74-D421B9FFE436 121 | modifiers 122 | 0 123 | modifiersubtext 124 | 125 | vitoclose 126 | 127 | 128 | 129 | DD86FE97-6524-4739-A11B-F38D939C2008 130 | 131 | FCAB7238-7C9E-4CC9-BD78-50772140CA14 132 | 133 | 134 | destinationuid 135 | DD86FE97-6524-4739-A11B-F38D939C2008 136 | modifiers 137 | 0 138 | modifiersubtext 139 | 140 | vitoclose 141 | 142 | 143 | 144 | 145 | createdby 146 | nekottyo 147 | description 148 | 149 | disabled 150 | 151 | name 152 | Datadog 153 | objects 154 | 155 | 156 | config 157 | 158 | alfredfiltersresults 159 | 160 | alfredfiltersresultsmatchmode 161 | 0 162 | argumenttreatemptyqueryasnil 163 | 164 | argumenttrimmode 165 | 0 166 | argumenttype 167 | 1 168 | escaping 169 | 102 170 | keyword 171 | dd dashboard 172 | queuedelaycustom 173 | 3 174 | queuedelayimmediatelyinitially 175 | 176 | queuedelaymode 177 | 0 178 | queuemode 179 | 1 180 | runningsubtext 181 | Please Wait 182 | script 183 | ./alfred-datadog-workflow -dashboard "$1" 184 | scriptargtype 185 | 1 186 | scriptfile 187 | 188 | subtext 189 | Open Dashboard 190 | title 191 | dashboard 192 | type 193 | 0 194 | withspace 195 | 196 | 197 | type 198 | alfred.workflow.input.scriptfilter 199 | uid 200 | FCAB7238-7C9E-4CC9-BD78-50772140CA14 201 | version 202 | 3 203 | 204 | 205 | config 206 | 207 | argumenttype 208 | 0 209 | subtext 210 | 211 | text 212 | Enter your api key 213 | withspace 214 | 215 | 216 | type 217 | alfred.workflow.input.keyword 218 | uid 219 | 493DC438-F04E-42BD-9C55-EAE89997C97E 220 | version 221 | 1 222 | 223 | 224 | config 225 | 226 | argumenttype 227 | 2 228 | keyword 229 | dd auth 230 | subtext 231 | 232 | text 233 | auth 234 | withspace 235 | 236 | 237 | type 238 | alfred.workflow.input.keyword 239 | uid 240 | 9DC276A9-F1C2-41BF-9DB3-7AC2B652E91D 241 | version 242 | 1 243 | 244 | 245 | config 246 | 247 | concurrently 248 | 249 | escaping 250 | 102 251 | script 252 | ./alfred-datadog-workflow -apikey $1 253 | scriptargtype 254 | 1 255 | scriptfile 256 | 257 | type 258 | 0 259 | 260 | type 261 | alfred.workflow.action.script 262 | uid 263 | 6C942901-1489-4E64-9BE4-CAFEE6EEF09C 264 | version 265 | 2 266 | 267 | 268 | config 269 | 270 | argumenttrimmode 271 | 0 272 | argumenttype 273 | 2 274 | fixedorder 275 | 276 | items 277 | [{"title":"ApiKey","arg":"apikey","subtitle":"Store Api Key"},{"title":"AppKey","arg":"appkey","subtitle":"Store Application Key"}] 278 | runningsubtext 279 | 280 | subtext 281 | 282 | title 283 | 284 | withspace 285 | 286 | 287 | type 288 | alfred.workflow.input.listfilter 289 | uid 290 | D4C44BA6-3B4C-4F1F-833C-D5FF57FA2893 291 | version 292 | 1 293 | 294 | 295 | config 296 | 297 | browser 298 | 299 | spaces 300 | 301 | url 302 | {query} 303 | utf8 304 | 305 | 306 | type 307 | alfred.workflow.action.openurl 308 | uid 309 | DD86FE97-6524-4739-A11B-F38D939C2008 310 | version 311 | 1 312 | 313 | 314 | config 315 | 316 | conditions 317 | 318 | 319 | inputstring 320 | {var:action} 321 | matchcasesensitive 322 | 323 | matchmode 324 | 0 325 | matchstring 326 | apikey 327 | outputlabel 328 | apikey 329 | uid 330 | EFAADA66-1A22-4081-BFE3-E5DE52BF581A 331 | 332 | 333 | inputstring 334 | {var:action} 335 | matchcasesensitive 336 | 337 | matchmode 338 | 0 339 | matchstring 340 | appkey 341 | outputlabel 342 | appkey 343 | uid 344 | 036F2B0E-C902-4D03-A265-782B5AE5746E 345 | 346 | 347 | elselabel 348 | 349 | 350 | type 351 | alfred.workflow.utility.conditional 352 | uid 353 | 4AD565F7-0DBE-47A1-A215-AA0CB60329AE 354 | version 355 | 1 356 | 357 | 358 | config 359 | 360 | argument 361 | 362 | variables 363 | 364 | action 365 | {query} 366 | 367 | 368 | type 369 | alfred.workflow.utility.argument 370 | uid 371 | 150DB521-2E31-4A8F-AF74-D421B9FFE436 372 | version 373 | 1 374 | 375 | 376 | config 377 | 378 | concurrently 379 | 380 | escaping 381 | 102 382 | script 383 | ./alfred-datadog-workflow -appkey $1 384 | scriptargtype 385 | 1 386 | scriptfile 387 | 388 | type 389 | 0 390 | 391 | type 392 | alfred.workflow.action.script 393 | uid 394 | 13A75771-CA39-4870-B46C-D3F8AB5D9364 395 | version 396 | 2 397 | 398 | 399 | config 400 | 401 | argumenttype 402 | 0 403 | subtext 404 | 405 | text 406 | Enter your app key 407 | withspace 408 | 409 | 410 | type 411 | alfred.workflow.input.keyword 412 | uid 413 | 7054CFEE-11A4-4845-BE3A-CBA61582D572 414 | version 415 | 1 416 | 417 | 418 | config 419 | 420 | browser 421 | 422 | spaces 423 | 424 | url 425 | {query} 426 | utf8 427 | 428 | 429 | type 430 | alfred.workflow.action.openurl 431 | uid 432 | 699CE2F4-E0E2-4857-B343-D6FCAA12BE0A 433 | version 434 | 1 435 | 436 | 437 | config 438 | 439 | alfredfiltersresults 440 | 441 | alfredfiltersresultsmatchmode 442 | 0 443 | argumenttreatemptyqueryasnil 444 | 445 | argumenttrimmode 446 | 0 447 | argumenttype 448 | 1 449 | escaping 450 | 102 451 | keyword 452 | dd monitor 453 | queuedelaycustom 454 | 3 455 | queuedelayimmediatelyinitially 456 | 457 | queuedelaymode 458 | 0 459 | queuemode 460 | 1 461 | runningsubtext 462 | Please Wait 463 | script 464 | ./alfred-datadog-workflow -monitor "$1" 465 | scriptargtype 466 | 1 467 | scriptfile 468 | 469 | subtext 470 | Open Monitor 471 | title 472 | monitor 473 | type 474 | 0 475 | withspace 476 | 477 | 478 | type 479 | alfred.workflow.input.scriptfilter 480 | uid 481 | 1C1450E5-2732-4FED-B07C-5AB5E26FE762 482 | version 483 | 3 484 | 485 | 486 | config 487 | 488 | browser 489 | 490 | spaces 491 | 492 | url 493 | {query} 494 | utf8 495 | 496 | 497 | type 498 | alfred.workflow.action.openurl 499 | uid 500 | F624D40B-96FA-4EBC-A303-8EC0C8DB780E 501 | version 502 | 1 503 | 504 | 505 | config 506 | 507 | alfredfiltersresults 508 | 509 | alfredfiltersresultsmatchmode 510 | 0 511 | argumenttreatemptyqueryasnil 512 | 513 | argumenttrimmode 514 | 0 515 | argumenttype 516 | 1 517 | escaping 518 | 102 519 | keyword 520 | dd open 521 | queuedelaycustom 522 | 3 523 | queuedelayimmediatelyinitially 524 | 525 | queuedelaymode 526 | 0 527 | queuemode 528 | 1 529 | runningsubtext 530 | Please Wait 531 | script 532 | ./alfred-datadog-workflow -service "$1" 533 | scriptargtype 534 | 1 535 | scriptfile 536 | 537 | subtext 538 | watchdog, event,dashboard... 539 | title 540 | open services 541 | type 542 | 0 543 | withspace 544 | 545 | 546 | type 547 | alfred.workflow.input.scriptfilter 548 | uid 549 | 0C3DD8FF-BF53-4DB9-A37D-C755EF75F528 550 | version 551 | 3 552 | 553 | 554 | readme 555 | 556 | uidata 557 | 558 | 0C3DD8FF-BF53-4DB9-A37D-C755EF75F528 559 | 560 | xpos 561 | 545 562 | ypos 563 | 160 564 | 565 | 13A75771-CA39-4870-B46C-D3F8AB5D9364 566 | 567 | xpos 568 | 1335 569 | ypos 570 | 145 571 | 572 | 150DB521-2E31-4A8F-AF74-D421B9FFE436 573 | 574 | xpos 575 | 915 576 | ypos 577 | 55 578 | 579 | 1C1450E5-2732-4FED-B07C-5AB5E26FE762 580 | 581 | xpos 582 | 35 583 | ypos 584 | 155 585 | 586 | 493DC438-F04E-42BD-9C55-EAE89997C97E 587 | 588 | xpos 589 | 1140 590 | ypos 591 | 25 592 | 593 | 4AD565F7-0DBE-47A1-A215-AA0CB60329AE 594 | 595 | xpos 596 | 980 597 | ypos 598 | 30 599 | 600 | 699CE2F4-E0E2-4857-B343-D6FCAA12BE0A 601 | 602 | xpos 603 | 245 604 | ypos 605 | 155 606 | 607 | 6C942901-1489-4E64-9BE4-CAFEE6EEF09C 608 | 609 | xpos 610 | 1335 611 | ypos 612 | 25 613 | 614 | 7054CFEE-11A4-4845-BE3A-CBA61582D572 615 | 616 | xpos 617 | 1140 618 | ypos 619 | 145 620 | 621 | 9DC276A9-F1C2-41BF-9DB3-7AC2B652E91D 622 | 623 | xpos 624 | 545 625 | ypos 626 | 25 627 | 628 | D4C44BA6-3B4C-4F1F-833C-D5FF57FA2893 629 | 630 | xpos 631 | 760 632 | ypos 633 | 25 634 | 635 | DD86FE97-6524-4739-A11B-F38D939C2008 636 | 637 | xpos 638 | 245 639 | ypos 640 | 25 641 | 642 | F624D40B-96FA-4EBC-A303-8EC0C8DB780E 643 | 644 | xpos 645 | 760 646 | ypos 647 | 160 648 | 649 | FCAB7238-7C9E-4CC9-BD78-50772140CA14 650 | 651 | xpos 652 | 30 653 | ypos 654 | 25 655 | 656 | 657 | webaddress 658 | github.com/nekottyo/alfred-datadog-workflow 659 | 660 | 661 | --------------------------------------------------------------------------------