Skip to content

Commit

Permalink
port fixes form SLE11
Browse files Browse the repository at this point in the history
  • Loading branch information
jreidinger committed Dec 3, 2013
1 parent ef2d5fb commit c23c94d
Show file tree
Hide file tree
Showing 14 changed files with 633 additions and 157 deletions.
2 changes: 1 addition & 1 deletion MAINTAINER
@@ -1 +1 @@
xwhu@suse.com
dmzhang <dmzhang@suse.com>
24 changes: 4 additions & 20 deletions Makefile.am.common
Expand Up @@ -15,7 +15,6 @@ ${ybcfiles}: %.ybc: %.ycp $(ycpchook)
CLEANFILES = ${ybcfiles}
DISTCLEANFILES = .dep

if HAS_YCP_MODULES
# Needs to be outside "." because of cases
# where ycpchook contains a symlink to "."
# Otherwise "." keeps being newer than .dep and we loop.
Expand All @@ -27,16 +26,14 @@ NEWDEP=${top_builddir}/.dep.new
${YCPMAKEDEP} --prefix=${prefix} ${YCPCFLAGS} > ${NEWDEP}
cat ${NEWDEP} > .dep
rm ${NEWDEP}
-include .dep
endif

dist-hook: check-syntax

CHECK_SYNTAX = true
check-syntax: $(client_DATA) $(module_DATA) $(ynclude_DATA) $(ydata_DATA) $(ycpchook) $(ybcfiles)
@if test "$(filter %.ycp, $(client_DATA) $(ydata_DATA))"; then \
check-syntax: $(client_DATA) $(ycpchook)
@if test "$(client_DATA)"; then \
if $(CHECK_SYNTAX); then \
TO_CHECK="$(filter %.ycp, $(client_DATA) $(ydata_DATA))"; \
TO_CHECK="$(filter %.ycp,$^)"; \
echo "Checking syntax of $${TO_CHECK}"; \
if ! $(YCPC) -qE -M. -I. $(YCPCFLAGS) $${TO_CHECK}; then \
echo "Failed. Disable by 'make ... CHECK_SYNTAX=false' at your own risk"; \
Expand All @@ -46,18 +43,5 @@ check-syntax: $(client_DATA) $(module_DATA) $(ynclude_DATA) $(ydata_DATA) $(ycpc
echo "Syntax check disabled"; \
fi; \
fi
@if test "$(filter %.rb, $^)"; then \
if $(CHECK_SYNTAX); then \
TO_CHECK="$(filter %.rb, $^)"; \
echo "Checking syntax of $${TO_CHECK}"; \
for f in $${TO_CHECK}; do \
if ! ruby -c $$f > /dev/null; then \
echo "Failed. Disable by 'make ... CHECK_SYNTAX=false' at your own risk"; \
exit 1; \
fi; \
done; \
else \
echo "Syntax check disabled"; \
fi; \
fi

-include .dep
2 changes: 1 addition & 1 deletion VERSION
@@ -1 +1 @@
3.1.0
3.1.1
41 changes: 0 additions & 41 deletions package/yast2-cluster.changes
@@ -1,44 +1,3 @@
-------------------------------------------------------------------
Wed Sep 18 12:48:05 UTC 2013 - lslezak@suse.cz

- do not use *.spec.in template, use *.spec file with RPM macros
instead
- 3.1.0

-------------------------------------------------------------------
Wed Jul 31 08:27:46 UTC 2013 - yast-devel@opensuse.org

- converted from YCP to Ruby by YCP Killer
(https://github.com/yast/ycp-killer)
- version 3.0.0

-------------------------------------------------------------------
Thu Mar 29 14:12:20 CEST 2012 - jsuchome@suse.cz

- merged proofed texts

-------------------------------------------------------------------
Mon Sep 26 13:14:34 CEST 2011 - visnov@suse.cz

- set dialog title
- 2.21.1

-------------------------------------------------------------------
Mon Sep 19 08:42:00 CEST 2011 - visnov@suse.cz

- remove unused dialogs and thus deprecated import (Wizard_hw)

-------------------------------------------------------------------
Fri Aug 5 12:31:08 CEST 2011 - tgoettlicher@suse.de

- fixed .desktop file (bnc #681249)

-------------------------------------------------------------------
Thu Aug 4 14:48:48 CEST 2011 - jsrain@suse.cz

- fixed categories in the .desktop-file (bnc#607047)
- 2.21.0

-------------------------------------------------------------------
Wed Jan 13 18:56:03 CET 2010 - kmachalkova@suse.cz

Expand Down
11 changes: 6 additions & 5 deletions src/Makefile.am
Expand Up @@ -10,17 +10,18 @@ client_DATA = \

yncludedir = @yncludedir@/cluster
ynclude_DATA = \
include/cluster/wizards.rb \
include/cluster/common.rb \
include/cluster/dialogs.rb \
include/cluster/common.rb \
include/cluster/complex.rb \
include/cluster/helps.rb
include/cluster/helps.rb \
include/cluster/wizards.rb

scrconf_DATA = \
scrconf/csync2_ha.scr \
scrconf/openais.scr \
scrconf/cfg_pacemaker.scr \
scrconf/cfg_openais.scr
scrconf/cfg_openais.scr \
scrconf/sysconfig_conntrackd.scr \
scrconf/csync2_ha.scr

agent_SCRIPTS = \
servers_non_y2/ag_openais
Expand Down
3 changes: 2 additions & 1 deletion src/desktop/cluster.desktop
@@ -1,8 +1,9 @@
[Desktop Entry]
Type=Application
Categories=Settings;System;Qt;X-SuSE-YaST;X-SuSE-YaST-High_Availability;
Categories=Qt;X-SuSE-YaST;X-SuSE-YaST-High_Availability;

X-KDE-ModuleType=Library
X-KDE-RootOnly=true
X-KDE-HasReadOnlyMode=true
X-KDE-Library=yast2
X-SuSE-YaST-Call=cluster
Expand Down
5 changes: 3 additions & 2 deletions src/include/cluster/common.rb
Expand Up @@ -39,15 +39,16 @@ def initialize_cluster_common(include_target)
Yast.import "SuSEFirewall"
Yast.import "SuSEFirewallServices"

@DIALOG = ["communication", "security", "service", "csync2"]
@DIALOG = ["communication", "security", "csync2", "conntrack", "service"]

@PARENT = {}

@NAME = {
"communication" => _("Communication Channels"),
"security" => _("Security"),
"service" => _("Service"),
"csync2" => _("Configure Csync2")
"csync2" => _("Configure Csync2"),
"conntrack" => _("Configure conntrackd")
}
end

Expand Down
128 changes: 123 additions & 5 deletions src/include/cluster/complex.rb
Expand Up @@ -19,22 +19,21 @@
# current contact information at www.novell.com.
# ------------------------------------------------------------------------------

# File: include/cluster/complex.ycp
# File: include/cluster/wizards.ycp
# Package: Configuration of cluster
# Summary: Dialogs definitions
# Summary: Wizards definitions
# Authors: Cong Meng <cmeng@novell.com>
#
# $Id: complex.ycp 41350 2007-10-10 16:59:00Z dfiser $
# $Id: wizards.ycp 27914 2006-02-13 14:32:08Z locilka $
module Yast
module ClusterComplexInclude
def initialize_cluster_complex(include_target)
Yast.import "UI"

textdomain "cluster"

Yast.import "Label"
Yast.import "Popup"
Yast.import "Wizard"
#import "Wizard_hw";
Yast.import "Confirm"
Yast.import "Cluster"

Expand Down Expand Up @@ -75,5 +74,124 @@ def WriteDialog
ret = Cluster.Write
ret ? :next : :abort
end

# Summary dialog
# @return dialog result
def SummaryDialog
# Cluster summary dialog caption
caption = _("Cluster Configuration")

# FIXME
summary = Cluster.Summary
unconfigured = Ops.get_list(summary, 1, [])
configured = Ops.get_string(summary, 0, "")

# Frame label
contents = nil # Wizard_hw::DetectedContent(_("Cluster to Configure"),
# unconfigured, false, configured);

Wizard.SetContentsButtons(
caption,
contents,
Ops.get_string(@HELPS, "summary", ""),
Label.BackButton,
Label.FinishButton
)

ret = nil
while true
ret = UI.UserInput

# abort?
if ret == :abort || ret == :cancel || ret == :back
if ReallyAbort()
break
else
next
end
# overview dialog
elsif ret == :edit_button
ret = :overview
break
# configure the selected device
elsif ret == :configure_button
# TODO FIXME: check for change of the configuration
selected = UI.QueryWidget(Id(:detected_selbox), :CurrentItem)
if selected == :other
ret = :other
else
ret = :configure
end
break
elsif ret == :next
break
else
Builtins.y2error("unexpected retcode: %1", ret)
next
end
end

deep_copy(ret)
end

# Overview dialog
# @return dialog result
def OverviewDialog
# Cluster overview dialog caption
caption = _("Cluster Overview")

overview = Cluster.Overview

# FIXME table header
contents = nil # Wizard_hw::ConfiguredContent(
# Table header
# `header(_("Number"), _("Cluster")),
# overview, nil, nil, nil, nil );

contents = nil #Wizard_hw::SpacingAround(contents, 1.5, 1.5, 1.0, 1.0);

Wizard.SetContentsButtons(
caption,
contents,
Ops.get_string(@HELPS, "overview", ""),
Label.BackButton,
Label.FinishButton
)

ret = nil
while true
ret = UI.UserInput

# abort?
if ret == :abort || ret == :cancel
if ReallyAbort()
break
else
next
end
# add
elsif ret == :add_button
# FIXME
ret = :add
break
# edit
elsif ret == :edit_button
# FIXME
ret = :edit
break
# delete
elsif ret == :delete_button
# FIXME
next
elsif ret == :next || ret == :back
break
else
Builtins.y2error("unexpected retcode: %1", ret)
next
end
end

deep_copy(ret)
end
end
end

0 comments on commit c23c94d

Please sign in to comment.