This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(() => { | |
const token = cybozu.data.REQUEST_TOKEN; | |
const downloadFile = async ({ fileKey }) => { | |
const res = await fetch(`/k/v1/file.json?fileKey=${fileKey}`, { | |
method: "GET", | |
headers: { "X-Requested-With": "XMLHttpRequest" }, | |
}); | |
return res.blob(); | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const icons = { | |
APP39: "https://static.cybozu.com/contents/k/image/icon/app/appTableBlue.png", | |
APP62: "https://static.cybozu.com/contents/k/image/icon/app/document.png", | |
APP47: "https://static.cybozu.com/contents/k/image/icon/app/bargraph.png", | |
APP69: "https://static.cybozu.com/contents/k/image/icon/app/laptop.png", | |
APP61: "https://static.cybozu.com/contents/k/image/icon/app/disk.png", | |
APP50: "https://static.cybozu.com/contents/k/image/icon/app/calculator.png", | |
APP55: "https://static.cybozu.com/contents/k/image/icon/app/clipboard.png", | |
APP82: "https://static.cybozu.com/contents/k/image/icon/app/printer.png", | |
APP48: "https://static.cybozu.com/contents/k/image/icon/app/binder.png", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/bash | |
prompt="ロググループ名を選択してください:" | |
options=$(aws logs describe-log-groups | jq -r ".logGroups[] | select( .logGroupName | contains(\"$1\")) | .logGroupName") | |
if [[ $options == "" ]]; then | |
echo "ロググループが存在しませんでした。" | |
exit 0 | |
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
((f) => { | |
const script = document.createElement("script"); | |
script.src = | |
"https://unpkg.com/@kintone/rest-api-client@2.0.27/umd/KintoneRestAPIClient.min.js"; | |
script.onload = () => { | |
f(); | |
}; | |
document.body.appendChild(script); | |
})(async () => { | |
// 一覧として表示する最小容量 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(async () => { | |
const getDatetime = () => { | |
const date = new Date(); | |
const YYYY = date.getFullYear(); | |
const MM = ("00" + (date.getMonth() + 1)).slice(-2); | |
const DD = ("00" + date.getDate()).slice(-2); | |
const HH = ("00" + date.getHours()).slice(-2); | |
const mm = ("00" + date.getMinutes()).slice(-2); | |
const ss = ("00" + date.getSeconds()).slice(-2); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(() => { | |
const downloadFile = async ({ fileKey }) => { | |
const url = `/k/v1/file.json?fileKey=${fileKey}`; | |
const headers = { "X-Requested-With": "XMLHttpRequest" }; | |
// ファイルダウンロードはkintone.api()では実行できない | |
const res = await fetch(url, { headers }); | |
return res.arrayBuffer(); | |
}; | |
const stringToArrayBuffer = (string) => { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
((f) => { | |
const v = "3.7.1"; | |
const script = document.createElement("script"); | |
script.src = `//ajax.googleapis.com/ajax/libs/jquery/${v}/jquery.min.js`; | |
script.onload = () => { | |
const $ = jQuery.noConflict(true); | |
f($); | |
}; | |
document.body.appendChild(script); | |
})(async ($) => { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(() => { | |
"use strict"; | |
kintone.events.on(["app.record.detail.show"], async (event) => { | |
const domain = "xxx.cybozu.com"; | |
const app = "xxx"; | |
const headers = { | |
"X-Cybozu-API-Token": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", | |
}; | |
const query = encodeURIComponent('会社名 = "金都運総研"'); |