mirror of
https://github.com/netbox-community/netbox.git
synced 2024-05-10 07:54:54 +00:00
9856 review changes
This commit is contained in:
@ -19,8 +19,9 @@ def map_strawberry_type(field):
|
|||||||
if isinstance(field, ContentTypeFilter):
|
if isinstance(field, ContentTypeFilter):
|
||||||
should_create_function = True
|
should_create_function = True
|
||||||
attr_type = str | None
|
attr_type = str | None
|
||||||
elif isinstance(field, MACAddressFilter):
|
elif isinstance(field, MultiValueMACAddressFilter):
|
||||||
pass
|
should_create_function = True
|
||||||
|
attr_type = List[str] | None
|
||||||
elif isinstance(field, MultiValueArrayFilter):
|
elif isinstance(field, MultiValueArrayFilter):
|
||||||
pass
|
pass
|
||||||
elif isinstance(field, MultiValueCharFilter):
|
elif isinstance(field, MultiValueCharFilter):
|
||||||
|
@ -473,10 +473,6 @@ STATICFILES_DIRS = (
|
|||||||
os.path.join(BASE_DIR, 'project-static', 'img'),
|
os.path.join(BASE_DIR, 'project-static', 'img'),
|
||||||
os.path.join(BASE_DIR, 'project-static', 'js'),
|
os.path.join(BASE_DIR, 'project-static', 'js'),
|
||||||
('docs', os.path.join(BASE_DIR, 'project-static', 'docs')), # Prefix with /docs
|
('docs', os.path.join(BASE_DIR, 'project-static', 'docs')), # Prefix with /docs
|
||||||
# os.path.join(ROOT_DIR, 'node_modules', 'graphiql-explorer'),
|
|
||||||
# os.path.join(ROOT_DIR, 'node_modules', 'react', 'cjs'),
|
|
||||||
# os.path.join(ROOT_DIR, 'node_modules', 'react_dom', 'cjs'),
|
|
||||||
# os.path.join(ROOT_DIR, 'node_modules', 'js-cookie', 'dist'),
|
|
||||||
)
|
)
|
||||||
|
|
||||||
# Media
|
# Media
|
||||||
|
@ -24,36 +24,44 @@ function copyFiles(files) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async function bundleGraphIQL() {
|
async function bundleGraphIQL() {
|
||||||
fileMap = [
|
let fileMap = [
|
||||||
{
|
{
|
||||||
source: './node_modules/react/umd/react.production.min.js',
|
source: './node_modules/react/umd/react.production.min.js',
|
||||||
dest: './dist/react.production.min.js'
|
dest: './dist/graphiql/react.production.min.js'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
source: './node_modules/react-dom/umd/react-dom.production.min.js',
|
source: './node_modules/react-dom/umd/react-dom.production.min.js',
|
||||||
dest: './dist/react-dom.production.min.js'
|
dest: './dist/graphiql/react-dom.production.min.js'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
source: './node_modules/js-cookie/dist/js.cookie.min.js',
|
source: './node_modules/js-cookie/dist/js.cookie.min.js',
|
||||||
dest: './dist/js.cookie.min.js'
|
dest: './dist/graphiql/js.cookie.min.js'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
source: './node_modules/graphiql/graphiql.min.js',
|
source: './node_modules/graphiql/graphiql.min.js',
|
||||||
dest: './dist/graphiql.min.js'
|
dest: './dist/graphiql/graphiql.min.js'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
source: './node_modules/@graphiql/plugin-explorer/dist/index.umd.js',
|
source: './node_modules/@graphiql/plugin-explorer/dist/index.umd.js',
|
||||||
dest: './dist/index.umd.js'
|
dest: './dist/graphiql/index.umd.js'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
source: './node_modules/graphiql/graphiql.min.css',
|
source: './node_modules/graphiql/graphiql.min.css',
|
||||||
dest: './dist/graphiql.min.css'
|
dest: './dist/graphiql/graphiql.min.css'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
source: './node_modules/@graphiql/plugin-explorer/dist/style.css',
|
source: './node_modules/@graphiql/plugin-explorer/dist/style.css',
|
||||||
dest: './dist/plugin-explorer-style.css'
|
dest: './dist/graphiql/plugin-explorer-style.css'
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
|
try {
|
||||||
|
if (!fs.existsSync('./dist/graphiql/')) {
|
||||||
|
fs.mkdirSync('./dist/graphiql/');
|
||||||
|
}
|
||||||
|
} catch (err) {
|
||||||
|
console.error(err);
|
||||||
}
|
}
|
||||||
]
|
|
||||||
|
|
||||||
copyFiles(fileMap).then(() => {
|
copyFiles(fileMap).then(() => {
|
||||||
console.log('✅ Copied graphiql files');
|
console.log('✅ Copied graphiql files');
|
||||||
|
@ -53,18 +53,18 @@ add "&raw" to the end of the URL within a browser.
|
|||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<script src="{% static 'react.production.min.js' %}"></script>
|
<script src="{% static 'graphiql/react.production.min.js' %}"></script>
|
||||||
<script src="{% static 'react-dom.production.min.js' %}"></script>
|
<script src="{% static 'graphiql/react-dom.production.min.js' %}"></script>
|
||||||
<script src="{% static 'js.cookie.min.js' %}"></script>
|
<script src="{% static 'graphiql/js.cookie.min.js' %}"></script>
|
||||||
|
|
||||||
<link rel="stylesheet" href="{% static 'graphiql.min.css' %}"/>
|
<link rel="stylesheet" href="{% static 'graphiql/graphiql.min.css' %}"/>
|
||||||
<link rel="stylesheet" href="{% static 'plugin-explorer-style.css' %}"/>
|
<link rel="stylesheet" href="{% static 'graphiql/plugin-explorer-style.css' %}"/>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
<div id="graphiql" class="graphiql-container">Loading...</div>
|
<div id="graphiql" class="graphiql-container">Loading...</div>
|
||||||
<script src="{% static 'graphiql.min.js' %}"></script>
|
<script src="{% static 'graphiql/graphiql.min.js' %}"></script>
|
||||||
<script src="{% static 'index.umd.js' %}"></script>
|
<script src="{% static 'graphiql/index.umd.js' %}"></script>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
const EXAMPLE_QUERY = `# Welcome to GraphiQL 🍓
|
const EXAMPLE_QUERY = `# Welcome to GraphiQL 🍓
|
||||||
|
Reference in New Issue
Block a user