Author: gs
Date: Tue Jul 29 12:29:04 2008
New Revision: 49481
URL: http://svn.opensuse.org/viewcvs/yast?rev=49481&view=rev
Log:
add rules dialog
Modified:
trunk/auditd/src/complex.ycp
trunk/auditd/src/dialogs.ycp
trunk/auditd/src/wizards.ycp
Modified: trunk/auditd/src/complex.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/auditd/src/complex.ycp?rev=49481&r1=49480&r2=49481&view=diff
==============================================================================
--- trunk/auditd/src/complex.ycp (original)
+++ trunk/auditd/src/complex.ycp Tue Jul 29 12:29:04 2008
@@ -128,135 +128,13 @@
y2milestone( "Store dispatcher" );
}
-
-
-
-any RulesDialog() {
-
- /* Boot dialog caption */
- string caption = _("Auditd Rules Configuration");
- string help = HELPS["boot"]:"";
-
- /* Boot dialog contents */
- term contents = `HVCenter(`HVSquash
- (`HBox(
- `HSpacing(5),
- `VBox(
- `VSpacing(2),
- /* Frame label */
- `MultiLineEdit( `id(`rules), _("File: audit.rules") ),
- `VSpacing(2)
- ),
- `HSpacing(5)
- )));
-
- Wizard::SetContentsButtons(caption, contents, help,
- Label::BackButton(), Label::FinishButton());
-
- any ret = nil;
- while(true) {
- ret = UI::UserInput();
-
- /* abort? */
- if(ret == `abort || ret == `cancel) {
- if(ReallyAbort()) break;
- else continue;
- }
- else if(ret == `back || ret == `next) {
- break;
- }
- else {
- y2error("Unexpected return code: %1", ret);
- continue;
- }
- }
-
- return ret;
+void InitRulesDialog( string id ) {
+ y2milestone ( "Init rules dialog" );
}
-term DispatcherOptions() {
-
- term contents = `VBox(
- `InputField( "Dispatcher "),
- `InputField( "disp_qos ")
- );
- return contents;
+void StoreRulesDialog( string id, map event) {
+ y2milestone( "Store rules dialog" );
}
-
-/**
- * Config dialog
- * @return dialog result
- */
-any ConfigDialog() {
-
- /* Auditd summary dialog caption */
- string caption = _("Auditd Configuration");
-
- term contents = `VBox(
- `DumbTab( [
- `item(`id(`start ), "Start Options" ),
- `item(`id(`misc ), "Misc" ),
- `item(`id(`dispatcher ), "Dispatcher", true ) // true: selected
- ],
- `Left(
- `Top(
- `HVSquash(
- `VBox(
- `VSpacing(0.3),
- `HBox(
- `HSpacing(1),
- `ReplacePoint(`id(`tabContents ), DispatcherOptions() )
- )
- )
- )
- )
- )
- ),
- `VSpacing(1.0)
- );
-
- Wizard::SetContentsButtons(caption, contents, HELPS["summary"]:"",
- Label::BackButton(), Label::NextButton());
-
- any ret = nil;
- while(true) {
-
- ret = UI::UserInput();
-
- /* abort? */
- if(ret == `abort || ret == `cancel || ret == `back) {
- if(ReallyAbort()) break;
- else continue;
- }
- /* overview dialog */
- else if(ret == `edit_button) {
- ret = `overview;
- break;
- }
- /* configure the selected device */
- else if(ret == `configure_button) {
- // TODO FIXME: check for change of the configuration
- any selected = UI::QueryWidget(`id(`detected_selbox), `CurrentItem);
- if(selected == `other) {
- ret = `other;
- }
- else {
- ret = `configure;
- }
- break;
- }
- else if(ret == `next) {
- break;
- }
- else {
- y2error("unexpected retcode: %1", ret);
- continue;
- }
- }
-
- return ret;
-}
-
/* EOF */
}
Modified: trunk/auditd/src/dialogs.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/auditd/src/dialogs.ycp?rev=49481&r1=49480&r2=49481&view=diff
==============================================================================
--- trunk/auditd/src/dialogs.ycp (original)
+++ trunk/auditd/src/dialogs.ycp Tue Jul 29 12:29:04 2008
@@ -116,5 +116,19 @@
);
}
+term RulesDialogContent() {
+ return `MarginBox( mbox_x, mbox_y,
+ `VBox(
+ `VSpacing(1.0),
+ `VBox(
+ `Left(`Label(_("Edit rules for audit daemon here"))),
+ `VSpacing(1.0),
+ `MultiLineEdit(`id(`rules), ("/etc/audit/audit.rules"))
+ ),
+ `VStretch()
+ )
+ );
+}
+
} /* EOF */
Modified: trunk/auditd/src/wizards.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/auditd/src/wizards.ycp?rev=49481&r1=49480&r2=49481&view=diff
==============================================================================
--- trunk/auditd/src/wizards.ycp (original)
+++ trunk/auditd/src/wizards.ycp Tue Jul 29 12:29:04 2008
@@ -67,6 +67,13 @@
"init" : InitDiskspaceSettingsDialog,
"store" : StoreDiskspaceSettingsDialog,
],
+ "rules" : $[
+ "widget" : `custom,
+ "help" : HELPS["auditd_rules"]:"",
+ "custom_widget" : RulesDialogContent(),
+ "init" : InitRulesDialog,
+ "store" : StoreRulesDialog,
+ ],
];
map