Skip to content

Commit

Permalink
Merge pull request dcos#2836 from dcos/ahoskins/fix/DCOS-21614-framew…
Browse files Browse the repository at this point in the history
…ork-edit-ui

feat(EditServiceModal): show cosmos services in json-schema form
  • Loading branch information
DanielMSchmidt authored Mar 21, 2018
2 parents f2935c9 + 8866e50 commit 8e01c07
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import PropTypes from "prop-types";
import React from "react";

import Framework from "#PLUGINS/services/src/js/structs/Framework";
import Pod from "../structs/Pod";
import PodConfigurationContainer
from "../containers/pod-configuration/PodConfigurationContainer";
Expand All @@ -17,7 +16,10 @@ const HighOrderServiceConfiguration = function(props) {
return <PodConfigurationContainer pod={service} />;
}

if (service instanceof Framework) {
if (
service.getLabels().DCOS_PACKAGE_DEFINITION != null ||
service.getLabels().DCOS_PACKAGE_METADATA != null
) {
return <FrameworkConfigurationContainer service={service} />;
}

Expand Down
6 changes: 4 additions & 2 deletions plugins/services/src/js/components/modals/EditServiceModal.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import EditFrameworkConfiguration
from "#PLUGINS/services/src/js/pages/EditFrameworkConfiguration";
import CreateServiceModal
from "#PLUGINS/services/src/js/components/modals/CreateServiceModal";
import Framework from "#PLUGINS/services/src/js/structs/Framework";
import DCOSStore from "#SRC/js/stores/DCOSStore";

class EditServiceModal extends Component {
Expand All @@ -13,7 +12,10 @@ class EditServiceModal extends Component {
const serviceID = decodeURIComponent(id);
const service = DCOSStore.serviceTree.findItemById(serviceID);

if (service instanceof Framework) {
if (
service.getLabels().DCOS_PACKAGE_DEFINITION != null ||
service.getLabels().DCOS_PACKAGE_METADATA != null
) {
return <EditFrameworkConfiguration {...this.props} />;
}

Expand Down

0 comments on commit 8e01c07

Please sign in to comment.