Skip to content

Commit

Permalink
Release/0.2.1-4 (#98)
Browse files Browse the repository at this point in the history
* Docs update

* Returt app for LSB

* Fix styles in Entity

* Build 0.2.1-4

* Patch with HTX

* Added HTTPS in dev env

* Interfaces in docs

* Build script for CDN

* Prepare basic auth

* Refactor App and Image

* Return app variable in platform

* Task store login -> username

* New logic of description

* Fixed Image bugs and Polygons

* Docs with auth

* Auth request

* Full screen tool

* Remove https from dev

* Build without hash

* Build 0.2.1-4

* v. 0.2.1-4
  • Loading branch information
shevchenkonik authored Oct 24, 2019
1 parent a31f015 commit 8740635
Show file tree
Hide file tree
Showing 39 changed files with 791 additions and 482 deletions.
10 changes: 5 additions & 5 deletions build/asset-manifest.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"main.css": "/static/css/main.05fec320.css",
"main.js": "/static/js/main.c684fef9.js",
"main.js.map": "/static/js/main.c684fef9.js.map",
"main.css": "/static/css/main.ca4d6399.css",
"main.js": "/static/js/main.b5ddacd9.js",
"main.js.map": "/static/js/main.b5ddacd9.js.map",
"static/media/config.xml": "/static/media/config.1890026d.xml",
"static/css/main.05fec320.css.map": "/static/css/main.05fec320.css.map",
"static/css/main.ca4d6399.css.map": "/static/css/main.ca4d6399.css.map",
"index.html": "/index.html",
"precache-manifest.917053f230e58e2ed5b7fcfb9a932a09.js": "/precache-manifest.917053f230e58e2ed5b7fcfb9a932a09.js",
"precache-manifest.bbf29cc0590c9f5ed8edf29c73dce7a4.js": "/precache-manifest.bbf29cc0590c9f5ed8edf29c73dce7a4.js",
"service-worker.js": "/service-worker.js"
}
4 changes: 2 additions & 2 deletions build/index.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!doctype html><html lang="en"><head><meta charset="utf-8"/><link rel="shortcut icon" href="/favicon.ico"/><link href="//fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,600|Roboto Mono" rel="stylesheet"/><link href="//fonts.googleapis.com/css?family=Dosis:500&text=LabelStudio" rel="stylesheet"/><meta name="viewport" content="width=device-width,initial-scale=1,shrink-to-fit=no"><meta name="theme-color" content="#000000"><link rel="manifest" href="/manifest.json"><link rel="stylesheet" href="/styles/main.css"><title>Label Studio</title><link href="/static/css/main.05fec320.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="header"><a id="logo" href="/"><img src="./images/ls_logo.png" alt="label studio logo"> <span style="font-size:1.2em">Label Studio</span></a><ul id="nav" style="display:flex;align-items:center"><a style="margin-right:1em;text-decoration:underline" href="https://labelstud.io/guide">Guide</a> <a class="github-button" href="https://github.com/heartexlabs/label-studio" data-icon="octicon-star" data-size="large" data-show-count="true" aria-label="Star heartexlabs/label-studio on GitHub"><img src="./images/GitHub-Mark-64px.png" height="25"/></a></ul></div><div id="label-studio"></div><footer class="footer">Made by <a target="_blank" href="https://heartex.net">Heartex</a> in San Francisco<br/><br/><img src="./images/3nowhite.svg" height="80"/></footer><script>setTimeout(() => {
<!doctype html><html lang="en"><head><meta charset="utf-8"/><link rel="shortcut icon" href="/favicon.ico"/><link href="//fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,600|Roboto Mono" rel="stylesheet"/><link href="//fonts.googleapis.com/css?family=Dosis:500&text=LabelStudio" rel="stylesheet"/><meta name="viewport" content="width=device-width,initial-scale=1,shrink-to-fit=no"><meta name="theme-color" content="#000000"><link rel="manifest" href="/manifest.json"><link rel="stylesheet" href="/styles/main.css"><title>Label Studio</title><link href="/static/css/main.ca4d6399.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="header"><a id="logo" href="/"><img src="./images/ls_logo.png" alt="label studio logo"> <span style="font-size:1.2em">Label Studio</span></a><ul id="nav" style="display:flex;align-items:center"><a style="margin-right:1em;text-decoration:underline" href="https://labelstud.io/guide">Guide</a> <a class="github-button" href="https://github.com/heartexlabs/label-studio" data-icon="octicon-star" data-size="large" data-show-count="true" aria-label="Star heartexlabs/label-studio on GitHub"><img src="./images/GitHub-Mark-64px.png" height="25"/></a></ul></div><div id="label-studio"></div><footer class="footer">Made by <a target="_blank" href="https://heartex.net">Heartex</a> in San Francisco<br/><br/><img src="./images/3nowhite.svg" height="80"/></footer><script>setTimeout(() => {
var ls = new LabelStudio("label-studio", {
config: `
<View>
Expand Down Expand Up @@ -37,4 +37,4 @@
}
}
});
}, 2000);</script><script src="/static/js/main.c684fef9.js"></script></body></html>
}, 2000);</script><script src="/static/js/main.b5ddacd9.js"></script></body></html>
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ self.__precacheManifest = [
"url": "/static/media/config.be40f192.xml"
},
{
"revision": "c684fef92d363a33f67f",
"url": "/static/css/main.05fec320.css"
"revision": "b5ddacd94d11a4c88ddb",
"url": "/static/css/main.ca4d6399.css"
},
{
"revision": "5bb63d8f59b769afa2951085535974c9",
Expand All @@ -28,8 +28,8 @@ self.__precacheManifest = [
"url": "/static/media/config.2a6054fe.xml"
},
{
"revision": "c684fef92d363a33f67f",
"url": "/static/js/main.c684fef9.js"
"revision": "b5ddacd94d11a4c88ddb",
"url": "/static/js/main.b5ddacd9.js"
},
{
"revision": "f4626f44ab6f63bfc683408a117236b7",
Expand All @@ -52,7 +52,7 @@ self.__precacheManifest = [
"url": "/static/media/config.1890026d.xml"
},
{
"revision": "66ed7fd565bf84c4e932ccc8e7d880a3",
"revision": "1de38c3f2c31b4441d36af033bd835a9",
"url": "/index.html"
}
];
2 changes: 1 addition & 1 deletion build/service-worker.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
importScripts("https://storage.googleapis.com/workbox-cdn/releases/3.6.3/workbox-sw.js");

importScripts(
"/precache-manifest.917053f230e58e2ed5b7fcfb9a932a09.js"
"/precache-manifest.bbf29cc0590c9f5ed8edf29c73dce7a4.js"
);

workbox.clientsClaim();
Expand Down
1 change: 0 additions & 1 deletion build/static/css/main.05fec320.css.map

This file was deleted.

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions build/static/css/main.ca4d6399.css.map

Large diffs are not rendered by default.

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions build/static/js/main.b5ddacd9.js.map

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion build/static/js/main.c684fef9.js.map

This file was deleted.

111 changes: 110 additions & 1 deletion docs/source/guide/frontend.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,37 @@ Default: `null`

Type data: `array`

Collection of modules to include and respective options.
Collection of modules to include and respective options:

```javascript
[
"controls",
"side-column",
"panel",
"submit",
"skip",
"update,
"check-empty",
"completions",
"completions:menu",
"predictions",
"predictions:menu",
"load"
]
```
- `controls` - enable panel with controls (submit, update, skip)
- `side-column` - enable panel with entities
- `panel` - navigation panel of current task with buttons: undo, redo and reset
- `submit` - show button of submit or update current completion
- `skip` - show button of skip current task
- `update` - show button of update current task after submitting
- `check-empty` - enable validation of submit empty task
- `completions` - enable support completions
- `completions:menu` - show completions menu
- `predictions` - enable support predictions
- `predictions:menu` - show predictions menu
- `load` - enable loading next task after submit current task
### description
Expand Down Expand Up @@ -123,6 +153,13 @@ Type data: `object`
```json
{
id: 1,
load: false,
auth: {
enable: true,
to: "text",
username: "user",
password: "pass"
},
data: {
text: "Labeling text..."
},
Expand All @@ -133,6 +170,50 @@ Type data: `object`
#### id
Type data: `integer`
Default: `null`
#### auth
Type data: `object`
Default: `null`
The object is necessary to support data from servers with HTTP basic authentication.
##### enable
Type data: `boolean`
Default: `false`
##### to
Type data: `string`
Default: ` `
##### username
Type data: `string`
Default: ` `
##### password
Type data: `string`
Default: ` `
#### load
Type data: `boolean`
Default: `false`
The flag is necessary to support the loading of API data.
#### data
#### completions
Expand Down Expand Up @@ -249,3 +330,31 @@ deleteCompletion: function(result) {
console.log(result)
}
```
## Custom data
If you want to use Label Studio with data from server with [HTTP basic authentication](https://developer.mozilla.org/en-US/docs/Web/HTTP/Authentication), then you need to configure Headers on the server:
```shell
Access-Control-Allow-Origin: '*';
Access-Control-Allow-Credentials: true;
Access-Control-Allow-Methods: 'GET, POST, OPTIONS';
Access-Control-Allow-Headers: 'Cache-Control, Pragma, Origin, Authorization, Content-Type, X-Requested-With';
Access-Control-Expose-Headers: 'Content-Length,Content-Range';
```
And configure LS:
```javascript
task: {
auth: {
enable: true,
to: 'image',
username: 'user',
password: 'pass',
},
data: {
image: 'https://example.com/custom_data_with_http_auth.jpg'
}
}
```
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "label-studio",
"version": "0.2.1-3",
"version": "0.2.1-4",
"description": "Label Studio is a multi-domain data labeling tool with standardized output format",
"homepage": "https://labelstud.io",
"author": {
Expand Down
24 changes: 24 additions & 0 deletions scripts/build-without-hash.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
const rewire = require("rewire");
const defaults = rewire("react-scripts/scripts/build.js");
let config = defaults.__get__("config");

config.optimization.splitChunks = {
cacheGroups: {
default: false,
},
};

/**
* Disable hash generation in production build for JS
*/
config.output.filename = "static/js/[name].bundle.js";

/**
* Disable hash generation in production build for CSS
*/
config.plugins[5].options.filename = "static/css/[name].bundle.css";

/**
* Disable chunks in production build
*/
config.optimization.runtimeChunk = false;
3 changes: 3 additions & 0 deletions scripts/build-without-split.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,7 @@ config.optimization.splitChunks = {
},
};

/**
* Disable chunks in production build
*/
config.optimization.runtimeChunk = false;
2 changes: 1 addition & 1 deletion src/components/App/App.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@

.common {
display: flex;
justify-content: flex-start;
justify-content: space-between;
align-items: flex-start;
}

Expand Down
2 changes: 2 additions & 0 deletions src/components/Entity/Entity.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,10 @@

.labels {
margin-bottom: 10px;
word-break: break-word;
}

.tag {
margin-bottom: 5px;
white-space: normal !important;
}
2 changes: 1 addition & 1 deletion src/components/ImageControls/ImageControls.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export default observer(
tipFormatter={null}
style={{ height: 50 }}
onChange={value => {
this.props.handleBrightness(value);
this.props.updateBrightness(value);
}}
/>
</Fragment>
Expand Down
Loading

0 comments on commit 8740635

Please sign in to comment.