Skip to content

Commit

Permalink
Remove code duplication
Browse files Browse the repository at this point in the history
  • Loading branch information
sudhirverma committed Jan 15, 2019
1 parent 98d65e4 commit 5a0ea16
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions src/openshift/service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,11 @@ import { Progress } from '../util/progress';

export class Service extends OpenShiftItem {

static async create(application: OpenShiftObject): Promise<string> {
let project: OpenShiftObject;
if (!application) {
project = await vscode.window.showQuickPick(Service.getProjectNames(), {placeHolder: "In which Project you want to create an Service"});
if (project) application = await vscode.window.showQuickPick(Service.getApplicationNames(project), {placeHolder: "In which Application you want to create an Service"});
}
static async create(context: OpenShiftObject): Promise<string> {
const application = await Service.getOpenShiftCmdData(context,
"In which project you want to create an service",
"In which application you want to create an service"
);
if (application) {
const serviceTemplateName = await vscode.window.showQuickPick(Service.odo.getServiceTemplates(), {
placeHolder: "Service Template Name"
Expand Down

0 comments on commit 5a0ea16

Please sign in to comment.