mirror of
https://git.netzspielplatz.de/docker-multiarch/openwrt-firmware-selector.git
synced 2025-11-08 17:09:24 +00:00
add manifest, new releases and add attribution
This commit is contained in:
parent
b3b52baf11
commit
247e0c05f9
7 changed files with 46 additions and 7 deletions
15
README.md
15
README.md
|
|
@ -1,4 +1,4 @@
|
|||
# OpenWrt Firmware Selector Wizard [](https://codecov.io/gh/sudhanshu16/openwrt-firmware-selector)
|
||||
# OpenWrt Firmware Selector [](https://codecov.io/gh/sudhanshu16/openwrt-firmware-selector)
|
||||
|
||||
A simple OpenWrt firmware selector using autocompletion.
|
||||
|
||||
|
|
@ -16,6 +16,19 @@ You can set it up easily:
|
|||
2. Use [yarn](https://yarnpkg.com/en/) to install package dependencies
|
||||
`yarn install`
|
||||
3. Run `scripts/collect.py` to generate required JSON files.
|
||||
|
||||
Format:
|
||||
|
||||
```sh
|
||||
./scripts/collect.py --image-url <image_url> <release_src> <config_path> <output_path>
|
||||
```
|
||||
|
||||
Example:
|
||||
|
||||
```sh
|
||||
./scripts/collect.py --image-url 'https://downloads.openwrt.org/{base}/{target}' https://downloads.openwrt.org ./src ./public/
|
||||
```
|
||||
|
||||
4. Use the following command to start a dev server:
|
||||
`yarn start`
|
||||
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@
|
|||
work correctly both with client-side routing and a non-root public URL.
|
||||
Learn how to configure a non-root public URL by running `npm run build`.
|
||||
-->
|
||||
<title>OpenWrt Firmware Selector Wizard</title>
|
||||
<title>OpenWrt Firmware Selector</title>
|
||||
</head>
|
||||
<body>
|
||||
<noscript>You need to enable JavaScript to run this app.</noscript>
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
#!/usr/bin/env python3
|
||||
"""
|
||||
Tool to create overview.json files and update the config.ts.
|
||||
source: https://github.com/mwarning/openwrt-firmware-selector
|
||||
"""
|
||||
|
||||
from pathlib import Path
|
||||
|
|
@ -153,7 +154,7 @@ def write_data(releases, args):
|
|||
"""
|
||||
Scrape profiles.json using wget (slower but more generic).
|
||||
Merge into overview.json files.
|
||||
Update config.json.
|
||||
Update config.ts.
|
||||
"""
|
||||
|
||||
|
||||
|
|
@ -194,7 +195,7 @@ def scrape(args):
|
|||
"""
|
||||
Scan a local directory for releases with profiles.json.
|
||||
Merge into overview.json files.
|
||||
Update config.json.
|
||||
Update config.ts.
|
||||
"""
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -52,6 +52,12 @@
|
|||
background-color: #f3f3f3;
|
||||
}
|
||||
|
||||
code {
|
||||
max-height: 300px;
|
||||
overflow: auto;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.std-textarea {
|
||||
width: 100%;
|
||||
border-radius: 5px;
|
||||
|
|
|
|||
|
|
@ -5,7 +5,11 @@ const config = {
|
|||
show_help: true,
|
||||
|
||||
// Path to overview.json file or URL to the ASU API
|
||||
versions: { '19.07.7': 'data/19.07.7', SNAPSHOT: 'data/SNAPSHOT' },
|
||||
versions: {
|
||||
'19.07.7': 'data/19.07.7',
|
||||
'21.02.0-rc1': 'data/21.02.0-rc1',
|
||||
SNAPSHOT: 'data/SNAPSHOT',
|
||||
},
|
||||
|
||||
// Pre-selected version (optional)
|
||||
default_version: '19.07.7',
|
||||
|
|
|
|||
|
|
@ -98,7 +98,7 @@ const ProfileDetails: FunctionComponent<Props> = ({ selectedVersion, selectedPro
|
|||
if (!profileData) {
|
||||
const response = await axios.get<Profile>(
|
||||
`${process.env.PUBLIC_URL}/data/${selectedVersion}` +
|
||||
`/${selectedProfile.target}/${selectedProfile.id}.json`
|
||||
`/${selectedProfile.target}/${selectedProfile.id}.json?t=${new Date().getTime()}`
|
||||
);
|
||||
profileData = response.data;
|
||||
profilesData[selectedProfile.id] = profileData;
|
||||
|
|
@ -460,6 +460,19 @@ const ProfileDetails: FunctionComponent<Props> = ({ selectedVersion, selectedPro
|
|||
<br />
|
||||
<br />
|
||||
<div>
|
||||
<Accordion className="std-accordian">
|
||||
<AccordionSummary expandIcon={<ExpandMore />}>Manifest</AccordionSummary>
|
||||
<AccordionDetails>
|
||||
<code>
|
||||
{Object.keys(buildResponse.manifest).map((e) => (
|
||||
<>
|
||||
{e}: {buildResponse.manifest[e]}
|
||||
<br />
|
||||
</>
|
||||
))}
|
||||
</code>
|
||||
</AccordionDetails>
|
||||
</Accordion>
|
||||
<Accordion className="std-accordian">
|
||||
<AccordionSummary expandIcon={<ExpandMore />}>Stderr</AccordionSummary>
|
||||
<AccordionDetails>
|
||||
|
|
|
|||
|
|
@ -30,7 +30,9 @@ const ProfileSearch: FunctionComponent<Props> = ({ selectedVersion, onProfileCha
|
|||
toggleWorking(true);
|
||||
|
||||
if (!overview) {
|
||||
const overviewPath = `${process.env.PUBLIC_URL}/data/${selectedVersion}/overview.json`;
|
||||
const overviewPath = `${
|
||||
process.env.PUBLIC_URL
|
||||
}/data/${selectedVersion}/overview.json?t=${new Date().getTime()}`;
|
||||
const response = await Axios.get<Overview>(overviewPath);
|
||||
overview = response.data;
|
||||
overviewData[selectedVersion] = overview;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue