Skip to content

Commit

Permalink
feat: update proxy host & inject disable property
Browse files Browse the repository at this point in the history
  • Loading branch information
juzhiyuan committed Dec 12, 2020
1 parent da9b738 commit b64509c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion web/config/proxy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* limitations under the License.
*/
const serveUrlMap = {
dev: 'http://40.73.92.163:8080',
dev: 'http://139.217.190.60',
test: 'http://localhost:9000',
};

Expand Down
8 changes: 8 additions & 0 deletions web/src/components/Plugin/PluginPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,14 @@ const PluginPage: React.FC<Props> = ({

const validateData = (pluginName: string, value: PluginComponent.Data) => {
fetchSchema(pluginName, schemaType).then((schema) => {
// NOTE: The frontend will inject the disable property into schema just like the manager-api does
if (!schema.properties) {
schema.properties = {}
}
;(schema.properties as any).disable = {
type: "boolean"
}

const { valid, errors } = validate(value, schema);
if (valid) {
setName(NEVER_EXIST_PLUGIN_FLAG);
Expand Down

0 comments on commit b64509c

Please sign in to comment.